Skip to content

Commit

Permalink
Added mastodon to sharebar with tootpick, swapped back logo, added fo…
Browse files Browse the repository at this point in the history
…nts for science supplement
  • Loading branch information
SamuelmdLow committed Nov 2, 2024
1 parent 9239faa commit e67a952
Show file tree
Hide file tree
Showing 16 changed files with 76 additions and 34 deletions.
25 changes: 15 additions & 10 deletions article/templates/article/article_page_supplement_2024_science.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@

{% block stylesheet %}
<!-- Adobe fonts from sports email account -->
<link rel="stylesheet" href="https://use.typekit.net/jvd7txm.css">
<link rel="stylesheet" href="https://use.typekit.net/vhu7dhw.css">

<link rel="stylesheet" href="{% static 'ubyssey/css/science-2024.css' %}" type="text/css" />
{% endblock %}
Expand All @@ -33,17 +33,19 @@
</a>
</div>
<div class="title">
<p><a href="{{self.category.section_page.url}}category/{{self.category.slug}}">science supplement 2024//</a>&nbsp;&nbsp;&nbsp;&nbsp;edited by <a href="https://ubyssey.ca/authors/gloria-klein/">Gloria Klein</a></p>
<p><a href="{{self.category.section_page.url}}category/{{self.category.slug}}">science supplement 2024//</a>&nbsp;&nbsp;&nbsp;&nbsp;<span class="editor-credit">edited by <a href="https://ubyssey.ca/authors/gloria-klein/">Gloria Klein</a></span></p>
<h1>Food for thought</h1>
</div>
<div class="article-list">
<ul>
{% for article in self.get_category_articles %}
<li>
<a href="{% pageurl article %}">
{% image article.featured_media.first.image height-150 format-webp alt=article.featured_media.first.alt_text %}
</a>
</li>
{% if article.featured_media.first.image %}
<li>
<a href="{% pageurl article %}">
{% image article.featured_media.first.image height-150 format-webp alt=article.featured_media.first.alt_text %}
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
Expand Down Expand Up @@ -93,25 +95,28 @@ <h1 class="c-article__title">
<p class="c-share">Share this article
<span class="c-share-buttons" style="">
<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-reddit c-share_space" title="Share to Reddit"><ion-icon name="logo-reddit" aria-hidden="true"></ion-icon></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-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>
</p>
</p>
</div>
</div>
</main>
<div class="category-list">
<ul>
{% for article in self.get_category_articles %}
{% if article.featured_media.first.image %}
<li>
<a href="{% pageurl article %}">
{% image article.featured_media.first.image height-150 format-webp alt=article.featured_media.first.alt_text %}
</a>
<a href="{% pageurl article %}">
<p>{{article.title}}</p>
<h3>{{article.title}}</h3>
</a>
</li>
{% endif %}
{% endfor %}
</ul>
</div>
Expand Down
3 changes: 2 additions & 1 deletion article/templates/article/objects/share_bar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@
<p class="c-share">Share this article
<span class="c-share-buttons" style="">
<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-reddit c-share_space" title="Share to Reddit"><ion-icon name="logo-reddit" aria-hidden="true"></ion-icon></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-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>
</p>
2 changes: 1 addition & 1 deletion events/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ async def ubcevents_judge_hidden(self, event, ical):

# Hide events with certain terms in the title
# The first two listed right now are on an inaccurate repeating schedule, the last was an advertisment for a sale that lasted too long
for i in ['coffee hour', 'advanced research computing summer school', 'Student Indoor Plant Sale at UBC Botanical Garden']:
for i in ['coffee hour', 'advanced research computing summer school', 'Student Indoor Plant Sale at UBC Botanical Garden', 'Grapes to Glass']:
if i.lower() in title.lower():
return True

Expand Down
4 changes: 2 additions & 2 deletions events/templates/events/event_page.html
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,8 @@
<div class="u-container">
<div class="logo-area">
<a class="home-link" href="{% url 'wagtail_serve' '' %}" title="Go to The Ubyssey Homepage">
<div class="top-logo ubyssey_small_logo light-logo" style="background-image: url('{% static 'ubyssey/images/ubyssey-logo-small.svg' %}')" alt=""></div>
<div class="top-logo ubyssey_small_logo dark-logo" style="background-image: url('{% static 'ubyssey/images/ubyssey-logo 1.svg' %}')" alt=""></div>
<div class="top-logo ubyssey_small_logo light-logo" style="background-image: url('{% static 'ubyssey/images/logos/ubyssey-logo-blue-light.svg' %}')" alt=""></div>
<div class="top-logo ubyssey_small_logo dark-logo" style="background-image: url('{% static 'ubyssey/images/logos/ubyssey-logo-blue-dark.svg' %}')" alt=""></div>
</a>
</div>
</div>
Expand Down
6 changes: 2 additions & 4 deletions navigation/templates/navigation/headers/main.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,8 @@
<div class="u-container u-container--mid">
<div class="branding row">
<div class="middle">
<a href="https://ubyssey.ca/humour/category/spooky-stories/" title="Read a spooky story?">
<img class="top-logo light-logo" src="{% static 'ubyssey/images/logos/ubyssey-halloween-2024-light.svg' %}" alt="The Ubyssey logo"/>
<img class="top-logo dark-logo" src="{% static 'ubyssey/images/logos/ubyssey-halloween-2024-dark.svg' %}" alt="The Ubyssey logo"/>
</a>
<img class="top-logo light-logo" src="{% static 'ubyssey/images/logos/ubyssey-logo-blue-light.svg' %}" alt="The Ubyssey logo"/>
<img class="top-logo dark-logo" src="{% static 'ubyssey/images/logos/ubyssey-logo-blue-dark.svg' %}" alt="The Ubyssey logo"/>
</div>
<div class="right">
<p class="since-line">
Expand Down
4 changes: 2 additions & 2 deletions navigation/templates/navigation/headers/mobile.html
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ <h2>Links</h2>
</div>

