diff --git a/schema.sql b/schema.sql index 6e13c23..0755e31 100644 --- a/schema.sql +++ b/schema.sql @@ -29,6 +29,7 @@ CREATE TABLE posts ( category_id INTEGER, published_at DATETIME DEFAULT CURRENT_TIMESTAMP, updated_at DATETIME DEFAULT CURRENT_TIMESTAMP, + cover TEXT, FOREIGN KEY (author_id) REFERENCES users(id), FOREIGN KEY (category_id) REFERENCES categories(id) ON DELETE SET NULL ); diff --git a/src/app.css b/src/app.css index b8424fd..8f37ef6 100644 --- a/src/app.css +++ b/src/app.css @@ -1189,3 +1189,38 @@ footer section p:first-child { content: "#"; margin-right: 2px; } + +/* Featured Image Styles */ +.post-cover { + width: 100%; + height: 300px; + overflow: hidden; + border-bottom: 1px dashed var(--line-color, rgba(0,0,0,0.1)); +} + +.post-cover img { + width: 100%; + height: 100%; + object-fit: cover; + display: block; + transition: transform 0.5s ease; +} + +.card-link:hover .post-cover img { + transform: scale(1.03); +} + +.article-content.has-cover .content-wrap { + padding-top: 20px; +} + +.detail-cover { + height: 400px; + border-bottom: none; + border-radius: 8px; + margin-bottom: 30px; +} + +.detail-cover img { + border-radius: 8px; +} diff --git a/src/lib/components/admin/FeaturedImagePicker.svelte b/src/lib/components/admin/FeaturedImagePicker.svelte new file mode 100644 index 0000000..fd7563c --- /dev/null +++ b/src/lib/components/admin/FeaturedImagePicker.svelte @@ -0,0 +1,264 @@ + + +
+ + diff --git a/src/lib/components/admin/Tabs.svelte b/src/lib/components/admin/Tabs.svelte new file mode 100644 index 0000000..d2c9337 --- /dev/null +++ b/src/lib/components/admin/Tabs.svelte @@ -0,0 +1,85 @@ + + +