spuit 0.1.2 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (111) hide show
  1. checksums.yaml +4 -4
  2. data/.npmignore +1 -2
  3. data/Makefile +12 -0
  4. data/README.md +2 -1
  5. data/lib/spuit/version.rb +1 -1
  6. data/package.json +2 -25
  7. data/scss/components/_button.scss +28 -27
  8. data/scss/components/_group.scss +50 -0
  9. data/scss/components/_switch.scss +40 -24
  10. data/scss/components/_triangle.scss +4 -4
  11. data/scss/elements/{_custom-checkbox.scss → _custom-radio.scss} +31 -22
  12. data/scss/elements/_fieldset.scss +21 -49
  13. data/scss/elements/_input.scss +26 -11
  14. data/scss/elements/_radio.scss +39 -0
  15. data/scss/elements/_select.scss +7 -3
  16. data/scss/elements/_table.scss +4 -11
  17. data/scss/includes/_spacers.scss +1 -1
  18. data/scss/modules/_reset.scss +32 -0
  19. data/scss/spuit.scss +5 -1
  20. data/scss/variables/_defaults.scss +1 -0
  21. data/scss/variables/_fonts.scss +45 -0
  22. data/scss/variables/_media-queries.scss +2 -2
  23. data/site/.gitignore +117 -0
  24. data/site/README.md +12 -0
  25. data/site/archetypes/default.md +6 -0
  26. data/site/config.toml +24 -0
  27. data/site/content/posts/components.html +445 -0
  28. data/site/content/posts/example.md +66 -0
  29. data/site/content/posts/layouts.md +11 -0
  30. data/site/content/posts/layouts/2col.html +27 -0
  31. data/site/content/posts/layouts/holygrail.html +40 -0
  32. data/site/content/posts/layouts/stickyfooter.html +23 -0
  33. data/site/content/search.adoc +5 -0
  34. data/site/themes/spuit/.gitignore +68 -0
  35. data/site/themes/spuit/LICENSE.md +20 -0
  36. data/site/themes/spuit/README.md +66 -0
  37. data/site/themes/spuit/archetypes/default.md +7 -0
  38. data/{assets/javascripts/spuit → site/themes/spuit/assets/javascripts/_}/Common.js +0 -0
  39. data/{assets/javascripts/spuit → site/themes/spuit/assets/javascripts/_}/extend.js +0 -0
  40. data/site/themes/spuit/assets/javascripts/classes/HugoSearch.js +115 -0
  41. data/site/themes/spuit/assets/javascripts/classes/onof.js +107 -0
  42. data/site/themes/spuit/assets/javascripts/scripts.js +26 -0
  43. data/site/themes/spuit/assets/stylesheets/styles.scss +790 -0
  44. data/site/themes/spuit/assets/stylesheets/styles/components/_card.scss +160 -0
  45. data/site/themes/spuit/assets/stylesheets/styles/components/_syntax.scss +59 -0
  46. data/site/themes/spuit/assets/stylesheets/styles/config/_mixins.scss +8 -0
  47. data/site/themes/spuit/assets/stylesheets/styles/config/_variables.scss +6 -0
  48. data/site/themes/spuit/design/badge.sketch +0 -0
  49. data/site/themes/spuit/layouts/404.html +9 -0
  50. data/site/themes/spuit/layouts/_default/baseof.html +27 -0
  51. data/site/themes/spuit/layouts/_default/list.html +22 -0
  52. data/site/themes/spuit/layouts/_default/rss.xml +26 -0
  53. data/site/themes/spuit/layouts/_default/single.html +14 -0
  54. data/site/themes/spuit/layouts/_default/temp.html +5 -0
  55. data/site/themes/spuit/layouts/index.html +2 -0
  56. data/site/themes/spuit/layouts/json/single.html +28 -0
  57. data/site/themes/spuit/layouts/partials/foot.html +26 -0
  58. data/site/themes/spuit/layouts/partials/footer.html +5 -0
  59. data/site/themes/spuit/layouts/partials/head.html +52 -0
  60. data/site/themes/spuit/layouts/partials/header.html +4 -0
  61. data/site/themes/spuit/layouts/partials/parts/breadcrumbs.html +36 -0
  62. data/site/themes/spuit/layouts/partials/parts/info.html +19 -0
  63. data/site/themes/spuit/layouts/partials/parts/nextback.html +9 -0
  64. data/site/themes/spuit/layouts/partials/parts/pagenator.html +31 -0
  65. data/site/themes/spuit/layouts/partials/parts/pager.html +23 -0
  66. data/site/themes/spuit/layouts/partials/sidebar.html +52 -0
  67. data/site/themes/spuit/layouts/partials/widgets/archive.html +14 -0
  68. data/site/themes/spuit/layouts/partials/widgets/categories.html +12 -0
  69. data/site/themes/spuit/layouts/partials/widgets/recents.html +14 -0
  70. data/site/themes/spuit/layouts/partials/widgets/related.html +13 -0
  71. data/site/themes/spuit/layouts/partials/widgets/search-modal.html +19 -0
  72. data/site/themes/spuit/layouts/partials/widgets/search.html +10 -0
  73. data/site/themes/spuit/layouts/partials/widgets/tags.html +12 -0
  74. data/site/themes/spuit/layouts/shortcodes/blockquote.html +70 -0
  75. data/site/themes/spuit/layouts/shortcodes/card-amazon.html +28 -0
  76. data/site/themes/spuit/layouts/shortcodes/card-site.html +22 -0
  77. data/site/themes/spuit/layouts/shortcodes/card-store.html +28 -0
  78. data/site/themes/spuit/layouts/shortcodes/card-youtube.html +27 -0
  79. data/site/themes/spuit/layouts/shortcodes/previews.html +18 -0
  80. data/site/themes/spuit/package-lock.json +7959 -0
  81. data/site/themes/spuit/package.json +46 -0
  82. data/{dist → site/themes/spuit/static}/favicon.ico +0 -0
  83. data/site/themes/spuit/static/fonts/FontAwesome.otf +0 -0
  84. data/site/themes/spuit/static/fonts/fontawesome-webfont.eot +0 -0
  85. data/site/themes/spuit/static/fonts/fontawesome-webfont.svg +2671 -0
  86. data/site/themes/spuit/static/fonts/fontawesome-webfont.ttf +0 -0
  87. data/site/themes/spuit/static/fonts/fontawesome-webfont.woff +0 -0
  88. data/site/themes/spuit/static/fonts/fontawesome-webfont.woff2 +0 -0
  89. data/site/themes/spuit/static/images/appstore-badge.png +0 -0
  90. data/site/themes/spuit/static/images/appstore-badge_en.png +0 -0
  91. data/{dist → site/themes/spuit/static/images}/favicon.png +0 -0
  92. data/site/themes/spuit/static/images/google-play-badge.png +0 -0
  93. data/site/themes/spuit/static/images/google-play-badge_en.png +0 -0
  94. data/site/themes/spuit/static/javascripts/scripts.js +120 -0
  95. data/site/themes/spuit/static/stylesheets/styles.css +9763 -0
  96. data/site/themes/spuit/theme.toml +9 -0
  97. data/site/themes/spuit/webpack.config.js +10 -0
  98. data/site/themes/spuit/webpack/css.webpack.config.js +42 -0
  99. data/site/themes/spuit/webpack/js.webpack.config.js +21 -0
  100. data/site/themes/spuit/yarn.lock +6815 -0
  101. data/yarn.lock +337 -4942
  102. metadata +84 -16
  103. data/assets/html/index.ejs +0 -331
  104. data/assets/javascripts/scripts.js +0 -4
  105. data/assets/stylesheets/styles.scss +0 -191
  106. data/assets/stylesheets/styles/config/_mixins.scss +0 -26
  107. data/assets/stylesheets/styles/config/_variables.scss +0 -4
  108. data/dist/index.html +0 -1
  109. data/dist/javascripts/scripts.js +0 -1
  110. data/dist/stylesheets/styles.css +0 -3
  111. data/scss/_/_form.sass +0 -44