<a class="logo" href="{% url 'wagtail_serve' '' %}" alt="The Ubyssey homepage">
<img class="ubyssey_small_logo light-logo" src="{% static 'ubyssey/images/logos/ubyssey-logo-orange-light.svg' %}" alt="Ubyssey logo"/>
<img class="ubyssey_small_logo dark-logo" src="{% static 'ubyssey/images/logos/ubyssey-logo-orange-dark.svg' %}" alt="Ubyssey logo"/>
<img class="ubyssey_small_logo light-logo" src="{% static 'ubyssey/images/logos/ubyssey-logo-blue-light.svg' %}" alt="Ubyssey logo"/>
<img class="ubyssey_small_logo dark-logo" src="{% static 'ubyssey/images/logos/ubyssey-logo-blue-dark.svg' %}" alt="Ubyssey logo"/>
</a>
{% comment %} <a class="search right" href="{% url 'search' %}"><i class="fa fa-search"></i></a> {% endcomment %}
</header>
Expand Down
4 changes: 2 additions & 2 deletions navigation/templates/navigation/headers/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,8 @@
<header class="topbar header-site dark-mode">
<div class="u-container u-container-topbar">
<a class="home-link" href="{% url 'wagtail_serve' '' %}" title="The Ubyssey homepage" >
<div class="logo ubyssey_small_logo light-logo" style="background-image: url('{% static 'ubyssey/images/logos/ubyssey-logo-orange-light.svg' %}')" alt="Ubyssey logo"></div>
<div class="logo ubyssey_small_logo dark-logo" style="background-image: url('{% static 'ubyssey/images/logos/ubyssey-logo-orange-dark.svg' %}')" alt="Ubyssey logo"></div>
<div class="logo ubyssey_small_logo light-logo" style="background-image: url('{% static 'ubyssey/images/logos/ubyssey-logo-blue-light.svg' %}')" alt="Ubyssey logo"></div>
<div class="logo ubyssey_small_logo dark-logo" style="background-image: url('{% static 'ubyssey/images/logos/ubyssey-logo-blue-dark.svg' %}')" alt="Ubyssey logo"></div>
</a>
<nav>
{% main_menu show_multiple_levels=False apply_active_classes=True %}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<div class="u-container">
<div class="logo-area">
<a class="home-link" href="{% url 'wagtail_serve' '' %}">
<div class="top-logo ubyssey_small_logo light-logo" style="background-image: url('{% static 'ubyssey/images/ubyssey-logo-small.svg' %}')" alt=""></div>
<div class="top-logo ubyssey_small_logo dark-logo" style="background-image: url('{% static 'ubyssey/images/ubyssey-logo 1.svg' %}')" alt=""></div>
<div class="top-logo ubyssey_small_logo light-logo" style="background-image: url('{% static 'ubyssey/images/logos/ubyssey-logo-blue-light.svg' %}')" alt=""></div>
<div class="top-logo ubyssey_small_logo dark-logo" style="background-image: url('{% static 'ubyssey/images/logos/ubyssey-logo-blue-dark.svg' %}')" alt=""></div>
</a>
</div>
<p class="section">From<a href="{{self.get_parent.full_url}}">{{self.get_parent.title}}</a></p>
Expand Down
4 changes: 2 additions & 2 deletions ubyssey/static_src/src/js/components/Events/calendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,8 +68,8 @@ export function QueryEventsCalendar() {
<div class="u-container">
<div class="logo-area">
<a class="home-link" href="/" title="Go to The Ubyssey Homepage">
<div class="top-logo ubyssey_small_logo light-logo" style={{'background-image': "url('https://ubyssey.ca/static/ubyssey/images/ubyssey-logo-small.e935f233a50c.svg')"}} alt="Ubyssey Logo"></div>
<div class="top-logo ubyssey_small_logo dark-logo" style={{'background-image': "url('https://ubyssey.ca/static/ubyssey/images/ubyssey-logo%201.f3b3c0235809.svg')"}} alt="Ubyssey Logo"></div>
<div class="top-logo ubyssey_small_logo light-logo" style={{'background-image': "url('https://ubyssey.ca/static/ubyssey/images/logos/ubyssey-logo-blue-light.e935f233a50c.svg')"}} alt="Ubyssey Logo"></div>
<div class="top-logo ubyssey_small_logo dark-logo" style={{'background-image': "url('https://ubyssey.ca/static/ubyssey/images/logos/ubyssey-logo-blue-dark.f3b3c0235809.svg')"}} alt="Ubyssey Logo"></div>
</a>
</div>
</div>
Expand Down
6 changes: 6 additions & 0 deletions ubyssey/static_src/src/js/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,12 @@ 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-mastodon', function (e) {
e.preventDefault();
window.open('https://tootpick.org/#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
42 changes: 37 additions & 5 deletions ubyssey/static_src/src/styles/science-2024.scss
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,16 @@ p {

h2, h3, h4 {
margin-top: 1.5em;
font-size: 1.2em;
font-size: 1.25em;
font-family: freight-big-pro, serif;
}

p.drop-cap:first-letter {
padding-right: 0.1em;
float: left;
color: var(--highlightColour);
font-size: 3.75em;
line-height: 3.75em;
padding-right: 0.1em;
}

.o-container {
Expand All @@ -77,7 +78,9 @@ p.drop-cap:first-letter {
.author-string {
color: var(--highlightColour);
font-style: italic;
font-family: freight-big-pro, serif;
a {
margin-left: 0.1em;
font-size: 1.1em;
font-style: normal;
text-decoration: none;
Expand Down Expand Up @@ -172,8 +175,14 @@ img.image-attachment {

.c-share {
font-weight: 600;
font-family: freight-big-pro, serif;
.c-share-buttons {
margin-left: 0.25em;
margin-inline: 0.25em;
vertical-align: middle;
a {
margin-inline: 0.25em;
color: black;
}
}
}
#custom-tooltip {
Expand Down Expand Up @@ -208,6 +217,9 @@ img.image-attachment {
text-align: center;
text-decoration: none;
}
h3 {
color: #B93636;
}
}
}
}
Expand Down Expand Up @@ -287,8 +299,12 @@ nav.supplement-nav {
* {
margin: 0;
}
p {
font-family: freight-big-pro, serif;
}
h1 {
font-size: 3em;
font-size: 5em;
font-family: salo-variable, serif;
}
}
div.article-list {
Expand Down Expand Up @@ -328,20 +344,36 @@ nav.supplement-nav {
.logo {
margin: auto;
padding: 2em;
width: 150px;
width: 50px;
}
div.title {
padding-inline: 1em;
margin: auto;
* {
margin: auto;
text-align: center;
width: fit-content;
}
h1 {
font-size: 3em;
}
.editor-credit {
display: none;
}
}
div.article-list {
display: none;
}
}

.category-list ul {
flex-direction: column;

li {
max-width: none;
}
}

footer .footer-links-section {
flex-direction: column;
}
Expand Down
2 changes: 1 addition & 1 deletion ubyssey/templates/500.html
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<main class="500">
<div class="error-page">
<a class="top-logo" href="{% url 'wagtail_serve' '' %}">
<img src="{% static 'ubyssey/images/ubyssey-logo-small.svg' %}" alt="Ubyssey Logo">
<img src="{% static 'ubyssey/images/logos/ubyssey-logo-blue-light.svg' %}" alt="Ubyssey Logo">
</a>
<div class="center-container">
<h1>500</h1>
Expand Down
2 changes: 1 addition & 1 deletion ubyssey/templates/headers/mobile.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<header class="mobile">
<a class="menu left" href="#"><i class="fa fa-bars"></i></a>
<a class="logo" href="{% url 'home' %}"><img src="{% static 'ubyssey/images/ubyssey-logo-small.svg' %}" alt=""></a>
<a class="logo" href="{% url 'home' %}"><img src="{% static 'ubyssey/images/logos/ubyssey-logo-blue-light.svg' %}" alt=""></a>
<a class="search right" href="{% url 'search' %}"><i class="fa fa-search"></i></a>
</header>
<div id='header-mobile-spacer{% if class %}--{{ class }}{% endif %}'></div>
Expand Down
2 changes: 1 addition & 1 deletion ubyssey/templates/headers/topbar.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

<header class="topbar header-site">
<div class="u-container">
<a class="home-link" href="https://ubyssey.ca/"><img class="logo" src="{% static 'ubyssey/images/ubyssey-logo-small.svg' %}" alt=""/></a>
<a class="home-link" href="https://ubyssey.ca/"><img class="logo" src="{% static 'ubyssey/images/logos/ubyssey-logo-blue-light.svg' %}" alt=""/></a>
<nav>
<ul>
<!-- <li {% if section == 'themainmaller' %}class="current"{% endif %}> -->
Expand Down

0 comments on commit e67a952

Please sign in to comment.