Refonte inventaire et objets #236

Merged
kazhnuz merged 27 commits from inventaire into master 2023-02-18 19:06:28 +01:00
5 changed files with 55 additions and 18 deletions
Showing only changes of commit f559e7cd5a - Show all commits

View file

@ -71,7 +71,7 @@ function goTo(page: number) {
></TagList> ></TagList>
</div> </div>
</div> </div>
<table class="pb-0 table-auto"> <table class="mb-0 table-auto">
<thead> <thead>
<tr> <tr>
<th v-for="field in fields" :key="field.key"> <th v-for="field in fields" :key="field.key">
@ -102,8 +102,9 @@ function goTo(page: number) {
padding-bottom: 0.5rem; padding-bottom: 0.5rem;
} }
table { table:not(:last-child) {
font-size: 0.8rem; font-size: 0.8rem;
margin-bottom: 0.5rem;
} }
.pages { .pages {

View file

@ -13,7 +13,7 @@ const isPage = computed(() => {
<template> <template>
<button <button
class="btn-small" class="btn-small btn-pagination"
:class="{ 'btn-secondary': !isPage, 'bg-primary': isPage }" :class="{ 'btn-secondary': !isPage, 'bg-primary': isPage }"
:disabled="isPage" :disabled="isPage"
> >

View file

@ -31,7 +31,7 @@ function setPage(page: number) {
<template> <template>
<div> <div>
<button <button
class="btn-small" class="btn-small btn-navig"
:disabled="currentPage <= 1" :disabled="currentPage <= 1"
:class="{ 'btn-secondary': currentPage > 1, 'bg-grey': currentPage <= 1 }" :class="{ 'btn-secondary': currentPage > 1, 'bg-grey': currentPage <= 1 }"
@click="setPage(currentPage - 1)" @click="setPage(currentPage - 1)"
@ -39,13 +39,13 @@ function setPage(page: number) {
</button> </button>
<span v-if="pageNbr <= PAGE_NUMBER"> <span v-if="pageNbr <= PAGE_NUMBER">
<v-for v-for="index in pageToDraw" :key="index"> <span v-for="index in pageToDraw" :key="index">
<PageButton <PageButton
@click="setPage(index)" @click="setPage(index)"
:current-page="currentPage" :current-page="currentPage"
:page="index" :page="index"
></PageButton> ></PageButton>
</v-for> </span>
</span> </span>
<span v-else-if="isAtStart"> <span v-else-if="isAtStart">
<PageButton <PageButton
@ -135,7 +135,7 @@ function setPage(page: number) {
></PageButton> ></PageButton>
</span> </span>
<button <button
class="btn-small" class="btn-small btn-navig"
:disabled="currentPage >= pageNbr" :disabled="currentPage >= pageNbr"
:class="{ :class="{
'btn-secondary': currentPage < pageNbr, 'btn-secondary': currentPage < pageNbr,

View file

@ -4,26 +4,46 @@
table { table {
border-collapse: collapse; border-collapse: collapse;
border-spacing: 0;
&:not(:last-child) { &:not(:last-child) {
margin-bottom: 1.5rem; margin-bottom: 1.5rem;
} }
} }
th, td { th, td {
border:1px solid rgba(0,0,0,0.2); padding: 0.325rem;
padding:0; border:0;
margin:0; margin:0;
} }
th { th {
vertical-align: center; vertical-align: center;
text-align: center;
}
th, td {
padding: 0.325em;
}
th {
font-weight: $fontweight_hyper; font-weight: $fontweight_hyper;
background-color:$color-primary;
color:white;
} }
td {
background-color:$color-background-alt;
tr:nth-child(even) & {
background-color: darken($color-background-alt, 7.5%);
}
}
thead {
th:first-child {
border-top-left-radius: 10px;
}
th:last-child {
border-top-right-radius: 10px;
}
}
tr:last-child td:first-child {
border-bottom-left-radius: 10px;
}
tr:last-child td:last-child {
border-bottom-right-radius: 10px;
}

View file

@ -8,12 +8,28 @@ article .table-auto table, table.table-auto {
table-layout: auto; table-layout: auto;
} }
article table { table {
display: table; display: table;
width: 100%; width: 100%;
table-layout: fixed; table-layout: fixed;
} }
.btn-pagination, .btn-navig {
margin:0;
border-radius: 0;
width: 2rem;
}
.btn-navig:first-child {
border-top-left-radius: $btn-radius;
border-bottom-left-radius: $btn-radius;
}
.btn-navig:last-child {
border-top-right-radius: $btn-radius;
border-bottom-right-radius: $btn-radius;
}
article th { article th {
height: 34px; height: 34px;
} }