From e747749e7059a888c90c1579f2aaf09cb24cf1b0 Mon Sep 17 00:00:00 2001 From: 0x01FE Date: Wed, 29 Jan 2025 09:25:06 -0600 Subject: [PATCH] did stuff --- app/app.py | 8 -------- app/post.py | 4 ---- app/static/style2.css | 38 ++++++++++++++++++++++++++++++++++++++ app/templates/index.html | 21 ++++++++++----------- 4 files changed, 48 insertions(+), 23 deletions(-) create mode 100644 app/static/style2.css diff --git a/app/app.py b/app/app.py index 1c29259..6d38302 100644 --- a/app/app.py +++ b/app/app.py @@ -1,14 +1,11 @@ -import os import glob import configparser import random import base64 -import datetime import requests import flask import flask_wtf.csrf -import flask_session import waitress import markdown @@ -32,11 +29,6 @@ app.config['SECRET_KEY'] = base64.b64decode(config["FLASK"]["SECRET"]) csrf = flask_wtf.csrf.CSRFProtect() csrf.init_app(app) -# Session Setup -app.config['SESSION_TYPE'] = 'filesystem' -app.config['SESSION_FILE_DIR'] = './data/.flask_session/' -flask_session.Session(app) - MUSIC_API_TOKEN = config['AUTH']['MUSIC_API_TOKEN'] MUSIC_API_URL = config['NETWORK']['MUSIC_API_URL'] statuses = {} diff --git a/app/post.py b/app/post.py index 24e4113..0b5bb4e 100644 --- a/app/post.py +++ b/app/post.py @@ -1,8 +1,6 @@ import markdown import datetime -import comment - class Post: category : str @@ -13,7 +11,6 @@ class Post: file : str title : str url : str - comments : list[dict] def __init__(self, file_path): self.file = file_path @@ -31,4 +28,3 @@ class Post: self.date_str = self.date.strftime("%B %d, %Y") self.body = markdown.markdown(f'# [{self.title}]({self.url})\n' + ''.join(lines[7:]), extensions=['footnotes']) - self.comments = comment.get_comments(self.title) diff --git a/app/static/style2.css b/app/static/style2.css new file mode 100644 index 0000000..820973f --- /dev/null +++ b/app/static/style2.css @@ -0,0 +1,38 @@ +@import url('https://fonts.googleapis.com/css?family=PT%20Mono:700|PT%20Mono:400'); + +.post img { + width: 50%; + margin-left: auto; + margin-right: auto; + display: block; +} + +.header { + font-family: 'PT Mono'; + background-size: cover; + text-align: center; + color: white; + padding: 2em; +} + +.sidebar { + margin: 1em 0; + padding: 0.5em; + font-family: Verdana, Geneva, Tahoma, sans-serif; +} + +.post h1 { + font-family: Georgia, 'Times New Roman', Times, serif; + font-weight: 100; + font-size: 26px; +} + +.post h2 { + font-family: Georgia, 'Times New Roman', Times, serif; + font-weight: 300; + font-size: 18px; +} + +.post-date { + float: right; +} diff --git a/app/templates/index.html b/app/templates/index.html index f1dc5b1..5fb61e6 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -2,7 +2,7 @@
- + 0x01fe.net - {{ title }}
@@ -12,15 +12,15 @@
- +

Stuff

+ @@ -31,7 +31,6 @@ {{ post.date_str }}
{{ post.body|safe }} - {% endfor %}