Skip to content

Commit c1f2fe8

Browse files
committed
Improved overall typography and layout
Enhancements include: - Global typography optimization with adjusted line-height, font-size, and color - Container width and padding adjustments for better layout - Title margins and line-height improvements for readability - Paragraph margin adjustments for better text flow - Responsive design tweaks to accommodate smaller screens - Navbar enhancements including box-shadow and padding adjustments - Card style improvements with added hover effect - Updated import link for Montserrat font with additional weights - Added new color variables and global color settings - Adjusted section padding in responsive design.
1 parent 92a505f commit c1f2fe8

File tree

2 files changed

+99
-2
lines changed

2 files changed

+99
-2
lines changed

_sass/_layout.scss

+59
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,62 @@ div.highlight {
2323
}
2424
}
2525
}
26+
27+
// 全局排版優化
28+
body {
29+
line-height: 1.6;
30+
font-size: 16px;
31+
color: #333;
32+
}
33+
34+
.container {
35+
max-width: 1200px;
36+
padding: 0 1rem;
37+
margin: 0 auto;
38+
}
39+
40+
// 標題優化
41+
h1, h2, h3, h4, h5, h6 {
42+
margin-top: 2rem;
43+
margin-bottom: 1rem;
44+
line-height: 1.3;
45+
}
46+
47+
// 段落優化
48+
p {
49+
margin-bottom: 1.5rem;
50+
}
51+
52+
// 響應式優化
53+
@media screen and (max-width: 768px) {
54+
body {
55+
font-size: 15px;
56+
}
57+
58+
.container {
59+
padding: 0 0.75rem;
60+
}
61+
}
62+
63+
// 導航欄優化
64+
.navbar {
65+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
66+
67+
.navbar-brand {
68+
font-weight: 700;
69+
}
70+
71+
.navbar-item {
72+
padding: 0.5rem 1rem;
73+
}
74+
}
75+
76+
// 卡片優化
77+
.card {
78+
box-shadow: 0 2px 4px rgba(0,0,0,0.1);
79+
transition: transform 0.2s ease;
80+
81+
&:hover {
82+
transform: translateY(-2px);
83+
}
84+
}

_sass/_main.scss

+40-2
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,50 @@
11
@charset "utf-8";
2-
@import url('https://fonts.googleapis.com/css?family=Montserrat');
2+
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@400;500;600;700&display=swap');
33

4+
// 基礎變量設置
45
$family-sans-serif: 'Montserrat', sans-serif;
56
$primary: #188eac !default;
7+
$secondary: #2c3e50;
8+
$accent: #e74c3c;
9+
$background: #f8f9fa;
10+
$text: #2c3e50;
611

12+
// 全局顏色設置
13+
$body-background-color: $background;
14+
$text-color: $text;
15+
$link-color: $primary;
16+
$link-hover-color: darken($primary, 10%);
17+
18+
// 組件顏色設置
719
$tabs-link-active-color: $primary;
820
$tabs-link-active-border-bottom-color: $primary;
21+
$button-primary-background-color: $primary;
22+
$button-primary-hover-background-color: darken($primary, 10%);
923

24+
// 導入 Bulma
1025
@import "../node_modules/bulma/bulma.sass";
26+
27+
// 自定義樣式
28+
.section {
29+
padding: 3rem 1.5rem;
30+
}
31+
32+
.title {
33+
color: $secondary;
34+
font-weight: 600;
35+
}
36+
37+
.subtitle {
38+
color: lighten($secondary, 20%);
39+
}
40+
41+
// 響應式調整
42+
@media screen and (max-width: 768px) {
43+
.section {
44+
padding: 2rem 1rem;
45+
}
46+
}
47+
48+
// 導入其他樣式文件
1149
@import "layout";
12-
@import "syntax"
50+
@import "syntax";

0 commit comments

Comments
 (0)