From 108f4285513d4ce3ff9c92b748ff90b4079b2b89 Mon Sep 17 00:00:00 2001
From: James Shiffer <2191476+scoliono@users.noreply.github.com>
Date: Thu, 4 Jun 2020 19:30:45 -0700
Subject: [PATCH] homepage and articles
---
src/components/Nav.svelte | 27 ++++++-----
src/routes/_error.svelte | 2 +-
src/routes/_layout.svelte | 20 ++++++--
src/routes/a/[slug].json.js | 6 +--
src/routes/a/[slug].svelte | 29 +++++++++--
src/routes/index.svelte | 95 +++++++++++++++++++++++++++----------
static/global.css | 53 +++++++++++++++++++--
7 files changed, 177 insertions(+), 55 deletions(-)
diff --git a/src/components/Nav.svelte b/src/components/Nav.svelte
index 37f0abc..5f96dac 100644
--- a/src/components/Nav.svelte
+++ b/src/components/Nav.svelte
@@ -4,40 +4,41 @@
@@ -45,6 +46,6 @@
+
+
+
+
{post.title}
+
{@html post.html}
diff --git a/src/routes/index.svelte b/src/routes/index.svelte
index d1fe8c4..79a1971 100644
--- a/src/routes/index.svelte
+++ b/src/routes/index.svelte
@@ -1,48 +1,82 @@
+
+
+
+
@@ -52,8 +86,19 @@
-
Welcome
-
+
Welcome
+
Find an Article
+
diff --git a/static/global.css b/static/global.css
index 730a031..6ceeec2 100644
--- a/static/global.css
+++ b/static/global.css
@@ -3,13 +3,13 @@ body {
font-family: Roboto, -apple-system, BlinkMacSystemFont, Segoe UI, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif;
font-size: 14px;
line-height: 1.5;
- color: #333;
+ color: #000;
+ background-color: rgb(150, 200, 234);
}
h1, h2, h3, h4, h5, h6 {
- margin: 0 0 0.5em 0;
- font-weight: 400;
- line-height: 1.2;
+ font-weight: bold;
+ line-height: 1.1;
}
h1 {
@@ -20,6 +20,10 @@ a {
color: inherit;
}
+a:hover {
+ color: #508FC3;
+}
+
code {
font-family: menlo, inconsolata, monospace;
font-size: calc(1em - 2px);
@@ -29,8 +33,47 @@ code {
border-radius: 2px;
}
-@media (min-width: 400px) {
+@media (min-width: 640px) {
body {
font-size: 16px;
}
}
+
+div.article-list {
+ background: #508FC3;
+ width: 80%;
+ margin: 0 auto;
+ padding: 2rem 1rem;
+}
+div.article-list > a {
+ display: flex;
+ text-decoration: none;
+ flex-direction: row;
+ margin: 2rem;
+ align-items: start;
+}
+figure.article-image {
+ background: white;
+ display: flex;
+ align-self: center;
+ justify-content: center;
+ width: 33.33%;
+}
+figure.article-image img {
+ height: 12rem;
+ width: auto;
+}
+div.article-meta {
+ background: white;
+ margin: 2rem;
+ padding: 0.75rem;
+ line-height: 1;
+ font-weight: bold;
+ flex: 1 0 0;
+}
+.article-title {
+ font-size: 4rem;
+}
+.article-date {
+ font-size: 2rem;
+}