Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,26 @@ feed:
permalink: /:year/:month/:day/:title
exclude:
- README.md

# Home page and author card of the editorial design (docs and decisions: issue #62).
# Topics are real categories: `name` must match a category written in the posts' `categories`.
# The counts come from the content, never from here. The hero photo is the owner's own (generated with OpenAI).
author_aka: udienz
author_avatar: "https://avatars.githubusercontent.com/u/30291?v=4"
author_bio: "Linux and network enthusiast, open-source contributor, and a bit of a football addict."
home:
hero_eyebrow: "Personal notes & field logs"
hero_title: "Ideas, systems, and everything in between."
hero_text: "Catatan tentang Linux, networking, open source, sepak bola, dan hal-hal yang menarik perhatian."
hero_image: "/img/hero-workspace.webp" # 1600 px wide
hero_image_sm: "/img/hero-workspace-sm.webp" # 800 px wide, for phones
hero_image_alt: "A desk with Debian and Linux books, a Tux figure, a laptop showing neofetch, a Debian mug and headphones"
topics:
- name: "Linux"
icon: "fa-brands fa-linux"
- name: "Networking"
icon: "fa-solid fa-network-wired"
- name: "Sepak Bola"
icon: "fa-solid fa-futbol"
- name: "Game"
icon: "fa-solid fa-gamepad"
10 changes: 10 additions & 0 deletions _includes/author_card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<section class="card-box author-card" aria-labelledby="author-title">
<h2 class="card-title" id="author-title">About the author</h2>
<div class="author">
{% if site.author_avatar %}<img src="{{ site.author_avatar }}" width="64" height="64" alt="" loading="lazy" decoding="async">{% endif %}
<span class="name">{{ site.author | escape }}</span>
<span class="aka">{% if site.author_aka %}aka {{ site.author_aka | escape }}{% endif %}</span>
</div>
{% if site.author_bio %}<p class="author-bio">{{ site.author_bio | escape }}</p>{% endif %}
<a class="author-more" href="{{ '/about' | relative_url }}">More about me &rarr;</a>
</section>
101 changes: 30 additions & 71 deletions _includes/footer.html
Original file line number Diff line number Diff line change
@@ -1,76 +1,35 @@
<!-- Footer -->

<hr>

<footer>
<div class="container text-center footer-nav"><a href="{{ '/posts' | relative_url }}">All posts</a> &middot; <a href="{{ '/categories' | relative_url }}">Categories</a> &middot; <a href="{{ '/feed.xml' | relative_url }}">RSS</a> &middot; <a href="{{ '/about' | relative_url }}">About</a></div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<ul class="list-inline text-center">
{% if site.email %}
<li class="list-inline-item">
<a aria-label="Email" href="mailto:{{ site.email | encode_email }}">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="far fa-envelope fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
{% endif %}
{% if site.twitter_username %}
<li class="list-inline-item">
<a aria-label="Twitter" href="https://twitter.com/{{ site.twitter_username }}">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-twitter fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
{% endif %}
{% if site.facebook_username %}
<li class="list-inline-item">
<a aria-label="Facebook" href="https://www.facebook.com/{{ site.facebook_username }}">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-facebook-f fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
{% endif %}
{% if site.linkedin_username %}
<li class="list-inline-item">
<a aria-label="LinkedIn" href="https://www.linkedin.com/in/{{ site.linkedin_username }}">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-linkedin fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
{% endif %}
{% if site.github_username %}
<li class="list-inline-item">
<a aria-label="GitHub" href="https://github.com/{{ site.github_username }}">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-github fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
{% endif %}
{% if site.instagram_username %}
<li class="list-inline-item">
<a aria-label="Instagram" href="https://instagram.com/{{ site.instagram_username }}">
<span class="fa-stack fa-lg">
<i class="fas fa-circle fa-stack-2x"></i>
<i class="fab fa-instagram fa-stack-1x fa-inverse"></i>
</span>
</a>
</li>
{% endif %}
<footer class="site-footer">
<div class="wrap">
{% assign brand_parts = site.title | split: " " %}
<div class="footer-grid">
<div>
<a class="footer-brand" href="{{ '/' | relative_url }}">{{ brand_parts | first | escape }}{% if brand_parts.size > 1 %}<span class="brand-tag">{{ brand_parts | shift | join: " " | escape }}</span>{% endif %}</a>
<p class="footer-about">{{ site.description | escape }}</p>
</div>
<div>
<h2>Explore</h2>
<ul class="footer-links">
<li><a href="{{ '/posts' | relative_url }}">Articles</a></li>
<li><a href="{{ '/categories/' | relative_url }}">Topics</a></li>
<li><a href="{{ '/archive' | relative_url }}">Archive</a></li>
<li><a href="{{ '/about' | relative_url }}">About</a></li>
<li><a href="{{ '/search' | relative_url }}">Search</a></li>
<li><a href="{{ '/feed.xml' | relative_url }}">RSS feed</a></li>
</ul>
<p class="copyright text-muted">Copyright &copy; {{ site.author }} {{ 'now' | date: "%Y" }}</p>
</div>
<div>
<h2>Elsewhere</h2>
<div class="footer-social">
{% if site.email %}<a aria-label="Email" href="mailto:{{ site.email | encode_email }}"><i class="fa-regular fa-envelope" aria-hidden="true"></i></a>{% endif %}
{% if site.twitter_username %}<a aria-label="Twitter" href="https://twitter.com/{{ site.twitter_username }}"><i class="fa-brands fa-twitter" aria-hidden="true"></i></a>{% endif %}
{% if site.facebook_username %}<a aria-label="Facebook" href="https://www.facebook.com/{{ site.facebook_username }}"><i class="fa-brands fa-facebook-f" aria-hidden="true"></i></a>{% endif %}
{% if site.linkedin_username %}<a aria-label="LinkedIn" href="https://www.linkedin.com/in/{{ site.linkedin_username }}"><i class="fa-brands fa-linkedin-in" aria-hidden="true"></i></a>{% endif %}
{% if site.github_username %}<a aria-label="GitHub" href="https://github.com/{{ site.github_username }}"><i class="fa-brands fa-github" aria-hidden="true"></i></a>{% endif %}
{% if site.instagram_username %}<a aria-label="Instagram" href="https://instagram.com/{{ site.instagram_username }}"><i class="fa-brands fa-instagram" aria-hidden="true"></i></a>{% endif %}
<a aria-label="RSS" href="{{ '/feed.xml' | relative_url }}"><i class="fa-solid fa-rss" aria-hidden="true"></i></a>
</div>
</div>
</div>
<p class="copyright"><span>Copyright &copy; {{ site.author }} {{ 'now' | date: "%Y" }}</span><span><a href="{{ '/feed.xml' | relative_url }}">Subscribe via RSS</a></span></p>
</div>
</footer>
4 changes: 3 additions & 1 deletion _includes/head.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="theme-color" content="#0085A1">
<meta name="theme-color" content="#f7f5ef">
<script>document.documentElement.className += " js";</script>

