Commit Graph

42 Commits

Author SHA1 Message Date
Kazuhiro MUSASHI ea6e9d23f3 Photosセクションの単一記事テンプレートを作成 2022-11-27 12:22:20 +09:00
Kazuhiro MUSASHI d42419a1e8 Modify the shortcode for `strava`. 2022-11-26 21:22:41 +09:00
Kazuhiro MUSASHI 4b69ef4f93 Delete mermaid shortcode 2021-11-17 23:13:34 +09:00
Kazuhiro MUSASHI abeb8c9894 Apply new theme. 2021-11-14 22:01:39 +09:00
Kazuhiro MUSASHI 75ab60365d Reliveのshort codeを修正する 2021-08-13 15:09:39 +09:00
Kazuhiro MUSASHI 34ab42de5a reliveのshort codeを追加 2021-08-13 15:06:20 +09:00
Kazuhiro MUSASHI 79541a9600 Add shortcode for `strava` 2021-08-07 21:18:44 +09:00
Kazuhiro MUSASHI 9da2203c0b Modify `labs-header-content.html` 2021-06-30 21:27:23 +09:00
Kazuhiro MUSASHI 0649ccc219 Add asciinema shortcode. 2021-05-05 21:03:36 +09:00
Kazuhiro MUSASHI ae83308c3f Delete the duplicated backslash. 2021-03-06 21:07:01 +09:00
Kazuhiro MUSASHI ef6d1987dc Modify the template setting to refer to the parent context. 2021-03-06 21:06:29 +09:00
Kazuhiro MUSASHI 0a8da3dcdf Use own template for twitter card. 2021-03-06 21:01:27 +09:00
Kazuhiro MUSASHI aba5a9e779 Chart.jsライブラリの参照先を変更 2020-06-19 01:01:53 +09:00
Kazuhiro MUSASHI c3a8fcad0b Chart.jsの公式チュートリアルに従いCanvas IDを修正 2020-06-19 01:01:48 +09:00
Kazuhiro MUSASHI 48dee87fea shortcodeが安全なJavascriptと判断するように修正 2020-06-19 01:01:48 +09:00
Kazuhiro MUSASHI 99211ea640 raw HTMLをshortcodeが扱えるように修正 2020-06-19 01:01:48 +09:00
Kazuhiro MUSASHI 5562c19ef5 shortcodeの名前を変更 2020-06-19 01:01:47 +09:00
Kazuhiro MUSASHI 7e235643f7 chart.jsを利用するためのshortcodeを作成 2020-06-19 01:01:47 +09:00
Kazuhiro MUSASHI 54a98e15d0 Chart.jsを参照するようテンプレートを修正 2020-06-19 01:01:46 +09:00
Kazuhiro MUSASHI f0b13bd702 Modify the theme's headers to enable OGP and twitter card. 2020-05-23 16:38:16 +09:00
Kazuhiro MUSASHI cff8ef00c5 Distribute `mermaid.js` for the contents pages. 2020-05-01 20:26:30 +09:00
Kazuhiro MUSASHI b9a48f1794 Do not distribute `mermaid.js` for the list page. 2020-05-01 20:25:15 +09:00
Kazuhiro MUSASHI b0451b65b5 Introduce shortcodes to allow raw html. 2020-05-01 19:46:08 +09:00
Kazuhiro MUSASHI a90131917f Modify the files under `layouts/` to follow the convention. 2020-05-01 19:27:27 +09:00
Kazuhiro MUSASHI 5ec3b74ae9 Change base url based on the environment:
```
--- a/layouts/partials/sections-definition.html
+++ b/layouts/partials/sections-definition.html
@@ -1,3 +1,3 @@
-          <li><a href="https://blog.kazu634.com/labs/">Labs</a></li>
-          <li><a href="https://blog.kazu634.com/quotes/">Quotes</a></li>
-          <li><a href="https://blog.kazu634.com/travel/">Travel</a></li>
+          <li><a href="{{ .Site.BaseURL }}/labs/">Labs</a></li>
+          <li><a href="{{ .Site.BaseURL }}/quotes/">Quotes</a></li>
+          <li><a href="{{ .Site.BaseURL }}/travel/">Travel</a></li>
```
2019-05-04 21:42:30 +08:00
Kazuhiro MUSASHI 80eb317187 List up the post category article only within post list page.
This is to change the post list page behaviour to list up the articles
belonging to the post category,  not all the posts regardless of the
categories.
2019-04-16 16:10:58 +08:00
Kazuhiro MUSASHI da156b535f Introduce the pagination to the Labs's section list page:
```
--- a/layouts/labs/list.html
+++ b/layouts/labs/list.html
@@ -6,14 +6,34 @@
     <div class="article-header light-gray"><h1>{{ .Title }}</h1></div>
     {{.Content}}
     <br>
-    {{ range .Data.Pages }}
+    {{ $paginator := .Paginate (where .Data.Pages  "Type" "labs") }}
+    {{ range $paginator.Pages }}
     <div class="summary">
       <h2><a href="{{ .Permalink }}">{{ .Title }} {{ if .Draft }}:: DRAFT{{end}}</a></h2>
       <div class="meta">
-        {{ .Date.Format "Jan 2, 2006" }}: {{.Description}}
+        {{ .Date.Format "Jan 2, 2006" }} &nbsp;
+        {{ range .Params.categories }}
+          #<a href="/categories/{{ . | urlize }}">{{ . }}</a>&nbsp;
+        {{ end }}
+        {{ range .Params.tags }}
+          #<a href="/tags/{{ . | urlize }}">{{ . }}</a>&nbsp;
+        {{ end }}: {{ .Description }}
       </div>
     </div>
     {{ end }}
   </main>

+<!-- Paginator Section Layout
+–––––––––––––––––––––––––––––––––––––––––––––––––– -->
+<nav>
+  {{ $paginator := .Paginate (where .Data.Pages "Type" "labs") }}
+  {{ if .Paginator.HasPrev }}
+  <a href="{{ .Paginator.Prev.URL }}">Prev</a>
+  {{ end }}
+  <span class="">Page {{ .Paginator.PageNumber }} of {{ .Paginator.TotalPages }}</span>
+  {{ if .Paginator.HasNext }}
+  <a href="{{ .Paginator.Next.URL }}">Next</a>
+  {{ end }}
+</nav>
+
 {{ partial "footer.html" . }}
```
2019-04-15 00:02:06 +08:00
Kazuhiro MUSASHI 746c5079d0 Change the Labs section's pagination to be within the section:
```
--- a/layouts/labs/single.html
+++ b/layouts/labs/single.html
@@ -21,11 +21,11 @@
   </main>

   <nav class="pagination">
-    {{ if .Next }}
-      <span class="previous">&larr; <a href="{{ .Next.Permalink }}" rel="prev">{{ .Next.Title }}</a></span>
+    {{ with .PrevInSection }}
+    <span class="previous">&larr; <a href="{{ .Permalink }}" rel="prev">{{ .Title }}</a></span>
     {{ end }}
-    {{ if .Prev }}
-      <span class="next"><a href="{{ .Prev.Permalink }}" rel="next">{{ .Prev.Title }}</a> &rarr;</span>
+    {{ with .NextInSection }}
+    <span class="next"><a href="{{ .Permalink }}" rel="next">{{ .Title }}</a> &rarr;</span>
     {{ end }}
   </nav>
```
2019-04-14 18:56:42 +08:00
Kazuhiro MUSASHI 306627f732 Add the travel section to the section definition.
```
--- a/layouts/partials/sections-definition.html
+++ b/layouts/partials/sections-definition.html
@@ -1,2 +1,3 @@
           <li><a href="https://blog.kazu634.com/labs/">Labs</a></li>
           <li><a href="https://blog.kazu634.com/quotes/">Quotes</a></li>
+          <li><a href="https://blog.kazu634.com/travel/">Travel</a></li>
```
2019-04-14 16:50:23 +08:00
Kazuhiro MUSASHI 0982980ea5 Display the travel section explanation. 2019-04-14 16:49:56 +08:00
Kazuhiro MUSASHI 545c096087 Modify the header templates to refer to the section partial html. 2019-04-14 16:02:03 +08:00
Kazuhiro MUSASHI 0984e402a4 Add the partial definition for the section definition. 2019-04-14 16:01:23 +08:00
Kazuhiro MUSASHI e44c14657a Customize the pagination to be within the Quotes section. 2019-04-14 15:28:20 +08:00
Kazuhiro MUSASHI 8bbe6b7223 Add the explanation for the Quotes section. 2019-04-14 15:28:09 +08:00
Kazuhiro MUSASHI f91dd9b965 Add Quotes section for each header files. 2019-04-14 15:28:00 +08:00
Kazuhiro MUSASHI c1cc2467e7 Add a shorcode for TopoJSON support. 2019-04-14 00:29:54 +08:00
Kazuhiro MUSASHI 7e1fc240f3 Add `leaflet-circle.html` as a shorcode for map circle. 2019-04-14 00:29:26 +08:00
Kazuhiro MUSASHI 78fd1b8673 Add `leaflet-marker.html` as a shortcode for map marker. 2019-04-14 00:28:58 +08:00
Kazuhiro MUSASHI 9cffb5d267 Add `leaflet-map.html` as a short code for the map. 2019-04-14 00:28:23 +08:00
Kazuhiro MUSASHI ebdf0b1dfb Load the different headers from the default one. 2019-04-09 08:32:03 +08:00
Kazuhiro MUSASHI 45c958bcdd Display the Labs page explanation, list up the articles on the Labs page. 2019-04-09 08:32:03 +08:00
Kazuhiro MUSASHI 057b117413 Add link to the Labs section 2019-04-09 07:26:35 +08:00