add shortcodes and beef up the blog entries

This commit is contained in:
Greg Gauthier 2023-01-24 21:26:11 +00:00
parent a97e5dba4d
commit ba601b66c3
32 changed files with 238 additions and 114 deletions

View File

@ -2,5 +2,6 @@
title: "{{ replace .Name "-" " " | title }}"
date: {{ .Date }}
tags: []
description: ""
draft: false
---

View File

@ -1,9 +1,11 @@
---
title: "Post 1"
date: 2023-01-24T13:52:16Z
title: "Hello, World!"
date: 2023-01-23T13:52:16Z
tags: ["post"]
description: The first post
draft: false
---
This is a test
This is the beginning of this blog. Here is a video to prove it!
{{<odysee "atari-code-welcome2" >}}

View File

@ -1,9 +1,11 @@
---
title: "Post 2"
title: "Program Text Editor"
date: 2023-01-24T13:52:30Z
tags: ["post"]
description: The second post
tags: ["medit", "assembler", "video"]
description: Just a quick test for the blog
draft: false
---
This is a test
This was an attempt to make sure that the video cloner was working, and to give the Program Text Editor a spin. I think it went well!
{{<odysee "testing-out-medit" >}}

View File

@ -1,9 +1,31 @@
---
title: "Post 3"
title: "What Is 2+2?"
date: 2023-01-24T13:52:39Z
tags: ["post"]
description: The third post
tags: ["assembler", "accumulator", "coding"]
description: Writing our first program!
draft: false
---
This is a test
For my first outing, I've decided to go with the simplest possible coding project I could imagine: adding 2 and 2, to get 4. I call it the "Winston Smith" Demo, for obvious reasons!
{{<odysee "winston-smith-demo" >}}
This is the code from the video:
{{< rawhtml >}}
<pre>
10 ;
20 ;ADDNRS.SRC
30 ;
40 *=$0600
50 ;
60 CLD
70 ADDNRS CLC
80 LDA #2
90 ADC #2
100 STA $CB
110 RTS
120 .END
</pre>
{{< /rawhtml >}}

View File

