Skip to content

Commit 160460f

Browse files
authored
Merge pull request #18 from ubc-web-services/dev
Add Bluesy option to unit social footer links
2 parents 5f5caf6 + 95e12d1 commit 160460f

File tree

4 files changed

+28
-2
lines changed

4 files changed

+28
-2
lines changed

kraken.theme

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -378,6 +378,7 @@ function kraken_preprocess_page(&$variables)
378378
// Unit Social media options.
379379
$variables['unit_facebook_option'] = theme_get_setting('unit_social_facebook');
380380
$variables['unit_instagram_option'] = theme_get_setting('unit_social_instagram');
381+
$variables['unit_bluesky_option'] = theme_get_setting('unit_social_bluesky');
381382
$variables['unit_linkedin_option'] = theme_get_setting('unit_social_linkedin');
382383
$variables['unit_spotify_option'] = theme_get_setting('unit_social_spotify');
383384
$variables['unit_twitter_option'] = theme_get_setting('unit_social_twitter');

templates/includes/footer.unit.html.twig

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
{% set instagram_attributes = create_attribute() %}
55
{% set youtube_attributes = create_attribute() %}
66
{% set linkedin_attributes = create_attribute() %}
7+
{% set bluesky_attributes = create_attribute() %}
78

89
{% if footer_color == "gold" %}
910
{%
@@ -60,7 +61,7 @@
6061
</address>
6162
</div>
6263
<div class="col-span-12 md--text-right md--col-span-7 md--row-span-1">{{ page.unit_footer_menu }}</div>
63-
{% if unit_facebook_option or unit_twitter_option or unit_youtube_option or unit_linkedin_option or unit_instagram_option %}
64+
{% if unit_facebook_option or unit_twitter_option or unit_youtube_option or unit_linkedin_option or unit_instagram_option or unit_bluesky_option %}
6465
<nav class="col-span-12 md--col-span-7 md--row-span-1 md--text-right">
6566
<ul class="flex flex-wrap justify-start pl-0 my-0 list-none md--justify-end">
6667
{% if unit_facebook_option %}
@@ -93,6 +94,16 @@
9394
</a>
9495
</li>
9596
{% endif %}
97+
{% if unit_bluesky_option %}
98+
<li>
99+
<a href="{{ unit_bluesky_option }}" class="block pr-3 text-xs no-underline">
100+
<span class="sr-only">Bluesky</span>
101+
<svg{{ bluesky_attributes.addClass(social_classes).setAttribute('role', 'presentation') }}>
102+
<use xlink:href="#icon-bluesky"></use>
103+
</svg>
104+
</a>
105+
</li>
106+
{% endif %}
96107
{% if unit_spotify_option %}
97108
<li>
98109
<a href="{{ unit_spotify_option }}" class="block pr-3 text-xs no-underline">

templates/includes/svg.html.twig

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,11 @@
2626
<path d="M16.7574 20.2426L21 16L16.7574 11.7574" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
2727
<path d="M11 16H21" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"></path>
2828
</symbol>
29+
<symbol id="icon-bluesky" viewBox="0 0 600 530" aria-labelledby="title-icon-bluesky" aria-describedby="description-icon-bluesky" role="img">
30+
<title id="title-icon-bluesky">Bluesky</title>
31+
<desc id="description-icon-bluesky">The logo for the Bluesky social media service.</desc>
32+
<path fill="currentColor" d="M135.72,44.03c66.496,49.921,138.02,151.14,164.28,205.46,26.262-54.316,97.782-155.54,164.28-205.46,47.98-36.021,125.72-63.892,125.72,24.795,0,17.712-10.155,148.79-16.111,170.07-20.703,73.984-96.144,92.854-163.25,81.433,117.3,19.964,147.14,86.092,82.697,152.22-122.39,125.59-175.91-31.511-189.63-71.766-2.514-7.38-3.69-10.832-3.708-7.896-.017-2.936-1.194.517-3.708,7.896-13.714,40.255-67.233,197.36-189.63,71.766-64.444-66.128-34.605-132.26,82.697-152.22-67.108,11.421-142.55-7.449-163.25-81.433-5.956-21.282-16.111-152.36-16.111-170.07,0-88.687,77.742-60.816,125.72-24.795h.003Z"></path>
33+
</symbol>
2934
<symbol id="icon-bookmark" viewbox="0 0 32 32" aria-labelledby="title-icon-bookmark" aria-describedby="description-icon-bookmark" role="img">
3035
<title id="title-icon-bookmark">A bookmark</title>
3136
<desc id="description-icon-bookmark">An ribbon to indicate a special marker.</desc>

theme-settings.php

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -546,13 +546,22 @@ function kraken_form_system_theme_settings_alter(&$form, FormStateInterface &$fo
546546

547547
$form['unitsocial']['unit_social_twitter'] = [
548548
'#type' => 'textfield',
549-
'#title' => t('Twitter Account Link'),
549+
'#title' => t('X (Twitter) Account Link'),
550550
'#default_value' => theme_get_setting('unit_social_twitter'),
551551
'#size' => 60,
552552
'#maxlength' => 128,
553553
'#description' => t('Format of https://www.xyz.com'),
554554
];
555555

556+
$form['unitsocial']['unit_social_bluesky'] = [
557+
'#type' => 'textfield',
558+
'#title' => t('Bluesky Account Link'),
559+
'#default_value' => theme_get_setting('unit_social_bluesky'),
560+
'#size' => 60,
561+
'#maxlength' => 128,
562+
'#description' => t('Format of https://www.xyz.com'),
563+
];
564+
556565
$form['unitsocial']['unit_social_instagram'] = [
557566
'#type' => 'textfield',
558567
'#title' => t('Instagram Account Link'),

0 commit comments

Comments
 (0)