1
0
Fork 0
mirror of https://git.sr.ht/~seirdy/seirdy.one synced 2024-11-23 12:52:10 +00:00

Compare commits

...

5 commits

Author SHA1 Message Date
Rohan Kumar
29371ed1f8
Fairsearch -> Yep rename 2022-06-03 17:41:34 -07:00
Rohan Kumar
bc6577e241
Make: Allow setting hugo flags for deploy-staging 2022-06-03 15:49:11 -07:00
Rohan Kumar
811c887755
CSS overhaul: non-overlapping outlines
I increased a bunch of tap targets to fit the recommended 48x48 sizes
and 56x56 non-overlapping regions, but unfortunately this caused
outlines to overlap with each other. This commit turns these elements
into inline-block elements and makes the necessary fixes to accomodate
this change.
2022-06-03 15:47:14 -07:00
Rohan Kumar
062c348d4e
CSS: increase endnote backlink tap target size
Should meet the 48x48px target now.
2022-06-02 22:04:21 -07:00
Rohan Kumar
be86ab3ac7
Archetypes and automation for composing notes
Create a shell script for composing a note/reply more quickly, including
launching the default $EDITOR
2022-06-02 22:03:23 -07:00
9 changed files with 145 additions and 43 deletions

View file

@ -119,9 +119,9 @@ deploy-onion:
# we only deploy html to the staging site
.PHONY: deploy-staging
deploy-staging:
@$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging .prepare-deploy
@$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging compress
@$(MAKE) HUGO_FLAGS='' DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging deploy-html
@$(MAKE) DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging .prepare-deploy
@$(MAKE) DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging compress
@$(MAKE) DOMAIN=staging.seirdy.one USER=deploy@seirdy.one OUTPUT_DIR=public_staging deploy-html
.PHONY: lint-and-deploy-staging
lint-and-deploy-staging:

View file

@ -1,5 +1,5 @@
---
title: "{{ replace .Name "-" " " | title }}"
title: "{{ .Name | humanize }}"
date: {{ .Date }}
draft: true
---

10
archetypes/reply.md Normal file
View file

@ -0,0 +1,10 @@
---
title: "{{ .Name | humanize }}"
date: {{ .Date }}
replyURI: ""
replyTitle: ""
replyType: ""
replyAuthor: ""
replyAuthorURI: ""
---

View file

