Skip to content

Commit 2e43158

Browse files
committed
feat: enhance user experience with motivational messages, cached bacgkgrounds and micro animations
1 parent 5231204 commit 2e43158

File tree

6 files changed

+156
-75
lines changed

6 files changed

+156
-75
lines changed

_locales/en/messages.json

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -171,10 +171,10 @@
171171
"message": "Are you sure you want to delete\n$1?"
172172
},
173173
"empty_state": {
174-
"message": "No content to display"
174+
"message": "This folder is empty yet"
175175
},
176176
"empty_state_details": {
177-
"message": "Add new items with the + button!"
177+
"message": "Add new items with the + button"
178178
},
179179
"error_loading_data": {
180180
"message": "Oops! Something went wrong!"
@@ -203,8 +203,14 @@
203203
"create_url_footnote": {
204204
"message": "Leave blank to create a folder"
205205
},
206-
"hi": {
207-
"message": "Hi!"
206+
"motivation_1": {
207+
"message": "Hi, have a nice day!"
208+
},
209+
"motivation_2": {
210+
"message": "Good to see you again!"
211+
},
212+
"motivation_3": {
213+
"message": "Let's do something great!"
208214
},
209215
"welcome_title": {
210216
"message": "Quick Access"

_locales/hu/messages.json

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@
162162
"message": "Egyedi megjelenés"
163163
},
164164
"no_search_results_found": {
165-
"message": "Nincs találat"
165+
"message": "Nincs megfelelő találat"
166166
},
167167
"no_search_results_found_details": {
168168
"message": "Próbálj más kulcsszavakat használni"
@@ -171,10 +171,10 @@
171171
"message": "Biztosan törölni szeretné ezt:\n$1?"
172172
},
173173
"empty_state": {
174-
"message": "Nincs megjeleníthető tartalom"
174+
"message": "Ez a mappa még üres"
175175
},
176176
"empty_state_details": {
177-
"message": "Adj hozzá új elemeket a + gombbal!"
177+
"message": "Adj hozzá új elemeket a + gombbal"
178178
},
179179
"error_loading_data": {
180180
"message": "Hoppá, egy kis probléma adódott"
@@ -203,8 +203,14 @@
203203
"create_url_footnote": {
204204
"message": "Mappa létrehozásához hagyja üresen"
205205
},
206-
"hi": {
207-
"message": "Szia!"
206+
"motivation_1": {
207+
"message": "Szia, legyen szép napod!"
208+
},
209+
"motivation_2": {
210+
"message": "Jó újra látni!"
211+
},
212+
"motivation_3": {
213+
"message": "Csináljunk ma valami nagyszerűt!"
208214
},
209215
"welcome_title": {
210216
"message": "Gyors elérés"

index.css

Lines changed: 41 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ body {
7272
min-height: 100vh;
7373
overflow-x: hidden;
7474
user-select: none;
75+
transition: background-image 1s;
7576
}
7677

7778
kbd {
@@ -114,15 +115,16 @@ kbd {
114115
min-height: 100vh;
115116
display: flex;
116117
flex-flow: column;
117-
justify-content: flex-start;
118-
gap: 10vh;
118+
justify-content: start;
119+
gap: 5vh;
119120
}
120121

121122
.container {
122123
max-width: 1200px;
123124
min-width: 300px;
124125
margin: 0 auto;
125126
padding: 20px;
127+
overflow: hidden;
126128
}
127129

128130
/*
@@ -167,10 +169,23 @@ kbd {
167169
overflow: hidden;
168170
}
169171

170-
.breadcrumb-item:hover {
172+
.breadcrumb-item:not(.motivation):hover {
171173
background: var(--color-ui-hover);
172174
}
173175

176+
.motivation {
177+
animation: moving 0.4s ease;
178+
}
179+
180+
@keyframes moving {
181+
from {
182+
transform: translateY(20px);
183+
}
184+
to {
185+
transform: translateY(0);
186+
}
187+
}
188+
174189
.breadcrumb-separator {
175190
opacity: 0.8;
176191
}
@@ -318,6 +333,11 @@ input[type="search"]:focus::-webkit-search-cancel-button {
318333
}
319334
}
320335

336+
.content {
337+
flex-grow: 1;
338+
position: relative;
339+
}
340+
321341
.content .container {
322342
padding-top: 0;
323343
}
@@ -327,8 +347,13 @@ input[type="search"]:focus::-webkit-search-cancel-button {
327347
*/
328348

329349
.message {
350+
position: absolute;
351+
top: 50%;
352+
left: 0;
353+
z-index: -1;
354+
width: 100%;
355+
transform: translate(0, calc(-50% - 50px));
330356
text-align: center;
331-
padding: 60px 20px;
332357
color: var(--color-ui-text);
333358
opacity: 0.7;
334359
}
@@ -347,8 +372,13 @@ input[type="search"]:focus::-webkit-search-cancel-button {
347372
*/
348373

349374
.loading {
375+
position: absolute;
376+
top: 50%;
377+
left: 0;
378+
z-index: -1;
379+
width: 100%;
380+
transform: translate(0, calc(-50% - 50px));
350381
text-align: center;
351-
padding: 60px 20px;
352382
color: rgb(255, 255, 255, 0.8);
353383
font-size: 18px;
354384
}
@@ -376,6 +406,11 @@ input[type="search"]:focus::-webkit-search-cancel-button {
376406
display: grid;
377407
gap: 20px;
378408
grid-template-columns: repeat(1, 1fr);
409+
animation: moving 0.3s ease;
410+
}
411+
412+
.grid.hidden {
413+
animation: none;
379414
}
380415

381416
.grid.cols-2 {
@@ -623,6 +658,7 @@ input[type="search"]:focus::-webkit-search-cancel-button {
623658

624659
.grid {
625660
gap: 5px;
661+
animation: none;
626662
}
627663

628664
.tile > a {

index.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@
3232
<svg xmlns="http://www.w3.org/2000/svg"><use xlink:href="#history"></svg>
3333
</button>
3434
<button class="btn" data-view="bookmarks" data-i18n-title="bookmarks" tabindex="-1">
35-
<svg xmlns="http://www.w3.org/2000/svg"><use xlink:href="#star"></svg>
35+
<svg xmlns="http://www.w3.org/2000/svg"><use xlink:href="#bookmarks"></svg>
3636
</button>
3737
<button class="btn" data-view="readingList" data-i18n-title="reading_list" tabindex="-1">
3838
<svg xmlns="http://www.w3.org/2000/svg"><use xlink:href="#readinglist"></svg>
@@ -50,7 +50,7 @@
5050
</div>
5151
<div class="content">
5252
<div class="container">
53-
<div id="content" class="grid cols-1"></div>
53+
<div id="grid" class="grid cols-8"></div>
5454
<div id="message" class="message hidden"></div>
5555
<div id="loading" class="loading hidden">
5656
<svg xmlns="http://www.w3.org/2000/svg" width="60" height="60"><use xlink:href="#spinner"></svg>

0 commit comments

Comments
 (0)