new css stuff

This commit is contained in:
0x01FE 2024-09-17 10:16:26 -05:00
parent 654a87b877
commit c2f829d39b
5 changed files with 29 additions and 20 deletions

View File

@ -44,11 +44,15 @@ flask_session.Session(app)
MUSIC_API_TOKEN = config['AUTH']['MUSIC_API_TOKEN'] MUSIC_API_TOKEN = config['AUTH']['MUSIC_API_TOKEN']
MUSIC_API_URL = config['NETWORK']['MUSIC_API_URL'] MUSIC_API_URL = config['NETWORK']['MUSIC_API_URL']
statuses = {} statuses = {}
header_background_images = [
"canal-banner2.jpg",
"real-greensilt-banner.png"
]
def get_posts(category_filter : str | None = None) -> list[tuple[dict, list]]: def get_posts(category_filter : str | None = None) -> list[tuple[dict, list]]:
post_files = glob.glob(f'{POSTS_FOLDER}/*') post_files = glob.glob(f'{POSTS_FOLDER}/*')
try: try:
post_files.remove(f'{POSTS_FOLDER}\\POST_TEMPLATE.md') post_files.remove(f'{POSTS_FOLDER}/POST_TEMPLATE.md')
except ValueError as e: except ValueError as e:
print(e) print(e)
print(f'Couldn\'t remove the template file probably; {post_files}') print(f'Couldn\'t remove the template file probably; {post_files}')
@ -113,6 +117,9 @@ def get_status() -> str:
return f'<div title="{selected_key}">{markdown.markdown(selected_status)}</div>' return f'<div title="{selected_key}">{markdown.markdown(selected_status)}</div>'
def get_header_image() -> str:
return header_background_images[random.randint(0, len(header_background_images) - 1)]
# Main Page # Main Page
@app.route('/') @app.route('/')
def index(): def index():
@ -131,7 +138,9 @@ def index():
# Setup Comment Form # Setup Comment Form
form = comment.CommentForm() 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 # Posts
@app.route('/post/<string:post_name>') @app.route('/post/<string:post_name>')

View File

@ -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 # Presumptuous by King Gizzard & The Lizard Wizard
Eggshell, landmine, stepping stones // Kindred spirits at a crossroads Eggshell, landmine, stepping stones // Kindred spirits at a crossroads
The world we built is on a tilt // Bottled up inside and filled with guilt 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

View File

Before

Width:  |  Height:  |  Size: 2.0 MiB

After

Width:  |  Height:  |  Size: 2.0 MiB

View File

@ -1,30 +1,20 @@
/* Global Stuff */ /* Global Stuff */
@import url('https://fonts.googleapis.com/css?family=PT%20Mono:700|PT%20Mono:400'); @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 { html {
--text: black; --text: black;
--background: #c0c0b0; --background: white;
/* --background: #2b2d31; */ /* --background: #2b2d31; */
--primary: hsl(229, 81%, 73%); --primary: hsl(135, 100%, 15%);
--primary10: hsla(209, 61%, 71%, 10%); --primary10: hsla(0, 0%, 53%, 0.1);
--primary20: hsla(209, 61%, 71%, 20%); --primary20: hsla(209, 61%, 71%, 20%);
--primary40: hsla(209, 61%, 71%, 40%); --primary40: hsla(0, 0%, 53%, 0.4);
--secondary: hsl(277, 81%, 33%); --secondary: hsl(277, 81%, 33%);
--secondary10: hsla(277, 81%, 33%, 10%); --secondary10: hsla(277, 81%, 33%, 10%);
--secondary20: hsla(277, 81%, 33%, 20%); --secondary20: hsla(277, 81%, 33%, 20%);
--secondary30: hsla(277, 81%, 33%, 30%); --secondary30: hsla(277, 81%, 33%, 30%);
--secondary40: hsla(277, 81%, 33%, 40%); --secondary40: hsla(277, 81%, 33%, 40%);
--secondary50: hsla(277, 81%, 33%, 50%); --secondary50: hsla(0, 0%, 21%, 0.5);
--accent: hsl(291, 81%, 60%); --accent: hsl(291, 81%, 60%);
--accent75: hsla(291, 81%, 60%, 75%); --accent75: hsla(291, 81%, 60%, 75%);
--accent50: hsla(291, 81%, 60%, 50%); --accent50: hsla(291, 81%, 60%, 50%);
@ -71,7 +61,8 @@ li {
/* Other */ /* Other */
.header { .header {
background-image: url("render.jpg"); font-family: 'PT Mono';
background-size: cover; background-size: cover;
text-align: center; text-align: center;
@ -125,8 +116,9 @@ li {
/* box-shadow: -10px 10px var(--accent); */ /* box-shadow: -10px 10px var(--accent); */
/* Text Settings */ /* Text Settings */
font-weight: bold; /* font-weight: bold; */
line-height: 30pt; line-height: 30pt;
font-family: Verdana, Geneva, Tahoma, sans-serif;
} }
.sidebar a { .sidebar a {

View File

@ -6,7 +6,7 @@
<title>0x01fe.net - {{ title }}</title> <title>0x01fe.net - {{ title }}</title>
</header> </header>
<body> <body>
<div class="header"> <div style="background-image: url({{ header_background_image }});" class="header">
<h1>{{ title }}</h1> <h1>{{ title }}</h1>
{{ status|safe }} {{ status|safe }}
</div> </div>