Browse Source

Templates, damit CSS konfigurierbar

remotes/origin/master
Peter 5 years ago
parent
commit
f857e13b3f
Signed by: pludi GPG Key ID: CFBA360E696EDC99
  1. 2
      mdlive.py
  2. 4
      templates/index.html

2
mdlive.py

@ -8,7 +8,7 @@ app = Flask(__name__, static_url_path='')
@app.route("/")
def index():
return app.send_static_file('index.html')
return render_template('index.html')
@app.route("/parse", methods=['GET', 'POST'])
def parse():

4
static/index.html → templates/index.html

@ -7,7 +7,7 @@
<link rel="stylesheet" href="https://cdn.jsdelivr.net/font-hack/2.018/css/hack.min.css">
<link rel="stylesheet" href="https://cdn.jsdelivr.net/bootstrap/3.3.6/css/bootstrap.min.css" type="text/css" media="screen">
<link rel="stylesheet" href="mdlive.css" type="text/css">
<link rel="stylesheet" href="blog.css" type="text/css" media="screen">
<link rel="stylesheet" href="{{ config.CSS }}" type="text/css" media="screen">
</head>
<body>
<div class="col-md-2"></div>
@ -38,7 +38,7 @@ $(document).ready(
idleState = false;
idleTimer = setTimeout(function(){
$.ajax({
url: "http://localhost:5000/parse",
url: "{{ url_for('parse') }}",
success: function(result) {
$('#output').html(result);
},
Loading…
Cancel
Save