mozhi/public/css/style.css

325 lines
5.6 KiB
CSS
Raw Normal View History

2023-09-10 17:27:22 +05:30
/*General theming*/
2024-07-06 23:44:18 +05:30
2024-07-17 17:56:14 +05:30
:root, :root.dark {
/* 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 */
2024-07-06 23:44:18 +05:30
--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;
}
2024-07-17 17:56:14 +05:30
@media (prefers-color-scheme: light) {
:root {
--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;
}
}
:root.light {
2024-07-06 23:44:18 +05:30
--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;
}
2023-09-10 17:27:22 +05:30
body {
font-family: sans-serif;
margin: 20px auto;
line-height: 1.5em;
2023-09-19 23:33:10 +05:30
max-width: 1000px;
font-size: 1rem;
2024-07-17 17:56:14 +05:30
background-color: var(--bg-color);
color: var(--fg-color);
2023-09-10 17:27:22 +05:30
padding: 0 10px;
hyphens: auto;
}
header {
display: flex;
justify-content: space-between;
align-items: center;
white-space: nowrap;
flex-wrap: wrap;
2024-07-06 23:44:18 +05:30
border-bottom: 1px solid var(--main-border-color);
2023-09-10 17:27:22 +05:30
width: 95%;
}
footer {
width: 95%;
2024-07-06 23:44:18 +05:30
border-top: 1px solid var(--main-border-color);
2023-09-10 17:27:22 +05:30
}
2024-04-05 22:56:50 +05:30
2023-09-10 17:27:22 +05:30
footer p {
margin: 0.2em 0 0.2em 0;
}
a {
2024-07-06 23:44:18 +05:30
color: var(--accent-color);
2023-09-10 17:27:22 +05:30
text-decoration: none;
}
2024-04-05 22:56:50 +05:30
2023-09-10 17:27:22 +05:30
a:hover {
text-decoration: underline;
}
2024-05-21 21:27:35 +05:30
#url {
2024-07-06 23:44:18 +05:30
color: var(--button-fg);
2024-05-21 21:27:35 +05:30
text-decoration: none;
}
2023-09-10 17:27:22 +05:30
/* Navigation */
nav {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: flex-end;
gap: 1rem;
}
2024-04-05 22:56:50 +05:30
2023-09-10 17:27:22 +05:30
nav li {
display: inline-block no;
margin-right: 20px;
}
2024-04-05 22:56:50 +05:30
2023-09-10 17:27:22 +05:30
.navlogo {
2023-09-11 08:23:30 +05:30
width: 75px;
height: 75px;
2023-09-10 17:27:22 +05:30
}
/* Theming for buttons and text areas*/
textarea {
width: 100%;
font-size: 1rem;
padding: 4px;
2024-07-06 23:44:18 +05:30
background-color: var(--textarea-bg);
color: var(--fg-color);
border: 2px solid var(--textarea-border);
2023-09-10 17:27:22 +05:30
}
2024-04-05 22:56:50 +05:30
2023-09-10 17:27:22 +05:30
textarea:focus {
2024-07-06 23:44:18 +05:30
border-color: var(--textarea-focus-border);
outline: 1px solid var(--textarea-focus-border);
2023-09-10 17:27:22 +05:30
}
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;
2024-07-06 23:44:18 +05:30
border-left: 2px solid var(--accent-color);
2023-09-10 17:27:22 +05:30
/* Accent shadow */
2024-07-06 23:44:18 +05:30
box-shadow: 2px 2px 0px 0px var(--select-shadow);
color: var(--select-fg);
background-color: var(--select-bg);
2023-09-19 23:33:10 +05:30
width: 100%;
2023-09-10 17:27:22 +05:30
}
button {
display: flex;
font-size: 17px;
2023-09-10 17:27:22 +05:30
padding: 4px 8px;
justify-content: flex-end;
gap: 2px;
border: none;
border-radius: 4px;
2024-07-06 23:44:18 +05:30
background: var(--accent-color);
2024-07-17 17:56:14 +05:30
color: var(--button-fg);
2023-09-10 17:27:22 +05:30
}
2024-04-05 22:56:50 +05:30
2023-09-10 17:27:22 +05:30
button:hover {
2024-07-06 23:44:18 +05:30
box-shadow: 5px 5px 0px 0px var(--select-shadow);
2023-09-10 17:27:22 +05:30
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;
2024-07-06 23:44:18 +05:30
background: var(--accent-color);
}
2024-04-05 22:56:50 +05:30
.button:hover {
2024-07-06 23:44:18 +05:30
box-shadow: 5px 5px 0px 0px var(--select-shadow);
cursor: pointer;
}
2023-09-10 17:27:22 +05:30
/* Spacing stuff */
.wrap {
display: flex;
flex-wrap: wrap;
}
2024-04-05 22:56:50 +05:30
2023-09-10 17:27:22 +05:30
.wrap.languages {
flex-wrap: nowrap;
margin-bottom: 20px;
}
.language {
margin: 0px 10px;
}
2024-04-05 22:56:50 +05:30
2023-09-10 17:27:22 +05:30
.item {
width: 100%;
2023-10-04 20:30:45 +05:30
height: 220px;
2023-09-10 17:27:22 +05:30
}
2024-04-05 22:56:50 +05:30
2023-09-10 17:27:22 +05:30
.item-wrapper {
display: block;
2023-09-21 15:37:09 +05:30
width: 90%;
2023-10-04 20:30:45 +05:30
max-width: 720px;
2023-09-10 17:27:22 +05:30
margin: 5px 10px;
gap: 10px;
}
/* CSS for the custom engine selector */
.custom-select {
position: relative;
display: inline-block;
2023-09-19 23:33:10 +05:30
margin: 5px 10px;
2023-09-10 17:27:22 +05:30
}
.selected-option {
padding: 7px;
2024-07-06 23:44:18 +05:30
border: 1px solid var(--select-border);
2023-09-10 17:27:22 +05:30
border-radius: 4px;
text-decoration: none;
2024-07-06 23:44:18 +05:30
color: var(--fg-color);
2023-09-10 17:27:22 +05:30
}
.options {
display: none;
position: absolute;
2024-07-06 23:44:18 +05:30
background-color: var(--bg-color);
border: 1px solid var(--select-border);
2023-09-10 17:27:22 +05:30
border-radius: 4px;
2024-07-06 23:44:18 +05:30
box-shadow: 0 2px 4px var(--engine-options-shadow);
2023-09-10 17:27:22 +05:30
list-style: none;
padding: 0;
margin: 0;
width: 100%;
z-index: 1;
}
.options li {
padding: 10px;
}
.options li:hover {
2024-07-06 23:44:18 +05:30
background-color: var(--engine-options-hover-bg);
2023-09-10 17:27:22 +05:30
}
.custom-select:hover .options {
display: block;
}
2023-09-10 20:22:51 +05:30
/* Javascript searchable select used in source/target language */
.nice-select,
.nice-select-dropdown,
.nice-select-search {
2023-09-10 20:22:51 +05:30
border-right: none;
border-bottom: none;
border-top: none;
border-radius: 4px;
2024-07-06 23:44:18 +05:30
border-left: 2px solid var(--accent-color);
2024-04-05 22:56:50 +05:30
/* The rgba is the same value as above, but with a 0.25 opacity */
2024-07-06 23:44:18 +05:30
box-shadow: 2px 2px 0px 0px var(--select-shadow);
2024-07-17 17:56:14 +05:30
background-color: var(--select-bg);
color: var(--select-fg);
2023-09-10 20:22:51 +05:30
}
2024-04-05 22:56:50 +05:30
2023-10-13 18:30:41 +05:30
.center-area {
width: 70%;
margin: 10px auto;
position: relative;
2023-10-13 18:30:41 +05:30
display: flex;
flex-wrap: wrap;
justify-content: center;
2023-10-13 18:30:41 +05:30
}
.center-area2 {
display: flex;
flex-direction: column;
justify-content: center;
text-align: center;
margin: auto;
}
2024-04-05 22:56:50 +05:30
#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;
2024-05-21 21:27:35 +05:30
}