From 2dfc8494122dd2f5027a2f8dcc4765b5a424b0e7 Mon Sep 17 00:00:00 2001 From: Bobby Date: Wed, 20 Jul 2022 06:48:32 +0530 Subject: Restored Main Page from the Archived Branch --- blog/static/css/main.css | 142 +++++++++++++++++++++++++++++++++++ blog/static/images/logo.png | Bin 0 -> 14822 bytes blog/templates/home.html | 31 +++++++- blog/templates/partials/base.html | 19 +++++ blog/templates/partials/sidebar.html | 36 +++++++++ 5 files changed, 225 insertions(+), 3 deletions(-) create mode 100644 blog/static/css/main.css create mode 100644 blog/static/images/logo.png create mode 100644 blog/templates/partials/base.html create mode 100644 blog/templates/partials/sidebar.html diff --git a/blog/static/css/main.css b/blog/static/css/main.css new file mode 100644 index 00000000..6b23e412 --- /dev/null +++ b/blog/static/css/main.css @@ -0,0 +1,142 @@ +/* making a sidebar layout with 20% sidebar */ +body { + display: inline-flex; + flex-direction: row; + flex-wrap: wrap; + min-height: calc(100vh - 16px); + background-color: #fafafa; + padding: 0; + min-width: calc(100vw - 16px); + font-family: serif; +} + +.sidebar { + background-color: #bad9ff; + padding: 20px; + overflow-x: hidden; + overflow-y: auto; + border: 1px solid #191919; +} + +.main { + flex: 1; + padding: 20px; + overflow-x: hidden; + overflow-y: auto; +} + +.title:visited { + color: #000; +} + +.title > h1 { + font-size: 1.2rem; + font-weight: bold; + margin-top: 0; +} + +.title { + display: block; +} + +.title > img { + width: 10rem; + height: 3.23rem; + display: block; + margin: 0px auto 10px auto; + pointer-events: none; +} + +.alert { + background-color: #ffd4bd; + padding: 20px; + border: 1px solid #191919; +} + +lebel, input, textarea, select { + display: block; + margin: 5px 0px; + font-family: serif; + font-size: 16px; +} + +input[type = 'submit'] { + margin-top: 10px; +} + +fieldset { + border: 1px solid #191919; + padding: 10px 20px; +} + +nav > ul { + list-style: none; + padding: 0; + margin: 0; +} + +nav > ul > li { + margin: 5px 0; +} + +.center { + text-align: center; +} + +.login-box { + padding: 20px; + border: 1px solid #191919; +} + +.login-box > p { + margin-top: 0; + margin-bottom: 10px; +} + +.error { + color: red; +} + +.success { + color: green; +} + +.account { + display: flex; + flex-direction: row; + flex-wrap: wrap; +} + +.ac-sidebar { + padding: 20px; + overflow-x: hidden; + overflow-y: auto; +} + +.ac-main { + flex: 1; + padding: 20px; + overflow-x: hidden; + overflow-y: auto; +} + +.errorbox { + background-color: #ffd4bd; + padding: 20px; + border: 1px solid #191919; +} + +.errorbox > h1 { + margin-top: 0; +} + +/* Optimize for phones */ +@media only screen and (max-width: 480px) { + body { + flex-direction: column; + } + + .account { + flex-direction: column; + } +} diff --git a/blog/static/images/logo.png b/blog/static/images/logo.png new file mode 100644 index 00000000..56366c3d Binary files /dev/null and b/blog/static/images/logo.png differ diff --git a/blog/templates/home.html b/blog/templates/home.html index 7f246ce9..6b120d0b 100644 --- a/blog/templates/home.html +++ b/blog/templates/home.html @@ -1,3 +1,28 @@ -

Hello, world!

-
-

This website is under construction and will be available soon.

\ No newline at end of file +{% extends 'partials/base.html' %} {% block content %} +
+
+

That Computer Scientist

+

+ Welcome to the home of That Computer Scientist. This is my personal + website where I share all of my thoughts, ideas, and experiences. To know + more about me, please visit my About page. If you + would like to connect with me, please visit my + Contact page. Please use the sidebar to navigate + the site. +

+
+
+
+

+ This website is a work in progress. I am currently working on adding more + features to this website. I aim to build a retro looking personal website, + where I will share my articles and Ideas, which will be built entirely + around the idea of "collaborative writing" — where anyone can write new + articles or edit existing ones. +

+
+
+

Recent Posts

+
+
+{% endblock %} diff --git a/blog/templates/partials/base.html b/blog/templates/partials/base.html new file mode 100644 index 00000000..6357140c --- /dev/null +++ b/blog/templates/partials/base.html @@ -0,0 +1,19 @@ +{% load static %} + + + + + + + + That Computer Scientist - {{ title }} + + + + {% include 'partials/sidebar.html' %} + {% block content %} {% endblock %} + + diff --git a/blog/templates/partials/sidebar.html b/blog/templates/partials/sidebar.html new file mode 100644 index 00000000..d285b5ae --- /dev/null +++ b/blog/templates/partials/sidebar.html @@ -0,0 +1,36 @@ +{% load static %} + \ No newline at end of file -- cgit v1.2.3