From 38e1fc2dddc4c913b0ca2354cafcf8833900f7e2 Mon Sep 17 00:00:00 2001 From: Kasper Friis Christensen Date: Mon, 22 Jan 2018 15:26:31 +0100 Subject: [PATCH 1/7] First spring clean, use nth for odd even and removed before --- _scss/base/_variables.scss | 6 +++++ _scss/module/_indexpage.scss | 52 +++++++++++++++++++----------------- 2 files changed, 34 insertions(+), 24 deletions(-) diff --git a/_scss/base/_variables.scss b/_scss/base/_variables.scss index 1581ac0d..5927b670 100644 --- a/_scss/base/_variables.scss +++ b/_scss/base/_variables.scss @@ -2,6 +2,12 @@ $body-bg: #2A2A2A; $alternate-bg: #ff5800; +$color-mine-shaft: #2A2A2A; +$color-international-orange: #ff5800; + +$background-primary: $color-mine-shaft; +$background-alternative: $color-international-orange; + /* Size */ $screen-xs: 600px !default; $screen-xs-min: $screen-xs !default; diff --git a/_scss/module/_indexpage.scss b/_scss/module/_indexpage.scss index 82055557..52b77170 100644 --- a/_scss/module/_indexpage.scss +++ b/_scss/module/_indexpage.scss @@ -1,33 +1,37 @@ section { min-height: 100vh; - width: 100%; + position: relative; display: flex; - flex-direction: column; - align-items: center; - justify-content: center; - position: relative; - background: $body-bg; - /*&:not(:first-child):before*/ &:before { - content: ""; - width: 100%; - height: 30px; - position: absolute; - top: -30px; - right: 0; - background: linear-gradient(to left bottom, $alternate-bg 0%,$alternate-bg 49%,$body-bg 50%,$body-bg 100%); - background: linear-gradient(to left bottom, transparent 0%,transparent 49%,$body-bg 50%,$body-bg 100%); - } - &.even { - background: $alternate-bg; - &:before { - background: linear-gradient(to left bottom, $body-bg 0%,$body-bg 49%,$alternate-bg 50%,$alternate-bg 100%); - background: linear-gradient(to left bottom, transparent 0%,transparent 49%,$alternate-bg 50%,$alternate-bg 100%); - } - } + flex-direction: column; + align-items: center; + justify-content: center; + background-color: $background-primary; + background-image: linear-gradient( + to left bottom, + $background-primary 50%, + $background-alternative 50% + ); + background-size: 100% 60px; + background-repeat: no-repeat; + background-position: bottom; + + &:nth-of-type(even) { + background-color: $background-alternative; + background-image: linear-gradient( + to left bottom, + $background-alternative 50%, + $background-primary 50% + ); + } + &:last-of-type { + background-image: none; + } +} + +section { .paragraphs { column-count: 2; - margin: 1rem 1rem 200px; h3, p { max-width: 300px; font-family: 'Roboto', sans-serif; From e122110a26a2f31a50ec1f1e924b7e10757d51a9 Mon Sep 17 00:00:00 2001 From: Jeppe Ernst Date: Mon, 22 Jan 2018 15:57:08 +0100 Subject: [PATCH 2/7] update deploy/build instructions --- README.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/README.md b/README.md index 0a4bb519..39fec652 100644 --- a/README.md +++ b/README.md @@ -13,5 +13,9 @@ You can now see the site at [localhost:4000](http://localhost:4000) +## Deploy + +It's **important** that you build the site with `JEKYLL_ENV=production bundle exec jekyll build` before deploying the contents of the `_site` directory. We're doing some debugging stuff when then project is build in the development env. + ## Structure The contents of the index page is defined in the frontmatter of the file `index.md` \ No newline at end of file From b3a05d12fef7e093d931f76c2a0dd1382281b002 Mon Sep 17 00:00:00 2001 From: Jeppe Ernst Date: Mon, 22 Jan 2018 16:05:07 +0100 Subject: [PATCH 3/7] slant fix --- _scss/module/_indexpage.scss | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/_scss/module/_indexpage.scss b/_scss/module/_indexpage.scss index 52b77170..2d026c7a 100644 --- a/_scss/module/_indexpage.scss +++ b/_scss/module/_indexpage.scss @@ -9,10 +9,10 @@ section { background-color: $background-primary; background-image: linear-gradient( to left bottom, - $background-primary 50%, + $background-primary 49%, $background-alternative 50% ); - background-size: 100% 60px; + background-size: 100% 30px; background-repeat: no-repeat; background-position: bottom; @@ -20,7 +20,7 @@ section { background-color: $background-alternative; background-image: linear-gradient( to left bottom, - $background-alternative 50%, + $background-alternative 49%, $background-primary 50% ); } @@ -32,6 +32,7 @@ section { section { .paragraphs { column-count: 2; + margin-bottom: 3rem; h3, p { max-width: 300px; font-family: 'Roboto', sans-serif; From 70a2357283a93fe24379ea724a2368b89e19d91e Mon Sep 17 00:00:00 2001 From: Jesper Hess Nielsen Date: Mon, 22 Jan 2018 16:32:56 -0800 Subject: [PATCH 4/7] Add jekyll-livereload support To enable livereload, add --livereload --reload_port 35729 to jekyll serve command. Pages will now auto-reload when changes are made during development. --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 3ddd449a..a4214208 100644 --- a/Gemfile +++ b/Gemfile @@ -18,6 +18,7 @@ gem "github-pages", group: :jekyll_plugins # If you have any plugins, put them here! group :jekyll_plugins do gem "jekyll-feed", "~> 0.6" + gem "jekyll-livereload" end # Windows does not include zoneinfo files, so bundle the tzinfo-data gem From 30a954ff4dc18eb1cd620ce0867d6f8566e24dd4 Mon Sep 17 00:00:00 2001 From: Jesper Hess Nielsen Date: Mon, 22 Jan 2018 16:34:17 -0800 Subject: [PATCH 5/7] Add docker-compose file Just to make it easier to do development without installing all the jekyll stuff yourself. All you need is docker+docker-compose and run 'docker-compose up' in the root of the project. --- docker-compose.yml | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 docker-compose.yml diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 00000000..84d3fcc8 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,9 @@ + +jekyll: + image: jekyll/jekyll + command: jekyll serve --livereload --reload_port 35729 + ports: + - 4000:4000 + - 35729:35729 + volumes: + - .:/srv/jekyll From 1874ba923449f6df3c7ba1c86ffec11529587892 Mon Sep 17 00:00:00 2001 From: Jesper Hess Nielsen Date: Mon, 22 Jan 2018 16:44:22 -0800 Subject: [PATCH 6/7] Update readme with docker-compose info --- README.md | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 39fec652..1285927e 100644 --- a/README.md +++ b/README.md @@ -1,14 +1,20 @@ # Jekyll site for ulovliglogning.dk -## Install +## To work on the code, either -### Install Jekyll and Bundler gems through RubyGems +### Use docker +You need docker-compose. Simply run +`docker-compose up` to launch the site in a docker container with livereload support. + +### Or install Jekyll locally + +#### Install Jekyll and Bundler gems through RubyGems `gem install jekyll bundler` -### Install dependencies +#### Install dependencies `bundle install` -### Build the site local +#### Build the site local `bundle exec jekyll serve` You can now see the site at [localhost:4000](http://localhost:4000) From 06653c55e27f5b2a652afa7216ecff994656ab23 Mon Sep 17 00:00:00 2001 From: Kasper Friis Christensen Date: Tue, 23 Jan 2018 23:21:35 +0100 Subject: [PATCH 7/7] Updated Gemfile.lock --- Gemfile.lock | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Gemfile.lock b/Gemfile.lock index 3c9c720e..6e107edd 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -16,8 +16,12 @@ GEM commonmarker (0.17.7.1) ruby-enum (~> 0.5) concurrent-ruby (1.0.5) + em-websocket (0.5.1) + eventmachine (>= 0.12.9) + http_parser.rb (~> 0.6.0) ethon (0.11.0) ffi (>= 1.3.0) + eventmachine (1.2.5) execjs (2.7.0) faraday (0.14.0) multipart-post (>= 1.2, < 3) @@ -77,6 +81,7 @@ GEM html-pipeline (2.7.1) activesupport (>= 2) nokogiri (>= 1.4) + http_parser.rb (0.6.0) i18n (0.9.1) concurrent-ruby (~> 1.0) jekyll (3.6.2) @@ -111,6 +116,9 @@ GEM jekyll-github-metadata (2.9.3) jekyll (~> 3.1) octokit (~> 4.0, != 4.4.0) + jekyll-livereload (0.2.2) + em-websocket (~> 0.5) + jekyll (~> 3.0) jekyll-mentions (1.2.0) activesupport (~> 4.0) html-pipeline (~> 2.3) @@ -235,7 +243,8 @@ DEPENDENCIES github-pages jekyll (~> 3.6.2) jekyll-feed (~> 0.6) + jekyll-livereload tzinfo-data BUNDLED WITH - 1.16.0 + 1.16.1