Skip to content

Commit

Permalink
Add a gallery of Drawings
Browse files Browse the repository at this point in the history
Required me to switch themes, galleries don't work in the previous one.

Also, webp images don't work in galleries generally, but I'm using
a patched version of Nikola to generate the site.
Discussed in [#3671](getnikola/nikola#3671).
  • Loading branch information
tartley committed Mar 26, 2023
1 parent 92fc08d commit 7d2e582
Show file tree
Hide file tree
Showing 69 changed files with 863 additions and 1,222 deletions.
27 changes: 24 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,35 @@ See output of 'make', with no args, for some handy commands.

# TODO

Gallery:
* Hack up a nikola fix that injects a webp mimetype before calling .guess_type():
* generate the site without exceptions using that,
* Submit a PR to Nikola
* Finish adding images to the gallery
* Get metadata working (descriptions, creation dates)
* Upload the gallery to github pages
* Make a note somewhere that I'm using a cowboyed Nikola

Try the other image viewer option. Things I don't like about the default,
baguetteBox:

* Does not support svg, bmp, tiff (aha, out of the box. Perhaps can be fixed
for svg and any others the browser will display, if nikola passed a 'filter'
option.)
* Deep linking to one image displays the raw image file, so users can't go up
to the whole gallery without manual url wrangling.
* Can't zoom or fullscreen displayed images.
* [feimosi commented n Jun 16,
2019](https://github.com/feimosi/baguetteBox.js/issues/167#issuecomment-502487282)
"sorry, I'm really busy nowadays and can't find time to work on v2"

Inter-post links. See
https://www.getnikola.com/path-handlers.html
Although the more I lean into Nikola's custom markdown processing,
the more locked-in to it I become.

Embed ancient backed up tartley.com content, and link to it.

Next time I publish a Python post, check it appears
on Planet Python.

# Some commands

Delete all category lines:
Expand Down
13 changes: 7 additions & 6 deletions conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@
BLOG_TITLE = "tartley.com" # (translatable)
# This is the main URL for your site. It will be used
# in a prominent link. Don't forget the protocol (http/https)!
SITE_URL = "https://www.tartley.com/"
SITE_URL = "https://tartley.com/"
# This is the URL where Nikola's output will be deployed.
# If not set, defaults to SITE_URL
BASE_URL = "https://www.tartley.com/"
# BASE_URL = "https://tartley.com/"
BLOG_EMAIL = "tartley @ the domain tartley dot com"
BLOG_DESCRIPTION = "A website devoted to oneself has been described, by my Father, no less, as the greatest act of hubris. Welcome aboard!" # (translatable)

Expand Down Expand Up @@ -75,9 +75,10 @@

NAVIGATION_LINKS = {
DEFAULT_LANG: (
("/archive.html", "Archive"),
("/archive.html", "Posts"),
("/categories/", "Tags"),
("/rss.xml", "RSS feed"),
("/galleries/Drawings", "Gallery"),
("/rss.xml", "RSS"),
("/pages/about/", "About"),
),
}
Expand All @@ -90,7 +91,7 @@
}

# Name of the theme to use.
THEME = "bootstrap3-gradients-jinja"
THEME = "bootstrap3-gradients"

# Primary color of your theme. This will be used to customize your theme.
# Must be a HEX value.
Expand Down Expand Up @@ -735,7 +736,7 @@
# Default is:
# GALLERY_FOLDERS = {"galleries": "galleries"}
# More gallery options:
# THUMBNAIL_SIZE = 180
THUMBNAIL_SIZE = 250
# MAX_IMAGE_SIZE = 1280
# USE_FILENAME_AS_TITLE = True
# EXTRA_IMAGE_EXTENSIONS = []
Expand Down
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file added galleries/Drawings/Sailboats.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
Binary file not shown.
Binary file not shown.
4 changes: 4 additions & 0 deletions galleries/Drawings/index.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
A middle-aged outburst from the dying embers of my creativity has produced some
devastatingly inept scrawls. I weep for having caused them to impinge upon your
consciousness.

30 changes: 30 additions & 0 deletions galleries/Drawings/metadata.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
---
name: Sailboats.jpg
caption: Sailboats.<br/>I got an 8" tab a little while ago, which came with an S-pen doohickey. I was intrigued by the idea of drawing something on it. I wondered what the easiest possible picture to draw might be, suitable for an artistic dullard such as myself. Inspired by the masterful watercolors of English painter Richard Thorn, I landed on this. 'tis after all just two shades of blue, one plain, one scattered with wiggles, and tiny scraps of color along the edge between them. How hard could it be?<br/>Lessons learned - I started out with <i>much</i> too low a resolution, although perhaps that was a happy accident after all, that I shouldn't inflict too many of my pixels on the world. The horizon is tilted - I should have taken care to get the right from the outset. I drew it all on one layer, and many times throughout wished I had done otherwise. And, most important, I remembered that drawing engenders a ferocious glee, which I resolved to unleash more often.<br/>IbisPaintX on an 8" Android tab & S-pen.
order: 0
---
name: Self-portrait-1.near-lossless.webp
caption: Self Portrait 1<br/>Awful, obviously. Drawn from memory, and with no experience or talent either. :-)<br/>IbisPaintX on an 8" Android tab & S-pen.
order: -1
---
name: Self-portrait-2.near-lossless.webp
caption: Self Portrait 2<br/>I can't take much credit for this one, since I resolved to cheat in every way my imagination could bring to bear. I essentially traced it from a photo. Although the goal was lofty enough, to educate me on how my face <i>ought</i> to be drawn, and then try a third time after this, to see whether I might have learned anything along the way.<br/>IbisPaintX on an 8" Android tab & S-pen.
order: -2
---
name: Self-portrait-3.near-lossless.webp
caption: Self Portrait 3<br/>Still awful, obviously, but marginally better than <i>self portrait 1</i>. Drawn from memory.<br/>IbisPaintX on an 8" Android tab & S-pen.
order: -3
---
name: Emerald-Chunker.near-lossless.webp
caption: Emerald Chunker<br/>Spaceship! 🧑‍🚀. This is so bad it's painful to look at. I'm <i>so</i> sorry. I don't mind the chunky brick-like shape, nor the paint-job, they have their charms. But choosing to draw it straight-on to the viewer hides much of the interesting geometry that might otherwise be on display. And those bars on the air intakes, well, they just dont work. Maybe they are too spaced apart, or too unevenly drawn, or have too much of a jarring contrast with the style of the rest of the drawing? Or are just too badly drawn. Whatever it is, they don't work. I like the yellow patches though. That's something I ought to try doing more of. Oh, and originally the sky was blue, but I accidentally flipped it to a brown color when messing with layer blending effects, and it looks <i>much</i> better this way.<br/>IbisPaintX on an 8" Android tab & S-pen, 2 layers.
order: -4
---
name: Nebula-Survey.near-lossless.webp
caption: Nebula Survey<br/>Linework by Ailantd Sikowsky <a href="https://mastodon.art/@Ailantd/109718674616559226">here</a>, colors by me. The spaceship coloring book I didn't realize I have always been yearning for.<br/>IbisPaintX on an 8" Android tab & S-pen, 4 layers.
order: -5
---
name: Commander-Apples.half.lossless.webp
caption: "I've been flying the galaxy of Elite:Dangerous with my 10yo. kiddo. Sometimes, we take on the blue-collar work of mining asteroids, with one of us flying security escort, fending off the pirates. The kiddo was so proud on his first day taking on the security role, defending my mining operation with his purple Keelback, backed up by his ship-launched-fighters. He requested I draw his ship, and I used this as an excuse to learn about IbisPaintX's \"layers\". There are 11 here, from the background nebula, to the airbrushed glows over light sources. In particular, the purple paintjob layer is a completely flat color, and a separate layer adds shades of darkness to each surface. Doing them separately like this allows me to change the paint-job color with a single ten second swirl of a huge alpha-locked pen across the whole ship, and the shading, in a separate layer, is unaffected. Or I can modify the transparency of the shading layer, which adjusts the shading contrast, as if the ship were lit by more directional (or more even) lighting.<br/>Drawn using a few reference images but none from quite this angle. IbisPaintX on an 8\" Android tab & S-pen, 11 layers. 2023-03-22."
order: -6
---