@@ -0,0 +1,4 @@
1
+ <header class="header">
2
+ <a href="{{ .Site.BaseURL }}">{{ .Site.Title }}</a>
3
+ <small>/ Sass Mixin Library</small>
4
+ </header>
@@ -0,0 +1,36 @@
1
+ {{/*
2
+ form: https://tmnm.tech/2017/01/15/hugo-breadcrumbs/
3
+ */}}
4
+
5
+ {{ $this := . }}
6
+ {{ $i := 1 }}
7
+ <div class="breadcrumbs">
8
+ <ol itemscope itemtype="https://schema.org/BreadcrumbList">
9
+ <li itemprop="itemListElement" itemscope
10
+ itemtype="https://schema.org/ListItem">
11
+ <a itemprop="item" href="/">
12
+ <span itemprop="name">ホーム</span></a>
13
+ <meta itemprop="position" content="{{$i}}" />
14
+ </li>
15
+ {{range sort .Site.AllPages "URL"}}
16
+ {{ if ne .URL "/" }}
17
+ {{ if eq $this.URL .URL }}
18
+ <li itemprop="itemListElement" itemscope
19
+ itemtype="https://schema.org/ListItem">
20
+ <span itemprop="name">{{.Title}}</span>
21
+ <meta itemprop="position" content="{{$i}}" />
22
+ </li>
23
+ {{ else if hasPrefix $this.URL (printf "%s/" .URL) }}
24
+ {{ $i := add $i 1 }}
25
+ <li itemprop="itemListElement" itemscope
26
+ itemtype="https://schema.org/ListItem">
27
+ <a itemprop="item" href="{{.URL}}">
28
+ <span itemprop="name">{{.Title}}</span></a>
29
+ <meta itemprop="position" content="{{$i}}" />
30
+ </li>
31
+
32
+ {{ end }}
33
+ {{ end }}
34
+ {{ end }}
35
+ </ol>
36
+ </div>
@@ -0,0 +1,19 @@
1
+ <div class="info">
2
+ <span class="date">{{ .Date.Format "2006-01-02" }}</span>
3
+
4
+ {{ if (isset .Params "categories") }}
5
+ {{ if lt 0 (len .Params.categories) }}
6
+ {{ range .Params.categories }}
7
+ <a href="/categories/{{ . | urlize }}/">#{{ . }}</a>
8
+ {{ end }}
9
+ {{ end }}
10
+ {{ end }}
11
+
12
+ {{ if (isset .Params "tags") }}
13
+ {{ if lt 0 (len .Params.tags) }}
14
+ {{ range .Params.tags }}
15
+ <a href="/tags/{{ . | urlize }}/">#{{ . }}</a>
16
+ {{ end }}
17
+ {{ end }}
18
+ {{ end }}
19
+ </div>
@@ -0,0 +1,9 @@
1
+ <section class="nextback">
2
+ {{ with .PrevInSection }}
3
+ <a class="prev" href="{{.Permalink}}">前の仕事: {{.Title}}</a>
4
+ {{ end }}
5
+
6
+ {{ with .NextInSection }}
7
+ <a class="next" href="{{.Permalink}}">次の仕事: {{.Title}}</a>
8
+ {{ end }}
9
+ </section>
@@ -0,0 +1,31 @@
1
+ {{ if gt .Paginator.TotalPages 1 }}
2
+ <section class="pagenator">
3
+ <ul>
4
+ {{ $pag := .Paginator }}
5
+ {{ if gt $pag.TotalPages 1 }}
6
+ <li {{ if not $pag.HasPrev }} class="is-disabled" {{ end }}>
7
+ <a href="{{ $pag.First.URL }}">First</a>
8
+ </li>
9
+ <li {{ if not $pag.HasPrev }} class="is-disabled" {{ end }}>
10
+ <a href="{{ if $pag.HasPrev }}{{ $pag.Prev.URL }}{{ else }}#{{ end }}">Prev</a>
11
+ </li>
12
+
13
+ {{ range $pag.Pagers }}
14
+ <li {{ if eq . $pag }} class="active" {{ end }}>
15
+ <a href="{{ .URL }}">
16
+ {{ .PageNumber }}
17
+ </a>
18
+ </li>
19
+ {{ end }}
20
+
21
+ <li {{ if not $pag.HasNext }} class="disabled" {{ end }}>
22
+ <a href="{{ if $pag.HasNext }}{{ $pag.Next.URL }}{{ else }}#{{ end }}">Next</a>
23
+ </li>
24
+
25
+ <li {{ if not $pag.HasNext }} class="is-disabled" {{ end }}>
26
+ <a href="{{ $pag.Last.URL }}">Last</a>
27
+ </li>
28
+ {{ end }}
29
+ </ul>
30
+ </section>
31
+ {{ end }}
@@ -0,0 +1,23 @@
1
+ {{ if gt .Paginator.TotalPages 1 }}
2
+ <section class="pager">
3
+ {{ if .Paginator.HasPrev }}
4
+ <a href="{{ .Paginator.Prev.URL }}">
5
+ Newer
6
+ </a>
7
+ {{ else }}
8
+ <a class="is-disabled">
9
+ Newer
10
+ </a>
11
+ {{ end }}
12
+
13
+ {{ if .Paginator.HasNext }}
14
+ <a href="{{ .Paginator.Next.URL }}">
15
+ Older
16
+ </a>
17
+ {{ else }}
18
+ <a class="is-disabled">
19
+ Older
20
+ </a>
21
+ {{ end }}
22
+ </section>
23
+ {{ end }}
@@ -0,0 +1,52 @@
1
+ <div class="sidebar">
2
+ {{/* partial "widgets/recents" . */}}
3
+ {{/* partial "widgets/categories" . */}}
4
+ {{/* partial "widgets/tags" . */}}
5
+ {{/* partial "widgets/archive" . */}}
6
+ {{/* partial "widgets/search" . */}}
7
+
8
+ {{ if eq .IsHome true }}
9
+ <div class="widget">
10
+ <ul>
11
+ <li>
12
+ <a href="#" data-toggle="modal" data-target="#search">Search</a>
13
+ </li>
14
+ <li>
15
+ <a href="/posts/components/">Components</a>
16
+ </li>
17
+ </ul>
18
+ </div>
19
+ {{ end }}
20
+ {{ if eq .IsHome false }}
21
+ <div class="widget">
22
+ <ul>
23
+ <li>
24
+ <a href="#typefaces">Typefaces</a>
25
+ </li>
26
+ <li>
27
+ <a href="#buttons">Buttons</a>
28
+ </li>
29
+ <li>
30
+ <a href="#group">Group</a>
31
+ </li>
32
+ <li>
33
+ <a href="#form">Form</a>
34
+ </li>
35
+ <li>
36
+ <a href="#table">Table</a>
37
+ </li>
38
+ <li>
39
+ <a href="#icons">Icons</a>
40
+ </li>
41
+ <li>
42
+ <a href="#balloon">Balloon</a>
43
+ </li>
44
+ <li>
45
+ <a href="#utilities">Utilities</a>
46
+ </li>
47
+ </ul>
48
+ </div>
49
+ {{ end }}
50
+ </div>
51
+
52
+ {{ partial "widgets/search-modal" . }}
@@ -0,0 +1,14 @@
1
+ {{ if not (eq (len .Site.Pages) 0) }}
2
+ <div class="widget">
3
+ <h5>Archives</h5>
4
+ <ul>
5
+ {{ range $value := (where .Site.RegularPages "Type" "post").GroupByDate "2006-01" }}
6
+ {{ $url := (index $value.Pages 0).Date.Format "2006-01" | urlize }}
7
+ <li>
8
+ <a href="{{ $.Site.BaseURL }}post/#{{ $url }}">{{ .Key }}</a>
9
+ <span class="count">({{ len $value.Pages }})</span>
10
+ </li>
11
+ {{ end }}
12
+ </ul>
13
+ </div>
14
+ {{ end }}
@@ -0,0 +1,12 @@
1
+ {{ if isset .Site.Taxonomies "categories" }}
2
+ {{ if not (eq (len .Site.Taxonomies.categories) 0) }}
3
+ <div class="widget">
4
+ <h5>Categories</h5>
5
+ <ul>
6
+ {{ range $name, $items := .Site.Taxonomies.categories }}
7
+ <li><a href="{{ $.Site.BaseURL }}categories/{{ $name | urlize | lower }}" title="{{ $name }}">{{ $name }}</a> <span class="count">({{ len $items }})</span></li>
8
+ {{ end }}
9
+ </ul>
10
+ </div>
11
+ {{ end }}
12
+ {{ end }}
@@ -0,0 +1,14 @@
1
+ {{ if not (eq (len .Site.Pages) 0) }}
2
+ <div class="widget">
3
+ <h5>Recents</h5>
4
+ <ul>
5
+ {{ range first 5 (where .Site.Pages "Section" "posts") }}
6
+ {{ if not (eq .URL "/posts/") }}
7
+ <li>
8
+ <a href="{{ .RelPermalink }}">{{ .Title }}</a>
9
+ </li>
10
+ {{ end }}
11
+ {{ end }}
12
+ </ul>
13
+ </div>
14
+ {{ end }}
@@ -0,0 +1,13 @@
1
+ {{ $related := .Site.RegularPages.Related . | first 5 }}
2
+ {{ with $related }}
3
+ <div class="widget related">
4
+ <h5>See Also</h5>
5
+ <ul>
6
+ {{ range . }}
7
+ {{ if ne (len .Title) 0 }}
8
+ <li><a href="{{ .RelPermalink }}">{{ .Title }}</a></li>
9
+ {{ end }}
10
+ {{ end }}
11
+ </ul>
12
+ </div>
13
+ {{ end }}
@@ -0,0 +1,19 @@
1
+ <div class="search-modal modal fade" id="search" tabindex="-1" role="dialog" aria-hidden="true">
2
+ <div class="modal-dialog" role="document">
3
+ <div class="modal-content">
4
+ <div class="modal-header">
5
+ <h5 class="modal-title">サイト内検索</h5>
6
+ <button type="button" class="close" data-dismiss="modal" aria-label="Close">
7
+ <span aria-hidden="true">&times;</span>
8
+ </button>
9
+ </div>
10
+ <div class="modal-body">
11
+ <form action="" id="site-search" class="search-form" role="search">
12
+ <input type="search" id="search-input" aria-label="Search" class="site-search" autocomplete="off"
13
+ placeholder="" required>
14
+ <ul id="search-results"></ul>
15
+ </form>
16
+ </div>
17
+ </div>
18
+ </div>
19
+ </div>
@@ -0,0 +1,10 @@
1
+ <div class="widget">
2
+ <h5>Search</h5>
3
+ <ul>
4
+ <li>
5
+ <a href="#" data-toggle="modal" data-target="#search">
6
+ Search
7
+ </a>
8
+ </li>
9
+ </ul>
10
+ </div>
@@ -0,0 +1,12 @@
1
+ {{ if isset .Site.Taxonomies "tags" }}
2
+ {{ if not (eq (len .Site.Taxonomies.tags) 0) }}
3
+ <div class="widget">
4
+ <h5>Tags</h5>
5
+ <ul>
6
+ {{ range $name, $items := .Site.Taxonomies.tags }}
7
+ <li><a href="{{ $.Site.BaseURL }}tags/{{ $name | urlize | lower }}" title="{{ $name }}">{{ $name }}</a> <span class="count">({{ len $items }})</span></li>
8
+ {{ end }}
9
+ </ul>
10
+ </div>
11
+ {{ end }}
12
+ {{ end }}
@@ -0,0 +1,70 @@
1
+
2
+ <!-- Author: Parsia Hakimian https://github.com/parsiya/Hugo-Shortcodes -->
3
+ <!-- port of Octopress blockquote plugin http://octopress.org/docs/plugins/blockquote/ to Hugo
4
+
5
+ {% blockquote [author[, source]] [link] [source_link_title] %}
6
+ Quote string
7
+ {% endblockquote %}
8
+
9
+ -->
10
+
11
+ <!-- reset scratch variables at the start -->
12
+ {{ $.Scratch.Set "bl_author" false }}
13
+ {{ $.Scratch.Set "bl_source" false }}
14
+ {{ $.Scratch.Set "bl_link" false }}
15
+ {{ $.Scratch.Set "bl_title" false }}
16
+
17
+ {{ if .IsNamedParams }}
18
+ {{ $.Scratch.Set "bl_author" (.Get "author") }}
19
+ {{ $.Scratch.Set "bl_source" (.Get "source") }}
20
+ {{ $.Scratch.Set "bl_link" (.Get "link") }}
21
+ {{ $.Scratch.Set "bl_title" (.Get "title") }}
22
+ {{ else }}
23
+ <!-- for the positional version if any -->
24
+ {{ end }}
25
+
26
+ <!-- if title is not set explicitly then we need to beautify the link
27
+ if length of link is more than 32 chars, we will cut it off by 32 and then drop everything after the last / if any and put it in into title -->
28
+
29
+ {{ with $.Scratch.Get "bl_title" }}
30
+ <!-- do nothing -->
31
+ {{ else }}
32
+ {{ with $.Scratch.Get "bl_link" }} <!-- if link is given -->
33
+ {{ range last 1 (split ($.Scratch.Get "bl_link" ) "://") }} <!-- split by :// and then only take the items after it to remove protocol:// -->
34
+ {{ $.Scratch.Set "title_without_protocol" . }}
35
+ {{ end }}
36
+ {{ range last 1 (split ($.Scratch.Get "title_without_protocol" ) "www.") }} <!-- also remove the www. at the start if any. we are using a second split because all URLS may not start with it -->
37
+ {{ $.Scratch.Set "title_without_protocol" . }}
38
+ {{ end }}
39
+ {{ $.Scratch.Set "bl_title" ($.Scratch.Get "title_without_protocol") }}
40
+
41
+ <!-- if link is longer than 32 bytes we should trim it -->
42
+ {{ if (gt (len ($.Scratch.Get "title_without_protocol") ) 32) }}
43
+ {{ $title := (slicestr ($.Scratch.Get "title_without_protocol") 0 32) }} <!-- get the first 32 characters of title_without_protocol -->
44
+ {{ $split_by_fw_slash := split $title "/" }} <!-- now split on / because we want to stop after the last forward slash -->
45
+ {{ $count := (sub (len $split_by_fw_slash) 1) }} <!-- we want everything but the last part so we adjust the count accordingly -->
46
+
47
+ {{ $.Scratch.Set "tempstring" "" }} <!-- temp variable to hold the concatinated string -->
48
+ {{ range first $count $split_by_fw_slash }} <!-- loop through all parts except last and concat them (add / between halves) -->
49
+ {{ $.Scratch.Set "tempstring" ( . | printf "%s%s/" ($.Scratch.Get "tempstring") | printf "%s" ) }}
50
+ {{ end }}
51
+ {{ $.Scratch.Set "bl_title" ( printf "%s..." ($.Scratch.Get "tempstring") | printf "%s" ) }}
52
+ {{ end }}
53
+ {{ end }}
54
+ {{ end }}
55
+
56
+ <blockquote>
57
+ <p>{{ .Inner | markdownify }}</p>
58
+ <footer>
59
+ <strong>{{ with $.Scratch.Get "bl_author" }}{{ . }}{{ end }}</strong>
60
+ {{ with $.Scratch.Get "bl_source" }}
61
+ <cite>{{ . }}</cite>
62
+ {{ else }}
63
+ {{ with $.Scratch.Get "bl_link" }}
64
+ <cite>
65
+ <a href="{{ . }}" title="{{ . }}">{{ $.Scratch.Get "bl_title" }}</a> <!-- can't have new lines here -->
66
+ </cite>
67
+ {{ end }}
68
+ {{ end }}
69
+ </footer>
70
+ </blockquote>
@@ -0,0 +1,28 @@
1
+ {{/*
2
+
3
+ {{< card-amazon id="xxx" title="xxx" src="/images/xxx.png" >}}
4
+
5
+ */}}
6
+ <section class="card is-amazon">
7
+ {{ $id := (.Get "id") }}
8
+ {{ $title := (.Get "title") }}
9
+ {{ $src := (.Get "src") }}
10
+ {{ $name := (.Get "name") }}
11
+ <h5>Amazon</h5>
12
+ <a href="https://www.amazon.co.jp/o/ASIN/{{ $id }}" target="_blank" class="card__link">
13
+ <span class="card__img">
14
+ <img src="{{ $src }}" alt="" />
15
+ </span>
16
+ <span class="card__info">
17
+ <span class="card__title">
18
+ {{ $title }}
19
+ {{ if ne $name nil }}
20
+ / {{ $name }}
21
+ {{ end }}
22
+ </span>
23
+ <span class="card__url">
24
+ https://www.amazon.co.jp/o/ASIN/{{ $id }}
25
+ </span>
26
+ </span>
27
+ </a>
28
+ </section>
@@ -0,0 +1,22 @@
1
+ {{/*
2
+
3
+ {{< card-site href="https://xxx.com/" title="title" description="description" src="/images/2017/xxxxxx/ogp.png" >}}
4
+
5
+ */}}
6
+ <section class="card">
7
+ {{ $href := (.Get "href") }}
8
+ {{ $title := (.Get "title") }}
9
+ {{ $src := (.Get "src") }}
10
+ {{ $description := (.Get "description") }}
11
+ <h5>Website</h5>
12
+ <a href="{{ $href }}" target="_blank" rel="noreferrer" class="card__link">
13
+ <span class="card__img">
14
+ <img src="{{ $src }}" alt="" />
15
+ </span>
16
+ <span class="card__info">
17
+ <span class="card__title">{{ $title }}</span>
18
+ <span class="card__url">{{ $href }}</span>
19
+ <span class="card__description">{{ $description }}</span>
20
+ </span>
21
+ </a>
22
+ </section>
@@ -0,0 +1,28 @@
1
+ {{/*
2
+
3
+ {{< card-store url="xxx" title="xxx" >}}
4
+
5
+ */}}
6
+ {{ $url := (.Get "url") }}
7
+ {{ $src := (.Get "src") }}
8
+ {{ $title := (.Get "title") }}
9
+ {{ $type := (.Get "type") }}
10
+
11
+ <section class="card is-{{ $type }}">
12
+
13
+ {{ if eq $type "apple" }}
14
+ <h5>App Store</h5>
15
+ {{ else if eq $type "google" }}
16
+ <h5>Google Play</h5>
17
+ {{ end }}
18
+
19
+ <a href="{{ $url }}" target="_blank" class="card__link">
20
+ <span class="card__img">
21
+ <img src="{{ $src }}" alt="" />
22
+ </span>
23
+ <span class="card__info">
24
+ <span class="card__title">{{ $title }}</span>
25
+ <span class="card__url">{{ $url }}</span>
26
+ </span>
27
+ </a>
28
+ </section>
@@ -0,0 +1,27 @@
1
+ {{/*
2
+
3
+ {{< card-youtube id="xxx" >}}
4
+
5
+ <div style="position: relative; padding-bottom: 56.25%; padding-top: 30px; height: 0; overflow: hidden;">
6
+ <iframe src="//www.youtube.com/embed/{{ $id }}" style="position: absolute; top: 0; left: 0; width: 100%; height: 100%;" allowfullscreen="" frameborder="0" title="YouTube Video"></iframe>
7
+ </div>
8
+
9
+ */}}
10
+
11
+ <section class="card is-youtuve">
12
+ {{ $id := (.Get "id") }}
13
+ {{ $title := (.Get "title") }}
14
+ <h5>Youtube</h5>
15
+
16
+ <a href="https://www.youtube.com/watch?v={{ $id }}" target="_blank" class="card__link">
17
+ <span class="card__img">
18
+ <img src="http://i.ytimg.com/vi/{{ $id }}/maxresdefault.jpg" alt="" />
19
+ </span>
20
+
21
+ <span class="card__info">
22
+ <span class="card__title">{{ $title }}</span>
23
+ <span class="card__url">https://www.youtube.com/watch?v={{ $id }}</span>
24
+ </span>
25
+ </a>
26
+
27
+ </section>