Skip to content

Commit bd528cc

Browse files
committed
feat: new style update
1 parent 9d9d357 commit bd528cc

File tree

6 files changed

+34
-19
lines changed

6 files changed

+34
-19
lines changed

.github/workflows/deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,10 +24,10 @@ jobs:
2424
mv etc/cover_small.jpg .
2525
mv etc/cover_square.png .
2626
mv etc/cover.jpg .
27-
mv etc/custom.css .
27+
mv etc/style-custom.css .
2828
mv etc/main.go .
2929
mv etc/robots.txt .
30-
mv etc/gitbook-plugin-disqus.js .
30+
mv etc/script-gitbook-plugin-disqus.js .
3131
npm install -g gitbook-cli
3232
gitbook install
3333
cd ~/.gitbook/versions/3.2.3 && npm i npm@5

content/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Version Changelogs & Updates
22

3+
## 📝 Release v4.0.20241115 (2024-11-15)
4+
5+
#### ◉ General update
6+
7+
- UI updates
8+
39
## 📝 Release v4.0.20240830 (2024-08-30)
410

511
#### ◉ Chapter update

content/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ Ada total sekitar <b>120 chapter</b> yang dibahas dalam website/ebook ini. Kumpu
2121
</li>
2222
</ol>
2323

24-
Versi e-book: **v4.0.20240830**, dan versi Go **1.22**.
24+
Versi e-book: **v4.0.20241115**, dan versi Go **1.22**.
2525

2626
## Download File E-book (pdf, epub, mobi)
2727

2828
Versi ebook bisa di-download dalam bentuk file via link berikut:
2929

30-
- [PDF](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.pdf?v=v4.0.20240830)
31-
- [Epub](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.epub?v=v4.0.20240830)
32-
- [Mobi](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.mobi?v=v4.0.20240830)
30+
- [PDF](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.pdf?v=v4.0.20241115)
31+
- [Epub](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.epub?v=v4.0.20241115)
32+
- [Mobi](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.mobi?v=v4.0.20241115)
3333

3434
Untuk mendapatkan konten buku yang paling update, silakan baca langsung versi web secara online atau download ulang e-book versi terbaru.
3535

etc/main.go

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,7 @@ func webbookPostAdjustment() {
147147
htmlString = strings.ReplaceAll(htmlString, imagesAltToFind, imagesAltReplacement)
148148

149149
// ==== disqus lazy load
150-
disqusJSBuf, err := os.ReadFile("./gitbook-plugin-disqus.js")
150+
disqusJSBuf, err := os.ReadFile("./script-gitbook-plugin-disqus.js")
151151
if err != nil {
152152
fmt.Println("error", err)
153153
}
@@ -158,12 +158,10 @@ func webbookPostAdjustment() {
158158

159159
// ==== gitbook assets lazy load
160160
cssToLoad := []string{
161-
// "gitbook/style.css",
162161
"gitbook/gitbook-plugin-disqus/plugin.css",
163162
"gitbook/gitbook-plugin-highlight/website.css",
164163
"gitbook/gitbook-plugin-search/search.css",
165164
"gitbook/gitbook-plugin-fontsettings/website.css",
166-
// `/custom.css?v=` + getVersion() + `"`,
167165
}
168166
for _, cssFileNameToFind := range cssToLoad {
169167
cssFileNameReplacement := fmt.Sprintf(`%s" media="print" onload="this.media='all'`, cssFileNameToFind)
@@ -181,10 +179,10 @@ func webbookPostAdjustment() {
181179
htmlString = strings.ReplaceAll(htmlString, buttonToFind, buttonReplacement)
182180

183181
// ==== inject adjustment css
184-
adjustmentCSSBuf, _ := os.ReadFile("./custom.css")
185-
os.WriteFile("./_book/gitbook/custom.css", adjustmentCSSBuf, 0644)
182+
adjustmentCSSBuf, _ := os.ReadFile("./style-custom.css")
183+
os.WriteFile("./_book/gitbook/style-custom.css", adjustmentCSSBuf, 0644)
186184
adjustmentCSSToFind := `</head>`
187-
adjustmentCSSReplacement := `<link rel="stylesheet" href="gitbook/custom.css?v=` + getVersion() + `">` + adjustmentCSSToFind
185+
adjustmentCSSReplacement := `<link rel="stylesheet" href="gitbook/style-custom.css?v=` + getVersion() + `">` + adjustmentCSSToFind
188186
htmlString = strings.ReplaceAll(htmlString, adjustmentCSSToFind, adjustmentCSSReplacement)
189187

190188
// ==== inject github stars js script
File renamed without changes.

etc/custom.css renamed to etc/style-custom.css

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,9 @@
11
@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700&display=swap');
2+
@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap');
23

34
/* base font */
4-
body {
5-
font-family: Source Sans Pro, Helvetica Neue, Arial, sans-serif;
5+
body .book.font-family-1, .book-summary {
6+
font-family: Inter, Source Sans Pro, Helvetica Neue, Arial, sans-serif;
67
}
78

89
/* unmark to disable search bar, replace it with the book title instead */
@@ -26,6 +27,15 @@ body {
2627
position: absolute;
2728
} */
2829

30+
.dropdown.font-settings {
31+
display: none;
32+
}
33+
34+
.page-inner {
35+
max-width: fit-content;
36+
padding: 20px 100px 40px 100px;
37+
}
38+
2939
/* disable word wrap at left sidebar */
3040
.book-summary ul.summary li a, .book-summary ul.summary li span {
3141
text-overflow: initial;
@@ -87,12 +97,12 @@ body {
8797

8898
/* make the sidebar wider, and adjust the content to match it */
8999
.book-summary {
90-
left: -500px;
91-
width: 500px;
100+
left: -470px;
101+
width: 470px;
92102
}
93103
@media (min-width: 600px) {
94104
.book.with-summary .book-body {
95-
left: 500px;
105+
left: 470px;
96106
}
97107
}
98108

@@ -128,7 +138,8 @@ ins.adsbygoogle {
128138

129139
/* disquss block */
130140
#disqus_thread {
131-
margin-top: 40px;
141+
margin: 40px auto 5px;
142+
max-width: 800px;
132143
}
133144
#disqus_thread + #disqus_thread {
134145
display: none;
@@ -161,7 +172,7 @@ ins.adsbygoogle {
161172
position: fixed;
162173
bottom: 0;
163174
right: 17px;
164-
left: 500px;
175+
left: 470px;
165176
z-index: 1000;
166177
}
167178

0 commit comments

Comments
 (0)