Skip to content

Commit 824a5db

Browse files
committed
Add a social widget
This patch adds a social widget bar on the left side of the screen
1 parent 39506f9 commit 824a5db

4 files changed

Lines changed: 71 additions & 1 deletion

File tree

_includes/socials.html

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
<nav id="widget-socials-container">
2+
<ul id="widget-socials">
3+
{%- for social in site.data.socials -%}
4+
<li>
5+
<a href="{{ social.url }}"
6+
title="{{ social.name }}"
7+
rel="me"
8+
target="_blank">
9+
{% include icons/{{ social.icon }} %}
10+
</a>
11+
</li>
12+
{%- endfor -%}
13+
</ul>
14+
</nav>

_layouts/base.html

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
{% include head.html %}
44
<body id="www-bugzilla-org" class="homepage">
55
{% include header.html %}
6+
{% include socials.html %}
67
<main>
78
{{ content }}
89
</main>

_sass/_global.scss

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,6 +157,45 @@ h4 { font-size: var(--font-size-h4) }
157157
content: ''
158158
}
159159

160+
#widget-socials-container {
161+
align-items: center;
162+
display: flex;
163+
height: 100%;
164+
left: 8px;
165+
position: fixed;
166+
z-index: 2000;
167+
}
168+
169+
#widget-socials {
170+
backdrop-filter: blur(5px);
171+
background-color: var(--widget-background-color);
172+
border: 1px solid var(--widget-border-color);
173+
border-radius: 4px;
174+
color: var(--widget-color);
175+
list-style-type: none;
176+
margin: 0;
177+
padding: 0;
178+
179+
& li {
180+
border-radius: 4px;
181+
margin: 4px;
182+
padding: 4px;
183+
184+
&:hover {
185+
background-color: var(--widget-link-hover-background-color);
186+
}
187+
188+
& a {
189+
color: var(--widget-link-color);
190+
}
191+
192+
&:hover a,
193+
& a:hover {
194+
color: var(--widget-link-hover-color);
195+
}
196+
}
197+
}
198+
160199
.dropdown:not(.show) .dropdown-menu {
161200
display: none;
162201
}
@@ -303,7 +342,7 @@ blockquote {
303342
flex-wrap: wrap;
304343
}
305344

306-
#socials li a {
345+
#socials li a {
307346
padding: 6px 2px;
308347
display: block;
309348
color: var(--application-header-foreground-color);

_sass/_variables.scss

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -124,6 +124,14 @@
124124
--disabled-control-foreground-color: rgb(160, 161, 162);
125125
--scrollbar-color: rgb(190, 191, 192) var(--application-background-color);
126126

127+
/** Social Widget */
128+
--widget-color: rgb(30, 31, 32);
129+
--widget-background-color: rgba(255, 255, 255, 0.2);
130+
--widget-link-color: rgb(30, 31, 32);
131+
--widget-link-hover-color: rgb(210, 211, 212);
132+
--widget-link-hover-background-color: rgb(var(--accent-color-blue-3));
133+
--widget-border-color: rgb(60, 61, 62);
134+
127135
/** Button */
128136
--primary-button-foreground-color: rgb(255, 255, 255);
129137
--primary-button-background-color: rgb(var(--accent-color-blue-3));
@@ -237,6 +245,14 @@
237245
--disabled-control-foreground-color: rgb(110, 111, 112);
238246
--scrollbar-color: rgb(70, 71, 72) var(--application-background-color);
239247

248+
/** Social Widget */
249+
--widget-color: rgb(255, 255, 255);
250+
--widget-background-color: rgba(30, 31, 32, 0.2);
251+
--widget-link-color: rgb(210, 211, 212);
252+
--widget-link-hover-color: rgb(30, 31, 32);
253+
--widget-link-hover-background-color: rgb(var(--accent-color-blue-1));
254+
--widget-border-color: rgb(200, 201, 202);
255+
240256
/** Button */
241257
--secondary-button-background-color: rgb(70, 71, 72);
242258
--secondary-button-border-color: rgb(70, 71, 72);

0 commit comments

Comments
 (0)