From fcbc76adf1a45ac24a2f0660e477ca4c2908ee5c Mon Sep 17 00:00:00 2001 From: "jacek.lebioda" <jacek.lebioda@uni.lu> Date: Wed, 19 Jun 2019 16:17:32 +0100 Subject: [PATCH] Left-column layout --- _layouts/default.html | 4 +-- _layouts/left_col.html | 25 +++++++++++++++++ _sass/elixir/_layout.scss | 59 +++++++++++++++++++++++++++++++++------ assets/main.scss | 2 +- elixir-theme.gemspec | 2 +- 5 files changed, 80 insertions(+), 12 deletions(-) create mode 100644 _layouts/left_col.html diff --git a/_layouts/default.html b/_layouts/default.html index 1666404..a3b065b 100644 --- a/_layouts/default.html +++ b/_layouts/default.html @@ -12,10 +12,10 @@ <body> {%- include header.html -%} - <main id="page-content" aria-label="Content"> + <main id="site-content" aria-label="Content"> {% if page.content_title %} - <h1 id="page-title"> + <h1 id="site-title"> {{ page.content_title }} </h1> {% endif %} diff --git a/_layouts/left_col.html b/_layouts/left_col.html new file mode 100644 index 0000000..5913754 --- /dev/null +++ b/_layouts/left_col.html @@ -0,0 +1,25 @@ +--- +layout: default +--- + +<article> + + <div id="left-column"> + <h2>{{ page.section }}</h2> + <ul> + {% for link in page.pages %} + <li><a href="{{ site.baseurl }}{{ link.href }}">{{ link.title }}</a></li> + {% endfor %} + </ul> + </div> + + <div> + <header> + <h1> + {{ page.title | escape }} + </h1> + </header> + + {{ content }} + </div> +</article> \ No newline at end of file diff --git a/_sass/elixir/_layout.scss b/_sass/elixir/_layout.scss index 7f8ddb9..27d1158 100644 --- a/_sass/elixir/_layout.scss +++ b/_sass/elixir/_layout.scss @@ -47,20 +47,63 @@ } #site-content { - div { - padding-left: $PADDING_PAGE_LEFT; - width: $WIDTH_CONTENT; - padding-right: 10px; - margin: 0px; - } - h1.title { font-size: 37px; color: #005472; line-height: 1.1; font-weight: 300; margin: 0 0 12px 0; - } + } + + article { + padding-left: $PADDING_PAGE_LEFT; + padding-bottom: 50px; + width: $WIDTH_CONTENT; + padding-right: 10px; + margin: 0px; + display: flex; + flex-direction: row; + + #left-column { + padding-top: 20px; + padding-right: 20px; + + h2 { + color: #005472; + font-size: 25px; + line-height: 1.2; + font-weight: 300; + margin: 0; + border-bottom: 1px solid #ccc; + } + + ul { + width: 200px; + padding-inline-start: 20px; + list-style: none; + margin: 0px; + + li { + padding: 0; + margin: 0; + + a { + color: #222; + line-height: 1.2; + text-decoration: none; + display: block; + border-bottom: 1px solid #efefef; + padding: 10px 5px 10px 15px; + } + + a:hover { + color: #060606; + text-decoration: underline; + } + } + } + } + } } #site-footer-primary { diff --git a/assets/main.scss b/assets/main.scss index 6ecc890..1253706 100644 --- a/assets/main.scss +++ b/assets/main.scss @@ -2,4 +2,4 @@ # This line is required so that Jekyll generates this file --- -@import "elixir"; +@import "elixir"; \ No newline at end of file diff --git a/elixir-theme.gemspec b/elixir-theme.gemspec index f00f92b..0a5189d 100644 --- a/elixir-theme.gemspec +++ b/elixir-theme.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |spec| spec.name = "elixir-theme" - spec.version = "0.1.0" + spec.version = "0.1.1" spec.authors = ["jacek.lebioda"] spec.email = ["jacek.lebioda@uni.lu"] -- GitLab