diff --git a/app/_config/base-graphql.yml b/app/_config/base-graphql.yml index ce33295..df2acd8 100644 --- a/app/_config/base-graphql.yml +++ b/app/_config/base-graphql.yml @@ -9,27 +9,7 @@ SilverStripe\Control\Director: SilverStripe\GraphQL\Controller: cors: Enabled: true - Allow-Origin: - - '127.0.0.1:3001' - - 'localhost:3001' - - 'http://127.0.0.1' - - 'http://127.0.0.1:3001' - - 'http://127.0.0.1:3000' - - 'https://127.0.0.1' - - 'https://127.0.0.1:3001' - - 'https://127.0.0.1:3000' - - 'http://localhost' - - 'http://localhost:3001' - - 'http://localhost:3000' - - 'https://localhost' - - 'https://localhost:3001' - - 'https://localhost:3000' - - 'twma.pro' - - 'tony.twma.pro' - - 'http://twma.pro' - - 'https://twma.pro' - - 'http://tony.twma.pro' - - 'https://tony.twma.pro' + Allow-Origin: '*' Allow-Headers: 'Authorization, Content-Type, Content-Language, apikey' Allow-Methods: 'GET, PUT, DELETE, OPTIONS, POST' #Allow-Credentials: 'true' diff --git a/app/_config/templates-themes.yml b/app/_config/templates-themes.yml index 87a2ae1..f84c38f 100644 --- a/app/_config/templates-themes.yml +++ b/app/_config/templates-themes.yml @@ -4,7 +4,7 @@ After: - webapp-options-elements --- SilverStripe\View\SSViewer: - source_file_comments: true + source_file_comments: false themes: - '$public' - '$default' diff --git a/app/client/src/scss/_typography.scss b/app/client/src/scss/_typography.scss index dd283ac..dec2af6 100644 --- a/app/client/src/scss/_typography.scss +++ b/app/client/src/scss/_typography.scss @@ -1,26 +1,31 @@ // Add your site-wide, but not content editor typography styling .bg-dark { - h1, - h2, - h3, - h4, - h5, - h6, - .h1, - .h2, - .h3, - .h4, - .h5, - .h6, - .typography, - a { - color: $white; - } + + h1, + h2, + h3, + h4, + h5, + h6, + .h1, + .h2, + .h3, + .h4, + .h5, + .h6, + .typography, + a { + color: $white; + } } .typography { - @include clearfix; + @include clearfix; - @import './types/editor'; + @import './types/editor'; + + img { + border: 0; + } } diff --git a/app/client/src/scss/app.scss b/app/client/src/scss/app.scss index 7ae5cf3..6d2fb8c 100644 --- a/app/client/src/scss/app.scss +++ b/app/client/src/scss/app.scss @@ -1,5 +1,6 @@ @import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/_components/_ui.bootstrap'; @import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/_components/_ui.main'; +@import '~@a2nt/ss-bootstrap-ui-webpack-boilerplate-react/src/scss/_components/_ui.main.ss'; // Your custom variables @import '_variables'; diff --git a/app/src/Extensions/SocialExtension.php b/app/src/Extensions/SocialExtension.php index 937ecdb..b5b83fe 100644 --- a/app/src/Extensions/SocialExtension.php +++ b/app/src/Extensions/SocialExtension.php @@ -18,7 +18,7 @@ use SilverStripe\Security\Member; class SocialExtension extends DataExtension { private static $db = [ - 'PhoneNumber' => 'Varchar(255)', + //'PhoneNumber' => 'Varchar(255)', ]; private static $has_one = [ @@ -28,7 +28,7 @@ class SocialExtension extends DataExtension 'Instagram' => Link::class, 'Twitter' => Link::class, 'PublicEmail' => Link::class, - //'PhoneNumber' => Link::class, + 'PhoneNumber' => Link::class, ]; public function updateCMSFields(FieldList $fields) @@ -50,11 +50,10 @@ class SocialExtension extends DataExtension $fields->findOrMakeTab('Root.Social'); $fields->addFieldsToTab('Root.Social', [ - TextField::create('PhoneNumber'), LinkField::create('PublicEmailID', 'Public Email') ->setAllowedTypes(['Email']), - /*LinkField::create('PhoneNumberID', 'Phone Number') - ->setAllowedTypes(['Phone']),*/ + LinkField::create('PhoneNumberID', 'Phone Number') + ->setAllowedTypes(['Phone']), ]); $fields->addFieldsToTab('Root.Social', $linkFields); diff --git a/app/templates/SilverStripe/UserForms/Model/EditableFormField_holder.ss b/app/templates/SilverStripe/UserForms/Model/EditableFormField_holder.ss new file mode 100644 index 0000000..a2f2c49 --- /dev/null +++ b/app/templates/SilverStripe/UserForms/Model/EditableFormField_holder.ss @@ -0,0 +1,16 @@ +
+ <% if $Title %><% end_if %> + +
+ $Field +
+ + <% if $Title && $RightTitle %> +
$RightTitle
+ <% else_if $RightTitle %> + + <% end_if %> + + <% if $Message %>$Message<% end_if %> + <% if $Description %>$Description<% end_if %> +
diff --git a/public/.htaccess b/public/.htaccess index f9e49c2..de417dc 100755 --- a/public/.htaccess +++ b/public/.htaccess @@ -1,12 +1,19 @@ -# Redirect to HTTPS -#RewriteEngine On -#RewriteCond %{HTTPS} off -#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] +RewriteEngine On + +# Redirect to no-WWW +RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] +RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L] # Redirect to WWW #RewriteCond %{HTTP_HOST} !^www\. [NC] #RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] +# Redirect to HTTPS +RewriteCond %{HTTP:X-Forwarded-Proto} =http +RewriteCond %{HTTPS} off +#RewriteCond %{SERVER_PORT} 80 +RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + # SPDY protocol #Header add Alternate-Protocol "443:npn-spdy/3" @@ -17,7 +24,7 @@ # Header set Set-Cookie HttpOnly;Secure # Submit domain to https://hstspreload.org/ -#Header add Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" +Header add Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" # XSS-protection #Header add X-Frame-Options "SAMEORIGIN" diff --git a/public/htaccess-dist b/public/htaccess-dist index 9ae2161..dcbdb30 100644 --- a/public/htaccess-dist +++ b/public/htaccess-dist @@ -1,12 +1,19 @@ -# Redirect to HTTPS -#RewriteEngine On -#RewriteCond %{HTTPS} off -#RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] +RewriteEngine On + +# Redirect to no-WWW +RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC] +RewriteRule ^(.*)$ http://%1%{REQUEST_URI} [R=301,QSA,NC,L] # Redirect to WWW #RewriteCond %{HTTP_HOST} !^www\. [NC] #RewriteRule .* https://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301] +# Redirect to HTTPS +RewriteCond %{HTTP:X-Forwarded-Proto} =http +RewriteCond %{HTTPS} off +#RewriteCond %{SERVER_PORT} 80 +RewriteRule .* https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301] + # SPDY protocol #Header add Alternate-Protocol "443:npn-spdy/3" @@ -17,7 +24,7 @@ # Header set Set-Cookie HttpOnly;Secure # Submit domain to https://hstspreload.org/ -#Header add Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" +Header add Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" # XSS-protection #Header add X-Frame-Options "SAMEORIGIN"