Skip to content

Commit

Permalink
Small events today button change, femme changes
Browse files Browse the repository at this point in the history
  • Loading branch information
SamuelmdLow committed Nov 16, 2024
1 parent 23ee372 commit 3ac9ecc
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 45 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@
<nav class="supplement-nav">
<div class="title">
<p>
<a href="/culture" title="Go to Ubyssey Culture">
<a href="{{self.category.section_page.url}}category/{{self.category.slug}}">
<svg width="100" height="auto" viewBox="0 0 501 571" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M417.5 30.1181C436.151 37.2422 450.684 49.5065 461.098 66.7989C470.417 81.9204 475.083 109.418 475.083 149.293V163.317V442.165L475.493 454.954C475.755 466.507 477.559 475.166 480.844 480.942C483.581 485.883 490.3 492.071 501 499.495C495.787 507.467 490.71 513.518 485.783 517.648C480.022 522.052 472.059 526.843 461.919 532.058C451.231 537.56 443.965 542.676 440.133 547.342C436.014 551.746 432.443 559.444 429.432 570.448C410.781 567.142 396.933 559.032 387.887 546.107C383.769 540.081 380.621 532.906 378.419 524.66C375.955 515.589 373.753 502.389 371.837 485.059L371.426 479.295C365.678 489.75 357.715 499.345 347.575 508.141L329.471 523.811C314.665 536.487 307.112 552.02 306.851 570.423H303.156C262.295 570.423 225.28 561.216 192.096 542.788C158.639 524.086 132.585 498.659 113.946 466.482C95.0215 433.756 85.5654 397.599 85.5654 357.999C85.5654 332.435 90.505 307.158 100.372 282.105C109.691 257.639 123.676 234.021 142.327 211.164C160.144 188.893 181.533 168.956 206.492 151.364C225.964 138.164 238.02 131.564 242.686 131.564C245.424 131.564 246.805 132.799 246.805 135.27C246.805 136.917 244.739 139.686 240.633 143.529C219.793 160.297 202.921 182.855 190.031 211.164C177.14 239.498 170.708 267.67 170.708 295.717C170.708 323.215 176.058 349.328 186.746 374.056C197.434 398.797 212.8 420.007 232.82 437.599C252.827 455.166 276.007 468.528 302.334 477.611V75.0708C285.612 85.5261 270.93 92.8123 258.326 96.9295C246.805 100.51 231.028 102.307 211.021 102.307C200.88 102.307 186.198 101.596 167.012 100.236C149.183 99.1254 136.019 98.5639 127.521 98.5639C103.669 98.5639 84.0599 104.203 68.7062 115.482C53.6261 126.486 46.0861 141.47 46.0861 160.447C46.0861 173.123 50.2045 183.816 58.4289 192.611C66.3795 201.707 75.8356 206.248 86.8096 206.248C98.5925 206.248 109.293 202.268 118.898 194.296C124.373 189.617 127.807 187.284 129.188 187.284C133.02 187.284 134.936 189.355 134.936 193.472C134.936 199.249 129.188 205.3 117.666 211.626C106.419 217.652 94.4865 220.708 81.8825 220.708C66.255 220.708 52.4068 216.441 40.3378 207.945C27.9951 199.698 18.2652 188.282 11.1358 173.71C3.69535 159.075 0 143.13 0 125.8C0 109.855 3.28476 94.4592 9.86671 79.5997C16.4487 65.0273 25.4942 52.3761 37.0157 41.6464C48.2635 31.2036 62.2486 22.8319 78.971 16.5063C94.5985 10.4677 111.607 7.41101 129.984 7.41101C157.954 7.41101 191.947 19.2387 231.998 42.8816C243.234 49.4816 252.292 54.048 259.147 56.4934C266.277 58.9637 274.227 60.2238 282.999 60.2238C287.926 60.2238 294.384 59.1009 302.334 56.8926V51.5277C303.703 17.1801 311.791 0 326.597 0C334.274 0 338.106 4.81591 338.106 14.4352C338.106 26.5374 330.703 42.4823 315.897 62.27V112.176C324.133 103.629 331.524 97.1915 338.106 92.7624C345.522 87.8217 357.578 81.2092 374.301 72.9623C386.37 66.6367 395.415 60.4609 401.462 54.3973C407.758 48.1217 413.108 40.012 417.5 30.1181ZM315.897 182.73V277.601H372.658V184.364C372.658 157.989 370.73 139.836 366.897 129.942C363.053 120.323 355.923 115.507 345.509 115.507C334.261 115.507 326.584 120.448 322.466 130.354C318.086 140.235 315.897 157.702 315.897 182.73ZM372.671 325.847V292.411H315.909V325.847H372.671ZM372.671 402.153V340.694H315.909V479.719C319.48 480.817 322.902 481.366 326.199 481.366C341.005 481.366 352.527 475.328 360.751 463.213C368.701 451.123 372.683 434.617 372.683 413.719L372.671 402.153Z" fill="#a71d2c"/>
</svg> the ubyssey culture//
</svg> the ubyssey culture special issue//
</a>
&nbsp;&nbsp;&nbsp;&nbsp;<span class="editor-credit">edited by <a href="https://ubyssey.ca/authors/elena-massing/">Elena Massing</a></span></p>
<h1><a href="{{self.category.section_page.url}}category/{{self.category.slug}}">femme</a></h1>
Expand Down Expand Up @@ -144,7 +144,7 @@ <h1 class="o-headline o-headline--article">
{% if article.featured_media.first.image %}
<li>
<a href="{% pageurl article %}">
{% image article.featured_media.first.image fill-1000x500-c100 format-webp alt=article.featured_media.first.alt_text %}
{% image article.featured_media.first.image fill-1000x600-c100 format-webp alt=article.featured_media.first.alt_text %}
</a>
<a href="{% pageurl article %}">
<h3>{{article.title}}</h3>
Expand Down
58 changes: 27 additions & 31 deletions ubyssey/static_src/src/js/components/Events/calendar.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -119,21 +119,16 @@ export function QueryEventsCalendar() {
// Set the start date to the first day of the current month
let newStart = new Date(start);

if(newStart.getDate() !== 1){
while (newStart.getDay() !== 1) {
newStart = new Date(newStart.getTime() + d);
}
newStart.setDate(1);
newStart.setMonth(newStart.getMonth()+1)
}
// Adjust the month based on the direction
const currentMonth = newStart.getMonth();
console.log(direction);
if (direction === 'next') {
newStart.setMonth(currentMonth + 1);
newStart = new Date(newStart.getTime() + (40*d));
} else {
newStart.setMonth(currentMonth - 1);
}
if (newStart.getDate() == 1) {
newStart = new Date(newStart.getTime() - (2*d));
}
}
newStart.setDate(1);
// Extract the new month and year after the adjustment
const adjustedYear = newStart.getFullYear();
const adjustedMonth = (newStart.getMonth() + 1).toString().padStart(2, '0'); // Ensure month is two digits (01-12)
Expand Down Expand Up @@ -739,26 +734,27 @@ function EventsCalendar({events, start, setStart, numberOfWeeks, setNumberOfWeek
/>
</svg>
</Link>
<span className="month-label">{calendar[0]?.month}</span>
<Link
to={() => {
const searchParams = new URLSearchParams(window.location.search);
return `?${searchParams.toString()}`;
}}
className="today-button"
title="Today"
onClick={(e) => {
e.preventDefault();
const searchParams = new URLSearchParams(window.location.search);
searchParams.delete('month');
searchParams.delete('year');
navigate(`?${searchParams.toString()}`);
setStart(getInitialStartDate());
setIsMonthToggled(false);
}}
>
Today
</Link>
{isMonthToggled &&
<Link
to={() => {
const searchParams = new URLSearchParams(window.location.search);
return `?${searchParams.toString()}`;
}}
className="today-button"
title="Today"
onClick={(e) => {
e.preventDefault();
const searchParams = new URLSearchParams(window.location.search);
searchParams.delete('month');
searchParams.delete('year');
navigate(`?${searchParams.toString()}`);
setStart(getInitialStartDate());
setIsMonthToggled(false);
}}
>
Jump to Today
</Link>
}
<Link
to={() => {
const searchParams = new URLSearchParams(window.location.search);
Expand Down
8 changes: 0 additions & 8 deletions ubyssey/static_src/src/styles/components/events/_base.scss
Original file line number Diff line number Diff line change
Expand Up @@ -480,9 +480,6 @@ header.events{
}
}
}
.today-calendar .events-calendar--row:first-child {
display: none;
}

.today-calendar div.day.past {
display: none;
Expand Down Expand Up @@ -689,11 +686,6 @@ html[color-css-theme="dark"] .events-calendar--navigation .arrow-button {

.today-button {
position: absolute;
right: 3em;
}

.month-label {
position: absolute;

left: 50%;
transform: translateX(-50%);
Expand Down
16 changes: 13 additions & 3 deletions ubyssey/static_src/src/styles/supplement-2024-femme.scss
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,26 @@ h2, h3, h4 {
p.drop-cap:first-letter {
margin-top: 0.05em;
padding-right: 0.1em;
height: 4em;
height: 1em;
float: left;

color: var(--highlightColour);
font-size: 4em;
line-height: 4em;
line-height: 1em;
font-family: norman-variable, sans-serif;
font-variation-settings: 'wght' 700;
}

.cookie-disclaimer-wrapper {
padding: 1em 3em;
position: fixed;
bottom: 0;
left: 0;
right: 0;
background-color: white;
border-top: 2px solid;
}

.o-container {
padding-inline: 1em;
}
Expand Down Expand Up @@ -295,7 +305,7 @@ footer {
li {
margin: 0.5em;
a {
font-weight: 500;
font-weight: 600;
text-decoration: none;
}
}
Expand Down

0 comments on commit 3ac9ecc

Please sign in to comment.