Extract styles for views

This commit is contained in:
He4eT 2021-03-02 16:33:17 +05:00
commit e44831db08
6 changed files with 53 additions and 57 deletions

View file

@ -1,7 +1,3 @@
.app.play {
height: 100%;
}
.ifplayer { .ifplayer {
height: 100%; height: 100%;
display: flex; display: flex;

View file

@ -44,62 +44,26 @@ html, body {
/* Common */ /* Common */
a { a,
summary {
display: inline;
cursor: pointer;
border-bottom: 2px solid currentColor; border-bottom: 2px solid currentColor;
color: inherit; color: inherit;
text-decoration: none; text-decoration: none;
} }
a:focus { a:focus,
summary:focus {
background-color: hsl(0, 0%, 0%, 0.1); background-color: hsl(0, 0%, 0%, 0.1);
} }
a:hover { a:hover,
border-width: 3px; summary:hover {
opacity: 0.8;
} }
ul { ul {
list-style: square; list-style: square;
} }
/* Status */
.status {
padding: 8px;
}
/* Dirty views */
/* Home */
.app > .view.home {
padding: var(--inner-padding);
max-height: unset;
height: 200%;
}
.view.home input,
.view.view.home select {
padding: 4px 8px;
color: var(--main-color);
background-color: var(--bg-color);
border: 2px solid var(--main-color);
outline-offset: 0;
font: inherit;
}
.view.home summary {
display: inline-block;
padding-right: 4px;
cursor: pointer;
}
.view.home .play label {
display: inline-block;
width: 100%;
max-width: 400px;
}
.view.home .play input {
box-sizing: border-box;
width: 100%;
}

View file

@ -0,0 +1,31 @@
.app > .view.home {
padding: var(--inner-padding);
}
.view.home summary {
display: inline;
cursor: pointer;
}
.view.home input,
.view.home select {
box-sizing: border-box;
padding: 4px 8px;
color: var(--main-color);
background-color: var(--bg-color);
border: 2px solid var(--main-color);
outline-offset: 0;
font: inherit;
}
.view.home label {
display: inline-block;
width: 100%;
max-width: 400px;
}
.view.home label input,
.view.home label select {
width: 100%;
}

View file

@ -0,0 +1,3 @@
.app.play {
height: 100%;
}

View file

@ -9,6 +9,8 @@ import ThemeSelector from '~/src/components/ThemeSelector'
import { buildPlayLinkHref } from '~/src/utils/utils.routing' import { buildPlayLinkHref } from '~/src/utils/utils.routing'
import '~/src/style/views/HomeView.css'
const playButton = (name, url, theme) => ( const playButton = (name, url, theme) => (
<Link href={buildPlayLinkHref(url, theme)}> <Link href={buildPlayLinkHref(url, theme)}>
Play "{name}" Play "{name}"
@ -44,11 +46,9 @@ export default function ({ themeEngine }) {
Interface theme Interface theme
</h3> </h3>
<p> <ThemeSelector {...{
<ThemeSelector {...{ themeEngine
themeEngine }} />
}} />
</p>
<p> <p>
<small> <small>
@ -97,7 +97,7 @@ export default function ({ themeEngine }) {
</details> </details>
</p> </p>
<p className='play'> <p>
<label> <label>
Local file: <br /> Local file: <br />
<FileSelector {...{ <FileSelector {...{
@ -107,7 +107,7 @@ export default function ({ themeEngine }) {
</label> </label>
</p> </p>
<p className='play'> <p>
<label> <label>
Direct link: <br /> Direct link: <br />
<URLSelector {...{ <URLSelector {...{

View file

@ -3,6 +3,8 @@ import { useState, useEffect } from 'preact/hooks'
import UrlPlayer from '~/src/components/player/UrlPlayer' import UrlPlayer from '~/src/components/player/UrlPlayer'
import '~/src/style/views/PlayerView.css'
const decode = encodedUrl => decodeURIComponent(encodedUrl) const decode = encodedUrl => decodeURIComponent(encodedUrl)
export default function ({ setTheme, theme, encodedUrl }) { export default function ({ setTheme, theme, encodedUrl }) {