Skip to content

Commit 7b4a647

Browse files
committed
Improve layouts.
1 parent 4e454f1 commit 7b4a647

2 files changed

Lines changed: 20 additions & 23 deletions

File tree

config/templates/base/navigation.css

Lines changed: 13 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600&display=swap');
2-
31
/* Base Navigation Layout - Structural styles only */
42
/* Colors, fonts, and borders should be overridden in individual templates */
53

@@ -11,18 +9,18 @@
119
width: var(--navigation-width);
1210
height: 100vh;
1311
overflow-y: auto;
14-
padding: var(--space-xl) 0;
12+
padding: var(--space-base) 0;
1513
z-index: var(--z-navigation);
16-
font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
14+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
1715
font-weight: 400;
1816
background-color: var(--color-nav-bg);
1917
border-right: 1px solid var(--color-nav-border);
2018
}
2119

2220
/* Navigation header */
2321
#navigation h3 {
24-
margin: 0 0 var(--space-base) 0;
25-
padding: 0 var(--space-md);
22+
margin: 0 0 var(--space-sm) 0;
23+
padding: 0 var(--space-base);
2624
font-size: var(--font-size-sm);
2725
font-weight: 600;
2826
color: var(--color-nav-text);
@@ -42,9 +40,9 @@
4240
/* Navigation links layout */
4341
#navigation a {
4442
display: block;
45-
padding: var(--space-sm) var(--space-lg);
43+
padding: var(--space-xs) var(--space-xs);
4644
text-decoration: none;
47-
border-left: 3px solid transparent;
45+
border-left: 2px solid transparent;
4846
border-bottom: none;
4947
transition: var(--transition-fast);
5048
font-weight: 400;
@@ -68,7 +66,7 @@
6866
/* Directory names (non-clickable) */
6967
#navigation .directory-name {
7068
display: block;
71-
padding: var(--space-sm) var(--space-lg);
69+
padding: var(--space-xs) var(--space-xs);
7270
font-weight: 600;
7371
color: var(--color-nav-text-hover);
7472
font-size: var(--font-size-xs);
@@ -77,22 +75,22 @@
7775
/* Depth-based indentation */
7876
#navigation .depth-0 a,
7977
#navigation .depth-0 .directory-name {
80-
padding-left: var(--space-md);
78+
padding-left: var(--space-sm);
8179
}
8280

8381
#navigation .depth-1 a,
8482
#navigation .depth-1 .directory-name {
85-
padding-left: calc(var(--space-md) + var(--space-md));
83+
padding-left: calc(var(--space-sm) * 2);
8684
}
8785

8886
#navigation .depth-2 a,
8987
#navigation .depth-2 .directory-name {
90-
padding-left: calc(var(--space-md) + var(--space-md) * 2);
88+
padding-left: calc(var(--space-sm) * 3);
9189
}
9290

9391
#navigation .depth-3 a,
9492
#navigation .depth-3 .directory-name {
95-
padding-left: calc(var(--space-md) + var(--space-md) * 3);
93+
padding-left: calc(var(--space-sm) * 4);
9694
}
9795

9896
/* Container adjustments when navigation is present */
@@ -116,9 +114,9 @@ body:has(#navigation) #container {
116114
width: 100%;
117115
height: auto;
118116
border-right: none;
119-
padding: 1rem 0;
117+
padding: var(--space-sm) 0;
120118
}
121-
119+
122120
body:has(#navigation) #container,
123121
body.has-navigation #container {
124122
margin-left: auto;

config/templates/default/style.css

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@
88
/* Default template theme variables */
99
:root {
1010
/* Typography settings for this theme */
11-
--base-font-size: 21px;
11+
--base-font-size: 16px;
1212
--base-line-height: 1.4;
13-
--scale-ratio: 1.25;
13+
--scale-ratio: 1.2;
1414

1515
/* Print settings */
1616
--print-font-size: 11pt;
@@ -54,7 +54,7 @@
5454
--color-table-hover: rgba(0, 0, 0, 0.04);
5555

5656
/* Layout */
57-
--container-max-width: 85ch;
57+
--container-max-width: 80rem;
5858
}
5959

6060
/* Typography */
@@ -107,18 +107,17 @@ p + p {
107107
/* Container layouts */
108108
#container {
109109
max-width: var(--container-max-width);
110-
margin: var(--space-xl) auto;
111-
padding: var(--container-padding);
110+
padding: var(--space-base) var(--space-2xl);
112111
background-color: var(--color-background);
113112
}
114113

115114
/* Container adjustments when navigation is present */
116115
body:has(#navigation) #container,
117116
body.has-navigation #container {
118-
max-width: calc(var(--container-max-width) - var(--navigation-width));
117+
/*max-width: calc(var(--container-max-width) - var(--navigation-width));*/
119118
margin-right: auto;
120-
margin-top: var(--space-xl);
121-
margin-bottom: var(--space-xl);
119+
/*margin-top: var(--space-xl);*/
120+
/*margin-bottom: var(--space-xl);*/
122121
}
123122

124123
/* Enhanced blockquotes */

0 commit comments

Comments
 (0)