From 2406df41047b81e4628c61a85f86ecf5556fa07e Mon Sep 17 00:00:00 2001 From: Tyler Perkins Date: Fri, 23 Dec 2022 18:23:33 -0500 Subject: [PATCH] Add back posts --- .gitmodules | 3 +++ src/common/article.php | 2 +- src/common/common.css | 57 +++++++++++++++++++++++++++++++++++++++++- src/index.css | 6 ----- src/index.php | 2 +- src/posts/catalog.css | 29 +++++++++++++++++++++ src/posts/catalog.php | 45 +++++++++++++++++++++++++++++++++ src/posts/index.css | 23 +++++++++++++++++ src/posts/index.php | 47 ++++++++++++++++++++++++++++++++++ src/site-posts | 1 + 10 files changed, 206 insertions(+), 9 deletions(-) create mode 100644 .gitmodules create mode 100644 src/posts/catalog.css create mode 100644 src/posts/catalog.php create mode 100644 src/posts/index.css create mode 100644 src/posts/index.php create mode 160000 src/site-posts diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..824a804 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "src/site-posts"] + path = src/site-posts + url = git@git.clortox.com:Infrastructure/site-posts.git diff --git a/src/common/article.php b/src/common/article.php index fe6cee0..f50a952 100644 --- a/src/common/article.php +++ b/src/common/article.php @@ -37,7 +37,7 @@ class Article { public function getPostData($postId) { $result = mysqli_query($this->client, 'SELECT * FROM post WHERE ID = ' . $postId); - return mysqli_fetch_all($result); + return mysqli_fetch_all($result)[0]; } } diff --git a/src/common/common.css b/src/common/common.css index 8a8494e..78a9ca8 100644 --- a/src/common/common.css +++ b/src/common/common.css @@ -14,7 +14,7 @@ h1, h2, h3, h4 { color: white; } -p, a, li, tr, td, span, noscript { +p, a, li, tr, td, span, noscript, figcaption { font-family: 'Lekton', Helvetica, Arial, sans-serif; font-size: 16px; line-height: 25px; @@ -50,6 +50,61 @@ button:hover { margin-top: 25px; } +.list-clickable-div { + display: block; + width: calc(100% - 10px - 3px); + height: auto; + text-decoration: underline 0.15em rgba(255,255,255,0); + transition: 300ms; + border: dashed; + border-radius: 5px; + background-color: rgba(0,0,0,0.4); + margin: 5px; +} + +.list-clickable-div p { + margin: 15px 5px; +} + +.list-clickable-div:hover { + text-decoration: underline 0.15em rgba(255,255,255,1); + background-color: rgba(0,0,0,0.85); + +} + +.dashed-bottom { + border-bottom: 5px dashed white; + +} + +.dashed-border { + border: 5px dashed white; +} + +.soft-background { + background: rgba(11,11,12, 0.3); + border-radius: 15px; + padding: 10px; +} + +figure { + border: 5px dashed white; + padding: 5px; +} + +figure img { + max-height: 40vh; + margin-left: auto; + margin-right: auto; + display: block; +} + +figcaption { + text-align: center; + margin-top: 0.5em; + +} + textarea { max-height: 20em; diff --git a/src/index.css b/src/index.css index 3a90120..d770d9d 100644 --- a/src/index.css +++ b/src/index.css @@ -75,12 +75,6 @@ margin-top: -20px; } -.soft-background { - background: rgba(11,11,12, 0.3); - border-radius: 15px; - padding: 10px; -} - .index-item { display: grid; align-content: center; diff --git a/src/index.php b/src/index.php index 421f050..bdb48fb 100644 --- a/src/index.php +++ b/src/index.php @@ -11,7 +11,7 @@ -
+