Compare commits
16 Commits
00474fdb13
...
main
Author | SHA1 | Date | |
---|---|---|---|
eec3c13e9a | |||
5f5c7ecc76 | |||
338e7e8b9e | |||
a08f147d48 | |||
f577773958 | |||
593e6611c2 | |||
38263a5906 | |||
3fb8d959d5 | |||
9083f3aba7 | |||
8191679266 | |||
0963c24be2 | |||
56b86c9a6a | |||
7f62f892ba | |||
f683f1cf1d | |||
11a09e6c3c | |||
88236da4b8 |
6
archetypes/articles.md
Normal file
6
archetypes/articles.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
title: "{{ replace .Name "-" " " | title }}"
|
||||||
|
date: {{ .Date }}
|
||||||
|
type: "articles"
|
||||||
|
draft: true
|
||||||
|
---
|
5
archetypes/notes.md
Normal file
5
archetypes/notes.md
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
---
|
||||||
|
title: ""
|
||||||
|
date: {{ .Date }}
|
||||||
|
type: "notes"
|
||||||
|
---
|
6
archetypes/photos.md
Normal file
6
archetypes/photos.md
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
---
|
||||||
|
title: ""
|
||||||
|
date: {{ .Date }}
|
||||||
|
type: "photos"
|
||||||
|
image: "" # Add the path to your image here
|
||||||
|
---
|
0
exampleSite/TODO
Normal file
0
exampleSite/TODO
Normal file
@ -1,20 +1,14 @@
|
|||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<head>
|
<head>
|
||||||
<meta charset="UTF-8">
|
{{ partial "head.html" . }}
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
{{ partial "meta.html" . }}
|
||||||
<title>{{ .Title }}</title>
|
|
||||||
<link rel="stylesheet" href="/css/style.css">
|
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body class="h-card">
|
||||||
<header>
|
{{ partial "header.html" . }}
|
||||||
<h1>{{ .Site.Title }}</h1>
|
|
||||||
</header>
|
|
||||||
<main>
|
<main>
|
||||||
{{ block "main" . }}{{ end }}
|
{{ block "main" . }}{{ end }}
|
||||||
</main>
|
</main>
|
||||||
<footer>
|
{{ partial "footer.html" . }}
|
||||||
<p>© {{ now.Year }} {{ .Site.Author }}</p>
|
|
||||||
</footer>
|
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -1,12 +1,13 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<section>
|
<section class="h-feed">
|
||||||
<h2>Posts</h2>
|
<h2>{{ .Title }}</h2>
|
||||||
<ul>
|
<ul>
|
||||||
{{ range .Pages }}
|
{{ range .Pages }}
|
||||||
<li>
|
<li class="h-entry">
|
||||||
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
|
<a href="{{ .RelPermalink }}" class="p-name u-url">{{ .Title }}</a>
|
||||||
|
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||||
</li>
|
</li>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</ul>
|
</ul>
|
||||||
</section>
|
</section>
|
||||||
{{ end }}
|
{{ end }}
|
@ -1,6 +1,9 @@
|
|||||||
{{ define "main" }}
|
{{ define "main" }}
|
||||||
<article>
|
<article class="h-entry">
|
||||||
<h2>{{ .Title }}</h2>
|
<h1 class="p-name">{{ .Title }}</h1>
|
||||||
<div>{{ .Content }}</div>
|
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||||
|
<div class="e-content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
</article>
|
</article>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
|
13
layouts/articles/list.html
Normal file
13
layouts/articles/list.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<section class="h-feed">
|
||||||
|
<h2>Articles</h2>
|
||||||
|
<ul>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<li class="h-entry">
|
||||||
|
<a href="{{ .RelPermalink }}" class="p-name u-url">{{ .Title }}</a>
|
||||||
|
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
{{ end }}
|
9
layouts/articles/single.html
Normal file
9
layouts/articles/single.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<article class="h-entry">
|
||||||
|
<h1 class="p-name">{{ .Title }}</h1>
|
||||||
|
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||||
|
<div class="e-content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
13
layouts/notes/list.html
Normal file
13
layouts/notes/list.html
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<section class="h-feed">
|
||||||
|
<h2>Notes</h2>
|
||||||
|
<ul>
|
||||||
|
{{ range .Pages }}
|
||||||
|
<li class="h-entry">
|
||||||
|
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||||
|
<div class="e-content">{{ .Content }}</div>
|
||||||
|
</li>
|
||||||
|
{{ end }}
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
{{ end }}
|
18
layouts/notes/list.jsonfeed.json
Normal file
18
layouts/notes/list.jsonfeed.json
Normal file
@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
"version": "https://jsonfeed.org/version/1.1",
|
||||||
|
"title": "{{ .Site.Title }} - Notes Feed",
|
||||||
|
"home_page_url": "{{ .Site.BaseURL }}",
|
||||||
|
"feed_url": "{{ .Permalink }}",
|
||||||
|
"description": "A feed of my notes from {{ .Site.Title }}",
|
||||||
|
"items": [
|
||||||
|
{{- $length := sub (len .Pages) 1 -}}
|
||||||
|
{{- range $index, $page := .Pages.ByDate.Reverse -}}
|
||||||
|
{
|
||||||
|
"id": "{{ $page.Permalink }}",
|
||||||
|
"url": "{{ $page.Permalink }}",
|
||||||
|
"content_html": {{ .Content | jsonify }},
|
||||||
|
"date_published": "{{ $page.Date.Format "2006-01-02T15:04:05Z07:00" }}"
|
||||||
|
}{{ if lt $index $length }},{{ end }}
|
||||||
|
{{- end }}
|
||||||
|
]
|
||||||
|
}
|
8
layouts/notes/single.html
Normal file
8
layouts/notes/single.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<article class="h-entry">
|
||||||
|
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||||
|
<div class="e-content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
7
layouts/partials/footer.html
Normal file
7
layouts/partials/footer.html
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
<footer>
|
||||||
|
<p>
|
||||||
|
© {{ now.Year }}
|
||||||
|
<span class="p-author h-card">{{ .Site.Params.author.name }}</span>
|
||||||
|
</p>
|
||||||
|
<p>Powered by Hugo and the IndieWeb.</p>
|
||||||
|
</footer>
|
9
layouts/partials/head.html
Normal file
9
layouts/partials/head.html
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
<meta charset="UTF-8">
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
|
<title>{{ .Title }}</title>
|
||||||
|
<link rel="stylesheet" href="/css/style.css">
|
||||||
|
<link rel="me" href="{{ .Site.Params.indieweb.me_url }}" />
|
||||||
|
<link href="mailto:{{ .Site.Params.author.email }}" rel="me">
|
||||||
|
<link rel="authorization_endpoint" href="https://indieauth.com/auth">
|
||||||
|
<link rel="token_endpoint" href="https://tokens.indieauth.com/token">
|
||||||
|
<link rel="micropub" href="{{ .Site.BaseURL }}/micropub">
|
8
layouts/partials/header.html
Normal file
8
layouts/partials/header.html
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
<header>
|
||||||
|
<nav>
|
||||||
|
<a class="u-url p-name" href="/">Home</a>
|
||||||
|
<a href="/notes">Notes</a>
|
||||||
|
<a href="/articles">Articles</a>
|
||||||
|
<a href="/photos">Photos</a>
|
||||||
|
</nav>
|
||||||
|
</header>
|
6
layouts/partials/meta.html
Normal file
6
layouts/partials/meta.html
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
<!-- Webmention -->
|
||||||
|
<link rel="webmention" href="{{ .Site.Params.webmention.endpoint }}" />
|
||||||
|
<link rel="pingback" href="{{ .Site.Params.webmention.pingback }}" />
|
||||||
|
|
||||||
|
<!-- Micropub -->
|
||||||
|
<link rel="micropub" href="{{ .Site.Params.micropub.endpoint }}" />
|
14
layouts/photos/list.html
Normal file
14
layouts/photos/list.html
Normal file
@ -0,0 +1,14 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<section class="h-feed">
|
||||||
|
<h2>Photos</h2>
|
||||||
|
<div class="photo-grid">
|
||||||
|
{{ range .Pages }}
|
||||||
|
<figure class="h-entry">
|
||||||
|
<img src="{{ .Params.image }}" alt="{{ .Title }}" class="u-photo">
|
||||||
|
<figcaption class="p-name">{{ .Title }}</figcaption>
|
||||||
|
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||||
|
</figure>
|
||||||
|
{{ end }}
|
||||||
|
</div>
|
||||||
|
</section>
|
||||||
|
{{ end }}
|
10
layouts/photos/single.html
Normal file
10
layouts/photos/single.html
Normal file
@ -0,0 +1,10 @@
|
|||||||
|
{{ define "main" }}
|
||||||
|
<article class="h-entry">
|
||||||
|
<h1 class="p-name">{{ .Title }}</h1>
|
||||||
|
<time class="dt-published" datetime="{{ .Date.Format "2006-01-02T15:04:05Z07:00" }}">{{ .Date.Format "Jan 2, 2006" }}</time>
|
||||||
|
<img src="{{ .Params.image }}" alt="{{ .Title }}" class="u-photo">
|
||||||
|
<div class="e-content">
|
||||||
|
{{ .Content }}
|
||||||
|
</div>
|
||||||
|
</article>
|
||||||
|
{{ end }}
|
@ -1,26 +1,207 @@
|
|||||||
body {
|
/* Global Styles */
|
||||||
font-family: Arial, sans-serif;
|
html, body {
|
||||||
|
height: 100%;
|
||||||
margin: 0;
|
margin: 0;
|
||||||
padding: 0;
|
display: flex;
|
||||||
line-height: 1.6;
|
flex-direction: column;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
font-family: 'Georgia', serif; /* Clean serif typography */
|
||||||
|
background-color: #fff;
|
||||||
|
color: #333;
|
||||||
|
line-height: 1.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Wrapper and Layout */
|
||||||
header, footer {
|
header, footer {
|
||||||
background: #333;
|
|
||||||
color: #fff;
|
|
||||||
padding: 10px 20px;
|
|
||||||
text-align: center;
|
text-align: center;
|
||||||
|
padding: 20px;
|
||||||
|
background: #f8f8f8;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
}
|
}
|
||||||
|
|
||||||
main {
|
main {
|
||||||
padding: 20px;
|
flex: 1; /* Ensures main fills available space */
|
||||||
|
max-width: 750px;
|
||||||
|
margin: 40px auto;
|
||||||
|
padding: 0 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Header Links */
|
||||||
|
header nav a {
|
||||||
|
font-family: 'Courier New', monospace;
|
||||||
|
font-size: 1.2rem;
|
||||||
|
color: #007acc;
|
||||||
|
text-decoration: none;
|
||||||
|
margin: 0 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
header nav a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Footer */
|
||||||
|
footer {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #555;
|
||||||
|
border-top: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Notes Section */
|
||||||
|
section.h-feed ul {
|
||||||
|
list-style: none;
|
||||||
|
padding: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.h-feed ul li {
|
||||||
|
padding: 15px;
|
||||||
|
border-bottom: 1px solid #ddd;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.h-feed ul li:last-child {
|
||||||
|
border-bottom: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.h-feed ul li time {
|
||||||
|
font-size: 0.8rem;
|
||||||
|
color: #888;
|
||||||
|
display: block;
|
||||||
|
margin-bottom: 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Articles Section */
|
||||||
|
article.h-entry {
|
||||||
|
margin-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.h-entry h1 {
|
||||||
|
font-family: 'Georgia', serif;
|
||||||
|
font-size: 2rem;
|
||||||
|
margin-bottom: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.h-entry time {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #777;
|
||||||
|
margin-bottom: 15px;
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
|
||||||
|
article.h-entry .e-content {
|
||||||
|
font-size: 1.1rem;
|
||||||
|
line-height: 1.8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Code Block Styling */
|
||||||
|
pre {
|
||||||
|
background-color: #f4f4f4; /* Light gray background */
|
||||||
|
border: 1px solid #ddd; /* Subtle border */
|
||||||
|
border-radius: 5px; /* Rounded corners */
|
||||||
|
padding: 15px; /* Inner padding */
|
||||||
|
overflow-x: auto; /* Horizontal scrolling for long lines */
|
||||||
|
font-family: 'Courier New', monospace; /* Monospace font for readability */
|
||||||
|
font-size: 0.9rem; /* Slightly smaller font size */
|
||||||
|
line-height: 1.6;
|
||||||
|
color: #333; /* Dark text */
|
||||||
|
margin: 20px 0; /* Space around the block */
|
||||||
|
}
|
||||||
|
|
||||||
|
code {
|
||||||
|
font-family: 'Courier New', monospace; /* Monospace font for inline code */
|
||||||
|
font-size: 0.9rem;
|
||||||
|
background-color: #f4f4f4; /* Same background as pre blocks */
|
||||||
|
padding: 2px 4px; /* Small padding for inline code */
|
||||||
|
border-radius: 3px; /* Rounded corners */
|
||||||
|
color: #c7254e; /* Distinct color for code text */
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Optional: Highlight Inline Code */
|
||||||
|
article h-entry code {
|
||||||
|
background-color: #fffbdd; /* Light yellow background for inline code */
|
||||||
|
color: #d6336c; /* Reddish text for contrast */
|
||||||
|
font-weight: bold;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/* Photos Section */
|
||||||
|
.photo-grid {
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
|
||||||
|
gap: 20px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-grid figure {
|
||||||
|
margin: 0;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-grid img {
|
||||||
|
max-width: 100%;
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 1px solid #ddd;
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-grid figcaption {
|
||||||
|
font-size: 0.9rem;
|
||||||
|
color: #555;
|
||||||
|
margin-top: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Links */
|
||||||
a {
|
a {
|
||||||
color: #007bff;
|
color: #007acc;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
a:hover {
|
a:hover {
|
||||||
text-decoration: underline;
|
text-decoration: underline;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Responsive Design */
|
||||||
|
|
||||||
|
/* For small screens (below 768px) */
|
||||||
|
@media (max-width: 768px) {
|
||||||
|
body {
|
||||||
|
font-size: 90%; /* Reduce base font size for better scaling */
|
||||||
|
}
|
||||||
|
|
||||||
|
header nav a {
|
||||||
|
font-size: 1rem; /* Smaller navigation links */
|
||||||
|
margin: 0 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
main {
|
||||||
|
padding: 10px; /* Reduce horizontal padding */
|
||||||
|
}
|
||||||
|
|
||||||
|
article.h-entry h1 {
|
||||||
|
font-size: 1.5rem; /* Smaller article titles */
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-grid {
|
||||||
|
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); /* More compact grid */
|
||||||
|
}
|
||||||
|
|
||||||
|
footer {
|
||||||
|
padding: 10px; /* Smaller footer padding */
|
||||||
|
font-size: 0.8rem; /* Smaller footer text */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* For very small screens (below 480px) */
|
||||||
|
@media (max-width: 480px) {
|
||||||
|
header nav {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
}
|
||||||
|
|
||||||
|
header nav a {
|
||||||
|
margin: 5px 0; /* Stack navigation links vertically */
|
||||||
|
}
|
||||||
|
|
||||||
|
.photo-grid {
|
||||||
|
grid-template-columns: 1fr; /* Single-column photo grid */
|
||||||
|
}
|
||||||
|
}
|
||||||
|
Reference in New Issue
Block a user