mirror of
https://github.com/sergeyyarkov/digital-store.git
synced 2026-10-11 18:29:11 +03:00
categories page admin
This commit is contained in:
parent
6e25e2f926
commit
3e002476ff
10
dist/public/css/style.css
vendored
10
dist/public/css/style.css
vendored
@ -734,13 +734,13 @@ footer.admin-footer{
|
|||||||
.modal .modal-content h4 {
|
.modal .modal-content h4 {
|
||||||
margin-bottom: 10px;
|
margin-bottom: 10px;
|
||||||
}
|
}
|
||||||
div.table-items td, div.table-items th {
|
div.table td, div.table th {
|
||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
div.table-items > table > tbody > tr > td:nth-child(1) > img{
|
div.table > table > tbody > tr > td:nth-child(1) > img{
|
||||||
height: 20px;
|
height: 20px;
|
||||||
}
|
}
|
||||||
div.table-items > table > tbody > tr > td:nth-child(7) > button.btn.orange {
|
div.table > table > tbody > tr > td:nth-child(7) > button.btn.orange {
|
||||||
margin-left: 5px;
|
margin-left: 5px;
|
||||||
}
|
}
|
||||||
.sidenav .collapsible-body>ul:not(.collapsible)>li.active, .sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active {
|
.sidenav .collapsible-body>ul:not(.collapsible)>li.active, .sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active {
|
||||||
@ -748,4 +748,8 @@ div.table-items > table > tbody > tr > td:nth-child(7) > button.btn.orange {
|
|||||||
}
|
}
|
||||||
.sidenav .collapsible-body>ul:not(.collapsible)>li.active a, .sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active a, .sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active i {
|
.sidenav .collapsible-body>ul:not(.collapsible)>li.active a, .sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active a, .sidenav.sidenav-fixed .collapsible-body>ul:not(.collapsible)>li.active i {
|
||||||
color: #f6f6f6;
|
color: #f6f6f6;
|
||||||
|
}
|
||||||
|
.category-add h5, .category-delete h5 {
|
||||||
|
margin-top: 2rem;
|
||||||
|
margin-bottom: 1rem;
|
||||||
}
|
}
|
||||||
49
dist/views/admin/categories.pug
vendored
49
dist/views/admin/categories.pug
vendored
@ -5,7 +5,54 @@ body.has-fixed-sidenav
|
|||||||
.container
|
.container
|
||||||
.row
|
.row
|
||||||
.col.s12
|
.col.s12
|
||||||
h2 Редактирование категорий
|
h2 Редактирование категорий
|
||||||
|
.col.s12
|
||||||
|
.card
|
||||||
|
.card-content
|
||||||
|
.input-field
|
||||||
|
select
|
||||||
|
option(value="" disabled selected)
|
||||||
|
| Выберите категорию
|
||||||
|
option(value="1" data-icon="../img/service-icons/origin.svg") Origin
|
||||||
|
option(value="2" data-icon="../img/service-icons/steam.svg") Steam
|
||||||
|
label Редактирование
|
||||||
|
.category-add
|
||||||
|
h5 Добавить категорию
|
||||||
|
.row
|
||||||
|
form(action="/" method="POST")
|
||||||
|
.input-field.col.l6.s12
|
||||||
|
input(id="title" name="title" type="text" data-length="20" required)
|
||||||
|
label(for="title") Название категории
|
||||||
|
.file-field.input-field.col.l6.s12
|
||||||
|
.btn.orange
|
||||||
|
span Иконка
|
||||||
|
input(type="file" name="img" required)
|
||||||
|
.file-path-wrapper
|
||||||
|
input(type="text" class="file-path" placeholder="Загрузите иконку в формате .svg")
|
||||||
|
.input-field.col.l6.s12
|
||||||
|
textarea(class="materialize-textarea" type="text" id="type" name="type" required)
|
||||||
|
label(for="type") Тип аккаунтов
|
||||||
|
.input-field.col.l6.s12
|
||||||
|
input(type="text" id="format" name="format" required)
|
||||||
|
label(for="format") Формат аккаунтов
|
||||||
|
.col.s12
|
||||||
|
button(type="submit" class="btn") Добавить категорию
|
||||||
|
button(class="orange btn hide" style="margin-left:5px;") Редактировать
|
||||||
|
.divider
|
||||||
|
.category-delete
|
||||||
|
h5 Удалить категорию
|
||||||
|
.row
|
||||||
|
form(action="/")
|
||||||
|
.input-field.col.s12
|
||||||
|
select
|
||||||
|
option(value="" disabled selected)
|
||||||
|
| Выберите категорию для удаления
|
||||||
|
option(value="1" data-icon="../img/service-icons/origin.svg") Origin
|
||||||
|
option(value="2" data-icon="../img/service-icons/steam.svg") Steam
|
||||||
|
label Удаление
|
||||||
|
.col.s6
|
||||||
|
button(type="submit" class="btn red") Удалить
|
||||||
|
|
||||||
|
|
||||||
include ./assets/templates/footer.pug
|
include ./assets/templates/footer.pug
|
||||||
include ./assets/scripts.pug
|
include ./assets/scripts.pug
|
||||||
2
dist/views/admin/items.pug
vendored
2
dist/views/admin/items.pug
vendored
@ -17,7 +17,7 @@ body.has-fixed-sidenav
|
|||||||
label.label-icon(for="search")
|
label.label-icon(for="search")
|
||||||
i.material-icons search
|
i.material-icons search
|
||||||
i.material-icons close
|
i.material-icons close
|
||||||
.table-items
|
.table-items.table
|
||||||
table.highlight
|
table.highlight
|
||||||
thead
|
thead
|
||||||
tr
|
tr
|
||||||
|
|||||||
@ -29,6 +29,8 @@ export class MaterializeConfig {
|
|||||||
M.Sidenav.init(document.querySelectorAll('.sidenav'));
|
M.Sidenav.init(document.querySelectorAll('.sidenav'));
|
||||||
M.Collapsible.init(document.querySelectorAll('.collapsible'));
|
M.Collapsible.init(document.querySelectorAll('.collapsible'));
|
||||||
M.Modal.init(document.querySelectorAll('.modal'));
|
M.Modal.init(document.querySelectorAll('.modal'));
|
||||||
|
M.FormSelect.init(document.querySelectorAll('select'));
|
||||||
|
document.querySelector('#type') ? M.textareaAutoResize(document.querySelector('#type')) : false
|
||||||
M.updateTextFields();
|
M.updateTextFields();
|
||||||
|
|
||||||
// Окраска li по нажатию
|
// Окраска li по нажатию
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user