From f61106dff8b69f186708356950352bc89d2ae5b9 Mon Sep 17 00:00:00 2001 From: Jeppe Ernst Date: Tue, 23 Jan 2018 19:45:28 +0100 Subject: [PATCH] fix asset exclusion and add language switcher w. flags --- _config.yml | 3 ++- _includes/security-camera-svgrepo-com.svg | 30 --------------------- _layouts/default.html | 2 +- _scss/base/_base.scss | 30 +++++++++++++-------- _scss/module/_flags.scss | 33 +++++++++++++++++++++++ assets/img/flags/da.svg | 5 ++++ assets/img/flags/de.svg | 5 ++++ assets/img/flags/en.svg | 15 +++++++++++ assets/img/flags/fr.svg | 7 +++++ assets/style/main.scss | 1 + 10 files changed, 88 insertions(+), 43 deletions(-) create mode 100644 _scss/module/_flags.scss create mode 100755 assets/img/flags/da.svg create mode 100755 assets/img/flags/de.svg create mode 100755 assets/img/flags/en.svg create mode 100755 assets/img/flags/fr.svg diff --git a/_config.yml b/_config.yml index 6e311672..722825c2 100644 --- a/_config.yml +++ b/_config.yml @@ -24,11 +24,12 @@ url: "https://ulovliglogning.dk" # the base hostname & protocol f # multilanguage support languages: ["da", "en"] default_lang: "da" -exclude_from_localizations: ["assets", "_scss", "style", "fonts", "img", "js", "vendor"] +exclude_from_localization: ["assets"] parallel_localization: false # Build settings markdown: kramdown +exclude: ["README.md", 'Gemfile.lock', 'Gemfile'] plugins: - jekyll-feed diff --git a/_includes/security-camera-svgrepo-com.svg b/_includes/security-camera-svgrepo-com.svg index afe3de56..6b379f04 100644 --- a/_includes/security-camera-svgrepo-com.svg +++ b/_includes/security-camera-svgrepo-com.svg @@ -17,34 +17,4 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/_layouts/default.html b/_layouts/default.html index bf0fd439..036e007a 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -6,7 +6,7 @@
{% for tongue in site.languages %} - {{ tongue }} + {{ tongue }} {% endfor %}
{% include security-camera-svgrepo-com.svg %} diff --git a/_scss/base/_base.scss b/_scss/base/_base.scss index 97be561b..e36ca765 100644 --- a/_scss/base/_base.scss +++ b/_scss/base/_base.scss @@ -19,24 +19,32 @@ footer { display: inline-block; margin: 2rem 0 0 2rem; font-size: 0; + background: #444; + border: 5px solid #444; + border-radius: 5px; } .langSwitcher a { - font-size: 1rem; - color: #FFF; - display: inline-block; - background: $color-international-orange; - padding: 5px; + font-size: 2rem; + //color: #FFF; + color: transparent; + //display: inline-block; + //background: $color-international-orange; + //padding: 5px; box-shadow: none; - text-transform: capitalize; - border-right: 1px solid rgba(0,0,0,.4); + //text-transform: capitalize; + //border-right: 3px solid #444; + border-radius: 3px; + margin-right: 5px; } .langSwitcher a.activeLang { - background: darken($color-international-orange, 15); + //background: darken($color-international-orange, 15); + box-shadow: inset 0 50px 0 rgba(0, 0, 0, 0.35); } .langSwitcher a:first-child{ - border-radius: 3px 0 0 3px; + //border-radius: 3px 0 0 3px; } .langSwitcher a:last-child{ - border-radius: 0 3px 3px 0; - border-right: none; + //border-radius: 0 3px 3px 0; + //border-right: none; + margin-right: 0; } \ No newline at end of file diff --git a/_scss/module/_flags.scss b/_scss/module/_flags.scss new file mode 100644 index 00000000..4b6c233e --- /dev/null +++ b/_scss/module/_flags.scss @@ -0,0 +1,33 @@ +$flag-icon-css-path: '../img' !default; +$flag-icon-rect-path: '/flags' !default; + +.flag-icon-background { + background-size: contain; + background-position: 50%; + background-repeat: no-repeat; +} + +.flag-icon { + @extend .flag-icon-background; + position: relative; + display: inline-block; + width: (4 / 3) * 30px; + line-height: 30px; + &:before { + content: '\00a0'; + } + &.flag-icon-squared { + width: 1em; + } +} + +@mixin flag-icon($country) { + .flag-icon-#{$country} { + background-image: url(#{$flag-icon-css-path}#{$flag-icon-rect-path}/#{$country}.svg); + } +} + +@include flag-icon(da); +@include flag-icon(en); +@include flag-icon(de); +@include flag-icon(fr); \ No newline at end of file diff --git a/assets/img/flags/da.svg b/assets/img/flags/da.svg new file mode 100755 index 00000000..f87e51cc --- /dev/null +++ b/assets/img/flags/da.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/img/flags/de.svg b/assets/img/flags/de.svg new file mode 100755 index 00000000..8ad697bb --- /dev/null +++ b/assets/img/flags/de.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/assets/img/flags/en.svg b/assets/img/flags/en.svg new file mode 100755 index 00000000..1631bd17 --- /dev/null +++ b/assets/img/flags/en.svg @@ -0,0 +1,15 @@ + + + + + + + + + + + + + + + diff --git a/assets/img/flags/fr.svg b/assets/img/flags/fr.svg new file mode 100755 index 00000000..067ccf1b --- /dev/null +++ b/assets/img/flags/fr.svg @@ -0,0 +1,7 @@ + + + + + + + diff --git a/assets/style/main.scss b/assets/style/main.scss index 7d31e9e4..00e51d6b 100644 --- a/assets/style/main.scss +++ b/assets/style/main.scss @@ -9,4 +9,5 @@ // Import module styles @import "module/fonts.scss"; @import "module/camera.scss"; +@import "module/flags.scss"; @import "module/indexpage.scss"; \ No newline at end of file