Skip to content

Commit

Permalink
Merge pull request #33 from noriyotcp/update-go-to-posts-by
Browse files Browse the repository at this point in the history
Update go_to_posts_by.html
  • Loading branch information
noriyotcp authored Oct 6, 2024
2 parents b8271b7 + 3f99694 commit 882983e
Show file tree
Hide file tree
Showing 21 changed files with 88 additions and 51 deletions.
1 change: 0 additions & 1 deletion 2024-05.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
author_profile: false
---

{% include back_to_posts_by_year.html %}
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y-%m"' %}
{% assign postsIn202405 = postsInYear | where: 'name', '2024-05' %}

Expand Down
1 change: 0 additions & 1 deletion 2024-06.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
author_profile: false
---

{% include back_to_posts_by_year.html %}
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y-%m"' %}
{% assign postsIn202406 = postsInYear | where: 'name', '2024-06' %}

Expand Down
1 change: 0 additions & 1 deletion 2024-07.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
author_profile: false
---

{% include back_to_posts_by_year.html %}
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y-%m"' %}
{% assign postsIn202407 = postsInYear | where: 'name', '2024-07' %}

Expand Down
1 change: 0 additions & 1 deletion 2024-08.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
author_profile: false
---

{% include back_to_posts_by_year.html %}
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y-%m"' %}
{% assign postsIn202408 = postsInYear | where: 'name', '2024-08' %}

Expand Down
1 change: 0 additions & 1 deletion 2024-09.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
author_profile: false
---

{% include back_to_posts_by_year.html %}
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y-%m"' %}
{% assign postsIn202409 = postsInYear | where: 'name', '2024-09' %}

Expand Down
1 change: 0 additions & 1 deletion 2024-10.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
author_profile: false
---

{% include back_to_posts_by_year.html %}
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y-%m"' %}
{% assign postsIn202410 = postsInYear | where: 'name', '2024-10' %}

Expand Down
2 changes: 0 additions & 2 deletions 2024.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
author_profile: false
---

{% include back_to_posts_by_year.html %}

<ul class="taxonomy__index">
{% assign postsByYearMonth = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y-%m"' %}
{% assign postsIn2024 = postsByYearMonth | where: 'name', '2024' %}
Expand Down
3 changes: 3 additions & 0 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ defaults:
share: false
related: true
classes: wide
category_archive:
type: liquid
path: /categories/
tag_archive:
type: liquid
path: /tags/
Expand Down
7 changes: 0 additions & 7 deletions _includes/back_to_posts_by_year.html

This file was deleted.

8 changes: 0 additions & 8 deletions _includes/go_back_home.html

This file was deleted.

36 changes: 24 additions & 12 deletions _includes/go_to_posts_by.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,24 @@
<ul class="taxonomy__index" id="{{ year.name }}">
<li>
<a href="{{ 'posts-by-year' | relative_url }}" data-hotkey="g y">
<strong>Posts by Year &rarr;</strong>
</a>
</li>
<li>
<a href="{{ 'tags' | relative_url }}" data-hotkey="g t">
<strong>Posts by Tag &rarr;</strong>
</a>
</li>
</ul>
<nav id="go-to-posts-by">
<ul class="taxonomy__index" id="{{ year.name }}">
<li>
<a href="{{ '/' | relative_url }}" data-hotkey="g h">
<strong>Home</strong>
</a>
</li>
<li>
<a href="{{ 'posts-by-year' | relative_url }}" data-hotkey="g y">
<strong>Posts by Year</strong>
</a>
</li>
<li>
<a href="{{ 'tags' | relative_url }}" data-hotkey="g t">
<strong>Posts by Tag</strong>
</a>
</li>
<li>
<a href="{{ 'categories' | relative_url }}" data-hotkey="g c">
<strong>Posts by Category</strong>
</a>
</li>
</ul>
</nav>
3 changes: 3 additions & 0 deletions _includes/hotkeys_popover.html
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,9 @@ <h4 class="nav__title"><i class="fa-solid fa-arrow-right"></i> Go to Posts</h4>
<li>
<pre class="unset">Go to Posts by Tag - <code class="language-plaintext highlighter-rouge">g t</code></pre>
</li>
<li>
<pre class="unset">Go to Posts by Category - <code class="language-plaintext highlighter-rouge">g c</code></pre>
</li>
</ul>
<header>
<h4 class="nav__title"><i class="fa-solid fa-arrows-left-right"></i> Pagination</h4>
Expand Down
2 changes: 1 addition & 1 deletion _includes/masthead.html
Original file line number Diff line number Diff line change
Expand Up @@ -36,5 +36,5 @@
</nav>
</div>
</div>
{% include go_to_posts_by.html %}
</div>

Original file line number Diff line number Diff line change
@@ -1,6 +1,11 @@
---
date: "2024-09-13 00:37:58 +0900"
last_modified_at: "2024-09-17 02:26:10 +0900"
last_modified_at: "2024-10-06 17:53:16 +0900"
tags:
- Ruby
- Ruby on Rails
categories:
- Books
---

# Part 1: Exploring Rails and Its Abstractions
Expand Down Expand Up @@ -39,4 +44,3 @@ ActiveJobは、さまざまなバックグラウンドジョブライブラリ
- **データベースアブストラクションの戦略**: 一貫性を保つためのビジネスロジックのデータベースレイヤーへの移行。

以上が概要で、各コンポーネントがどのように連携してWebアプリケーションを構築し、効率的に動作させるかについて学びます。

45 changes: 44 additions & 1 deletion assets/css/main.scss
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ search: false
}
}


