diff --git a/src/client/Appunti.jsx b/src/client/Appunti.jsx new file mode 100644 index 0000000..e7f77e3 --- /dev/null +++ b/src/client/Appunti.jsx @@ -0,0 +1,15 @@ +export const AppuntiCard = ({ image, course, title, author, courseYear }) => { + return ( +
+
+ {title &&
{title}
} + {course &&
{course}
} +
@{author}
+
{courseYear}
+
+ ) +} + +export const AppuntiList = ({ children }) => { + return
{children}
+} diff --git a/src/components/Header.astro b/src/components/Header.astro index eb3cac1..2596325 100644 --- a/src/components/Header.astro +++ b/src/components/Header.astro @@ -6,7 +6,6 @@ Utenti Appunti Notizie - Seminarietti Guide About Login diff --git a/src/content/guides/2024-02-29-git-101.md b/src/content/guides/2024-02-29-git-101.md index 30c868b..116477b 100644 --- a/src/content/guides/2024-02-29-git-101.md +++ b/src/content/guides/2024-02-29-git-101.md @@ -3,7 +3,7 @@ id: git-101-example title: Git 101 (Esempio) description: Una guida introduttiva alle basi di Git (Esempio) author: Copilot -series: git +# series: git --- Benvenuto alla guida introduttiva alle basi di Git. In questa guida imparerai come iniziare a usare Git per il controllo di versione dei tuoi progetti. @@ -20,6 +20,12 @@ Per iniziare ad usare Git, devi prima installarlo sul tuo computer. Puoi scarica Una volta installato Git, puoi inizializzare un nuovo repository in una cartella esistente. Apri il terminale e spostati nella cartella del tuo progetto. Quindi esegui il seguente comando: +Una volta installato Git, puoi inizializzare un nuovo repository in una cartella esistente. Apri il terminale e spostati nella cartella del tuo progetto. Quindi esegui il seguente comando: + +Una volta installato Git, puoi inizializzare un nuovo repository in una cartella esistente. Apri il terminale e spostati nella cartella del tuo progetto. Quindi esegui il seguente comando: + +Una volta installato Git, puoi inizializzare un nuovo repository in una cartella esistente. Apri il terminale e spostati nella cartella del tuo progetto. Quindi esegui il seguente comando: + $$ \int_0^1 x^2 \ dx $$ @@ -30,7 +36,9 @@ git init Questo creerà un nuovo repository $1+a+\zeta_7-\xi^2$ Git nella cartella del tuo progetto. -## Aggiunta di file +## Comandi vari + +### Aggiunta di file Ora che hai inizializzato il repository, puoi iniziare ad aggiungere file ad esso. Per aggiungere un file, esegui il seguente comando: @@ -40,7 +48,7 @@ git add Sostituisci `` con il nome del file che vuoi aggiungere. -## Commit delle modifiche +### Commit delle modifiche Una volta aggiunti i file, puoi fare un commit delle modifiche. Questo salverà le modifiche nel repository. Per fare un commit, esegui il seguente comando: @@ -50,7 +58,7 @@ git commit -m "Messaggio del commit" Sostituisci `"Messaggio del commit"` con un messaggio che descrive le modifiche che hai fatto. -## Sincronizzazione con un repository remoto +### Sincronizzazione con un repository remoto Ora che hai fatto un commit delle modifiche, puoi sincronizzare il repository con un repository remoto. Questo ti permetterà di condividere le tue modifiche con altri membri del tuo team. Per sincronizzare il repository con un repository remoto, esegui il seguente comando: @@ -63,7 +71,7 @@ L'opzione `-u` imposta il repository remoto come repository predefinito per il r Sostituisci `` con l'URL del repository remoto. Questo ti chiederà di inserire le tue credenziali per il repository remoto. Una volta fatto, le tue modifiche saranno sincronizzate con il repository remoto. -## Aggiornamento del repository +### Aggiornamento del repository Una volta che il repository è sincronizzato con un repository remoto, puoi aggiornare il repository con le modifiche degli altri membri del tuo team. Per aggiornare il repository, esegui il seguente comando: diff --git a/src/pages/appunti/index.astro b/src/pages/appunti/index.astro new file mode 100644 index 0000000..663a84a --- /dev/null +++ b/src/pages/appunti/index.astro @@ -0,0 +1,65 @@ +--- +import PageLayout from '@layouts/PageLayout.astro' + +import { AppuntiList, AppuntiCard } from '@client/Appunti' +--- + + +

