1
Fork 0
mirror of https://github.com/Steffo99/unisteffo.git synced 2024-11-25 01:14:21 +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 {BaseLink, Bluelib, Main, Title} from "bluelib/lib/components"
import {Switch, Route} from "react-router-dom";
import Home from "./routes/Home";
import Error404 from "./routes/Error404";
import Gestinfo from "./routes/Gestinfo";
import style from "./App.module.css";
import Footer from "./components/Footer";
import React, { useState } from "react"
import { BaseLink, Bluelib, Main, Title } from "bluelib/lib/components"
import { Route, Switch } from "react-router-dom"
import Home from "./routes/Home"
import Error404 from "./routes/Error404"
import Gestinfo from "./routes/Gestinfo"
import style from "./App.module.css"
import Footer from "./components/Footer"
import Fisica from "./routes/Fisica"
export default function App() {
const [skin, setSkin] = useState("rygblue");
const [skin, setSkin] = useState("rygblue")
return (
<Bluelib skin={skin} className={style.app}>
@ -29,7 +29,7 @@ export default function App() {
<Fisica/>
</Route>
<Route path={"*"}>
<Error404 />
<Error404/>
</Route>
</Switch>
</Main>
@ -37,6 +37,6 @@ export default function App() {
<Footer default={true}/>
</Bluelib>
);
)
}

View file

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

View file

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

View file

@ -1,8 +1,7 @@
import React, {useContext} from "react";
import ContextBluelibSkin from "bluelib/lib/contexts/ContextBluelibSkin";
import React from "react"
export default function SelectSkin({skin, setSkin}) {
export default function SelectSkin({ skin, setSkin }) {
return (
<span>
<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>
</select>
</span>
);
)
}

View file

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

View file

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

View file

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

View file

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

View file

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

View file

@ -1,5 +1,5 @@
import React from "react";
import {Paragraph, Color, Box, Title} from "bluelib/lib/components";
import React from "react"
import { Box, Color, Paragraph, Title } from "bluelib/lib/components"
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 {default as Latex} from "bluelib/lib/components/LatexMath"
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 Todo from "../../components/Todo"
import Split from "../../components/Split"
import Box from "../../components/Box"
const r = String.raw;
const r = String.raw
function Plus({children}) {
function Plus({ children }) {
return (
<Color builtin={"red"}>{children}</Color>
)
}
function Minus({children}) {
function Minus({ children }) {
return (
<Color builtin={"blue"}>{children}</Color>
)
@ -34,7 +34,8 @@ export default function Fisica() {
</Box>
<Box title={"Il corso all'Unimore"}>
<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>
📘 Le dispense <Color builtin={"red"}>non sono più disponibili</Color>.
@ -563,7 +564,8 @@ export default function Fisica() {
</Box>
<Box title="Conduttori e isolanti">
<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.
</P>
<P>

View file

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

View file

@ -1,10 +1,11 @@
import React from "react";
import {Help} from "bluelib/lib/components";
import React from "react"
import { Help } from "bluelib/lib/components"
export default function Glob() {
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 {Help} from "bluelib/lib/components";
import React from "react"
import { Help } from "bluelib/lib/components"
export default function IC() {

View file

@ -1,11 +1,12 @@
import React from "react";
import {Help} from "bluelib/lib/components";
import LatexMath from "bluelib/lib/components/LatexMath";
import React from "react"
import { Help } from "bluelib/lib/components"
import LatexMath from "bluelib/lib/components/LatexMath"
export default function IDF() {
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 {Help} from "bluelib/lib/components";
import React from "react"
import { Help } from "bluelib/lib/components"
export default function IR() {

View file

@ -1,10 +1,11 @@
import React from "react";
import {Help} from "bluelib/lib/components";
import React from "react"
import { Help } from "bluelib/lib/components"
export default function Locuzione() {
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 {Help} from "bluelib/lib/components";
import React from "react"
import { Help } from "bluelib/lib/components"
export default function Ononimi() {

View file

@ -1,10 +1,11 @@
import React from "react";
import {Help} from "bluelib/lib/components";
import React from "react"
import { Help } from "bluelib/lib/components"
export default function Predicato() {
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 {Help} from "bluelib/lib/components";
import React from "react"
import { Help } from "bluelib/lib/components"
export default function RSV() {

View file

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

View file

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

View file

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

View file

@ -1,10 +1,11 @@
import React from "react";
import {Help} from "bluelib/lib/components";
import React from "react"
import { Help } from "bluelib/lib/components"
export default function UIN() {
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 PropTypes from "prop-types";
import style from "./Token.module.css";
import {Bold, Strike, Color} from "bluelib/lib/components";
import React from "react"
import PropTypes from "prop-types"
import style from "./Token.module.css"
import { Bold, Color, Strike } from "bluelib/lib/components"
export default function Token({children, indexTerm, stopword}) {
export default function Token({ children, indexTerm, stopword }) {
if(indexTerm) {
return (
<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 {Size, Anchor, BaseLink as A, Paragraph as P, Bold as B, ListItem as LI} from "bluelib/lib/components";
import Split from "../components/Split";
import Box from "../components/Box";
import SelectSkin from "../components/SelectSkin";
import React from "react"
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 Box from "../components/Box"
import SelectSkin from "../components/SelectSkin"
export default function Home({skin, setSkin}) {
export default function Home({ skin, setSkin }) {
return (
<article>
<Split title={<span>Appunti open source di <A href={"https://steffo.eu"}>Steffo</A></span>}>
<Box title={"Unisteffo"}>
<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>
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>
</Box>
<Box title={"Tema"}>
<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>
<SelectSkin skin={skin} setSkin={setSkin}/>
@ -29,22 +32,39 @@ export default function Home({skin, setSkin}) {
<Split title={"Università"}>
<Box title={"Primo anno"}>
<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 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>
<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
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>
</Box>
<Box title={"Secondo anno"}>
<ul>
<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 href={"https://old.uni.steffo.eu/#/statistica"}>Statistica ed elementi di probabilità</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor 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>
<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 href={"https://old.uni.steffo.eu/#/statistica"}>Statistica ed
elementi di probabilità</Anchor></Size></LI>
<LI><Size value={"l"}><Anchor
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>
</Box>
<Box title={"Terzo anno"}>