Skip to content

Commit

Permalink
Merge pull request #11 from puzzmo-com/augmentations
Browse files Browse the repository at this point in the history
Augmentations
  • Loading branch information
orta authored Jul 16, 2024
2 parents 1bf6c9d + 604016e commit f165300
Show file tree
Hide file tree
Showing 15 changed files with 579 additions and 3 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,8 @@ Then change `my-post` to be a cool URL. Next: set up the metadata at the top of
+ authors = ["orta"]
+ tags = ["changelog"]
+ theme = "puzzmo-light"
- draft = true
- comments = false
```

You can see [the themes here](https://github.com/puzzmo-com/blog.puzzmo.com/tree/main/static/themes).
Expand Down
1 change: 1 addition & 0 deletions content/posts/2024/03/28/an-ode-to-game-plugins/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ date = 2024-04-08T12:00:32Z
authors = ["orta"]
tags = ["tech", "api", "plugins"]
theme = "outlook-hayesy-beta"
series = ["Integrating games to the server"]
+++

### Control
Expand Down
2 changes: 1 addition & 1 deletion content/posts/2024/06/23/shiki-hugo/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ const highlighter = await createHighlighter({
// Find all of the files in the posts directory which are index.html
for (const file of indexFiles) {
// Grab the file, and parse it into a DOM
const content = readFileSync(posts + "/" + file, { encoding: "utf-8" })
const content = readFileSync(posts + "/" + file, { encoding: "utf-8" })
const dom = parse(content)

// This isn't a particularly smart query implementation,
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
521 changes: 521 additions & 0 deletions content/posts/2024/07/16/augmentations/index.md

Large diffs are not rendered by default.

Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added content/posts/2024/07/16/augmentations/repl.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 7 additions & 1 deletion hugo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,10 @@ staticDir = ['static']

[markup]
[markup.highlight]
codeFences = false
codeFences = false


[taxonomies]
tag = "tags"
series = "series"
controller = "controllers"
8 changes: 7 additions & 1 deletion layouts/_default/single.html
Original file line number Diff line number Diff line change
Expand Up @@ -91,4 +91,10 @@ <h1 class="!my-0 pb-2.5">{{ .Title }}</h1>
{{ end }}
</article>

{{ end }}
{{- if .Params.series -}}
<div class="post-series-bottom">
{{ partial "series.html" . }}
</div>
{{- end -}}

{{ end }}
17 changes: 17 additions & 0 deletions layouts/partials/series.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
{{- with (.GetTerms "series") -}}
{{- range . -}}
<h3>{{ .Title }} series</h3>
{{- $series := .Pages.ByDate -}}
<ol>
{{- range $series -}}
<li>
{{- if eq .File.UniqueID $.File.UniqueID -}}
<b>{{ .Title }}</b>
{{- else -}}
<a href="{{ .Permalink }}">{{ .Title }}</a>
{{- end -}}
</li>
{{- end -}}
</ol>
{{- end -}}
{{- end -}}
6 changes: 6 additions & 0 deletions layouts/shortcodes/details.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<details {{ if eq (.Get "open" | default "false") "true" }}open{{ end }}>
<summary>
{{ .Get "summary" | default "Details:" }}
</summary>
{{ .Inner | markdownify }}
</details>
9 changes: 9 additions & 0 deletions layouts/shortcodes/imageHighlight.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
</section>

{{ if .Params.src }}
<div style=" margin-left: -10%; margin-right: -10%" class="grid-item">
<a href="{{ .Params.src }}"><img src="{{ .Params.src }}" alt="{{ .Params.alt }}" class="zoomable" /></a>
</div>
{{ end }}

<section>
8 changes: 8 additions & 0 deletions themes/paper/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -2154,3 +2154,11 @@ body {
background-color: var(--theme-a_bg) !important;
}


.zoomable {
transition: transform 200ms ease-in;
}

.zoomable:hover {
transform: scale(1.2);
}

0 comments on commit f165300

Please sign in to comment.