Skip to content

Commit

Permalink
tags styling
Browse files Browse the repository at this point in the history
  • Loading branch information
bluntspoon committed Jan 8, 2024
1 parent 88d3508 commit 76422b5
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
1 change: 0 additions & 1 deletion _layouts/post.html
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@ <h1 class="post-title p-name" itemprop="name headline">{{ page.title | escape }}

{% if page.tags %}
<div class="post-tags">
<span>Tags:</span>
{% for tag in page.tags %}
<a href="{{ site.baseurl }}/tags/#{{ tag | slugify }}" class="post-tag">{{ tag }}</a>
{% endfor %}
Expand Down
8 changes: 4 additions & 4 deletions _sass/minima/custom-styles.scss
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,14 @@ a.circle {

.post-tag {
display: inline-block;
margin-right: 10px;
background-color: #007bff; /* Adjust the background color as needed */
margin-right: 3px;
background-color: #3c92b5; /* Adjust the background color as needed */
color: #fff;
padding: 5px 10px;
padding: 0px 5px 0px 5px;
border-radius: 5px;
text-decoration: none;
}

.post-tag:hover {
background-color: #0056b3; /* Adjust the hover color as needed */
background-color: #0082b7; /* Adjust the hover color as needed */
}
5 changes: 2 additions & 3 deletions tags.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,16 @@
permalink: /tags/
---

<h1>All Tags</h1>
{% for tag in site.tags %}
{% assign t = tag | first %}
{% assign posts = tag | last %}

<h1>All Tags</h1>
{{ t | downcase }}
<ul class="tag-list">
{% for post in posts %}
{% if post.tags contains t %}
<li>
<a id="{{ t }}" href="{{ post.url }}">{{ post.title }}</a>
<a id="{{ t }}" class="post-tag" href="{{ post.url }}">{{ post.title }}</a>
<span class="date">{{ post.date | date: "%B %-d, %Y" }}</span>
</li>
{% endif %}
Expand Down

0 comments on commit 76422b5

Please sign in to comment.