From 057b1174133abea467f627aef4d8b5dcdd4fb238 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 7 Apr 2019 22:40:01 +0800 Subject: [PATCH 1/5] Add link to the Labs section --- layouts/partials/header-content.html | 77 ++++++++++++++++++++++++++++ layouts/partials/header.html | 66 ++++++++++++++++++++++++ 2 files changed, 143 insertions(+) create mode 100644 layouts/partials/header-content.html create mode 100644 layouts/partials/header.html diff --git a/layouts/partials/header-content.html b/layouts/partials/header-content.html new file mode 100644 index 0000000..0248a82 --- /dev/null +++ b/layouts/partials/header-content.html @@ -0,0 +1,77 @@ + + + + + + + + + + {{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} | {{ .Site.Title }}{{ end }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + {{ if .Params.image }}{{ end }} + + + + + + + + +
+ + +
+
+
+

{{ .Site.Title }}

+ {{ with .Site.Params.subtitle }}

{{ . }}

{{ end }} +
+
+
    +
  • Labs
  • + {{ with .Site.Params.twitter }}
  • Twitter
  • {{ end }} + {{ with .Site.Params.facebook }}
  • Facebook
  • {{ end }} + {{ with .Site.Params.github }}
  • GitHub
  • {{ end }} + {{ if .Site.Params.showsRSS }}
  • RSS
  • {{ end }} +
+
+
+
diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..f157362 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,66 @@ + + + + + + + + + + {{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} | {{ .Site.Title }}{{ end }} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + +
+
+
+

{{ .Site.Title }}

+ {{ with .Site.Params.subtitle }}

{{ . }}

{{ end }} +
+
+
    +
  • Labs
  • + {{ with .Site.Params.twitter }}
  • Twitter
  • {{ end }} + {{ with .Site.Params.facebook }}
  • Facebook
  • {{ end }} + {{ with .Site.Params.github }}
  • GitHub
  • {{ end }} + {{ if .Site.Params.showsRSS }}
  • RSS
  • {{ end }} +
+
+
+
From d42a8e40856af43f6df7d927be398f697cdcd991 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Tue, 9 Apr 2019 07:23:48 +0800 Subject: [PATCH 2/5] Add Labs page explanation _index.html --- content/labs/_index.md | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 content/labs/_index.md diff --git a/content/labs/_index.md b/content/labs/_index.md new file mode 100644 index 0000000..5da6e93 --- /dev/null +++ b/content/labs/_index.md @@ -0,0 +1,9 @@ +--- +title: Labs Page +date: 2019-04-08 +publishdate: 2019-04-08 +--- + +まとまった分量の技術的な文章を置くために設置してみました。主に`Javascript`や`CSS`を使った実験ができればいいなと思っています + + From 45c958bcdd93e1c6bdd19226e5c68b7cf36888e7 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Tue, 9 Apr 2019 07:24:03 +0800 Subject: [PATCH 3/5] Display the Labs page explanation, list up the articles on the Labs page. --- layouts/labs/list.html | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 layouts/labs/list.html diff --git a/layouts/labs/list.html b/layouts/labs/list.html new file mode 100644 index 0000000..b1bc8ec --- /dev/null +++ b/layouts/labs/list.html @@ -0,0 +1,19 @@ +{{ partial "header.html" . }} + + +
+

{{ .Title }}

+ {{.Content}} +
+ {{ range .Data.Pages }} +
+

{{ .Title }} {{ if .Draft }}:: DRAFT{{end}}

+
+ {{ .Date.Format "Jan 2, 2006" }}: {{.Description}} +
+
+ {{ end }} +
+ +{{ partial "footer.html" . }} From ebdf0b1dfb2a39dc16e5fe5dc31afdfc6608cda7 Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Tue, 9 Apr 2019 08:21:03 +0800 Subject: [PATCH 4/5] Load the different headers from the default one. --- layouts/labs/single.html | 32 ++++++++ layouts/partials/labs-header-content.html | 92 +++++++++++++++++++++++ 2 files changed, 124 insertions(+) create mode 100644 layouts/labs/single.html create mode 100644 layouts/partials/labs-header-content.html diff --git a/layouts/labs/single.html b/layouts/labs/single.html new file mode 100644 index 0000000..3cbe7a2 --- /dev/null +++ b/layouts/labs/single.html @@ -0,0 +1,32 @@ +{{ partial "labs-header-content.html" . }} + + +
+
+

{{ .Title }}

+
+ {{ .Date.Format "Jan 2, 2006" }}   + {{ range .Params.categories }} + #{{ . }}  + {{ end }} + {{ range .Params.tags }} + #{{ . }}  + {{ end }}: {{ .Description }} +
+
+
+ {{ .Content }} + +
+ + + +{{ partial "footer.html" . }} diff --git a/layouts/partials/labs-header-content.html b/layouts/partials/labs-header-content.html new file mode 100644 index 0000000..ba6c6af --- /dev/null +++ b/layouts/partials/labs-header-content.html @@ -0,0 +1,92 @@ + + + + + + + + + + {{ $isHomePage := eq .Title .Site.Title }}{{ .Title }}{{ if eq $isHomePage false }} | {{ .Site.Title }}{{ end }} + + + + + + + + + + + + + + + + + {{ if .Params.leaflet }} + + + + {{ end }} + + + + + + + + + + {{ if .Params.leaflet }} + + + {{ end }} + + + + + + + + {{ if .Params.image }}{{ end }} + + + + + + + + +
+ + +
+
+
+

{{ .Site.Title }}

+ {{ with .Site.Params.subtitle }}

{{ . }}

{{ end }} +
+
+
    +
  • Labs
  • + {{ with .Site.Params.twitter }}
  • Twitter
  • {{ end }} + {{ with .Site.Params.facebook }}
  • Facebook
  • {{ end }} + {{ with .Site.Params.github }}
  • GitHub
  • {{ end }} + {{ if .Site.Params.showsRSS }}
  • RSS
  • {{ end }} +
+
+
+
From bf1ecb0a9cfad6e004066382acd4c8e4b853980b Mon Sep 17 00:00:00 2001 From: Kazuhiro MUSASHI Date: Sun, 7 Apr 2019 22:40:49 +0800 Subject: [PATCH 5/5] Add example content of Labs section. --- .../leaflet-js/001-leaflet-js-tutorial.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 content/labs/leaflet-js/001-leaflet-js-tutorial.md diff --git a/content/labs/leaflet-js/001-leaflet-js-tutorial.md b/content/labs/leaflet-js/001-leaflet-js-tutorial.md new file mode 100644 index 0000000..01511aa --- /dev/null +++ b/content/labs/leaflet-js/001-leaflet-js-tutorial.md @@ -0,0 +1,48 @@ ++++ +title="Leaflet.jsでMapboxのタイルを用いて地図を表示する" +date=2019-04-08 +publishdate=2019-04-08 +Description="Leaflet.jsでMapboxのタイルを用いて地図を表示するよ" +image="https://farm9.staticflickr.com/8462/29581774242_bf25a0a820_z.jpg" +leaflet=true ++++ + +[Leaflet.js](https://leafletjs.com/)でMapboxのタイルを用いて地図を表示してみます: + +
+ + + +## コード +こんな感じになります: + +``` +
+ + +``` +