Apply the requested view before first paint via a data-view attribute and CSS, and switch views before loading the library.
This commit is contained in:
1 parent
b45b4437b8
commit
eb8a9bb57b
4 files changed
+34
-1
No files matched your search
@@ -121,6 +121,32 @@ button { cursor: pointer; }
|
||||
font-weight: 650;
|
||||
}
|
||||
|
||||
/* Paint the requested view before app.js runs (no library flash on reload). */
|
||||
html[data-view="recommend"] #libraryView,
|
||||
html[data-view="hltb"] #libraryView,
|
||||
html[data-view="friends"] #libraryView,
|
||||
html[data-view="services"] #libraryView { display: none !important; }
|
||||
html[data-view="recommend"] #recommendView,
|
||||
html[data-view="hltb"] #hltbView,
|
||||
html[data-view="friends"] #friendsView,
|
||||
html[data-view="services"] #servicesView { display: block !important; }
|
||||
html[data-view="recommend"] #tabRecommend,
|
||||
html[data-view="hltb"] #tabHltb,
|
||||
html[data-view="friends"] #tabFriends,
|
||||
html[data-view="services"] #tabServices {
|
||||
color: #0a0d13;
|
||||
background: linear-gradient(135deg, var(--accent), #ffd59a);
|
||||
font-weight: 650;
|
||||
}
|
||||
html[data-view="recommend"] #tabLibrary,
|
||||
html[data-view="hltb"] #tabLibrary,
|
||||
html[data-view="friends"] #tabLibrary,
|
||||
html[data-view="services"] #tabLibrary {
|
||||
color: var(--muted);
|
||||
background: transparent;
|
||||
font-weight: normal;
|
||||
}
|
||||
|
||||
.stats {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
|
||||
Reference in new issue
Block a user