mirror of https://github.com/kf7eel/hbnet.git
clean templates and other things
This commit is contained in:
parent
a3737a5bba
commit
603bd9cc08
|
|
@ -813,7 +813,10 @@ By using this service, you agree not to do anything malicious. You agree to use
|
||||||
content = ''
|
content = ''
|
||||||
# try:
|
# try:
|
||||||
l_news = News.query.order_by(News.time.desc()).first()
|
l_news = News.query.order_by(News.time.desc()).first()
|
||||||
return render_template('index.html', news = Markup(content), content_block = Markup(home_text.data), text = l_news.text[:300] + '...', subject = l_news.subject, date = l_news.date, news_id = l_news.id)
|
dots = ''
|
||||||
|
if len(l_news.text) > 300:
|
||||||
|
dots = '...'
|
||||||
|
return render_template('index.html', news = Markup(content), content_block = Markup(home_text.data), text = l_news.text[:300] + dots, subject = l_news.subject, date = l_news.date, news_id = l_news.id)
|
||||||
# except:
|
# except:
|
||||||
# content = ''
|
# content = ''
|
||||||
# return render_template('index.html', content_block = Markup(home_text.data))
|
# return render_template('index.html', content_block = Markup(home_text.data))
|
||||||
|
|
@ -824,7 +827,7 @@ By using this service, you agree not to do anything malicious. You agree to use
|
||||||
def tos_page():
|
def tos_page():
|
||||||
tos_text = Pages.query.filter_by(id=2).first()
|
tos_text = Pages.query.filter_by(id=2).first()
|
||||||
|
|
||||||
return render_template('generic.html', markup_content = tos_text.data)
|
return render_template('markdown_generic.html', markup_content = tos_text.data)
|
||||||
|
|
||||||
@app.route('/page/<id>')
|
@app.route('/page/<id>')
|
||||||
def other_page(id):
|
def other_page(id):
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
{{markup_content|markdown}}
|
{{markup_content}}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,12 @@
|
||||||
|
{% extends 'flask_user/_public_base.html' %}
|
||||||
|
{% block content %}
|
||||||
|
<p> </p>
|
||||||
|
|
||||||
|
<div class="row">
|
||||||
|
|
||||||
|
|
||||||
|
{{markup_content|markdown}}
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
{% endblock %}
|
||||||
Loading…
Reference in New Issue