Compare commits

...

1 Commits

Author SHA1 Message Date
iGor milhit 032d620582
wip site: réécrit la page d'accueil
- Déplace tout ce qui concerne le thème dans... le thème. Pourquoi
  s'évertuer à avoir un thème générique alors que je suis le seul à
  l'utiliser ?

Co-Authored-by: iGor milhit <igor@milhit.ch>
2026-06-12 15:54:36 +02:00
14 changed files with 18 additions and 329 deletions

View File

@ -1,43 +0,0 @@
// The following rules are styling the stream player
// that I'm using on top of live section pages.
// It doesn't belong to the theme, but to my website
// so it is here.
@use "@picocss/pico/scss/colors/index" as *;
.stream {
.status-player {
display: flex;
audio {
border-radius: 0 var(--pico-border-radius) var(--pico-border-radius) 0;
}
}
}
// Rules used by the off and on classes below
@mixin status {
display: flex;
border-radius: var(--pico-border-radius) 0 0 var(--pico-border-radius);
flex-grow: 1;
flex-direction: column;
justify-content: space-around;
text-transform: uppercase;
font-weight: bold;
text-align: center;
padding: 0 calc(var(--pico-spacing)/2);
margin: 0;
color: $grey-50;
}
.off {
@include status;
background-color: $red-500;
}
.on {
@include status;
background-color: $green-500;
}
// End of the stream section

View File

@ -1,20 +0,0 @@
////////////////////
// //
// Includes //
// //
////////////////////
// Overwrite the main SCSS theme file
// to add the stream rules that doesn't belong
// to the theme.
@use "picocss"; /* The pico css framework, customized */
@use "fonts"; /* The font face and fonts settings */
@use "variables"; /* Overrides the pico css variables and sets others */
@use "layout"; /* Main structure display */
@use "header";
@use "footer";
@use "lists"; /* Lists, post-infos, posts-lists */
@use "medias"; /* Audio, streams, figures, post-images */
@use "stream"; /* Specific to the stream player */
@use "texts";

View File

@ -1,6 +1,6 @@
baseURL: https://igor.milhit.ch/
DefaultContentLanguage: fr
title: iGor milhit
title: im
theme: portfoliGor
enableGitInfo: true
paginate: 0
@ -79,12 +79,12 @@ markup:
renderer:
unsafe: true
params:
Description: Site web personnel d'iGor milhit.
Description: Site web personnel d'iGor milhit (im).
Image: mySite.jpg
ImageDescription: Portrait de mouton aux couleurs sepia.
author:
name: iGor milhit
email: igor@milhit.ch
email: im@ignami.aleeas.com
siteSources:
# Git repository of the website
url: https://git.milhit.ch/igor/igor.milhit
@ -92,21 +92,22 @@ params:
# a Gitea or Forgejo intance? One of github, gitlab, gitea
type: gitea
# Professional contact data
contactsPro:
address: Rue Michel-Servet 1, 1211 Genève 4
phone: +41 22 379 59 30
email: igor.milhit@unige.ch
# contactsPro:
# address: Rue Michel-Servet 1, 1211 Genève 4
# phone: +41 22 379 59 30
# email: igor.milhit@unige.ch
# Personal contact data
contactsPriv:
address: Ch. des Clochettes 16, 1206 Genève
mobile: +41 76 552 80 59
email: igor@milhit.ch
publickey: igor-milhit-pub.asc
fingerprint: 843D 0CB6 A576 D7BE 4BF6 A63B 692D 97C3 D022 8A99
xmpp: igor@milhit.ch
cv: cv-igor-milhit.pdf
online:
git: https://git.milhit.ch/igor
# address: Ch. des Clochettes 16, 1206 Genève
# mobile: +41 76 552 80 59
email: blog@ignami.aleeas.com
# publickey: igor-milhit-pub.asc
# fingerprint: 843D 0CB6 A576 D7BE 4BF6 A63B 692D 97C3 D022 8A99
# xmpp: igor@milhit.ch
# cv: cv-igor-milhit.pdf
# online:
# git: https://git.milhit.ch/igor
local_include:
# Sets the script for the on/off button of the live player.
js: on_fiber.js
home_post_list: true

View File

@ -1,2 +0,0 @@
announcedLive = "Announce of the next live!"
announce = "Announce!"

View File

@ -1,2 +0,0 @@
announcedLive = "Annonce du prochain live!"
announce = "Annonce!"

View File

@ -1,15 +0,0 @@
<!DOCTYPE html>
<html lang="{{ .Language.Lang }}" prefix="og: http://ogp.me/ns#">
{{ partial "head.html" . }}
<body>
{{- partial "header.html" . -}}
<main aria-role="main" class="container"
itemscope itemtype="https://schema.org/Person">
{{- block "main" . }}{{- end }}
</main>
{{- partial "footer.html" . -}}
</body>
{{ if .Params.local_include }}
<script src="/js/on_fiber.js"></script>
{{ end }}
</html>