Appunti & Dispense

+ + + +

In primo piano

+ +
+ + + + + +
+ +

Categorie

+ +

Analisi

+ +
+ + + + + + + + + + +
+ +

Algebra Lineare

+ +
+ + + + + + +
+ +

Geometria

+ +
+ + + + + + + +
+ +
diff --git a/src/pages/guide/[id].astro b/src/pages/guide/[id].astro index 9c1443e..9ede618 100644 --- a/src/pages/guide/[id].astro +++ b/src/pages/guide/[id].astro @@ -15,11 +15,8 @@ const { entry } = Astro.props const { Content } = await entry.render() --- - -
-

{entry.data.title}

- {entry.data.series &&

{entry.data.series}

} - - -
+ +

{entry.data.title}

+ {entry.data.series &&
Serie: {entry.data.series}
} +
diff --git a/src/pages/index.astro b/src/pages/index.astro index 189844d..7e4771a 100644 --- a/src/pages/index.astro +++ b/src/pages/index.astro @@ -159,9 +159,9 @@ import PageLayout from '../layouts/PageLayout.astro'
-
Zulip
+
PHC-Bot
- Lorem ipsum dolor sit amet consectetur, adipisicing elit. Repellendus, veritatis. + Un bot con cui chattare per chiedere informazioni o supporto tecnico.
@@ -201,6 +201,17 @@ import PageLayout from '../layouts/PageLayout.astro' + +
+
+
+
+
Seminarietti
+
+ Varie conferenze del PHC su argomenti di informatica, matematica e tecnologia. +
+
+
diff --git a/src/styles/components.scss b/src/styles/components.scss index 03f7cdb..c2837e3 100644 --- a/src/styles/components.scss +++ b/src/styles/components.scss @@ -8,7 +8,7 @@ $news-accent-bg: #f8e8b1; // .material-symbols-outlined { - display: grid; + display: inline-grid; place-content: center; font-size: 24px; @@ -26,6 +26,8 @@ $news-accent-bg: #f8e8b1; align-items: center; cursor: pointer; + + background: #fff; &:hover, &:hover input[type='text'] { @@ -94,16 +96,23 @@ $news-accent-bg: #f8e8b1; @include neo-brutalist-card; + a { + display: contents; + } + & > .icon { grid-area: icon; + display: grid; } & > .text { grid-area: text; + display: grid; } & > .right { grid-area: right; + display: grid; } } } @@ -171,4 +180,54 @@ $news-accent-bg: #f8e8b1; align-items: end; justify-content: end; } -} \ No newline at end of file +} + +.appunti-scrollable { + display: flex; + overflow-x: auto; + + .appunti-list { + padding: 2px; + padding-bottom: 1rem; + } +} + +.appunti-list { + display: grid; + grid-auto-flow: column; + + gap: 3rem; + + overflow-x: auto; + + max-width: 100%; +} + +.appunti-item { + display: flex; + flex-direction: column; + gap: 0.25rem; + + color: #444; + + & > .thumbnail { + width: 10rem; + aspect-ratio: 10 / 14; + background: #e0e0e0; + + @include neo-brutalist-card($hoverable: true); + } + + & > .thumbnail + * { + font-weight: 700; + padding-top: 0.25rem; + } + + & > .title, + & > .course, + & > .author, + & > .course-year { + padding-left: 0.5rem; + font-size: 16px; + } +} diff --git a/src/styles/main.scss b/src/styles/main.scss index d3adad3..b1d1e2b 100644 --- a/src/styles/main.scss +++ b/src/styles/main.scss @@ -14,6 +14,8 @@ $homepage-macchinisti-bg: #888; $project-card-bg: #a2d4f3; +$screen-desktop-min: 1024px; + @import './mixins.scss'; @import './typography.scss'; @@ -117,9 +119,6 @@ body { main { width: 100%; - h1 { - font-size: 42px; - } } footer { @@ -377,11 +376,41 @@ body { } } +.appunti { + main { + background: #fdfdf0; + + justify-self: center; + + display: grid; + grid-auto-flow: row; + + justify-items: center; + + padding: 3rem; + + gap: 3rem; + + width: 100%; + + .search { + max-width: 80ch; + } + + .appunti-scrollable { + justify-self: stretch; + + &.center { + justify-self: center; + } + } + } +} + .login { background: #ddfaff; main { - justify-self: center; display: flex; @@ -400,6 +429,39 @@ body { } } +.guide { + background: #f0f0f0; + + &.series { + h1 { + margin-bottom: 0; + } + + .series { + font-size: 20px; + font-weight: 700; + text-align: center; + margin-bottom: 3rem; + } + } + + main { + margin-top: 3rem; + margin-bottom: 6rem; + + background: #fff; + max-width: calc(46rem + 2rem * 2); + justify-self: center; + padding: 3rem 2rem 2rem; + } + + @media screen and (min-width: $screen-desktop-min) { + main { + @include neo-brutalist-card($size: 3px, $offset: 9px); + } + } +} + // // Misc // diff --git a/src/styles/mixins.scss b/src/styles/mixins.scss index d19f687..80f2ae3 100644 --- a/src/styles/mixins.scss +++ b/src/styles/mixins.scss @@ -1,8 +1,17 @@ -@mixin neo-brutalist-card($size: 3px, $offset: $size + 1, $shadow: true) { +@mixin neo-brutalist-card($size: 3px, $offset: $size + 1, $shadow: true, $hoverable: false) { border: $size solid #222; border-radius: $size * 2; @if $shadow { box-shadow: $offset $offset 0 0 #222; } + + @if $hoverable { + transition: all 64ms linear; + + &:hover { + transform: translate(-1px, -1px); + box-shadow: $offset + 1 $offset + 1 0 0 #222; + } + } } diff --git a/src/styles/typography.scss b/src/styles/typography.scss index 8de129c..a8d115b 100644 --- a/src/styles/typography.scss +++ b/src/styles/typography.scss @@ -1,29 +1,41 @@ -.text-content { - $base-font-size: 22px; - $heading-scale: 1.33; - @function pow($number, $exponent) { - $value: 1; +@function pow($number, $exponent) { + $value: 1; - @if $exponent > 0 { - @for $i from 1 through $exponent { - $value: $value * $number; - } + @if $exponent > 0 { + @for $i from 1 through $exponent { + $value: $value * $number; } - - @return $value; } + @return $value; +} + +@mixin geometric-headings { + $base-font-size: 16px; + $heading-scale: 1.33; + @for $i from 1 through 5 { + $factor: pow($heading-scale, 5 - $i); + h#{$i} { - $factor: pow($heading-scale, 5 - $i); font-size: $base-font-size * $factor; + font-family: 'Source Sans Pro', monospace; + font-weight: 400; + margin-bottom: 0.25rem; + } + + p + h#{$i} { + margin-top: 0.5rem * $factor; } } +} +@include geometric-headings; + +.text-content { & > * { - max-width: 100ch; - margin: 0 auto; + max-width: 46rem; } pre, @@ -32,6 +44,12 @@ font-family: 'Source Code Pro', monospace; font-weight: 400; + font-size: 16px; + } + + code { + border-radius: 0.25rem; + padding: 0.125rem; } pre { @@ -39,15 +57,38 @@ padding: 0.5rem; - max-width: 90ch; + width: 100%; + max-width: 80ch; + + line-height: 1.5; border-radius: 0.5rem; box-shadow: 0.25rem 0.25rem 0 0 #777; + + code { + padding: 0; + } } - code { - border-radius: 0.25rem; - padding: 0 0.125rem; + + p { + line-height: 1.65; + margin: 0.5rem auto; } -} + + @include geometric-headings; + + h1 { + margin-bottom: 2rem; + text-align: center; + } + + padding: 2rem 0 3rem; + + @media screen and (max-width: 1024px) { + & > * { + margin: 0 0.75rem; + } + } +} \ No newline at end of file diff --git a/tsconfig.json b/tsconfig.json index e0d8fe0..9157059 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -4,6 +4,12 @@ "jsx": "react-jsx", "jsxImportSource": "preact", "strictNullChecks": true, - "allowJs": true + "allowJs": true, + "baseUrl": ".", + "paths": { + "@/*": ["src/*"], + "@layouts/*": ["src/layouts/*"], + "@client/*": ["src/client/*"], + } } }