various rendering changes

This commit is contained in:
0x01fe 2024-03-13 13:29:47 -05:00
parent d22af9734e
commit 092759e4b1
5 changed files with 14 additions and 5 deletions

View File

@ -12,7 +12,7 @@ class Post:
def __init__(self, file_path): def __init__(self, file_path):
self.file = file_path self.file = file_path
with open(file_path, 'r') as file: with open(file_path, 'r', encoding='utf-8') as file:
lines = file.readlines() lines = file.readlines()
self.category = lines[1].split(":")[1].strip() self.category = lines[1].split(":")[1].strip()

View File

@ -25,4 +25,7 @@ What do you mean ... You can't see it?
I don't believe you, your eyes deceive you, better check yourself in I don't believe you, your eyes deceive you, better check yourself in
You will say I'm crazy, I will go on my way 'cause it's what I need You will say I'm crazy, I will go on my way 'cause it's what I need
I'd cross a thousand seas just to prove I'm not mad I'd cross a thousand seas just to prove I'm not mad
I thoguht I saw a statue blink, and a bird with no head, Land on a golden thread, I rub my eyes, What am I saying? There's nothing there I thoguht I saw a statue blink, and a bird with no head, Land on a golden thread, I rub my eyes, What am I saying? There's nothing there
Solar Sect of Mystic Wisdom
~ Nuclear Fusion
Check out [NEUPINK](https://neupink.bandcamp.com/album/swordflower-hills-killer-2)!

View File

@ -38,6 +38,11 @@ a:hover {
font-family: Arial, Helvetica, sans-serif; font-family: Arial, Helvetica, sans-serif;
} }
.header a {
text-decoration: none;
color: #703be7;
}
.container { .container {
display: flex; display: flex;

View File

@ -8,7 +8,7 @@
<body> <body>
<div class="header"> <div class="header">
<h1>0x01fe.net</h1> <h1>0x01fe.net</h1>
<h4>{{ status }}</h4> <h4>{{ status|safe }}</h4>
</div> </div>
<div class="container"> <div class="container">
<!-- Sidebar --> <!-- Sidebar -->

View File

@ -3,6 +3,7 @@ import configparser
import random import random
import flask import flask
import markdown
from post import Post from post import Post
@ -43,12 +44,12 @@ def get_posts(category_filter : str | None = None) -> list[Post]:
return reversed(ordered_posts) return reversed(ordered_posts)
def get_status() -> str: def get_status() -> str:
with open(STATUS_FILE, 'r') as file: with open(STATUS_FILE, 'r', encoding='utf-8') as file:
statuses = file.readlines() statuses = file.readlines()
status = random.randint(0, len(statuses) - 1) status = random.randint(0, len(statuses) - 1)
return statuses[status] return markdown.markdown(statuses[status])
@app.route('/') @app.route('/')
def index(): def index():