View File

@ -1,34 +0,0 @@
{{ define "main" }}
<header>
<h2>{{.Title}}</h2>
</header>
<!-- "{{.Content}}" pulls from the markdown content of the corresponding
_index.md -->
<main>
<header>
{{.Content }}
</header>
<section class="posts-list">
<!--
Ranges pages by the publish date, in reverse order, to display the
post titles of the section from most recent to older. If the pages
has the parameter announce, then it displays a marked warning.
-->
{{ range .Pages.ByPublishDate.Reverse }}
<article>
{{ if .Params.Announce }}
<a href="{{ .Permalink }}"
title="{{ i18n "announcedLive" }}">
{{- .Title -}}
</a> <mark>{{ i18n "announce" }}</mark>
{{ else }}
<a href="{{ .Permalink }}">
{{- .Title -}}
</a>
{{ end }}
{{ partial "lists-footer.html" . }}
</article>
{{ end }}
</section>
</main>
{{ end }}

View File

@ -1,57 +0,0 @@
<header class="container main-header">
<nav class="no-print" role="navigation" aria-label="Primary">
<ul>
<li>
<!-- Insert the logo in SVG xml -->
<a href="{{ .Site.BaseURL }}"
title="{{ .Site.Title }}">
{{ partial "logo.html" }}
</a>
</li>
<li>
<a href="{{ .Site.BaseURL }}"
class="title no-reformat"
title="{{ .Site.Title }}" >
<h1>{{ .Site.Title }}</h1>
</a>
</li>
</ul>
<ul class="header-navigation">
{{ $currentPage := . -}}
{{ range sort .Site.Menus.main -}}
<li class="nav-item secondary">
<a class="nav-item-link{{if or (
$currentPage.IsMenuCurrent "main" .
) (
$currentPage.HasMenuCurrent "main" .
) }} active{{end}}"
href="{{ .URL }}" title="{{ .Title }}">{{ .Name }}</a>
</li>
{{ end -}}
<li class="nav-item secondary">
{{ if .IsPage -}}
<a class="nav-item-link"
href="{{ .Site.BaseURL }}index.xml"
title="{{ i18n "subscribeToPublications" }} {{ i18n "toWebsite" }}">
{{ i18n "subscribe" }}
</a>
{{ else if .IsHome -}}
<a class="nav-item-link"
href="{{ .Site.BaseURL }}index.xml"
title="{{ i18n "subscribeToPublications" }} {{ i18n "toWebsite" }}">
{{ i18n "subscribe" }}
</a>
{{ else if .IsNode -}}
<a class="nav-item-link"
href="{{ .Permalink }}index.xml"
title="{{ i18n "subscribeToPublications" }} {{ i18n "toSection" }}">
{{ i18n "subscribe" }}
</a>
{{ end -}}
</li>
</ul>
</nav>
{{ if .Params.local_include }}
{{ partial "stream.html" }}
{{ end }}
</header>

View File

@ -1,21 +0,0 @@
<section class="home-posts-list">
<h2>{{ i18n "lastPosts" }}</h2>
<!--
Ranges regular pages by the publish date, in reverse order, to display the
post titles of the section from most recent to older, and the category.
-->
{{ range first 5 .Site.RegularPages.ByPublishDate.Reverse }}
<article>
{{ if .Params.Announce }}
<a href="{{ .Permalink }}"
title="{{ i18n "announcedLive" }}">
{{- .Title -}}
</a> <mark>{{ i18n "announce" }}</mark>
{{ else }}
<a href="{{ .Permalink }}">
{{- .Title -}}
</a>
{{ end }}
</article>
{{ end }}
</section>

View File

