Skip to content

Commit

Permalink
sticky navbars, resized
Browse files Browse the repository at this point in the history
  • Loading branch information
domeniconappo committed Oct 30, 2018
1 parent 53379c6 commit 7c58413
Show file tree
Hide file tree
Showing 7 changed files with 37 additions and 22 deletions.
2 changes: 1 addition & 1 deletion 3_optLISFLOOD_soil-moisture/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## Introduction

LISFLOOD offers the possibility to calculate pF values from the moisture content of both soil layers. The calculation of pF values is *optional*, and it can be activated by adding the following line to the 'lfoptions' element in the LISFLOOD settings file (<span style="color:red"> add link </span>):
LISFLOOD offers the possibility to calculate pF values from the moisture content of both soil layers. The calculation of pF values is *optional*, and it can be activated by adding the following line to the 'lfoptions' element in the LISFLOOD settings file (<span style="color:red"> [lfoptions](#lfoptions) </span>):

```xml
<setoption name="simulatePF" choice="1" />
Expand Down
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,2 +1,4 @@
source "https://rubygems.org"
gemspec
gemspec
source 'https://rubygems.org'
gem 'github-pages', group: :jekyll_plugins
8 changes: 7 additions & 1 deletion _includes/sidebar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,14 @@
<li>
<span class="nav__sub-title">{{ s.section_title }}</span>
<ul>
{% assign pageUrl = page.url | replace: '/', '' %}
{% for i in s.items %}
<li><a href="{{ i.url|relative_url }}" class="">{{ i.title }}</a></li>

{% if pageUrl == i.url %}
<li class="active"><a href="{{ i.url|relative_url }}" class="active">{{ i.title }}</a></li>
{% else %}
<li><a href="{{ i.url|relative_url }}">{{ i.title }}</a></li>
{% endif %}
{% endfor %}
</ul>
</li>
Expand Down
18 changes: 9 additions & 9 deletions _layouts/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,21 +24,21 @@
{% if page.last_modified_at %}<meta itemprop="dateModified" content="{{ page.last_modified_at | date: "%B %d, %Y" }}">{% endif %}

<div class="page__inner-wrap">
{% unless page.header.overlay_color or page.header.overlay_image %}
<header>
{% if page.title %}<h1 id="page-title" class="page__title" itemprop="headline">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</h1>{% endif %}
{% if page.read_time %}
<p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> {% include read-time.html %}</p>
{% endif %}
</header>
{% endunless %}
<!--{% unless page.header.overlay_color or page.header.overlay_image %}-->
<!--<header>-->
<!--{% if page.title %}<h1 id="page-title" class="page__title" itemprop="headline">{{ page.title | markdownify | remove: "<p>" | remove: "</p>" }}</h1>{% endif %}-->
<!--{% if page.read_time %}-->
<!--<p class="page__meta"><i class="far fa-clock" aria-hidden="true"></i> {% include read-time.html %}</p>-->
<!--{% endif %}-->
<!--</header>-->
<!--{% endunless %}-->

<section class="page__content" itemprop="text">
{% if page.toc %}
<aside class="sidebar__right {% if page.toc_sticky %}sticky{% endif %}">
<nav class="toc">
<header><h4 class="nav__title"><i class="fas fa-{{ page.toc_icon | default: 'file-alt' }}"></i> {{ page.toc_label | default: site.data.ui-text[site.locale].toc_label }}</h4></header>
{% include toc.html sanitize=true html=content h_min=2 h_max=3 class="toc__menu" %}
{% include toc.html sanitize=true html=content h_min=1 h_max=3 class="toc__menu" %}
</nav>
</aside>
{% endif %}
Expand Down
15 changes: 11 additions & 4 deletions _sass/minimal-mistakes/_navigation.scss
Original file line number Diff line number Diff line change
Expand Up @@ -174,12 +174,17 @@
========================================================================== */

.greedy-nav {
position: relative;
position: fixed;
float: left;
top: 0;
width: 100%;
display: -webkit-box;
display: flex;
-webkit-box-align: center;
align-items: center;
align-items: stretch;
background: $background-color;
margin-left: -1em;
margin-right: -1em;

a {
display: block;
Expand Down Expand Up @@ -210,11 +215,13 @@
.visible-links {
display: -webkit-box;
display: flex;
float: left;
align-items: stretch;
-webkit-box-pack: end;
justify-content: flex-end;
//justify-content: flex-end;
-webkit-box-flex: 1;
flex: 1;
overflow: hidden;
overflow: auto;

li {
-webkit-box-flex: 0;
Expand Down
4 changes: 2 additions & 2 deletions _sass/minimal-mistakes/_page.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@

#main {
@include clearfix;
margin-left: auto;
margin-left: 1em;
margin-top: 2em;
margin-right: auto;
margin-right: 0;
padding-left: 1em;
padding-right: 1em;
-webkit-animation: $intro-transition;
Expand Down
8 changes: 4 additions & 4 deletions _sass/minimal-mistakes/_variables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -132,15 +132,15 @@ $small: 600px !default;
$medium: 768px !default;
$medium-wide: 900px !default;
$large: 1024px !default;
$x-large: 1280px !default;
$x-large: 1500px !default;

/*
Grid
========================================================================== */

$right-sidebar-width-narrow: 200px !default;
$right-sidebar-width: 300px !default;
$right-sidebar-width-wide: 400px !default;
$right-sidebar-width-narrow: 150px !default;
$right-sidebar-width: 230px !default;
$right-sidebar-width-wide: 350px !default;

/*
Other
Expand Down

0 comments on commit 7c58413

Please sign in to comment.