From cf811d3e057c8f75142d3462e282de67cd70f3d2 Mon Sep 17 00:00:00 2001 From: ubq323 Date: Sat, 12 Jun 2021 20:40:06 +0000 Subject: properly build, and add fuzzy timestamps to view forum page --- .fossil-settings/ignore-glob | 3 +++ MANIFEST.in | 2 ++ apioforum/__init__.py | 2 ++ apioforum/static/style.css | 8 ++++++-- apioforum/templates/base.html | 1 + apioforum/templates/view_forum.html | 21 +++++++++++++++++++-- 6 files changed, 33 insertions(+), 4 deletions(-) create mode 100644 MANIFEST.in diff --git a/.fossil-settings/ignore-glob b/.fossil-settings/ignore-glob index a1e9259..c2757ed 100644 --- a/.fossil-settings/ignore-glob +++ b/.fossil-settings/ignore-glob @@ -2,3 +2,6 @@ instance/* venv/* *.db *.py[cod] +build/* +dist/* +apioforum.egg-info/* diff --git a/MANIFEST.in b/MANIFEST.in new file mode 100644 index 0000000..ccfe169 --- /dev/null +++ b/MANIFEST.in @@ -0,0 +1,2 @@ +graft apioforum/static +graft apioforum/templates diff --git a/apioforum/__init__.py b/apioforum/__init__.py index 41614f0..7baa7c1 100644 --- a/apioforum/__init__.py +++ b/apioforum/__init__.py @@ -32,4 +32,6 @@ def create_app(): from .fuzzy import fuzzy app.jinja_env.filters['fuzzy']=fuzzy + app.add_url_rule("/",endpoint="index") + return app diff --git a/apioforum/static/style.css b/apioforum/static/style.css index 2ec7d20..d66a639 100644 --- a/apioforum/static/style.css +++ b/apioforum/static/style.css @@ -55,15 +55,19 @@ nav a { color: blue; text-decoration: none } .threadlisting:nth-child(odd) { background-color: #ddd } .threadlisting { display: flex; flex-flow: row wrap; text-align: center } -.threadlisting-part { flex: 1 0px; display: table-cell; vertical-align: middle; } +.threadlisting-part { flex: 1 0px; display: table-cell; vertical-align: middle; padding: 3px} .threadlisting-part-title { flex: 3 0px } +.threadlisting-header { font-weight: bold } @media all and (max-width: 800px) { .threadlisting-part-title { flex: 2 100%; } .threadlisting { margin-bottom: 5px; } } -.threadlisting-part-id { flex: 0.4 0px; } +@media all and (min-width: 1200px) { + .threadlisting { width: 1200px } +} +.threadlisting-part-id { flex: 0.4 0px; } .threadlisting-part { border: 1px solid black } .actionbutton::before { diff --git a/apioforum/templates/base.html b/apioforum/templates/base.html index 626d88d..847b8b2 100644 --- a/apioforum/templates/base.html +++ b/apioforum/templates/base.html @@ -13,6 +13,7 @@
  • apioforum
  • +
  • home
  • {% if g.user %}
  • {{ g.user }}
  • diff --git a/apioforum/templates/view_forum.html b/apioforum/templates/view_forum.html index c7f88f1..a9c7594 100644 --- a/apioforum/templates/view_forum.html +++ b/apioforum/templates/view_forum.html @@ -1,16 +1,33 @@ {% extends 'base.html' %} +{% from 'common.html' import ts %} {% block header %}

    {% block title %}apio forum george etc{%endblock%}

    {%endblock%} {%block content%}

    the

    create thread
    +
    +
    + name +
    +
    + id +
    +
    + creator +
    +
    + created +
    +
    + last updated +
    {%for thread in threads%}
    #{{thread.id}}
    {{thread.creator}}
    -
    {{thread.created}}
    -
    {{thread.updated}}
    +
    {{ts(thread.created)}}
    +
    {{ts(thread.updated)}}
    {%endfor%}
    -- cgit v1.2.3