Compare commits

...

16 Commits

Author SHA1 Message Date
eec3c13e9a Update layouts/notes/list.jsonfeed.json 2025-01-09 05:59:18 +01:00
5f5c7ecc76 update feed to tag content only 2025-01-08 16:51:35 -07:00
338e7e8b9e case change for BaseURL 2025-01-08 16:34:36 -07:00
a08f147d48 update head to include indieauth data 2025-01-08 16:32:24 -07:00
f577773958 another comma fix 2025-01-08 16:07:08 -07:00
593e6611c2 fixed template to handle commas correctly 2025-01-08 16:05:18 -07:00
38263a5906 update jsonfeed for notes 2025-01-08 15:54:46 -07:00
3fb8d959d5 try my own jsonfeed method 2025-01-08 15:52:39 -07:00
9083f3aba7 update index.json 2025-01-08 15:35:07 -07:00
8191679266 add json feed template for notes 2025-01-08 15:24:53 -07:00
0963c24be2 add code block styling 2025-01-08 15:18:31 -07:00
56b86c9a6a update theme to be a little responsive 2025-01-08 15:17:53 -07:00
7f62f892ba change nav from site title to Home 2025-01-07 20:22:28 -07:00
f683f1cf1d updated css 2025-01-07 20:19:09 -07:00
11a09e6c3c updated for microformats2 2025-01-07 19:43:39 -07:00
88236da4b8 update footer 2025-01-07 13:51:21 -07:00
19 changed files with 339 additions and 28 deletions

6
archetypes/articles.md Normal file
View File

@ -0,0 +1,6 @@
---
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
type: "articles"
draft: true
---

5
archetypes/notes.md Normal file
View File

@ -0,0 +1,5 @@
---
title: ""
date: {{ .Date }}
type: "notes"
---

6
archetypes/photos.md Normal file
View File

@ -0,0 +1,6 @@
---
title: ""
date: {{ .Date }}
type: "photos"
image: "" # Add the path to your image here
---

0
exampleSite/TODO Normal file
View File

View File

@ -1,20 +1,14 @@
<!DOCTYPE html>
<html lang="en">
<head>
<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">
{{ partial "head.html" . }}
{{ partial "meta.html" . }}
</head>
<body>
<header>
<h1>{{ .Site.Title }}</h1>
</header>
<body class="h-card">
{{ partial "header.html" . }}
<main>
{{ block "main" . }}{{ end }}
</main>
<footer>
<p>&copy; {{ now.Year }} {{ .Site.Author }}</p>
</footer>
{{ partial "footer.html" . }}
</body>
</html>

View File

@ -1,12 +1,13 @@
{{ define "main" }}
<section>
<h2>Posts</h2>
<section class="h-feed">
<h2>{{ .Title }}</h2>
<ul>
{{ range .Pages }}
<li>
<a href="{{ .RelPermalink }}">{{ .Title }}</a>
<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 }}
{{ end }}

View File

@ -1,6 +1,9 @@
{{ define "main" }}
<article>
<h2>{{ .Title }}</h2>
<div>{{ .Content }}</div>
<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 }}

View 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 }}

View 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
View 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 }}

View 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 }}
]
}

View 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 }}

View File

@ -0,0 +1,7 @@
<footer>
<p>
&copy; {{ now.Year }}
<span class="p-author h-card">{{ .Site.Params.author.name }}</span>
</p>
<p>Powered by Hugo and the IndieWeb.</p>
</footer>

View 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">

View 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>

View 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
View 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 }}

View 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 }}

View File

@ -1,26 +1,207 @@
body {
font-family: Arial, sans-serif;
/* Global Styles */
html, body {
height: 100%;
margin: 0;
padding: 0;
line-height: 1.6;
display: flex;
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 {
background: #333;
color: #fff;
padding: 10px 20px;
text-align: center;
padding: 20px;
background: #f8f8f8;
border-bottom: 1px solid #ddd;
}
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 {
color: #007bff;
color: #007acc;
text-decoration: none;
}
a:hover {
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 */
}
}