@ -1,4 +1,5 @@
/* CSS that adds the bare minimum for a simple layout.
/* CSS that adds the bare minimum for a simple, accessible,
* touch-friendly layout.
* Nothing here exists purely for aesthetics; everything addresses a
* specific a11y, compatibility, or critical
* usability need.
@ -13,7 +14,7 @@
* don't actually use those for styling.
*
* To keep myself from caring about minute details, I limited myself to
* only defining spacing in increments of .125em. Pixels are 1px or
* only defining spacing in increments of .25em. Pixels are 1px or
* multiples of 3px. This also improves compression. No more "finding
* the perfect value".
*
@ -81,18 +82,6 @@ html {
max-width: 35em;
}
/* Compensate for misalignment and wasted space caused by padding
* and margin adjustments in nav children made to meet SC 2.5.5 */
footer > nav,
header > nav,
dt > a,
h2 + a {
margin-left: -.25em;
}
header > nav {
margin-bottom: -.75em;
}
summary {
/* The tappable region of a <summary> extends across the page.
* we need to tell users that the full space is interactive.
@ -111,35 +100,79 @@ html {
margin: .5em 0;
}
/* Make superscripts a bit easier to tap. */
sup > a {
margin-left: .25em;
padding-bottom: .25em;
}
/* SC 2.5.5, Google a11y: Increase tap target size a bit
* - Summary is a tappable button
* - standalone links in lists are usually parts of collections of
* links that should be easy to fat-finger
* - links that directly follow h2 without being contained in a
* paragraph are section permalinks. */
dt,
input,
dt > a,
summary,
h2 + a,
li > a,
nav li,
li details li,
input {
padding: .875em .25em;
li > a {
padding: .75em .25em;
}
/* Compensate for misalignment and wasted space caused by padding
* and margin adjustments in nav children made to meet SC 2.5.5
* Also prevent overlapping outlines on focus */
/* We've increased the padding for dt > a, but dt without a link
* should take up as much space. */
dt {
margin: .75em 0;
}
/* Make superscripts a bit easier to tap. */
sup > a {
padding-bottom: .25em;
dt > a {
margin: -.75em 0 -.75em -.25em;
display: inline-block;
}
nav li ol {
/* Don't duplicate bottom space: the last list item in the nested
* list and the list item that is the entire nested list will both
* have bottom padding */
header > nav {
margin-bottom: -1em;
/* Prevent nested lists from overlapping */
padding-top: 1em;
}
h2 + a {
margin: -.75em -.25em;
}
footer > nav,
header > nav,
/* List items with direct hyperlink children should only have one hyperlink. */
li > a,
h2 + a,
nav ol a {
margin-left: -.25em;
display: inline-block;
}
nav li,
ol li > a {
margin: .25em;
}
div[itemprop="comment"] dd > a {
display: inline-block;
margin-left: -.25em;
padding: .75em .25em;
}
/* Increase backlink tap target size */
a[role="doc-backlink"] {
padding: 0 1.75em 1.5em .25em;
}
/* Make room for those big backlink buttons so they don't overlap
* with links on the following endnote */
section[role="doc-endnotes"] li {
margin-bottom: 1.75em;
}
}
@ -151,7 +184,7 @@ dd,
ol,
ul {
margin: 0;
padding-left: 1.625em;
padding-left: 1.5em;
}
ol ol,
@ -176,7 +209,7 @@ nav ul {
* pixels between tap targets. */
nav ul li {
display: inline-block;
margin-right: .375em;
margin-right: .5em;
}
/* narrow screens: reduce margin for blockquotes a lot, using
@ -220,8 +253,8 @@ kbd {
/* <ins> should not be mistaken for hyperlinks. */
ins {
text-decoration: none;
font-style: italic;
text-decoration: none;
}
/* narrow screens: remove unused figure margins
@ -292,7 +325,7 @@ pre {
border: 1px solid #999;
/* borders shouldn't touch text */
padding: 0 0.125em;
padding: 0 .25em;
}
/* center standalone images; same justification as

View file

@ -88,11 +88,11 @@ These engines pass most of the tests listed in the "methodology" section. All of
=> https://www.alexandria.org/ Alexandria
=> https://github.com/alexandria-org/alexandria Alexandria engine source code
* Fairsearch: an ambitious engine from Ahrefs, an SEO/backlink-finder company, that "shares ad profit with creators and protects your privacy". Most engines show results that include keywords from or related to the query; Fairsearch also shows results linked by pages containing the query. In other words, not all results contain relevant keywords. This makes it excellent for less precise searches and discovery of "related sites", especially with its index of *hundreds of billions of pages.* It's far worse at finding very specific information or recent events for now, but it will probably improve: while this version is live, it's not officially launched yet. When it officially launches, *it will be under a different name*. I expect Fairsearch to graduate from this section as result relevancy improves.
* Yep: an ambitious engine from Ahrefs, an SEO/backlink-finder company, that "shares ad profit with creators and protects your privacy". Most engines show results that include keywords from or related to the query; Yep also shows results linked by pages containing the query. In other words, not all results contain relevant keywords. This makes it excellent for less precise searches and discovery of "related sites", especially with its index of *hundreds of billions of pages.* It's far worse at finding very specific information or recent events for now, but it will probably improve.
=> https://fairsearch.com/ Fairsearch
=> https://yep.com/ Yep
FairSearch supports Open Graph and some JSON-LD at the moment. A look through the source code for Alexandria and Gigablast didn't seem to reveal the use of any structured data
Yep supports Open Graph and some JSON-LD at the moment. A look through the source code for Alexandria and Gigablast didn't seem to reveal the use of any structured data
### Smaller indexes, hit-and-miss

View file

@ -108,9 +108,9 @@ These engines pass most of the tests listed in the "methodology" section. All of
- [Alexandria](https://www.alexandria.org/): A pretty new "non-profit, ad free" engine, with [freely-licensed code](https://github.com/alexandria-org/alexandria). Surprisingly good at finding recent pages. Its index is built from the Common Crawl; it isn't as big as Gigablast or Right Dao but its ranking is great.
- [Fairsearch](https://fairsearch.com/): an ambitious engine from Ahrefs, an SEO/backlink-finder company, that "shares ad profit with creators and protects your privacy". Most engines show results that include keywords from or related to the query; Fairsearch also shows results linked by pages containing the query. In other words, not all results contain relevant keywords. This makes it excellent for less precise searches and discovery of "related sites", especially with its index of _hundreds of billions of pages._ It's far worse at finding very specific information or recent events for now, but it will probably improve: while this version is live, it's not officially launched yet. When it officially launches, **it will be under a different name**. I expect Fairsearch to graduate from this section as result relevancy improves.
- [Yep](https://yep.com/): an ambitious engine from Ahrefs, an SEO/backlink-finder company, that "shares ad profit with creators and protects your privacy". Most engines show results that include keywords from or related to the query; Yep also shows results linked by pages containing the query. In other words, not all results contain relevant keywords. This makes it excellent for less precise searches and discovery of "related sites", especially with its index of _hundreds of billions of pages._ It's far worse at finding very specific information or recent events for now, but it will probably improve.
FairSearch supports Open Graph and some JSON-LD at the moment. A look through the source code for Alexandria and Gigablast didn't seem to reveal the use of any structured data.
Yep supports Open Graph and some JSON-LD at the moment. A look through the source code for Alexandria and Gigablast didn't seem to reveal the use of any structured data.
### Smaller indexes, hit-and-<wbr />miss {#smaller-indexes-hit-and-miss}

View file

@ -22,7 +22,7 @@
(btw this is all made of <span> cuz it is supposed to be inline)
--><span itemprop="author copyrightHolder" itemscope="" itemtype="https://schema.org/Person" itemid="https://seirdy.one/#seirdy" class="h-card p-author author vcard">
<a itemprop="url" href="https://seirdy.one/" rel="author me home cc:attributionURL" class="u-url u-uid url" property="cc:attributionName">
{{ partial "indieweb-icon.html" -}}
{{ partial "indieweb-icon.html" }}
<span itemprop="name" class="p-name fn n">
<span itemprop="givenName" class="p-given-name given-name">Rohan</span>&#160;<span itemprop="familyName" class="p-family-name family-name">Kumar</span></span></a>
</span>

58
scripts/bin/hugo-new-note Executable file
View file

@ -0,0 +1,58 @@
#!/usr/bin/env dash
set -e -u
# the name of this program
progname="$(basename "${0}")"
help_text="Usage: ${progname} [OPTION...] FILENAME
Compose a new note
Options:
-h Print this help and exit
-r Whether this note should be a reply
"
usage() {
printf '%s' "${help_text}"
}
# when the user passess bad args, send a msg to stderr and exit
# usage: bad_option <option> <reason>
bad_option() {
echo "${progname}: option ${1}: ${2}" >&2
usage >&2
exit 1
}
reply='0'
while getopts "hr" flags; do
case ${flags} in
h)
usage
exit 0
;;
r)
reply='1'
shift
;;
*)
bad_option "${flags}" 'invalid option'
exit 1
;;
esac
done
filename="notes/$1.md"
if [ "$reply" = '1' ]; then
hugo new --kind reply "$filename"
else
hugo new "$filename"
fi
"${EDITOR-nvim}" "content/$filename"
# vi:ft=sh

View file

@ -32,6 +32,7 @@ sed 7d "$html_file" | xmllint --format --encode UTF-8 --noent - -o "$tmp_file"
| sd '<pre(?: tabindex="0")?>\n\t*<code ' '<pre tabindex="0"><code ' \
| sd '(?:\n)?</code>\n(?:[\t\s]*)?</pre>' '</code></pre>' \
| sd '</span>.span itemprop="familyName"' '</span> <span itemprop="familyName"' \
| sd '(<img itemprop="image" class="u-photo photo"[^>]*/>)<span' '$1 <span' \
| sd '([a-z])<(data|time)' '$1 <$2'
} >>"$xhtml_file"