From 12dc1153c9b0c430b9e64e0fa025bac3cc10fff1 Mon Sep 17 00:00:00 2001 From: SamuelmdLow Date: Wed, 20 Nov 2024 10:57:53 +0000 Subject: [PATCH] Add bluesky in sharebar cause spencer asked (even though I wish that the faux decentralized network never existed lmao), restyled captions cause I thought the femme captions I did looked good --- .../templates/article/objects/share_bar.html | 5 +++ ubyssey/static_src/src/js/main.js | 5 +++ .../static_src/src/styles/modules/_core.scss | 6 ++- .../src/styles/modules/article/_banner.scss | 4 ++ .../src/styles/modules/article/_base.scss | 39 ++++++++++++------- .../styles/modules/article/_full_width.scss | 6 +-- 6 files changed, 44 insertions(+), 21 deletions(-) diff --git a/article/templates/article/objects/share_bar.html b/article/templates/article/objects/share_bar.html index e12ae05ce..554c8914d 100644 --- a/article/templates/article/objects/share_bar.html +++ b/article/templates/article/objects/share_bar.html @@ -4,6 +4,11 @@ copied! + + + + + diff --git a/ubyssey/static_src/src/js/main.js b/ubyssey/static_src/src/js/main.js index 75510bcd6..91b337792 100644 --- a/ubyssey/static_src/src/js/main.js +++ b/ubyssey/static_src/src/js/main.js @@ -305,6 +305,11 @@ function initializeSocialMediaActions() { 'height=450, width=550, top=' + ($(window).height() / 2 - 225) + ', left=' + ($(window).width() / 2 - 225) + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0'); }); + $(document).on('click', '.share-bsky', function (e) { + e.preventDefault(); + window.open('https://bsky.app/intent/compose/?text=' + title + '%20' + window.location.href + ' #ubyssey', + 'height=450, width=550, top=' + ($(window).height() / 2 - 225) + ', left=' + ($(window).width() / 2 - 225) + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0'); + }); // on clicking on the a element w/ class=='twitter', share on twitter $(document).on('click', '.share-twitter', function (e) { diff --git a/ubyssey/static_src/src/styles/modules/_core.scss b/ubyssey/static_src/src/styles/modules/_core.scss index f085abf57..d438f9ec7 100644 --- a/ubyssey/static_src/src/styles/modules/_core.scss +++ b/ubyssey/static_src/src/styles/modules/_core.scss @@ -238,7 +238,7 @@ html[color-css-theme="light"] { --text_color: #1b1b1b; --header_color: black; --article_info: #777777; - --article_caption: #5A5A5A; + --article_caption: #{$color-ubyssey-blue-dark-3}; --authors-title-bio: #1B1B1B; --archive-text: #4e4e4e; --article-publish: #2B2B2B; @@ -322,9 +322,11 @@ div.image-inner { } span.credit { + display: inline-block; margin-left: 0.5em; font-style: italic; - color: #888; + font-size: 0.9em; + color: $color-ubyssey-blue; } img.slide-image { diff --git a/ubyssey/static_src/src/styles/modules/article/_banner.scss b/ubyssey/static_src/src/styles/modules/article/_banner.scss index c5f7e740f..51af0fbcf 100644 --- a/ubyssey/static_src/src/styles/modules/article/_banner.scss +++ b/ubyssey/static_src/src/styles/modules/article/_banner.scss @@ -43,6 +43,10 @@ font-family: $font-body; } + + div.caption { + border: none; + } // article // article headers (title, byline and photo) diff --git a/ubyssey/static_src/src/styles/modules/article/_base.scss b/ubyssey/static_src/src/styles/modules/article/_base.scss index b388b9d70..223859757 100644 --- a/ubyssey/static_src/src/styles/modules/article/_base.scss +++ b/ubyssey/static_src/src/styles/modules/article/_base.scss @@ -216,12 +216,9 @@ div.article-content { div.caption { margin-bottom: 0; - padding-left: 10px; - padding-right: 10px; } > p, - div.caption, > h1, > h2, > h3, @@ -338,17 +335,17 @@ div.article-content { } div.caption { - margin-top: 6px; - font-family: $font-default; + margin-inline: 1em; + padding-block: 1em 0.5em; + padding-inline: 1em; + border-bottom: 2px solid $color-ubyssey-blue; + font-size: 15px; - color: var(--article_caption); line-height: 19px; - padding-left: 15px; - padding-right: 15px; - @media($bp-larger-than-phablet) { - padding: 0; - } + color: var(--article_caption); + font-style: italic; + font-family: $font-default; } div.article-content { @@ -437,9 +434,21 @@ p.c-article__published-at { font-family: $font-default; font-weight: 600; - span.c-share-buttons > a{ - padding: 0px 4px 10px 4px; - color: var(--text_color); - border: none; + .share-bsky svg { + vertical-align: initial; + padding-top: 0.15em; + height: 1em; + width: auto; + fill: var(--text_color); + } + + span.c-share-buttons { + display: inline-block; + + > a{ + padding: 0px 4px 10px 4px; + color: var(--text_color); + border: none; + } } } \ No newline at end of file diff --git a/ubyssey/static_src/src/styles/modules/article/_full_width.scss b/ubyssey/static_src/src/styles/modules/article/_full_width.scss index f8d8902c9..3c64bee53 100644 --- a/ubyssey/static_src/src/styles/modules/article/_full_width.scss +++ b/ubyssey/static_src/src/styles/modules/article/_full_width.scss @@ -7,13 +7,11 @@ > p, > h1, > h2 { - padding-left: 1em; - padding-right: 1em; + padding-inline: 1em; } div.caption { - padding-left: 1em; - padding-right: 1em; + padding-inline: 1em; } } }