Compare commits
20 Commits
master-of-
...
our-style
Author | SHA1 | Date | |
---|---|---|---|
|
701c5cc6ff | ||
|
07b6992295 | ||
|
510c19b194 | ||
|
45cd3a1d59 | ||
|
ca8f8aa510 | ||
|
a935aea926 | ||
|
0768ff5d0e | ||
|
8cc52a2d2e | ||
|
5fda9d5444 | ||
|
af4a8f5b20 | ||
|
e08d767ded | ||
|
cf33c91651 | ||
|
2560ab3d51 | ||
|
0c3272cac8 | ||
|
4eb461e0e1 | ||
|
2714b49ea9 | ||
|
0b3e534d63 | ||
|
813a769871 | ||
|
9d1889232e | ||
|
5afeefa0ba |
89
.drone.yml
89
.drone.yml
@ -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
|
||||
- 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
|
||||
|
||||
|
3
.gitignore
vendored
3
.gitignore
vendored
@ -1 +1,2 @@
|
||||
__pycache__
|
||||
__pycache__
|
||||
static/.webassets_cache
|
@ -212,4 +212,6 @@ stateDiagram-v2
|
||||
Grafana --> dash_join
|
||||
dash_join --> User : дашборды
|
||||
|
||||
```
|
||||
```
|
||||
|
||||
|
||||
|
33
app.py
33
app.py
@ -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')
|
||||
|
||||
# предполагается что меняться список будет весьма редко, поэтому подхватываем при лишь при перезапуске
|
||||
@ -47,15 +48,7 @@ def healthz():
|
||||
@app.route("/")
|
||||
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():
|
||||
@ -109,29 +102,7 @@ def post_a_post(post_key):
|
||||
# def post_a_file():
|
||||
# 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')
|
Binary file not shown.
Binary file not shown.
@ -1,11 +1,11 @@
|
||||
/* украдено здесь https://css-tricks.com/hexagons-and-beyond-flexible-responsive-grid-patterns-sans-media-queries/ */
|
||||
|
||||
.hex-main {
|
||||
display:flex;
|
||||
display:flex;
|
||||
--s: 100px; /* size */
|
||||
--m: 4px; /* margin */
|
||||
--f: calc(1.732 * var(--s) + 4 * var(--m) - 1px);
|
||||
max-width: 440px;
|
||||
max-width: 330px;
|
||||
margin: 15px;
|
||||
}
|
||||
|
||||
|
@ -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 %}
|
||||
|
@ -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,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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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>
|
||||
|
@ -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 %}
|
@ -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 %}
|
@ -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 %}
|
Loading…
Reference in New Issue
Block a user