Fix loading text alignment

This commit is contained in:
Torjus Håkestad 2023-12-06 01:35:16 +01:00
parent 3d333665f2
commit c6a6f46ff8
2 changed files with 37 additions and 14 deletions

View File

@ -23,15 +23,29 @@ body {
font-weight: 600; font-weight: 600;
} }
.loader-wrapper {
margin-top: 10em;
width: 100%;
display: flex;
justify-content: center;
}
.loader { .loader {
display: flex; display: flex;
width: min-content;
vertical-align: middle;
} }
.loader .spinner { .loader .spinner {
margin-top: 0px; margin-top: auto;
margin-bottom: auto;
} }
.loader .loading-text { .loader .loading-text {
margin-top: 0px; margin-top: auto;
margin-bottom: auto;
margin-left: 0.5em; margin-left: 0.5em;
white-space: nowrap;
} }
.video-wrapper { .video-wrapper {
@ -98,6 +112,7 @@ a.menu-heading {
cursor: pointer; cursor: pointer;
display: flex; display: flex;
} }
.menu-viewcount { .menu-viewcount {
font-family: 'Prompt', sans-serif; font-family: 'Prompt', sans-serif;
font-size: larger; font-size: larger;
@ -113,6 +128,7 @@ li.menu-item {
background-color: var(--menu-item-color); background-color: var(--menu-item-color);
margin-top: 1px; margin-top: 1px;
} }
li.menu-item:hover { li.menu-item:hover {
background-color: var(--menu-item-hover); background-color: var(--menu-item-hover);
} }
@ -132,10 +148,15 @@ li.menu-selected {
border-radius: 50%; border-radius: 50%;
width: 10px; width: 10px;
height: 10px; height: 10px;
animation: spin 2s linear infinite; animation: spin 1s linear infinite;
} }
@keyframes spin { @keyframes spin {
0% { transform: rotate(0deg); } 0% {
100% { transform: rotate(360deg); } transform: rotate(0deg);
}
100% {
transform: rotate(360deg);
}
} }

View File

@ -156,10 +156,12 @@ export function LoadingText({ text, spinner = false }: LoadingText) {
} }
return ( return (
<> <>
<div className="loader-wrapper">
<div className="loader"> <div className="loader">
{spinnerElement} {spinnerElement}
<p className="loading-text">{text}</p> <p className="loading-text">{text}</p>
</div> </div>
</div>
</> </>
) )
} }