Iniziato il nuovo sito e aggiunto il serving di file statici

main-old
Antonio De Lucreziis 5 years ago
parent 744d7e0860
commit bffe3056f7

@ -1,3 +1,7 @@
# Nuovo Sito Poisson
Servizio del nuovo sito del PHC
## Development
Esegui `go run main.go` per farlo girare su `localhost:8000` e vedere le modifiche in diretta, amico.

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 MiB

@ -0,0 +1,84 @@
@import url('https://fonts.googleapis.com/css2?family=Sen&family=Work+Sans:wght@700&display=swap');
* {
box-sizing: border-box;
}
html,
body {
margin: 0;
min-height: 100vh;
display: flex;
flex-direction: column;
position: relative;
font-family: 'Sen';
}
h1, h2, h3, h4 {
font-family: 'Work Sans';
font-weight: 700;
}
body {
max-width: 50rem;
margin: 0 auto;
padding: 0 0.5em;
}
nav {
display: flex;
align-items: center;
border-bottom: 1px solid #ddd;
flex-wrap: wrap;
}
.hfill {
flex-grow: 1;
}
.vfill {
flex-grow: 1;
}
.news-list {
display: flex;
}
.news-list > article {
margin: 1em;
/* padding: 1em; */
/* background: greenyellow; */
}
.nav-item {
margin: 1em 0.75em;
}
body > div:last-of-type {
margin-bottom: 20em;
}
footer {
position: absolute;
bottom: 0;
width: 100%;
height: 3em;
display: flex;
align-items: center;
justify-content: center;
border-top: 1px solid #ddd;
}
@media screen and (max-width: 600px) {
body {
width: 100%;
overflow-x: hidden;
}
.news-list {
flex-direction: column;
}
}

@ -11,6 +11,11 @@ func serveHome(w http.ResponseWriter, r *http.Request) {
func main() {
// Serve assets files
fs := http.FileServer(http.Dir("./assets"))
http.Handle("/assets/", http.StripPrefix("/assets/", fs))
// Serve homepage
http.HandleFunc("/", serveHome)
log.Println("Listening on :8000...")

@ -1,13 +1,84 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PHC</title>
<link rel="stylesheet" href="/assets/style.css">
</head>
<body>
<h1>PHC Poisson</h1>
<nav>
<!-- Site -->
<div class="nav-item">
<a href="/">Poisson</a>
</div>
<div class="nav-item">
<a href="/utenti">Utenti</a>
</div>
<div class="nav-item">
<a href="/notizie">Notizie</a>
</div>
<div class="nav-item">
<a href="/guide">Guide</a>
</div>
<div class="nav-item">
<a href="/git">Git</a>
</div>
<div class="nav-item">
Forum
</div>
<div class="hfill"></div>
<!-- User -->
<div class="nav-item">
<a href="/login">Login</a>
</div>
</nav>
<h1>Poisson</h1>
Lorem, ipsum dolor sit amet consectetur adipisicing elit. Fuga reprehenderit similique pariatur asperiores? Adipisci commodi tempore perspiciatis culpa architecto, accusantium reprehenderit, nisi explicabo minus minima maiores ab consectetur totam quos.
<h2>Macchinisti</h2>
<ul>
<li>Persona 1 &mdash; <a href="poisson.phc.dm.unipi.it/~persona">poisson.phc.dm.unipi.it/~persona</a></li>
<li>Persona 1 &mdash; <a href="poisson.phc.dm.unipi.it/~persona">poisson.phc.dm.unipi.it/~persona</a></li>
<li>Persona 1 &mdash; <a href="poisson.phc.dm.unipi.it/~persona">poisson.phc.dm.unipi.it/~persona</a></li>
<li>Persona 1 &mdash; <a href="poisson.phc.dm.unipi.it/~persona">poisson.phc.dm.unipi.it/~persona</a></li>
<li>Persona 1 &mdash; <a href="poisson.phc.dm.unipi.it/~persona">poisson.phc.dm.unipi.it/~persona</a></li>
<li>Persona 1 &mdash; <a href="poisson.phc.dm.unipi.it/~persona">poisson.phc.dm.unipi.it/~persona</a></li>
<li>Persona 1 &mdash; <a href="poisson.phc.dm.unipi.it/~persona">poisson.phc.dm.unipi.it/~persona</a></li>
</ul>
<div class="news-list">
<article>
<h3>Notizie 1</h3>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Amet quis eligendi aut consequatur quasi
veniam animi ducimus enim consectetur a.
</div>
</article>
<article>
<h3>Notizie 2</h3>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Amet quis eligendi aut consequatur quasi
veniam animi ducimus enim consectetur a.
</div>
</article>
<article>
<h3>Notizie 3</h3>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Amet quis eligendi aut consequatur quasi
veniam animi ducimus enim consectetur a.
</div>
</article>
</div>
<footer>
&copy; macchinisti@poisson.phc.dm.unipi.it
</footer>
</body>
</html>
Loading…
Cancel
Save