Skip to content

Commit

Permalink
more layout fine tuning
Browse files Browse the repository at this point in the history
  • Loading branch information
knzai committed Aug 10, 2024
1 parent 5a18c85 commit bb54116
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 0 deletions.
19 changes: 19 additions & 0 deletions _includes/body/breadcrumbs.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{% assign crumbs = include.url | remove:'/index.html' | split: '/' %}
{% if crumbs.size > 1 %}
<nav id="breadcrumbs" class="screen-only"><ul>
<li><a href="{{ '/' | relative_url }}">{{ site.data.strings.breadcrumbs_home | default:'home' }}</a></li>
{% for crumb in crumbs offset: 1 %}
<li>
{% unless forloop.last %}
<span>{{ site.data.strings.breadcrumbs_separator | default:'/' }}</span>
{% assign crumb_limit = forloop.index | plus: 1 %}
{% capture href %}{% for crumb in crumbs limit: crumb_limit %}{{ crumb | append: '/' }}{% endfor %}{% endcapture %}
<a href="{{ href | relative_url }}">{{ crumb | url_decode }}</a>
{% else %}
<span>{{ site.data.strings.breadcrumbs_separator | default:'/' }}</span>
<span>{{ crumbs | reverse | first | url_decode }}</span>
{% endunless %}
</li>
{% endfor %}
</ul></nav>
{% endif %}
47 changes: 47 additions & 0 deletions _layouts/about.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
# Copyright (c) 2018 Florian Klampfer <https://qwtel.com/>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

layout: base
---

<article class="page mb6" role="article">
{% if content contains "<!--author-->" %}
{% assign plugins = site.plugins | default:site.gems %}
{% assign author = site.data.authors[page.author] | default:site.data.authors.first[1] | default:site.author %}
{% capture author_x %}
{% if author.picture %}
{% include_cached components/hy-img.html class="avatar" img=author.picture alt=author.name %}
{% elsif plugins contains 'jekyll-avatar' %}
{% assign avatar = author.social.github | default:author.github.username | default:author.github %}
{% include components/avatar-tag.html user=avatar %}
{% endif %}

{{ author.about | markdownify }}
{% endcapture %}
{% assign content = content | replace:"<!--author-->", author_x %}
{% endif %}

{% if page.title && page.title != '' %}
<header>
<h1 class="page-title">{{ title }}</h1>
{% include components/message.html text=page.description hide=page.hide_description %}
</header>
{% endif %}
{{ content }}
</article>

{% include components/dingbat.html %}
{% include body/comments.html %}

0 comments on commit bb54116

Please sign in to comment.