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`を使った実験ができればいいなと思っています + + 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のタイルを用いて地図を表示してみます: + +
+ + + +## コード +こんな感じになります: + +``` +
+ + +``` + 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" . }} 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/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 }} +
+
+
+
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 }} +
+
+
+