1
Fork 0
mirror of https://github.com/Steffo99/unisteffo.git synced 2024-11-25 01:14:21 +00:00

🧹 Clean up some things

This commit is contained in:
Steffo 2021-03-24 15:38:24 +01:00
parent 3071e39b66
commit ca37b00e9e
Signed by: steffo
GPG key ID: 6965406171929D01
9 changed files with 92 additions and 123 deletions

90
package-lock.json generated
View file

@ -3195,11 +3195,11 @@
}
},
"node_modules/ansi-escapes": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
"integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
"integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
"dependencies": {
"type-fest": "^0.11.0"
"type-fest": "^0.21.3"
},
"engines": {
"node": ">=8"
@ -4190,9 +4190,9 @@
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
},
"node_modules/bluelib": {
"version": "2.1.7",
"resolved": "https://registry.npmjs.org/bluelib/-/bluelib-2.1.7.tgz",
"integrity": "sha512-ORWKGCyJmFm0dhhwCFjyYFnIglkj2TGSj1VjK3tvOMgmHWjMFG8xMgNzAZSbJpmvwYDjIYgDxGmmmCXQsy8aRQ==",
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/bluelib/-/bluelib-2.1.8.tgz",
"integrity": "sha512-gsBdys+VAIg9S4NKtiNu10y/gE2h88QZI0osn7N0krYRi6JnSlxnleJhKXtWJLiypkCV4fXXCoAv1fog6nkdjQ==",
"dependencies": {
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
@ -6535,9 +6535,9 @@
}
},
"node_modules/electron-to-chromium": {
"version": "1.3.696",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.696.tgz",
"integrity": "sha512-yuKKvBuXe+IWRp6DxqbGUxbPtamh5C+mEC38vZ0KLxQFpGG9TQn0DbPL9WhWhQnfNhLyzxmPYlCzShbs8QxGbA=="
"version": "1.3.698",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.698.tgz",
"integrity": "sha512-VEXDzYblnlT+g8Q3gedwzgKOso1evkeJzV8lih7lV8mL8eAnGVnKyC3KsFT6S+R5PQO4ffdr1PI16/ElibY/kQ=="
},
"node_modules/elliptic": {
"version": "6.5.4",
@ -7124,9 +7124,9 @@
}
},
"node_modules/eslint-plugin-react": {
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.23.0.tgz",
"integrity": "sha512-5rfsRiHKIAdhxv3NxrzE+dBC7BFsNhuErL+Fy940oD1cau55JVTnuL25sqXqD7XY0OkYCRsKEqxZVwezE5ol5w==",
"version": "7.23.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.23.1.tgz",
"integrity": "sha512-MvFGhZjI8Z4HusajmSw0ougGrq3Gs4vT/0WgwksZgf5RrLrRa2oYAw56okU4tZJl8+j7IYNuTM+2RnFEuTSdRQ==",
"dependencies": {
"array-includes": "^3.1.3",
"array.prototype.flatmap": "^1.2.4",
@ -7558,9 +7558,9 @@
}
},
"node_modules/exec-sh": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.5.tgz",
"integrity": "sha512-0hzpaUazv4mEccxdn3TXC+HWNeVXNKMCJRK6E7Xyg+LwGAYI3yFag6jTkd4injV+kChYDQS1ftqDhnDVWNhU8A=="
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz",
"integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w=="
},
"node_modules/execa": {
"version": "4.1.0",
@ -15464,9 +15464,9 @@
"integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A=="
},
"node_modules/regjsparser": {
"version": "0.6.8",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.8.tgz",
"integrity": "sha512-3weFrFQREJhJ2PW+iCGaG6TenyzNSZgsBKZ/oEf6Trme31COSeIWhHw9O6FPkuXktfx+b6Hf/5e6dKPHaROq2g==",
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz",
"integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==",
"dependencies": {
"jsesc": "~0.5.0"
},
@ -18372,11 +18372,11 @@
}
},
"node_modules/type-fest": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
"integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ==",
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==",
"engines": {
"node": ">=8"
"node": ">=10"
},
"funding": {
"url": "https://github.com/sponsors/sindresorhus"
@ -23207,11 +23207,11 @@
"integrity": "sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA=="
},
"ansi-escapes": {
"version": "4.3.1",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.1.tgz",
"integrity": "sha512-JWF7ocqNrp8u9oqpgV+wH5ftbt+cfvv+PTjOvKLT3AdYly/LmORARfEVT1iyjwN+4MqE5UmVKoAdIBqeoCHgLA==",
"version": "4.3.2",
"resolved": "https://registry.npmjs.org/ansi-escapes/-/ansi-escapes-4.3.2.tgz",
"integrity": "sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==",
"requires": {
"type-fest": "^0.11.0"
"type-fest": "^0.21.3"
}
},
"ansi-html": {
@ -23995,9 +23995,9 @@
"integrity": "sha512-XpNj6GDQzdfW+r2Wnn7xiSAd7TM3jzkxGXBGTtWKuSXv1xUV+azxAm8jdWZN06QTQk+2N2XB9jRDkvbmQmcRtg=="
},
"bluelib": {
"version": "2.1.7",
"resolved": "https://registry.npmjs.org/bluelib/-/bluelib-2.1.7.tgz",
"integrity": "sha512-ORWKGCyJmFm0dhhwCFjyYFnIglkj2TGSj1VjK3tvOMgmHWjMFG8xMgNzAZSbJpmvwYDjIYgDxGmmmCXQsy8aRQ==",
"version": "2.1.8",
"resolved": "https://registry.npmjs.org/bluelib/-/bluelib-2.1.8.tgz",
"integrity": "sha512-gsBdys+VAIg9S4NKtiNu10y/gE2h88QZI0osn7N0krYRi6JnSlxnleJhKXtWJLiypkCV4fXXCoAv1fog6nkdjQ==",
"requires": {
"@babel/preset-env": "^7.12.11",
"@babel/preset-react": "^7.12.10",
@ -25904,9 +25904,9 @@
"integrity": "sha512-7vmuyh5+kuUyJKePhQfRQBhXV5Ce+RnaeeQArKu1EAMpL3WbgMt5WG6uQZpEVvYSSsxMXRKOewtDk9RaTKXRlA=="
},
"electron-to-chromium": {
"version": "1.3.696",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.696.tgz",
"integrity": "sha512-yuKKvBuXe+IWRp6DxqbGUxbPtamh5C+mEC38vZ0KLxQFpGG9TQn0DbPL9WhWhQnfNhLyzxmPYlCzShbs8QxGbA=="
"version": "1.3.698",
"resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.3.698.tgz",
"integrity": "sha512-VEXDzYblnlT+g8Q3gedwzgKOso1evkeJzV8lih7lV8mL8eAnGVnKyC3KsFT6S+R5PQO4ffdr1PI16/ElibY/kQ=="
},
"elliptic": {
"version": "6.5.4",
@ -26395,9 +26395,9 @@
}
},
"eslint-plugin-react": {
"version": "7.23.0",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.23.0.tgz",
"integrity": "sha512-5rfsRiHKIAdhxv3NxrzE+dBC7BFsNhuErL+Fy940oD1cau55JVTnuL25sqXqD7XY0OkYCRsKEqxZVwezE5ol5w==",
"version": "7.23.1",
"resolved": "https://registry.npmjs.org/eslint-plugin-react/-/eslint-plugin-react-7.23.1.tgz",
"integrity": "sha512-MvFGhZjI8Z4HusajmSw0ougGrq3Gs4vT/0WgwksZgf5RrLrRa2oYAw56okU4tZJl8+j7IYNuTM+2RnFEuTSdRQ==",
"requires": {
"array-includes": "^3.1.3",
"array.prototype.flatmap": "^1.2.4",
@ -26654,9 +26654,9 @@
}
},
"exec-sh": {
"version": "0.3.5",
"resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.5.tgz",
"integrity": "sha512-0hzpaUazv4mEccxdn3TXC+HWNeVXNKMCJRK6E7Xyg+LwGAYI3yFag6jTkd4injV+kChYDQS1ftqDhnDVWNhU8A=="
"version": "0.3.6",
"resolved": "https://registry.npmjs.org/exec-sh/-/exec-sh-0.3.6.tgz",
"integrity": "sha512-nQn+hI3yp+oD0huYhKwvYI32+JFeq+XkNcD1GAo3Y/MjxsfVGmrrzrnzjWiNY6f+pUCP440fThsFh5gZrRAU/w=="
},
"execa": {
"version": "4.1.0",
@ -32889,9 +32889,9 @@
"integrity": "sha512-OFFT3MfrH90xIW8OOSyUrk6QHD5E9JOTeGodiJeBS3J6IwlgzJMNE/1bZklWz5oTg+9dCMyEetclvCVXOPoN3A=="
},
"regjsparser": {
"version": "0.6.8",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.8.tgz",
"integrity": "sha512-3weFrFQREJhJ2PW+iCGaG6TenyzNSZgsBKZ/oEf6Trme31COSeIWhHw9O6FPkuXktfx+b6Hf/5e6dKPHaROq2g==",
"version": "0.6.9",
"resolved": "https://registry.npmjs.org/regjsparser/-/regjsparser-0.6.9.tgz",
"integrity": "sha512-ZqbNRz1SNjLAiYuwY0zoXW8Ne675IX5q+YHioAGbCw4X96Mjl2+dcX9B2ciaeyYjViDAfvIjFpQjJgLttTEERQ==",
"requires": {
"jsesc": "~0.5.0"
},
@ -35211,9 +35211,9 @@
"integrity": "sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g=="
},
"type-fest": {
"version": "0.11.0",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.11.0.tgz",
"integrity": "sha512-OdjXJxnCN1AvyLSzeKIgXTXxV+99ZuXl3Hpo9XpJAv9MBcHrrJOQ5kV7ypXOuQie+AmWG25hLbiKdwYTifzcfQ=="
"version": "0.21.3",
"resolved": "https://registry.npmjs.org/type-fest/-/type-fest-0.21.3.tgz",
"integrity": "sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w=="
},
"type-is": {
"version": "1.6.18",

View file

@ -6,7 +6,6 @@ import Error404 from "./routes/Error404";
import Gestinfo from "./routes/Gestinfo";
import style from "./App.module.css";
import MainTitle from "./components/MainTitle";
import ContextSetSubtitle from "./contexts/ContextSetSubtitle";
import Footer from "./components/Footer";
import Fisica from "./routes/Fisica"
@ -16,34 +15,30 @@ export default function App() {
const [subtitle, setSubtitle] = useState(null);
return (
<ContextSetSubtitle.Provider value={setSubtitle}>
<Bluelib skin={skin} className={style.app}>
<Bluelib skin={skin} className={style.app}>
<MainTitle subtitle={subtitle}/>
<MainTitle subtitle={subtitle}/>
<Main>
<Switch>
<Route exact path={"/"}>
<Home skin={skin} setSkin={setSkin}/>
</Route>
<Route path={"/gestinfo"}>
<Gestinfo/>
</Route>
<Route path={"/fisica"}>
<Fisica/>
</Route>
<Route path={"*"}>
<Error404 />
</Route>
</Switch>
</Main>
<Main>
<Switch>
<Route exact path={"/"}>
<Home skin={skin} setSkin={setSkin}/>
</Route>
<Route path={"/gestinfo"}>
<Gestinfo/>
</Route>
<Route path={"/fisica"}>
<Fisica/>
</Route>
<Route path={"*"}>
<Error404 />
</Route>
</Switch>
</Main>
<Footer default={true}/>
<Footer default={true}/>
</Bluelib>
</ContextSetSubtitle.Provider>
</Bluelib>
);
}

View file

@ -3,12 +3,11 @@ import {BaseLink, Title} from "bluelib/lib/components";
import PropTypes from "prop-types";
export default function MainTitle({subtitle}) {
export default function MainTitle() {
return (
<div>
<hgroup>
<Title size={"xxl"}><BaseLink href={"/"}>Unisteffo</BaseLink></Title>
<Title size={"xl"}>{subtitle}</Title>
</div>
</hgroup>
)
}

View file

@ -1,9 +0,0 @@
import {createContext} from "react";
function defaultSetter() {
throw new Error("No subtitle setter found.")
}
export default createContext(defaultSetter);

View file

@ -1,11 +0,0 @@
import React, {useContext, useEffect} from "react";
import ContextSetSubtitle from "../contexts/ContextSetSubtitle";
export default function useSubtitle(node) {
const setSubtitle = useContext(ContextSetSubtitle);
useEffect(() => {
setSubtitle(node);
}, [])
}

View file

@ -1,19 +1,23 @@
import React from "react";
import {Paragraph, Color} from "bluelib/lib/components";
import TitleBox from "../components/TitleBox";
import useSubtitle from "../hooks/useSubtitle";
import {Paragraph, Color, Box, Title} from "bluelib/lib/components";
import TitleSplit from "../components/TitleSplit"
export default function Error404() {
useSubtitle(<Color value={"red"}>Errore 404</Color>);
return (
<article>
<TitleBox title={<Color value={"red"}>Pagina non trovata</Color>}>
<Paragraph>
Mi spiace, ma la pagina che hai richiesto non sembra esistere :(
</Paragraph>
</TitleBox>
<TitleSplit title={"Errore 404"}>
<Color builtin={"red"}>
<Box>
<Title size={"l"}>
Pagina non trovata
</Title>
<Paragraph>
Mi spiace, ma la pagina che hai richiesto non sembra esistere :(
</Paragraph>
</Box>
</Color>
</TitleSplit>
</article>
)
}

View file

@ -2,9 +2,8 @@ import {Anchor, BaseLink, Bold as B, Color, ListItem as LI, Paragraph as P, Spli
import {default as Latex} from "bluelib/lib/components/LatexMath"
import Todo from "../../components/Todo"
import {default as Section} from "../../components/TitleSplit"
import TitleSplit, {default as Section} from "../../components/TitleSplit"
import TitleBox, {default as Panel} from "../../components/TitleBox"
import useSubtitle from "../../hooks/useSubtitle"
const r = String.raw;
@ -25,11 +24,9 @@ function Minus({children}) {
export default function Fisica() {
useSubtitle("Fisica");
return (
<article>
<Split>
<TitleSplit title={"Fisica"}>
<TitleBox title={"Di cosa si tratta?"}>
<P>
<Todo>Questa parte non è ancora stata scritta.</Todo>
@ -40,10 +37,10 @@ export default function Fisica() {
🎓 Il corso è stato tenuto dalla <Anchor href={"mailto:rossella.brunetti@unimore.it"}>Prof.ssa Rossella Brunetti</Anchor>.
</P>
<P>
📘 Le dispense <Color builtin={"red"}><span>non sono più disponibili</span></Color>.
📘 Le dispense <Color builtin={"red"}>non sono più disponibili</Color>.
</P>
<P>
🎥 Le videolezioni <Color builtin={"red"}><span>non sono più disponibili</span></Color>.
🎥 Le videolezioni <Color builtin={"red"}>non sono più disponibili</Color>.
</P>
</TitleBox>
<TitleBox title={"Materiale utilizzato"}>
@ -52,7 +49,7 @@ export default function Fisica() {
<LI><Anchor href={"https://www.wikipedia.org/"}>📰 Wikipedia</Anchor></LI>
</ul>
</TitleBox>
</Split>
</TitleSplit>
<Section title="Vettori">
<Panel title="Componenti cartesiane">
<P>

View file

@ -29,18 +29,15 @@ import IDF from "./abbr/IDF";
import TF from "./abbr/TF";
import TFIDF from "./abbr/TFIDF";
import RSV from "./abbr/RSV";
import useSubtitle from "../../hooks/useSubtitle";
import Locuzione from "./abbr/Locuzione";
const r = String.raw
export default function Gestinfo() {
useSubtitle("Gestione dell'informazione");
return (
<article>
<Split>
<TitleSplit title={"Gestione dell'informazione"}>
<TitleBox title={"Di cosa si tratta?"}>
<P>
Si parla di <B>come processare enormi quantità di testo</B> al fine di <B>effettuarvi ricerche</B>.
@ -67,7 +64,7 @@ export default function Gestinfo() {
<LI><Anchor href={"https://gitlab.com/2429571/gestione-informazione"}>🗒 Appunti open-source di Sharon Guerzoni</Anchor></LI>
</ul>
</TitleBox>
</Split>
</TitleSplit>
<TitleSplit title={"Information Retrieval"}>
<TitleBox title={"Cos'è?"}>
<P>

View file

@ -1,17 +1,14 @@
import React from "react";
import {Split, Size, Color, Anchor, BaseLink as A, Paragraph as P, Bold as B, Italic as I, ListItem as LI} from "bluelib/lib/components";
import {Size, Anchor, BaseLink as A, Paragraph as P, Bold as B, ListItem as LI} from "bluelib/lib/components";
import TitleSplit from "../components/TitleSplit";
import TitleBox from "../components/TitleBox";
import useSubtitle from "../hooks/useSubtitle";
import SelectSkin from "../components/SelectSkin";
export default function Home({skin, setSkin}) {
useSubtitle(<span>Appunti open source di <A href={"https://steffo.eu"}>Steffo</A></span>);
return (
<article>
<Split>
<TitleSplit title={<span>Appunti open source di <A href={"https://steffo.eu"}>Steffo</A></span>}>
<TitleBox title={"Unisteffo"}>
<P>
Ciao! Benvenuto a <B>Unisteffo</B>, il sito in cui carico tutto il materiale che uso per studiare!
@ -28,7 +25,7 @@ export default function Home({skin, setSkin}) {
<SelectSkin skin={skin} setSkin={setSkin}/>
</P>
</TitleBox>
</Split>
</TitleSplit>
<TitleSplit title={"Università"}>
<TitleBox title={"Primo anno"}>
<ul>