Initial commit: Lookbook personal collection app
Pinterest-like app for saving images, videos, quotes, and embeds. Features: - Go backend with PostgreSQL, SSR templates - Console-based admin auth (login/logout via browser console) - Item types: images, videos (ffmpeg transcoding), quotes, embeds - Media stored as BLOBs in PostgreSQL - OpenGraph metadata extraction for links - Embed detection for YouTube, Vimeo, Twitter/X - Masonry grid layout, item detail pages - Tag system with filtering - Refresh metadata endpoint with change warnings - Replace media endpoint for updating item images/videos
This commit is contained in:
commit
cdcc5b5293
45 changed files with 4634 additions and 0 deletions
562
internal/static/css/app.css
Normal file
562
internal/static/css/app.css
Normal file
|
|
@ -0,0 +1,562 @@
|
|||
/*
|
||||
* Commit Mono - Neutral programming typeface
|
||||
* Licensed under SIL Open Font License 1.1
|
||||
* https://commitmono.com/
|
||||
*/
|
||||
|
||||
@font-face {
|
||||
font-family: 'CommitMono';
|
||||
font-style: normal;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("../fonts/CommitMono-450-Regular.woff2") format('woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'CommitMono';
|
||||
font-style: italic;
|
||||
font-weight: 400;
|
||||
font-display: swap;
|
||||
src: url("../fonts/CommitMono-450-Italic.woff2") format('woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'CommitMono';
|
||||
font-style: normal;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("../fonts/CommitMono-700-Regular.woff2") format('woff2');
|
||||
}
|
||||
|
||||
@font-face {
|
||||
font-family: 'CommitMono';
|
||||
font-style: italic;
|
||||
font-weight: 700;
|
||||
font-display: swap;
|
||||
src: url("../fonts/CommitMono-700-Italic.woff2") format('woff2');
|
||||
}
|
||||
|
||||
/* Reset */
|
||||
*, *::before, *::after {
|
||||
box-sizing: border-box;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
/* Base */
|
||||
:root {
|
||||
--bg: #fff;
|
||||
--fg: #000;
|
||||
--gray-1: #f5f5f5;
|
||||
--gray-2: #e5e5e5;
|
||||
--gray-3: #888;
|
||||
--font: 'CommitMono', ui-monospace, 'SF Mono', Menlo, monospace;
|
||||
}
|
||||
|
||||
html {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: var(--font);
|
||||
background: var(--bg);
|
||||
color: var(--fg);
|
||||
line-height: 1.5;
|
||||
min-height: 100vh;
|
||||
}
|
||||
|
||||
a {
|
||||
color: inherit;
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
text-decoration: underline;
|
||||
}
|
||||
|
||||
img, video {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
display: block;
|
||||
}
|
||||
|
||||
button, input, textarea, select {
|
||||
font: inherit;
|
||||
color: inherit;
|
||||
}
|
||||
|
||||
/* Header */
|
||||
.header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 2rem;
|
||||
border-bottom: 1px solid var(--gray-2);
|
||||
}
|
||||
|
||||
.logo {
|
||||
font-weight: 700;
|
||||
font-size: 1rem;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.nav {
|
||||
display: flex;
|
||||
gap: 1.5rem;
|
||||
}
|
||||
|
||||
.nav a {
|
||||
font-size: 0.85rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
/* Main */
|
||||
.main {
|
||||
max-width: 1600px;
|
||||
margin: 0 auto;
|
||||
padding: 2rem;
|
||||
}
|
||||
|
||||
/* Admin Bar */
|
||||
.admin-bar {
|
||||
margin-bottom: 1.5rem;
|
||||
display: flex;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
/* Tags Bar */
|
||||
.tags-bar {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.5rem;
|
||||
margin-bottom: 2rem;
|
||||
padding-bottom: 1rem;
|
||||
border-bottom: 1px solid var(--gray-2);
|
||||
}
|
||||
|
||||
.tag {
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding: 0.25rem 0.5rem;
|
||||
border: 1px solid var(--gray-2);
|
||||
background: var(--bg);
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.tag:hover, .tag.active {
|
||||
background: var(--fg);
|
||||
color: var(--bg);
|
||||
border-color: var(--fg);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
/* Grid */
|
||||
.grid {
|
||||
column-count: 4;
|
||||
column-gap: 1rem;
|
||||
}
|
||||
|
||||
.grid-item {
|
||||
display: block;
|
||||
break-inside: avoid;
|
||||
margin-bottom: 1rem;
|
||||
background: var(--gray-1);
|
||||
border: 1px solid var(--gray-2);
|
||||
overflow: hidden;
|
||||
position: relative;
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
.grid-item:hover {
|
||||
text-decoration: none;
|
||||
transform: translateY(-2px);
|
||||
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
|
||||
}
|
||||
|
||||
.grid-item img {
|
||||
width: 100%;
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Quote Card */
|
||||
.quote-card {
|
||||
padding: 1.5rem;
|
||||
min-height: 150px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.quote-card blockquote {
|
||||
font-size: 1.1rem;
|
||||
font-style: italic;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.quote-card blockquote::before {
|
||||
content: '"';
|
||||
}
|
||||
|
||||
.quote-card blockquote::after {
|
||||
content: '"';
|
||||
}
|
||||
|
||||
.quote-card cite {
|
||||
font-size: 0.85rem;
|
||||
color: var(--gray-3);
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
/* Link Card */
|
||||
.link-card {
|
||||
padding: 1.5rem;
|
||||
min-height: 100px;
|
||||
}
|
||||
|
||||
.link-title {
|
||||
font-weight: 700;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.link-url {
|
||||
font-size: 0.75rem;
|
||||
color: var(--gray-3);
|
||||
word-break: break-all;
|
||||
}
|
||||
|
||||
/* Embed Placeholder */
|
||||
.embed-placeholder {
|
||||
aspect-ratio: 16/9;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
background: var(--fg);
|
||||
color: var(--bg);
|
||||
font-size: 2rem;
|
||||
}
|
||||
|
||||
/* Item Tags */
|
||||
.item-tags {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
gap: 0.25rem;
|
||||
padding: 0.5rem;
|
||||
background: var(--bg);
|
||||
border-top: 1px solid var(--gray-2);
|
||||
}
|
||||
|
||||
.item-tag {
|
||||
font-size: 0.65rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
padding: 0.15rem 0.35rem;
|
||||
background: var(--gray-1);
|
||||
border: 1px solid var(--gray-2);
|
||||
}
|
||||
|
||||
/* Item Page */
|
||||
.item-page {
|
||||
max-width: 900px;
|
||||
margin: 0 auto;
|
||||
}
|
||||
|
||||
.back-link {
|
||||
display: inline-block;
|
||||
font-size: 0.85rem;
|
||||
margin-bottom: 2rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.item-detail {
|
||||
border: 1px solid var(--gray-2);
|
||||
}
|
||||
|
||||
.image-container img,
|
||||
.video-container video {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
.embed-container {
|
||||
position: relative;
|
||||
}
|
||||
|
||||
/* YouTube/Vimeo iframe embeds */
|
||||
.embed-container iframe {
|
||||
max-width: 100%;
|
||||
}
|
||||
|
||||
/* Twitter embeds */
|
||||
.embed-container .twitter-tweet {
|
||||
margin: 1rem auto !important;
|
||||
}
|
||||
|
||||
.quote-detail {
|
||||
padding: 3rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
.quote-detail blockquote {
|
||||
font-size: 1.5rem;
|
||||
font-style: italic;
|
||||
line-height: 1.6;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.quote-detail blockquote::before {
|
||||
content: '"';
|
||||
}
|
||||
|
||||
.quote-detail blockquote::after {
|
||||
content: '"';
|
||||
}
|
||||
|
||||
.quote-detail cite {
|
||||
color: var(--gray-3);
|
||||
font-style: normal;
|
||||
}
|
||||
|
||||
.item-meta {
|
||||
padding: 1.5rem;
|
||||
border-top: 1px solid var(--gray-2);
|
||||
}
|
||||
|
||||
.item-meta h1 {
|
||||
font-size: 1.25rem;
|
||||
font-weight: 700;
|
||||
margin-bottom: 0.75rem;
|
||||
}
|
||||
|
||||
.item-meta .description {
|
||||
margin-bottom: 1rem;
|
||||
color: var(--gray-3);
|
||||
}
|
||||
|
||||
.item-meta .source-link {
|
||||
display: block;
|
||||
font-size: 0.85rem;
|
||||
color: var(--gray-3);
|
||||
word-break: break-all;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.item-meta .item-tags {
|
||||
background: none;
|
||||
border: none;
|
||||
padding: 0;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
|
||||
.item-meta .timestamp {
|
||||
display: block;
|
||||
font-size: 0.75rem;
|
||||
color: var(--gray-3);
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
}
|
||||
|
||||
.item-actions {
|
||||
padding: 1rem 1.5rem;
|
||||
border-top: 1px solid var(--gray-2);
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
}
|
||||
|
||||
/* Buttons */
|
||||
.btn {
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
padding: 0.5rem 1rem;
|
||||
border: 1px solid var(--fg);
|
||||
background: var(--bg);
|
||||
cursor: pointer;
|
||||
transition: all 0.15s ease;
|
||||
}
|
||||
|
||||
.btn:hover {
|
||||
background: var(--fg);
|
||||
color: var(--bg);
|
||||
}
|
||||
|
||||
.btn-danger {
|
||||
border-color: #c00;
|
||||
color: #c00;
|
||||
}
|
||||
|
||||
.btn-danger:hover {
|
||||
background: #c00;
|
||||
color: #fff;
|
||||
}
|
||||
|
||||
.btn-close {
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 1.5rem;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
/* Modal */
|
||||
.modal {
|
||||
display: none;
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0,0,0,0.5);
|
||||
z-index: 1000;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.modal.active {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.modal-content {
|
||||
background: var(--bg);
|
||||
width: 90%;
|
||||
max-width: 500px;
|
||||
max-height: 90vh;
|
||||
overflow-y: auto;
|
||||
border: 1px solid var(--fg);
|
||||
}
|
||||
|
||||
.modal-header {
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
padding: 1rem 1.5rem;
|
||||
border-bottom: 1px solid var(--gray-2);
|
||||
}
|
||||
|
||||
.modal-header h2 {
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
letter-spacing: 0.1em;
|
||||
}
|
||||
|
||||
.modal-tabs {
|
||||
display: flex;
|
||||
border-bottom: 1px solid var(--gray-2);
|
||||
}
|
||||
|
||||
.modal-tabs .tab {
|
||||
flex: 1;
|
||||
padding: 0.75rem;
|
||||
background: none;
|
||||
border: none;
|
||||
font-size: 0.75rem;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.1em;
|
||||
cursor: pointer;
|
||||
border-bottom: 2px solid transparent;
|
||||
}
|
||||
|
||||
.modal-tabs .tab.active {
|
||||
border-bottom-color: var(--fg);
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
padding: 1.5rem;
|
||||
}
|
||||
|
||||
.tab-content {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.tab-content.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
/* Forms */
|
||||
form {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 1rem;
|
||||
}
|
||||
|
||||
input, textarea {
|
||||
width: 100%;
|
||||
padding: 0.75rem;
|
||||
border: 1px solid var(--gray-2);
|
||||
background: var(--bg);
|
||||
}
|
||||
|
||||
input:focus, textarea:focus {
|
||||
outline: none;
|
||||
border-color: var(--fg);
|
||||
}
|
||||
|
||||
textarea {
|
||||
resize: vertical;
|
||||
min-height: 80px;
|
||||
}
|
||||
|
||||
input[type="file"] {
|
||||
padding: 0.5rem;
|
||||
}
|
||||
|
||||
/* Preview */
|
||||
.preview {
|
||||
padding: 1rem;
|
||||
background: var(--gray-1);
|
||||
border: 1px solid var(--gray-2);
|
||||
display: none;
|
||||
}
|
||||
|
||||
.preview.active {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.preview img {
|
||||
max-width: 200px;
|
||||
margin-bottom: 0.5rem;
|
||||
}
|
||||
|
||||
.preview-title {
|
||||
font-weight: 700;
|
||||
margin-bottom: 0.25rem;
|
||||
}
|
||||
|
||||
.preview-description {
|
||||
font-size: 0.85rem;
|
||||
color: var(--gray-3);
|
||||
}
|
||||
|
||||
/* Responsive */
|
||||
@media (max-width: 1200px) {
|
||||
.grid {
|
||||
column-count: 3;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 900px) {
|
||||
.grid {
|
||||
column-count: 2;
|
||||
}
|
||||
|
||||
.main {
|
||||
padding: 1rem;
|
||||
}
|
||||
}
|
||||
|
||||
@media (max-width: 600px) {
|
||||
.grid {
|
||||
column-count: 1;
|
||||
}
|
||||
|
||||
.header {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.quote-detail {
|
||||
padding: 2rem 1rem;
|
||||
}
|
||||
|
||||
.quote-detail blockquote {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue