discord-tweeter/pkg/web/templates/tweet.html
Manuel 21d580d1a6
feat: Major refactor, implement web, caching, better tests and build files
* Update golang version to 1.24
* Update multiarch Dockerfile to be more ISA agnostic
* Refactor existing code and properly structure project into modules
* Get rid of global variables except where necessary (go:embed)
* Add default values to Config
* Add webserver with templates to finally correctly serve videos and gifs
* Add tiny caching library to decrease api load and improve latency
* Improve Webhook data preparation by filtering out redundant links
  from the tweet text and properly attaching videos and gifs in separate
  webhook request by utilising new webserver
* Improve tests for filter function
* Improve bake definition for easier CI integration
2025-03-18 19:22:00 +01:00

35 lines
1.2 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="theme-color" content="#26a7de">
<link rel="canonical" href="{{ .URL }}">
<meta property="twitter:site" content="{{ .Username }}">
<meta property="twitter:creator" content="{{ .Username }}">
<meta property="twitter:title" content="{{ .Title }}">
{{- range $idx, $e := .Images }}
<meta property="twitter:image" content="{{ $e }}">
<meta property="og:image" content="{{ $e }}">
{{- end }}
{{- range $idx, $e := .Videos }}
<meta property="twitter:player:stream" content="{{ $e }}">
<meta property="og:video" content="{{ $e }}">
{{- end }}
{{- range $idx, $e := .Previews }}
<meta property="twitter:image" content="0">
<meta property="og:image" content="{{ $e }}">
{{- end }}
<meta property="twitter:card" content="{{ .Format }}">
<meta property="og:type" content="article">
<meta property="og:article:published_time" content="{{ .Timestamp }}">
<meta property="og:url" content="{{ .Link }}">
<meta property="og:title" content="{{ .Title }}">
<meta property="og:description" content="{{ .Text }}">
<style>
body, html { margin: 0; padding: 0; height: 100%; width: 100%; }
body { display: flex; }
</style>
<body>