Skip to content

Commit

Permalink
Add bluesky in sharebar cause spencer asked (even though I wish that …
Browse files Browse the repository at this point in the history
…the faux decentralized network never existed lmao), restyled captions cause I thought the femme captions I did looked good
  • Loading branch information
SamuelmdLow committed Nov 20, 2024
1 parent 2eb2f5d commit 12dc115
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 21 deletions.
5 changes: 5 additions & 0 deletions article/templates/article/objects/share_bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
<a href="#" class="share-link c-share_space" title="Copy Link to Clipboard"><ion-icon name="link" aria-hidden="true"></ion-icon><span id="custom-tooltip">copied!</span></i></a>
<a href="#" class="share-mastodon c-share_space" title="Share to Mastodon"><ion-icon name="logo-mastodon" aria-hidden="true"></ion-icon></i></a>
<a href="#" class="share-facebook c-share_space" title="Share to Facebook"><ion-icon name="logo-facebook" aria-hidden="true"></ion-icon></i></a>
<a href="#" class="share-bsky c-share_space" title="Share to Bluesky">
<svg viewBox="0 0 600 530" version="1.1" xmlns="http://www.w3.org/2000/svg">
<path 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.3797-3.6904-10.832-3.7077-7.8964-0.0174-2.9357-1.1937 0.51669-3.7077 7.8964-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.4491-163.25-81.433-5.9562-21.282-16.111-152.36-16.111-170.07 0-88.687 77.742-60.816 125.72-24.795z"/>
</svg>
</a>
<a href="#" class="share-twitter c-share_space" title="Share to Twitter"><ion-icon name="logo-twitter" aria-hidden="true"></ion-icon></i></a>
<a href="#" class="share-reddit c-share_space" title="Share to Reddit"><ion-icon name="logo-reddit" aria-hidden="true"></ion-icon></i></a>
</span>
Expand Down
5 changes: 5 additions & 0 deletions ubyssey/static_src/src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
6 changes: 4 additions & 2 deletions ubyssey/static_src/src/styles/modules/_core.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -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 {
Expand Down
4 changes: 4 additions & 0 deletions ubyssey/static_src/src/styles/modules/article/_banner.scss
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,10 @@
font-family: $font-body;
}


div.caption {
border: none;
}
// article

// article headers (title, byline and photo)
Expand Down
39 changes: 24 additions & 15 deletions ubyssey/static_src/src/styles/modules/article/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -216,12 +216,9 @@ div.article-content {

div.caption {
margin-bottom: 0;
padding-left: 10px;
padding-right: 10px;
}

> p,
div.caption,
> h1,
> h2,
> h3,
Expand Down Expand Up @@ -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 {
Expand Down Expand Up @@ -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;
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}
}
Expand Down

0 comments on commit 12dc115

Please sign in to comment.