This commit is contained in:
8
web/frag-header.go.html
Normal file
8
web/frag-header.go.html
Normal file
@@ -0,0 +1,8 @@
|
||||
{{define "frag-header"}}
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Viva++</title>
|
||||
<link href="/static/style.css" rel="stylesheet">
|
||||
<script src="https://unpkg.com/htmx.org@2.0.4"></script>
|
||||
</head>
|
||||
{{end}}
|
||||
32
web/frag-index.go.html
Normal file
32
web/frag-index.go.html
Normal file
@@ -0,0 +1,32 @@
|
||||
{{- /*gotype: vivaplusdl.VideoInfoVM*/}}
|
||||
{{define "frag-index"}}
|
||||
<div class="video-box">
|
||||
<div class="thumbnail-container">
|
||||
<a href="/video/{{.ID}}">
|
||||
<img src="{{.Thumbnail}}" alt="Thumbnail" class="video-thumbnail" />
|
||||
<div class="play-button">
|
||||
<span class="play-symbol">▶</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="video-info">
|
||||
<h2 class="video-title">{{.Title}}</h2>
|
||||
<p class="video-description">{{.Description}}</p>
|
||||
<div class="video-actions">
|
||||
<a href="/video/{{.ID}}" class="watch-button">Watch Now</a>
|
||||
<form hx-boost="true" method="post" action="{{if .IsWatched}}/mark-unwatched/{{.ID}}{{else}}/mark-watched/{{.ID}}{{end}}">
|
||||
<button type="submit" class="mark-watched">
|
||||
{{if .IsWatched}}
|
||||
Mark as Unwatched
|
||||
{{else}}
|
||||
Mark as Watched
|
||||
{{end}}
|
||||
</button>
|
||||
</form>
|
||||
{{if ne .PreviousID 0}}
|
||||
<a href="/?video={{.PreviousID}}" class="mark-watched">Show Previous</a>
|
||||
{{end}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
{{end}}
|
||||
11
web/index.go.html
Normal file
11
web/index.go.html
Normal file
@@ -0,0 +1,11 @@
|
||||
{{- /*gotype: vivaplusdl.VideoInfoVM*/}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
{{template "frag-header" .}}
|
||||
<body>
|
||||
<h1>Viva++</h1>
|
||||
<div class="video-container">
|
||||
{{template "frag-index" .}}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,28 +0,0 @@
|
||||
{{- /*gotype: vivaplusdl.VideoInfoVM*/}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>Viva++</title>
|
||||
<link href="/static/style.css" rel="stylesheet">
|
||||
</head>
|
||||
<body>
|
||||
<h1>Viva++</h1>
|
||||
<div class="video-container">
|
||||
<div class="video-box">
|
||||
<div class="thumbnail-container">
|
||||
<a href="/video/{{.ID}}">
|
||||
<img src="{{.Thumbnail}}" alt="Thumbnail" class="video-thumbnail" />
|
||||
<div class="play-button">
|
||||
<span class="play-symbol">▶</span>
|
||||
</div>
|
||||
</a>
|
||||
</div>
|
||||
<div class="video-info">
|
||||
<h2 class="video-title">{{.Title}}</h2>
|
||||
<p class="video-description">{{.Description}}</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
||||
@@ -1,11 +1,7 @@
|
||||
{{- /*gotype: vivaplusdl.VideoPlayerVM*/}}
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{{.Title}} - Viva++</title>
|
||||
<link href="/static/style.css" rel="stylesheet">
|
||||
</head>
|
||||
{{template "frag-header" .}}
|
||||
<body>
|
||||
<h1>Viva++</h1>
|
||||
<div class="back-button-container">
|
||||
Reference in New Issue
Block a user