Merge pull request #103 from v0l/ui-ref

UI improvements
This commit is contained in:
Alejandro 2023-01-20 20:48:14 +01:00 committed by GitHub
commit 57136afda5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
9 changed files with 67 additions and 30 deletions

View File

@ -7,7 +7,7 @@
.copy .body {
font-family: monospace;
font-size: 14px;
background: var(--gray-secondary);
background: var(--note-bg);
color: var(--font-color);
padding: 2px 4px;
border-radius: 10px;

View File

@ -2,7 +2,6 @@
border-bottom: none;
}
.note > .header .reply {
font-size: var(--font-size-tiny);
color: var(--font-secondary-color);
@ -16,6 +15,7 @@
.note > .body {
margin-top: 12px;
padding-left: 56px;
text-overflow: ellipsis;
white-space: pre-wrap;
word-break: normal;
@ -23,6 +23,10 @@
overflow-y: visible;
}
.note > .footer {
padding-left: 46px;
}
.note > .header img:hover, .note > .header .name > .reply:hover, .note .body:hover {
cursor: pointer;
}
@ -86,11 +90,6 @@
font-feature-settings: "tnum";
}
.trash-icon {
color: var(--error);
margin-right: auto;
}
.reaction-pill .reaction-pill-number {
margin-left: 8px;
}
@ -103,6 +102,11 @@
cursor: pointer;
}
.trash-icon {
color: var(--error);
margin-right: auto;
}
.note.active > .header .reply {
color: var(--font-tertiary-color);
}
@ -115,6 +119,10 @@
color: var(--font-tertiary-color);
}
.note.active > .footer > .reaction-pill.reacted {
color: var(--highlight);
}
@media (prefers-color-scheme: light) {
.indented .active {
background-color: var(--gray-secondary);
@ -128,7 +136,4 @@
.note.active > .footer > .reaction-pill {
color: var(--font-secondary-color);
}
.note.active > .footer > .reaction-pill.reacted {
color: var(--highlight);
}
}

View File

@ -1,7 +1,9 @@
.note-creator {
margin-bottom: 10px;
background-color: var(--gray);
background-color: var(--note-bg);
border: 1px solid var(--gray);
border-radius: 10px;
padding: 6px;
}
.note-reply {
@ -12,6 +14,7 @@
outline: none;
resize: none;
min-height: 40px;
background-color: var(--note-bg);
border-radius: 10px 10px 0 0;
max-width: -webkit-fill-available;
max-width: -moz-available;
@ -43,7 +46,7 @@
.note-creator .btn {
border-radius: 20px;
font-weight: bold;
background-color: var(--gray-secondary);
color: var(--gray-superlight);
border-color: var(--gray-superlight);
background-color: var(--bg-color);
color: var(--font-color);
font-size: var(--font-size);
}

View File

@ -9,8 +9,8 @@
.pfp .avatar {
border-width: 1px;
width: 40px;
height: 40px;
width: 48px;
height: 48px;
cursor: pointer;
}

View File

@ -1,5 +1,9 @@
.text a {
color: var(--highlight);
text-decoration: none;
}
.text a:hover {
text-decoration: underline;
}
.text h1 {
@ -26,6 +30,10 @@
margin-bottom: 4px;
}
.text p:last-child {
margin-bottom: 0;
}
.text pre {
margin: 0;
}

View File

@ -1,5 +1,17 @@
.rta__list {
border: none;
}
.rta__item:not(:last-child) {
border: none;
}
.rta__entity--selected .user-item, .rta__entity--selected .emoji-item {
text-decoration: none;
background: var(--gray-secondary);
}
.user-item, .emoji-item {
background: var(--gray);
color: var(--font-color);
background: var(--note-bg);
display: flex;
flex-direction: row;
align-items: center;

View File

@ -63,7 +63,7 @@ const Textarea = ({ users, onChange, ...rest }: any) => {
const emojiDataProvider = (token: string) => {
return emoji(token)
.slice(0, 10)
.slice(0, 5)
.map(({ name, char }) => ({ name, char }));
}

View File

@ -12,8 +12,9 @@
line-height: 1.5em;
top: -10px;
left: -10px;
font-size: small;
font-size: var(--font-size-small);
background-color: var(--error);
color: var(--note-bg);
font-weight: bold;
text-align: center;
}

View File

@ -4,7 +4,7 @@
--bg-color: #000;
--font-color: #FFF;
--font-secondary-color: #555;
--font-tertiary-color: #999;
--font-tertiary-color: #666;
--font-size: 16px;
--font-size-small: 14px;
--font-size-tiny: 12px;
@ -30,15 +30,17 @@
@media (prefers-color-scheme: light) {
:root {
--bg-color: #FFF;
--font-color: #000;
--font-secondary-color: #444;
--font-tertiary-color: #666;
--highlight-light: #FFC852;
--highlight: #FF9B00;
--highlight-dark: #944F05;
--bg-color: #F1F1F1;
--font-color: #57534E;
--font-secondary-color: #B9B9B9;
--font-tertiary-color: #F3F3F3;
--highlight-light: #16AAC1;
--highlight: #0284C7;
--highlight-dark: #0A52B5;
--modal-bg-color: rgba(240, 240, 240, 0.8);
--note-bg: #EEE;
--note-bg: white;
--gray: #CCC;
--gray-secondary: #DDD;
@ -88,10 +90,15 @@ code {
margin-bottom: 12px;
border-radius: 16px;
background-color: var(--note-bg);
padding: 12px;
padding: 6px 12px;
}
@media (min-width: 720px) {
.card { margin-bottom: 24px; padding: 24px; }
.card { margin-bottom: 24px; padding: 12px 24px; }
}
@media (prefers-color-scheme: light) {
.card {
box-shadow: 0px 2px 4px rgba(0, 0, 0, 0.05);
}
}
.card .header {
@ -112,6 +119,7 @@ code {
cursor: pointer;
user-select: none;
background-color: var(--bg-color);
color: var(--font-color);
border: 1px solid;
display: inline-block;
}