Files
remembos/internal/web/templates/memory.html
T
2026-02-12 17:52:32 +03:00

128 lines
3.5 KiB
HTML

<!DOCTYPE html>
<html lang="ru">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Воспоминание</title>
<style>
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
background: #f5f5f5;
color: #333;
padding: 2rem 1rem;
display: flex;
justify-content: center;
}
.container {
max-width: 640px;
width: 100%;
}
.header {
margin-bottom: 1.5rem;
}
.date {
font-size: 1.1rem;
color: #666;
}
.ago {
font-size: 0.9rem;
color: #999;
margin-top: 0.25rem;
}
.card {
background: #fff;
border-radius: 8px;
padding: 1.5rem;
box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}
.content {
white-space: pre-wrap;
word-wrap: break-word;
font-size: 1rem;
line-height: 1.6;
}
.images {
margin-top: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
}
.images img {
max-width: 100%;
border-radius: 6px;
}
.tags {
margin-top: 1rem;
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
}
.tag {
background: #e8f0fe;
color: #1a73e8;
padding: 0.2rem 0.6rem;
border-radius: 4px;
font-size: 0.85rem;
}
.meta {
margin-top: 1rem;
font-size: 0.8rem;
color: #aaa;
}
.meta a {
color: #aaa;
text-decoration: none;
}
.meta a:hover {
text-decoration: underline;
}
.load-more {
margin-top: 1rem;
}
.load-more button {
background: #e8f0fe;
color: #1a73e8;
border: none;
padding: 0.5rem 1rem;
border-radius: 6px;
font-size: 0.9rem;
cursor: pointer;
}
.load-more button:hover {
background: #d2e3fc;
}
</style>
</head>
<body>
<div class="container">
<div class="header">
<div class="date">{{.DateFormatted}}</div>
{{if .AgoText}}<div class="ago">{{.AgoText}}</div>{{end}}
</div>
<div class="card">
<div class="content">{{.Content}}</div>
{{if .Images}}
<div class="images">
{{range .Images}}<img src="{{.URL}}" alt="{{.Alt}}" loading="lazy">{{end}}
</div>
{{end}}
{{if .Tags}}
<div class="tags">
{{range .Tags}}<span class="tag">#{{.}}</span>{{end}}
</div>
{{end}}
</div>
<div class="meta">
Tier {{.Tier}} · показов: {{.ShowCount}}
{{if .MemoURL}} · <a href="{{.MemoURL}}" target="_blank" rel="noopener">оригинал</a>{{end}}
</div>
{{if .AllowLoadMore}}
<form class="load-more" method="POST" action="/more">
<button type="submit">Другое воспоминание</button>
</form>
{{end}}
</div>
</body>
</html>