From 7bf090b75325cc15bec41a62369a7efc86bca24c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julien=20Fastr=C3=A9?= Date: Thu, 19 Jul 2018 10:42:36 +0200 Subject: [PATCH] load open sans from css, background image from css and create login css --- Resources/public/css/scratch.css | 1 - .../OpenSans/{OpenSans.css => OpenSans.scss} | 0 Resources/public/modules/login_page/index.js | 3 + .../public/modules/login_page/login.scss | 63 ++++++++++++++++ Resources/public/sass/_custom.scss | 3 +- Resources/public/sass/custom/_fonts.scss | 2 + Resources/views/Login/login.html.twig | 73 +------------------ Resources/views/layout.html.twig | 23 +----- chill.webpack.config.js | 3 + 9 files changed, 78 insertions(+), 93 deletions(-) rename Resources/public/fonts/OpenSans/{OpenSans.css => OpenSans.scss} (100%) create mode 100644 Resources/public/modules/login_page/index.js create mode 100644 Resources/public/modules/login_page/login.scss create mode 100644 Resources/public/sass/custom/_fonts.scss diff --git a/Resources/public/css/scratch.css b/Resources/public/css/scratch.css index a66373576..31d1f0ab1 100644 --- a/Resources/public/css/scratch.css +++ b/Resources/public/css/scratch.css @@ -4585,7 +4585,6 @@ header { right: 0; top: 0; z-index: -1; - background-image: url("/bundles/chillmain/img/background/desert.jpg"); background-attachment: fixed; background-repeat: no-repeat; background-size: cover; diff --git a/Resources/public/fonts/OpenSans/OpenSans.css b/Resources/public/fonts/OpenSans/OpenSans.scss similarity index 100% rename from Resources/public/fonts/OpenSans/OpenSans.css rename to Resources/public/fonts/OpenSans/OpenSans.scss diff --git a/Resources/public/modules/login_page/index.js b/Resources/public/modules/login_page/index.js new file mode 100644 index 000000000..1e6676d8f --- /dev/null +++ b/Resources/public/modules/login_page/index.js @@ -0,0 +1,3 @@ +require('./login.scss'); + + diff --git a/Resources/public/modules/login_page/login.scss b/Resources/public/modules/login_page/login.scss new file mode 100644 index 000000000..4c764bdcc --- /dev/null +++ b/Resources/public/modules/login_page/login.scss @@ -0,0 +1,63 @@ +@import './../../fonts/OpenSans/OpenSans'; + +html, body { + height: 100%; + margin: 0; + padding: 0; +} + +body { + background-color: #333; + color: white; + text-align: center; + font-family: 'Open Sans'; +} + +#content { + position: relative; + height: 90%; + padding-top: 10%; +} + +#content:before { + bottom: 0; + content: ""; + left: 0; + opacity: 0.2; + position: absolute; + right: 0; + top: 0; + z-index: -1; + background-image: url('./../../img/background/desert.jpg'); + background-attachment: fixed; + background-repeat: no-repeat; + background-size: cover; + background-position: center; +} + +label { + width : 15em; + text-align: right; + display: inline-block; + font-weight: 300; + padding-right: 5px; +} +input { + +} +form { + +} +button { + margin-left: 15em; + margin-top: 1em; + background-color: #df4949; + border: medium none; + border-radius: 0; + box-shadow: none; + color: #fff; + padding: 4px 8px; + font-family: 'Open Sans'; + font-weight: 300; +} + diff --git a/Resources/public/sass/_custom.scss b/Resources/public/sass/_custom.scss index ffcca26d4..393d16e75 100644 --- a/Resources/public/sass/_custom.scss +++ b/Resources/public/sass/_custom.scss @@ -1,6 +1,7 @@ // YOUR CUSTOM SCSS @import 'custom/config/colors'; @import 'custom/config/variables'; +@import 'custom/fonts'; @import 'custom/timeline'; @import 'custom/mixins/entity'; @import 'custom/activity'; @@ -36,7 +37,7 @@ header { right: 0; top: 0; z-index: -1; - background-image: url("/bundles/chillmain/img/background/desert.jpg"); + background-image: url('./../../img/background/desert.jpg'); background-attachment: fixed; background-repeat: no-repeat; background-size: cover; diff --git a/Resources/public/sass/custom/_fonts.scss b/Resources/public/sass/custom/_fonts.scss new file mode 100644 index 000000000..a129d32bc --- /dev/null +++ b/Resources/public/sass/custom/_fonts.scss @@ -0,0 +1,2 @@ + +@import './../../fonts/OpenSans/OpenSans'; \ No newline at end of file diff --git a/Resources/views/Login/login.html.twig b/Resources/views/Login/login.html.twig index 1ed31eac7..248ea0e5d 100644 --- a/Resources/views/Login/login.html.twig +++ b/Resources/views/Login/login.html.twig @@ -23,79 +23,12 @@ {{ 'Login to %installation_name%' | trans({ '%installation_name%' : installation.name } ) }} - - {% stylesheets output="css/login.css" filter="cssrewrite" - - "bundles/chillmain/fonts/OpenSans/OpenSans.css" %} - - {% endstylesheets %} - - + +
- + {% if error is not null %}

{{ error.message|trans }}

diff --git a/Resources/views/layout.html.twig b/Resources/views/layout.html.twig index d971b2107..5c58ab23d 100644 --- a/Resources/views/layout.html.twig +++ b/Resources/views/layout.html.twig @@ -27,16 +27,7 @@ {{ installation.name }} - {% block title %}{% endblock %} - - - + {% block css%}{% endblock %} @@ -46,7 +37,7 @@ @@ -154,16 +145,6 @@
{{ 'User manual'|trans }}

- -