[new options] showcase links, icon option added

This commit is contained in:
zzossig 2020-02-16 17:10:04 +09:00
parent 26f817c80c
commit 4029c4beff
18 changed files with 91 additions and 20 deletions

View File

@ -7,4 +7,12 @@ repo:
pinned: true
thumb:
weight:
links:
- name:
icon:
link:
shields:
- name:
image:
link:
---

View File

@ -140,7 +140,7 @@
&--desc {
font-size: 0.9rem;
margin: 0.25rem 0;
margin-top: 0.25rem;
height: 70px;
}
@ -167,9 +167,13 @@
margin-top: 0.25rem;
@include flexbox();
@include flex-wrap(wrap);
@include justify-content(flex-end);
.type {
font-size: 12px;
text-transform: capitalize;
margin-top: 0.25rem;
@include flexbox();
@include themify($themes) {
@ -178,7 +182,11 @@
svg {
display: block;
margin: auto 0.35rem auto 0;
margin: auto 0.2rem auto 0.35rem;
}
img {
margin-left: 0.35rem;
}
}
@ -195,6 +203,17 @@
}
}
&--shields {
margin-top: 0.25rem;
@include flexbox();
@include flex-wrap(wrap);
a.type {
margin-right: 0.5rem;
}
}
&--link {
z-index: z('card-inner');
position: absolute;

View File

@ -2,7 +2,6 @@
title: "Fourth"
date: 2019-10-30T20:48:10+09:00
description: "My fourth presentation"
type: pt
tags:
-
series:

View File

@ -2,7 +2,6 @@
title: "First"
date: 2019-10-30T19:45:20+09:00
description: "My first presentation"
type: pt
tags:
-
series:

View File

@ -2,7 +2,6 @@
title: "Second"
date: 2019-10-30T20:45:24+09:00
description: "My second presentation"
type: pt
tags:
-
series:

View File

@ -2,7 +2,6 @@
title: "Third"
date: 2019-10-30T20:46:30+09:00
description: "My third presentation"
type: pt
tags:
-
series:

View File

@ -10,6 +10,7 @@
<ol class="showcase__box--wrapper">
{{ range .Pages }}
{{ $category := .Params.category }}
{{ $categoryIcon := (print "svgs/showcase/" (.Params.categoryIcon | default "code") ".svg") }}
{{ range where .Pages "Params.pinned" true }}
<li class="showcase__box" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
<a href="{{ .Params.Link }}" class="showcase__box--link" target="_blank" rel="noreferrer"></a>
@ -17,20 +18,38 @@
{{ .Title }}
</span>
<div class="showcase__box--desc">
{{ .Description }}
{{ .Description | markdownify }}
</div>
<div class="grow"></div>
<div class="showcase__box--meta">
<span class="type">
{{ partial "svgs/etc/code.svg" (dict "width" 14 "height" 14) }}
{{ partial $categoryIcon (dict "width" 14 "height" 14) }}
{{ $category }}
</span>
<div class="grow"></div>
<a href="{{ .Params.Repo }}" class="type" target="_blank" rel="noreferrer">
{{ partial "svgs/social/github.svg" (dict "width" 14 "height" 14) }}
Repository
</a>
{{ range .Params.links }}
{{ $icon := (print "svgs/showcase/" (.icon | default "code") ".svg") }}
<a href="{{ .link }}" class="type" target="_blank" rel="noreferrer">
{{ partial $icon (dict "width" 14 "height" 14) }}
{{ .name }}
</a>
{{ end }}
{{ with .Params.repo }}
<a href="{{ . }}" class="type" target="_blank" rel="noreferrer">
{{ partial "svgs/social/github.svg" (dict "width" 14 "height" 14) }}
Repository
</a>
{{ end }}
</div>
{{ with .Params.shields }}
<div class="showcase__box--shields">
{{ range . }}
<a href="{{ .link }}" class="type" target="_blank" rel="noreferrer">
<img src="{{ .image }}" alt="{{ .name }}">
</a>
{{ end }}
</div>
{{ end }}
</li>
{{ end }}
{{ end }}

View File

@ -4,6 +4,7 @@
{{ if gt $sectionNum 0 }}
<div class="showcase__box--wrapper">
{{ $category := .Params.category }}
{{ $categoryIcon := (print "svgs/showcase/" (.Params.categoryIcon | default "code") ".svg") }}
{{ range .Pages }}
<div class="showcase__box" data-dir="{{ $.Param "languagedir" | default "ltr" }}">
<a href="{{ .Params.Link }}" class="showcase__box--link" target="_blank" rel="noreferrer"></a>
@ -18,20 +19,38 @@
{{ end }}
<div class="showcase__box--desc">
{{ .Description }}
{{ .Description | markdownify }}
</div>
<div class="grow"></div>
<div class="showcase__box--meta">
<span class="type">
{{ partial "svgs/etc/code.svg" (dict "width" 14 "height" 14) }}
{{ partial $categoryIcon (dict "width" 14 "height" 14) }}
{{ $category }}
</span>
<div class="grow"></div>
<a href="{{ .Params.Repo }}" class="type" target="_blank" rel="noreferrer">
{{ partial "svgs/social/github.svg" (dict "width" 14 "height" 14) }}
Repository
</a>
{{ range .Params.links }}
{{ $icon := (print "svgs/showcase/" (.icon | default "code") ".svg") }}
<a href="{{ .link }}" class="type" target="_blank" rel="noreferrer">
{{ partial $icon (dict "width" 14 "height" 14) }}
{{ .name }}
</a>
{{ end }}
{{ with .Params.repo }}
<a href="{{ . }}" class="type" target="_blank" rel="noreferrer">
{{ partial "svgs/social/github.svg" (dict "width" 14 "height" 14) }}
Repository
</a>
{{ end }}
</div>
{{ with .Params.shields }}
<div class="showcase__box--shields">
{{ range . }}
<a href="{{ .link }}" class="type" target="_blank" rel="noreferrer">
<img src="{{ .image }}" alt="{{ .name }}">
</a>
{{ end }}
</div>
{{ end }}
</div>
{{ end }}
</div>

View File

@ -1 +0,0 @@
<svg fill="#000000" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" width="{{ .width }}" height="{{ .height }}"><path fill="currentColor" d="M 15.3125 4 C 15.011719 4 14.695313 4.199219 14.59375 4.5 L 9 21.3125 C 8.898438 21.710938 9.199219 22 9.5 22 L 10.40625 22 C 10.707031 22 10.992188 21.800781 11.09375 21.5 L 16.6875 4.6875 C 16.789063 4.289063 16.488281 4 16.1875 4 Z M 5.0625 7 C 4.925781 7.023438 4.789063 7.085938 4.6875 7.1875 L 0.09375 12.6875 C -0.0078125 12.886719 -0.0078125 13.113281 0.09375 13.3125 L 4.6875 18.8125 C 4.886719 19.011719 5.199219 19.105469 5.5 18.90625 L 6.09375 18.40625 C 6.292969 18.207031 6.386719 17.792969 6.1875 17.59375 L 2.3125 13 L 6.09375 8.40625 C 6.292969 8.207031 6.300781 7.792969 6 7.59375 L 5.5 7.09375 C 5.351563 6.992188 5.199219 6.976563 5.0625 7 Z M 20.71875 7 C 20.644531 7.015625 20.574219 7.042969 20.5 7.09375 L 19.90625 7.59375 C 19.707031 7.792969 19.613281 8.207031 19.8125 8.40625 L 23.59375 13 L 19.8125 17.59375 C 19.613281 17.792969 19.605469 18.207031 19.90625 18.40625 L 20.5 18.90625 C 20.699219 19.105469 21.113281 19.113281 21.3125 18.8125 L 25.90625 13.3125 C 26.007813 13.113281 26.007813 12.886719 25.90625 12.6875 L 21.3125 7.1875 C 21.164063 7.039063 20.9375 6.953125 20.71875 7 Z"/></svg>

Before

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 32" width="{{ .width }}" height="{{ .height }}"><path fill="currentColor" d="M 16 5 C 12.144531 5 9 8.144531 9 12 C 9 14.410156 10.230469 16.550781 12.09375 17.8125 C 8.527344 19.34375 6 22.882813 6 27 L 8 27 C 8 22.570313 11.570313 19 16 19 C 20.429688 19 24 22.570313 24 27 L 26 27 C 26 22.882813 23.472656 19.34375 19.90625 17.8125 C 21.769531 16.550781 23 14.410156 23 12 C 23 8.144531 19.855469 5 16 5 Z M 16 7 C 18.773438 7 21 9.226563 21 12 C 21 14.773438 18.773438 17 16 17 C 13.226563 17 11 14.773438 11 12 C 11 9.226563 13.226563 7 16 7 Z"/></svg>

After

Width:  |  Height:  |  Size: 613 B

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" width="{{ .width }}" height="{{ .height }}"><path fill="currentColor" d="M 12.34375 1.09375 C 12.0625 1.109375 11.8125 1.21875 11.625 1.4375 L 1.28125 12.96875 C 1.066406 13.214844 0.535156 14.113281 0.28125 15.28125 C 0.105469 15.773438 0 16.34375 0 17 C 0 20.101563 2.59375 21.34375 2.59375 21.34375 C 2.632813 21.367188 2.675781 21.386719 2.71875 21.40625 L 14.71875 24.96875 C 15.109375 25.082031 15.53125 24.945313 15.78125 24.625 L 25.5625 12.84375 C 25.804688 12.542969 25.855469 12.128906 25.6875 11.78125 C 25.6875 11.78125 25.308594 10.90625 25.71875 9.90625 C 25.855469 9.574219 25.804688 9.195313 25.585938 8.910156 C 25.367188 8.625 25.011719 8.480469 24.65625 8.53125 C 24.304688 8.585938 24.003906 8.824219 23.875 9.15625 C 23.363281 10.410156 23.511719 11.363281 23.6875 11.96875 L 14.65625 22.84375 L 3.34375 19.5 L 3.28125 19.46875 C 3.09375 19.398438 2 18.90625 2 17 C 2 16.25 2.160156 15.851563 2.3125 15.625 C 2.464844 15.398438 2.625 15.289063 2.84375 15.21875 C 3.0625 15.148438 3.3125 15.148438 3.5 15.15625 L 3.53125 15.15625 L 13.96875 18.15625 C 14.058594 18.179688 14.160156 18.1875 14.25 18.1875 C 14.5625 18.1875 14.863281 18.027344 15.0625 17.78125 L 25.65625 5.5625 C 25.886719 5.28125 25.964844 4.90625 25.84375 4.5625 C 25.726563 4.214844 25.417969 3.953125 25.0625 3.875 L 12.625 1.09375 C 12.53125 1.074219 12.4375 1.089844 12.34375 1.09375 Z M 12.0625 5.0625 C 12.171875 5.058594 12.273438 5.070313 12.375 5.09375 L 19.8125 6.90625 C 20.21875 7.003906 20.375 7.269531 20.15625 7.53125 L 19.34375 8.5 C 19.121094 8.761719 18.597656 8.878906 18.1875 8.78125 L 10.78125 6.96875 C 10.371094 6.871094 10.21875 6.570313 10.4375 6.3125 L 11.21875 5.375 C 11.382813 5.179688 11.734375 5.070313 12.0625 5.0625 Z"/></svg>

After

Width:  |  Height:  |  Size: 1.8 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="{{ .width }}" height="{{ .height }}"><path fill="currentColor" d="M 12 2 L 10.021484 3.9121094 L 7.2988281 3.5273438 L 6.8222656 6.2382812 L 4.3925781 7.5273438 L 5.5996094 10 L 4.3925781 12.472656 L 6.8222656 13.761719 L 7.2988281 16.472656 L 10.023438 16.087891 L 12 18 L 13.978516 16.087891 L 16.703125 16.472656 L 17.177734 13.761719 L 19.609375 12.472656 L 18.400391 10 L 19.607422 7.5273438 L 17.177734 6.2382812 L 16.701172 3.5273438 L 13.976562 3.9121094 L 12 2 z M 4.9824219 15.017578 L 1 19 L 4 20 L 5 23 L 9.5898438 18.410156 L 9.34375 18.175781 L 8.1171875 18.347656 C 7.9971875 18.364656 7.8797188 18.373047 7.7617188 18.373047 C 6.5257188 18.373047 5.4727656 17.488484 5.2597656 16.271484 L 5.046875 15.052734 L 4.9824219 15.017578 z M 19.017578 15.017578 L 18.953125 15.052734 L 18.740234 16.271484 C 18.526234 17.489484 17.474281 18.373047 16.238281 18.373047 C 16.120281 18.373047 16.002813 18.364656 15.882812 18.347656 L 14.65625 18.175781 L 14.410156 18.412109 L 19 23 L 20 20 L 23 19 L 19.017578 15.017578 z"/></svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 26 26" width="{{ .width }}" height="{{ .height }}"><path fill="currentColor" d="M 15.3125 4 C 15.011719 4 14.695313 4.199219 14.59375 4.5 L 9 21.3125 C 8.898438 21.710938 9.199219 22 9.5 22 L 10.40625 22 C 10.707031 22 10.992188 21.800781 11.09375 21.5 L 16.6875 4.6875 C 16.789063 4.289063 16.488281 4 16.1875 4 Z M 5.0625 7 C 4.925781 7.023438 4.789063 7.085938 4.6875 7.1875 L 0.09375 12.6875 C -0.0078125 12.886719 -0.0078125 13.113281 0.09375 13.3125 L 4.6875 18.8125 C 4.886719 19.011719 5.199219 19.105469 5.5 18.90625 L 6.09375 18.40625 C 6.292969 18.207031 6.386719 17.792969 6.1875 17.59375 L 2.3125 13 L 6.09375 8.40625 C 6.292969 8.207031 6.300781 7.792969 6 7.59375 L 5.5 7.09375 C 5.351563 6.992188 5.199219 6.976563 5.0625 7 Z M 20.71875 7 C 20.644531 7.015625 20.574219 7.042969 20.5 7.09375 L 19.90625 7.59375 C 19.707031 7.792969 19.613281 8.207031 19.8125 8.40625 L 23.59375 13 L 19.8125 17.59375 C 19.613281 17.792969 19.605469 18.207031 19.90625 18.40625 L 20.5 18.90625 C 20.699219 19.105469 21.113281 19.113281 21.3125 18.8125 L 25.90625 13.3125 C 26.007813 13.113281 26.007813 12.886719 25.90625 12.6875 L 21.3125 7.1875 C 21.164063 7.039063 20.9375 6.953125 20.71875 7 Z"/></svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="{{ .width }}" height="{{ .height }}"><path fill="currentColor" d="M 11 2 C 10.448 2 10 2.448 10 3 L 10 11 L 6 11 L 12 17 L 18 11 L 14 11 L 14 3 C 14 2.448 13.552 2 13 2 L 11 2 z M 2 20 L 2 22 L 22 22 L 22 20 L 2 20 z"/></svg>

After

Width:  |  Height:  |  Size: 292 B

View File

@ -0,0 +1,5 @@
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" width="{{ .width }}" height="{{ .height }}" viewBox="0 0 24 24" version="1.1">
<g id="surface3680">
<path fill="currentColor" d="M 10.898438 2.101562 C 6.300781 2.601562 2.601562 6.300781 2.101562 10.800781 C 1.601562 15.5 4.300781 19.699219 8.398438 21.300781 C 8.699219 21.398438 9 21.199219 9 20.800781 L 9 19.199219 C 9 19.199219 8.601562 19.300781 8.101562 19.300781 C 6.699219 19.300781 6.101562 18.101562 6 17.398438 C 5.898438 17 5.699219 16.699219 5.398438 16.398438 C 5.101562 16.300781 5 16.300781 5 16.199219 C 5 16 5.300781 16 5.398438 16 C 6 16 6.5 16.699219 6.699219 17 C 7.199219 17.800781 7.800781 18 8.101562 18 C 8.5 18 8.800781 17.898438 9 17.800781 C 9.101562 17.101562 9.398438 16.398438 10 16 C 7.699219 15.5 6 14.199219 6 12 C 6 10.898438 6.5 9.800781 7.199219 9 C 7.101562 8.800781 7 8.300781 7 7.601562 C 7 7.199219 7 6.601562 7.300781 6 C 7.300781 6 8.699219 6 10.101562 7.300781 C 10.601562 7.101562 11.300781 7 12 7 C 12.699219 7 13.398438 7.101562 14 7.300781 C 15.300781 6 16.800781 6 16.800781 6 C 17 6.601562 17 7.199219 17 7.601562 C 17 8.398438 16.898438 8.800781 16.800781 9 C 17.5 9.800781 18 10.800781 18 12 C 18 14.199219 16.300781 15.5 14 16 C 14.601562 16.5 15 17.398438 15 18.300781 L 15 20.898438 C 15 21.199219 15.300781 21.5 15.699219 21.398438 C 19.398438 19.898438 22 16.300781 22 12.101562 C 22 6.101562 16.898438 1.398438 10.898438 2.101562 Z M 10.898438 2.101562 "/>
</g>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="{{ .width }}" height="{{ .height }}"><path fill="currentColor" d="M 8 2 C 6.347656 2 5 3.347656 5 5 C 5 6.585938 6.25 7.882813 7.8125 7.984375 C 5.140625 8.078125 2.992188 10.277344 2.992188 12.972656 L 3.992188 12.972656 C 3.992188 10.765625 5.785156 8.972656 7.992188 8.972656 C 9.738281 8.972656 11.210938 10.105469 11.753906 11.671875 L 12.527344 10.894531 C 11.757813 9.222656 10.097656 8.046875 8.15625 7.984375 C 9.734375 7.902344 11 6.597656 11 5 C 11 3.347656 9.652344 2 8 2 Z M 8 3 C 9.109375 3 10 3.890625 10 5 C 10 6.109375 9.109375 7 8 7 C 6.890625 7 6 6.109375 6 5 C 6 3.890625 6.890625 3 8 3 Z M 14.890625 9.976563 L 10.421875 14.441406 L 8.59375 12.621094 L 7.890625 13.328125 L 10.421875 15.859375 L 15.59375 10.6875 Z"/></svg>

After

Width:  |  Height:  |  Size: 811 B