Preparazione sezione news

This commit is contained in:
loviuz 2022-07-03 15:58:57 +02:00
parent 5d1c5111e1
commit 007af51c24
7 changed files with 178 additions and 30 deletions

View File

@ -87,7 +87,45 @@
margin-bottom: 1em;
}
.hashtag{
color: #fff;
font-weight: bold;
/** NEWS **/
.news-image{
display: inline;
float: left;
position: relative;
margin-right: 1em;
margin-bottom: 1em;
}
.list ul.news-list li .date{
width: auto;
}
.list ul.news-list li .reading-time{
margin-left: 1em;
}
.list ul.news-list li a.title{
font-size: 1.3em;
}
.list ul.news-list .tag{
display: inline-block;
padding: 0.3rem 0.6rem;
background-color: #e0e0e0;
border-radius: 0.6rem;
line-height: 1.4em;
font-size: 0.8em;
}
.list ul.news-list .tag a{
color: #212121;
}
.list ul.news-list:not(.pagination) li{
display: block;
}
hr.light{
border: 1px solid #eee;
}

View File

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View File

@ -0,0 +1,14 @@
---
title: Impegno civico aperto nei comuni
description: A cosa serve un impegno civico aperto e soprattutto l'hacking civico?
date: 2022-07-03T15:08:00+02:00
image: impegno-civico-opensource.jpg
layout: news
tags:
- hacking civico
- lug
- open data
- open source
- openstreetmap
---

View File

@ -1,27 +0,0 @@
---
title: Impegno civico aperto nei comuni
description: Perché
date: 2022-07-03T15:08:00+02:00
image: impegno-civico-opensource.jpg
tags:
- hacking civico
- open data
- open source
- openstreetmap
---
OpenSTAManager è stato ed è ancora oggi il progetto più datato ma importante della mia carriera. E' nato per un idraulico nel lontano **2008** e grazie ai contributi della rete e dei colleghi di lavoro ora è diventato il software principale su cui lavoriamo nell'azienda di cui sono socio e dove lo personalizziamo per i clienti.
E' un gestionale completo scritto in PHP e MySQL per gestire attività di manutenzione, riparazione, per idraulici, elettricisti ma anche per molte altre tipologie di aziende che hanno la necessità di gestire ordini, ddt, anagrafiche, magazzino e fatturazione elettronica. E' stato sviluppato con una struttura custom scritta da zero, poi è stato aggiunto il motore di **Eloquent** e sono stati riscritti quasi tutti i moduli con una **struttura a oggetti**, ed è quasi in conclusione una versione (2.5) con un nuovo motore basato su **Laravel**. Tutto questo cambio di "motore" è stato iniziato e sviluppato egregiamente per qualche anno da [Thomas Zilio](https://github.com/Dasc3er/) e poi proseguito dagli altri contributori:
https://github.com/devcode-it/openstamanager/graphs/contributors
E' in sviluppo già una versione 3.0 con la riscrittura grafica tramite [Mithril](https://mithril.js.org/) da [Maicol Battistini](https://github.com/maicol07).
## Riferimenti
https://openstamanager.com
## Codice
https://github.com/devcode-it/openstamanager

4
layouts/news/li.html Normal file
View File

@ -0,0 +1,4 @@
<li>
<span class="date">{{ .Date | time.Format (.Site.Params.dateFormat | default "January 2, 2006" ) }}</span>
<a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a>
</li>

67
layouts/news/list.html Normal file
View File

@ -0,0 +1,67 @@
{{ define "title" }}
{{ title (i18n (lower .Title)) | default .Title }} · {{ .Site.Title }}
{{ end }}
{{ define "content" }}
<section class="container list">
<h1 class="title">
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{- if eq .Kind "term" -}}
{{- i18n .Data.Plural 1 | title -}}
{{- print ": " -}}
{{- end -}}
{{- i18n (lower .Title) | default .Title | title -}}
</a>
</h1>
{{ .Content }}
<ul class="news-list">
{{ range .Paginator.Pages }}
{{ $image := .Resources.GetMatch .Params.image }}
<li>
{{ if $image }}
{{ $image := $image.Resize "x260" }}
{{ $image := $image.Crop "260x180" }}
<div class="news-image">
<a href="{{ .Params.externalLink | default .RelPermalink }}">
<img src="{{ $image.RelPermalink }}">
</a>
</div>
<div class="date">
<span class="posted-on">
<i class="fa fa-calendar" aria-hidden="true"></i>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ .Date | time.Format (.Site.Params.dateFormat | default "2 January 2006" ) }}
</time>
</span>
<span class="reading-time">
<i class="fa fa-clock-o" aria-hidden="true"></i>
{{ i18n "reading_time" .ReadingTime }}
</span>
</div>
<hr class="light">
<a class="title" href="{{ .Params.externalLink | default .RelPermalink }}">{{ .Title }}</a><br>
<span class="description">{{ .Params.description }}</span>
<br><br>
{{ if .Params.tags }}
<div class="tags">
<i class="fa fa-tag" aria-hidden="true"></i>
{{- range $index, $el := .Params.tags -}}
{{- if gt $index 0 }}
<span class="separator"></span>
{{- end }}
<span class="tag">
<a href="{{ ( printf "tags/%s/" ( . | urlize ) ) | relLangURL }}">{{ . }}</a>
</span>
{{- end -}}
</div>
{{ end }}
<div style="clear:both;"></div>
</li>
{{ end }}
{{ end }}
</ul>
{{ partial "pagination.html" . }}
</section>
{{ end }}

52
layouts/news/single.html Normal file
View File

@ -0,0 +1,52 @@
{{ define "title" }}
{{ .Title }} · {{ .Site.Title }}
{{ end }}
{{ define "content" }}
<section class="container post">
<article>
<header>
<div class="post-title">
<h1 class="title">
<a class="title-link" href="{{ .Permalink | safeURL }}">
{{ .Title }}
</a>
</h1>
</div>
<div class="post-meta">
<div class="date">
<span class="posted-on">
<i class="fa fa-calendar" aria-hidden="true"></i>
<time datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">
{{ .Date | time.Format (.Site.Params.dateFormat | default "2 January 2006" ) }}
</time>
</span>
<span class="reading-time">
<i class="fa fa-clock-o" aria-hidden="true"></i>
{{ i18n "reading_time" .ReadingTime }}
</span>
</div>
{{ with .Page.Params.Authors }}{{ partial "taxonomy/authors.html" . }}{{ end }}
{{ with .Page.Params.Categories }}{{ partial "taxonomy/categories.html" . }}{{ end }}
{{ with .Page.Params.Tags }}{{ partial "taxonomy/tags.html" . }}{{ end }}
</div>
</header>
<div>
{{ if .Params.featuredImage }}
<img src="{{ .Params.featuredImage | relURL }}" alt="Featured image"/>
{{ end }}
{{ .Content }}
</div>
<footer>
{{ partial "posts/series.html" . }}
{{ partial "posts/disqus.html" . }}
{{ partial "posts/commento.html" . }}
{{ partial "posts/utterances.html" . }}
</footer>
</article>
{{ partial "posts/math.html" . }}
</section>
{{ end }}