add in twitch integration

This commit is contained in:
Blake Ridgway
2026-04-13 03:49:24 -05:00
parent 0ba2f7af4e
commit 668530ce37
11 changed files with 312 additions and 7 deletions

View File

@@ -33,6 +33,7 @@
<li><a href="/status">status</a></li>
<li><a href="/about">about</a></li>
<li><a href="/hire" class="nav-hire">hire me</a></li>
{{if .TwitchLive}}<li><a href="/stream" class="nav-live">&#x25CF; live</a></li>{{end}}
</ul>
</nav>
</header>
@@ -54,6 +55,7 @@
<a href="/changelog">changelog</a> &mdash;
<a href="/blog/feed.xml">RSS</a> &mdash;
<a href="https://git.ridgwaysystems.org">gitea</a> &mdash;
<a href="/stream">stream</a> &mdash;
<a href="/hire">hire me</a>
</p>
</footer>

22
templates/stream.html Normal file
View File

@@ -0,0 +1,22 @@
{{define "title"}}Stream &mdash; Ridgway Systems{{end}}
{{define "meta-desc"}}Watch the Ridgway Systems live stream.{{end}}
{{define "content"}}
<div class="page-header">
<h1>Live Stream</h1>
{{if .Live}}
<p class="page-desc"><span class="live-badge">&#x25CF; live</span> Streaming now on Twitch.</p>
{{else}}
<p class="page-desc">Not currently live. Follow on <a href="https://twitch.tv/{{.Channel}}" target="_blank" rel="noopener">Twitch</a> to get notified.</p>
{{end}}
</div>
<div class="stream-player">
<iframe
src="https://player.twitch.tv/?channel={{.Channel}}&parent={{.Parent}}&autoplay=false"
height="100%"
width="100%"
allowfullscreen>
</iframe>
</div>
{{end}}