Skip to content

Commit

Permalink
add option to show sidebar title
Browse files Browse the repository at this point in the history
  • Loading branch information
Niklas Buschmann committed Feb 4, 2020
1 parent 35d064c commit ed4800b
Show file tree
Hide file tree
Showing 4 changed files with 31 additions and 13 deletions.
4 changes: 2 additions & 2 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@ date_format: "%B %d, %Y"
sidebar: true # show a sidebar instead of the usual header
show_excerpts: false # show article excerpts on the home page
show_related: true # show the previous and next links after every post
dark_header: false # keep the top-header dark
hide_title: false # hide the site title in the header
show_title: false # always show the site title
dark_header: false # always keep the top-header dark
minimal: false # minima-inspired style without box-shadows

# see http://fontawesome.com/icons for icons
Expand Down
6 changes: 3 additions & 3 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@
{% if site.comments.isso %}<script data-isso="http://{{ site.comments.isso }}" src="//{{ site.comments.isso }}/js/embed.min.js"></script>{% endif %}

<header class="icons">
{% unless site.hide_title or site.sidebar %}
<a href="{{ "/" | relative_url }}" {% if site.navigation and site.external %}class="full"{% endif %}>{{ site.title | escape }}</a>
{% unless site.show_title != true and site.sidebar or site.navigation and site.external %}
<a href="{{ "/" | relative_url }}" class="title">{{ site.title | escape }}</a>
{% endunless %}
{% if site.navigation or site.external %}
{% include menu.html menu=site.navigation icons=false %}
Expand All @@ -32,7 +32,7 @@
{% include menu.html menu=pages %}
{% endif %}
{% if site.sidebar and site.description %}
<div class="hidden">{{ site.description }}</div>
<div class="hidden description">{{ site.description }}</div>
{% endif %}
</header>

Expand Down
14 changes: 9 additions & 5 deletions assets/css/classes.sass
Original file line number Diff line number Diff line change
Expand Up @@ -63,16 +63,20 @@

{% endif %}

{% unless site.sidebar %}

.icons a:hover svg
color: reduce(100)
{% if site.show_title and site.navigation and site.external %}

.full
.title
font-size: 1.5em
width: 100%
margin: .1em 0 .6em

{% endif %}

{% unless site.sidebar %}

.icons a:hover svg
color: reduce(100)

@media (min-width: 60em)
.large
max-width: 140%
Expand Down
20 changes: 17 additions & 3 deletions assets/css/sidebar.sass
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,22 @@ nav a svg
article header h1
font-size: 2em

body > header div
margin-top: 3em

.hidden
display: inline-block

{% if site.show_title %}

.title
display: block
font-family: "PT Serif", Georgia
font-size: 2.4em
margin: 0 0 .8em

{% endif %}

{% if site.description %}

.description
margin-top: 3em

{% endif %}

0 comments on commit ed4800b

Please sign in to comment.