1
Fork 0
mirror of https://github.com/Steffo99/unisteffo.git synced 2024-11-29 03:14:19 +00:00

🔧 Rename and improve TitleBox into appuntiweb/Box

This commit is contained in:
Steffo 2021-03-24 15:58:31 +01:00
parent 557b5476d8
commit 4dad6a872b
Signed by: steffo
GPG key ID: 6965406171929D01
7 changed files with 484 additions and 479 deletions

View file

@ -1,5 +1,5 @@
import React, {Fragment, useState} from "react"; import React, {useState} from "react";
import {BaseLink, Bluelib, Main} from "bluelib/lib/components"; import {Bluelib, Main} from "bluelib/lib/components";
import {Switch, Route} from "react-router-dom"; import {Switch, Route} from "react-router-dom";
import Home from "./routes/Home"; import Home from "./routes/Home";
import Error404 from "./routes/Error404"; import Error404 from "./routes/Error404";

22
src/components/Box.js Normal file
View file

@ -0,0 +1,22 @@
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}) {
return (
<Type className={classNames(Style.Panel, className)} {...props}>
<Title size={"l"}>
{title}
</Title>
{children}
</Type>
)
}
Box.propTypes = {
children: PropTypes.node,
title: PropTypes.node
}

View file

@ -0,0 +1,3 @@
.Panel {
min-width: 240px;
}

View file

@ -1,20 +0,0 @@
import React from "react";
import {Box, Title} from "bluelib/lib/components";
import PropTypes from "prop-types";
export default function TitleBox({children, title}) {
return (
<Box>
<Title size={"l"}>
{title}
</Title>
{children}
</Box>
)
}
TitleBox.propTypes = {
children: PropTypes.node,
title: PropTypes.node
}

File diff suppressed because it is too large Load diff

File diff suppressed because it is too large Load diff

View file

@ -1,7 +1,7 @@
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 {Size, Anchor, BaseLink as A, Paragraph as P, Bold as B, ListItem as LI} from "bluelib/lib/components";
import TitleSplit from "../components/TitleSplit"; import TitleSplit from "../components/TitleSplit";
import TitleBox from "../components/TitleBox"; import Box from "../components/Box";
import SelectSkin from "../components/SelectSkin"; import SelectSkin from "../components/SelectSkin";
@ -9,33 +9,33 @@ export default function Home({skin, setSkin}) {
return ( return (
<article> <article>
<TitleSplit title={<span>Appunti open source di <A href={"https://steffo.eu"}>Steffo</A></span>}> <TitleSplit title={<span>Appunti open source di <A href={"https://steffo.eu"}>Steffo</A></span>}>
<TitleBox 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>
</TitleBox> </Box>
<TitleBox 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}/>
</P> </P>
</TitleBox> </Box>
</TitleSplit> </TitleSplit>
<TitleSplit title={"Università"}> <TitleSplit title={"Università"}>
<TitleBox 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 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/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/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_AlgoritmiEStruttureDati"}>Algoritmi e strutture dati</Anchor></Size></LI>
</ul> </ul>
</TitleBox> </Box>
<TitleBox 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 href={"https://github.com/Steffo99/appunti-universitari/tree/master/2019_ProgrammazioneAdOggetti"}>Programmazione ad oggetti</Anchor></Size></LI>
@ -46,12 +46,12 @@ export default function Home({skin, setSkin}) {
<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/#/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://old.uni.steffo.eu/#/ottimizzazionelineare"}>Ottimizzazione lineare intera</Anchor></Size></LI>
</ul> </ul>
</TitleBox> </Box>
<TitleBox title={"Terzo anno"}> <Box title={"Terzo anno"}>
<ul> <ul>
<LI><Size value={"l"}><A href={"/gestinfo"}>Gestione dell'informazione</A></Size></LI> <LI><Size value={"l"}><A href={"/gestinfo"}>Gestione dell'informazione</A></Size></LI>
</ul> </ul>
</TitleBox> </Box>
</TitleSplit> </TitleSplit>
</article> </article>
) )