mirror of
https://codeberg.org/aryak/mozhi
synced 2024-10-30 14:32:59 +05:30
368 lines
6.5 KiB
CSS
368 lines
6.5 KiB
CSS
/*General theming*/
|
|
|
|
.dark-mode {
|
|
--bg-color: #222;
|
|
--fg-color: #f8f9fa;
|
|
--button-fg: #010000;
|
|
--textarea-focus-border: #e5ebff;
|
|
--textarea-bg: var(--bg-color);
|
|
--select-border: #ccc;
|
|
--select-bg: #2f2f2f;
|
|
--select-fg: #b2b2b2;
|
|
}
|
|
|
|
.light-mode {
|
|
--bg-color: #ffedd5;
|
|
--fg-color: #000000;
|
|
--button-fg: #fbe9e7;
|
|
--textarea-focus-border: #261f1e;
|
|
--textarea-bg: #fff4e6;
|
|
--select-border: #888888;
|
|
--select-bg: #fff;
|
|
--select-fg: #2f2f2f;
|
|
}
|
|
|
|
body {
|
|
/* Global Values */
|
|
--main-border-color: #b2b2b2;
|
|
--accent-color: #f57c00;
|
|
--textarea-border: #9d9d9d;
|
|
--select-shadow: rgba(245, 124, 0, 0, 0.25);
|
|
--engine-options-shadow: rgba(0, 0, 0, 0.1);
|
|
--engine-options-hover-bg: #f0f0f0;
|
|
/* Dark Mode Values */
|
|
--bg-color: #222;
|
|
--fg-color: #f8f9fa;
|
|
--button-fg: #010000;
|
|
--textarea-focus-border: #e5ebff;
|
|
--textarea-bg: var(--bg-color);
|
|
--select-border: #ccc;
|
|
--select-bg: #2f2f2f;
|
|
--select-fg: #b2b2b2;
|
|
font-family: sans-serif;
|
|
margin: 20px auto;
|
|
line-height: 1.5em;
|
|
max-width: 1000px;
|
|
font-size: 1rem;
|
|
background-color: #222;
|
|
color: #f8f9fa;
|
|
padding: 0 10px;
|
|
hyphens: auto;
|
|
}
|
|
|
|
header {
|
|
display: flex;
|
|
justify-content: space-between;
|
|
align-items: center;
|
|
white-space: nowrap;
|
|
flex-wrap: wrap;
|
|
|
|
border-bottom: 1px solid var(--main-border-color);
|
|
width: 95%;
|
|
}
|
|
|
|
footer {
|
|
width: 95%;
|
|
border-top: 1px solid var(--main-border-color);
|
|
}
|
|
|
|
footer p {
|
|
margin: 0.2em 0 0.2em 0;
|
|
}
|
|
|
|
a {
|
|
color: var(--accent-color);
|
|
text-decoration: none;
|
|
}
|
|
|
|
a:hover {
|
|
text-decoration: underline;
|
|
}
|
|
|
|
#url {
|
|
color: var(--button-fg);
|
|
text-decoration: none;
|
|
}
|
|
|
|
/* Navigation */
|
|
nav {
|
|
display: flex;
|
|
flex-direction: row;
|
|
flex-wrap: wrap;
|
|
justify-content: flex-end;
|
|
gap: 1rem;
|
|
}
|
|
|
|
nav li {
|
|
display: inline-block no;
|
|
margin-right: 20px;
|
|
}
|
|
|
|
.navlogo {
|
|
width: 75px;
|
|
height: 75px;
|
|
}
|
|
|
|
/* Theming for buttons and text areas*/
|
|
textarea {
|
|
width: 100%;
|
|
font-size: 1rem;
|
|
padding: 4px;
|
|
background-color: var(--textarea-bg);
|
|
color: var(--fg-color);
|
|
border: 2px solid var(--textarea-border);
|
|
}
|
|
|
|
textarea:focus {
|
|
border-color: var(--textarea-focus-border);
|
|
outline: 1px solid var(--textarea-focus-border);
|
|
}
|
|
|
|
select {
|
|
display: flex;
|
|
padding: 4px 8px;
|
|
justify-content: space-between;
|
|
flex: 1 0 0;
|
|
border-right: none;
|
|
border-bottom: none;
|
|
border-top: none;
|
|
border-radius: 4px;
|
|
border-left: 2px solid var(--accent-color);
|
|
/* Accent shadow */
|
|
box-shadow: 2px 2px 0px 0px var(--select-shadow);
|
|
color: var(--select-fg);
|
|
background-color: var(--select-bg);
|
|
width: 100%;
|
|
}
|
|
|
|
button {
|
|
display: flex;
|
|
font-size: 17px;
|
|
padding: 4px 8px;
|
|
justify-content: flex-end;
|
|
gap: 2px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
background: var(--accent-color);
|
|
}
|
|
|
|
button:hover {
|
|
box-shadow: 5px 5px 0px 0px var(--select-shadow);
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* While we're at it, fake button css style for the url.*/
|
|
|
|
.button {
|
|
display: flex;
|
|
font-size: 17px;
|
|
padding: 4px 8px;
|
|
justify-content: flex-end;
|
|
gap: 2px;
|
|
border: none;
|
|
border-radius: 4px;
|
|
background: var(--accent-color);
|
|
}
|
|
|
|
.button:hover {
|
|
box-shadow: 5px 5px 0px 0px var(--select-shadow);
|
|
cursor: pointer;
|
|
}
|
|
|
|
/* Spacing stuff */
|
|
.wrap {
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
}
|
|
|
|
.wrap.languages {
|
|
flex-wrap: nowrap;
|
|
margin-bottom: 20px;
|
|
}
|
|
|
|
.language {
|
|
margin: 0px 10px;
|
|
}
|
|
|
|
.item {
|
|
width: 100%;
|
|
height: 220px;
|
|
}
|
|
|
|
.item-wrapper {
|
|
display: block;
|
|
width: 90%;
|
|
max-width: 720px;
|
|
margin: 5px 10px;
|
|
gap: 10px;
|
|
}
|
|
|
|
/* CSS for the custom engine selector */
|
|
.custom-select {
|
|
position: relative;
|
|
display: inline-block;
|
|
margin: 5px 10px;
|
|
}
|
|
|
|
.selected-option {
|
|
padding: 7px;
|
|
border: 1px solid var(--select-border);
|
|
border-radius: 4px;
|
|
text-decoration: none;
|
|
color: var(--fg-color);
|
|
}
|
|
|
|
.options {
|
|
display: none;
|
|
position: absolute;
|
|
background-color: var(--bg-color);
|
|
border: 1px solid var(--select-border);
|
|
border-radius: 4px;
|
|
box-shadow: 0 2px 4px var(--engine-options-shadow);
|
|
list-style: none;
|
|
padding: 0;
|
|
margin: 0;
|
|
width: 100%;
|
|
z-index: 1;
|
|
}
|
|
|
|
.options li {
|
|
padding: 10px;
|
|
}
|
|
|
|
.options li:hover {
|
|
background-color: var(--engine-options-hover-bg);
|
|
}
|
|
|
|
.custom-select:hover .options {
|
|
display: block;
|
|
}
|
|
|
|
/* Javascript searchable select used in source/target language */
|
|
.nice-select,
|
|
.nice-select-dropdown,
|
|
.nice-select-search {
|
|
border-right: none;
|
|
border-bottom: none;
|
|
border-top: none;
|
|
border-radius: 4px;
|
|
border-left: 2px solid var(--accent-color);
|
|
/* The rgba is the same value as above, but with a 0.25 opacity */
|
|
box-shadow: 2px 2px 0px 0px var(--select-shadow);
|
|
}
|
|
|
|
.center-area {
|
|
width: 70%;
|
|
margin: 10px auto;
|
|
position: relative;
|
|
display: flex;
|
|
flex-wrap: wrap;
|
|
justify-content: center;
|
|
}
|
|
|
|
.center-area2 {
|
|
display: flex;
|
|
flex-direction: column;
|
|
justify-content: center;
|
|
text-align: center;
|
|
margin: auto;
|
|
}
|
|
|
|
#definitions_and_translations {
|
|
display: grid;
|
|
margin: auto;
|
|
width: 1100px;
|
|
gap: 10px;
|
|
grid-template-areas: "definitions translations";
|
|
}
|
|
|
|
.def_type {
|
|
color: #007979;
|
|
text-transform: capitalize;
|
|
}
|
|
|
|
.syn {
|
|
color: #804700;
|
|
}
|
|
|
|
.syn_type {
|
|
color: #007979;
|
|
}
|
|
|
|
.use_in_sentence {
|
|
color: #009902;
|
|
}
|
|
|
|
.definitions li:not(:last-child) {
|
|
margin-bottom: 1rem;
|
|
}
|
|
|
|
@media screen and (max-width: 1200px) {
|
|
#definitions_and_translations {
|
|
display: grid;
|
|
width: 90vw;
|
|
grid-template-areas:
|
|
"translations translations"
|
|
"definitions definitions";
|
|
}
|
|
}
|
|
|
|
div.definitions {
|
|
grid-area: definitions;
|
|
}
|
|
|
|
div.translations {
|
|
grid-area: translations;
|
|
}
|
|
|
|
@media (prefers-color-scheme: light) {
|
|
body {
|
|
--bg-color: #ffedd5;
|
|
--fg-color: #000000;
|
|
--button-fg: #fbe9e7;
|
|
--textarea-focus-border: #261f1e;
|
|
--textarea-bg: #fff4e6;
|
|
--select-border: #888888;
|
|
--select-bg: #fff;
|
|
--select-fg: #2f2f2f;
|
|
background-color: var(--bg-color);
|
|
color: var(--fg-color);
|
|
}
|
|
|
|
.options {
|
|
background-color: var(--bg-color);
|
|
box-shadow: 0 2px 4px var(--engine-options-shadow);
|
|
border: 1px solid var(--select-border);
|
|
}
|
|
|
|
.selected-option {
|
|
border: 1px solid var(--select-border);
|
|
color: var(--fg-color);
|
|
}
|
|
|
|
/* Theming for buttons and text areas*/
|
|
textarea {
|
|
border: 2px solid var(--textarea-border);
|
|
background-color: var(--textarea-bg);
|
|
color: var(--fg-color);
|
|
}
|
|
|
|
textarea:focus {
|
|
border-color: var(--textarea-focus-border);
|
|
outline: 1px solid var(--textarea-focus-border);
|
|
}
|
|
|
|
select,
|
|
.nice-select .nice-select-dropdown,
|
|
.nice-select,
|
|
.nice-select-search {
|
|
background-color: var(--select-bg);
|
|
color: var(--select-fg);
|
|
}
|
|
|
|
button,
|
|
#url {
|
|
color: var(--button-fg);
|
|
}
|
|
}
|