From 8af72f7b9a9a59eaa900903347c63704bc46fc0c Mon Sep 17 00:00:00 2001 From: Mathieu Magnin Date: Wed, 17 May 2017 15:11:35 +0200 Subject: [PATCH] Isolate new design stylesheets --- .scss-lint.yml | 2 +- app/assets/stylesheets/_constants.scss | 4 ---- app/assets/stylesheets/application.scss | 7 ------- app/assets/stylesheets/new_application.scss | 10 ---------- .../stylesheets/{ => new_design}/_colors.scss | 0 app/assets/stylesheets/new_design/_constants.scss | 3 +++ .../stylesheets/{ => new_design}/_mixins.scss | 0 .../{ => new_design}/_placeholders.scss | 0 .../stylesheets/{ => new_design}/_typography.scss | 0 app/assets/stylesheets/new_design/beta.scss | 15 +++++++++++++++ .../stylesheets/{ => new_design}/common.scss | 0 .../{ => new_design}/custom_reset.scss | 0 .../stylesheets/{ => new_design}/fonts.scss | 0 .../stylesheets/{ => new_design}/landing.scss | 0 .../stylesheets/{ => new_design}/new_alert.scss | 0 .../stylesheets/new_design/new_application.scss | 6 ++++++ .../stylesheets/{ => new_design}/new_footer.scss | 0 .../stylesheets/{ => new_design}/new_header.scss | 0 .../stylesheets/{ => new_design}/reset.scss | 0 .../stylesheets/{ => new_design}/utils.scss | 0 app/views/layouts/new_application.html.haml | 2 +- config/initializers/assets.rb | 2 +- 22 files changed, 27 insertions(+), 24 deletions(-) delete mode 100644 app/assets/stylesheets/new_application.scss rename app/assets/stylesheets/{ => new_design}/_colors.scss (100%) create mode 100644 app/assets/stylesheets/new_design/_constants.scss rename app/assets/stylesheets/{ => new_design}/_mixins.scss (100%) rename app/assets/stylesheets/{ => new_design}/_placeholders.scss (100%) rename app/assets/stylesheets/{ => new_design}/_typography.scss (100%) create mode 100644 app/assets/stylesheets/new_design/beta.scss rename app/assets/stylesheets/{ => new_design}/common.scss (100%) rename app/assets/stylesheets/{ => new_design}/custom_reset.scss (100%) rename app/assets/stylesheets/{ => new_design}/fonts.scss (100%) rename app/assets/stylesheets/{ => new_design}/landing.scss (100%) rename app/assets/stylesheets/{ => new_design}/new_alert.scss (100%) create mode 100644 app/assets/stylesheets/new_design/new_application.scss rename app/assets/stylesheets/{ => new_design}/new_footer.scss (100%) rename app/assets/stylesheets/{ => new_design}/new_header.scss (100%) rename app/assets/stylesheets/{ => new_design}/reset.scss (100%) rename app/assets/stylesheets/{ => new_design}/utils.scss (100%) diff --git a/.scss-lint.yml b/.scss-lint.yml index 7ee185bb3..835a46690 100644 --- a/.scss-lint.yml +++ b/.scss-lint.yml @@ -1,4 +1,4 @@ -exclude: 'app/assets/stylesheets/reset.scss' +exclude: 'app/assets/stylesheets/new_design/reset.scss' linters: BangFormat: diff --git a/app/assets/stylesheets/_constants.scss b/app/assets/stylesheets/_constants.scss index bfd996878..119b9eaea 100644 --- a/app/assets/stylesheets/_constants.scss +++ b/app/assets/stylesheets/_constants.scss @@ -3,7 +3,3 @@ $light-blue: #F2F6FA; // Bootstrap constants $font-size-base: 16px; - -$page-width: 1040px; - -$default-padding: 15px; diff --git a/app/assets/stylesheets/application.scss b/app/assets/stylesheets/application.scss index 33338dbdb..5b64692b7 100644 --- a/app/assets/stylesheets/application.scss +++ b/app/assets/stylesheets/application.scss @@ -13,13 +13,8 @@ // file per style scope. // // = require _card -// = require _colors -// = require _constants // = require _helpers -// = require _mixins -// = require _placeholders // = require _turbolinks -// = require _typography // = require admin_procedures_modal // = require admin_type_de_champ // = require backoffice @@ -31,9 +26,7 @@ // = require dossier_show // = require dossiers // = require etapes -// = require fonts // = require france_connect_particulier -// = require landing // = require left_panel // = require login // = require main_container diff --git a/app/assets/stylesheets/new_application.scss b/app/assets/stylesheets/new_application.scss deleted file mode 100644 index db2e8c65c..000000000 --- a/app/assets/stylesheets/new_application.scss +++ /dev/null @@ -1,10 +0,0 @@ -// = require reset -// = require custom_reset -// = require common -// = require utils -// = require fonts -// = require new_alert -// = require new_header -// = require new_footer -// = require landing -// = require navbar diff --git a/app/assets/stylesheets/_colors.scss b/app/assets/stylesheets/new_design/_colors.scss similarity index 100% rename from app/assets/stylesheets/_colors.scss rename to app/assets/stylesheets/new_design/_colors.scss diff --git a/app/assets/stylesheets/new_design/_constants.scss b/app/assets/stylesheets/new_design/_constants.scss new file mode 100644 index 000000000..897512e1d --- /dev/null +++ b/app/assets/stylesheets/new_design/_constants.scss @@ -0,0 +1,3 @@ +$page-width: 1040px; + +$default-padding: 15px; diff --git a/app/assets/stylesheets/_mixins.scss b/app/assets/stylesheets/new_design/_mixins.scss similarity index 100% rename from app/assets/stylesheets/_mixins.scss rename to app/assets/stylesheets/new_design/_mixins.scss diff --git a/app/assets/stylesheets/_placeholders.scss b/app/assets/stylesheets/new_design/_placeholders.scss similarity index 100% rename from app/assets/stylesheets/_placeholders.scss rename to app/assets/stylesheets/new_design/_placeholders.scss diff --git a/app/assets/stylesheets/_typography.scss b/app/assets/stylesheets/new_design/_typography.scss similarity index 100% rename from app/assets/stylesheets/_typography.scss rename to app/assets/stylesheets/new_design/_typography.scss diff --git a/app/assets/stylesheets/new_design/beta.scss b/app/assets/stylesheets/new_design/beta.scss new file mode 100644 index 000000000..c8480d52d --- /dev/null +++ b/app/assets/stylesheets/new_design/beta.scss @@ -0,0 +1,15 @@ +#beta { + text-align: center; + text-transform: uppercase; + position: fixed; + bottom: 26px; + right: -35px; + transform: rotate(-45deg); + width: 150px; + background-color: #008CBA; + color: #FFFFFF; + padding: 5px; + font-size: 15px; + font-weight: 700; + z-index: 10; +} diff --git a/app/assets/stylesheets/common.scss b/app/assets/stylesheets/new_design/common.scss similarity index 100% rename from app/assets/stylesheets/common.scss rename to app/assets/stylesheets/new_design/common.scss diff --git a/app/assets/stylesheets/custom_reset.scss b/app/assets/stylesheets/new_design/custom_reset.scss similarity index 100% rename from app/assets/stylesheets/custom_reset.scss rename to app/assets/stylesheets/new_design/custom_reset.scss diff --git a/app/assets/stylesheets/fonts.scss b/app/assets/stylesheets/new_design/fonts.scss similarity index 100% rename from app/assets/stylesheets/fonts.scss rename to app/assets/stylesheets/new_design/fonts.scss diff --git a/app/assets/stylesheets/landing.scss b/app/assets/stylesheets/new_design/landing.scss similarity index 100% rename from app/assets/stylesheets/landing.scss rename to app/assets/stylesheets/new_design/landing.scss diff --git a/app/assets/stylesheets/new_alert.scss b/app/assets/stylesheets/new_design/new_alert.scss similarity index 100% rename from app/assets/stylesheets/new_alert.scss rename to app/assets/stylesheets/new_design/new_alert.scss diff --git a/app/assets/stylesheets/new_design/new_application.scss b/app/assets/stylesheets/new_design/new_application.scss new file mode 100644 index 000000000..82fb5fc2a --- /dev/null +++ b/app/assets/stylesheets/new_design/new_application.scss @@ -0,0 +1,6 @@ +// = require ./reset +// = require ./custom_reset +// = require ./common +// = require ./utils +// = require ./fonts +// = require_tree . diff --git a/app/assets/stylesheets/new_footer.scss b/app/assets/stylesheets/new_design/new_footer.scss similarity index 100% rename from app/assets/stylesheets/new_footer.scss rename to app/assets/stylesheets/new_design/new_footer.scss diff --git a/app/assets/stylesheets/new_header.scss b/app/assets/stylesheets/new_design/new_header.scss similarity index 100% rename from app/assets/stylesheets/new_header.scss rename to app/assets/stylesheets/new_design/new_header.scss diff --git a/app/assets/stylesheets/reset.scss b/app/assets/stylesheets/new_design/reset.scss similarity index 100% rename from app/assets/stylesheets/reset.scss rename to app/assets/stylesheets/new_design/reset.scss diff --git a/app/assets/stylesheets/utils.scss b/app/assets/stylesheets/new_design/utils.scss similarity index 100% rename from app/assets/stylesheets/utils.scss rename to app/assets/stylesheets/new_design/utils.scss diff --git a/app/views/layouts/new_application.html.haml b/app/views/layouts/new_application.html.haml index e76072c71..7a90a8c78 100644 --- a/app/views/layouts/new_application.html.haml +++ b/app/views/layouts/new_application.html.haml @@ -14,7 +14,7 @@ = favicon_link_tag(image_url("favicons/32x32.png"), type: "image/png", sizes: "32x32") = favicon_link_tag(image_url("favicons/96x96.png"), type: "image/png", sizes: "96x96") - = stylesheet_link_tag "new_application", :media => "all", "data-turbolinks-track" => true + = stylesheet_link_tag "new_design/new_application", :media => "all", "data-turbolinks-track" => true = stylesheet_link_tag "print", :media => "print", "data-turbolinks-track" => true %body diff --git a/config/initializers/assets.rb b/config/initializers/assets.rb index 882590de7..c20bc1259 100644 --- a/config/initializers/assets.rb +++ b/config/initializers/assets.rb @@ -8,4 +8,4 @@ Rails.application.config.assets.version = '1.0' # Precompile additional assets. # application.js, application.css, and all non-JS/CSS in app/assets folder are already added. -Rails.application.config.assets.precompile += %w(print.css new_application.css) +Rails.application.config.assets.precompile += %w(print.css new_design/new_application.css)