149 changes: 83 additions & 66 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,99 +1,116 @@
aiohttp==3.8.1
aiosignal==1.2.0
aiohttp==3.8.4
aiosignal==1.3.1
anyio==3.6.2
argon2-cffi==21.3.0
argon2-cffi-bindings==21.2.0
asttokens==2.0.5
arrow==1.2.3
asttokens==2.2.1
async-timeout==4.0.2
attrs==21.4.0
Babel==2.10.1
attrs==22.2.0
Babel==2.12.1
backcall==0.2.0
beautifulsoup4==4.11.1
bleach==5.0.0
blinker==1.4
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.12
cloudpickle==2.0.0
debugpy==1.6.0
beautifulsoup4==4.12.0
bleach==6.0.0
blinker==1.5
certifi==2022.12.7
cffi==1.15.1
charset-normalizer==3.1.0
cloudpickle==2.2.1
comm==0.1.3
debugpy==1.6.6
decorator==5.1.1
defusedxml==0.7.1
docutils==0.18.1
docutils==0.19
doit==0.36.0
entrypoints==0.4
executing==0.8.3
fastjsonschema==2.15.3
frozenlist==1.3.0
executing==1.2.0
fastjsonschema==2.16.3
fqdn==1.5.1
frozenlist==1.3.3
ghp-import==2.1.0
hsluv==5.0.2
hsluv==5.0.3
html5lib==1.1
idna==3.3
importlib-metadata==4.11.3
ipykernel==6.13.0
ipython==8.3.0
idna==3.4
importlib-metadata==6.1.0
ipykernel==6.22.0
ipython==8.11.0
ipython-genutils==0.2.0
jedi==0.18.1
isoduration==20.11.0
jedi==0.18.2
Jinja2==3.1.2
jsonschema==4.5.1
jupyter-client==7.3.0
jupyter-core==4.10.0
jsonpointer==2.3
jsonschema==4.17.3
jupyter-events==0.6.3
jupyter_client==8.1.0
jupyter_core==5.3.0
jupyter_server==2.5.0
jupyter_server_terminals==0.4.4
jupyterlab-pygments==0.2.2
lxml==4.8.0
Mako==1.2.0
Markdown==3.3.7
MarkupSafe==2.1.1
matplotlib-inline==0.1.3
lxml==4.9.2
Mako==1.2.4
Markdown==3.4.3
MarkupSafe==2.1.2
matplotlib-inline==0.1.6
micawber==0.5.4
mistune==0.8.4
multidict==6.0.2
natsort==8.1.0
nbclient==0.6.2
nbconvert==6.5.0
nbformat==5.4.0
nest-asyncio==1.5.5
Nikola==8.2.2
notebook==6.4.11
packaging==21.3
mistune==2.0.5
multidict==6.0.4
natsort==8.3.1
nbclassic==0.5.3
nbclient==0.7.2
nbconvert==7.2.10
nbformat==5.8.0
nest-asyncio==1.5.6
Nikola==8.2.3
notebook==6.5.3
notebook_shim==0.2.2
packaging==23.0
pandocfilters==1.5.0
parso==0.8.3
pexpect==4.8.0
phpserialize==1.3
pickleshare==0.7.5
piexif==1.1.3
Pillow==9.1.0
prometheus-client==0.14.1
prompt-toolkit==3.0.29
psutil==5.9.0
Pillow==9.4.0
platformdirs==3.1.1
prometheus-client==0.16.0
prompt-toolkit==3.0.38
psutil==5.9.4
ptyprocess==0.7.0
pure-eval==0.2.2
pycparser==2.21
pygal==3.0.0
Pygments==2.12.0
pyparsing==3.0.8
pyphen==0.12.0
pyrsistent==0.18.1
Pygments==2.14.0
pyphen==0.14.0
pyrsistent==0.19.3
PyRSS2Gen==1.1
python-dateutil==2.8.2
pytz==2022.1
pyzmq==22.3.0
requests==2.27.1
python-json-logger==2.0.7
PyYAML==6.0
pyzmq==25.0.2
requests==2.28.2
rfc3339-validator==0.1.4
rfc3986-validator==0.1.1
ruamel.yaml==0.17.21
ruamel.yaml.clib==0.2.6
ruamel.yaml.clib==0.2.7
Send2Trash==1.8.0
six==1.16.0
smartypants==2.0.1
soupsieve==2.3.2.post1
stack-data==0.2.0
terminado==0.13.3
tinycss2==1.1.1
sniffio==1.3.0
soupsieve==2.4
stack-data==0.6.2
terminado==0.17.1
tinycss2==1.2.1
toml==0.10.2
tornado==6.1
traitlets==5.1.1
tornado==6.2
traitlets==5.9.0
typogrify==2.0.7
Unidecode==1.3.4
urllib3==1.26.9
watchdog==2.1.7
wcwidth==0.2.5
Unidecode==1.3.6
uri-template==1.2.0
urllib3==1.26.15
watchdog==3.0.0
wcwidth==0.2.6
webcolors==1.12
webencodings==0.5.1
websocket-client==1.5.1
Yapsy==1.12.2
yarl==1.7.2
zipp==3.8.0
yarl==1.8.2
zipp==3.15.0
1 change: 0 additions & 1 deletion themes/bootstrap3-gradients-jinja/engine

This file was deleted.

1 change: 0 additions & 1 deletion themes/bootstrap3-gradients-jinja/parent

This file was deleted.

File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[Theme]
engine = jinja
parent = bootstrap3-jinja
engine = mako
parent = bootstrap3
author = The Nikola Contributors
author_url = https://getnikola.com/
license = MIT
Expand All @@ -9,4 +9,4 @@ tags = bootstrap

[Family]
family = bootstrap3-gradients
mako_version = bootstrap3-gradients
jinja_version = bootstrap3-gradients-jinja
File renamed without changes.
1 change: 1 addition & 0 deletions themes/bootstrap3-gradients/parent
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bootstrap3
Loading

0 comments on commit 7d2e582

Please sign in to comment.