aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authors-ol <s-ol@users.noreply.github.com>2018-10-28 04:20:37 +0000
committers-ol <s-ol@users.noreply.github.com>2018-10-28 04:20:37 +0000
commitfeeba0b20d363da328e4921f99de77f2fff48d67 (patch)
tree328e25744f0ec6d66c9c7a67b6ddc946d517f38a
parentcategories on main page (diff)
downloadmmm-feeba0b20d363da328e4921f99de77f2fff48d67.tar.gz
mmm-feeba0b20d363da328e4921f99de77f2fff48d67.zip
add some icons
-rw-r--r--app/init.moon24
-rw-r--r--scss/main.scss13
2 files changed, 26 insertions, 11 deletions
diff --git a/app/init.moon b/app/init.moon
index 20029cc..5d5f18a 100644
--- a/app/init.moon
+++ b/app/init.moon
@@ -84,7 +84,7 @@ index = {
route: ''
dest: 'index.html'
render: =>
- import h1, h3, b, p, a, br, ul, tt, li, img from require 'lib.html'
+ import h1, h3, div, b, p, a, br, ul, tt, li, img from require 'lib.html'
import opairs from require 'lib.ordered'
moon = '\xe2\x98\xbd'
@@ -92,6 +92,13 @@ index = {
-- redirects for old-style URIs
on_client patch_redirs
+ iconlink = (href, src, alt, style) -> a {
+ class: 'iconlink',
+ :href,
+ target: '_blank',
+ img :src, :alt, :style
+ }
+
-- menu
append h1 {
style: {
@@ -99,15 +106,12 @@ index = {
'border-bottom': '1px solid #000'
},
'mmm',
- a {
- style: {
- position: 'absolute',
- top: '2px',
- right: '0',
- },
- href: 'https://webring.xxiivv.com/#random',
- target: '_blank',
- img src: 'https://webring.xxiivv.com/icon.black.svg', alt: 'webring', style: { height: '1em' }
+ div {
+ class: 'icons',
+ iconlink 'https://github.com/s-ol/mmm', 'https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/github.svg',
+ iconlink 'https://twitter.com/S0lll0s', 'https://cdn.jsdelivr.net/npm/simple-icons@latest/icons/twitter.svg',
+ iconlink 'https://webring.xxiivv.com/#random', 'https://webring.xxiivv.com/icon.black.svg', 'webring',
+ { height: '0.9em', 'margin-left': '.04em' }
}
}
diff --git a/scss/main.scss b/scss/main.scss
index 169dc1e..ff80fc0 100644
--- a/scss/main.scss
+++ b/scss/main.scss
@@ -46,4 +46,15 @@ pre {
padding: 1em;
white-space: pre-wrap;
margin: 0 2em;
-} \ No newline at end of file
+}
+
+h1 .icons {
+ display: inline-flex;
+ float: right;
+
+ .iconlink > img {
+ height: 0.7em;
+ margin-left: 0.2em;
+ vertical-align: middle;
+ }
+}