+11
-23
@@ -19,6 +19,10 @@ const nextYear = selectedYearIndex < yearLabels.length - 1 ? yearLabels[selected
|
||||
|
||||
const isCurrentYear = currentYear == selectedYear
|
||||
const coursesWithoutIndex = courses.filter(m => !m.file.includes('index.md'))
|
||||
|
||||
function yearLink(year: string) {
|
||||
return year === currentYear ? '/' : `/archivio/${year}`
|
||||
}
|
||||
---
|
||||
|
||||
<header>
|
||||
@@ -41,29 +45,13 @@ const coursesWithoutIndex = courses.filter(m => !m.file.includes('index.md'))
|
||||
<div class="year-navigation">
|
||||
<!-- <div class="mobile-only"></div> -->
|
||||
<div class="row desktop-only">
|
||||
{
|
||||
previousYear === null ? (
|
||||
<span class="link disabled">
|
||||
<div class="gg-chevron-left" />
|
||||
</span>
|
||||
) : (
|
||||
<a href={`/archivio/${previousYear}`}>
|
||||
<div class="gg-chevron-left" />
|
||||
</a>
|
||||
)
|
||||
}
|
||||
<a href={`/archivio/${selectedYear}`}>{selectedYear}</a>
|
||||
{
|
||||
nextYear === null ? (
|
||||
<span class="link disabled">
|
||||
<div class="gg-chevron-right" />
|
||||
</span>
|
||||
) : (
|
||||
<a href={`/archivio/${nextYear}`}>
|
||||
<div class="gg-chevron-right" />
|
||||
</a>
|
||||
)
|
||||
}
|
||||
<a class:list={['link', { disabled: previousYear === null }]} href={yearLink(previousYear)}>
|
||||
<div class="gg-chevron-left"></div>
|
||||
</a>
|
||||
<a href={currentYear === selectedYear ? '/' : `/archivio/${selectedYear}`}>{selectedYear}</a>
|
||||
<a class:list={['link', { disabled: nextYear === null }]} href={yearLink(nextYear)}>
|
||||
<div class="gg-chevron-right"></div>
|
||||
</a>
|
||||
</div>
|
||||
</div>
|
||||
<div class="course-navigation">
|
||||
|
||||
@@ -13,8 +13,8 @@ tutors:
|
||||
# image: /tutors/nome-cognome@square.jpg # altrimenti viene mostrato il placeholder
|
||||
contacts:
|
||||
- type: email
|
||||
value: n.cognome@studenti.unipi.it
|
||||
- name: Nome Cognome 2
|
||||
value: n.cognome2@studenti.unipi.it
|
||||
- name: Nome Cognome 3
|
||||
# image: /tutors/nome-cognome@square.jpg # altrimenti viene mostrato il placeholder
|
||||
---
|
||||
|
||||
|
||||
+30
-12
@@ -32,8 +32,7 @@ button,
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
a,
|
||||
.link {
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #a00;
|
||||
|
||||
@@ -119,8 +118,12 @@ code {
|
||||
|
||||
column-gap: 2rem;
|
||||
|
||||
hyphens: none;
|
||||
word-break: break-all;
|
||||
|
||||
> .name {
|
||||
grid-area: name;
|
||||
font-size: 1.5rem;
|
||||
padding-top: 0.5rem;
|
||||
}
|
||||
|
||||
@@ -142,6 +145,24 @@ code {
|
||||
margin: 0;
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 50rem) {
|
||||
column-gap: 1rem;
|
||||
|
||||
> .name {
|
||||
font-size: 1.25rem;
|
||||
padding-top: 0;
|
||||
}
|
||||
|
||||
> .image {
|
||||
width: 5rem;
|
||||
height: 5rem;
|
||||
}
|
||||
|
||||
> .contacts {
|
||||
font-size: 16px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/* Layout */
|
||||
@@ -151,6 +172,7 @@ body {
|
||||
text-rendering: optimizeLegibility;
|
||||
|
||||
font-size: 20px;
|
||||
|
||||
line-height: 1;
|
||||
color: #333;
|
||||
background-color: #f3f0f0;
|
||||
@@ -211,8 +233,7 @@ body {
|
||||
}
|
||||
}
|
||||
|
||||
a,
|
||||
.link {
|
||||
a {
|
||||
display: grid;
|
||||
place-content: center;
|
||||
|
||||
@@ -231,11 +252,8 @@ body {
|
||||
border-radius: 2px;
|
||||
|
||||
&.disabled {
|
||||
pointer-events: none;
|
||||
color: #420000;
|
||||
|
||||
&:hover {
|
||||
background: none;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -256,8 +274,7 @@ body {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
a,
|
||||
.link {
|
||||
a {
|
||||
font-size: 20px;
|
||||
padding: 0.25rem;
|
||||
}
|
||||
@@ -305,8 +322,7 @@ body {
|
||||
footer {
|
||||
place-self: center;
|
||||
|
||||
a:has(img),
|
||||
.link:has(img) {
|
||||
a:has(img) {
|
||||
display: inline-block;
|
||||
background: none;
|
||||
|
||||
@@ -339,6 +355,8 @@ body {
|
||||
gap: 0;
|
||||
padding-bottom: 3rem;
|
||||
|
||||
font-size: 18px;
|
||||
|
||||
> main {
|
||||
width: 100%;
|
||||
padding: 2rem 1rem 1rem 1rem;
|
||||
|
||||
Reference in New Issue
Block a user