1
Fork 0
mirror of https://github.com/Steffo99/unisteffo.git synced 2024-11-28 19:04:18 +00:00

🧹 Reformat code

This commit is contained in:
Steffo 2021-03-24 16:14:15 +01:00
parent cdd504a728
commit 2cf36f46e5
Signed by: steffo
GPG key ID: 6965406171929D01
28 changed files with 617 additions and 377 deletions

View file

@ -0,0 +1,5 @@
<component name="ProjectCodeStyleConfiguration">
<state>
<option name="PREFERRED_PROJECT_CODE_STYLE" value="Default" />
</state>
</component>

View file

@ -1,16 +1,16 @@
import React, {useState} from "react"; import React, { useState } from "react"
import {BaseLink, Bluelib, Main, Title} from "bluelib/lib/components" import { BaseLink, Bluelib, Main, Title } from "bluelib/lib/components"
import {Switch, Route} from "react-router-dom"; import { Route, Switch } from "react-router-dom"
import Home from "./routes/Home"; import Home from "./routes/Home"
import Error404 from "./routes/Error404"; import Error404 from "./routes/Error404"
import Gestinfo from "./routes/Gestinfo"; import Gestinfo from "./routes/Gestinfo"
import style from "./App.module.css"; import style from "./App.module.css"
import Footer from "./components/Footer"; import Footer from "./components/Footer"
import Fisica from "./routes/Fisica" import Fisica from "./routes/Fisica"
export default function App() { export default function App() {
const [skin, setSkin] = useState("rygblue"); const [skin, setSkin] = useState("rygblue")
return ( return (
<Bluelib skin={skin} className={style.app}> <Bluelib skin={skin} className={style.app}>
@ -29,7 +29,7 @@ export default function App() {
<Fisica/> <Fisica/>
</Route> </Route>
<Route path={"*"}> <Route path={"*"}>
<Error404 /> <Error404/>
</Route> </Route>
</Switch> </Switch>
</Main> </Main>
@ -37,6 +37,6 @@ export default function App() {
<Footer default={true}/> <Footer default={true}/>
</Bluelib> </Bluelib>
); )
} }

View file

@ -1,11 +1,11 @@
import React from "react"; import React from "react"
import {Box as BluelibBox, Title} from "bluelib/lib/components"; import { Box as BluelibBox, Title } from "bluelib/lib/components"
import PropTypes from "prop-types"; import PropTypes from "prop-types"
import classNames from "classnames" import classNames from "classnames"
import Style from "./Box.module.css" import Style from "./Box.module.css"
export default function Box({children, className, title, Type = BluelibBox, ...props}) { export default function Box({ children, className, title, Type = BluelibBox, ...props }) {
return ( return (
<Type className={classNames(Style.Panel, className)} {...props}> <Type className={classNames(Style.Panel, className)} {...props}>
<Title size={"l"}> <Title size={"l"}>
@ -18,5 +18,5 @@ export default function Box({children, className, title, Type = BluelibBox, ...p
Box.propTypes = { Box.propTypes = {
children: PropTypes.node, children: PropTypes.node,
title: PropTypes.node title: PropTypes.node,
} }

View file

@ -1,5 +1,6 @@
import style from './Footer.module.css'; import style from "./Footer.module.css"
import {Anchor, Title} from "bluelib/lib/components"; import { Anchor, Title } from "bluelib/lib/components"
export default function Footer() { export default function Footer() {
return ( return (
@ -11,10 +12,11 @@ export default function Footer() {
&nbsp;-&nbsp; &nbsp;-&nbsp;
<Anchor href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</Anchor> <Anchor href="https://creativecommons.org/licenses/by-sa/4.0/">CC BY-SA 4.0</Anchor>
&nbsp;-&nbsp; &nbsp;-&nbsp;
<Anchor href="https://github.com/Steffo99/uni.steffo.eu">{process.env.REACT_APP_NAME} {process.env.REACT_APP_VERSION} ({process.env.NODE_ENV})</Anchor> <Anchor
href="https://github.com/Steffo99/uni.steffo.eu">{process.env.REACT_APP_NAME} {process.env.REACT_APP_VERSION} ({process.env.NODE_ENV})</Anchor>
&nbsp;-&nbsp; &nbsp;-&nbsp;
<Anchor href="https://ko-fi.com/steffo">Supportami</Anchor> <Anchor href="https://ko-fi.com/steffo">Supportami</Anchor>
</Title> </Title>
</div> </div>
); )
} }

View file

@ -1,8 +1,7 @@
import React, {useContext} from "react"; import React from "react"
import ContextBluelibSkin from "bluelib/lib/contexts/ContextBluelibSkin";
export default function SelectSkin({skin, setSkin}) { export default function SelectSkin({ skin, setSkin }) {
return ( return (
<span> <span>
<select value={skin} onChange={(event) => setSkin(event.target.value)}> <select value={skin} onChange={(event) => setSkin(event.target.value)}>
@ -10,5 +9,5 @@ export default function SelectSkin({skin, setSkin}) {
<option value={"rygblue"}>Blu reale</option> <option value={"rygblue"}>Blu reale</option>
</select> </select>
</span> </span>
); )
} }

View file

@ -1,16 +1,16 @@
import React from "react"; import React from "react"
import {Split as BluelibSplit, Title} from "bluelib/lib/components"; import { Split as BluelibSplit, Title } from "bluelib/lib/components"
import PropTypes from "prop-types"; import PropTypes from "prop-types"
export default function Split({children, title, ...props}) { export default function Split({ children, title, ...props }) {
return ( return (
<div {...props}> <div {...props}>
{title ? {title ?
<Title size={"xl"}> <Title size={"xl"}>
{title} {title}
</Title> </Title>
: null} : null}
<BluelibSplit> <BluelibSplit>
{children} {children}
</BluelibSplit> </BluelibSplit>
@ -21,5 +21,5 @@ export default function Split({children, title, ...props}) {
Split.propTypes = { Split.propTypes = {
children: PropTypes.node, children: PropTypes.node,
className: PropTypes.string, className: PropTypes.string,
title: PropTypes.node title: PropTypes.node,
} }

View file

@ -1,11 +1,11 @@
import React, {useEffect} from "react"; import React, { useEffect } from "react"
import PropTypes from "prop-types"; import PropTypes from "prop-types"
import style from "./Todo.module.css"; import style from "./Todo.module.css"
export default function Todo({children}) { export default function Todo({ children }) {
useEffect(() => { useEffect(() => {
console.info("TODO:", {children}) console.info("TODO:", { children })
}, []) }, [])
return ( return (

View file

@ -1,8 +1,8 @@
body { body {
margin: 0; margin: 0;
} }
#root { #root {
max-width: 100vw; max-width: 100vw;
min-height: 100vh; min-height: 100vh;
} }

View file

@ -1,20 +1,21 @@
import React from 'react'; import React from "react"
import ReactDOM from 'react-dom'; import ReactDOM from "react-dom"
import './index.css'; import "./index.css"
import App from './App'; import App from "./App"
import reportWebVitals from './reportWebVitals'; import reportWebVitals from "./reportWebVitals"
import {BrowserRouter} from "react-router-dom" import { BrowserRouter } from "react-router-dom"
ReactDOM.render( ReactDOM.render(
<React.StrictMode> <React.StrictMode>
<BrowserRouter primary={true}> <BrowserRouter primary={true}>
<App /> <App/>
</BrowserRouter> </BrowserRouter>
</React.StrictMode>, </React.StrictMode>,
document.getElementById('root') document.getElementById("root"),
); )
// If you want to start measuring performance in your app, pass a function // If you want to start measuring performance in your app, pass a function
// to log results (for example: reportWebVitals(console.log)) // to log results (for example: reportWebVitals(console.log))
// or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals // or send to an analytics endpoint. Learn more: https://bit.ly/CRA-vitals
reportWebVitals(); reportWebVitals()

View file

@ -1,13 +1,13 @@
const reportWebVitals = onPerfEntry => { const reportWebVitals = onPerfEntry => {
if (onPerfEntry && onPerfEntry instanceof Function) { if(onPerfEntry && onPerfEntry instanceof Function) {
import('web-vitals').then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => { import("web-vitals").then(({ getCLS, getFID, getFCP, getLCP, getTTFB }) => {
getCLS(onPerfEntry); getCLS(onPerfEntry)
getFID(onPerfEntry); getFID(onPerfEntry)
getFCP(onPerfEntry); getFCP(onPerfEntry)
getLCP(onPerfEntry); getLCP(onPerfEntry)
getTTFB(onPerfEntry); getTTFB(onPerfEntry)
}); })
} }
}; }
export default reportWebVitals; export default reportWebVitals

View file

@ -1,5 +1,5 @@
import React from "react"; import React from "react"
import {Paragraph, Color, Box, Title} from "bluelib/lib/components"; import { Box, Color, Paragraph, Title } from "bluelib/lib/components"
import Split from "../components/Split" import Split from "../components/Split"

View file

@ -1,22 +1,22 @@
import {Anchor, BaseLink, Bold as B, Color, ListItem as LI, Paragraph as P} from "bluelib/lib/components" import { Anchor, BaseLink, Bold as B, Color, ListItem as LI, Paragraph as P } from "bluelib/lib/components"
import {default as Latex} from "bluelib/lib/components/LatexMath" import { default as Latex } from "bluelib/lib/components/LatexMath"
import Todo from "../../components/Todo" import Todo from "../../components/Todo"
import Split from "../../components/Split" import Split from "../../components/Split"
import Box from "../../components/Box" import Box from "../../components/Box"
const r = String.raw; const r = String.raw
function Plus({children}) { function Plus({ children }) {
return ( return (
<Color builtin={"red"}>{children}</Color> <Color builtin={"red"}>{children}</Color>
) )
} }
function Minus({children}) { function Minus({ children }) {
return ( return (
<Color builtin={"blue"}>{children}</Color> <Color builtin={"blue"}>{children}</Color>
) )
@ -34,7 +34,8 @@ export default function Fisica() {
</Box> </Box>
<Box title={"Il corso all'Unimore"}> <Box title={"Il corso all'Unimore"}>
<P> <P>
🎓 Il corso è stato tenuto dalla <Anchor href={"mailto:rossella.brunetti@unimore.it"}>Prof.ssa Rossella Brunetti</Anchor>. 🎓 Il corso è stato tenuto dalla <Anchor href={"mailto:rossella.brunetti@unimore.it"}>Prof.ssa
Rossella Brunetti</Anchor>.
</P> </P>
<P> <P>
📘 Le dispense <Color builtin={"red"}>non sono più disponibili</Color>. 📘 Le dispense <Color builtin={"red"}>non sono più disponibili</Color>.
@ -563,7 +564,8 @@ export default function Fisica() {
</Box> </Box>
<Box title="Conduttori e isolanti"> <Box title="Conduttori e isolanti">
<P> <P>
Più <Anchor href="https://it.wikipedia.org/wiki/Ione">ioni</Anchor> ha un corpo, meglio la carica Più <Anchor href="https://it.wikipedia.org/wiki/Ione">ioni</Anchor> ha un corpo, meglio la
carica
si muove attraverso di esso. si muove attraverso di esso.
</P> </P>
<P> <P>

View file

@ -1,5 +1,5 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function API() { export default function API() {

View file

@ -1,10 +1,11 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function Glob() { export default function Glob() {
return ( return (
<Help text={`La sintassi della ricerca tra file, dove ? sostituisce un singolo carattere, * un qualsiasi numero e ** include le sottocartelle.`}>Glob</Help> <Help
text={`La sintassi della ricerca tra file, dove ? sostituisce un singolo carattere, * un qualsiasi numero e ** include le sottocartelle.`}>Glob</Help>
) )
} }

View file

@ -1,5 +1,5 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function IC() { export default function IC() {

View file

@ -1,11 +1,12 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
import LatexMath from "bluelib/lib/components/LatexMath"; import LatexMath from "bluelib/lib/components/LatexMath"
export default function IDF() { export default function IDF() {
return ( return (
<Help text={"Inverse document frequency, quanto un termine è raro all'interno della collezione di documenti"}><LatexMath>{`idf`}</LatexMath></Help> <Help
text={"Inverse document frequency, quanto un termine è raro all'interno della collezione di documenti"}><LatexMath>{`idf`}</LatexMath></Help>
) )
} }

View file

@ -1,5 +1,5 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function IR() { export default function IR() {

View file

@ -1,10 +1,11 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function Locuzione() { export default function Locuzione() {
return ( return (
<Help text={`Gruppo di parole che funzionano come una unica: a cavallo, forze dell'ordine, etc.`}>locuzione</Help> <Help
text={`Gruppo di parole che funzionano come una unica: a cavallo, forze dell'ordine, etc.`}>locuzione</Help>
) )
}; };

View file

@ -1,5 +1,5 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function Ononimi() { export default function Ononimi() {

View file

@ -1,10 +1,11 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function Predicato() { export default function Predicato() {
return ( return (
<Help text={"La minima unità booleana valutabile. `A`, `B`, etc. Equivalente a un evento in statistica, e a una variabile in matematica."}>predicato</Help> <Help
text={"La minima unità booleana valutabile. `A`, `B`, etc. Equivalente a un evento in statistica, e a una variabile in matematica."}>predicato</Help>
) )
} }

View file

@ -1,5 +1,5 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function RSV() { export default function RSV() {

View file

@ -1,5 +1,5 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function Regex() { export default function Regex() {

View file

@ -1,6 +1,6 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
import LatexMath from "bluelib/lib/components/LatexMath"; import LatexMath from "bluelib/lib/components/LatexMath"
export default function TF() { export default function TF() {

View file

@ -1,11 +1,11 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function TFIDF() { export default function TFIDF() {
return ( return (
<Help text={"Metodo per calcolare i pesi che moltiplica il peso tf per il peso idf."}>tf-idf</Help> <Help text={"Metodo per calcolare i pesi che moltiplica il peso tf per il peso idf."}>tf-idf</Help>
); )
} }
TFIDF.propTypes = {} TFIDF.propTypes = {}

View file

@ -1,10 +1,11 @@
import React from "react"; import React from "react"
import {Help} from "bluelib/lib/components"; import { Help } from "bluelib/lib/components"
export default function UIN() { export default function UIN() {
return ( return (
<Help text={`User Information Need, una descrizione in linguaggio naturale delle informazioni di cui ha bisogno l'utente`}>UIN</Help> <Help
text={`User Information Need, una descrizione in linguaggio naturale delle informazioni di cui ha bisogno l'utente`}>UIN</Help>
) )
} }

View file

@ -1,10 +1,10 @@
import React from "react"; import React from "react"
import PropTypes from "prop-types"; import PropTypes from "prop-types"
import style from "./Token.module.css"; import style from "./Token.module.css"
import {Bold, Strike, Color} from "bluelib/lib/components"; import { Bold, Color, Strike } from "bluelib/lib/components"
export default function Token({children, indexTerm, stopword}) { export default function Token({ children, indexTerm, stopword }) {
if(indexTerm) { if(indexTerm) {
return ( return (
<Bold><Color builtin={"yellow"}><span className={style.token}>{children}</span></Color></Bold> <Bold><Color builtin={"yellow"}><span className={style.token}>{children}</span></Color></Bold>

File diff suppressed because it is too large Load diff

View file

@ -1,25 +1,28 @@
import React from "react"; import React from "react"
import {Size, Anchor, BaseLink as A, Paragraph as P, Bold as B, ListItem as LI} from "bluelib/lib/components"; import { Anchor, BaseLink as A, Bold as B, ListItem as LI, Paragraph as P, Size } from "bluelib/lib/components"
import Split from "../components/Split"; import Split from "../components/Split"
import Box from "../components/Box"; import Box from "../components/Box"
import SelectSkin from "../components/SelectSkin"; import SelectSkin from "../components/SelectSkin"
export default function Home({skin, setSkin}) { export default function Home({ skin, setSkin }) {
return ( return (
<article> <article>
<Split title={<span>Appunti open source di <A href={"https://steffo.eu"}>Steffo</A></span>}> <Split title={<span>Appunti open source di <A href={"https://steffo.eu"}>Steffo</A></span>}>
<Box title={"Unisteffo"}> <Box title={"Unisteffo"}>
<P> <P>
Ciao! Benvenuto a <B>Unisteffo</B>, il sito in cui carico tutto il materiale che uso per studiare! Ciao! Benvenuto a <B>Unisteffo</B>, il sito in cui carico tutto il materiale che uso per
studiare!
</P> </P>
<P> <P>
Se trovi un errore negli appunti, o un bug del sito, per favore <Anchor href={"https://github.com/Steffo99/appuntiweb/issues/new"}>segnalamelo su GitHub</Anchor>! Se trovi un errore negli appunti, o un bug del sito, per favore <Anchor
href={"https://github.com/Steffo99/appuntiweb/issues/new"}>segnalamelo su GitHub</Anchor>!
</P> </P>
</Box> </Box>
<Box title={"Tema"}> <Box title={"Tema"}>
<P> <P>
Se i colori ti deconcentrano, non ti piacciono, o vuoi stampare alcune di queste pagine, puoi cambiare tema del sito qui: Se i colori ti deconcentrano, non ti piacciono, o vuoi stampare alcune di queste pagine, puoi
cambiare tema del sito qui:
</P> </P>
<P> <P>
<SelectSkin skin={skin} setSkin={setSkin}/> <SelectSkin skin={skin} setSkin={setSkin}/>
@ -29,22 +32,39 @@ export default function Home({skin, setSkin}) {
<Split title={"Università"}> <Split title={"Università"}>
<Box title={"Primo anno"}> <Box title={"Primo anno"}>
<ul> <ul>
<LI><Size value={"l"}><Anchor href={"https://github.com/Steffo99/appunti-universitari/tree/master/2018_Analisi1"}>Analisi matematica</Anchor></Size></LI> <LI><Size value={"l"}><Anchor
<LI><Size value={"l"}><Anchor href={"https://github.com/Steffo99/appunti-universitari/tree/master/2018_AlgebraLineare"}>Algebra lineare</Anchor></Size></LI> href={"https://github.com/Steffo99/appunti-universitari/tree/master/2018_Analisi1"}>Analisi
<LI><Size value={"l"}><Anchor href={"https://github.com/Steffo99/appunti-universitari/blob/master/2018_ArchitetturaDeiCalcolatori/08_AppuntiEDeduzioni.md"}>Architettura dei calcolatori</Anchor></Size></LI> matematica</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor href={"https://github.com/Steffo99/appunti-universitari/tree/master/2018_AlgoritmiEStruttureDati"}>Algoritmi e strutture dati</Anchor></Size></LI> <LI><Size value={"l"}><Anchor
href={"https://github.com/Steffo99/appunti-universitari/tree/master/2018_AlgebraLineare"}>Algebra
lineare</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor
href={"https://github.com/Steffo99/appunti-universitari/blob/master/2018_ArchitetturaDeiCalcolatori/08_AppuntiEDeduzioni.md"}>Architettura
dei calcolatori</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor
href={"https://github.com/Steffo99/appunti-universitari/tree/master/2018_AlgoritmiEStruttureDati"}>Algoritmi
e strutture dati</Anchor></Size></LI>
</ul> </ul>
</Box> </Box>
<Box title={"Secondo anno"}> <Box title={"Secondo anno"}>
<ul> <ul>
<LI><Size value={"l"}><A href={"/fisica"}>Fisica</A></Size></LI> <LI><Size value={"l"}><A href={"/fisica"}>Fisica</A></Size></LI>
<LI><Size value={"l"}><Anchor href={"https://github.com/Steffo99/appunti-universitari/tree/master/2019_ProgrammazioneAdOggetti"}>Programmazione ad oggetti</Anchor></Size></LI> <LI><Size value={"l"}><Anchor
<LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/statistica"}>Statistica ed elementi di probabilità</Anchor></Size></LI> href={"https://github.com/Steffo99/appunti-universitari/tree/master/2019_ProgrammazioneAdOggetti"}>Programmazione
<LI><Size value={"l"}><Anchor href={"https://github.com/Steffo99/appunti-universitari/tree/master/2019_SistemiOperativi"}>Sistemi operativi</Anchor></Size></LI> ad oggetti</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/apprendimento"}>Apprendimento ed evoluzione in sistemi artificiali</Anchor></Size></LI> <LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/statistica"}>Statistica ed
<LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/basididati"}>Basi di dati</Anchor></Size></LI> elementi di probabilità</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/calcolonumerico"}>Calcolo numerico</Anchor></Size></LI> <LI><Size value={"l"}><Anchor
<LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/ottimizzazionelineare"}>Ottimizzazione lineare intera</Anchor></Size></LI> href={"https://github.com/Steffo99/appunti-universitari/tree/master/2019_SistemiOperativi"}>Sistemi
operativi</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/apprendimento"}>Apprendimento
ed evoluzione in sistemi artificiali</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/basididati"}>Basi di
dati</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/calcolonumerico"}>Calcolo
numerico</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor href={"https://old.uni.steffo.eu/#/ottimizzazionelineare"}>Ottimizzazione
lineare intera</Anchor></Size></LI>
</ul> </ul>
</Box> </Box>
<Box title={"Terzo anno"}> <Box title={"Terzo anno"}>