Compare commits
No commits in common. "a57a964c601cb8c71058436a72ef966ce37e345b" and "ef65feaa7158b15269a4a300c74a8560470a5f5d" have entirely different histories.
a57a964c60
...
ef65feaa71
@ -2,13 +2,13 @@
|
||||
FROM python:3.11-alpine
|
||||
|
||||
# copy the requirements file into the image
|
||||
COPY ./reqs.txt /app/reqs0.txt
|
||||
COPY ./reqs.txt /app/reqs.txt
|
||||
|
||||
# switch working directory
|
||||
WORKDIR /app
|
||||
|
||||
# install the dependencies and packages in the requirements file
|
||||
RUN pip install -r reqs0.txt
|
||||
RUN pip install -r reqs.txt
|
||||
|
||||
# copy every content from the local file to the image
|
||||
COPY . /app
|
||||
|
24
app.py
24
app.py
@ -1,13 +1,13 @@
|
||||
from flask import Flask, render_template, request
|
||||
from flask_assets import Bundle, Environment
|
||||
from todo import todos
|
||||
#from boards import board_list
|
||||
from boards import board_list
|
||||
from threads import threads_lists
|
||||
from threads_with_posts import open_threads
|
||||
from arango import ArangoClient
|
||||
|
||||
import socket
|
||||
|
||||
|
||||
app = Flask(__name__)
|
||||
|
||||
assets = Environment(app)
|
||||
@ -23,14 +23,6 @@ js.build()
|
||||
|
||||
|
||||
|
||||
|
||||
arango_client = ArangoClient(hosts='https://arango.vdk2ch.ru')
|
||||
db = arango_client.db('board1', username='root', password='stolendick527')
|
||||
|
||||
# предполагается что меняться список будет весьма редко, поэтому подхватываем при лишь при перезапуске
|
||||
boards0 = db.collection('boards')
|
||||
board_list = [ k['_key'] for k in boards0]
|
||||
|
||||
|
||||
@app.route('/liveness')
|
||||
def healthx():
|
||||
@ -48,7 +40,8 @@ def homepage():
|
||||
docker_short_id = socket.gethostname()
|
||||
return render_template("main-page.html", host_id=docker_short_id, boards=board_list)
|
||||
|
||||
|
||||
|
||||
### stolen
|
||||
@app.route("/boards/<board_id>")
|
||||
def page_board(board_id):
|
||||
|
||||
@ -56,15 +49,6 @@ def page_board(board_id):
|
||||
return render_template("board.html", board_id=board_id, boards=board_list, board_threads=b_threads)
|
||||
|
||||
|
||||
# @app.route('/post_my_post', method=['POST'])
|
||||
# def post_a_post():
|
||||
# pass
|
||||
|
||||
# @app.route('/post_my_file', method=['POST'])
|
||||
# def post_a_file():
|
||||
# pass
|
||||
|
||||
|
||||
### stolen
|
||||
@app.route("/todo")
|
||||
def page_todo():
|
||||
|
@ -1,39 +0,0 @@
|
||||
/* украдено здесь https://css-tricks.com/hexagons-and-beyond-flexible-responsive-grid-patterns-sans-media-queries/ */
|
||||
|
||||
.hex-main {
|
||||
display:flex;
|
||||
--s: 100px; /* size */
|
||||
--m: 4px; /* margin */
|
||||
--f: calc(1.732 * var(--s) + 4 * var(--m) - 1px);
|
||||
max-width: 440px;
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
.hex-container {
|
||||
font-size: 0; /*disable white space between inline block element */
|
||||
}
|
||||
|
||||
.hex-container img {
|
||||
width: var(--s);
|
||||
margin: var(--m);
|
||||
height: calc(var(--s)*1.1547);
|
||||
display: inline-block;
|
||||
font-size:initial;
|
||||
clip-path: polygon(0% 25%, 0% 75%, 50% 100%, 100% 75%, 100% 25%, 50% 0%);
|
||||
background: red;
|
||||
margin-bottom: calc(var(--m) - var(--s)*0.2885);
|
||||
}
|
||||
|
||||
.hex-container img:nth-child(odd) {
|
||||
background:green;
|
||||
}
|
||||
.hex-container::before {
|
||||
content: "";
|
||||
width: calc(var(--s)/2 + var(--m));
|
||||
float: left;
|
||||
height: 120%;
|
||||
shape-outside: repeating-linear-gradient(
|
||||
#0000 0 calc(var(--f) - 3px),
|
||||
#000 0 var(--f));
|
||||
}
|
||||
|
@ -20,6 +20,45 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!--
|
||||
<table class="pure-table-odd">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="">пикча эта ваша</th>
|
||||
<th class="">номер треда</th>
|
||||
<th class="">номер поста</th>
|
||||
<th class="">автор(ка)</th>
|
||||
<th class="">текст</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody id="thread-results">
|
||||
{% for thread in board_threads %}
|
||||
<tr class="">
|
||||
<td class="">
|
||||
<a href="https://static.vdk2ch.ru/thread-pics/{{thread.pic_links}}" target=”_blank”>
|
||||
<svg viewBox="0 0 100 100" 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/{{thread.pic_links}}" x="-25" width="150" height="100" />
|
||||
</pattern>
|
||||
</defs>
|
||||
<polygon points="50 1 95 25 95 75 50 99 5 75 5 25" fill="url(#img-{{thread.post_num}})"/>
|
||||
</svg>
|
||||
</a>
|
||||
<img src="https://static.vdk2ch.ru/thread-pics/{{thread.pic_links}}" alt="" width="200" height="200">
|
||||
</td>
|
||||
<td class="">{{thread.thread_num}}</td>
|
||||
<td class="">{{thread.post_num}}</td>
|
||||
<td class="">{{thread.name}}</td>
|
||||
<td class="">{{thread.txt}}</td>
|
||||
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
-->
|
||||
|
||||
|
||||
<li>
|
||||
|
||||
{% include 'posts.html' %}
|
||||
|
@ -21,6 +21,7 @@
|
||||
</span>
|
||||
</div>
|
||||
<div class="post__images post__images_type_multi">
|
||||
{% for pic in thread.pic_links %}
|
||||
<!-- <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>
|
||||
@ -33,11 +34,13 @@
|
||||
</use>
|
||||
</svg>
|
||||
</div> -->
|
||||
<!-- <figure class="post__image">
|
||||
<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 xmlns="http://www.w3.org/2000/svg" class="icon js-post-findimg desktop"><use xlink:href="#icon__findimg"></use></svg>
|
||||
<svg xmlns="http://www.w3.org/2000/svg" class="icon js-post-saveimg desktop" data-url="https://static.vdk2ch.ru/thread-pics/{{pic}}" data-name="image.png"><use xlink:href="#icon__saveimg"></use></svg> -->
|
||||
</figcaption>
|
||||
<a href="https://static.vdk2ch.ru/thread-pics/{{pic}}" class="post__image-link" target="_blank" onclick="return false;">
|
||||
<!-- <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">
|
||||
@ -49,24 +52,27 @@
|
||||
</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>
|
||||
<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">
|
||||
</a>
|
||||
</figure>
|
||||
{% endfor %}
|
||||
</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>
|
||||
|
||||
<!--
|
||||
|
||||
{% for pic in thread.pic_links %}
|
||||
<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>
|
||||
{% endfor %} -->
|
||||
{{thread.txt}}
|
||||
</article>
|
||||
<div id="refmap-15135655" class="post__refmap" style="display: none;"></div>
|
||||
|
@ -31,7 +31,7 @@ open_threads = {
|
||||
'99': {
|
||||
'thread_num': '99',
|
||||
'post_num': '55',
|
||||
'pic_links': ['Экран-смерти.jpg','Экран-смерти.jpg','Экран-смерти.jpg','Экран-смерти.jpg','15937598937440.png','Экран-смерти.jpg','Экран-смерти.jpg'],
|
||||
'pic_links': ['Экран-смерти.jpg'],
|
||||
'txt': 'фыва',
|
||||
'name': 'anonius'
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user