Skip to content

Commit ed79535

Browse files
committed
fix: bunch of minor tweaks
1 parent 3ec8c8d commit ed79535

File tree

15 files changed

+33
-34
lines changed

15 files changed

+33
-34
lines changed

archetypes/default.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,5 +3,4 @@ title = '{{ replace .File.ContentBaseName "-" " " | title }}'
33
date = {{ .Date }}
44
draft = true
55
tags = []
6-
topics = []
76
+++

assets/css/_main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ pre:has(code) {
157157
}
158158

159159
:not(pre) > code {
160-
padding: .2rem;
160+
padding: .3rem .3rem 0;
161161
border-radius: .3rem;
162162
color: var(--code-text-color);
163163
background-color: var(--code-background-color) !important;

assets/css/root.css

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,19 +9,19 @@
99

1010
--quote-text-color: #888;
1111
--code-background-color: #333030;
12-
--code-text-color: #f2f0e3;
12+
--code-text-color: #f0efea;
1313
}
1414

1515
:root[color-scheme^='light'] {
1616
--body-text-color: #222;
17-
--body-background-color: #f2f0e3;
17+
--body-background-color: #f0efea;
1818

1919
--primary-color: #cd5c5c;
2020
--selection-color: #dda19b;
2121
}
2222

2323
:root[color-scheme^='dark'] {
24-
--body-text-color: #f2f0e3;
24+
--body-text-color: #f0efea;
2525
--body-background-color: #222;
2626

2727
--primary-color: #cd5c5c;

assets/js/search/search.js

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
// From https://github.com/frjo/hugo-theme-zen/blob/main/assets/js/search.js
1+
// base from https://github.com/frjo/hugo-theme-zen/blob/main/assets/js/search.js
22
import * as params from '@params';
33

44
(function () {
@@ -43,15 +43,13 @@ import * as params from '@params';
4343
const items = {};
4444
results.forEach(function (result) {
4545
result.result.forEach(function (r) {
46-
items[r.id] = r.doc;
46+
items[r.doc.permalink] = r.doc;
4747
});
4848
});
49-
console.log(items);
5049
showResults(items);
5150
}
5251

53-
function enableUI() {
54-
const searchform = document.querySelector('.search-form');
52+
function enableUI(searchform) {
5553
searchform.addEventListener('submit', function (e) {
5654
e.preventDefault();
5755
doSearch();
@@ -79,11 +77,13 @@ import * as params from '@params';
7977
.then(cb);
8078
}
8179

82-
buildIndex(function () {
83-
const q = new URLSearchParams(window.location.search).get("q");
84-
document.querySelector('.search-text').value = q || '';
85-
doSearch(q);
86-
});
87-
88-
enableUI()
80+
const searchform = document.querySelector('.search-form');
81+
if (searchform) {
82+
buildIndex(function () {
83+
const q = new URLSearchParams(window.location.search).get("q");
84+
document.querySelector('.search-text').value = q || '';
85+
doSearch(q);
86+
});
87+
enableUI(searchform)
88+
}
8989
})();

exampleSite/archetypes/default.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@
22
date = '{{ .Date }}'
33
draft = true
44
title = '{{ replace .File.ContentBaseName "-" " " | title }}'
5+
tags = []
56
+++

exampleSite/content/about.md

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,5 @@ type = 'blank'
88

99
> Hugo is one of the most popular open-source static site generators. With its amazing speed and flexibility, Hugo makes building websites fun again.
1010
11-
Rusty-Typewriter is a theme for Hugo sites made by [math-queiroz](https://github.com/math-queiroz). It's intended to be simple and used for blogs, being mostly inspired by the current [Zen Browser's website](https://zen-browser.app/) in style and other Hugo themes in functionality. It was primarily intended for personal use, but then made public for whomever find it worth using.
12-
13-
14-
## FAQ
15-
16-
11+
Rusty-Typewriter is a theme for Hugo sites made by [math-queiroz](https://github.com/math-queiroz). It's intended to be simple and used for blogs, being mostly inspired by the current [Zen Browser's website](https://zen-browser.app/) in style and other Hugo themes in functionality. It was initially intended for personal use, but made public for whomever find it worth using.
1712

exampleSite/content/posts/configuration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ featured = true
77
weight = 2
88
+++
99

10-
This page outlines the configuration options for the theme. There are plenty of settings for tune your site's layout and content presentation. Key features include options for controlling the side pane visibility, adjusting the number of items displayed on each list pages, and managing elements such as featured posts, recent posts, taxonomies, and related content.
10+
This page outlines the configuration options for the theme. There are plenty of settings for tweaking your site's layout and content presentation. Key features include options for controlling the side pane visibility, adjusting the number of items displayed on each list pages, and managing elements such as featured posts, recent posts, taxonomies, and related content.
1111

1212
## Global Config
1313

exampleSite/content/search.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
title = 'Search'
33
date = '2025-03-19T17:27:09-03:00'
44
type = 'blank'
5+
indexable = false
56
+++
67

8+
# Search
9+
10+
Here you can search for indexable pages, like posts and alike. There's also support for URL param "q" which then auto searches upon page load event!
11+
712
{{< search >}}

exampleSite/data/rtwt/content.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@ home:
44
text: 'The definitive, configurable, customizable, old fashioned rusty coloured theme for web writers and readers.'
55
side:
66
home:
7-
- content: 'Oh, and did I mention it has support for static side pane content? Cool, right?'
7+
- content: 'With support for rendering static side pane content in the home page.'
88
- title: 'Side Content Media'
9-
content: 'Static side content also does have support for clickable media, like images!'
9+
content: 'And static side content also supports clickable media, like image links!'
1010
imagePath: 'images/hugo.svg'
1111
imageHref: 'https://gohugo.io'
1212
imageWidth: '100%'

i18n/en.yaml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@ recent_posts: Recent Posts
1313
# Search
1414
js_required: It's necessary to enable Javascript
1515
search_loading: Loading...
16-
search_title: Search
1716
search_placeholder: Search...
1817

1918
# SidePane for home

0 commit comments

Comments
 (0)