From 19f458bebd440cd301f8b2c3dabe8d4b55dfcaf7 Mon Sep 17 00:00:00 2001 From: Talha Mansoor Date: Mon, 12 Aug 2019 10:38:29 +0500 Subject: [PATCH] feat(social): use svg icons instead of font-awesome BREAKING CHANGE: Style customization and configuration of social icons in the sidebar has changed. New icons have better colors and bigger sizes. --- static/css/elegant.css | 70 +++--------------- templates/_includes/social_links.html | 100 +++++++++++++++++++------- 2 files changed, 82 insertions(+), 88 deletions(-) diff --git a/static/css/elegant.css b/static/css/elegant.css index cfd8c77f..0def9d2b 100644 --- a/static/css/elegant.css +++ b/static/css/elegant.css @@ -295,69 +295,17 @@ ul.articles-timeline .previous-article { float: left; margin: 0; } -i.sidebar-social-links { - border-radius: 20%; - border: solid transparent 1px; - color: #a2a2a2; - font-size: 1.3em; - margin: 0; - padding: 1px; - text-align: center; - text-decoration: none; - width: 12%; -} -i.sidebar-social-links:hover { - background-color: #a2a2a2; - color: #fff; -} -i.fa-twitter:hover, -i.fa-twitter-square:hover { - background-color: #00aced; -} -i.fa-facebook:hover, -i.fa-facebook-square:hover { - background-color: #3b5998; -} -i.fa-google-plus:hover, -i.fa-google-plus-square:hover { - background-color: #d34836; -} -i.fa-adn:hover { - background-color: #49484d; +div#sidebar-social-link a svg { + filter: saturate(0%) brightness(0.7); + height: 35px; + width: 35px; + margin-right: 4px; } -i.fa-envelope:hover { - background-color: #5e9eda; -} -i.fa-github:hover, -i.fa-github-square:hover, -i.fa-github-alt:hover { - background-color: #000; -} -i.fa-flickr:hover { - background-color: #ff0084; -} -i.fa-youtube:hover, -i.fa-youtube-square:hover, -i.fa-youtube-play:hover { - background-color: #bc272f; -} -i.fa-linkedin:hover, -i.fa-linkedin-square:hover { - background-color: #107fb9; -} -i.fa-gittip:hover { - background-color: #663300; -} -i.fa-rss:hover, -i.fa-rss-square:hover { - background-color: #ff6600; -} -i.fa-bitbucket:hover, -i.fa-bitbucket-square:hover { - background-color: #205081; +div#sidebar-social-link a { + text-decoration: none; } -i.fa-stack-exchange:hover { - background-color: #3a7bc8; +div#sidebar-social-link a svg:hover { + filter: none; } ul.multi-parts-list a { color: black; diff --git a/templates/_includes/social_links.html b/templates/_includes/social_links.html index ccd9343e..8146594e 100644 --- a/templates/_includes/social_links.html +++ b/templates/_includes/social_links.html @@ -1,32 +1,78 @@ {% if SOCIAL %} {% from '_includes/_defaults.html' import SOCIAL_PROFILE_LABEL with context %}

{{ SOCIAL_PROFILE_LABEL }}

-{% for entry in SOCIAL %} -{% set f_entry = [] %} - {%for item in entry %} - {# first is for name #} - {% if loop.first %} - {% set link_title = 'My ' + item + ' Profile' %} - {% set link_icon = item.lower() %} - {% if item.lower() == 'email' %} - {% set link_title = 'My ' + item + ' Address' %} - {% set link_icon = 'envelope' %} - {% elif item.lower() == 'rss' %} - {% set link_title = 'Subscribe in a reader' %} - {% set link_icon = 'rss' %} - {% endif %} - {% if f_entry.insert(0, link_title) %}{% endif %} - {% if f_entry.insert(1, link_icon) %}{% endif %} - {% elif loop.index0 == 1 %} - {% set url = item|e %} - {% if f_entry.insert(2, url) %}{% endif %} - {% elif loop.index0 == 2 %} - {% set link_icon = item.lower() %} - {% if f_entry.pop(1) %}{% endif %} - {% if f_entry.insert(1, link_icon) %}{% endif %} - {% endif %} + {% endif %}