@ -1,18 +0,0 @@
<figure class="stream">
<div class="status-player">
<p id="on"></p>
<audio controls>
<source src="https://id-libre.org/live/stream.ogg" type="audio/ogg">
<source src="https://id-libre.org/live/stream.mp3" type="audio/mp3">
<p>Your browser does not support the <code>audio</code> element.</p>
</audio>
</div>
<figcaption>
<p>
Écouter le flux (s'il est «on»).
Pour utiliser ton propre client:
<a href="https://id-libre.org/live/stream.ogg">OGG</a>
<a href="https://id-libre.org/live/stream.mp3">MP3</a>
</p>
</figcaption>
</figure>

View File

@ -1,4 +0,0 @@
<!-- Author: Parsia Hakimian https://github.com/parsiya/Hugo-Shortcodes -->
<!-- abbr HTML tag -->
<abbr title="{{ .Get "title" }}">{{ .Get "text" }}</abbr>

View File

@ -1,80 +0,0 @@
<!-- Author: Parsia Hakimian https://github.com/parsiya/Hugo-Shortcodes -->
<!-- port of Octopress blockquote plugin http://octopress.org/docs/plugins/blockquote/ to Hugo
see readme for usage -->
<!-- Adapted by iGor milhit for his own purpose -->
<!-- reset scratch variables at the start -->
{{ $.Scratch.Set "bl_lang" false }}
{{ $.Scratch.Set "bl_author" false }}
{{ $.Scratch.Set "bl_source" false }}
{{ $.Scratch.Set "bl_link" false }}
{{ $.Scratch.Set "bl_title" false }}
{{ if .IsNamedParams }}
{{ $.Scratch.Set "bl_lang" (.Get "lang") }}
{{ $.Scratch.Set "bl_author" (.Get "author") }}
{{ $.Scratch.Set "bl_source" (.Get "source") }}
{{ $.Scratch.Set "bl_link" (.Get "link") }}
{{ $.Scratch.Set "bl_title" (.Get "title") }}
{{ else }}
<!-- for the positional version if any -->
{{ end }}
<!-- if title is not set explicitly then we need to beautify the link
if length of link is more than 32 chars, we will cut it off by 32 and
then drop everything after the last / if any and put it in into title -->
{{ with $.Scratch.Get "bl_title" }}
<!-- do nothing -->
{{ else }}
{{ with $.Scratch.Get "bl_link" }} <!-- if link is given -->
{{ range last 1 (split ($.Scratch.Get "bl_link" ) "://") }} <!-- split by :// and then only take the items after it to remove protocol:// -->
{{ $.Scratch.Set "title_without_protocol" . }}
{{ end }}
{{ range last 1 (split ($.Scratch.Get "title_without_protocol" ) "www.") }} <!-- also remove the www. at the start if any. we are using a second split because all URLS may not start with it -->
{{ $.Scratch.Set "title_without_protocol" . }}
{{ end }}
{{ $.Scratch.Set "bl_title" ($.Scratch.Get "title_without_protocol") }}
<!-- if link is longer than 32 bytes we should trim it -->
{{ if (gt (len ($.Scratch.Get "title_without_protocol") ) 32) }}
{{ $title := (slicestr ($.Scratch.Get "title_without_protocol") 0 32) }} <!-- get the first 32 characters of title_without_protocol -->
{{ $split_by_fw_slash := split $title "/" }} <!-- now split on / because we want to stop after the last forward slash -->
{{ $count := (sub (len $split_by_fw_slash) 1) }} <!-- we want everything but the last part so we adjust the count accordingly -->
{{ $.Scratch.Set "tempstring" "" }} <!-- temp variable to hold the concatinated string -->
{{ range first $count $split_by_fw_slash }} <!-- loop through all parts except last and concat them (add / between halves) -->
{{ $.Scratch.Set "tempstring" ( . | printf "%s%s/" ($.Scratch.Get "tempstring") | printf "%s" ) }}
{{ end }}
{{ $.Scratch.Set "bl_title" ( printf "%s..." ($.Scratch.Get "tempstring") | printf "%s" ) }}
{{ end }}
{{ end }}
{{ end }}
<figure class="citation">
<blockquote
{{- with $.Scratch.Get "bl_lang" }} lang="{{ . }}"{{ end -}}
{{- with $.Scratch.Get "bl_link" }} cite="{{ . }}"{{ end -}}>
{{ .Inner | markdownify | safeHTML -}}
{{ with $.Scratch.Get "bl_author" -}}
<figcaption>
{{ with $.Scratch.Get "bl_author" -}}{{ . }}{{ end }}
{{ with $.Scratch.Get "bl_source" }}
&mdash; <cite>{{ . }}</cite>
{{ else }}
{{ with $.Scratch.Get "bl_link" }}
&mdash; <cite>
<a href="{{ . }}" title="{{ . }}" rel="noopener noreferrer">{{ $.Scratch.Get "bl_title" }}</a> <!-- can't have new lines here -->
</cite>
{{ else }}
{{ with $.Scratch.Get "bl_title" }}
&mdash; <cite>
{{ $.Scratch.Get "bl_title" }}</a>
</cite>
{{ end }}
{{ end }}
{{ end }}
</figcaption>
{{- end -}}
</blockquote>
</figure>

View File

@ -1,16 +0,0 @@
const url = 'https://id-libre.org/live/status-json.xsl';
const statusElement = document.getElementById('on');
async function status() {
const response = await fetch(url);
const data = await response.json();
const status = data.icestats.source ? 'on' : 'off'
statusElement.innerHTML = status;
statusElement.classList.remove("on", "off");
statusElement.classList.add(status);
}
status();
setInterval(() => status(), 2000);

@ -1 +1 @@
Subproject commit 5074b69b605efddb7598bf9f935070ef9006c166
Subproject commit 724c45d4e63fc347077cf59de19fdb013c262ea3