Added news page

main-old
Antonio De Lucreziis 3 years ago
parent b442af689c
commit 41c654daea

@ -51,6 +51,14 @@ func main() {
}
})
r.Get("/news", func(w http.ResponseWriter, r *http.Request) {
err := renderer.Render(w, "news.html", util.H{})
if err != nil {
http.Error(w, err.Error(), http.StatusInternalServerError)
return
}
})
r.Get("/login", func(w http.ResponseWriter, r *http.Request) {
err := renderer.Render(w, "login.html", util.H{})
if err != nil {

@ -0,0 +1,105 @@
{{template "base" .}}
{{define "title"}}PHC • phc.dm.xxxxx.xx{{end}}
{{define "body"}}
<section>
<h2>Notizie Importanti</h2>
<div class="card-list">
<div class="card">
<div class="title">
<a href="/news/notizia-super-wow-1">News 1</a>
</div>
<div class="date">yyyy-mm-dd</div>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis nemo aperiam, voluptas quam alias esse sed
natus tempore suscipit fugiat sit delectus exercitationem numquam ipsum assumenda recusandae consequatur...
</div>
</div>
<div class="card">
<div class="title">
<a href="/news/notizia-super-wow-2">News 2</a>
</div>
<div class="date">yyyy-mm-dd</div>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis nemo aperiam, voluptas quam alias esse sed
natus tempore suscipit fugiat sit delectus exercitationem numquam ipsum assumenda recusandae consequatur...
</div>
</div>
</div>
</section>
<section>
<h2>Archivio notizie</h2>
<div class="card-list">
<div class="card">
<div class="title">
<a href="/news/notizia-antica-1">Notizia Antica 1</a>
</div>
<div class="date">yyyy-mm-dd</div>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis nemo aperiam, voluptas quam alias esse sed
natus tempore suscipit fugiat sit delectus exercitationem numquam ipsum assumenda recusandae consequatur...
</div>
</div>
<div class="card">
<div class="title">
<a href="/news/notizia-antica-2">Notizia Antica 2</a>
</div>
<div class="date">yyyy-mm-dd</div>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis nemo aperiam, voluptas quam alias esse sed
natus tempore suscipit fugiat sit delectus exercitationem numquam ipsum assumenda recusandae consequatur...
</div>
</div>
<div class="card">
<div class="title">
<a href="/news/notizia-antica-3">Notizia Antica 3</a>
</div>
<div class="date">yyyy-mm-dd</div>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis nemo aperiam, voluptas quam alias esse sed
natus tempore suscipit fugiat sit delectus exercitationem numquam ipsum assumenda recusandae consequatur...
</div>
</div>
<div class="card">
<div class="title">
<a href="/news/notizia-antica-4">Notizia Antica 4</a>
</div>
<div class="date">yyyy-mm-dd</div>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis nemo aperiam, voluptas quam alias esse sed
natus tempore suscipit fugiat sit delectus exercitationem numquam ipsum assumenda recusandae consequatur...
</div>
</div>
<div class="card">
<div class="title">
<a href="/news/notizia-antica-5">Notizia Antica 5</a>
</div>
<div class="date">yyyy-mm-dd</div>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis nemo aperiam, voluptas quam alias esse sed
natus tempore suscipit fugiat sit delectus exercitationem numquam ipsum assumenda recusandae consequatur...
</div>
</div>
<div class="card">
<div class="title">
<a href="/news/notizia-antica-6">Notizia Antica 6</a>
</div>
<div class="date">yyyy-mm-dd</div>
<div class="description">
Lorem ipsum dolor sit amet consectetur adipisicing elit. Quis nemo aperiam, voluptas quam alias esse sed
natus tempore suscipit fugiat sit delectus exercitationem numquam ipsum assumenda recusandae consequatur...
</div>
</div>
</div>
</section>
{{end}}
Loading…
Cancel
Save