dashboard-add.html
2.88 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
{% extends 'base.html' %}
{% block styles %}
<style>
.table {
border-collapse: collapse;
width: 100%;
}
.table th, .table td {
text-align: left;
padding: 8px;
border-bottom: 1px solid #ddd;
}
.table tr:hover {
background-color: #f5f5f5;
}
.search-form {
margin-bottom: 20px;
}
.search-form .input-group {
width: 300px;
}
</style>
{% endblock %}
<!DOCTYPE html>
<html>
<head>
<title>{% block title %}{% endblock %}</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/style.css') }}">
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='css/bootstrap.min.css') }}">
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-rbsA2VBKQhggwzxH7pPCaAqO46MgnOM80zW1RWuH61DGLwZJEdK2Kadq2F9CUG65" crossorigin="anonymous">
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.3/dist/js/bootstrap.bundle.min.js" integrity="sha384-kenU1KFdBIe4zVF0s0G1M5b4hcpxyD9F7jL+jjXkk+Q2h455rYXK/7HAuoJl+0I4" crossorigin="anonymous"></script>
<script src="https://cdn.jsdelivr.net/npm/jquery@3.5.1/dist/jquery.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
</head>
<body>
<div class="content">
{% block content %}
<div class="container px-4 py-5" id="hanging-icons">
<h2 class="pb-2 border-bottom">{{gettext('t_components_shop')}}</h2>
<form action="{{ url_for('components.dashboard') }}" method="GET" class="search-form">
<div class="input-group">
<input type="text" name="search_query" class="form-control" placeholder="Search components">
<button type="submit" class="btn btn-primary">Search</button>
</div>
</form>
<div class="row g-4 py-5 row-cols-1 row-cols-lg-3">
{% if component_server %}
{% for component in component_server %}
<div class="col d-flex align-items-start">
<div class="icon-square bg-light text-dark flex-shrink-0 me-3">
<img class="d-block mx-auto mb-4" src="/static/img/logo-k2.png" alt="" width="60">
</div>
<div>
<h2>{{ component.name|title }}</h2>
<p>{{ component.description }}</p>
<p>ВЕРСІЯ {{ component.latest_version }}</p>
{% if component.name in components_names %}
<button type="button" class="btn btn-success">Installed</button>
{% else %}
<a href="" class="btn btn-primary">Install</a>
{% endif %}
</div>
</div>
{% endfor %}
{% else %}
<div class="col">
<p>No components available.</p>
</div>
{% endif %}
</div>
</div>
{% endblock %}
</div>
</body>
</html>