{% assign page_title = page.title | default: site.title %}
{% assign page_desc = page.description | default: page.excerpt | default: site.description | strip_html | normalize_whitespace | truncate: 160 %}
Expand Down Expand Up @@ -64,6 +65,7 @@
<script defer src="https://use.fontawesome.com/releases/v6.7.2/js/all.js" crossorigin="anonymous"></script>

<link rel="stylesheet" href="{{"/assets/main.css" | relative_url }}">
{% if page.layout == 'home' and site.home.hero_image != "" %}<link rel="preload" as="image" href="{{ site.home.hero_image | relative_url }}" fetchpriority="high">{% endif %}
<link rel="canonical" href="{{ page_url }}">
<link rel="alternate" type="application/rss+xml" title="{{ site.title | escape }}" href="{{ "/feed.xml" | relative_url }}">
<!-- Icons -->
Expand Down
58 changes: 29 additions & 29 deletions _includes/navbar.html
Original file line number Diff line number Diff line change
@@ -1,31 +1,31 @@
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand" href="{{"/" | relative_url }}">{{ site.title | escape }}</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link" href="{{"/" | relative_url }}">Home</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{"/about" | relative_url }}">About</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{ "/posts" | relative_url }}">Posts</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{"/categories" | relative_url }}">Categories</a>
</li>
<li class="nav-item">
<a class="nav-link" href="{{"/search" | relative_url }}" aria-label="Search"><i class="fa fa-search"></i> Search</a>
</li>
</ul>
{% comment %}
Header: brand, main links, search and the menu button. The current section gets aria-current.
The "Topics" menu lists the topics of the home page (_config.yml, home.topics).
{% endcomment %}
{% assign brand_parts = site.title | split: " " %}
{% assign on_post = false %}{% if page.layout == "post" %}{% assign on_post = true %}{% endif %}
<a class="skip-link" href="#content">Skip to content</a>
<header class="site-header">
<div class="wrap bar">
<a class="brand" href="{{ '/' | relative_url }}" aria-label="{{ site.title | escape }}">{{ brand_parts | first | escape }}{% if brand_parts.size > 1 %}<span class="brand-tag">{{ brand_parts | shift | join: " " | escape }}</span>{% endif %}</a>
<div class="bar-actions">
<a class="icon-btn" href="{{ '/search' | relative_url }}" aria-label="Search"><svg width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><circle cx="11" cy="11" r="7"/><path d="m20 20-3.6-3.6"/></svg></a>
<button class="icon-btn menu-btn" type="button" aria-expanded="false" aria-controls="primary-nav" aria-label="Menu"><svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" aria-hidden="true"><path d="M4 7h16M4 12h16M4 17h16"/></svg></button>
</div>
<nav class="nav" id="primary-nav" aria-label="Main">
<a href="{{ '/' | relative_url }}"{% if page.url == '/' %} aria-current="page"{% endif %}>Home</a>
<a href="{{ '/posts' | relative_url }}"{% if on_post or page.url contains '/posts' %} aria-current="page"{% endif %}>Articles</a>
<details class="nav-dd">
<summary{% if page.url contains '/categories' %} aria-current="page"{% endif %}>Topics</summary>
<ul>
{% for t in site.home.topics %}
<li><a href="{{ '/categories/' | relative_url }}#{{ t.name | slugify }}">{{ t.name | escape }}</a></li>
{% endfor %}
<li><a href="{{ '/categories/' | relative_url }}">All topics &rarr;</a></li>
</ul>
</details>
<a href="{{ '/about' | relative_url }}"{% unless on_post %}{% if page.url contains '/about' %} aria-current="page"{% endif %}{% endunless %}>About</a>
<a href="{{ '/archive' | relative_url }}"{% unless on_post %}{% if page.url contains '/archive' %} aria-current="page"{% endif %}{% endunless %}>Archive</a>
</nav>
</div>
</nav>

