Skip to content

Commit cd27c2a

Browse files
feat: Enhanced the UI (#41)
1 parent 6abd3bb commit cd27c2a

1 file changed

Lines changed: 101 additions & 17 deletions

File tree

assets/custom.css

Lines changed: 101 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,54 +1,138 @@
1-
/* Example styling for branding */
1+
/* --- Global Typography & Background --- */
2+
body {
3+
margin: 0;
4+
font-family: "Inter", "Segoe UI", sans-serif;
5+
background: linear-gradient(135deg, #e3f2fd 0%, #ede7f6 40%, #f3e5f5 100%);
6+
background-attachment: fixed;
7+
color: #222;
8+
transition: background 0.6s ease;
9+
min-height: 100vh;
10+
}
11+
12+
/* Optional: add a slight overlay for a subtle frosted effect */
13+
body::after {
14+
content: "";
15+
position: fixed;
16+
top: 0;
17+
left: 0;
18+
right: 0;
19+
bottom: 0;
20+
background: radial-gradient(
21+
circle at top left,
22+
rgba(63, 81, 181, 0.08),
23+
rgba(103, 58, 183, 0.08)
24+
);
25+
pointer-events: none;
26+
z-index: -1;
27+
}
28+
29+
/* --- Header Banner (Branding) --- */
230
body::before {
3-
content: "Learn PostgreSQL";
31+
content: " Learn PostgreSQL";
432
display: block;
533
text-align: center;
6-
font-size: 1.2rem;
7-
font-weight: bold;
8-
padding: 10px;
9-
background-color: #3f51b5;
10-
color: white;
34+
font-size: 1.25rem;
35+
font-weight: 600;
36+
letter-spacing: 0.5px;
37+
padding: 12px;
38+
background: linear-gradient(90deg, #3f51b5, #5c6bc0, #7e57c2);
39+
color: #fff;
40+
box-shadow: 0 2px 6px rgba(63, 81, 181, 0.3);
41+
border-bottom: 1px solid rgba(255, 255, 255, 0.2);
1142
}
1243

44+
/* --- PDF Link Highlight --- */
1345
a[href$=".pdf"] {
1446
color: #ff5722;
15-
font-weight: bold;
47+
font-weight: 600;
48+
text-decoration: underline dotted;
49+
transition: color 0.3s ease;
50+
}
51+
52+
a[href$=".pdf"]:hover {
53+
color: #e64a19;
54+
text-decoration: underline solid;
1655
}
1756

18-
/* Back-to-Top Button */
57+
/* --- Back-to-Top Button --- */
1958
.back-to-top {
2059
position: fixed;
2160
right: 20px;
2261
bottom: 24px;
23-
width: 50px;
24-
height: 50px;
25-
border-radius: 20%;
62+
width: 52px;
63+
height: 52px;
64+
border-radius: 50%;
2665
border: none;
27-
background: #3f51b5;
66+
background: linear-gradient(145deg, #3f51b5, #5c6bc0);
67+
box-shadow: 0 6px 14px rgba(63, 81, 181, 0.3);
2868
color: #fff;
29-
font-size: 22px;
69+
font-size: 24px;
3070
cursor: pointer;
3171
opacity: 0;
3272
transform: translateY(10px);
33-
transition: opacity 0.3s ease, transform 0.3s ease, background 0.3s ease;
73+
transition: opacity 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
3474
z-index: 9999;
35-
display: none; /* hidden by default */
75+
display: flex;
3676
align-items: center;
3777
justify-content: center;
3878
}
3979

4080
.back-to-top:hover,
4181
.back-to-top:focus {
42-
background: #303f9f;
82+
background: linear-gradient(145deg, #303f9f, #512da8);
83+
box-shadow: 0 8px 18px rgba(63, 81, 181, 0.4);
84+
transform: translateY(-3px);
4385
outline: none;
4486
}
4587

4688
.back-to-top:active {
4789
transform: translateY(1px);
4890
}
4991

92+
/* --- Docsify Content Area --- */
93+
#app {
94+
padding-top: 10px;
95+
}
96+
97+
.markdown-section h1,
98+
.markdown-section h2,
99+
.markdown-section h3 {
100+
color: #3f51b5;
101+
font-weight: 600;
102+
}
103+
104+
.markdown-section a {
105+
color: #3949ab;
106+
text-decoration: none;
107+
transition: color 0.3s ease;
108+
}
109+
110+
.markdown-section a:hover {
111+
color: #1a237e;
112+
text-decoration: underline;
113+
}
114+
115+
/* --- Reduced Motion Accessibility --- */
50116
@media (prefers-reduced-motion: reduce) {
51117
.back-to-top {
52118
transition: none;
53119
}
54120
}
121+
122+
/* --- Smooth Scroll --- */
123+
html {
124+
scroll-behavior: smooth;
125+
}
126+
127+
/* --- Vertical Border Before Each Heading --- */
128+
.markdown-section h1,
129+
.markdown-section h2,
130+
.markdown-section h3 {
131+
border-left: 4px solid #7e57c2; /* purple vertical line */
132+
padding-left: 12px; /* space between border and text */
133+
margin-left: 0;
134+
color: #3f51b5; /* main heading color */
135+
font-weight: 600;
136+
line-height: 1.4;
137+
margin-top: 1.5em;
138+
}

0 commit comments

Comments
 (0)