Compare commits

...

20 Commits

Author SHA1 Message Date
Simple_Not
701c5cc6ff upd drone mst
All checks were successful
continuous-integration/drone/push Build is passing
2023-11-16 17:06:19 +10:00
Simple_Not
07b6992295 upd drone oir-stili 2023-11-16 17:05:32 +10:00
Simple_Not
510c19b194 upd drone oir-stili 2023-11-16 17:02:50 +10:00
Simple_Not
45cd3a1d59 upd drone oir-stili 2023-11-16 16:55:12 +10:00
Simple_Not
ca8f8aa510 upd drone oir-stili 2023-11-16 16:43:05 +10:00
Simple_Not
a935aea926 check many hexes
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 23:03:27 +10:00
Simple_Not
0768ff5d0e check many hexes
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 21:17:26 +10:00
Simple_Not
8cc52a2d2e check many hexes
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 21:16:29 +10:00
Simple_Not
5fda9d5444 check many hexes
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 21:14:21 +10:00
Simple_Not
af4a8f5b20 check many hexes
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 21:13:37 +10:00
Simple_Not
e08d767ded check many hexes
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 21:12:25 +10:00
Simple_Not
cf33c91651 check many hexes
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 21:11:07 +10:00
Simple_Not
2560ab3d51 check many hexes
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 21:09:28 +10:00
Simple_Not
0c3272cac8 check many hexes
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 20:19:38 +10:00
Simple_Not
4eb461e0e1 sin fix
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-18 20:05:24 +10:00
Simple_Not
2714b49ea9 sin fix
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-18 20:03:33 +10:00
Simple_Not
0b3e534d63 sin fix
Some checks failed
continuous-integration/drone/push Build is failing
2023-07-18 19:59:14 +10:00
Simple_Not
813a769871 remake many certs
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-17 12:55:47 +10:00
Simple_Not
9d1889232e rm styles
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-16 02:35:06 +10:00
Simple_Not
5afeefa0ba rm styles
All checks were successful
continuous-integration/drone/push Build is passing
2023-07-16 02:32:19 +10:00
16 changed files with 101 additions and 239 deletions

View File

@ -15,54 +15,93 @@ steps:
- name: pull into the folduh
commands:
- cd /usr/share/repos/$DRONE_REPO_NAME
- git checkout $DRONE_COMMIT_BRANCH
- git pull origin $DRONE_COMMIT_BRANCH
- name: build
environment:
DOCKER_TLS_VERIFY: 1
DOCKER_HOST: "tcp://192.168.49.2:2376"
DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
MINIKUBE_ACTIVE_DOCKERD: "minikube"
# - name: build
# environment:
# DOCKER_TLS_VERIFY: 1
# DOCKER_HOST: "tcp://192.168.49.2:2376"
# DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
# MINIKUBE_ACTIVE_DOCKERD: "minikube"
# commands:
# - cd /usr/share/repos/$DRONE_REPO_NAME
# - git checkout $DRONE_COMMIT_BRANCH
# - docker build . -t ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)"
# - docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" ${DRONE_REPO_NAME}:latest
# - docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- name: build to harbor
commands:
- cd /usr/share/repos/$DRONE_REPO_NAME
- git checkout $DRONE_COMMIT_BRANCH
- docker build . -t ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)"
- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" ${DRONE_REPO_NAME}:latest
- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
#- docker build . -t ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)"
#- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:latest
#- docker tag ${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}-"$(git rev-parse --short HEAD)" harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- docker build . -t harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- docker login harbor.guaranteedstruggle.host -u 'robot$drono' -p valgBwMgcB86azvmuezTOC3omjXZ1NZe
- docker push harbor.guaranteedstruggle.host/library/${DRONE_REPO_NAME}:${DRONE_COMMIT_BRANCH}
- name: restart deployment master
environment:
DOCKER_TLS_VERIFY: 1
DOCKER_HOST: "tcp://192.168.49.2:2376"
DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
MINIKUBE_ACTIVE_DOCKERD: "minikube"
KUBECONFIG: /etc/kubernetes/admin.conf
commands:
- su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-master"
- kubectl rollout restart -n vdk2ch deployment flask-htmx-master
when:
branch:
- master-of-slaves
- name: restart deployment dev
environment:
DOCKER_TLS_VERIFY: 1
DOCKER_HOST: "tcp://192.168.49.2:2376"
DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
MINIKUBE_ACTIVE_DOCKERD: "minikube"
KUBECONFIG: /etc/kubernetes/admin.conf
commands:
- su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-dev"
- kubectl rollout restart -n vdk2ch deployment flask-htmx-dev
when:
branch:
- dev
- name: restart deployment our-style
environment:
DOCKER_TLS_VERIFY: 1
DOCKER_HOST: "tcp://192.168.49.2:2376"
DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
MINIKUBE_ACTIVE_DOCKERD: "minikube"
KUBECONFIG: /etc/kubernetes/admin.conf
commands:
- su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-our-style"
- kubectl rollout restart -n vdk2ch deployment flask-htmx-our-style
when:
branch:
- our-style
# - name: restart deployment master
# environment:
# DOCKER_TLS_VERIFY: 1
# DOCKER_HOST: "tcp://192.168.49.2:2376"
# DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
# MINIKUBE_ACTIVE_DOCKERD: "minikube"
# commands:
# - su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-master"
# when:
# branch:
# - master-of-slaves
# - name: restart deployment dev
# environment:
# DOCKER_TLS_VERIFY: 1
# DOCKER_HOST: "tcp://192.168.49.2:2376"
# DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
# MINIKUBE_ACTIVE_DOCKERD: "minikube"
# commands:
# - su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-dev"
# when:
# branch:
# - dev
# - name: restart deployment our-style
# environment:
# DOCKER_TLS_VERIFY: 1
# DOCKER_HOST: "tcp://192.168.49.2:2376"
# DOCKER_CERT_PATH: "/home/hogweed1/.minikube/certs"
# MINIKUBE_ACTIVE_DOCKERD: "minikube"
# commands:
# - su - hogweed1 -c "minikube kubectl -- rollout restart -n vdk2ch deployment flask-htmx-our-style"
# when:
# branch:
# - our-style

