From 271b9f4125cc60a0d70ebc0465944d7bcc1e59ed Mon Sep 17 00:00:00 2001 From: Marcel Schneider Date: Tue, 14 Apr 2020 19:35:21 +0200 Subject: [PATCH] use simple svg social icons --- assets/css/style.css | 39 +++++++++--------------------------- layouts/partials/social.html | 4 +--- static/fonts/gitea.svg | 1 + static/fonts/github.svg | 1 + static/fonts/gitlab.svg | 1 + static/fonts/mastodon.svg | 1 + static/fonts/twitter.svg | 1 + 7 files changed, 15 insertions(+), 33 deletions(-) create mode 100644 static/fonts/gitea.svg create mode 100644 static/fonts/github.svg create mode 100644 static/fonts/gitlab.svg create mode 100644 static/fonts/mastodon.svg create mode 100644 static/fonts/twitter.svg diff --git a/assets/css/style.css b/assets/css/style.css index 9fdd213..547a729 100644 --- a/assets/css/style.css +++ b/assets/css/style.css @@ -20,36 +20,15 @@ html,body,div,span,applet,object,iframe,h1,h2,h3,h4,h5,h6,p,blockquote,pre,a,abb } /* Icons */ -@font-face { - font-family: 'icons'; - src: url('../fonts/icons.eot'); - src: url('../fonts/icons.eot#iefix') format('embedded-opentype'), - url('../fonts/icons.woff') format('woff'), - url('../fonts/icons.ttf') format('truetype'), - url('../fonts/icons.svg#icons') format('svg'); - font-weight: normal; - font-style: normal; -} - -[class^="icon-"]:before, [class*=" icon-"]:before { - font-family: "icons"; - font-style: normal; - font-weight: normal; - speak: none; - display: inline-block; - text-decoration: inherit; - text-align: center; - font-variant: normal; - text-transform: none; - line-height: 1em; -} -.icon-facebook:before { content: '\e802'; } -.icon-facebook-squared:before { content: '\e800'; } -.icon-twitter:before { content: '\e801'; } -.icon-twitter-1:before { content: '\e804'; } -.icon-facebook-circled:before { content: '\e805'; } -.icon-twitter-circled:before { content: '\e806'; } -.icon-facebook-rect:before { content: '\e803'; } +[class^="icon-"], [class*=" icon-"] { + width:1em; + height:1em; +} +.icon-mastodon { background-image: url("/fonts/mastodon.svg"); } +.icon-twitter { background-image: url("/fonts/twitter.svg"); } +.icon-github { background-image: url("/fonts/github.svg"); } +.icon-gitlab { background-image: url("/fonts/gitlab.svg"); } +.icon-gitea { background-image: url("/fonts/gitea.svg"); } /* Spacing */ .post h1, h3, h4, h5, p, .post-body ul, pre { diff --git a/layouts/partials/social.html b/layouts/partials/social.html index 0517dae..5a7e8e9 100644 --- a/layouts/partials/social.html +++ b/layouts/partials/social.html @@ -1,8 +1,6 @@
- {{ $iconStyle := .Site.Params.socialIconStyle }} {{ range $key, $val := .Site.Social }} - - {{ $iconStyle }}{{ if eq $key "twitter" }}twitterbird{{ else }}{{ $key }}{{ end }} + {{ end }}
diff --git a/static/fonts/gitea.svg b/static/fonts/gitea.svg new file mode 100644 index 0000000..0fd0e0b --- /dev/null +++ b/static/fonts/gitea.svg @@ -0,0 +1 @@ +Gitea icon \ No newline at end of file diff --git a/static/fonts/github.svg b/static/fonts/github.svg new file mode 100644 index 0000000..3899712 --- /dev/null +++ b/static/fonts/github.svg @@ -0,0 +1 @@ +GitHub icon \ No newline at end of file diff --git a/static/fonts/gitlab.svg b/static/fonts/gitlab.svg new file mode 100644 index 0000000..53dfcb0 --- /dev/null +++ b/static/fonts/gitlab.svg @@ -0,0 +1 @@ +GitLab icon diff --git a/static/fonts/mastodon.svg b/static/fonts/mastodon.svg new file mode 100644 index 0000000..79e1d80 --- /dev/null +++ b/static/fonts/mastodon.svg @@ -0,0 +1 @@ +Mastodon icon \ No newline at end of file diff --git a/static/fonts/twitter.svg b/static/fonts/twitter.svg new file mode 100644 index 0000000..af5b7c3 --- /dev/null +++ b/static/fonts/twitter.svg @@ -0,0 +1 @@ +Twitter icon \ No newline at end of file