dotfiles
My PC Dotfiles & Websitegit clone https://github.com/maydayv7/dotfiles
site/templates/macros/social.html (4792B)
1{% macro socials_bar() %}
2<div class="socials-bar">
3 {%- if config.generate_feeds -%}
4 <a
5 href="{{ get_url(path=config.extra.feed_path) }}"
6 style="text-decoration: none">
7 {%- set rss_image = resize_image(path="../static/social/rss.png", width=33,
8 height=33, op="scale", format="png") -%} {%- set rss_image_2x =
9 resize_image(path="../static/social/rss.png", width=66, height=66,
10 op="scale", format="png") -%} {%- set rss_image_3x =
11 resize_image(path="../static/social/rss.png", width=99, height=99,
12 op="scale", format="png") -%}
13 <img
14 src="{{ rss_image.url }}"
15 srcset="{{ rss_image_2x.url }} 2x, {{ rss_image_3x.url }} 3x"
16 width="33"
17 height="33"
18 loading="lazy"
19 decoding="async"
20 style="display: inline"
21 alt="RSS Badge" />
22 </a>
23 {%- endif -%} {%- if config.extra.github_profile -%}
24 <a href="{{ config.extra.github_profile }}" style="text-decoration: none">
25 {%- set gh_image = resize_image(path="../static/social/github.png",
26 width=33, height=33, op="scale", format="png") -%} {%- set gh_image_2x =
27 resize_image(path="../static/social/github.png", width=66, height=66,
28 op="scale", format="png") -%} {%- set gh_image_3x =
29 resize_image(path="../static/social/github.png", width=99, height=99,
30 op="scale", format="png") -%}
31 <img
32 src="{{ gh_image.url }}"
33 srcset="{{ gh_image_2x.url }} 2x, {{ gh_image_3x.url }} 3x"
34 width="33"
35 height="33"
36 loading="lazy"
37 decoding="async"
38 style="display: inline"
39 alt="GitHub Profile Badge" />
40 </a>
41 {%- endif -%} {%- if config.extra.email -%}
42 <a href="{{ config.extra.email }}" style="text-decoration: none">
43 {%- set email_image = resize_image(path="../static/social/mail.png",
44 width=36, height=36, op="scale", format="png") -%} {%- set email_image_2x =
45 resize_image(path="../static/social/mail.png", width=72, height=72,
46 op="scale", format="png") -%} {%- set email_image_3x =
47 resize_image(path="../static/social/mail.png", width=108, height=108,
48 op="scale", format="png") -%}
49 <img
50 src="{{ email_image.url }}"
51 srcset="{{ email_image_2x.url }} 2x, {{ email_image_3x.url }} 3x"
52 width="36"
53 height="36"
54 loading="lazy"
55 decoding="async"
56 style="display: inline"
57 alt="Email Badge" />
58 </a>
59 {%- endif -%} {%- if config.extra.twitter -%}
60 <a href="{{ config.extra.twitter }}" style="text-decoration: none">
61 {%- set twitter_image = resize_image(path="../static/social/twitter.png",
62 width=33, height=33, op="scale", format="png") -%} {%- set twitter_image_2x
63 = resize_image(path="../static/social/twitter.png", width=66, height=66,
64 op="scale", format="png") -%} {%- set twitter_image_3x =
65 resize_image(path="../static/social/twitter.png", width=99, height=99,
66 op="scale", format="png") -%}
67 <img
68 src="{{ twitter_image.url }}"
69 srcset="{{ twitter_image_2x.url }} 2x, {{ twitter_image_3x.url }} 3x"
70 width="33"
71 height="33"
72 loading="lazy"
73 decoding="async"
74 style="display: inline"
75 alt="Twitter Badge" />
76 </a>
77 {%- endif -%} {%- if config.extra.reddit_profile -%}
78 <a href="{{ config.extra.reddit_profile }}" style="text-decoration: none">
79 {%- set reddit_image = resize_image(path="../static/social/reddit.png",
80 width=33, height=33, op="scale", format="png") -%} {%- set reddit_image_2x =
81 resize_image(path="../static/social/reddit.png", width=66, height=66,
82 op="scale", format="png") -%} {%- set reddit_image_3x =
83 resize_image(path="../static/social/reddit.png", width=99, height=99,
84 op="scale", format="png") -%}
85 <img
86 src="{{ reddit_image.url }}"
87 srcset="{{ reddit_image_2x.url }} 2x, {{ reddit_image_3x.url }} 3x"
88 width="33"
89 height="33"
90 loading="lazy"
91 decoding="async"
92 style="display: inline"
93 alt="Reddit Badge" />
94 </a>
95 {%- endif -%} {%- if config.extra.discord_profile -%}
96 <a href="{{ config.extra.discord_profile }}" style="text-decoration: none">
97 {%- set discord_image = resize_image(path="../static/social/discord.png",
98 width=39, height=39, op="scale", format="png") -%} {%- set discord_image_2x
99 = resize_image(path="../static/social/discord.png", width=78, height=78,
100 op="scale", format="png") -%} {%- set discord_image_3x =
101 resize_image(path="../static/social/discord.png", width=117, height=117,
102 op="scale", format="png") -%}
103 <img
104 src="{{ discord_image.url }}"
105 srcset="{{ discord_image_2x.url }} 2x, {{ discord_image_3x.url }} 3x"
106 width="39"
107 height="39"
108 loading="lazy"
109 decoding="async"
110 style="display: inline"
111 alt="Discord Badge" />
112 </a>
113 {%- endif -%}
114</div>
115{% endmacro socials_bar %}