b2f5f36207
* Revert "fix(icons): fix icons.svg url (#769)" This reverts commit1d34d45da7
. * Revert "perf: use prefetch instead of preload for svgs (#765)" This reverts commitb73dd548ae
. * Revert "perf: build separate icons.svg file (#762)" This reverts commitee45c07314
. * move svg to end of 2xx.html
84 lines
2 KiB
HTML
84 lines
2 KiB
HTML
<ul class="generic-dialog-list">
|
|
{#each items as item (item.key)}
|
|
<li class="generic-dialog-list-item">
|
|
<button class="generic-dialog-list-button" on:click="fire('click', item)">
|
|
<svg class="generic-dialog-list-item-svg">
|
|
<use xlink:href={item.icon} />
|
|
</svg>
|
|
<span class="generic-dialog-list-button-span">
|
|
{item.label}
|
|
</span>
|
|
{#if selectable}
|
|
<svg class="generic-dialog-list-item-svg {item.selected ? '' : 'hidden'}" aria-hidden={!item.selected}>
|
|
<use xlink:href="#fa-check" />
|
|
</svg>
|
|
{/if}
|
|
</button>
|
|
</li>
|
|
{/each}
|
|
</ul>
|
|
<style>
|
|
.generic-dialog-list {
|
|
list-style: none;
|
|
width: 100%;
|
|
border: 1px solid var(--settings-list-item-border);
|
|
box-sizing: border-box;
|
|
min-width: 350px;
|
|
max-width: calc(100vw - 20px);
|
|
}
|
|
.generic-dialog-list-item {
|
|
border: 1px solid var(--settings-list-item-border);
|
|
font-size: 1.2em;
|
|
display: flex;
|
|
}
|
|
.generic-dialog-list-item-svg {
|
|
width: 24px;
|
|
height: 24px;
|
|
fill: var(--svg-fill);
|
|
}
|
|
.generic-dialog-list-button {
|
|
flex: 1;
|
|
padding: 20px;
|
|
background: var(--settings-list-item-bg);
|
|
border: none;
|
|
margin: 0;
|
|
display: flex;
|
|
flex-direction: row;
|
|
}
|
|
.generic-dialog-list-button-span {
|
|
flex: 1;
|
|
margin-left: 20px;
|
|
text-align: left;
|
|
width: 0;
|
|
white-space: nowrap;
|
|
text-overflow: ellipsis;
|
|
overflow: hidden;
|
|
}
|
|
.generic-dialog-list-button:hover {
|
|
background: var(--settings-list-item-bg-hover);
|
|
}
|
|
.generic-dialog-list-button:active {
|
|
background: var(--settings-list-item-bg-active);
|
|
}
|
|
|
|
@media (max-width: 767px) {
|
|
.generic-dialog-list-button {
|
|
padding: 20px 10px;
|
|
}
|
|
.generic-dialog-list-button-span {
|
|
margin-left: 10px;
|
|
}
|
|
}
|
|
|
|
@media (max-width: 479px) {
|
|
.generic-dialog-list {
|
|
min-width: calc(100vw - 20px);
|
|
}
|
|
.generic-dialog-list-button {
|
|
padding: 15px 10px;
|
|
}
|
|
.generic-dialog-list-button-span {
|
|
margin-left: 10px;
|
|
}
|
|
}
|
|
</style> |