Reste à prévoir la pagination et la recherche

This commit is contained in:
Laurent Ulrich
2025-08-20 16:19:55 +02:00
parent 10ebdaad4a
commit 9dd396e95f
8 changed files with 183 additions and 70 deletions

View File

@@ -3,14 +3,23 @@
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<link rel="stylesheet" href="../styles.css">
<title>{{.BlogTitle}}</title>
</head>
<h1><a href="/proxy/8080/">{{.BlogTitle}}</a></h1>
<h1 class="blogtitle"><a href="/proxy/8080/">{{.BlogTitle}}</a></h1>
<body>
<h2>{{.Title}}</h2>
<div>
<article class="post">
<header class="postheader">
<h2 class="posttitle">{{.Title}}</h2>
<p class="postdate"><time datetime="{{.Date}}">{{.Date}}</Time></p>
</header>
<div class="postcontent">
{{ if .HTML }}
{{.HTML}}
{{ else }}
{{.Text}}
{{ end }}
</div>
</article>
</body>
</html>

View File

@@ -4,36 +4,19 @@
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width" />
<title>{{.Title}}</title>
<style>
a:link {
color: black;
text-decoration: none;
}
a:visited {
color: black;
text-decoration: none;
}
a:hover {
color: orange;
text-decoration: none;
}
</style>
<link rel="stylesheet" href="styles.css">
</head>
<body>
<h1><a href="/proxy/8080/">{{.Title}}</a></h1>
<h1 class="blogtitle"><a href="/proxy/8080/">{{.Title}}</a></h1>
{{range .Posts}}
<article>
<h2><a href=/proxy/8080/post/{{ .Id }}>{{.Title}}</a></h2>
<address>
{{.Author}}
</address>
<article class="shortpost">
<header class="shortpostheader">
<h2 class="shortposttitle"><a href=/proxy/8080/post/{{ .Id }}>{{.Title}}</a></h2>
<p class="shortpostdate"><time datetime="{{.Date}}">{{.Date}}</Time></p>
</header>
<div>
<b>Extrait:</b>
<blockquote>{{.ShortText}}</blockquote>
<blockquote class="shortpostcontent">{{.ShortText}}</blockquote>
</div>
<footer>
<p>Publié le:<time datetime="{{.Date}}">{{.Date}}</Time></p>
</footer>
</article>
{{ end }}
</body>

59
html/styles.css Normal file
View File

@@ -0,0 +1,59 @@
a:link {
color: black;
text-decoration: none;
}
a:visited {
color: black;
text-decoration: none;
}
a:hover {
color: orange;
text-decoration: none;
}
.blogtitle {
color: coral;
text-decoration:underline;
}
/*
.shortpost {
}
.shortpostheader {
}
*/
.shortposttitle {
font-weight: bold;
}
.shortpostdate {
font-style: italic;
font-size: smaller;
font-weight: lighter;
}
/*
.shortpostcontent {
}
*/
/*
.post {
}
.postheader {
}
*/
.posttitle {
font-weight: bold;
}
.postdate {
font-style: italic;
font-size: smaller;
font-weight: lighter;
}
/*
.postcontent {
}
*/