From e6e7494bdcfbc48139dc38ea7219022e3d4ec6c1 Mon Sep 17 00:00:00 2001 From: codecalm Date: Thu, 27 Feb 2020 18:41:35 +0100 Subject: icon preview --- _config.yml | 3 ++ _icons/a.md | 1 - _icons/activity.txt | 1 - _icons/alert-circle.svg | 1 - _icons/arrow-left-circle.svg | 1 - _icons/arrow-left.svg | 6 ++++ _icons/arrow-right.svg | 6 ++++ _includes/icon.html | 6 ++++ assets/bg.svg | 18 +++++++++++ assets/style.scss | 75 ++++++++++++++++++++++++++++++++++++++++++++ index.html | 22 +++++++++---- style.scss | 6 ---- 12 files changed, 130 insertions(+), 16 deletions(-) delete mode 100644 _icons/a.md delete mode 100644 _icons/activity.txt delete mode 100644 _icons/alert-circle.svg delete mode 100644 _icons/arrow-left-circle.svg create mode 100644 _icons/arrow-left.svg create mode 100644 _icons/arrow-right.svg create mode 100644 _includes/icon.html create mode 100644 assets/bg.svg create mode 100644 assets/style.scss delete mode 100644 style.scss diff --git a/_config.yml b/_config.yml index c6735ab..f5b429c 100644 --- a/_config.yml +++ b/_config.yml @@ -1,3 +1,6 @@ +exclude: + - .idea/* + collections: icons: output: true diff --git a/_icons/a.md b/_icons/a.md deleted file mode 100644 index 5ccaff4..0000000 --- a/_icons/a.md +++ /dev/null @@ -1 +0,0 @@ -sdfsd diff --git a/_icons/activity.txt b/_icons/activity.txt deleted file mode 100644 index 669a57a..0000000 --- a/_icons/activity.txt +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/_icons/alert-circle.svg b/_icons/alert-circle.svg deleted file mode 100644 index 8d02b7d..0000000 --- a/_icons/alert-circle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/_icons/arrow-left-circle.svg b/_icons/arrow-left-circle.svg deleted file mode 100644 index 3b19ff8..0000000 --- a/_icons/arrow-left-circle.svg +++ /dev/null @@ -1 +0,0 @@ - \ No newline at end of file diff --git a/_icons/arrow-left.svg b/_icons/arrow-left.svg new file mode 100644 index 0000000..59e7ba1 --- /dev/null +++ b/_icons/arrow-left.svg @@ -0,0 +1,6 @@ +--- +--- + + + + diff --git a/_icons/arrow-right.svg b/_icons/arrow-right.svg new file mode 100644 index 0000000..59e7ba1 --- /dev/null +++ b/_icons/arrow-right.svg @@ -0,0 +1,6 @@ +--- +--- + + + + diff --git a/_includes/icon.html b/_includes/icon.html new file mode 100644 index 0000000..fe6b02e --- /dev/null +++ b/_includes/icon.html @@ -0,0 +1,6 @@ +{% assign name = include.name %} +{% assign icon = site.icons | where: "slug", name | first %} + +{% assign content = icon.content | replace: ' + + + + + + + + + + {% for i in (1..24) %} + + + {% endfor %} + + diff --git a/assets/style.scss b/assets/style.scss new file mode 100644 index 0000000..61fed5f --- /dev/null +++ b/assets/style.scss @@ -0,0 +1,75 @@ +--- +--- +html { + font-size: 16px; + font-family: system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji; +} + +body { + background: #fafbfc; + font-size: 1rem; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; +} + +.container { + max-width: 50rem; + margin: 0 auto; + padding: 1rem +} + +.box { + padding: 2rem; + background: #ffff; + box-shadow: 0 0 0 1px rgba(0,0,0,.05), 0 1px 1px rgba(0,0,0,.1); +} + +.icon-preview-wrap { + margin-bottom: 3rem; + position: relative; + + &:before { + content: ''; + padding-top: 100%; + display: block; + } +} + +.icon-preview { + position: absolute; + width: 100%; + height: 100%; + top: 0; + left: 0; + right: 0; + bottom: 0; + background: url(bg.svg) no-repeat center/100%; + + svg { + width: 100%; + height: 100%; + stroke-width: 2; + opacity: .8; + } +} + + +.icons-list { + display: flex; + margin: -1rem; + + .icon { + display: block; + margin: .5rem; + width: 1.5rem; + height: 1.5rem; + } + + svg { + display: block; + width: 100%; + height: 100%; + stroke-width: 2; + } +} + diff --git a/index.html b/index.html index a9983a9..45cbb94 100644 --- a/index.html +++ b/index.html @@ -8,16 +8,26 @@ content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0"> - + Tabler Icons
-
    - {% for icon in site.icons %} -
  • {{ icon }}
  • - {% endfor %} -
+
+
+
+ {% include icon.html name="arrow-left" %} +
+
+
+ {% for icon in site.icons %} +
+ {% assign name = icon.slug %} + {% include icon.html name=name %} +
+ {% endfor %} +
+
diff --git a/style.scss b/style.scss deleted file mode 100644 index d58d49d..0000000 --- a/style.scss +++ /dev/null @@ -1,6 +0,0 @@ ---- ---- - -body { - color: red; -} -- cgit v1.2.1