This commit is contained in:
parent
5afeefa0ba
commit
9d1889232e
8
app.py
8
app.py
@ -47,15 +47,7 @@ def healthz():
|
|||||||
@app.route("/")
|
@app.route("/")
|
||||||
def homepage():
|
def homepage():
|
||||||
return render_template("main-page.html", host_id=docker_short_id, boards=board_list)
|
return render_template("main-page.html", host_id=docker_short_id, boards=board_list)
|
||||||
|
|
||||||
|
|
||||||
@app.route("/boards/<board_id>")
|
|
||||||
def page_board(board_id):
|
|
||||||
|
|
||||||
b_threads = [ open_threads[thread_id] for thread_id in open_threads if thread_id in threads_lists[board_id]]
|
|
||||||
return render_template("board.html", host_id=docker_short_id, board_id=board_id, boards=board_list, board_threads=b_threads)
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@app.route("/db_posts")
|
@app.route("/db_posts")
|
||||||
def page_posts_from_db():
|
def page_posts_from_db():
|
||||||
|
@ -16,7 +16,7 @@
|
|||||||
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.png') }}">
|
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.png') }}">
|
||||||
<title>Board++</title>
|
<title>Board++</title>
|
||||||
</head>
|
</head>
|
||||||
<body class="bg-blue-100">
|
<body class=" ">
|
||||||
|
|
||||||
<div id="multi-bg">
|
<div id="multi-bg">
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
@ -1,26 +0,0 @@
|
|||||||
{% extends "base.html" %}
|
|
||||||
|
|
||||||
{% block content %}
|
|
||||||
|
|
||||||
<div class="content">
|
|
||||||
<p>Вы тут: /{{board_id}}</p>
|
|
||||||
</div>
|
|
||||||
|
|
||||||
|
|
||||||
<nav>
|
|
||||||
<a href="/">glavnaya</a>
|
|
||||||
<br>
|
|
||||||
Доски:
|
|
||||||
<div class="boards">
|
|
||||||
<ul>
|
|
||||||
{% for board in boards %}
|
|
||||||
<li><a href="/boards/{{board}}">/{{board}}</a></li>
|
|
||||||
{% endfor %}
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</nav>
|
|
||||||
|
|
||||||
|
|
||||||
{% include 'posts.html' %}
|
|
||||||
|
|
||||||
{% endblock content %}
|
|
@ -1,14 +1,14 @@
|
|||||||
{% if postos | length > 0 %}
|
{% if postos | length > 0 %}
|
||||||
{% for posto in postos %}
|
{% for posto in postos %}
|
||||||
<div class="row">
|
<div class=" ">
|
||||||
{% if posto.root_post %}
|
{% if posto.root_post %}
|
||||||
<div class="card s4 deep-orange accent-4 darken-1">
|
<div class=" ">
|
||||||
{% else %}
|
{% else %}
|
||||||
<div class="card s4 blue-grey darken-1">
|
<div class=" ">
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<div class="row" id="post-{{ posto._key }}">
|
<div class=" " id="post-{{ posto._key }}">
|
||||||
<div class="col s4">
|
<div class=" ">
|
||||||
<div class="card-image">
|
<div class=""">
|
||||||
<div class="hex-main">
|
<div class="hex-main">
|
||||||
<div class="hex-container">
|
<div class="hex-container">
|
||||||
<a href="https://loremflickr.com/g/320/240/paris" target="_blank" ">
|
<a href="https://loremflickr.com/g/320/240/paris" target="_blank" ">
|
||||||
@ -18,21 +18,21 @@
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s8">
|
<div class=" ">
|
||||||
<div class="card-content white-text">
|
<div class=" ">
|
||||||
<span class="card-title">#{{ posto._key }}
|
<span class=" e">#{{ posto._key }}
|
||||||
<span class="new badge blue" data-badge-caption="">Ответов: {{ posto.answers_num }}</span>
|
<span class=" " data-badge-caption="">Ответов: {{ posto.answers_num }}</span>
|
||||||
<span class="new badge red" data-badge-caption="">Длина треда: {{ posto.children_num }}</span>
|
<span class=" " data-badge-caption="">Длина треда: {{ posto.children_num }}</span>
|
||||||
</span>
|
</span>
|
||||||
|
|
||||||
{% if posto.parent_post %}
|
{% if posto.parent_post %}
|
||||||
<a class="card-action" href="#post-{{ posto.parent_post }}"> >>{{ posto.parent_post }} </a>
|
<a class=" " href="#post-{{ posto.parent_post }}"> >>{{ posto.parent_post }} </a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
<p>{{ posto.texto }}</p>
|
<p>{{ posto.texto }}</p>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="col s12">
|
<div class=" ">
|
||||||
<div class="card-action right">
|
<div class=" ">
|
||||||
<a href="#" hx-post="/post_my_post/{{ posto._key }}" hx-target="#neu-posts" >Answer me!</a>
|
<a href="#" hx-post="/post_my_post/{{ posto._key }}" hx-target="#neu-posts" >Answer me!</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -6,8 +6,8 @@
|
|||||||
{% include 'navbar.html' %}
|
{% include 'navbar.html' %}
|
||||||
|
|
||||||
|
|
||||||
<div class="row" >
|
<div class=" " >
|
||||||
<div class="col s5" id="neu-posts">
|
<div class=" " id="neu-posts">
|
||||||
{% include 'i-posts.html' %}
|
{% include 'i-posts.html' %}
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,14 +3,14 @@
|
|||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
{% include 'navbar.html' %}
|
{% include 'navbar.html' %}
|
||||||
<div class="container">
|
<div class=" ">
|
||||||
<div class="row">
|
<div class=" ">
|
||||||
<div class="col s4 center">
|
<div class=" ">
|
||||||
<div class="card">
|
<div class=" ">
|
||||||
<div class="card-image">
|
<div class=" ">
|
||||||
<img class="img-responsive" src="https://static.vdk2ch.ru/test-public/sin.jpg" height="400px" width="320px">
|
<img class=" " src="https://static.vdk2ch.ru/test-public/sin.jpg" height="400px" width="320px">
|
||||||
</div>
|
</div>
|
||||||
<div class="card-content">
|
<div class=" ">
|
||||||
<p>
|
<p>
|
||||||
Dobro pozhalovat. AGAIN.
|
Dobro pozhalovat. AGAIN.
|
||||||
</p>
|
</p>
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<div class="nav-wrapper purple darken-3">
|
<div class=" ">
|
||||||
<ul id="nav-mobile" class="left ">
|
<ul id="nav-mobile" class="left ">
|
||||||
<li> <a href="/">glavnaya</a> </li>
|
<li> <a href="/">glavnaya</a> </li>
|
||||||
<li><a href="/db_posts"><span class="new badge red" data-badge-caption="">here we go</span></a> </li>
|
<li><a href="/db_posts"><span class=" " data-badge-caption="">here we go</span></a> </li>
|
||||||
<li>
|
<li>
|
||||||
<a href="#">Вас закинуло сюда: <span class="new badge blue" data-badge-caption="">{{host_id}}</span></a>
|
<a href="#">Вас закинуло сюда: <span class=" " data-badge-caption="">{{host_id}}</span></a>
|
||||||
</li>
|
</li>
|
||||||
</ul>
|
</ul>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1,75 +0,0 @@
|
|||||||
{% if board_threads|length>0 %}
|
|
||||||
{% for thread in board_threads %}
|
|
||||||
<div class="post post_type_reply post_withimg" id="post-15135655" data-num="15135655">
|
|
||||||
<div class="post__details" id="post-details-15135655">
|
|
||||||
<input type="checkbox" name="delete" class="turnmeoff" value="15135655">
|
|
||||||
<span class="post__detailpart">
|
|
||||||
<span class="post__anon">{{thread.name}}</span>
|
|
||||||
</span>
|
|
||||||
<span class="post__detailpart">
|
|
||||||
<span class="post__time">05/07/23 Срд 14:53:58</span>
|
|
||||||
</span>
|
|
||||||
<span class="post__detailpart">
|
|
||||||
<a href="/news/res/15135633.html#15135655" id="15135655" class="post__reflink">№</a>
|
|
||||||
<a href="/news/res/15135633.html#15135655" class="js-post-reply-btn post__reflink" data-num="15135655">{{thread.post_num}}</a>
|
|
||||||
<span class="post__number">2</span></span>
|
|
||||||
<span class="post__detailpart">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="post__btn post__btn_type_menu icon desktop" data-num="15135655"><use xlink:href="#icon__addmenu"></use></svg>
|
|
||||||
<span data-num="15135655" onclick="addAdminMenu(this); return false;" onmouseout="removeAdminMenu(event); return false;" style="display: flex;">
|
|
||||||
<svg xmlns="http://www.w3.org/2000/svg" class="post__btn post__btn_type_adm icon"><use xlink:href="#icon__report"></use></svg>
|
|
||||||
</span>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="post__images post__images_type_multi">
|
|
||||||
<!-- <div class="post__images">
|
|
||||||
<svg class="post__file-preview " data-width="954" data-height="960" data-type="2" data-md5="15135655-d39bd5b1ed6c40e9a1d1eb2971a57584" data-title="image.png" viewBox="0 0 100 100" data-src="https://static.vdk2ch.ru/thread-pics/{{pic}}" width="168" height="170" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<defs>
|
|
||||||
<pattern id="img-{{thread.post_num}}" patternUnits="userSpaceOnUse" width="100" height="100">
|
|
||||||
<image xlink:href="https://static.vdk2ch.ru/thread-pics/{{pic}}" x="-25" width="150" height="100" />
|
|
||||||
</pattern>
|
|
||||||
</defs>
|
|
||||||
<use>
|
|
||||||
<polygon points="50 1 95 25 95 75 50 99 5 75 5 25" fill="url(#img-{{thread.post_num}})"/>
|
|
||||||
</use>
|
|
||||||
</svg>
|
|
||||||
</div> -->
|
|
||||||
<!-- <figure class="post__image">
|
|
||||||
<figcaption class="post__file-attr">
|
|
||||||
<a class="desktop" target="_blank" href="https://static.vdk2ch.ru/thread-pics/{{pic}}" title="image.png">{{pic}}</a>
|
|
||||||
|
|
||||||
</figcaption> -->
|
|
||||||
<!-- <svg visibility="visible" class="post__file-preview " data-width="954" data-height="960" data-type="2" data-md5="15135655-d39bd5b1ed6c40e9a1d1eb2971a57584" data-title="image.png" viewBox="0 0 100 100" data-src="https://static.vdk2ch.ru/thread-pics/{{pic}}" width="168" height="170" version="1.1" xmlns="http://www.w3.org/2000/svg">
|
|
||||||
<defs>
|
|
||||||
<pattern id="img-{{thread.post_num}}" patternUnits="userSpaceOnUse" width="100" height="100">
|
|
||||||
<image xlink:href="https://static.vdk2ch.ru/thread-pics/{{pic}}" x="-25" width="150" height="100" />
|
|
||||||
</pattern>
|
|
||||||
</defs>
|
|
||||||
<use>
|
|
||||||
<polygon points="50 1 95 25 95 75 50 99 5 75 5 25" fill="url(#img-{{thread.post_num}})"/>
|
|
||||||
</use>
|
|
||||||
</svg> -->
|
|
||||||
|
|
||||||
<!-- <img src="https://static.vdk2ch.ru/thread-pics/{{pic}}" alt="954x960" id="img-15135655-d39bd5b1ed6c40e9a1d1eb2971a57584" class="post__file-preview " data-type="2" data-title="image.png" data-width="954" data-height="960" data-md5="15135655-d39bd5b1ed6c40e9a1d1eb2971a57584" data-src="https://static.vdk2ch.ru/thread-pics/{{pic}}" width="168" height="170"> -->
|
|
||||||
<!-- </figure> -->
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
<div class="hex-main">
|
|
||||||
<div class="hex-container">
|
|
||||||
{% for pic in thread.pic_links %}
|
|
||||||
<a href="https://static.vdk2ch.ru/thread-pics/{{pic}}" target="_blank" ">
|
|
||||||
<img src="https://static.vdk2ch.ru/thread-pics/{{pic}}" >
|
|
||||||
</a>
|
|
||||||
{% endfor %}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<article id="m15135655" class="post__message ">
|
|
||||||
<a href="/news/res/15135633.html#15135633" class="post-reply-link" data-thread="15135633" data-num="15135633">>>15135633 (OP)</a><br>
|
|
||||||
|
|
||||||
{{thread.txt}}
|
|
||||||
</article>
|
|
||||||
<div id="refmap-15135655" class="post__refmap" style="display: none;"></div>
|
|
||||||
</div>
|
|
||||||
{% endfor %}
|
|
||||||
{% endif %}
|
|
Loading…
Reference in New Issue
Block a user