ismism/ismism.ts/ui/index/style.css
2023-03-19 13:21:56 +08:00

767 lines
11 KiB
CSS

:root {
--white: #fff;
--lightgray: #f1f1f1;
--gray: #9e9e9e;
--darkgray: #616161;
--black: #000;
--palered: #ffdddd;
--red: #f44336;
--palegreen: #ddffdd;
--green: #4CAF50;
--lightamber: #ffe9a8;
--amber: #ffc107;
--orange: #ff9800;
--purple: #673ab7;
--small: 12px;
--normal: 15px;
--large: 18px;
--title: 24px;
}
.none {
display: none !important;
}
html {
overflow-x: hidden;
}
body {
min-width: 360px;
margin: 0;
padding: 0;
color: var(--black);
background: var(--lightgray);
font-family: Verdana, sans-serif;
font-size: var(--normal);
line-height: 1.5;
}
hr {
width: 100%;
border: none;
margin: 6px;
}
em {
font-style: normal;
}
code {
font-family: monospace;
font-size: 1em;
}
a {
color: inherit;
text-decoration: none;
}
a:focus {
outline: none;
}
button {
font-size: 1em;
white-space: nowrap;
color: inherit;
background: none;
border: none;
cursor: pointer;
}
button:focus {
outline: none;
}
nav {
overflow: scroll;
scrollbar-width: none;
scroll-snap-type: x mandatory;
}
nav::-webkit-scrollbar {
display: none;
}
nav>menu {
position: relative;
display: flex;
width: max-content;
list-style: none;
padding: 0;
margin: 0 auto;
white-space: nowrap;
gap: 3px;
}
nav>menu>li:first-child,
nav>menu>li:last-child {
display: block;
white-space: pre;
position: sticky;
min-width: 1ch;
box-shadow: 0 0 1ch 1ch var(--lightgray);
background: var(--lightgray);
z-index: 2;
}
nav>menu>li:first-child {
left: 0;
margin-right: 2ch;
}
nav>menu>li:last-child {
right: 0;
margin-left: 2ch;
}
nav>menu>li>a {
scroll-snap-align: start;
scroll-margin-left: 2ch;
display: inline-flex;
white-space: nowrap;
overflow: hidden;
user-select: none;
background: none;
z-index: 1;
}
article {
position: relative;
animation: scale 0.4s;
margin: 16px;
padding: 8px 16px;
background: var(--white);
box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px, rgba(0, 0, 0, 0.2) 0px -3px 0px inset;
}
@keyframes scale {
from {
transform: scale(0.25);
opacity: 0;
}
to {
transform: scale(1);
opacity: 1;
}
}
section {
display: block;
margin: 0;
padding: 0;
}
section>label {
display: block;
width: 100%;
color: var(--gray);
}
section>details>summary {
color: var(--gray);
user-select: none;
cursor: pointer;
}
section>details:focus,
section>details>summary:focus {
outline: none;
}
section>details>p {
display: block;
background: var(--lightgray);
border-radius: 16px;
padding: 16px 8px;
margin: 8px auto;
max-height: 480px;
overflow-y: scroll;
}
@media (hover: hover) {
section>details>summary:hover {
background: var(--lightgray);
}
}
section>p {
display: block;
margin: 0;
padding: 1ch;
}
section>p:empty::before {
padding: 1ch;
color: var(--gray);
content: "无";
}
section>span:empty::before,
section>p>span:empty::before {
color: var(--gray) !important;
content: "无";
}
section>input {
padding: 1ch;
max-width: 36ch;
border: none;
border-bottom: 1px dotted var(--black);
text-align: center;
}
section>input:focus {
outline: none;
border-bottom: 1px solid var(--black);
}
section>input:focus::placeholder {
color: transparent;
}
section>textarea {
box-sizing: border-box;
display: block;
margin: 0;
padding: 1ch;
margin: 6px 0;
width: 100%;
font-size: 1em;
overflow: hidden;
resize: none;
outline: none;
border: 1px dotted var(--black);
}
section>textarea:focus {
border: 1px solid var(--black);
}
section>input:read-only,
section>textarea:read-only {
background: var(--lightgray);
border: none !important;
}
section>select {
font-size: 1em;
width: 12ch;
margin: 12px 0;
padding: 0.2ch 1ch;
}
section>span>a:not(:first-child):before,
section>p>a:not(:first-child):before,
section>p>span>a:not(:first-child):before {
content: "、";
color: var(--gray);
}
@media (hover: hover) {
section>a:hover,
section>span>a:hover,
section>p>a:hover,
section>p>span>a:hover,
div>a:hover {
color: var(--amber) !important;
}
}
div#main {
max-width: 1080px;
margin: 0 auto;
padding: 0;
}
article.rec {
width: fit-content;
margin: 0;
background: none;
box-shadow: none;
}
article.rec>section.nam {
justify-content: left;
gap: 8px;
}
article.rec>section.nam>a.anam {
padding: 0.2ch 1ch;
font-size: var(--small);
background: var(--black);
color: var(--white);
}
article.rec>section.meta {
padding: 0.5ch;
font-size: var(--small);
font-style: italic;
}
article.rec>section.msg {
min-width: 240px;
width: fit-content;
padding: 0.5em 16px;
background: var(--lightgray);
border-radius: 0 8px 8px 8px;
box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px, rgba(0, 0, 0, 0.3) 0px 7px 13px -3px;
}
article.rec>section.msg:empty::before {
content: "-本条不公示-";
}
article.rec>section.msg>a {
text-decoration: underline;
text-underline-offset: 4px;
}
article.rec>section.meta.rej2,
article.rec>section.msg.rej2,
article.rec>section.msg.rej2:empty::before {
color: var(--red);
}
article.rec>section.msg.rej2 {
background: var(--palered);
}
article.rec>section.meta.ref2,
article.rec>section.msg.ref2,
:empty::before {
color: var(--green);
}
article.rec>section.msg.ref2 {
background: var(--palegreen);
}
article.rec>section.re {
font-size: var(--small);
padding: 1em 0;
color: var(--gray);
}
article.rec>section.re>section.putpro {
margin-left: 2ch;
float: right;
}
article.rec>section.re>section.putpro>button {
background: none;
}
@media (hover: hover) {
article.rec a:hover,
article.rec button:hover {
color: var(--amber);
}
}
section.flex {
display: flex;
flex-wrap: wrap;
justify-content: center;
align-items: center;
gap: 6px;
}
section.flex>label,
section.flex>input,
section.flex>button,
section.flex>select {
box-sizing: border-box;
display: block;
justify-content: center;
align-items: center;
font-size: 1em;
}
section.flex>label {
transform: translateY(0.75ch);
}
section.flex>button {
flex: 1 1 10ch;
max-width: 24ch;
padding: 1ch;
background: var(--darkgray);
color: var(--lightgray);
border-radius: 8px;
}
section.flex>button:disabled {
background: var(--lightgray);
color: var(--darkgray);
}
@media (hover: hover) {
section.flex>button:enabled:hover {
opacity: 0.65;
}
}
section.flex>input {
flex: 10 1 10ch;
}
section.flex>select {
flex: 0 0 12ch;
}
section.hint {
color: var(--gray);
text-align: center;
white-space: pre-line;
}
section.meta {
padding: 1ch;
font-family: monospace;
color: var(--gray);
background: var(--lightgray);
}
section.meta>span>a {
color: var(--black)
}
section.meta>span.red {
color: var(--red) !important;
}
section.meta>span.green {
color: var(--green) !important;
}
section>p.rolref>a {
display: inline-block;
margin-right: 4px;
margin-bottom: 4px;
padding: 0.4ch 1ch;
color: var(--lightgray);
border-radius: 4px;
}
section>p.rolref>a::before {
content: "";
}
section.cover {
padding-top: 6px;
color: var(--darkgray);
border-top: 1px dotted var(--lightgray);
gap: 0;
}
@media (max-width: 720px) {
section.cover>div {
width: 100%;
text-align: center;
}
}
@media (min-width: 720px) {
section.cover>div {
flex-basis: 180px;
flex-grow: 1;
}
section.cover>div:nth-child(1) {
text-align: left;
}
section.cover>div:nth-child(2) {
text-align: center;
}
section.cover>div:nth-child(3) {
text-align: right;
}
}
section.cover>div>button {
color: var(--darkgray);
}
@media (hover: hover) {
section.cover>div>button:hover {
color: var(--white) !important;
border-color: var(--darkgray) !important;
background: var(--darkgray) !important;
opacity: 0.7;
}
}
section.cover>img {
width: 100%;
margin: 6px 0;
box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px;
}
section.acct>div>:last-child {
float: right;
}
section.acct>svg {
margin: 0.4em 0 0.2em 0;
box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px;
}
section.acct>svg>rect:first {
fill: var(--lightgray);
}
section.acct>svg>rect:not(:first-child) {
fill: var(--gray);
}
section.acct>svg>text {
font-size: 1em;
font-family: monospace;
fill: var(--black);
}
section.acct>svg>text.fund,
section.acct>svg>text.expense {
text-anchor: start;
}
section.acct>svg>text.fundpct,
section.acct>svg>text.expensepct {
text-anchor: middle;
}
section.acct>svg>text.budget {
text-anchor: end;
}
section.acct a.account {
text-decoration: underline;
text-underline-offset: 4px;
}
section.nrecday>svg {
display: block;
margin: 1ch auto;
cursor: pointer;
}
section.nrecday>svg text {
text-anchor: start;
fill: var(--gray);
}
section.nrecday>svg rect {
fill: transparent;
}
section.nrecday>svg rect.day {
fill: var(--lightgray);
}
section.nrecday>svg rect.lo {
fill: var(--lightamber) !important;
}
section.nrecday>svg rect.mi {
fill: var(--amber) !important;
}
section.nrecday>svg rect.hi {
fill: var(--orange) !important;
}
section>p.goal:not(:empty) {
display: flex;
flex-wrap: wrap;
justify-content: space-around;
align-items: center;
gap: 6px;
}
section>p.goal>div {
width: 160px;
}
section>p.goal>div>svg {
filter: drop-shadow(0px 2px 4px rgba(0, 0, 0, .4));
}
section>p.goal>div>svg>circle:first-child {
stroke: var(--gray);
stroke-width: 25px;
fill: var(--white);
}
section>p.goal>div>svg>circle:nth-child(2) {
--pct: 0;
stroke: var(--lightgray);
stroke-width: 25px;
stroke-dasharray: 377px 377px;
stroke-dashoffset: calc(-377px * var(--pct) / 100);
fill: transparent;
}
section>p.goal>div>svg>text {
text-anchor: middle;
font-size: 30px;
fill: var(--amber);
}
section>p.goal>div>svg>text.gray {
fill: var(--gray)
}
section>p.goal>div>span {
display: block;
font-size: var(--large);
color: var(--darkgray);
text-align: center;
}
section.md p {
margin: initial;
padding: initial;
}
section.md a {
text-decoration: underline;
text-underline-offset: 4px;
}
section.md img {
width: 85%;
margin: 6px 7.5%;
box-shadow: rgba(0, 0, 0, 0.4) 0px 2px 4px;
}
@media (hover: hover) {
section.md a:hover {
color: var(--amber) !important;
}
}
button.putn {
background: var(--red) !important;
}
a.idnam {
display: block;
font-size: var(--title);
}
a.idnam>code.id {
padding: 0.1em 8px;
border: 1px solid var(--black);
border-radius: 4px;
color: var(--black);
}
a.idnam>code.id.active {
background: var(--darkgray);
color: var(--white);
}
a.idnam>code.id.red {
border: none;
background: var(--red) !important;
}
a.idnam>code.id.green {
border: none;
background: var(--green) !important;
}
a.idnam>span.nam {
font-weight: bold;
}
a.isec {
background: var(--purple);
}
a.sec {
background: var(--black);
}
a.uid {
background: var(--darkgray);
}
a.res {
background: var(--gray);
}
em.red {
color: var(--red);
}
em.green {
color: var(--green);
}
em.gray {
color: var(--gray);
}
p.froze:empty::before,
span.froze:empty::before {
content: "-冻结中-" !important;
}
nav.main>menu {
border-bottom: 1px dotted var(--gray);
}
nav.main a {
scroll-padding-left: -4ch;
display: inline-block;
font-size: var(--large);
color: var(--gray);
padding: 0 0.5ch;
}
nav.main li.active>a {
color: var(--black);
}
nav.main li.active>a>em {
color: var(--red);
}
nav.adm a {
padding: 0px 12px;
border-radius: 16px;
border: 1px solid var(--darkgray);
color: var(--darkgray);
}
nav.adm li.active>a {
color: var(--lightgray);
background: var(--darkgray);
}
@media (hover: hover) {
nav.main a:hover {
color: var(--black);
opacity: 0.65;
}
nav.main a:hover>em {
color: var(--red);
}
nav.adm a:hover {
color: var(--lightgray);
background: var(--darkgray);
opacity: 0.65;
}
}