From c2f829d39b0bfca2dca4d3a887656bf4ee06ab33 Mon Sep 17 00:00:00 2001 From: 0x01FE Date: Tue, 17 Sep 2024 10:16:26 -0500 Subject: [PATCH] new css stuff --- app/app.py | 13 ++++++++-- app/resources/status.text | 8 ++++++ app/static/{render.jpg => canal-banner2.jpg} | Bin app/static/style.css | 26 +++++++------------ app/templates/index.html | 2 +- 5 files changed, 29 insertions(+), 20 deletions(-) rename app/static/{render.jpg => canal-banner2.jpg} (100%) diff --git a/app/app.py b/app/app.py index ebef179..35a7275 100644 --- a/app/app.py +++ b/app/app.py @@ -44,11 +44,15 @@ flask_session.Session(app) MUSIC_API_TOKEN = config['AUTH']['MUSIC_API_TOKEN'] MUSIC_API_URL = config['NETWORK']['MUSIC_API_URL'] statuses = {} +header_background_images = [ + "canal-banner2.jpg", + "real-greensilt-banner.png" +] def get_posts(category_filter : str | None = None) -> list[tuple[dict, list]]: post_files = glob.glob(f'{POSTS_FOLDER}/*') try: - post_files.remove(f'{POSTS_FOLDER}\\POST_TEMPLATE.md') + post_files.remove(f'{POSTS_FOLDER}/POST_TEMPLATE.md') except ValueError as e: print(e) print(f'Couldn\'t remove the template file probably; {post_files}') @@ -113,6 +117,9 @@ def get_status() -> str: return f'
{markdown.markdown(selected_status)}
' +def get_header_image() -> str: + return header_background_images[random.randint(0, len(header_background_images) - 1)] + # Main Page @app.route('/') def index(): @@ -131,7 +138,9 @@ def index(): # Setup Comment Form form = comment.CommentForm() - return flask.render_template('index.html', posts=posts, status=status, form=form, user=user, title='0x01fe.net') + img = get_header_image() + + return flask.render_template('index.html', posts=posts, status=status, form=form, user=user, title='0x01fe.net', header_background_image=img) # Posts @app.route('/post/') diff --git a/app/resources/status.text b/app/resources/status.text index 00201ed..2821685 100644 --- a/app/resources/status.text +++ b/app/resources/status.text @@ -111,3 +111,11 @@ My little heart, as cold as a morgue // Let the weight of it drop like an iceber # Presumptuous by King Gizzard & The Lizard Wizard Eggshell, landmine, stepping stones // Kindred spirits at a crossroads The world we built is on a tilt // Bottled up inside and filled with guilt + +# Exctintion by King Gizzard & The Lizard Wizard +I see sullied, toxic seas, poisoned soil and felled trees / Once paradise, now wasteland / Shadow on the moon expands +Set tries chaos, but too late to to unseal our futures fate +Magenta beckons like a lighthouse / Hypnotised and pulled into a pulsar +Mirage city on the ridge / Beowulf, can you land deadstick? +Pilgrims with burnt offerings / Spacesick for the whole voyage +Metal horses on the flight/ Together, transcend this life diff --git a/app/static/render.jpg b/app/static/canal-banner2.jpg similarity index 100% rename from app/static/render.jpg rename to app/static/canal-banner2.jpg diff --git a/app/static/style.css b/app/static/style.css index 524e8e1..4720f6b 100644 --- a/app/static/style.css +++ b/app/static/style.css @@ -1,30 +1,20 @@ /* Global Stuff */ @import url('https://fonts.googleapis.com/css?family=PT%20Mono:700|PT%20Mono:400'); -body { - font-family: 'PT Mono'; - font-weight: 400; -} - -h1, h2, h3, h4, h5 { - font-family: 'PT Mono'; - font-weight: 700; -} - html { --text: black; - --background: #c0c0b0; + --background: white; /* --background: #2b2d31; */ - --primary: hsl(229, 81%, 73%); - --primary10: hsla(209, 61%, 71%, 10%); + --primary: hsl(135, 100%, 15%); + --primary10: hsla(0, 0%, 53%, 0.1); --primary20: hsla(209, 61%, 71%, 20%); - --primary40: hsla(209, 61%, 71%, 40%); + --primary40: hsla(0, 0%, 53%, 0.4); --secondary: hsl(277, 81%, 33%); --secondary10: hsla(277, 81%, 33%, 10%); --secondary20: hsla(277, 81%, 33%, 20%); --secondary30: hsla(277, 81%, 33%, 30%); --secondary40: hsla(277, 81%, 33%, 40%); - --secondary50: hsla(277, 81%, 33%, 50%); + --secondary50: hsla(0, 0%, 21%, 0.5); --accent: hsl(291, 81%, 60%); --accent75: hsla(291, 81%, 60%, 75%); --accent50: hsla(291, 81%, 60%, 50%); @@ -71,7 +61,8 @@ li { /* Other */ .header { - background-image: url("render.jpg"); + font-family: 'PT Mono'; + background-size: cover; text-align: center; @@ -125,8 +116,9 @@ li { /* box-shadow: -10px 10px var(--accent); */ /* Text Settings */ - font-weight: bold; + /* font-weight: bold; */ line-height: 30pt; + font-family: Verdana, Geneva, Tahoma, sans-serif; } .sidebar a { diff --git a/app/templates/index.html b/app/templates/index.html index b036da9..cb8d38c 100644 --- a/app/templates/index.html +++ b/app/templates/index.html @@ -6,7 +6,7 @@ 0x01fe.net - {{ title }} -
+

{{ title }}

{{ status|safe }}