/* Custom Hacker Theme ========================================================================== */

// https://github.com/pages-themes/hacker/blob/e3c8d1ad288894be216002a5bc29fc611aeab9ac/_sass/_default_colors.scss
Expand Down Expand Up @@ -528,6 +527,50 @@ a.site-title:hover {
}
}

#go-to-posts-by {
padding: 0 1em;

.taxonomy__index {
column-gap: 0.5em;

/* Page taxonomy ========================================================================== */
/* Overwrite default style repeat(3, 1fr) */
@media (min-width: 64em) {
grid-template-columns: repeat(2, 1fr);
width: calc(100% - 6em);
padding-left: 6em;
}

@media (min-width: 1400px) {
width: calc(100% - 10em);
padding-left: 10em;
}

@media (min-width: 1536px) {
width: calc(100% - 14em);
padding-left: 14em;
}

@media (min-width: 1740px) {
width: calc(100% - 20em);
padding-left: 20em;
}

@media (min-width: 1950px) {
width: calc(100% - 22em);
padding-left: 22em;
}

li > a {
display: block;
text-align: center;
padding: 0.25em;
margin-bottom: 0.5em;
border: 1px solid #51555d;
}
}
}

.site-subtitle {
color: $grey;
word-break: break-word;
Expand Down
7 changes: 7 additions & 0 deletions category-archive.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
---
title: "Posts by Category"
layout: categories
permalink: /categories/
author_profile: false
---

2 changes: 0 additions & 2 deletions generate-posts-in-month-layout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ layout: archive
author_profile: false
---
{% include back_to_posts_by_year.html %}
{% assign postsInYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y-%m"' %}
{% assign postsIn$year$month_only = postsInYear | where: 'name', '$month' %}
Expand All @@ -59,4 +58,3 @@ author_profile: false
</section>
{% endfor %}
EOL

3 changes: 0 additions & 3 deletions generate-posts-in-year-layout.sh
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,6 @@ layout: archive
author_profile: false
---
{% include back_to_posts_by_year.html %}
<ul class="taxonomy__index">
{% assign postsByYearMonth = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date: "%Y-%m"' %}
{% assign postsIn$year = postsByYearMonth | where: 'name', '$year' %}
Expand Down Expand Up @@ -68,4 +66,3 @@ author_profile: false
</section>
{% endfor %}
EOL

3 changes: 0 additions & 3 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,3 @@
author_profile: false
classes: wide
---

{% include go_to_posts_by.html %}

2 changes: 0 additions & 2 deletions posts-by-year.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
author_profile: false
---

{% include go_back_home.html %}

{% assign postsByYear = site.posts | where_exp: "item", "item.hidden != true" | group_by_exp: 'post', 'post.date | date:
"%Y"' %}

Expand Down
2 changes: 0 additions & 2 deletions tag-archive.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,5 +4,3 @@ permalink: /tags/
layout: tags
author_profile: false
---

{% include go_back_home.html %}

0 comments on commit 882983e

Please sign in to comment.