add structure for ai short summaries

This commit is contained in:
2025-01-07 15:26:26 +01:00
parent 321ccfe44d
commit 706ebe25a0
5 changed files with 43 additions and 24 deletions

View File

@@ -0,0 +1,9 @@
-- +goose Up
-- +goose StatementBegin
ALTER TABLE articles ADD COLUMN aisummary TEXT DEFAULT '';
-- +goose StatementEnd
-- +goose Down
-- +goose StatementBegin
ALTER TABLE articles DROP COLUMN IF EXISTS aisummary;
-- +goose StatementEnd

View File

@@ -1,13 +1,16 @@
{{ define "content" }}
<div class="content">
<div class="content container">
{{ range . }}
<div class="card p-2 m-4" style="">
<div class="card p-2 m-4">
<div class="card-body">
<h5 class="card-title">{{ .Title }}</h5>
<h6 class="card-subtitle mb-2 text-body-secondary">
<span class="badge text-bg-secondary">{{ .ShortSource }}</span>
<span class="badge text-bg-secondary">{{ .PublishDate }}</span>
{{if .AiSummarized}}
<span class="badge text-bg-success">ai summary</span>
{{end}}
</h6>
<p class="card-text">{{ .Summary }}</p>
<a href="{{ .SourceUrl }}" class="card-link">Link</a>