@ -2,3 +2,7 @@
title: Links
description: Useful resources for Atarians
---
Here is a list of useful websites:
* [Atari Archives]( https://www.atariarchives.org/)

View File

@ -1,9 +1,9 @@
<li style="list-style-type: circle;">
<li style="list-style-type: circle; font-size: 1.4vw">
{{ if isset .Params "image" }}
<img src="{{ .Site.Params.blogCdnUrl }}{{.Params.image}}" width="120px" height="60px" style="vertical-align: middle; padding: 1px"/>
{{ else }}
<img src="https://gmgauthier.us-east-1.linodeobjects.com/blog/img/blue-gray-code.jpg"
width="120px" height="60px" style="vertical-align: middle; padding: 1px"/>
width="60px" height="30px" style="vertical-align: middle; padding: 1px"/>
{{end}}
<time style="font-family: 'Courier'; font-weight: bold">{{.Date.Format "02 Jan 2006"}}</time> - <a href="{{ .Permalink }}">{{ .Title }}</a>
<time>{{.Date.Format "02 Jan 2006"}}</time> - <a href="{{ .Permalink }}">{{ .Title }}</a>
</li>

View File

@ -6,7 +6,7 @@
<div class="content">
{{ range .Data.Pages.GroupByDate "2006" }}
<h2>{{ .Key }}</h2>
<p>{{ .Key }}</p>
<ul>
{{ range .Pages }}
{{ .Render "li" }}

View File

@ -8,73 +8,11 @@
and looking at other people's projects. So, you may find this interesting,
too! I hope you do.
</p>
<p class="p2">Some small text</p>
<p class="p3">Some very tiny text</p>
</div>
<div style="display: flex">
<div class="shadowbox" style="float: left">
<h3>Attention!</h3>
<p class="p4">Hello, this is a highlighted notice!</p>
</div>
<div>
<h2>H2 Test Text</h2>
<p>Some standard text.</p>
<p class="p2">Some small text</p>
<p class="p3">Some very tiny text</p>
</div>
<div>
<p>
Current Events:
</p>
<li>Nothing scheduled</li>
</div>
<h3>H3 Test Text</h3>
<p>Some standard text.</p>
<p class="p2">Some small text</p>
<p class="p3">Some very tiny text</p>
<h4>H4 Test Text</h4>
<p>Here is a code block:</p>
<pre>
100 REM PLAYER/MISSILE EXAMPLE
110 DIM A$(512),B$(20)
120 X=X+1:READ A:IF A<>-1 THEN B$(X,X)=CHR$(A):GOTO 120
130 DATA 0,255,129,129,129,129,129,129,129,129,255,0,-1
2000 POKE 559,62:POKE 704,88
2020 I=PEEK(106)-16:POKE 54279,I
2030 POKE 53277,3:POKE 710,224
2040 VTAB=PEEK(134)+PEEK(135)*256
2050 ATAB=PEEK(140)+PEEK(141)*256
2060 OFFS=I*256+1024-ATAB
2070 HI=INT(OFFS/256):LO=OFFS-HI*256
2090 POKE VTAB+2,LO:POKE VTAB+3,HI
3000 Y=60:Z=100:V=1:H=1
4000 A$(Y,Y+11)=B$:POKE 53248,Z
4010 Y=Y+V:Z=Z+H
4020 IF Y>213 OR Y<33 THEN V=-V
4030 IF Z>206 OR Z<49 THEN H=-H
4420 GOTO 4000
</pre>
<p>
Here is a code printout!
</p>
<div class="printout">
100 REM PLAYER/MISSILE EXAMPLE<br/>
110 DIM A$(512),B$(20)<br/>
120 X=X+1:READ A:IF A<>-1 THEN B$(X,X)=CHR$(A):GOTO 120<br/>
130 DATA 0,255,129,129,129,129,129,129,129,129,255,0,-1<br/>
2000 POKE 559,62:POKE 704,88<br/>
2020 I=PEEK(106)-16:POKE 54279,I<br/>
2030 POKE 53277,3:POKE 710,224<br/>
2040 VTAB=PEEK(134)+PEEK(135)*256<br/>
2050 ATAB=PEEK(140)+PEEK(141)*256<br/>
2060 OFFS=I*256+1024-ATAB<br/>
2070 HI=INT(OFFS/256):LO=OFFS-HI*256<br/>
2090 POKE VTAB+2,LO:POKE VTAB+3,HI<br/>
3000 Y=60:Z=100:V=1:H=1<br/>
4000 A$(Y,Y+11)=B$:POKE 53248,Z<br/>
4010 Y=Y+V:Z=Z+H<br/>
4020 IF Y>213 OR Y<33 THEN V=-V<br/>
4030 IF Z>206 OR Z<49 THEN H=-H<br/>
4420 GOTO 4000<br/>
</div>

View File

@ -0,0 +1,8 @@
<!-- Assumes that a complete absolute url is being passed from the post, and does nothing to modify it -->
<a href='{{ .Get "url" }}' target="_blank">
{{ with .Get "title" }}
{{.}}
{{else}}
{{ .Get "url" }}
{{end}}
</a>

View File

@ -0,0 +1,6 @@
{{ $anchorized := anchorize .Inner }}
<h3 id="{{ $anchorized }}">
<a href="#{{ $anchorized }}">#</a>
{{ .Inner }}
</h3>

View File

@ -0,0 +1,5 @@
<div style="text-align: center">
<audio id="audio_player" style="width:80%" onloadeddata="set_volume()" controls>
<source src="{{ index .Params 0 }}" type="audio/mpeg">
</audio>
</div>

View File

@ -0,0 +1,7 @@
<div style="text-align: center;"><div>
<iframe type="text/html" width="640" height="360" style="border-width: 0"
src="https://www.bitchute.com/embed/{{ index .Params 0 }}/"
allowfullscreen>
</iframe>
</div>
</div>

View File

@ -0,0 +1,7 @@
{{ if .IsNamedParams }}
<div class="{{ if .Get "class" }}{{ .Get "class" }}{{ else }}pure-u-1{{ end }}">
<img class="pure-img" src="{{ .Get "src" }}" {{ if or (.Get "alt") (.Get "caption") }}alt="{{ with .Get "alt"}}{{.}}{{else}}{{ .Get "caption" }}{{ end }}"{{ end }}>
</div>
{{ else }}
<img class="pure-img" src="{{ index .Params 0 }}" alt="">
{{ end }}

View File

@ -0,0 +1,21 @@
{{ $paramCount := len .Params }}
{{ if gt $paramCount 0 }}
<div class="pure-g">
{{ range $param := .Params }}
{{ $items := split $param "|" }}
{{ $itemCount := len $items }}
<!-- Item count must be at least 2 as
"class" and "src" must be specified -->
{{ if ge $itemCount 2 }}
<div class="{{ index $items 0 }}">
<div style="padding: 0 .2em">
<img
class="pure-img-responsive"
src="{{ $.Site.Params.blogCdnUrl }}{{ index $items 1 }}"
alt="{{ if ge $itemCount 3 }}{{ index $items 2 }}{{ else }}{{ "" }}{{ end }}">
</div>
</div>
{{ end }}
{{ end }}
</div>
{{ end }}

View File

@ -0,0 +1,6 @@
<div style="position: relative; padding-bottom: 1%; height: 100%; overflow: hidden;">
<iframe id="gab" type="text/html" height="100%" width="400"
src="https://gab.com/{{ index .Params 0 }}/posts/{{ index .Params 1}}"
style="border-width: 0"></iframe>
</div>

View File

@ -0,0 +1 @@
<mark>{{ with .Get 0 }}{{.}}{{end}}</mark>

View File

@ -0,0 +1 @@
{{.Site.BaseURL}}

View File

@ -0,0 +1,4 @@
<div>
<iframe type="text/html" width="100%" style="border-width: 0"
src="{{ index .Params 0 }}"></iframe>
</div>

View File

@ -0,0 +1,7 @@
<a href='{{ .Site.BaseURL }}{{ .Get "url" }}' target="_blank">
{{ with .Get "title" }}
{{.}}
{{else}}
{{ .Site.BaseURL }}{{ .Get "url" }}
{{end}}
</a>

View File

@ -0,0 +1,3 @@
<div class="note">
{{ .Inner }}
</div>

View File

@ -0,0 +1,6 @@
<div style="text-align: center;">
<div class="embed odysee-player">
<iframe class="lbry-iframe" type="text/html" width="640" height="385" style="border-width: 0"
src="https://odysee.com/$/embed/{{ index .Params 0 }}" allowfullscreen></iframe>
</div>
</div>

View File

@ -0,0 +1,23 @@
{{ $path := $.Page.Dir }}
{{ $filePath := printf "content/%s" ($path) }}
{{ $withCaptions := .Get "withCaptions"}}
{{ $gallery := .Get "id" }}
{{ range readDir ($filePath) }}
{{ $display := strings.HasSuffix .Name "pdf" }}
{{ $caption := substr .Name 0 128 }}
{{ if $display}}
<div class="file-list-item">
<a href="{{.Name}}">
<i class="fas fa-file-pdf"></i> {{ $caption}}
</a>
</div>
{{ end }}
{{ end }}
<style type="text/css">
.file-list-item {
word-break: break-all;
}
</style>

View File

@ -0,0 +1,23 @@
{{ $fields := (index .Params 0) }}
{{ $data := after 1 .Params }}
<span style="margin-left: auto; margin-right: auto; width: auto; padding: 5px">
<table class="pure-table pure-table-striped"
style=" text-align: justify; position: relative; width: fit-content; margin-left: 5%; margin-right: 5%;">
<thead><tr>
{{ range split $fields "|"}}
<th>{{ . }}</th>
{{ end }}
</thead></tr>
<tbody>
{{ range $data}}
<tr>
{{ $items := split . "|" }}
{{ range $items }}
<td>{{ . }}</td>
{{ end }}
</tr>
{{ end }}
</tbody>
</table>
</span>

View File

@ -0,0 +1,2 @@
<!-- raw html -->
{{.Inner}}

View File

@ -0,0 +1,8 @@
<!-- assumes that the post contains a relative url, and that the local BaseURL should be pre-pended -->
<a href='{{ .Site.BaseURL }}{{ .Get "url" }}' target="_blank">
{{ with .Get "title" }}
{{.}}
{{else}}
{{ .Site.BaseURL }}{{ .Get "url" }}
{{end}}
</a>

View File

@ -0,0 +1 @@
<span {{ with .Get "style"}} style="{{ . | safeCSS }}"{{ end }}>{{ .Get "text" }}</span>

View File

@ -0,0 +1 @@
<strike>{{ with .Get 0 }}{{.}}{{end}}</strike>

View File

@ -0,0 +1,7 @@
<div style="text-align: center;padding: 2px">
<figure>
<video controls src="{{ index .Params 0 }}" type="video/mpeg" width="480">
<figcaption>{{index .Params 1}}</figcaption>
</video>
</figure>
</div>

View File

@ -0,0 +1 @@
{{ now.Format "2006" }}

View File

@ -0,0 +1,6 @@
<div style="text-align: center;"><div class="embed video-player">
<iframe class="youtube-player" type="text/html" width="640" height="385" style="border-width: 0"
src="https://www.youtube.com/embed/{{ index .Params 0 }}" allowfullscreen>
</iframe>
</div>
</div>

View File

@ -0,0 +1,7 @@
{{ partial "head.html" . }}
<div class="content">
{{ range .Data.Pages }}
{{ .Render "summary"}}
{{ end }}
</div>

View File

@ -70,7 +70,6 @@ HTML
src: url('../font/ATARCC__.TTF') format('truetype');
font-weight: normal;
font-style: normal;
color: black;
}
@font-face {
font-family: 'Atari Tiny';
@ -104,7 +103,7 @@ HTML
}
body {
font-family: 'Atari Classic Chunky';
font-family: 'Atari Classic Chunky', serif;
justify-content: center;
margin: 0.5em;
padding: 0.5em;
@ -113,39 +112,39 @@ body {
}
p {
font-family: 'Atari Classic Extrasmooth';
font-family: 'Atari Classic Extrasmooth', serif;
line-height: 1.3;
font-size: 0.595em;
color: #f2f2f2;
}
.p2 {
font-family: 'Atari Classic Smooth';
font-family: 'Atari Classic Smooth', serif;
font-size: 0.485em;
color: #f2f2f2;
}
.p3 {
font-family: 'Atari Classic Extrasmooth';
font-family: 'Atari Classic Extrasmooth', serif;
font-size: 0.365em;
color: #f2f2f2;
}
.p4 {
font-family: 'Atari Classic Smooth';
font-family: 'Atari Classic Smooth', serif;
font-size: 0.595em;
color: #322918;
}
pre {
width: 87%;
width: 78%;
border: solid yellow 2px;
padding-top: 10px;
padding-bottom: 0px;
padding-bottom: 10px;
padding-left:10px;
margin-left: 25px;
margin-left: 10px;
background-color: #004d80;
font-family: 'Atari Classic Chunky';
font-family: 'Atari Classic Chunky', serif;
font-weight: lighter;
font-size: 0.525em;
line-height: 1.2;
@ -157,11 +156,11 @@ pre {
width: 87%;
border: solid yellow 2px;
padding-top: 10px;
padding-bottom: 0px;
padding-bottom: 0;
padding-left:10px;
margin-left: 25px;
background-color: #004d80;
font-family: 'Atari Classic Chunky';
font-family: 'Atari Classic Chunky', serif;
font-weight: lighter;
font-size: 0.525em;
line-height: 1.2;
@ -169,7 +168,6 @@ pre {
color: #f2f2f2;
}
.title-wrap {
display:flex;
justify-content:center;
@ -180,18 +178,16 @@ pre {
.title-text {
width: 100%;
text-align: center;
font-family: 'Atarian System Regular';
font-family: 'Atarian System Regular', serif;
font-size: 7.3vw;
line-height: 1.0;
/* #color: #f0e6da; */
color: #fcf4dd;
}
.title-image {
padding: 0px;
padding-top: 5px;
padding: 0;
float: bottom;
height:40px;
height:45px;
width:40px;
}
@ -199,16 +195,14 @@ pre {
width: 80%;
margin: auto;
text-align: center;
font-family: 'Atarian System Regular';
font-family: 'Atarian System Regular', serif;
font-size: 1.0em;
line-height: 1.1;
color: #afcde9;
/* #color: #dd504a;
#color: #ffb600; */
}
.start {
font-family: 'Atarian System Regular';
font-family: 'Atarian System Regular', serif;
font-size: 1.2em;
color: #322918;
text-align: center;
@ -220,7 +214,7 @@ pre {
}
.select {
font-family: 'Atarian System Regular';
font-family: 'Atarian System Regular', serif;
font-size: 1.2em;
color: #322918;
text-align: center;
@ -232,7 +226,7 @@ pre {
}
.option {
font-family: 'Atarian System Regular';
font-family: 'Atarian System Regular', serif;
font-size: 1.2em;
color: #322918;
text-align: center;
@ -243,9 +237,8 @@ pre {
margin: 5px;
}
.reset {
font-family: 'Atarian System Regular';
font-family: 'Atarian System Regular', serif;
font-size: 1.2em;
color: #322918;
text-align: center;
@ -257,7 +250,7 @@ pre {
}
.button-row button {
font-family: 'Atarian System Regular';
font-family: 'Atarian System Regular', serif;
color: #322918;
align-content: center;
justify-content: center;
@ -266,7 +259,7 @@ pre {
}
.button-row button:hover {
font-family: 'Atarian System Bold';
font-family: 'Atarian System Bold', serif;
}
.button-column button {
@ -281,11 +274,11 @@ pre {
}
.button-column button:hover {
font-family: 'Atarian System Bold';
font-family: 'Atarian System Bold', serif;
}
.shadowbox {
font-family: 'Atari Classic Chunky Reverse';
font-family: 'Atari Classic Chunky Reverse', serif;
width: 11.95em;
background-color: #fcf4dd;
border: 3px solid #003366;
@ -294,7 +287,7 @@ pre {
}
.printout {
font-family: 'Dot Matrix Regular';
font-family: 'Dot Matrix Regular', serif;
font-size: small;
color: black;
width: 65%;
@ -304,7 +297,6 @@ pre {
box-shadow: 2px 2px darkgray;
}
/* unvisited link */
a:link {
color: #5a97d0;
@ -348,11 +340,13 @@ H4 {
}
UL {
font-size: 1.1vw;
margin:1em;
padding:0;
}
LI {
font-size: 1.1vw;
padding-bottom: 0.2em;
color: #dd504a;
}