Update date formatting
This commit is contained in:
parent
e533d18bbe
commit
15f4dad630
3
main.py
3
main.py
@ -9,6 +9,7 @@ HOST = '192.168.0.3'
|
|||||||
DB = 'hackmd'
|
DB = 'hackmd'
|
||||||
USER = 'hackmd'
|
USER = 'hackmd'
|
||||||
PASSWORD = 'osHx34e4aDazGsER'
|
PASSWORD = 'osHx34e4aDazGsER'
|
||||||
|
CODI_URL = "https://hackmd.wiai.de"
|
||||||
#lastchangeAt, alias, viewcount
|
#lastchangeAt, alias, viewcount
|
||||||
|
|
||||||
@app.route("/")
|
@app.route("/")
|
||||||
@ -21,7 +22,7 @@ def main():
|
|||||||
print(notes)
|
print(notes)
|
||||||
cur.close()
|
cur.close()
|
||||||
conn.close()
|
conn.close()
|
||||||
return render_template('index.html', notes=notes)
|
return render_template('index.html', notes=notes, host=CODI_URL)
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
|
|||||||
@ -16,21 +16,19 @@
|
|||||||
<div class="row">
|
<div class="row">
|
||||||
{% for note in notes %}
|
{% for note in notes %}
|
||||||
{% if note[1] and note[2] %}
|
{% if note[1] and note[2] %}
|
||||||
<div class="col-12 col-sm-6 col-md-6 col-lg-4 col-xl-3 mb-2">
|
<div class="col-12 col-sm-6 col-md-6 col-lg-4 col-xl-3 mb-2">
|
||||||
<a href="https://hackmd.wiai.de/{{note[2]}}">
|
<a href="{{host}}/{{note[2]}}">
|
||||||
<div class="card" style="width: 18rem;">
|
<div class="card" style="width: 18rem;">
|
||||||
<div class="card-body">
|
<div class="card-body">
|
||||||
<h5 class="card-title">{{note[1]}}</h5>
|
<h5 class="card-title">{{note[1]}}</h5>
|
||||||
<h6 class="card-subtitle mb-2 text-muted">LastChanged: {{note[5]}}</h6>
|
{% if note[5] %}
|
||||||
<p class="card-text">ViewCount: {{note[4]}}</p>
|
<h6 class="card-subtitle mb-2 text-muted">LastChanged: {{note[5].strftime('%d.%m.%Y
|
||||||
</div>
|
%H:%M')}}</h6>
|
||||||
</div>
|
{% endif %}
|
||||||
|
<p class="card-text">ViewCount: {{note[4]}}</p>
|
||||||
<!--<h3>{{note[1]}}</h3></a>-->
|
</div>
|
||||||
<!--<p>Alias: {{note[2]}}</p>-->
|
</div>
|
||||||
<!--<p>ShortID: {{note[3]}}</p>-->
|
</a>
|
||||||
<!--<p>ViewCount: {{note[4]}}</p>-->
|
|
||||||
<!--<p>LastChanged: {{note[5]}}</p>-->
|
|
||||||
</div>
|
</div>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% endfor %}
|
{% endfor %}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user