diff --git a/config.toml b/config.toml index 37c4507..3be181e 100644 --- a/config.toml +++ b/config.toml @@ -2,6 +2,7 @@ baseURL = 'http://example.org/' languageCode = 'pt-pt' defaultContentLanguage = "pt" title = "DRM Portugal" +summaryLength = 20 [markup.goldmark.renderer] unsafe= true diff --git a/content/artigos/2016-um-ano-cheio-de-drm/index.md b/content/artigos/2016-um-ano-cheio-de-drm/index.md index 03ed7ac..ef79cd8 100644 --- a/content/artigos/2016-um-ano-cheio-de-drm/index.md +++ b/content/artigos/2016-um-ano-cheio-de-drm/index.md @@ -3,9 +3,15 @@ title: "2016: um ano cheio de DRM" author: Marcos Marado date: 2016-12-01 21:49:00 categories: -- Legislação tags: -- CETA +- 2016 +- BE +- directiva +- DRM +- Governo +- Parlamento +- PCP +- W3C --- 2016 tem sido um ano bastante activo no que diz respeito ao DRM. diff --git a/content/artigos/alteracoes-ao-uso-de-drm-em-portugal/capa.png b/content/artigos/alteracoes-ao-uso-de-drm-em-portugal/capa.png new file mode 100644 index 0000000..27e8339 Binary files /dev/null and b/content/artigos/alteracoes-ao-uso-de-drm-em-portugal/capa.png differ diff --git a/content/artigos/alteracoes-ao-uso-de-drm-em-portugal/index.md b/content/artigos/alteracoes-ao-uso-de-drm-em-portugal/index.md index f113770..bd5977e 100644 --- a/content/artigos/alteracoes-ao-uso-de-drm-em-portugal/index.md +++ b/content/artigos/alteracoes-ao-uso-de-drm-em-portugal/index.md @@ -2,7 +2,7 @@ title: Alterações ao uso de DRM em Portugal author: Marcos Marado date: 2023-04-30 13:20:00 -categoria: +categories: - Legislação tags: - directiva diff --git a/content/artigos/contra-drm-na-w3c/index.md b/content/artigos/contra-drm-na-w3c/index.md index 875f553..3d4ff70 100644 --- a/content/artigos/contra-drm-na-w3c/index.md +++ b/content/artigos/contra-drm-na-w3c/index.md @@ -1,7 +1,7 @@ --- title: ANSOL e AEL organizam demonstração contra algemas digitais no encontro da W3C author: Marcos Marado -date: 2016-09-08 23:29 +date: 2016-09-08 23:29:00 categories: - Legislação - Protesto diff --git a/content/artigos/diga-a-hp-nao-ao-drm/index.md b/content/artigos/diga-a-hp-nao-ao-drm/index.md index f6f08d0..cd6b57e 100644 --- a/content/artigos/diga-a-hp-nao-ao-drm/index.md +++ b/content/artigos/diga-a-hp-nao-ao-drm/index.md @@ -1,7 +1,7 @@ --- title: "Diga à HP: Não ao DRM!" author: Marcos Marado -date: 2016-10-02 18:18 +date: 2016-10-02 18:18:00 --- A HP activou recentemente uma funcionalidade secreta nas suas impressoras diff --git a/content/artigos/html-eme-e-normas-abertas/index.md b/content/artigos/html-eme-e-normas-abertas/index.md index 49bc38b..8745af9 100644 --- a/content/artigos/html-eme-e-normas-abertas/index.md +++ b/content/artigos/html-eme-e-normas-abertas/index.md @@ -1,7 +1,8 @@ --- title: HTML, EME e Normas Abertas author: Marcos Marado -date: 2016-09-18 20:26 +date: 2016-09-18 20:26:00 +carrousel: true categories: - Factos - HTML diff --git a/content/artigos/o-ceta-e-o-drm/index.md b/content/artigos/o-ceta-e-o-drm/index.md index af21273..c737127 100644 --- a/content/artigos/o-ceta-e-o-drm/index.md +++ b/content/artigos/o-ceta-e-o-drm/index.md @@ -1,7 +1,7 @@ --- title: "O CETA e o DRM" author: Marcos Marado -date: 2016-10-16 21:07 +date: 2016-10-16 21:07:00 categories: - Legislação tags: diff --git a/content/artigos/o-drm-impede-a-utilizacao-educativa/index.md b/content/artigos/o-drm-impede-a-utilizacao-educativa/index.md index 3b3ce0d..e99aa93 100644 --- a/content/artigos/o-drm-impede-a-utilizacao-educativa/index.md +++ b/content/artigos/o-drm-impede-a-utilizacao-educativa/index.md @@ -1,7 +1,8 @@ --- title: O DRM impede a utilização educativa author: Paula Simões -date: 2013-04-25 17:59 +date: 2013-04-25 17:59:00 +carrousel: true categories: - Factos --- diff --git a/content/artigos/o-drm-nao-impede-pirataria/index.md b/content/artigos/o-drm-nao-impede-pirataria/index.md index 92c77dd..280c37a 100644 --- a/content/artigos/o-drm-nao-impede-pirataria/index.md +++ b/content/artigos/o-drm-nao-impede-pirataria/index.md @@ -2,6 +2,7 @@ title: O DRM não impede a pirataria author: Paula Simões date: 2013-04-20 23:17:00 +carrousel: true categories: - Factos tags: diff --git a/content/artigos/parlamento-aprova-projeto-de-lei-que-resolve-drm-fixcopyright-publicdomain/index.md b/content/artigos/parlamento-aprova-projeto-de-lei-que-resolve-drm-fixcopyright-publicdomain/index.md index 56707bd..3af8da2 100644 --- a/content/artigos/parlamento-aprova-projeto-de-lei-que-resolve-drm-fixcopyright-publicdomain/index.md +++ b/content/artigos/parlamento-aprova-projeto-de-lei-que-resolve-drm-fixcopyright-publicdomain/index.md @@ -2,6 +2,7 @@ title: "Parlamento aprova projeto de lei que resolve #DRM #FixCopyright #PublicDomain" author: Paula Simões date: 2017-04-08 20:49:00 +destaque: true categories: - Legislação tags: diff --git a/content/artigos/social-drm/index.md b/content/artigos/social-drm/index.md index 763404a..cb586ba 100644 --- a/content/artigos/social-drm/index.md +++ b/content/artigos/social-drm/index.md @@ -1,7 +1,7 @@ --- title: Social DRM author: Marcos Marado -date: 2013-04-21 17:59 +date: 2013-04-21 17:59:00 categories: - DRM Social --- diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html index 0ebafb3..427b837 100644 --- a/layouts/_default/baseof.html +++ b/layouts/_default/baseof.html @@ -3,12 +3,8 @@ {{ block "title" . }}{{ .Site.Title }}{{ end }} - + +
@@ -31,23 +27,55 @@ hr { clear: both; } diff --git a/layouts/_default/list.html b/layouts/_default/list.html index bcdde22..ccc329b 100644 --- a/layouts/_default/list.html +++ b/layouts/_default/list.html @@ -1,6 +1,23 @@ {{ define "main" }} -lista: +