<div class="fork-ribbon-wrap"><a class="github-fork-ribbon" href="https://github.com/udienz/udienz.github.io" target="_blank" rel="noopener" title="Fork me on GitHub">Fork me on GitHub</a></div>
</header>
2 changes: 2 additions & 0 deletions _includes/post_excerpt.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% comment %}A post's short text: description, else subtitle, else the start of the post. Use: include post_excerpt.html post=post words=28{% endcomment %}
{% assign ex = include.post.description | default: include.post.subtitle %}{% if ex %}{{ ex | strip_html | normalize_whitespace | truncatewords: include.words }}{% else %}{{ include.post.excerpt | strip_html | normalize_whitespace | truncatewords: include.words }}{% endif %}
2 changes: 2 additions & 0 deletions _includes/post_meta.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{% comment %}Date and reading time of a post. Use: include post_meta.html post=post{% endcomment %}
<span class="meta"><span><time datetime="{{ include.post.date | date_to_xmlschema }}">{{ include.post.date | date: "%d %b %Y" }}</time></span><span>{% include read_time.html content=include.post.content %}</span></span>
5 changes: 1 addition & 4 deletions _includes/scripts.html
Original file line number Diff line number Diff line change
@@ -1,4 +1 @@
<script defer src="https://code.jquery.com/jquery-3.5.1.min.js"></script>
<script defer src="https://cdn.jsdelivr.net/npm/bootstrap@4.6.0/dist/js/bootstrap.bundle.min.js"></script>
<script defer src="{{"/assets/vendor/startbootstrap-clean-blog/js/scripts.js" | relative_url }}"></script>
<script defer src="{{"/assets/scripts.js" | relative_url }}"></script>
<script defer src="{{ '/assets/site.js' | relative_url }}"></script>
9 changes: 9 additions & 0 deletions _includes/topic_card.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
{% comment %}"Browse by topic": the topics of _config.yml (home.topics) that exist as categories, with their real post counts.{% endcomment %}
<section class="card-box" aria-labelledby="browse-title">
<h2 class="card-title" id="browse-title">Browse by topic</h2>
<ul class="topic-list">
{% for t in site.home.topics %}{% assign in_topic = site.categories[t.name] %}{% if in_topic.size > 0 %}
<li><a href="{{ '/categories/' | relative_url }}#{{ t.name | slugify }}"><i class="{{ t.icon }}" aria-hidden="true"></i>{{ t.name | escape }}<span class="n">{{ in_topic.size }}</span></a></li>
{% endif %}{% endfor %}
</ul>
</section>
45 changes: 15 additions & 30 deletions _layouts/archive.html
Original file line number Diff line number Diff line change
@@ -1,35 +1,20 @@
---
layout: default
---

<!-- Page Header -->
<header class="masthead" style="background-image: url('{{ '/img/bg-index.jpg' | relative_url }}')">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col mx-auto">
<div class="page-heading">
<h1 class="text-break">#{{ page.title }}</h1>
<span class="subheading">{{ page.posts.size }} post dengan tag ini</span>
</div>
</div>
</div>
</div>
{% comment %}One tag page (jekyll-archives): the posts that carry a tag.{% endcomment %}
<div class="wrap page">
<header class="page-head">
<h1>#{{ page.title }}</h1>
<p>{{ page.posts.size }} post dengan tag ini</p>
</header>

<div class="container">
<div class="row">
<div class="col mx-auto">

<ul class="list-group list-group-flush mb-5">
{% for post in page.posts %}
<li class="list-group-item d-flex justify-content-between align-items-start px-0">
<a href="{{ post.url | relative_url }}">{{ post.title }}</a>
<time datetime="{{ post.date | date_to_xmlschema }}" class="text-muted small text-nowrap ml-3">{{ post.date | date: "%Y-%m-%d" }}</time>
</li>
{% endfor %}
</ul>

</div>
</div>
<div class="page-body">
<ul class="archive-list">
{% for post in page.posts %}
<li>
<time datetime="{{ post.date | date_to_xmlschema }}">{{ post.date | date: "%Y-%m-%d" }}</time>
<a href="{{ post.url | relative_url }}">{{ post.title | escape }}</a>
</li>
{% endfor %}
</ul>
</div>
</div>
2 changes: 2 additions & 0 deletions _layouts/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,9 @@

{% include navbar.html %}

<main id="content">
{{ content }}
</main>

{% include footer.html %}

Expand Down
Loading