diff options
| author | Tim Keller <tjkeller.xyz> | 2025-05-24 12:52:32 -0500 | 
|---|---|---|
| committer | Tim Keller <tjkeller.xyz> | 2025-05-24 12:52:32 -0500 | 
| commit | bcf66d92d664dd707937ae866830a6bee0751745 (patch) | |
| tree | 5c1f7ecc037b53b434befe71509cc3009beaf3d7 /templates | |
| parent | 6b0385c495b246859d27bfa75e1bd4dfa45c2be2 (diff) | |
| download | mintube-master.tar.xz mintube-master.zip  | |
Diffstat (limited to 'templates')
| -rw-r--r-- | templates/base.html | 12 | ||||
| -rw-r--r-- | templates/index.html | 3 | ||||
| -rw-r--r-- | templates/watch.html | 89 | 
3 files changed, 57 insertions, 47 deletions
diff --git a/templates/base.html b/templates/base.html new file mode 100644 index 0000000..7c1f8eb --- /dev/null +++ b/templates/base.html @@ -0,0 +1,12 @@ +<!DOCTYPE html> +<html lang="en"> +<head> +	<meta charset="UTF-8"> +	<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1"> +	<link rel="stylesheet" href="/static/style.css"> +	{{ block "scripts" . }}{{ end }} +</head> +<body> +	{{ block "content" . }}{{ end }} +</body> +</html> diff --git a/templates/index.html b/templates/index.html new file mode 100644 index 0000000..c4ade88 --- /dev/null +++ b/templates/index.html @@ -0,0 +1,3 @@ +{{ define "content" }} +	{{ .Content }} +{{ end }} diff --git a/templates/watch.html b/templates/watch.html index bae485d..be4be41 100644 --- a/templates/watch.html +++ b/templates/watch.html @@ -1,48 +1,43 @@ -<!DOCTYPE html> -<html lang="en"> -<head> -	<meta charset="UTF-8"> -	<meta name="viewport" content="width=device-width, initial-scale=1, minimum-scale=1"> -	<link rel="stylesheet" href="/static/style.css"> -	<script src="/static/index.js" defer></script> -	<script src="https://www.youtube.com/iframe_api"></script> -</head> -<body> -	<iframe -		id="player" -		src="https://www.youtube-nocookie.com/embed/{{ .Id }}?enablejsapi=1&autoplay=1" -		frameborder="0" -		allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" -		referrerpolicy="no-referrer" -		allowfullscreen -	> -	</iframe> -	<h1 id="title"></h1> -	<button id="toggle-details">Show Details</button> -	<div id="details" style="display:none"> -		<span><a id="details-channel"></a>   👍 <span id="details-likes"></span></span> -		<br> -		<span><span id="details-views"></span> Views   <span id="details-date"></span></span> -		<br> -		<h3>Description:</h3> -		<span id="details-desc">No description has been added to this video.</span> -		<br> -		<h4>Tags:</h4> -		<div id="details-tags"></div> -	</div> +{{ define "scripts" }} +<script src="/static/index.js" defer></script> +<script src="https://www.youtube.com/iframe_api"></script> +{{ end }} + +{{ define "content" }} +<iframe +	id="player" +	src="https://www.youtube-nocookie.com/embed/{{ .Id }}?enablejsapi=1&autoplay=1" +	frameborder="0" +	allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" +	referrerpolicy="no-referrer" +	allowfullscreen +> +</iframe> +<h1 id="title"></h1> +<button id="toggle-details">Show Details</button> +<div id="details" style="display:none"> +	<span><a id="details-channel"></a>   👍 <span id="details-likes"></span></span>  	<br> -	<div id="comments" style="display:none"> -		<h3>Comments:</h3> -		<template id="template-comment"> -			<div class="comment"> -				<a class="author"></a> -				<span class="date"></span> -				<span class="date modified"></span> -				<div class="body"></div> -				<span>👍 <span class="likes"></span></span> -				<div class="replies"></div> -			</div> -		</template> -	</div> -</body> -</html> +	<span><span id="details-views"></span> Views   <span id="details-date"></span></span> +	<br> +	<h3>Description:</h3> +	<span id="details-desc">No description has been added to this video.</span> +	<br> +	<h4>Tags:</h4> +	<div id="details-tags"></div> +</div> +<br> +<div id="comments" style="display:none"> +	<h3>Comments:</h3> +	<template id="template-comment"> +		<div class="comment"> +			<a class="author"></a> +			<span class="date"></span> +			<span class="date modified"></span> +			<div class="body"></div> +			<span>👍 <span class="likes"></span></span> +			<div class="replies"></div> +		</div> +	</template> +</div> +{{ end }}  | 
