diff options
author | Tabarnhack <34366899+tabarnhack@users.noreply.github.com> | 2020-08-10 17:23:16 +0300 |
---|---|---|
committer | Munif Tanjim <muniftanjim@gmail.com> | 2020-08-10 17:23:59 +0300 |
commit | b984100a1d078fc2178a29d233d3abe14378424e (patch) | |
tree | 5c8f954d047e2c7d1dc1b16cc6e3952e785f6b0d | |
parent | 89b34a73b0dba9edf6ad967451b8ea1a19ebdf1a (diff) |
refactor [icons]: use separate svg files
-rw-r--r-- | assets/svg/author.svg | 4 | ||||
-rw-r--r-- | assets/svg/calendar.svg | 6 | ||||
-rw-r--r-- | assets/svg/category.svg | 3 | ||||
-rw-r--r-- | assets/svg/clock.svg | 4 | ||||
-rw-r--r-- | assets/svg/codepen.svg | 1 | ||||
-rw-r--r-- | assets/svg/edit.svg | 4 | ||||
-rw-r--r-- | assets/svg/email.svg | 1 | ||||
-rw-r--r-- | assets/svg/facebook.svg | 1 | ||||
-rw-r--r-- | assets/svg/git.svg | 1 | ||||
-rw-r--r-- | assets/svg/github.svg | 3 | ||||
-rw-r--r-- | assets/svg/gitlab.svg | 1 | ||||
-rw-r--r-- | assets/svg/google_scholar.svg | 1 | ||||
-rw-r--r-- | assets/svg/heroicons/github.svg | 3 | ||||
-rw-r--r-- | assets/svg/instagram.svg | 1 | ||||
-rw-r--r-- | assets/svg/linkedin.svg | 1 | ||||
-rw-r--r-- | assets/svg/menu.svg | 5 | ||||
-rw-r--r-- | assets/svg/next.svg | 4 | ||||
-rw-r--r-- | assets/svg/prev.svg | 4 | ||||
-rw-r--r-- | assets/svg/rss.svg | 1 | ||||
-rw-r--r-- | assets/svg/search.svg | 4 | ||||
-rw-r--r-- | assets/svg/tag.svg | 4 | ||||
-rw-r--r-- | assets/svg/telegram.svg | 1 | ||||
-rw-r--r-- | assets/svg/twitter.svg | 4 | ||||
-rw-r--r-- | assets/svg/x.svg | 4 | ||||
-rw-r--r-- | assets/svg/youtube.svg | 5 | ||||
-rw-r--r-- | layouts/partials/svg/icons.html | 79 | ||||
-rw-r--r-- | layouts/shortcodes/svg.html | 5 |
27 files changed, 79 insertions, 76 deletions
diff --git a/assets/svg/author.svg b/assets/svg/author.svg new file mode 100644 index 0000000..810ad14 --- /dev/null +++ b/assets/svg/author.svg @@ -0,0 +1,4 @@ +<svg viewBox="0 0 24 24"> + <path d="M21,21V20c0-2.76-4-5-9-5s-9,2.24-9,5v1"/> + <path d="M16,6.37A4,4,0,1,1,12.63,3,4,4,0,0,1,16,6.37Z"/> +</svg> diff --git a/assets/svg/calendar.svg b/assets/svg/calendar.svg new file mode 100644 index 0000000..06256ca --- /dev/null +++ b/assets/svg/calendar.svg @@ -0,0 +1,6 @@ +<svg viewBox="0 0 24 24"> + <rect x="3" y="4" width="18" height="18" rx="2" ry="2"/> + <line x1="16" y1="2" x2="16" y2="6"/> + <line x1="8" y1="2" x2="8" y2="6"/> + <line x1="3" y1="10" x2="21" y2="10"/> +</svg> diff --git a/assets/svg/category.svg b/assets/svg/category.svg new file mode 100644 index 0000000..f4b9741 --- /dev/null +++ b/assets/svg/category.svg @@ -0,0 +1,3 @@ +<svg viewBox="0 0 24 24"> + <path d="M22,19a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V5A2,2,0,0,1,4,3H9l2,3h9a2,2,0,0,1,2,2Z"/> +</svg> diff --git a/assets/svg/clock.svg b/assets/svg/clock.svg new file mode 100644 index 0000000..bc38585 --- /dev/null +++ b/assets/svg/clock.svg @@ -0,0 +1,4 @@ +<svg viewBox="0 0 24 24"> + <circle cx="12" cy="12" r="10"/> + <polyline points="12 6 12 12 15 15"/> +</svg> diff --git a/assets/svg/codepen.svg b/assets/svg/codepen.svg new file mode 100644 index 0000000..ab2a815 --- /dev/null +++ b/assets/svg/codepen.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-codepen"><polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"></polygon><line x1="12" y1="22" x2="12" y2="15.5"></line><polyline points="22 8.5 12 15.5 2 8.5"></polyline><polyline points="2 15.5 12 8.5 22 15.5"></polyline><line x1="12" y1="2" x2="12" y2="8.5"></line></svg>
\ No newline at end of file diff --git a/assets/svg/edit.svg b/assets/svg/edit.svg new file mode 100644 index 0000000..b8e013e --- /dev/null +++ b/assets/svg/edit.svg @@ -0,0 +1,4 @@ +<svg viewBox="0 0 24 24"> + <path d="M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34" /> + <polygon points="18 2 22 6 12 16 8 16 8 12 18 2" /> +</svg> diff --git a/assets/svg/email.svg b/assets/svg/email.svg new file mode 100644 index 0000000..2af169e --- /dev/null +++ b/assets/svg/email.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-mail"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"></path><polyline points="22,6 12,13 2,6"></polyline></svg>
\ No newline at end of file diff --git a/assets/svg/facebook.svg b/assets/svg/facebook.svg new file mode 100644 index 0000000..2570f56 --- /dev/null +++ b/assets/svg/facebook.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-facebook"><path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"></path></svg>
\ No newline at end of file diff --git a/assets/svg/git.svg b/assets/svg/git.svg new file mode 100644 index 0000000..f795f63 --- /dev/null +++ b/assets/svg/git.svg @@ -0,0 +1 @@ +<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><title>Git icon</title><path d="M23.546 10.93L13.067.452c-.604-.603-1.582-.603-2.188 0L8.708 2.627l2.76 2.76c.645-.215 1.379-.07 1.889.441.516.515.658 1.258.438 1.9l2.658 2.66c.645-.223 1.387-.078 1.9.435.721.72.721 1.884 0 2.604-.719.719-1.881.719-2.6 0-.539-.541-.674-1.337-.404-1.996L12.86 8.955v6.525c.176.086.342.203.488.348.713.721.713 1.883 0 2.6-.719.721-1.889.721-2.609 0-.719-.719-.719-1.879 0-2.598.182-.18.387-.316.605-.406V8.835c-.217-.091-.424-.222-.6-.401-.545-.545-.676-1.342-.396-2.009L7.636 3.7.45 10.881c-.6.605-.6 1.584 0 2.189l10.48 10.477c.604.604 1.582.604 2.186 0l10.43-10.43c.605-.603.605-1.582 0-2.187"/></svg>
\ No newline at end of file diff --git a/assets/svg/github.svg b/assets/svg/github.svg new file mode 100644 index 0000000..64b1745 --- /dev/null +++ b/assets/svg/github.svg @@ -0,0 +1,3 @@ +<svg viewBox="0 0 24 24"> + <path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/> +</svg> diff --git a/assets/svg/gitlab.svg b/assets/svg/gitlab.svg new file mode 100644 index 0000000..e28ef4c --- /dev/null +++ b/assets/svg/gitlab.svg @@ -0,0 +1 @@ +<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>GitLab icon</title> <path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"/></svg> diff --git a/assets/svg/google_scholar.svg b/assets/svg/google_scholar.svg new file mode 100644 index 0000000..3b37efe --- /dev/null +++ b/assets/svg/google_scholar.svg @@ -0,0 +1 @@ +<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>Google Scholar icon</title><path d="M12 24a7 7 0 1 1 0-14 7 7 0 0 1 0 14zm0-24L0 9.5l4.838 3.94A8 8 0 0 1 12 9a8 8 0 0 1 7.162 4.44L24 9.5z"/></svg>
\ No newline at end of file diff --git a/assets/svg/heroicons/github.svg b/assets/svg/heroicons/github.svg new file mode 100644 index 0000000..64b1745 --- /dev/null +++ b/assets/svg/heroicons/github.svg @@ -0,0 +1,3 @@ +<svg viewBox="0 0 24 24"> + <path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/> +</svg> diff --git a/assets/svg/instagram.svg b/assets/svg/instagram.svg new file mode 100644 index 0000000..9fdb8e3 --- /dev/null +++ b/assets/svg/instagram.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-instagram"><rect x="2" y="2" width="20" height="20" rx="5" ry="5"></rect><path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"></path><line x1="17.5" y1="6.5" x2="17.51" y2="6.5"></line></svg>
\ No newline at end of file diff --git a/assets/svg/linkedin.svg b/assets/svg/linkedin.svg new file mode 100644 index 0000000..3953109 --- /dev/null +++ b/assets/svg/linkedin.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-linkedin"><path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"></path><rect x="2" y="9" width="4" height="12"></rect><circle cx="4" cy="4" r="2"></circle></svg>
\ No newline at end of file diff --git a/assets/svg/menu.svg b/assets/svg/menu.svg new file mode 100644 index 0000000..62d8df4 --- /dev/null +++ b/assets/svg/menu.svg @@ -0,0 +1,5 @@ +<svg viewBox="0 0 24 24"> + <line x1="3" y1="12" x2="21" y2="12" /> + <line x1="3" y1="6" x2="21" y2="6" /> + <line x1="3" y1="18" x2="21" y2="18" /> +</svg> diff --git a/assets/svg/next.svg b/assets/svg/next.svg new file mode 100644 index 0000000..7c4a671 --- /dev/null +++ b/assets/svg/next.svg @@ -0,0 +1,4 @@ +<svg viewBox="0 0 24 24"> + <line x1="4" y1="12" x2="20" y2="12"/> + <polyline points="14 6 20 12 14 18"/> +</svg> diff --git a/assets/svg/prev.svg b/assets/svg/prev.svg new file mode 100644 index 0000000..70a21de --- /dev/null +++ b/assets/svg/prev.svg @@ -0,0 +1,4 @@ +<svg viewBox="0 0 24 24"> + <line x1="20" y1="12" x2="4" y2="12"/> + <polyline points="10 18 4 12 10 6"/> +</svg> diff --git a/assets/svg/rss.svg b/assets/svg/rss.svg new file mode 100644 index 0000000..c9a1368 --- /dev/null +++ b/assets/svg/rss.svg @@ -0,0 +1 @@ +<svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-rss"><path d="M4 11a9 9 0 0 1 9 9"></path><path d="M4 4a16 16 0 0 1 16 16"></path><circle cx="5" cy="19" r="1"></circle></svg>
\ No newline at end of file diff --git a/assets/svg/search.svg b/assets/svg/search.svg new file mode 100644 index 0000000..9fcd6ec --- /dev/null +++ b/assets/svg/search.svg @@ -0,0 +1,4 @@ +<svg viewBox="0 0 24 24"> + <circle cx="11" cy="11" r="8" /> + <line x1="21" y1="21" x2="16.65" y2="16.65" /> +</svg> diff --git a/assets/svg/tag.svg b/assets/svg/tag.svg new file mode 100644 index 0000000..2fbab75 --- /dev/null +++ b/assets/svg/tag.svg @@ -0,0 +1,4 @@ +<svg viewBox="0 0 24 24"> + <path d="M20.59,13.41l-7.17,7.17a2,2,0,0,1-2.83,0L2,12V2H12l8.59,8.59A2,2,0,0,1,20.59,13.41Z"/> + <line x1="7" y1="7" x2="7" y2="7"/> +</svg> diff --git a/assets/svg/telegram.svg b/assets/svg/telegram.svg new file mode 100644 index 0000000..24e14e5 --- /dev/null +++ b/assets/svg/telegram.svg @@ -0,0 +1 @@ +<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><title>Telegram icon</title><path d="M23.91 3.79L20.3 20.84c-.25 1.21-.98 1.5-2 .94l-5.5-4.07-2.66 2.57c-.3.3-.55.56-1.1.56-.72 0-.6-.27-.84-.95L6.3 13.7l-5.45-1.7c-1.18-.35-1.19-1.16.26-1.75l21.26-8.2c.97-.43 1.9.24 1.53 1.73z"/></svg>
\ No newline at end of file diff --git a/assets/svg/twitter.svg b/assets/svg/twitter.svg new file mode 100644 index 0000000..cc08797 --- /dev/null +++ b/assets/svg/twitter.svg @@ -0,0 +1,4 @@ +<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"> + <title>Twitter icon</title> + <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"></path> +</svg> diff --git a/assets/svg/x.svg b/assets/svg/x.svg new file mode 100644 index 0000000..b31a2f6 --- /dev/null +++ b/assets/svg/x.svg @@ -0,0 +1,4 @@ +<svg viewBox="0 0 24 24"> + <line x1="18" y1="6" x2="6" y2="18" /> + <line x1="6" y1="6" x2="18" y2="18" /> +</svg> diff --git a/assets/svg/youtube.svg b/assets/svg/youtube.svg new file mode 100644 index 0000000..26bdda8 --- /dev/null +++ b/assets/svg/youtube.svg @@ -0,0 +1,5 @@ +<svg role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"> + <title>YouTube icon</title> + <path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z" /> + <polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02" /> +</svg> diff --git a/layouts/partials/svg/icons.html b/layouts/partials/svg/icons.html index 8bc9d41..ce3e270 100644 --- a/layouts/partials/svg/icons.html +++ b/layouts/partials/svg/icons.html @@ -1,77 +1,4 @@ -<svg class='icon' viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'> - {{ if eq "category" . }} - <path d="M22,19a2,2,0,0,1-2,2H4a2,2,0,0,1-2-2V5A2,2,0,0,1,4,3H9l2,3h9a2,2,0,0,1,2,2Z"/> - {{ else if eq "tag" . }} - <path d="M20.59,13.41l-7.17,7.17a2,2,0,0,1-2.83,0L2,12V2H12l8.59,8.59A2,2,0,0,1,20.59,13.41Z"/> - <line x1="7" y1="7" x2="7" y2="7"/> - {{ else if eq "series" . }} - <line x1="8" y1="6" x2="21" y2="6" /> - <line x1="8" y1="12" x2="21" y2="12" /> - <line x1="8" y1="18" x2="21" y2="18" /> - <line x1="3" y1="6" x2="3" y2="6" /> - <line x1="3" y1="12" x2="3" y2="12" /> - <line x1="3" y1="18" x2="3" y2="18" /> - {{ else if eq "author" . }} - <path d="M21,21V20c0-2.76-4-5-9-5s-9,2.24-9,5v1"/> - <path d="M16,6.37A4,4,0,1,1,12.63,3,4,4,0,0,1,16,6.37Z"/> - {{ else if eq "calendar" . }} - <rect x="3" y="4" width="18" height="18" rx="2" ry="2"/> - <line x1="16" y1="2" x2="16" y2="6"/> - <line x1="8" y1="2" x2="8" y2="6"/> - <line x1="3" y1="10" x2="21" y2="10"/> - {{ else if eq "edit" . }} - <path d="M20 14.66V20a2 2 0 0 1-2 2H4a2 2 0 0 1-2-2V6a2 2 0 0 1 2-2h5.34" /> - <polygon points="18 2 22 6 12 16 8 16 8 12 18 2" /> - {{ else if eq "prev" . }} - <line x1="20" y1="12" x2="4" y2="12"/> - <polyline points="10 18 4 12 10 6"/> - {{ else if eq "next" . }} - <line x1="4" y1="12" x2="20" y2="12"/> - <polyline points="14 6 20 12 14 18"/> - {{ else if eq "x" . }} - <line x1="18" y1="6" x2="6" y2="18" /> - <line x1="6" y1="6" x2="18" y2="18" /> - {{ else if eq "menu" . }} - <line x1="3" y1="12" x2="21" y2="12" /> - <line x1="3" y1="6" x2="21" y2="6" /> - <line x1="3" y1="18" x2="21" y2="18" /> - {{ else if eq "codepen" . }} - <polygon points="12 2 22 8.5 22 15.5 12 22 2 15.5 2 8.5 12 2"/> - <line x1="12" y1="22" x2="12" y2="15.5"/> - <polyline points="22 8.5 12 15.5 2 8.5"/> - <polyline points="2 15.5 12 8.5 22 15.5"/> - <line x1="12" y1="2" x2="12" y2="8.5"/> - {{ else if eq "email" . }} - <path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/> - <polyline points="22,6 12,13 2,6"/> - {{ else if eq "facebook" . }} - <path d="M18 2h-3a5 5 0 0 0-5 5v3H7v4h3v8h4v-8h3l1-4h-4V7a1 1 0 0 1 1-1h3z"/> - {{ else if eq "github" . }} - <path d="M9 19c-5 1.5-5-2.5-7-3m14 6v-3.87a3.37 3.37 0 0 0-.94-2.61c3.14-.35 6.44-1.54 6.44-7A5.44 5.44 0 0 0 20 4.77 5.07 5.07 0 0 0 19.91 1S18.73.65 16 2.48a13.38 13.38 0 0 0-7 0C6.27.65 5.09 1 5.09 1A5.07 5.07 0 0 0 5 4.77a5.44 5.44 0 0 0-1.5 3.78c0 5.42 3.3 6.61 6.44 7A3.37 3.37 0 0 0 9 18.13V22"/> - {{ else if eq "instagram" . }} - <rect x="2" y="2" width="20" height="20" rx="5" ry="5"/> - <path d="M16 11.37A4 4 0 1 1 12.63 8 4 4 0 0 1 16 11.37z"/> - <line x1="17.5" y1="6.5" x2="17.5" y2="6.5"/> - {{ else if eq "twitter" . }} - <path d="M23 3a10.9 10.9 0 0 1-3.14 1.53 4.48 4.48 0 0 0-7.86 3v1A10.66 10.66 0 0 1 3 4s-4 9 5 13a11.64 11.64 0 0 1-7 2c9 5 20 0 20-11.5a4.5 4.5 0 0 0-.08-.83A7.72 7.72 0 0 0 23 3z"/> - {{ else if eq "clock" . }} - <circle cx="12" cy="12" r="10"/> - <polyline points="12 6 12 12 15 15"/> - {{ else if eq "linkedin" . }} - <path d="M16 8a6 6 0 0 1 6 6v7h-4v-7a2 2 0 0 0-2-2 2 2 0 0 0-2 2v7h-4v-7a6 6 0 0 1 6-6z"/> - <rect x="2" y="9" width="4" height="12"/> - <circle cx="4" cy="4" r="2"/> - {{ else if eq "telegram" . }} - <path d="m 22.05,1.577 c -0.393,-0.016 -0.784,0.08 -1.117,0.235 -0.484,0.186 -4.92,1.902 -9.41,3.64 C 9.263,6.325 7.005,7.198 5.267,7.867 3.53,8.537 2.222,9.035 2.153,9.059 c -0.46,0.16 -1.082,0.362 -1.61,0.984 -0.79581202,1.058365 0.21077405,1.964825 1.004,2.499 1.76,0.564 3.58,1.102 5.087,1.608 0.556,1.96 1.09,3.927 1.618,5.89 0.174,0.394 0.553,0.54 0.944,0.544 l -0.002,0.02 c 0,0 0.307,0.03 0.606,-0.042 0.3,-0.07 0.677,-0.244 1.02,-0.565 0.377,-0.354 1.4,-1.36 1.98,-1.928 l 4.37,3.226 0.035,0.02 c 0,0 0.484,0.34 1.192,0.388 0.354,0.024 0.82,-0.044 1.22,-0.337 0.403,-0.294 0.67,-0.767 0.795,-1.307 0.374,-1.63 2.853,-13.427 3.276,-15.38 L 23.676,4.725 C 23.972,3.625 23.863,2.617 23.18,2.02 22.838,1.723 22.444,1.593 22.05,1.576 Z"/> - {{ else if eq "google_scholar" . }} - <path d="M21.328 2.002v9.2M8.695 7.85c.014-.787-.11-2.236.28-2.89.623-1.045.856-1.39 1.797-1.989 1.953-.988 4.296.692 4.296.692.803.564 1.672 2.1 1.672 2.1l1.368-1.824-5.444-1.754-3.515 1.34L6.08 7.681m9.109 3.42s.65-.633 1.168-1.085c.461-.402.516-.714.6-.914.18-.426.268-.909.268-1.446 0-.7-.131-1.274-.388-1.735-.031-.053 0 0-.097-.157l4.588-3.762H10.32L3.672 7.85l5.023-.024c.23 1.237.619 1.575 1.019 2.222.744.719 1.13 1.194 2.215 1.194.254 0 2.6-.057 2.842-.09 0 0 .546 1.199-.133 1.71-.41.31.576 1.304.576 1.304s-5.577.831-6.523 1.427a4.13 4.13 0 0 0-1.306 1.277 3.034 3.034 0 0 0-.493 1.665c0 .502.106.955.32 1.357.214.403.493.733.84.99.345.258.744.473 1.194.649.45.174.896.297 1.342.367a8.348 8.348 0 0 0 3.41-.166 7.754 7.754 0 0 0 1.964-.807 4.28 4.28 0 0 0 1.49-1.443c.38-.609.57-1.292.57-2.049 0-.574-.116-1.096-.347-1.57a3.755 3.755 0 0 0-.847-1.164c-.335-.302-2.19-1.837-2.19-1.837"/> - {{ else if eq "gitlab" . }} - <path d="M22.65 14.39L12 22.13 1.35 14.39a.84.84 0 0 1-.3-.94l1.22-3.78 2.44-7.51A.42.42 0 0 1 4.82 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.49h8.1l2.44-7.51A.42.42 0 0 1 18.6 2a.43.43 0 0 1 .58 0 .42.42 0 0 1 .11.18l2.44 7.51L23 13.45a.84.84 0 0 1-.35.94z"/> - {{ else if eq "youtube" . }} - <path d="M22.54 6.42a2.78 2.78 0 0 0-1.94-2C18.88 4 12 4 12 4s-6.88 0-8.6.46a2.78 2.78 0 0 0-1.94 2A29 29 0 0 0 1 11.75a29 29 0 0 0 .46 5.33A2.78 2.78 0 0 0 3.4 19c1.72.46 8.6.46 8.6.46s6.88 0 8.6-.46a2.78 2.78 0 0 0 1.94-2 29 29 0 0 0 .46-5.25 29 29 0 0 0-.46-5.33z" /> - <polygon points="9.75 15.02 15.5 11.75 9.75 8.48 9.75 15.02" /> - {{ else if eq "search" . }} - <circle cx="11" cy="11" r="8" /> - <line x1="21" y1="21" x2="16.65" y2="16.65" /> - {{ end }} +<svg class='icon' xmlns='http://www.w3.org/2000/svg' viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'> + {{ $icon := print "svg/" . ".svg" | resources.Get }} + {{ $icon.Content | replaceRE `(?s)^.*<svg.*?>(.*)<\/svg>.*$` "$1" | safeHTML }} </svg> diff --git a/layouts/shortcodes/svg.html b/layouts/shortcodes/svg.html new file mode 100644 index 0000000..05a01f6 --- /dev/null +++ b/layouts/shortcodes/svg.html @@ -0,0 +1,5 @@ +{{ $svg := .Get 0 }} +<svg class='icon' viewbox='0 0 24 24' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' aria-hidden='true'> + {{ $icon := print "svg/" $svg ".svg" | resources.Get }} + {{ $icon.Content | replaceRE `(?s)^.*<svg.*?>(.*)<\/svg>.*$` "$1" | safeHTML }} +</svg> |