Arquivos da categoria: {{ .Name }}

+ {{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html index 5ff0595..9e355b6 100644 --- a/layouts/_default/single.html +++ b/layouts/_default/single.html @@ -2,29 +2,22 @@ {{ .Title }} | {{ .Site.Title }} {{ end }} {{ define "main" }} -

{{ .Title }}

+
+

{{ .Title }}

- {{ .Params.coverdescription }} - {{ .Params.coverdescription }} - {{ .Params.coverdescription }} - - {{ .Content }} - - {{ if (eq .Section "artigos") }} -
-

- Publicado por {{ .Params.author }} - // - {{ if .Params.categories }} - {{ range $index, $name := .Params.categories }} - {{ $name }}{{ if ne (add $index 1) (len $.Params.categories) }}, {{ end }} - {{ end }} - {{ else }} - Sem categoria + {{ $cover := (index (.Resources.ByType "image") 0) }} + {{ if $cover }} +

+ {{ .Params.coverdescription }} +
{{ .Params.covercaption }}
+
{{ end }} - // - {{ time.Format "02 de January, 2006" .Date }} -

- {{ end }} + {{ .Content }} + + {{ if (eq .Section "artigos") }} +
+ {{ partial "byline.html" . }} + {{ end }} +
{{ end }} diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..31eea40 --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,89 @@ +{{ define "main" }} + + {{ $articles := (where .Site.RegularPages "Params.carrousel" true) }} + {{ $len := len $articles }} + +
+ {{ range $index, $article := $articles }} + + {{ end }} + +
+ {{ range $index, $article := $articles }} + + {{ end }} +
+ + +
+ + +

Em destaque

+ {{ $articles := (where .Site.RegularPages "Params.destaque" true) }} + + +

Mais artigos

+ {{ $articles := (where .Site.RegularPages "Section" "artigos") }} + + {{ $recent := (first 5 (sort $articles "Date" "desc")) }} + +{{ end }} diff --git a/layouts/partials/byline.html b/layouts/partials/byline.html new file mode 100644 index 0000000..d7e2aec --- /dev/null +++ b/layouts/partials/byline.html @@ -0,0 +1,14 @@ +

+ Publicado por {{ .Params.author }} + // + {{ if .Params.categories }} + {{ range $index, $name := .Params.categories }} + {{ $name }}{{ if ne (add $index 1) (len $.Params.categories) }}, {{ end }} + {{ end }} + {{ else }} + Sem categoria + {{ end }} + // + {{ time.Format "02 de January, 2006" .Date }} +

+ diff --git a/static/img/carrousel-nav.png b/static/img/carrousel-nav.png new file mode 100644 index 0000000..7fcc905 Binary files /dev/null and b/static/img/carrousel-nav.png differ diff --git a/static/styles.css b/static/styles.css new file mode 100644 index 0000000..e1970e2 --- /dev/null +++ b/static/styles.css @@ -0,0 +1,219 @@ +html { padding: 0; margin: 0; } +body { + font-family: "PT Sans", Helvetica, Arial, sans-serif; + font-size: 14px; + max-width: 980px; + margin: 1rem auto; + display: grid; + box-shadow: 0 0px 8px rgba(150, 150, 150, 0.4); + padding: 1rem; + color: #444; + + grid-template-areas: "header header" "navigation navigation" "main sidebar" "footer footer"; + grid-template-columns: 65% 30%; + justify-content: space-between; +} + +header { grid-area: header; } +nav { grid-area: navigation; } +main { grid-area: main; } +aside { grid-area: sidebar; } +footer { grid-area: footer; } + +a:hover { color: #C4302B; } +a, a:visited { color: #333; } + +h1, h2 { + font-family: 'Oswald', Helvetica, Arial, sans-serif; + font-weight: normal; +} + +h1 { font-size: 24px; } +aside h2 { + text-transform: uppercase; + font-size: 16px; +} + + +aside { border-left: 1px solid #ccc; padding-left: 1rem; } + +aside section { margin-bottom: 2rem; } + +aside ul { list-style-type: none; padding: 0; } +aside ul li { margin-bottom: 0.5rem; } + +figure.cover { text-align: center; } +figure.cover img { max-width: auto; display: block; margin: 0px auto; } + +nav { + border-top: 1px solid #ccc; + border-bottom: 1px solid #ccc; + display: flex; + flex-wrap: wrap; + white-space: nowrap; +} + +nav > * { + font-size: 12px; + font-family: Helvetica, Arial, sans-serif; + margin: 0.75rem 0; + padding: 0.25rem 1rem; + text-transform: uppercase; +} +nav > *:nth-child(n + 2) { + border-left: 1px solid #ccc; +} + +main img { + max-width: 100%; + border: 1px solid #E1E1E1; + background-color: #f3f3f3; + padding: 4px; +} + +footer { + border-top: 1px solid #ccc; + padding-top: 1rem; +} + +blockquote { + clear: both; +} + +hr { + clear: both; +} + +.articles { list-style-type: none; padding: 0; border-top: 1px solid #ccc; padding-top: 3rem; } +.articles h2 { margin-top: 0; font-size: 22px; } +.articles.detailed li:nth-child(n + 2)::before { + content: ""; + display: block; + height: 22px; + width: 100%; + background-image: url(/widget-divider.png); +} + +.articles:not(.detailed) .byline { display: none; } +.articles:not(.detailed) { border-top: none; padding-top: 0.5rem; } + +.articles .summary { overflow: auto; } +.articles .readmore { text-align: right; } +.articles img { float: left; max-width: 170px; margin-right: 1rem; } + +aside h2, .with-divider { background: url(/widget-divider.png); background-repeat: repeat-x; background-position: center; } +aside h2 span, .with-divider span { background-color: white; padding-right: 0.5rem; } + +@media (max-width: 768px) { + body { + grid-template-areas: "header" "navigation" "main" "sidebar" "footer"; + grid-template-columns: 1fr; + } + aside { border-left: none; padding-left: 0; } +} + +.carrousel { + position: relative; +} +.carrousel ul { + list-style-type: none; + padding: 0; +} + +.carrousel li { + display: block; + height: 300px; + position: relative; + overflow: hidden; + display: flex; + flex-direction: column; + justify-content: end; +} + +.carrousel img { + display: block; + position: absolute; + max-width: 100%; + z-index: -1; + top: 0; + border: 0; + padding: 0; + margin: 0; +} + +.carrousel h2 { + color: white; + background-color: #C4302B; + display: inline-block; + box-shadow: 4px 4px 4px rgba(0, 0, 0, 0.9); + margin: 0 1rem; + padding: 0.25rem 1rem; + font-size: 16px; +} + +.carrousel .summary { + color: white; + background-color: rgb(0,0,0,0.75); + margin: 1rem; + padding: 0.5rem; +} + +.carrousel .nav { + display: block; + position: absolute; + top: 50%; + width: 27px; + height: 27px; + z-index: 4; + cursor: pointer; +} + +.carrousel .nav.prev { + background-image: url(/img/carrousel-nav.png); + left: 1rem; +} + +.carrousel .nav.next { + background-image: url(/img/carrousel-nav.png); + background-position: 27px 0; + right: 1rem; +} + +.carrousel .carrousel-control { display: none; } +.carrousel .item { display: none; } +.carrousel #v0:checked ~ ul .item0, +.carrousel #v1:checked ~ ul .item1, +.carrousel #v2:checked ~ ul .item2, +.carrousel #v3:checked ~ ul .item3, +.carrousel #v4:checked ~ ul .item4 { display: flex; } + +.carrousel-controls { + position: absolute; + top: 1rem; + width: 100%; + text-align: center; + display: flex; + gap: 1rem; + justify-content: center; + z-index: 2; +} + +.carrousel-visible-control { + display: block; + padding: 5px; + width: 10px; + height: 10px; + border-radius: 12px; + border: 1px solid black; + background-color: white; + cursor: pointer; + box-shadow: 0 0px 3px rgba(0, 0, 0, 0.9); +} + +.carrousel #v0:checked ~ .carrousel-controls .carrousel-visible-control[for="v0"], +.carrousel #v1:checked ~ .carrousel-controls .carrousel-visible-control[for="v1"], +.carrousel #v2:checked ~ .carrousel-controls .carrousel-visible-control[for="v2"], +.carrousel #v3:checked ~ .carrousel-controls .carrousel-visible-control[for="v3"], +.carrousel #v4:checked ~ .carrousel-controls .carrousel-visible-control[for="v4"], +.carrousel #v5:checked ~ .carrousel-controls .carrousel-visible-control[for="v5"] +{ background-color: #C4302B !important; } diff --git a/static/widget-divider.png b/static/widget-divider.png new file mode 100644 index 0000000..cce2535 Binary files /dev/null and b/static/widget-divider.png differ