1
.gitignore vendored
View File

@ -1 +1,2 @@
__pycache__
static/.webassets_cache

View File

@ -213,3 +213,5 @@ stateDiagram-v2
dash_join --> User : дашборды
```

33
app.py
View File

@ -23,9 +23,10 @@ js.build()
docker_short_id = socket.gethostname()
arango_client = ArangoClient(hosts='https://arango.vdk2ch.ru')
arango_client = ArangoClient(hosts='https://arango.guaranteedstruggle.host')
db = arango_client.db('board1', username='root', password='stolendick527')
# предполагается что меняться список будет весьма редко, поэтому подхватываем при лишь при перезапуске
@ -49,14 +50,6 @@ def homepage():
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")
def page_posts_from_db():
@ -110,28 +103,6 @@ def post_a_post(post_key):
# pass
### stolen
@app.route("/todo")
def page_todo():
return render_template("page1.html")
@app.route("/search", methods=["POST"])
def search_todo():
search_term = request.form.get("search")
if not len(search_term):
return render_template("todo.html", host_id=docker_short_id, todos=[])
res_todos = []
for todo in todos:
if search_term in todo["title"]:
res_todos.append(todo)
return render_template("todo.html", host_id=docker_short_id, todos=res_todos)
### /stolen
if __name__ == "__main__":
app.run(debug=True, host='0.0.0.0')

View File

@ -5,7 +5,7 @@
--s: 100px; /* size */
--m: 4px; /* margin */
--f: calc(1.732 * var(--s) + 4 * var(--m) - 1px);
max-width: 440px;
max-width: 330px;
margin: 15px;
}

View File

@ -16,7 +16,7 @@
<link rel="shortcut icon" href="{{ url_for('static', filename='favicon.png') }}">
<title>Board++</title>
</head>
<body class="bg-blue-100">
<body class=" ">
<div id="multi-bg">
{% block content %}

View File

@ -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 %}

View File

@ -1,38 +1,39 @@
{% if postos | length > 0 %}
{% for posto in postos %}
<div class="row">
<div class=" ">
{% if posto.root_post %}
<div class="card s4 deep-orange accent-4 darken-1">
<div class=" ">
{% else %}
<div class="card s4 blue-grey darken-1">
<div class=" ">
{% endif %}
<div class="row" id="post-{{ posto._key }}">
<div class="col s4">
<div class="card-image">
<div class=" " id="post-{{ posto._key }}">
<div class=" ">
<div class="">
<div class="hex-main">
<div class="hex-container">
<a href="https://loremflickr.com/g/320/240/paris" target="_blank" ">
<img src="https://loremflickr.com/g/320/240/paris">
</a>
</div>
</div>
</div>
</div>
<div class="col s8">
<div class="card-content white-text">
<span class="card-title">#{{ posto._key }}
<span class="new badge blue" data-badge-caption="">Ответов: {{ posto.answers_num }}</span>
<span class="new badge red" data-badge-caption="">Длина треда: {{ posto.children_num }}</span>
<div class=" ">
<div class=" ">
<span class=" e">#{{ posto._key }}
<span class=" " data-badge-caption="">Ответов: {{ posto.answers_num }}</span>
<span class=" " data-badge-caption="">Длина треда: {{ posto.children_num }}</span>
</span>
{% 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 %}
<p>{{ posto.texto }}</p>
</div>
</div>
<div class="col s12">
<div class="card-action right">
<div class=" ">
<div class=" ">
<a href="#" hx-post="/post_my_post/{{ posto._key }}" hx-target="#neu-posts" >Answer me!</a>
</div>
</div>

View File

@ -6,8 +6,8 @@
{% include 'navbar.html' %}
<div class="row" >
<div class="col s5" id="neu-posts">
<div class=" " >
<div class=" " id="neu-posts">
{% include 'i-posts.html' %}
</div>
</div>

View File

@ -3,14 +3,14 @@
{% block content %}
{% include 'navbar.html' %}
<div class="container">
<div class="row">
<div class="col s4 center">
<div class="card">
<div class="card-image">
<img class="img-responsive" src="https://static.vdk2ch.ru/test-public/sin.jpg" height="400px" width="320px">
<div class=" ">
<div class=" ">
<div class=" ">
<div class=" ">
<div class=" ">
<img class=" " src="https://static.guaranteedstruggle.host/test-public/sin.jpg" height="400px" width="320px">
</div>
<div class="card-content">
<div class=" ">
<p>
Dobro pozhalovat. AGAIN.
</p>

View File

@ -1,11 +1,11 @@
<nav>
<div class="nav-wrapper purple darken-3">
<div class=" ">
<ul id="nav-mobile" class="left ">
<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>
<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>
</ul>
</div>

View File

@ -1,36 +0,0 @@
{% extends "base.html" %}
{% block content %}
<div class="panel-block">
<div class="w-small w-2/3 mx-auto py-10 text-gray-600">
<input
type="text"
name="search"
hx-post="/search"
hx-trigger="keyup changed delay:250ms"
hx-indicator=".htmx-indicator"
hx-target="#todo-results"
placeholder="Search"
class="bg-white h-10 px-5 pr-10 rounded-full text-2xl focus:outline-none"
>
<span class="htmx-indicator">Searching...</span>
</div>
+dev 3
<table class="border-collapse w-small w-2/3 mx-auto">
<thead>
<tr>
<th class="p-3 font-bold uppercase bg-gray-200 text-gray-600 border border-gray-300 hidden lg:table-cell">#</th>
<th class="p-3 font-bold uppercase bg-gray-200 text-gray-600 border border-gray-300 hidden lg:table-cell">Title</th>
<th class="p-3 font-bold uppercase bg-gray-200 text-gray-600 border border-gray-300 hidden lg:table-cell">Completed</th>
</tr>
</thead>
<tbody id="todo-results">
{% include 'todo.html' %}
</tbody>
</table>
</div>
{% endblock content %}

View File

@ -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">&gt;&gt;15135633 (OP)</a><br>
{{thread.txt}}
</article>
<div id="refmap-15135655" class="post__refmap" style="display: none;"></div>
</div>
{% endfor %}
{% endif %}

View File

@ -1,15 +0,0 @@
{% if todos|length>0 %}
{% for todo in todos %}
<tr class="bg-white lg:hover:bg-gray-100 flex lg:table-row flex-row lg:flex-row flex-wrap lg:flex-no-wrap mb-10 lg:mb-0">
<td class="w-full lg:w-auto p-3 text-gray-800 text-center border border-b block lg:table-cell relative lg:static">{{todo.id}}</td>
<td class="w-full lg:w-auto p-3 text-gray-800 text-center border border-b block lg:table-cell relative lg:static">{{todo.title}}</td>
<td class="w-full lg:w-auto p-3 text-gray-800 text-center border border-b block lg:table-cell relative lg:static">
{% if todo.completed %}
<span class="rounded bg-green-400 py-1 px-3 text-xs font-bold">Yes</span>
{% else %}
<span class="rounded bg-red-400 py-1 px-3 text-xs font-bold">No</span>
{% endif %}
</td>
</tr>
{% endfor %}
{% endif %}