Update styles.css
This commit is contained in:
parent
cc0297fa94
commit
006491afbc
1 changed files with 331 additions and 122 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
/* ============================================================
|
/* ============================================================
|
||||||
The Fold Within — Styles v2.6 Independent Scroll
|
The Fold Within — Styles v2.6.1 Independent Scroll + Mobile Fix
|
||||||
============================================================ */
|
============================================================ */
|
||||||
|
|
||||||
:root {
|
:root {
|
||||||
|
|
@ -11,30 +11,62 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
html, body {
|
html, body {
|
||||||
margin:0;padding:0;
|
margin: 0;
|
||||||
background:var(--bg);color:var(--fg);
|
padding: 0;
|
||||||
|
background: var(--bg);
|
||||||
|
color: var(--fg);
|
||||||
font-family: system-ui, sans-serif;
|
font-family: system-ui, sans-serif;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
-webkit-font-smoothing: antialiased;
|
-webkit-font-smoothing: antialiased;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Topbar */
|
/* ============================================================
|
||||||
.topbar{
|
Topbar
|
||||||
position:fixed;top:0;left:0;right:0;
|
============================================================ */
|
||||||
height:48px;display:flex;align-items:center;
|
|
||||||
gap:1em;background:#111;padding:0 1em;
|
.topbar {
|
||||||
z-index:300;box-shadow:0 2px 8px rgba(0,0,0,.3);
|
position: fixed;
|
||||||
}
|
top: 0;
|
||||||
.topbar a{color:var(--accent);text-decoration:none;font-weight:500;}
|
left: 0;
|
||||||
.topbar a:hover{color:var(--fg);}
|
right: 0;
|
||||||
.topbar button{
|
height: 48px;
|
||||||
font-size:24px;background:transparent;color:var(--accent);
|
display: flex;
|
||||||
border:none;padding:4px 8px;cursor:pointer;
|
align-items: center;
|
||||||
}
|
gap: 1em;
|
||||||
.topbar button:hover{color:var(--fg);}
|
background: #111;
|
||||||
|
padding: 0 1em;
|
||||||
|
z-index: 300;
|
||||||
|
box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar a {
|
||||||
|
color: var(--accent);
|
||||||
|
text-decoration: none;
|
||||||
|
font-weight: 500;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar a:hover {
|
||||||
|
color: var(--fg);
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar button {
|
||||||
|
font-size: 24px;
|
||||||
|
background: transparent;
|
||||||
|
color: var(--accent);
|
||||||
|
border: none;
|
||||||
|
padding: 4px 8px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
.topbar button:hover {
|
||||||
|
color: var(--fg);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
Layout
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
/* Layout container */
|
|
||||||
.page {
|
.page {
|
||||||
display: flex;
|
display: flex;
|
||||||
position: relative;
|
position: relative;
|
||||||
|
|
@ -43,101 +75,278 @@ html,body{
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Sidebar base */
|
/* ============================================================
|
||||||
|
Sidebar (Base)
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
.sidebar {
|
.sidebar {
|
||||||
background: #111;
|
background: #111;
|
||||||
width: 85%;
|
width: 85%;
|
||||||
max-width: 320px;
|
max-width: 320px;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
transform: translateX(-100%);
|
transform: translateX(-100%);
|
||||||
transition:transform .3s ease;
|
transition: transform 0.3s ease;
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
z-index: 200;
|
z-index: 200;
|
||||||
border-right: 1px solid var(--line);
|
border-right: 1px solid var(--line);
|
||||||
}
|
}
|
||||||
.sidebar.open{transform:translateX(0);}
|
|
||||||
.overlay{
|
|
||||||
position:fixed;inset:0;background:rgba(0,0,0,.45);
|
|
||||||
backdrop-filter:blur(4px);opacity:0;pointer-events:none;
|
|
||||||
transition:opacity .3s ease;z-index:150;
|
|
||||||
}
|
|
||||||
.sidebar.open ~ .overlay{opacity:1;pointer-events:all;}
|
|
||||||
|
|
||||||
/* Desktop sidebar */
|
.sidebar.open {
|
||||||
|
transform: translateX(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.overlay {
|
||||||
|
position: fixed;
|
||||||
|
inset: 0;
|
||||||
|
background: rgba(0, 0, 0, 0.45);
|
||||||
|
backdrop-filter: blur(4px);
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
transition: opacity 0.3s ease;
|
||||||
|
z-index: 150;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.open ~ .overlay {
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
Sidebar (Desktop)
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
@media (min-width: 900px) {
|
@media (min-width: 900px) {
|
||||||
.sidebar {
|
.sidebar {
|
||||||
position:fixed;top:48px;bottom:0;left:0;
|
position: fixed;
|
||||||
width:280px;transform:none!important;
|
top: 48px;
|
||||||
overflow-y:auto;overflow-x:hidden;
|
bottom: 0;
|
||||||
|
left: 0;
|
||||||
|
width: 280px;
|
||||||
|
transform: none !important;
|
||||||
|
overflow-y: auto;
|
||||||
|
overflow-x: hidden;
|
||||||
border-right: 1px solid var(--line);
|
border-right: 1px solid var(--line);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Content area */
|
/* ============================================================
|
||||||
|
Content Area
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
.content {
|
.content {
|
||||||
flex:1;position:relative;
|
flex: 1;
|
||||||
overflow-y:auto;overflow-x:hidden;
|
position: relative;
|
||||||
padding:16px;box-sizing:border-box;
|
overflow-y: auto;
|
||||||
max-width:960px;margin-left:0;
|
overflow-x: hidden;
|
||||||
transition:margin-left .3s ease;
|
padding: 16px;
|
||||||
}
|
box-sizing: border-box;
|
||||||
@media(min-width:900px){
|
max-width: 960px;
|
||||||
.content{margin-left:280px;height:calc(100vh - 48px);}
|
margin-left: 0;
|
||||||
}
|
transition: margin-left 0.3s ease;
|
||||||
@media(max-width:899px){
|
|
||||||
.content{margin-left:0;padding:12px;}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Viewer / HTML */
|
@media (min-width: 900px) {
|
||||||
.viewer,#htmlView{
|
.content {
|
||||||
display:block;width:100%;
|
margin-left: 280px;
|
||||||
|
height: calc(100vh - 48px);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
@media (max-width: 899px) {
|
||||||
|
.content {
|
||||||
|
margin-left: 0;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
Viewer + HTML Frame
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
.viewer,
|
||||||
|
#htmlView {
|
||||||
|
display: block;
|
||||||
|
width: 100%;
|
||||||
flex: 1 1 auto;
|
flex: 1 1 auto;
|
||||||
margin-top:0;padding-top:0;
|
margin-top: 0;
|
||||||
|
padding-top: 0;
|
||||||
min-height: calc(100vh - 48px);
|
min-height: calc(100vh - 48px);
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
transition:opacity .25s ease;
|
transition: opacity 0.25s ease;
|
||||||
}
|
}
|
||||||
.viewer.fade-in,#htmlView.fade-in{opacity:1;}
|
|
||||||
.viewer:not(.fade-in),#htmlView:not(.fade-in){opacity:0;}
|
|
||||||
#htmlView{border:none;background:#0b0c10;}
|
|
||||||
|
|
||||||
/* Markdown formatting */
|
.viewer.fade-in,
|
||||||
#mdView h1,#mdView h2,#mdView h3{color:var(--accent);}
|
#htmlView.fade-in {
|
||||||
#mdView pre,#mdView code{
|
opacity: 1;
|
||||||
overflow-x:auto;background:#111;padding:.5em;border-radius:4px;color:var(--accent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.viewer:not(.fade-in),
|
||||||
|
#htmlView:not(.fade-in) {
|
||||||
|
opacity: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
#htmlView {
|
||||||
|
border: none;
|
||||||
|
background: #0b0c10;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
Markdown Formatting
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
#mdView h1,
|
||||||
|
#mdView h2,
|
||||||
|
#mdView h3 {
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
#mdView pre,
|
||||||
|
#mdView code {
|
||||||
|
overflow-x: auto;
|
||||||
|
background: #111;
|
||||||
|
padding: 0.5em;
|
||||||
|
border-radius: 4px;
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
#mdView blockquote {
|
#mdView blockquote {
|
||||||
border-left: 3px solid var(--accent);
|
border-left: 3px solid var(--accent);
|
||||||
padding-left:12px;color:var(--muted);font-style:italic;
|
padding-left: 12px;
|
||||||
|
color: var(--muted);
|
||||||
|
font-style: italic;
|
||||||
}
|
}
|
||||||
#mdView a{color:var(--accent);}
|
|
||||||
#mdView img{max-width:100%;border-radius:8px;}
|
|
||||||
|
|
||||||
/* Warning + Meta */
|
#mdView a {
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
#mdView img {
|
||||||
|
max-width: 100%;
|
||||||
|
border-radius: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
Warning + Meta
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
.md-warn {
|
.md-warn {
|
||||||
background:#3b0c0c;color:#ffd4d4;
|
background: #3b0c0c;
|
||||||
border:1px solid #6c1f1f;border-radius:8px;
|
color: #ffd4d4;
|
||||||
padding:10px 12px;margin:10px auto;max-width:820px;
|
border: 1px solid #6c1f1f;
|
||||||
}
|
border-radius: 8px;
|
||||||
.meta{color:var(--muted);margin-bottom:12px;font-size:.9em;}
|
padding: 10px 12px;
|
||||||
|
margin: 10px auto;
|
||||||
/* Pager */
|
max-width: 820px;
|
||||||
.pager{display:flex;justify-content:space-between;padding:8px 0;}
|
|
||||||
button#prev,button#next{
|
|
||||||
background:transparent;border:1px solid var(--line);color:var(--fg);
|
|
||||||
border-radius:8px;padding:4px 10px;cursor:pointer;
|
|
||||||
}
|
|
||||||
button#prev:hover,button#next:hover{
|
|
||||||
border-color:var(--accent);color:var(--accent);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Tree + controls */
|
.meta {
|
||||||
.controls{display:flex;gap:.5em;margin-bottom:8px;}
|
color: var(--muted);
|
||||||
select,#search{
|
margin-bottom: 12px;
|
||||||
background:#0b0c10;color:var(--fg);border:1px solid var(--line);
|
font-size: 0.9em;
|
||||||
border-radius:4px;padding:6px;
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
Pager
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
.pager {
|
||||||
|
display: flex;
|
||||||
|
justify-content: space-between;
|
||||||
|
padding: 8px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
button#prev,
|
||||||
|
button#next {
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
color: var(--fg);
|
||||||
|
border-radius: 8px;
|
||||||
|
padding: 4px 10px;
|
||||||
|
cursor: pointer;
|
||||||
|
}
|
||||||
|
|
||||||
|
button#prev:hover,
|
||||||
|
button#next:hover {
|
||||||
|
border-color: var(--accent);
|
||||||
|
color: var(--accent);
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
Tree + Controls
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
.controls {
|
||||||
|
display: flex;
|
||||||
|
gap: 0.5em;
|
||||||
|
margin-bottom: 8px;
|
||||||
|
}
|
||||||
|
|
||||||
|
select,
|
||||||
|
#search {
|
||||||
|
background: #0b0c10;
|
||||||
|
color: var(--fg);
|
||||||
|
border: 1px solid var(--line);
|
||||||
|
border-radius: 4px;
|
||||||
|
padding: 6px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dir .label {
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
cursor: pointer;
|
||||||
|
padding: 4px 6px;
|
||||||
|
color: var(--accent);
|
||||||
|
font-weight: 600;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dir .label::before {
|
||||||
|
content: "▶";
|
||||||
|
margin-right: 6px;
|
||||||
|
font-size: 0.8em;
|
||||||
|
color: var(--muted);
|
||||||
|
}
|
||||||
|
|
||||||
|
.dir.open .label::before {
|
||||||
|
content: "▼";
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================================
|
||||||
|
Mobile Override Fix
|
||||||
|
============================================================ */
|
||||||
|
|
||||||
|
@media (max-width: 899px) {
|
||||||
|
.sidebar {
|
||||||
|
position: fixed !important;
|
||||||
|
top: 48px !important;
|
||||||
|
bottom: 0 !important;
|
||||||
|
left: 0 !important;
|
||||||
|
width: 85% !important;
|
||||||
|
max-width: 320px !important;
|
||||||
|
background: #111 !important;
|
||||||
|
transform: translateX(-100%) !important;
|
||||||
|
transition: transform 0.3s ease;
|
||||||
|
overflow-y: auto;
|
||||||
|
z-index: 200 !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.open {
|
||||||
|
transform: translateX(0) !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.overlay {
|
||||||
|
opacity: 0;
|
||||||
|
pointer-events: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.sidebar.open ~ .overlay {
|
||||||
|
opacity: 1;
|
||||||
|
pointer-events: all;
|
||||||
|
}
|
||||||
|
|
||||||
|
main.content {
|
||||||
|
margin-left: 0 !important;
|
||||||
|
height: auto !important;
|
||||||
|
overflow-y: auto;
|
||||||
|
padding: 12px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
.dir .label{display:flex;align-items:center;cursor:pointer;
|
|
||||||
padding:4px 6px;color:var(--accent);font-weight:600;}
|
|
||||||
.dir .label::before{content:"▶";margin-right:6px;font-size:.8em;color:var(--muted);}
|
|
||||||
.dir.open .label::before{content:"▼";}
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue