From 828e1bb3570b0b1a722dc104df97b83928d2fdbb Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 01:42:45 +0700 Subject: [PATCH 01/11] feat: update stylesheet --- .github/workflows/deploy.yml | 4 ++++ etc/book.json | 3 +++ etc/custom.css | 22 ++++++++++++++++------ etc/main.go | 7 ------- 4 files changed, 23 insertions(+), 13 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index f52f91757..78198527a 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,6 +20,8 @@ jobs: - name: 'Generating distributable files' run: | rm -f README.md + rm -f content/book.json + rm -f content/custom.css mv content/* . mv etc/cover_small.jpg . mv etc/cover_square.png . @@ -72,6 +74,8 @@ jobs: - name: 'Generating distributable files' run: | rm -f README.md + rm -f content/book.json + rm -f content/custom.css mv content/* . mv etc/cover_small.jpg . mv etc/cover_square.png . diff --git a/etc/book.json b/etc/book.json index dfc2a902a..9e38fed3a 100644 --- a/etc/book.json +++ b/etc/book.json @@ -7,6 +7,9 @@ "meta", "sitemap" ], + "styles": { + "website": "custom.css" + }, "pluginsConfig": { "disqus": { "shortName": "dasarpemrogramangolang" diff --git a/etc/custom.css b/etc/custom.css index f9dd0e514..178a0d92f 100644 --- a/etc/custom.css +++ b/etc/custom.css @@ -1,8 +1,9 @@ @import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap'); /* base font */ -body { - font-family: Source Sans Pro, Helvetica Neue, Arial, sans-serif; +body .book.font-family-1 { + font-family: Inter, Source Sans Pro, Helvetica Neue, Arial, sans-serif; } /* unmark to disable search bar, replace it with the book title instead */ @@ -26,6 +27,15 @@ body { position: absolute; } */ +.dropdown.font-settings { + display: none; +} + +.page-inner { + max-width: fit-content; + padding: 20px 100px 40px 100px; +} + /* disable word wrap at left sidebar */ .book-summary ul.summary li a, .book-summary ul.summary li span { text-overflow: initial; @@ -87,12 +97,12 @@ body { /* make the sidebar wider, and adjust the content to match it */ .book-summary { - left: -500px; - width: 500px; + left: -470px; + width: 470px; } @media (min-width: 600px) { .book.with-summary .book-body { - left: 500px; + left: 470px; } } @@ -161,7 +171,7 @@ ins.adsbygoogle { position: fixed; bottom: 0; right: 17px; - left: 500px; + left: 470px; z-index: 1000; } diff --git a/etc/main.go b/etc/main.go index c5e26c4b9..e50c993d4 100644 --- a/etc/main.go +++ b/etc/main.go @@ -180,13 +180,6 @@ func webbookPostAdjustment() { ` + buttonToFind htmlString = strings.ReplaceAll(htmlString, buttonToFind, buttonReplacement) - // ==== inject adjustment css - adjustmentCSSBuf, _ := os.ReadFile("./custom.css") - os.WriteFile("./_book/gitbook/custom.css", adjustmentCSSBuf, 0644) - adjustmentCSSToFind := `` - adjustmentCSSReplacement := `` + adjustmentCSSToFind - htmlString = strings.ReplaceAll(htmlString, adjustmentCSSToFind, adjustmentCSSReplacement) - // ==== inject github stars js script buttonScriptToFind := `` buttonScriptReplacement := `` + buttonScriptToFind From 963952e8669c5415086dfc3e45e45ba427b16db9 Mon Sep 17 00:00:00 2001 From: = <=> Date: Thu, 14 Nov 2024 18:50:22 +0000 Subject: [PATCH 02/11] feat: update path --- content/book.json | 1 + content/style-custom.css | 1 + etc/{custom.css => style-custom.css} | 0 3 files changed, 2 insertions(+) create mode 120000 content/book.json create mode 120000 content/style-custom.css rename etc/{custom.css => style-custom.css} (100%) diff --git a/content/book.json b/content/book.json new file mode 120000 index 000000000..857a8565b --- /dev/null +++ b/content/book.json @@ -0,0 +1 @@ +etc/book.json \ No newline at end of file diff --git a/content/style-custom.css b/content/style-custom.css new file mode 120000 index 000000000..bb5da0de4 --- /dev/null +++ b/content/style-custom.css @@ -0,0 +1 @@ +etc/style-custom.css \ No newline at end of file diff --git a/etc/custom.css b/etc/style-custom.css similarity index 100% rename from etc/custom.css rename to etc/style-custom.css From e6e67d83d9ef5345533cd7e5b600b663b85dfaed Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 01:50:42 +0700 Subject: [PATCH 03/11] feat: update style path --- .github/workflows/deploy.yml | 6 +++--- etc/book.json | 2 +- etc/main.go | 1 - 3 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 78198527a..9ebec0b7f 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -21,12 +21,12 @@ jobs: run: | rm -f README.md rm -f content/book.json - rm -f content/custom.css + rm -f content/style-custom.css mv content/* . mv etc/cover_small.jpg . mv etc/cover_square.png . mv etc/cover.jpg . - mv etc/custom.css . + mv etc/style-custom.css . mv etc/main.go . mv etc/robots.txt . mv etc/gitbook-plugin-disqus.js . @@ -75,7 +75,7 @@ jobs: run: | rm -f README.md rm -f content/book.json - rm -f content/custom.css + rm -f content/style-custom.css mv content/* . mv etc/cover_small.jpg . mv etc/cover_square.png . diff --git a/etc/book.json b/etc/book.json index 9e38fed3a..6c415decb 100644 --- a/etc/book.json +++ b/etc/book.json @@ -8,7 +8,7 @@ "sitemap" ], "styles": { - "website": "custom.css" + "website": "style-custom.css" }, "pluginsConfig": { "disqus": { diff --git a/etc/main.go b/etc/main.go index e50c993d4..a1808b92b 100644 --- a/etc/main.go +++ b/etc/main.go @@ -163,7 +163,6 @@ func webbookPostAdjustment() { "gitbook/gitbook-plugin-highlight/website.css", "gitbook/gitbook-plugin-search/search.css", "gitbook/gitbook-plugin-fontsettings/website.css", - // `/custom.css?v=` + getVersion() + `"`, } for _, cssFileNameToFind := range cssToLoad { cssFileNameReplacement := fmt.Sprintf(`%s" media="print" onload="this.media='all'`, cssFileNameToFind) From 1dce3b141c403fe8ba8da407a9cc7c876860cebf Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 01:53:10 +0700 Subject: [PATCH 04/11] feat: update stylesheet --- etc/style-custom.css | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/etc/style-custom.css b/etc/style-custom.css index 178a0d92f..9593f98ae 100644 --- a/etc/style-custom.css +++ b/etc/style-custom.css @@ -138,7 +138,8 @@ ins.adsbygoogle { /* disquss block */ #disqus_thread { - margin-top: 40px; + margin: 40px auto 5px; + max-width: 800px; } #disqus_thread + #disqus_thread { display: none; From 6708c18643e4a0b7ed6c14963f5ee38ef6370194 Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 02:01:12 +0700 Subject: [PATCH 05/11] fix: path --- .github/workflows/deploy.yml | 17 +- content/book.json | 39 ++- {etc => content}/cover.jpg | Bin {etc => content}/cover_small.jpg | Bin {etc => content}/cover_square.png | Bin {etc => content}/robots.txt | 0 .../script-gitbook-plugin-disqus.js | 0 content/style-custom.css | 228 +++++++++++++++++- etc/book.json | 38 --- etc/main.go | 2 +- etc/style-custom.css | 227 ----------------- 11 files changed, 269 insertions(+), 282 deletions(-) rename {etc => content}/cover.jpg (100%) rename {etc => content}/cover_small.jpg (100%) rename {etc => content}/cover_square.png (100%) rename {etc => content}/robots.txt (100%) rename etc/gitbook-plugin-disqus.js => content/script-gitbook-plugin-disqus.js (100%) delete mode 100644 etc/book.json delete mode 100644 etc/style-custom.css diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 9ebec0b7f..31e8fa588 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -20,21 +20,14 @@ jobs: - name: 'Generating distributable files' run: | rm -f README.md - rm -f content/book.json - rm -f content/style-custom.css mv content/* . - mv etc/cover_small.jpg . - mv etc/cover_square.png . - mv etc/cover.jpg . - mv etc/style-custom.css . + mv book.json book.json.tmp mv etc/main.go . - mv etc/robots.txt . - mv etc/gitbook-plugin-disqus.js . npm install -g gitbook-cli gitbook install cd ~/.gitbook/versions/3.2.3 && npm i npm@5 cd ${{ github.workspace }} - mv etc/book.json . + mv book.json.tmp book.json gitbook install go run main.go -mode=webbook -adjustment=pre gitbook build @@ -74,12 +67,8 @@ jobs: - name: 'Generating distributable files' run: | rm -f README.md - rm -f content/book.json - rm -f content/style-custom.css mv content/* . - mv etc/cover_small.jpg . - mv etc/cover_square.png . - mv etc/cover.jpg . + rm -rf book.json mv etc/main.go . go run main.go -mode=ebook -adjustment=pre gitbook install diff --git a/content/book.json b/content/book.json index 857a8565b..6c415decb 120000 --- a/content/book.json +++ b/content/book.json @@ -1 +1,38 @@ -etc/book.json \ No newline at end of file +{ + "plugins": [ + "-search", + "-lunr", + "docsearch-v3", + "disqus", + "meta", + "sitemap" + ], + "styles": { + "website": "style-custom.css" + }, + "pluginsConfig": { + "disqus": { + "shortName": "dasarpemrogramangolang" + }, + "meta": { + "data": [{ + "name": "google-site-verification", + "content": "UZnxS2Dk3fm2_Elms3a__56Q_oQ3sQ1h0SVXXlHSmbE" + }, { + "name": "og:image", + "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" + }, { + "name": "twitter:image", + "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" + }] + }, + "sitemap": { + "hostname": "https://dasarpemrogramangolang.novalagung.com/" + }, + "docsearch": { + "appId": "ZV0MXP90GF", + "apiKey": "f7431c709385fe300da4c2ef2093c43c", + "indexName": "dasarpemrogramangolang-novalagung" + } + } +} diff --git a/etc/cover.jpg b/content/cover.jpg similarity index 100% rename from etc/cover.jpg rename to content/cover.jpg diff --git a/etc/cover_small.jpg b/content/cover_small.jpg similarity index 100% rename from etc/cover_small.jpg rename to content/cover_small.jpg diff --git a/etc/cover_square.png b/content/cover_square.png similarity index 100% rename from etc/cover_square.png rename to content/cover_square.png diff --git a/etc/robots.txt b/content/robots.txt similarity index 100% rename from etc/robots.txt rename to content/robots.txt diff --git a/etc/gitbook-plugin-disqus.js b/content/script-gitbook-plugin-disqus.js similarity index 100% rename from etc/gitbook-plugin-disqus.js rename to content/script-gitbook-plugin-disqus.js diff --git a/content/style-custom.css b/content/style-custom.css index bb5da0de4..9593f98ae 120000 --- a/content/style-custom.css +++ b/content/style-custom.css @@ -1 +1,227 @@ -etc/style-custom.css \ No newline at end of file +@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap'); + +/* base font */ +body .book.font-family-1 { + font-family: Inter, Source Sans Pro, Helvetica Neue, Arial, sans-serif; +} + +/* unmark to disable search bar, replace it with the book title instead */ +/* .book-summary #book-search-input { + position: relative; + opacity: 0; + overflow: hidden; + height: 0px; + padding: 0; +} */ +/* .book-summary #book-search-input:after { + content: "Dasar Pemrograman Golang"; + padding-top: 17px; + padding-left: 15px; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ffffff; + z-index: 1; + position: absolute; +} */ + +.dropdown.font-settings { + display: none; +} + +.page-inner { + max-width: fit-content; + padding: 20px 100px 40px 100px; +} + +/* disable word wrap at left sidebar */ +.book-summary ul.summary li a, .book-summary ul.summary li span { + text-overflow: initial; + white-space: normal; + line-height: 1.4em; + padding: 9px 15px; +} + +/* sidebar background */ +.book-summary { + background-color: #ffffff; +} + +/* sidebar ads animation */ +/* .book-summary .summary > li:nth-child(8) a { + color: white; + margin-left: 5px; + background-color: #ec882f; + -webkit-animation: block-promo-bg-animate 3s infinite; + -moz-animation: block-promo-bg-animate 3s infinite; + -o-animation: block-promo-bg-animate 3s infinite; + -ms-animation: block-promo-bg-animate 3s infinite; + animation: block-promo-bg-animate 3s infinite; +} */ +@keyframes block-promo-bg-animate { + 0% { background-color: #008cff; } + 50% { background-color: #004986; } + 100% { background-color: #008cff; } +} + +/* sidebar scroll beautification */ +.book-summary::-webkit-scrollbar { + width: 15px; +} +.book-summary::-webkit-scrollbar-thumb { + background: transparent; + border-radius: 4px; +} +.book-summary:hover::-webkit-scrollbar-thumb { + background: hsla(0,0%,53%,.4); +} +.book-summary:hover::-webkit-scrollbar-track { + background: hsla(0,0%,53%,.1); +} + +/* sidebar active link */ +.book-summary li.active>a:before { + content: " "; + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 2px; + background-color: #008cff; +} +.book-summary li.active>a { + font-weight: bold; +} + +/* make the sidebar wider, and adjust the content to match it */ +.book-summary { + left: -470px; + width: 470px; +} +@media (min-width: 600px) { + .book.with-summary .book-body { + left: 470px; + } +} + +/* hide the header because each post already has it's h1 */ +/* also hide the unused navigation buttons (except font settings) */ +.book-header > h1, +.book-header > .pull-right:not(.font-settings) { + display: none; +} + +/* hide the "published by gitbook" footer */ +.gitbook-link { + visibility: hidden; + pointer-events: none; + height: 20px; +} + +/* source code link for each content */ +.source-code-link { + border: 1px solid #c9ffce; + background-color: #e7ffe9; + padding: 10px 10px; + text-align: center; +} +.source-code-link .source-code-link-message { + font-weight: bold; +} + +/* google ads */ +ins.adsbygoogle { + margin-bottom: 1em; +} + +/* disquss block */ +#disqus_thread { + margin: 40px auto 5px; + max-width: 800px; +} +#disqus_thread + #disqus_thread { + display: none; +} +#disqus_thread:before { + background-color: #e7e9ee; + content: " "; + display: block; + height: 1px; + margin-left: -15px; + margin-right: -15px; +} +#disqus_thread > iframe:nth-child(1) { + padding-top: 30px; +} +#disqus_thread > iframe[src*=ads] { + display: none; +} + +/* bottom news banner and body adjustment */ +.book-body .body-inner { + padding-bottom: 100px; +} +.book-news { + display: block; + padding: 18px 100px; + text-align: center; + background-color: #0099ea; + color: white; + position: fixed; + bottom: 0; + right: 17px; + left: 470px; + z-index: 1000; +} + +/* banner */ +.banner-container { + display: none; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.88); + z-index: 99999; + backdrop-filter: blur(2px); +} +.banner-container > div { + position: relative; + height: 100%; + width: 100%; +} +.banner-container a { + width: 800px; + height: 494px; + position: absolute; + top: 50%; + margin-top: -247px; + z-index: 99999; + left: 50%; + margin-left: -400px; +} +.banner-container a img { + width: 100%; + height: 100%; + object-fit: cover; +} +@media (max-width: 800px) { + .banner-container a { + width: auto; + left: 0; + margin-left: 0; + right: 0; + margin-right: 0; + height: auto; + margin-top: -100px; + } +} + +.markdown-section hr, +.ebook-wrapper hr { + height: 1px !important; + background-color: #e7e9ee !important; +} diff --git a/etc/book.json b/etc/book.json deleted file mode 100644 index 6c415decb..000000000 --- a/etc/book.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "plugins": [ - "-search", - "-lunr", - "docsearch-v3", - "disqus", - "meta", - "sitemap" - ], - "styles": { - "website": "style-custom.css" - }, - "pluginsConfig": { - "disqus": { - "shortName": "dasarpemrogramangolang" - }, - "meta": { - "data": [{ - "name": "google-site-verification", - "content": "UZnxS2Dk3fm2_Elms3a__56Q_oQ3sQ1h0SVXXlHSmbE" - }, { - "name": "og:image", - "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" - }, { - "name": "twitter:image", - "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" - }] - }, - "sitemap": { - "hostname": "https://dasarpemrogramangolang.novalagung.com/" - }, - "docsearch": { - "appId": "ZV0MXP90GF", - "apiKey": "f7431c709385fe300da4c2ef2093c43c", - "indexName": "dasarpemrogramangolang-novalagung" - } - } -} diff --git a/etc/main.go b/etc/main.go index a1808b92b..1df76b35d 100644 --- a/etc/main.go +++ b/etc/main.go @@ -147,7 +147,7 @@ func webbookPostAdjustment() { htmlString = strings.ReplaceAll(htmlString, imagesAltToFind, imagesAltReplacement) // ==== disqus lazy load - disqusJSBuf, err := os.ReadFile("./gitbook-plugin-disqus.js") + disqusJSBuf, err := os.ReadFile("./script-gitbook-plugin-disqus.js") if err != nil { fmt.Println("error", err) } diff --git a/etc/style-custom.css b/etc/style-custom.css deleted file mode 100644 index 9593f98ae..000000000 --- a/etc/style-custom.css +++ /dev/null @@ -1,227 +0,0 @@ -@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700&display=swap'); -@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap'); - -/* base font */ -body .book.font-family-1 { - font-family: Inter, Source Sans Pro, Helvetica Neue, Arial, sans-serif; -} - -/* unmark to disable search bar, replace it with the book title instead */ -/* .book-summary #book-search-input { - position: relative; - opacity: 0; - overflow: hidden; - height: 0px; - padding: 0; -} */ -/* .book-summary #book-search-input:after { - content: "Dasar Pemrograman Golang"; - padding-top: 17px; - padding-left: 15px; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #ffffff; - z-index: 1; - position: absolute; -} */ - -.dropdown.font-settings { - display: none; -} - -.page-inner { - max-width: fit-content; - padding: 20px 100px 40px 100px; -} - -/* disable word wrap at left sidebar */ -.book-summary ul.summary li a, .book-summary ul.summary li span { - text-overflow: initial; - white-space: normal; - line-height: 1.4em; - padding: 9px 15px; -} - -/* sidebar background */ -.book-summary { - background-color: #ffffff; -} - -/* sidebar ads animation */ -/* .book-summary .summary > li:nth-child(8) a { - color: white; - margin-left: 5px; - background-color: #ec882f; - -webkit-animation: block-promo-bg-animate 3s infinite; - -moz-animation: block-promo-bg-animate 3s infinite; - -o-animation: block-promo-bg-animate 3s infinite; - -ms-animation: block-promo-bg-animate 3s infinite; - animation: block-promo-bg-animate 3s infinite; -} */ -@keyframes block-promo-bg-animate { - 0% { background-color: #008cff; } - 50% { background-color: #004986; } - 100% { background-color: #008cff; } -} - -/* sidebar scroll beautification */ -.book-summary::-webkit-scrollbar { - width: 15px; -} -.book-summary::-webkit-scrollbar-thumb { - background: transparent; - border-radius: 4px; -} -.book-summary:hover::-webkit-scrollbar-thumb { - background: hsla(0,0%,53%,.4); -} -.book-summary:hover::-webkit-scrollbar-track { - background: hsla(0,0%,53%,.1); -} - -/* sidebar active link */ -.book-summary li.active>a:before { - content: " "; - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 2px; - background-color: #008cff; -} -.book-summary li.active>a { - font-weight: bold; -} - -/* make the sidebar wider, and adjust the content to match it */ -.book-summary { - left: -470px; - width: 470px; -} -@media (min-width: 600px) { - .book.with-summary .book-body { - left: 470px; - } -} - -/* hide the header because each post already has it's h1 */ -/* also hide the unused navigation buttons (except font settings) */ -.book-header > h1, -.book-header > .pull-right:not(.font-settings) { - display: none; -} - -/* hide the "published by gitbook" footer */ -.gitbook-link { - visibility: hidden; - pointer-events: none; - height: 20px; -} - -/* source code link for each content */ -.source-code-link { - border: 1px solid #c9ffce; - background-color: #e7ffe9; - padding: 10px 10px; - text-align: center; -} -.source-code-link .source-code-link-message { - font-weight: bold; -} - -/* google ads */ -ins.adsbygoogle { - margin-bottom: 1em; -} - -/* disquss block */ -#disqus_thread { - margin: 40px auto 5px; - max-width: 800px; -} -#disqus_thread + #disqus_thread { - display: none; -} -#disqus_thread:before { - background-color: #e7e9ee; - content: " "; - display: block; - height: 1px; - margin-left: -15px; - margin-right: -15px; -} -#disqus_thread > iframe:nth-child(1) { - padding-top: 30px; -} -#disqus_thread > iframe[src*=ads] { - display: none; -} - -/* bottom news banner and body adjustment */ -.book-body .body-inner { - padding-bottom: 100px; -} -.book-news { - display: block; - padding: 18px 100px; - text-align: center; - background-color: #0099ea; - color: white; - position: fixed; - bottom: 0; - right: 17px; - left: 470px; - z-index: 1000; -} - -/* banner */ -.banner-container { - display: none; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.88); - z-index: 99999; - backdrop-filter: blur(2px); -} -.banner-container > div { - position: relative; - height: 100%; - width: 100%; -} -.banner-container a { - width: 800px; - height: 494px; - position: absolute; - top: 50%; - margin-top: -247px; - z-index: 99999; - left: 50%; - margin-left: -400px; -} -.banner-container a img { - width: 100%; - height: 100%; - object-fit: cover; -} -@media (max-width: 800px) { - .banner-container a { - width: auto; - left: 0; - margin-left: 0; - right: 0; - margin-right: 0; - height: auto; - margin-top: -100px; - } -} - -.markdown-section hr, -.ebook-wrapper hr { - height: 1px !important; - background-color: #e7e9ee !important; -} From e725ed98ed20605ef29798e31147a1585635f481 Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 02:03:40 +0700 Subject: [PATCH 06/11] fix: standarize font --- content/style-custom.css | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/content/style-custom.css b/content/style-custom.css index 9593f98ae..16a5bb455 120000 --- a/content/style-custom.css +++ b/content/style-custom.css @@ -2,7 +2,7 @@ @import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap'); /* base font */ -body .book.font-family-1 { +body .book.font-family-1, .book-summary { font-family: Inter, Source Sans Pro, Helvetica Neue, Arial, sans-serif; } From f9c26c84b2b373705966ab7c25645055f15d9c04 Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 02:07:41 +0700 Subject: [PATCH 07/11] refactor: delete files --- content/SUMMARY.md | 160 --------------------------------------------- content/book.json | 38 ----------- 2 files changed, 198 deletions(-) delete mode 100644 content/SUMMARY.md delete mode 120000 content/book.json diff --git a/content/SUMMARY.md b/content/SUMMARY.md deleted file mode 100644 index 2f6d90ac3..000000000 --- a/content/SUMMARY.md +++ /dev/null @@ -1,160 +0,0 @@ -# Summary - -* [Dasar Pemrograman Golang](README.md) -* [Version Changelogs & Updates](CHANGELOG.md) -* [Download Ebook](download-ebook.md) -* [Author & Contributors](CONTRIBUTING.md) -* [Lisensi dan Distribusi Konten](DISTRIBUTION.md) - -
- -* Referensi Belajar Lainnya - * [📖 Dasar Pemrograman Python](https://dasarpemrogramanpython.novalagung.com/) - * [📖 Dasar Pemrograman Rust](https://dasarpemrogramanrust.novalagung.com/) - * [📖 How To](https://howto.novalagung.com) - * [▶️ Udemy Course: Belajar Docker & Kubernetes](https://www.udemy.com/course/praktis-belajar-docker-dan-kubernetes-untuk-pemula/) - -
- -* A. Pemrograman Go Dasar - * [A.1. Belajar Golang](1-berkenalan-dengan-golang.md) - * [A.2. Instalasi Golang (Stable & Unstable)](2-instalasi-golang.md) - * [A.3. Setup Go Modules](A-setup-go-project-dengan-go-modules.md) - * [A.4. Setup GOPATH dan Workspace](A-gopath-dan-workspace.md) - * [A.5. Instalasi Editor](A-instalasi-editor.md) - * [A.6. Go Command](A-go-command.md) - * [A.7. Program Pertama: Hello World](A-hello-world.md) - * [A.8. Komentar](A-komentar.md) - * [A.9. Variabel](A-variabel.md) - * [A.10. Tipe Data](A-tipe-data.md) - * [A.11. Konstanta](A-konstanta.md) - * [A.12. Operator](A-operator.md) - * [A.13. Seleksi Kondisi](A-seleksi-kondisi.md) - * [A.14. Perulangan](A-perulangan.md) - * [A.15. Array](A-array.md) - * [A.16. Slice](A-slice.md) - * [A.17. Map](A-map.md) - * [A.18. Fungsi](A-fungsi.md) - * [A.19. Fungsi Multiple Return](A-fungsi-multiple-return.md) - * [A.20. Fungsi Variadic](A-fungsi-variadic.md) - * [A.21. Fungsi Closure](A-fungsi-closure.md) - * [A.22. Fungsi Sebagai parameter](A-fungsi-sebagai-parameter.md) - * [A.23. Pointer](A-pointer.md) - * [A.24. Struct](A-struct.md) - * [A.25. Method](A-method.md) - * [A.26. Properti Public dan Private (Exported vs Unexported)](A-properti-public-dan-private.md) - * [A.27. Interface](A-interface.md) - * [A.28. Any / interface{} / Interface Kosong](A-interface-kosong.md) - * [A.29. Reflect](A-reflect.md) - * [A.30. Goroutine](A-goroutine.md) - * [A.31. Channel](A-channel.md) - * [A.32. Buffered Channel](A-buffered-channel.md) - * [A.33. Channel - Select](A-channel-select.md) - * [A.34. Channel - Range & Close](A-channel-range-close.md) - * [A.35. Channel - Timeout](A-channel-timeout.md) - * [A.36. Defer & Exit](A-defer-exit.md) - * [A.37. Error, Panic, & Recover](A-error-panic-recover.md) - * [A.38. Layout Format String](A-string-format.md) - * [A.39. Random](A-random.md) - * [A.40. Time, Parsing Time, & Format Time](A-time-parsing-format.md) - * [A.41. Timer, Ticker, & Scheduler](A-timer-ticker-scheduler.md) - * [A.42. Time Duration](A-time-duration.md) - * [A.43. Konversi Antar Tipe Data](A-data-type-conversion.md) - * [A.44. Fungsi String](A-strings.md) - * [A.45. Regexp](A-regex.md) - * [A.46. Encode - Decode Base64](A-encoding-base64.md) - * [A.47. Hash Sha1](A-hash-sha1.md) - * [A.48. Arguments & Flag](A-command-line-args-flag.md) - * [A.49. Exec](A-exec.md) - * [A.50. File](A-file.md) - * [A.51. Web Server](A-web-server.md) - * [A.52. URL Parsing](A-url-parsing.md) - * [A.53. JSON Data](A-json.md) - * [A.54. Web Service API Server](A-web-service-api.md) - * [A.55. Simple Client HTTP Request](A-client-http-request-simple.md) - * [A.56. SQL](A-sql.md) - * [A.57. NoSQL MongoDB](A-mongodb.md) - * [A.58. Unit Test](A-unit-test.md) - * [A.59. sync.WaitGroup](A-waitgroup.md) - * [A.60. sync.Mutex](A-mutex.md) - * [A.61. Go Vendoring](A-go-vendoring.md) - * [A.62. Concurrency Pattern: Pipeline](A-concurrency-pipeline.md) - * [A.63. Concurrency Pattern: Simplified Fan-in Fan-out Pipeline](A-simplified-fan-in-fan-out-pipeline.md) - * [A.64. Concurrency Pattern: Context Cancellation Pipeline](A-pipeline-context-cancellation.md) - * [A.65. Go Generics](A-golang-generics.md) - -
- -* B. Pemrograman Web Go Dasar - * [B.1. Golang Web App: Hello World](B-golang-web-hello-world.md) - * [B.2. Routing http.HandleFunc](B-routing-http-handlefunc.md) - * [B.3. Routing Static Assets](B-routing-static-assets.md) - * [B.4. Template: Render HTML Template](B-template-render-html.md) - * [B.5. Template: Render Partial HTML Template](B-template-render-partial-html.md) - * [B.6. Template: Actions & Variables](B-template-actions-variables.md) - * [B.7. Template: Functions](B-template-functions.md) - * [B.8. Template: Custom Functions](B-template-custom-functions.md) - * [B.9. Template: Render Specific HTML Template](B-render-specific-html-template.md) - * [B.10. Template: Render HTML String](B-render-html-string.md) - * [B.11. HTTP Method: POST & GET](B-http-method-basic.md) - * [B.12. Form Value](B-form-value.md) - * [B.13. Form Upload File](B-form-upload-file.md) - * [B.14. AJAX JSON Payload](B-ajax-json-payload.md) - * [B.15. AJAX JSON Response](B-ajax-json-response.md) - * [B.16. AJAX Multiple File Upload](B-ajax-multi-upload.md) - * [B.17. Download File](B-download-file.md) - * [B.18. HTTP Basic Auth](B-http-basic-auth.md) - * [B.19. Middleware http.Handler](B-middleware-using-http-handler.md) - * [B.20. Custom Multiplexer](B-custom-mux-multiplexer.md) - * [B.21. HTTP Cookie](B-cookie.md) - * [B.22. Simple Configuration](B-simple-configuration.md) - * [B.23. Server Handler HTTP Request Cancellation](B-server-handler-http-request-cancellation.md) - -
- -* C. Pemrograman Go Lanjut - * [C.1. Project Layout Structure](C-project-layout-structure.md) - * [C.2. Go Web Framework](C-golang-web-framework.md) - * [C.3. Echo Framework & Routing](C-echo-routing.md) - * [C.4. Parsing HTTP Request Payload (Echo)](C-parsing-http-request-payload-echo.md) - * [C.5. HTTP Request Payload Validation (Validator v9, Echo)](C-http-request-payload-validation.md) - * [C.6. HTTP Error Handling (Validator v9, Echo)](C-http-error-handling.md) - * [C.7. Template Rendering in Echo](C-echo-template-rendering.md) - * [C.8. Advanced Middleware & Logging (Logrus, Echo Logger)](C-advanced-middleware-and-logging.md) - * [C.9. CLI Flag Parser (Kingpin)](C-flag-parser.md) - * [C.10. Advanced Configuration: Viper](C-advanced-configuration-viper.md) - * [C.11. Best Practice Configuration: Environment Variable](C-best-practice-configuration-env-var.md) - * [C.12. Secure Cookie (Gorilla Securecookie)](C-securecookie.md) - * [C.13. Session (Gorilla Session)](C-session.md) - * [C.14. CORS & Preflight Request](C-cors-preflight-request.md) - * [C.15. CSRF](C-csrf.md) - * [C.16. Secure Middleware](C-secure-middleware.md) - * [C.17. HTTP Gzip Compression (gziphandler)](C-http-gzip-compression.md) - * [C.18. Send Mail (net/smtp, Gomail v2)](C-send-email.md) - * [C.19. Read & Write Excel XLSX File (Excelize)](C-read-write-excel-xlsx-file.md) - * [C.20. Write PDF File (gofpdf)](C-write-pdf-file.md) - * [C.21. Convert HTML to PDF (go-wkhtmltopdf)](C-convert-html-to-pdf.md) - * [C.22. Scraping & Parsing HTML (goquery)](C-scraping-parsing-html.md) - * [C.23. Parse & Generate XML (etree)](C-xml-parser.md) - * [C.24. HTTPS/TLS Web Server](C-https-tls.md) - * [C.25. HTTP/2 & HTTP/2 Server Push](C-http2-server-push.md) - * [C.26. Advanced Client HTTP Request](C-client-http-request-advanced.md) - * [C.27. Secure & Insecure Client HTTP Request](C-secure-insecure-client-http-request.md) - * [C.28. FTP](C-golang-ftp.md) - * [C.29. SSH & SFTP](C-golang-ssh-sftp.md) - * [C.30. Protobuf](C-golang-protobuf-implementation.md) - * [C.31. gRPC + Protobuf](C-golang-grpc-protobuf.md) - * [C.32. JSON Web Token (JWT)](C-golang-jwt.md) - * [C.33. LDAP Authentication](C-golang-ldap-authentication.md) - * [C.34. SSO SAML (Service Provider)](C-golang-sso-saml-sp.md) - * [C.35. Dockerize Aplikasi Golang](C-dockerize-golang.md) - * [C.36. Redis](C-golang-redis.md) - * [C.37. Singleflight](C-singleflight.md) - * [C.38. AWS S3](C-golang-aws-s3.md) - -
- -* D. Studi Kasus - * [D.1. Insert 1 Juta Data dari File CSV Ke Database Server, Menggunakan Teknik Worker Pool, Database Connection Pool, dan Mekanisme Failover](D-insert-1mil-csv-record-into-db-in-a-minute.md) - * [D.2. Google API Search Dengan Timeout](D-google-api-search.md) - * [D.3. Web Socket: Chatting App](D-golang-web-socket-chatting-app.md) diff --git a/content/book.json b/content/book.json deleted file mode 120000 index 6c415decb..000000000 --- a/content/book.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "plugins": [ - "-search", - "-lunr", - "docsearch-v3", - "disqus", - "meta", - "sitemap" - ], - "styles": { - "website": "style-custom.css" - }, - "pluginsConfig": { - "disqus": { - "shortName": "dasarpemrogramangolang" - }, - "meta": { - "data": [{ - "name": "google-site-verification", - "content": "UZnxS2Dk3fm2_Elms3a__56Q_oQ3sQ1h0SVXXlHSmbE" - }, { - "name": "og:image", - "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" - }, { - "name": "twitter:image", - "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" - }] - }, - "sitemap": { - "hostname": "https://dasarpemrogramangolang.novalagung.com/" - }, - "docsearch": { - "appId": "ZV0MXP90GF", - "apiKey": "f7431c709385fe300da4c2ef2093c43c", - "indexName": "dasarpemrogramangolang-novalagung" - } - } -} From 85669101b012f5b1f06e3023b862b3f5d6188e9c Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 02:09:18 +0700 Subject: [PATCH 08/11] fix: broken symlink --- content/book.json | 38 ++++++++++++++++++++++++++++++++++++++ content/style-custom.css | 2 +- 2 files changed, 39 insertions(+), 1 deletion(-) create mode 100644 content/book.json diff --git a/content/book.json b/content/book.json new file mode 100644 index 000000000..6c415decb --- /dev/null +++ b/content/book.json @@ -0,0 +1,38 @@ +{ + "plugins": [ + "-search", + "-lunr", + "docsearch-v3", + "disqus", + "meta", + "sitemap" + ], + "styles": { + "website": "style-custom.css" + }, + "pluginsConfig": { + "disqus": { + "shortName": "dasarpemrogramangolang" + }, + "meta": { + "data": [{ + "name": "google-site-verification", + "content": "UZnxS2Dk3fm2_Elms3a__56Q_oQ3sQ1h0SVXXlHSmbE" + }, { + "name": "og:image", + "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" + }, { + "name": "twitter:image", + "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" + }] + }, + "sitemap": { + "hostname": "https://dasarpemrogramangolang.novalagung.com/" + }, + "docsearch": { + "appId": "ZV0MXP90GF", + "apiKey": "f7431c709385fe300da4c2ef2093c43c", + "indexName": "dasarpemrogramangolang-novalagung" + } + } +} diff --git a/content/style-custom.css b/content/style-custom.css index 16a5bb455..3e32a3ebb 120000 --- a/content/style-custom.css +++ b/content/style-custom.css @@ -224,4 +224,4 @@ ins.adsbygoogle { .ebook-wrapper hr { height: 1px !important; background-color: #e7e9ee !important; -} +} \ No newline at end of file From dc3838456b2be9804fd0f028345ff7a55857c12e Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 02:10:41 +0700 Subject: [PATCH 09/11] fix --- content/book.json | 38 ------- content/style-custom.css | 227 --------------------------------------- 2 files changed, 265 deletions(-) delete mode 100644 content/book.json delete mode 120000 content/style-custom.css diff --git a/content/book.json b/content/book.json deleted file mode 100644 index 6c415decb..000000000 --- a/content/book.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "plugins": [ - "-search", - "-lunr", - "docsearch-v3", - "disqus", - "meta", - "sitemap" - ], - "styles": { - "website": "style-custom.css" - }, - "pluginsConfig": { - "disqus": { - "shortName": "dasarpemrogramangolang" - }, - "meta": { - "data": [{ - "name": "google-site-verification", - "content": "UZnxS2Dk3fm2_Elms3a__56Q_oQ3sQ1h0SVXXlHSmbE" - }, { - "name": "og:image", - "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" - }, { - "name": "twitter:image", - "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" - }] - }, - "sitemap": { - "hostname": "https://dasarpemrogramangolang.novalagung.com/" - }, - "docsearch": { - "appId": "ZV0MXP90GF", - "apiKey": "f7431c709385fe300da4c2ef2093c43c", - "indexName": "dasarpemrogramangolang-novalagung" - } - } -} diff --git a/content/style-custom.css b/content/style-custom.css deleted file mode 120000 index 3e32a3ebb..000000000 --- a/content/style-custom.css +++ /dev/null @@ -1,227 +0,0 @@ -@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700&display=swap'); -@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap'); - -/* base font */ -body .book.font-family-1, .book-summary { - font-family: Inter, Source Sans Pro, Helvetica Neue, Arial, sans-serif; -} - -/* unmark to disable search bar, replace it with the book title instead */ -/* .book-summary #book-search-input { - position: relative; - opacity: 0; - overflow: hidden; - height: 0px; - padding: 0; -} */ -/* .book-summary #book-search-input:after { - content: "Dasar Pemrograman Golang"; - padding-top: 17px; - padding-left: 15px; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: #ffffff; - z-index: 1; - position: absolute; -} */ - -.dropdown.font-settings { - display: none; -} - -.page-inner { - max-width: fit-content; - padding: 20px 100px 40px 100px; -} - -/* disable word wrap at left sidebar */ -.book-summary ul.summary li a, .book-summary ul.summary li span { - text-overflow: initial; - white-space: normal; - line-height: 1.4em; - padding: 9px 15px; -} - -/* sidebar background */ -.book-summary { - background-color: #ffffff; -} - -/* sidebar ads animation */ -/* .book-summary .summary > li:nth-child(8) a { - color: white; - margin-left: 5px; - background-color: #ec882f; - -webkit-animation: block-promo-bg-animate 3s infinite; - -moz-animation: block-promo-bg-animate 3s infinite; - -o-animation: block-promo-bg-animate 3s infinite; - -ms-animation: block-promo-bg-animate 3s infinite; - animation: block-promo-bg-animate 3s infinite; -} */ -@keyframes block-promo-bg-animate { - 0% { background-color: #008cff; } - 50% { background-color: #004986; } - 100% { background-color: #008cff; } -} - -/* sidebar scroll beautification */ -.book-summary::-webkit-scrollbar { - width: 15px; -} -.book-summary::-webkit-scrollbar-thumb { - background: transparent; - border-radius: 4px; -} -.book-summary:hover::-webkit-scrollbar-thumb { - background: hsla(0,0%,53%,.4); -} -.book-summary:hover::-webkit-scrollbar-track { - background: hsla(0,0%,53%,.1); -} - -/* sidebar active link */ -.book-summary li.active>a:before { - content: " "; - position: absolute; - right: 0; - top: 0; - bottom: 0; - width: 2px; - background-color: #008cff; -} -.book-summary li.active>a { - font-weight: bold; -} - -/* make the sidebar wider, and adjust the content to match it */ -.book-summary { - left: -470px; - width: 470px; -} -@media (min-width: 600px) { - .book.with-summary .book-body { - left: 470px; - } -} - -/* hide the header because each post already has it's h1 */ -/* also hide the unused navigation buttons (except font settings) */ -.book-header > h1, -.book-header > .pull-right:not(.font-settings) { - display: none; -} - -/* hide the "published by gitbook" footer */ -.gitbook-link { - visibility: hidden; - pointer-events: none; - height: 20px; -} - -/* source code link for each content */ -.source-code-link { - border: 1px solid #c9ffce; - background-color: #e7ffe9; - padding: 10px 10px; - text-align: center; -} -.source-code-link .source-code-link-message { - font-weight: bold; -} - -/* google ads */ -ins.adsbygoogle { - margin-bottom: 1em; -} - -/* disquss block */ -#disqus_thread { - margin: 40px auto 5px; - max-width: 800px; -} -#disqus_thread + #disqus_thread { - display: none; -} -#disqus_thread:before { - background-color: #e7e9ee; - content: " "; - display: block; - height: 1px; - margin-left: -15px; - margin-right: -15px; -} -#disqus_thread > iframe:nth-child(1) { - padding-top: 30px; -} -#disqus_thread > iframe[src*=ads] { - display: none; -} - -/* bottom news banner and body adjustment */ -.book-body .body-inner { - padding-bottom: 100px; -} -.book-news { - display: block; - padding: 18px 100px; - text-align: center; - background-color: #0099ea; - color: white; - position: fixed; - bottom: 0; - right: 17px; - left: 470px; - z-index: 1000; -} - -/* banner */ -.banner-container { - display: none; - position: absolute; - top: 0; - left: 0; - right: 0; - bottom: 0; - background-color: rgba(0, 0, 0, 0.88); - z-index: 99999; - backdrop-filter: blur(2px); -} -.banner-container > div { - position: relative; - height: 100%; - width: 100%; -} -.banner-container a { - width: 800px; - height: 494px; - position: absolute; - top: 50%; - margin-top: -247px; - z-index: 99999; - left: 50%; - margin-left: -400px; -} -.banner-container a img { - width: 100%; - height: 100%; - object-fit: cover; -} -@media (max-width: 800px) { - .banner-container a { - width: auto; - left: 0; - margin-left: 0; - right: 0; - margin-right: 0; - height: auto; - margin-top: -100px; - } -} - -.markdown-section hr, -.ebook-wrapper hr { - height: 1px !important; - background-color: #e7e9ee !important; -} \ No newline at end of file From d18186bfaf78b6171c2c2b9f6b26de4f9463582c Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 02:12:00 +0700 Subject: [PATCH 10/11] refactor: stylesheets --- content/book.json | 38 +++++++ content/style-custom.css | 227 +++++++++++++++++++++++++++++++++++++++ 2 files changed, 265 insertions(+) create mode 100644 content/book.json create mode 100644 content/style-custom.css diff --git a/content/book.json b/content/book.json new file mode 100644 index 000000000..6c415decb --- /dev/null +++ b/content/book.json @@ -0,0 +1,38 @@ +{ + "plugins": [ + "-search", + "-lunr", + "docsearch-v3", + "disqus", + "meta", + "sitemap" + ], + "styles": { + "website": "style-custom.css" + }, + "pluginsConfig": { + "disqus": { + "shortName": "dasarpemrogramangolang" + }, + "meta": { + "data": [{ + "name": "google-site-verification", + "content": "UZnxS2Dk3fm2_Elms3a__56Q_oQ3sQ1h0SVXXlHSmbE" + }, { + "name": "og:image", + "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" + }, { + "name": "twitter:image", + "content": "https://dasarpemrogramangolang.novalagung.com/images/cover_fb_share.jpg" + }] + }, + "sitemap": { + "hostname": "https://dasarpemrogramangolang.novalagung.com/" + }, + "docsearch": { + "appId": "ZV0MXP90GF", + "apiKey": "f7431c709385fe300da4c2ef2093c43c", + "indexName": "dasarpemrogramangolang-novalagung" + } + } +} diff --git a/content/style-custom.css b/content/style-custom.css new file mode 100644 index 000000000..16a5bb455 --- /dev/null +++ b/content/style-custom.css @@ -0,0 +1,227 @@ +@import url('https://fonts.googleapis.com/css?family=Source+Sans+Pro:400,400i,700&display=swap'); +@import url('https://fonts.googleapis.com/css2?family=Inter:ital,opsz,wght@0,14..32,100..900;1,14..32,100..900&display=swap'); + +/* base font */ +body .book.font-family-1, .book-summary { + font-family: Inter, Source Sans Pro, Helvetica Neue, Arial, sans-serif; +} + +/* unmark to disable search bar, replace it with the book title instead */ +/* .book-summary #book-search-input { + position: relative; + opacity: 0; + overflow: hidden; + height: 0px; + padding: 0; +} */ +/* .book-summary #book-search-input:after { + content: "Dasar Pemrograman Golang"; + padding-top: 17px; + padding-left: 15px; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: #ffffff; + z-index: 1; + position: absolute; +} */ + +.dropdown.font-settings { + display: none; +} + +.page-inner { + max-width: fit-content; + padding: 20px 100px 40px 100px; +} + +/* disable word wrap at left sidebar */ +.book-summary ul.summary li a, .book-summary ul.summary li span { + text-overflow: initial; + white-space: normal; + line-height: 1.4em; + padding: 9px 15px; +} + +/* sidebar background */ +.book-summary { + background-color: #ffffff; +} + +/* sidebar ads animation */ +/* .book-summary .summary > li:nth-child(8) a { + color: white; + margin-left: 5px; + background-color: #ec882f; + -webkit-animation: block-promo-bg-animate 3s infinite; + -moz-animation: block-promo-bg-animate 3s infinite; + -o-animation: block-promo-bg-animate 3s infinite; + -ms-animation: block-promo-bg-animate 3s infinite; + animation: block-promo-bg-animate 3s infinite; +} */ +@keyframes block-promo-bg-animate { + 0% { background-color: #008cff; } + 50% { background-color: #004986; } + 100% { background-color: #008cff; } +} + +/* sidebar scroll beautification */ +.book-summary::-webkit-scrollbar { + width: 15px; +} +.book-summary::-webkit-scrollbar-thumb { + background: transparent; + border-radius: 4px; +} +.book-summary:hover::-webkit-scrollbar-thumb { + background: hsla(0,0%,53%,.4); +} +.book-summary:hover::-webkit-scrollbar-track { + background: hsla(0,0%,53%,.1); +} + +/* sidebar active link */ +.book-summary li.active>a:before { + content: " "; + position: absolute; + right: 0; + top: 0; + bottom: 0; + width: 2px; + background-color: #008cff; +} +.book-summary li.active>a { + font-weight: bold; +} + +/* make the sidebar wider, and adjust the content to match it */ +.book-summary { + left: -470px; + width: 470px; +} +@media (min-width: 600px) { + .book.with-summary .book-body { + left: 470px; + } +} + +/* hide the header because each post already has it's h1 */ +/* also hide the unused navigation buttons (except font settings) */ +.book-header > h1, +.book-header > .pull-right:not(.font-settings) { + display: none; +} + +/* hide the "published by gitbook" footer */ +.gitbook-link { + visibility: hidden; + pointer-events: none; + height: 20px; +} + +/* source code link for each content */ +.source-code-link { + border: 1px solid #c9ffce; + background-color: #e7ffe9; + padding: 10px 10px; + text-align: center; +} +.source-code-link .source-code-link-message { + font-weight: bold; +} + +/* google ads */ +ins.adsbygoogle { + margin-bottom: 1em; +} + +/* disquss block */ +#disqus_thread { + margin: 40px auto 5px; + max-width: 800px; +} +#disqus_thread + #disqus_thread { + display: none; +} +#disqus_thread:before { + background-color: #e7e9ee; + content: " "; + display: block; + height: 1px; + margin-left: -15px; + margin-right: -15px; +} +#disqus_thread > iframe:nth-child(1) { + padding-top: 30px; +} +#disqus_thread > iframe[src*=ads] { + display: none; +} + +/* bottom news banner and body adjustment */ +.book-body .body-inner { + padding-bottom: 100px; +} +.book-news { + display: block; + padding: 18px 100px; + text-align: center; + background-color: #0099ea; + color: white; + position: fixed; + bottom: 0; + right: 17px; + left: 470px; + z-index: 1000; +} + +/* banner */ +.banner-container { + display: none; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + background-color: rgba(0, 0, 0, 0.88); + z-index: 99999; + backdrop-filter: blur(2px); +} +.banner-container > div { + position: relative; + height: 100%; + width: 100%; +} +.banner-container a { + width: 800px; + height: 494px; + position: absolute; + top: 50%; + margin-top: -247px; + z-index: 99999; + left: 50%; + margin-left: -400px; +} +.banner-container a img { + width: 100%; + height: 100%; + object-fit: cover; +} +@media (max-width: 800px) { + .banner-container a { + width: auto; + left: 0; + margin-left: 0; + right: 0; + margin-right: 0; + height: auto; + margin-top: -100px; + } +} + +.markdown-section hr, +.ebook-wrapper hr { + height: 1px !important; + background-color: #e7e9ee !important; +} From 9ae9047cfe2309e79cafb302c01ebfe1f2468dd7 Mon Sep 17 00:00:00 2001 From: novalagung Date: Fri, 15 Nov 2024 02:14:30 +0700 Subject: [PATCH 11/11] chore: bump version --- content/CHANGELOG.md | 7 +++++++ content/README.md | 8 ++++---- content/download-ebook.md | 6 +++--- 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/content/CHANGELOG.md b/content/CHANGELOG.md index 550b392a2..7919e71ab 100644 --- a/content/CHANGELOG.md +++ b/content/CHANGELOG.md @@ -1,5 +1,12 @@ # Version Changelogs & Updates +## 📝 Release v4.0.20241115 (2024-11-15) + +#### ◉ General update + +- Code structure updates +- UI updates + ## 📝 Release v4.0.20240830 (2024-08-30) #### ◉ Chapter update diff --git a/content/README.md b/content/README.md index 3159032f8..f9059d1fc 100644 --- a/content/README.md +++ b/content/README.md @@ -21,15 +21,15 @@ Ada total sekitar 120 chapter yang dibahas dalam website/ebook ini. Kumpu -Versi e-book: **v4.0.20240830**, dan versi Go **1.22**. +Versi e-book: **v4.0.20241115**, dan versi Go **1.22**. ## Download File E-book (pdf, epub, mobi) Versi ebook bisa di-download dalam bentuk file via link berikut: -- [PDF](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.pdf?v=v4.0.20240830) -- [Epub](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.epub?v=v4.0.20240830) -- [Mobi](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.mobi?v=v4.0.20240830) +- [PDF](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.pdf?v=v4.0.20241115) +- [Epub](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.epub?v=v4.0.20241115) +- [Mobi](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.mobi?v=v4.0.20241115) Untuk mendapatkan konten buku yang paling update, silakan baca langsung versi web secara online atau download ulang e-book versi terbaru. diff --git a/content/download-ebook.md b/content/download-ebook.md index 52408eafb..d7267c0f3 100644 --- a/content/download-ebook.md +++ b/content/download-ebook.md @@ -2,6 +2,6 @@ Ebook Dasar Pemrograman Golang bisa di-download dalam bentuk file, silakan gunakan link berikut: -- [PDF](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.pdf?v=v4.0.20240830) -- [Epub](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.epub?v=v4.0.20240830) -- [Mobi](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.mobi?v=v4.0.20240830) +- [PDF](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.pdf?v=v4.0.20241115) +- [Epub](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.epub?v=v4.0.20241115) +- [Mobi](https://github.com/novalagung/dasarpemrogramangolang/raw/ebooks/dasarpemrogramangolang.mobi?v=v4.0.20241115)