mirror of
https://github.com/ankitects/anki.git
synced 2025-09-18 14:02:21 -04:00
Feat/Replace easy day table with display:grid (#4179)
* Feat/Replace easy day table with grid * Add max width
This commit is contained in:
parent
3d6b4761e4
commit
d3e1fd1f80
1 changed files with 54 additions and 51 deletions
|
@ -20,53 +20,64 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<Item>
|
<Item>
|
||||||
<div class="easy-days-settings">
|
<div class="container">
|
||||||
<table>
|
<div class="easy-days-settings">
|
||||||
<thead>
|
<span></span>
|
||||||
<tr>
|
<span class="header min-col">{tr.deckConfigEasyDaysMinimum()}</span>
|
||||||
<th></th>
|
<span class="header">{tr.deckConfigEasyDaysReduced()}</span>
|
||||||
<th class="header min-col">
|
<span class="header normal-col">{tr.deckConfigEasyDaysNormal()}</span>
|
||||||
<span>{tr.deckConfigEasyDaysMinimum()}</span>
|
|
||||||
</th>
|
{#each easyDays as day, index}
|
||||||
<th class="header text-center">
|
<span class="day">{day}</span>
|
||||||
<span>{tr.deckConfigEasyDaysReduced()}</span>
|
<div class="input-container">
|
||||||
</th>
|
<input
|
||||||
<th class="header normal-col">
|
type="range"
|
||||||
<span>{tr.deckConfigEasyDaysNormal()}</span>
|
bind:value={values[index]}
|
||||||
</th>
|
step={0.5}
|
||||||
</tr>
|
max={1.0}
|
||||||
</thead>
|
min={0.0}
|
||||||
<tbody>
|
list="easy_day_steplist"
|
||||||
{#each easyDays as day, index}
|
/>
|
||||||
<tr>
|
</div>
|
||||||
<td class="day">{day}</td>
|
{/each}
|
||||||
<td colspan="3">
|
</div>
|
||||||
<input
|
|
||||||
type="range"
|
|
||||||
bind:value={values[index]}
|
|
||||||
step={0.5}
|
|
||||||
max={1.0}
|
|
||||||
min={0.0}
|
|
||||||
list="easy_day_steplist"
|
|
||||||
/>
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
{/each}
|
|
||||||
</tbody>
|
|
||||||
</table>
|
|
||||||
</div>
|
</div>
|
||||||
</Item>
|
</Item>
|
||||||
|
|
||||||
<style>
|
<style lang="scss">
|
||||||
.easy-days-settings table {
|
.container {
|
||||||
width: 100%;
|
display: flex;
|
||||||
border-collapse: collapse;
|
justify-content: center;
|
||||||
table-layout: fixed;
|
|
||||||
}
|
}
|
||||||
.easy-days-settings th,
|
.easy-days-settings {
|
||||||
.easy-days-settings td {
|
width: 100%;
|
||||||
padding: 8px;
|
max-width: 1000px;
|
||||||
border-bottom: var(--border) solid 1px;
|
border-collapse: collapse;
|
||||||
|
|
||||||
|
display: grid;
|
||||||
|
grid-template-columns: auto 1fr 1fr 1fr;
|
||||||
|
|
||||||
|
border-collapse: collapse;
|
||||||
|
& > * {
|
||||||
|
padding: 8px 16px;
|
||||||
|
border-bottom: var(--border) solid 1px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.input-container {
|
||||||
|
grid-column: 2 / span 3;
|
||||||
|
}
|
||||||
|
span {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
justify-content: center;
|
||||||
|
|
||||||
|
&.min-col {
|
||||||
|
justify-content: flex-start;
|
||||||
|
}
|
||||||
|
|
||||||
|
&.normal-col {
|
||||||
|
justify-content: flex-end;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.header {
|
.header {
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
|
@ -80,12 +91,4 @@ License: GNU AGPL, version 3 or later; http://www.gnu.org/licenses/agpl.html
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
font-size: smaller;
|
font-size: smaller;
|
||||||
}
|
}
|
||||||
|
|
||||||
.min-col {
|
|
||||||
text-align: start;
|
|
||||||
}
|
|
||||||
|
|
||||||
.normal-col {
|
|
||||||
text-align: end;
|
|
||||||
}
|
|
||||||
</style>
|
</style>
|
||||||
|
|
Loading…
Reference in a new issue