Fix /code page

This commit is contained in:
a 2024-03-16 22:48:10 -05:00
parent 2ca39428be
commit 3185a2da35
11 changed files with 27 additions and 14 deletions

View file

Before

Width:  |  Height:  |  Size: 41 KiB

After

Width:  |  Height:  |  Size: 41 KiB

View file

@ -5,9 +5,6 @@ author = "Abdullah Tarawneh"
date = "2019-11-13"
tags = ["mastodon", "api", "pleroma", "liberapay", "contribution", "pull request", "github"]
categories = ["Code"]
[[resources]]
name = "cover"
src = "/images/cover/liberapay-pleroma.jpg"
+++
pleroma is compatible with mastodon api.

View file

Before

Width:  |  Height:  |  Size: 54 KiB

After

Width:  |  Height:  |  Size: 54 KiB

View file

@ -5,9 +5,6 @@ author = "Abdullah Tarawneh"
date = "2019-02-18"
tags = ["mastomods", "mastodon", "css", "userstyles", "tweaks"]
categories = ["Code"]
[[resources]]
name = "cover"
src = "/images/cover/mastomods.jpg"
+++
This work is heavily based on (and an extension of) my earlier work on Mastodon Flat CSS, and its child theme Linernotes Mastodon Themes. I grew tired of having to maintain what was essentially the same code in multiple different places, so this repo was created to be a more modular way of managing code snippets after I learned enough about how importing works.

View file

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 51 KiB

View file

@ -5,9 +5,6 @@ date = "2017-04-30"
author = "Abdullah Tarawneh"
tags = ["obs", "open broadcaster software", "obs studio", "keyboard shortcut", "edit transform", "pull request", "github"]
categories = ["Code"]
[[resources]]
name = "cover"
src = "/images/cover/obs-transform.jpg"
+++
Editing was very easy in OBS Classic, and I could not find the option for stretching a source to bounds in OBS Studio, so the "Edit Transform" dialogue should be more user-facing. Giving it a keyboard shortcut denotes that it is important enough to have a shortcut, as opposed to the myriad options with no shortcut.

View file

Before

Width:  |  Height:  |  Size: 48 KiB

After

Width:  |  Height:  |  Size: 48 KiB

View file

Before

Width:  |  Height:  |  Size: 21 KiB

After

Width:  |  Height:  |  Size: 21 KiB

View file

@ -5,9 +5,6 @@ date = "2019-05-09"
author = "Abdullah Tarawneh"
tags = ["python", "web scraping", "scraping", "beautifulsoup", "salat", "prayer", "time"]
categories = ["Code"]
[[resources]]
name = "cover"
src = "/images/cover/salatime.jpg"
+++
## The problem

View file

@ -35,8 +35,8 @@
<p class="project__summary">{{.Summary}}</p>
{{ with .Params.cover }}
<img width=280 class="project__image" src="{{.}}">
{{ with .Resources.GetMatch "cover**" }}
<img width=280 class="project__image" src="{{.RelPermalink}}">
{{end}}
<!--datetime class="project__date">{{ .Date.Format "January 2, 2006" }}</datetime-->

25
layouts/code/single.html Normal file
View file

@ -0,0 +1,25 @@
{{ define "main" }}
<main>
<article class="page">
<header class="section page-header">
<div class="container">
<h1 class="page-title">{{ .Title }}</h1>
<p class="page-summary">{{.Summary}}</p>
{{ with .Resources.GetMatch "cover**" }}
<img src="{{.RelPermalink}}">
{{ end }}
</div>
</header>
<aside>
<div class="container">
{{.TableOfContents}}
</div>
</aside>
<section class="section content">
<div class="container">
{{ .Content }}
</div>
</section>
</article>
</main>
{{ end }}