Compare commits

..

35 Commits

Author SHA1 Message Date
Simple_Not
a57a964c60 fix
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-13 15:12:58 +10:00
Simple_Not
9847f24432 fix bd
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-13 15:02:52 +10:00
Simple_Not
6c4235bed1 now we counting
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-13 01:05:54 +10:00
Simple_Not
0118b859d1 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:26:01 +10:00
Simple_Not
b69f359af9 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:24:36 +10:00
Simple_Not
74cf65b299 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:20:03 +10:00
Simple_Not
578e3eae3d annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:18:00 +10:00
Simple_Not
62c27f9729 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:17:01 +10:00
Simple_Not
742f32b5c5 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:16:34 +10:00
Simple_Not
d354cb1ab2 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:15:09 +10:00
Simple_Not
04ca092bae annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:14:07 +10:00
Simple_Not
b6b9e2426d annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:12:48 +10:00
Simple_Not
6fbb7b035c annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:10:59 +10:00
Simple_Not
52b73d89dc annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:10:22 +10:00
Simple_Not
685a53ffee annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:09:26 +10:00
Simple_Not
7579471b77 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:06:58 +10:00
Simple_Not
2b817b96c6 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:05:47 +10:00
Simple_Not
0ce9283cc7 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:04:44 +10:00
Simple_Not
8cdcab76d5 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:03:39 +10:00
Simple_Not
ddfb8f217a annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:02:56 +10:00
Simple_Not
4e583b6507 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:01:46 +10:00
Simple_Not
375994a607 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 02:00:29 +10:00
Simple_Not
3d13563437 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:59:04 +10:00
Simple_Not
88e1b7afdd annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:57:15 +10:00
Simple_Not
55f0db1a33 annother hexxo
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-12 01:56:16 +10:00
Simple_Not
16a249c9d4 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:53:31 +10:00
Simple_Not
66cc98ecfc annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:50:29 +10:00
Simple_Not
1cde8d0d02 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:45:44 +10:00
Simple_Not
3adcc12242 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:45:29 +10:00
Simple_Not
1016d11ae2 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:43:59 +10:00
Simple_Not
38d9e1443f annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:39:13 +10:00
Simple_Not
77b3520b12 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:36:34 +10:00
Simple_Not
f952ef97c6 annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:31:15 +10:00
Simple_Not
22d5932d8d annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:30:05 +10:00
Simple_Not
e18923fe3a annother hexxo
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-12 01:23:49 +10:00
7 changed files with 82 additions and 71 deletions

View File

@ -2,13 +2,13 @@
FROM python:3.11-alpine
# copy the requirements file into the image
COPY ./reqs.txt /app/reqs.txt
COPY ./reqs.txt /app/reqs0.txt
# switch working directory
WORKDIR /app
# install the dependencies and packages in the requirements file
RUN pip install -r reqs.txt
RUN pip install -r reqs0.txt
# copy every content from the local file to the image
COPY . /app

24
app.py
View File

@ -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,6 +23,14 @@ 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():
@ -40,8 +48,7 @@ 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):
@ -49,6 +56,15 @@ 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():

View File

@ -1,2 +1,3 @@
flask
flask-assets
flask-assets
python-arango

View File

@ -0,0 +1,39 @@
/* украдено здесь 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));
}

View File

@ -20,45 +20,6 @@
</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' %}

View File

@ -21,7 +21,6 @@
</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>
@ -34,13 +33,11 @@
</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>
<!-- <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;">
</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">
@ -52,27 +49,24 @@
</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">
</a>
</figure>
{% endfor %}
<!-- <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">&gt;&gt;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>

View File

@ -31,7 +31,7 @@ open_threads = {
'99': {
'thread_num': '99',
'post_num': '55',
'pic_links': ['Экран-смерти.jpg'],
'pic_links': ['Экран-смерти.jpg','Экран-смерти.jpg','Экран-смерти.jpg','Экран-смерти.jpg','15937598937440.png','Экран-смерти.jpg','Экран-смерти.jpg'],
'txt': 'фыва',
'name': 'anonius'
},