Skip to content

Commit

Permalink
Reduce padding on coverstory headline, add bluesky to main nav and fo…
Browse files Browse the repository at this point in the history
…oter, remove tiktok cause it got banned, lazy loading to sidebar image, move via in bluesky sharing link, add id to authors page media link the window scrolls to results when you change media
  • Loading branch information
SamuelmdLow committed Nov 22, 2024
1 parent ee3f3a3 commit 0c93798
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 10 deletions.
4 changes: 2 additions & 2 deletions authors/templates/authors/author_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ <h2 class="author-heading">Pinned</h2>
</div>
{% endif %}

<div class="options">
<div class="options" id="results">
{% for type in media_types %}
<h2 class="author-heading {% if media_type == type.0 %}selected{% endif %}"><a href="/authors/{{self.slug}}/{{type.0}}/">{{type.1}}</a></h2>
<h2 class="author-heading {% if media_type == type.0 %}selected{% endif %}"><a href="/authors/{{self.slug}}/{{type.0}}/#results">{{type.1}}</a></h2>
{% endfor %}
</div>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{% if self.link %}
<a href={{ self.link }}>
{% endif %}
{% image self.image width-700 format-webp alt=self.alt_text title=self.alt_text %}
{% image self.image width-700 format-webp loading='lazy' alt=self.alt_text title=self.alt_text %}
{% if self.link %}
</a>
{% endif %}
4 changes: 3 additions & 1 deletion navigation/templates/navigation/footer.html
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,12 @@ <h3>Stay in the loop</h3>
<div class="footer-links-section">
<h3>Social media</h3>
<ul>
<li><a href="https://bsky.app/profile/ubyssey.bsky.social" target="_blank" title="The Ubyssey on Bluesky">Bluesky</a></li>
<li><a href="https://www.instagram.com/ubyssey/" target="_blank" title="The Ubyssey on Instagram">Instagram</a></li>
<li><a href="https://www.tiktok.com/@ubyssey" target="_blank" title="The Ubyssey on Tiktok">TikTok</a></li>
<li><a href="https://twitter.com/Ubyssey" target="_blank" title="The Ubyssey on Twitter">Twitter</a></li>
<li><a href="https://www.facebook.com/ubyssey" target="_blank" title="The Ubyssey on Facebook">Facebook</a></li>
<li><a href="https://twitter.com/Ubyssey" target="_blank" title="The Ubyssey on Twitter">Twitter</a></li>

</ul>
</div>
<div class="footer-links-section">
Expand Down
9 changes: 7 additions & 2 deletions navigation/templates/navigation/headers/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,15 @@
<div>
<a class = "rss-icon" href="/rss" target="_blank" title="The Ubyssey rss feed"><ion-icon name="logo-rss"></ion-icon></a>

<a class="bluesky-icon" href="https://bsky.app/profile/ubyssey.bsky.social" target="_blank" title="The Ubyssey on 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 class = "facebook-icon" href="https://www.facebook.com/ubyssey" target="_blank" title="The Ubyssey on Facebook"><ion-icon name="logo-facebook"></ion-icon></a>
<a class = "instagram-icon" href="https://www.instagram.com/ubyssey/" target="_blank" title="The Ubyssey on Instagram"><ion-icon name="logo-instagram"></ion-icon></a>
<a class = "tiktok-icon" href="https://www.tiktok.com/@ubyssey" target="_blank" title="The Ubyssey on Tiktok"><ion-icon name="logo-tiktok"></ion-icon></a>
<a class = "twitter-icon" href="https://twitter.com/Ubyssey" target="_blank" title="The Ubyssey on Twitter"><ion-icon name="logo-twitter"></ion-icon></a>
<a class = "facebook-icon" href="https://www.facebook.com/ubyssey" target="_blank" title="The Ubyssey on Facebook"><ion-icon name="logo-facebook"></ion-icon></a>

{% include 'article/objects/darkmode_button.html' with id="main"%}
</div>
Expand Down
6 changes: 3 additions & 3 deletions ubyssey/static_src/src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,20 +301,20 @@ function initializeSocialMediaActions() {

$(document).on('click', '.share-mastodon', function (e) {
e.preventDefault();
window.open('https://tootpick.org/#text=' + title + '%20' + window.location.href + ' #ubyssey',
window.open('https://tootpick.org/#text=' + title + '%20' + window.location.href + '%20#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');
});

$(document).on('click', '.share-bsky', function (e) {
e.preventDefault();
window.open('https://bsky.app/intent/compose/?text=' + title + '%20' + window.location.href + '%20via%[email protected]',
window.open('https://bsky.app/intent/compose/?text=' + title + '%20%20via%[email protected]%20' + window.location.href,
'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) {
e.preventDefault();
window.open('http://twitter.com/share?url=' + window.location.href + '&text=' + title + ' via @ubyssey &', 'twitterwindow',
window.open('http://twitter.com/share?url=' + window.location.href + '&text=' + title + '%20via%20@ubyssey&', 'twitterwindow',
'height=450, width=550, top=' + ($(window).height() / 2 - 225) + ', left=' + ($(window).width() / 2 - 225) + ', toolbar=0, location=0, menubar=0, directories=0, scrollbars=0');
});

Expand Down
6 changes: 6 additions & 0 deletions ubyssey/static_src/src/styles/modules/_header.scss
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,12 @@ header.main{
margin-right: 1.5em;
}

.bluesky-icon svg {
height: 0.85em;
vertical-align: baseline;
fill: var(--header_color);
}

a {
position: relative;
margin-right: 0.75em;
Expand Down
2 changes: 1 addition & 1 deletion ubyssey/static_src/src/styles/objects/_article_cover.scss
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
position: relative;

background-color: $color-ubyssey-blue;
box-shadow: 0.75em 0 0 $color-ubyssey-blue, -0.75em 0 0 $color-ubyssey-blue;
box-shadow: 0.4em 0 0 $color-ubyssey-blue, -0.4em 0 0 $color-ubyssey-blue;
box-decoration-break: clone;
filter: drop-shadow(-5px 10px 4px #0416201c);

Expand Down

0 comments on commit 0c93798

Please sign in to comment.