Skip to content

Commit 56d8c8e

Browse files
authored
Merge pull request #64 from bmf-san/feat/bookshelf-non-asin-books
feat: add non-Amazon books to bookshelf (booth.pm / techbookfest)
2 parents 4b1a172 + 44acbad commit 56d8c8e

7 files changed

Lines changed: 53 additions & 22 deletions

content/en/posts/freee-technical-book-multi-product-development.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ tags:
1111
- System Design
1212
- Book
1313
translation_key: freee-technical-book-multi-product-development
14+
books:
15+
- title: freee Technical Book - Multi-Product Development at freee
16+
url: https://techbookfest.org/product/8UNZJF7Rs5AWuqReQuZZgs?productVariantID=fZvUHjHxH4hqG6wtAaAVWN
1417
---
1518

1619
[Read the book on freee's technology](https://techbookfest.org/product/8UNZJF7Rs5AWuqReQuZZgs?productVariantID=fZvUHjHxH4hqG6wtAaAVWN).

content/en/posts/oauth-oidc-attacks-and-countermeasures-guide.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ tags:
1111
- OpenID Connect
1212
- Book
1313
translation_key: oauth-oidc-attacks-and-countermeasures-guide
14+
books:
15+
- title: Understanding Attacks and Countermeasures on OAuth/OIDC (Redirect Attack Edition)
16+
url: https://authya.booth.pm/items/1877818
1417
---
1518

1619

content/en/posts/understanding-oauth-oauth2-openid-connect-differences.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ tags:
1313
- Authorization
1414
- Book
1515
translation_key: understanding-oauth-oauth2-openid-connect-differences
16+
books:
17+
- title: A Book to Understand the Differences Between OAuth, OAuth Authentication, and OpenID Connect
18+
url: https://authya.booth.pm/items/1550861
1619
---
1720

1821

content/ja/posts/freee-technical-book-multi-product-development.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ tags:
1111
- システム設計
1212
- 書評
1313
translation_key: freee-technical-book-multi-product-development
14+
books:
15+
- title: freee 技術の本 freeeにおけるマルチプロダクト開発
16+
url: https://techbookfest.org/product/8UNZJF7Rs5AWuqReQuZZgs?productVariantID=fZvUHjHxH4hqG6wtAaAVWN
1417
---
1518

1619

content/ja/posts/oauth-oidc-attacks-and-countermeasures-guide.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ tags:
1111
- OpenIDConnect
1212
- 書評
1313
translation_key: oauth-oidc-attacks-and-countermeasures-guide
14+
books:
15+
- title: OAuth・OIDCへの攻撃と対策を整理して理解できる本(リダイレクトへの攻撃編)
16+
url: https://authya.booth.pm/items/1877818
1417
---
1518

1619

content/ja/posts/understanding-oauth-oauth2-openid-connect-differences.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@ tags:
1313
- 認可
1414
- 書評
1515
translation_key: understanding-oauth-oauth2-openid-connect-differences
16+
books:
17+
- title: OAuth、OAuth認証、OpenID Connectの違いを整理して理解できる本
18+
url: https://authya.booth.pm/items/1550861
1619
---
1720

1821

themes/default/templates/bookshelf.html

Lines changed: 35 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -26,30 +26,43 @@ <h1 class="text-4xl font-bold mb-2">{{if eq $locale "ja"}}本棚{{else}}Bookshel
2626
</p>
2727
</header>
2828

29-
{{- $books := index .VirtualPageData "books"}}
30-
{{if $books}}
31-
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-6">
32-
{{range $books}}
33-
<div class="flex flex-col items-center text-center gap-2">
34-
<a href="{{.LinkURL}}" target="_blank" rel="noopener noreferrer" class="block hover:opacity-80 transition-opacity" aria-label="{{.Title}} on Amazon">
35-
<img
36-
src="{{.ImageURL}}"
37-
alt="{{.Title}}"
38-
class="rounded shadow w-full max-w-[160px] object-cover"
39-
loading="lazy"
40-
width="250"
41-
height="250"
42-
>
43-
</a>
44-
<p class="text-sm font-medium leading-snug line-clamp-3">{{.Title}}</p>
45-
{{if .ArticleURL}}
46-
<a href="{{.ArticleURL}}" class="text-xs text-secondary underline hover:text-primary">
47-
{{if eq $locale "ja"}}書評を読む{{else}}Read review{{end}}
48-
</a>
29+
{{- $categories := index .VirtualPageData "categories"}}
30+
{{if $categories}}
31+
{{- range $categories}}
32+
<section class="mb-12">
33+
<h2 class="text-2xl font-semibold mb-6 pb-2 border-b border-border">
34+
{{if .Name}}{{.Name}}{{else}}{{if eq $locale "ja"}}未分類{{else}}Uncategorized{{end}}{{end}}
35+
</h2>
36+
<div class="grid grid-cols-2 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5 gap-6">
37+
{{range .Books}}
38+
<div class="flex flex-col items-center text-center gap-2">
39+
{{if .ImageURL}}
40+
<a href="{{.LinkURL}}" target="_blank" rel="noopener noreferrer" class="block hover:opacity-80 transition-opacity" aria-label="{{.Title}} on Amazon">
41+
<img
42+
src="{{.ImageURL}}"
43+
alt="{{.Title}}"
44+
class="rounded shadow w-full max-w-[160px] object-cover"
45+
loading="lazy"
46+
width="250"
47+
height="250"
48+
>
49+
</a>
50+
{{else}}
51+
<a href="{{.LinkURL}}" target="_blank" rel="noopener noreferrer" class="flex items-center justify-center rounded shadow w-full max-w-[160px] min-h-[200px] bg-secondary text-secondary text-xs p-3 hover:opacity-80 transition-opacity leading-snug">
52+
{{.Title}}
53+
</a>
54+
{{end}}
55+
<p class="text-sm font-medium leading-snug line-clamp-3">{{.Title}}</p>
56+
{{if .ArticleURL}}
57+
<a href="{{.ArticleURL}}" class="text-xs text-secondary underline hover:text-primary">
58+
{{if eq $locale "ja"}}書評を読む{{else}}Read review{{end}}
59+
</a>
60+
{{end}}
61+
</div>
4962
{{end}}
5063
</div>
51-
{{end}}
52-
</div>
64+
</section>
65+
{{end}}
5366
{{else}}
5467
<p class="text-secondary">
5568
{{if eq $locale "ja"}}まだ本が登録されていません。{{else}}No books yet.{{end}}

0 commit comments

Comments
 (0)