did stuff
This commit is contained in:
parent
4dc412d9be
commit
e747749e70
@ -1,14 +1,11 @@
|
|||||||
import os
|
|
||||||
import glob
|
import glob
|
||||||
import configparser
|
import configparser
|
||||||
import random
|
import random
|
||||||
import base64
|
import base64
|
||||||
import datetime
|
|
||||||
|
|
||||||
import requests
|
import requests
|
||||||
import flask
|
import flask
|
||||||
import flask_wtf.csrf
|
import flask_wtf.csrf
|
||||||
import flask_session
|
|
||||||
import waitress
|
import waitress
|
||||||
import markdown
|
import markdown
|
||||||
|
|
||||||
@ -32,11 +29,6 @@ app.config['SECRET_KEY'] = base64.b64decode(config["FLASK"]["SECRET"])
|
|||||||
csrf = flask_wtf.csrf.CSRFProtect()
|
csrf = flask_wtf.csrf.CSRFProtect()
|
||||||
csrf.init_app(app)
|
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_TOKEN = config['AUTH']['MUSIC_API_TOKEN']
|
||||||
MUSIC_API_URL = config['NETWORK']['MUSIC_API_URL']
|
MUSIC_API_URL = config['NETWORK']['MUSIC_API_URL']
|
||||||
statuses = {}
|
statuses = {}
|
||||||
|
|||||||
@ -1,8 +1,6 @@
|
|||||||
import markdown
|
import markdown
|
||||||
import datetime
|
import datetime
|
||||||
|
|
||||||
import comment
|
|
||||||
|
|
||||||
class Post:
|
class Post:
|
||||||
|
|
||||||
category : str
|
category : str
|
||||||
@ -13,7 +11,6 @@ class Post:
|
|||||||
file : str
|
file : str
|
||||||
title : str
|
title : str
|
||||||
url : str
|
url : str
|
||||||
comments : list[dict]
|
|
||||||
|
|
||||||
def __init__(self, file_path):
|
def __init__(self, file_path):
|
||||||
self.file = file_path
|
self.file = file_path
|
||||||
@ -31,4 +28,3 @@ class Post:
|
|||||||
self.date_str = self.date.strftime("%B %d, %Y")
|
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.body = markdown.markdown(f'# [{self.title}]({self.url})\n' + ''.join(lines[7:]), extensions=['footnotes'])
|
||||||
self.comments = comment.get_comments(self.title)
|
|
||||||
|
|||||||
38
app/static/style2.css
Normal file
38
app/static/style2.css
Normal file
@ -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;
|
||||||
|
}
|
||||||
@ -2,7 +2,7 @@
|
|||||||
<html lang="en">
|
<html lang="en">
|
||||||
<header>
|
<header>
|
||||||
<link rel="shortcut icon" href="index_favicon.ico">
|
<link rel="shortcut icon" href="index_favicon.ico">
|
||||||
<link rel="stylesheet" href="{{ url_for('static', filename='style.css') }}">
|
<link rel="stylesheet" href="{{ url_for('static', filename='style2.css') }}">
|
||||||
<title>0x01fe.net - {{ title }}</title>
|
<title>0x01fe.net - {{ title }}</title>
|
||||||
</header>
|
</header>
|
||||||
<body>
|
<body>
|
||||||
@ -12,15 +12,15 @@
|
|||||||
</div>
|
</div>
|
||||||
<div class="container">
|
<div class="container">
|
||||||
<!-- Sidebar -->
|
<!-- Sidebar -->
|
||||||
<div class="sidebar">
|
<h1>Stuff</h1>
|
||||||
<a href="/"><u>Home</u></a><br>
|
<ul class="sidebar">
|
||||||
<a href="/category/games/">Games</a><br>
|
<li><a href="/"><u>Home</u></a></li>
|
||||||
<a href="/music/">Music</a><br>
|
<li><a href="/category/games/">Games</a></li>
|
||||||
<a href="/category/motion-pictures/">Motion Picture</a><br>
|
<li><a href="/music/">Music</a></li>
|
||||||
<a href="/programming/">Programming</a><br>
|
<li><a href="/category/motion-pictures/">Motion Picture</a></li>
|
||||||
<a href="/about/">About</a><br>
|
<li><a href="/programming/">Programming</a></li>
|
||||||
<a href="/login/">Login</a>
|
<li><a href="/about/">About</a></li>
|
||||||
</div>
|
</ul>
|
||||||
|
|
||||||
<!-- Main Page -->
|
<!-- Main Page -->
|
||||||
<!-- Get it? D-Log? Like digital log? -->
|
<!-- Get it? D-Log? Like digital log? -->
|
||||||
@ -31,7 +31,6 @@
|
|||||||
{{ post.date_str }}
|
{{ post.date_str }}
|
||||||
</div>
|
</div>
|
||||||
{{ post.body|safe }}
|
{{ post.body|safe }}
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
</div>
|
</div>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user