Skip to content

Commit

Permalink
add background tags
Browse files Browse the repository at this point in the history
  • Loading branch information
badetitou committed Oct 9, 2023
1 parent d732f8b commit c72988f
Show file tree
Hide file tree
Showing 2 changed files with 61 additions and 38 deletions.
99 changes: 61 additions & 38 deletions _layouts/tag_page.html
Original file line number Diff line number Diff line change
@@ -1,42 +1,65 @@
---
layout: page
title: Tags
background: '/img/bg-post.jpg'
layout: default
---

<h2>{{ page.tag }}</h2>
<ul>
{% for post in page.posts %}
<article class="post-preview">
{% if post.external_url %}
<a href="{{ post.external_url }}">
{% else %}
<a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}">
{% endif %}

<h2 class="post-title">{{ post.title }}
{% if post.external_url %}<i class="fa-solid fa-arrow-up-right-from-square"></i>{% endif %}</h2>
{% if post.subtitle %}
<h3 class="post-subtitle">{{ post.subtitle }}</h3>
{% else %}
<h3 class="post-subtitle">{{ post.excerpt | strip_html | truncatewords: 15 }}</h3>
{% endif %}
</a>
<p class="post-meta">Posted by
{% if post.author %}
{{ post.author }}
{% else %}
{{ site.author }}
{% endif %}
on {{ post.date | date: '%B %d, %Y' }} {% if post.external_url %}{% else %} &middot;
{% include read_time.html content=post.content %}{% endif %}
</p>
</article>

<hr>
{% endfor %}
</ul>
<!-- Page Header -->
<header class="masthead"
style="background-image: url('{{ site.baseurl }}/img/bg-tags.jpg')">
<div class="overlay"></div>
<div class="container">
<div class="row">
<div class="col-lg-8 col-md-10 mx-auto">
<div class="page-heading">
<h1>Tag: {{ page.tag }}</h1>
{% if page.description %}
<span class="subheading">{{ page.description }}</span>
{% endif %}
</div>
</div>
</div>
</div>
</header>

<div id="tag-cloud">
{{ site | tag_cloud }}
</div>
<div class="container">
<div class="row">
<div class="col-lg-10 col-md-10 mx-auto">

<ul>
{% for post in page.posts %}
<article class="post-preview">
{% if post.external_url %}
<a href="{{ post.external_url }}">
{% else %}
<a href="{{ post.url | prepend: site.baseurl | replace: '//', '/' }}">
{% endif %}

<h2 class="post-title">{{ post.title }}
{% if post.external_url %}<i class="fa-solid fa-arrow-up-right-from-square"></i>{% endif %}</h2>
{% if post.subtitle %}
<h3 class="post-subtitle">{{ post.subtitle }}</h3>
{% else %}
<h3 class="post-subtitle">{{ post.excerpt | strip_html | truncatewords: 15 }}</h3>
{% endif %}
</a>
<p class="post-meta">Posted by
{% if post.author %}
{{ post.author }}
{% else %}
{{ site.author }}
{% endif %}
on {{ post.date | date: '%B %d, %Y' }} {% if post.external_url %}{% else %} &middot;
{% include read_time.html content=post.content %}{% endif %}
</p>
</article>

<hr>
{% endfor %}
</ul>

<div id="tag-cloud">
{{ site | tag_cloud }}
</div>

</div>
</div>
</div>
Binary file added img/bg-tags.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit c72988f

Please sign in to comment.