diff --git a/.DS_Store b/.DS_Store deleted file mode 100644 index f8bcbc0..0000000 Binary files a/.DS_Store and /dev/null differ diff --git a/.gitignore b/.gitignore index a1338d6..ca21b69 100644 --- a/.gitignore +++ b/.gitignore @@ -1,14 +1,74 @@ -# Binaries for programs and plugins -*.exe -*.dll -*.so -*.dylib -# Test binary, build with `go test -c` -*.test +# Created by https://www.toptal.com/developers/gitignore/api/linux,macos,windows +# Edit at https://www.toptal.com/developers/gitignore?templates=linux,macos,windows -# Output of the go coverage tool, specifically when used with LiteIDE -*.out +### Linux ### +*~ -# Project-local glide cache, RE: https://github.com/Masterminds/glide/issues/736 -.glide/ +# temporary files which can be created if a process still has a handle open of a deleted file +.fuse_hidden* + +# KDE directory preferences +.directory + +# Linux trash folder which might appear on any partition or disk +.Trash-* + +# .nfs files are created when an open file is removed but is still being accessed +.nfs* + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### Windows ### +# Windows thumbnail cache files +Thumbs.db +Thumbs.db:encryptable +ehthumbs.db +ehthumbs_vista.db + +# Dump file +*.stackdump + +# Folder config file +[Dd]esktop.ini + +# Recycle Bin used on file shares +$RECYCLE.BIN/ + +# Windows Installer files +*.cab +*.msi +*.msix +*.msm +*.msp + +# Windows shortcuts +*.lnk + +# End of https://www.toptal.com/developers/gitignore/api/linux,macos,windows diff --git a/README.md b/README.md index d8bc73b..e800fd7 100644 --- a/README.md +++ b/README.md @@ -57,12 +57,12 @@ access_token = "" ``` ## Features - - [x] Pagination - - [x] Search - - [x] Charts - - [x] Maps - - [x] Diagrams - - [x] Analytics - - [x] Comments - - [x] Categories - - [ ] Social Links +- [x] Pagination +- [x] Search +- [x] Charts +- [x] Maps +- [x] Diagrams +- [x] Analytics +- [x] Comments +- [x] Categories +- [x] Social Links diff --git a/config.toml b/config.toml index 779da2f..0361357 100644 --- a/config.toml +++ b/config.toml @@ -10,7 +10,7 @@ taxonomies = [ { name = "tags", fees = true, paginate_by = 10 }, ] languages = [] -compile_sass = false +compile_sass = true build_search_index = true ignored_content = [] extra_syntaxes = [] diff --git a/content/.DS_Store b/content/.DS_Store deleted file mode 100644 index 678f570..0000000 Binary files a/content/.DS_Store and /dev/null differ diff --git a/content/posts/.DS_Store b/content/posts/.DS_Store deleted file mode 100644 index bc655b0..0000000 Binary files a/content/posts/.DS_Store and /dev/null differ diff --git a/content/posts/extended-shortcodes.md b/content/posts/extended-shortcodes.md index 598ca4a..bb3b2db 100644 --- a/content/posts/extended-shortcodes.md +++ b/content/posts/extended-shortcodes.md @@ -9,30 +9,13 @@ tags = ["theme", "zola"] [extra] toc = true -comments = false +comments = true +++ DeepThought theme provides multiple shortcodes on top of built-in ones in Zola. -# Quote - -To put a quote in your post use the below snippet -**Code** - -```markdown -{%/* quote(author="Winston Churchill") */%} -Success is not final, failure is not fatal: it is the courage to continue that counts. -{%/* end */%} -``` - -**Output** - -{% quote(author="Winston Churchill") %} -Success is not final, failure is not fatal: it is the courage to continue that counts. -{% end %} - # Mermaid [mermaid](https://mermaidjs.github.io/) is a library helping you to generate diagram and flowcharts from text, in a similar manner as Markdown. @@ -40,6 +23,7 @@ Success is not final, failure is not fatal: it is the courage to continue that c ## Flowchart To put a flowchart in your post use below snippet + **Code** ``` @@ -64,6 +48,7 @@ C-->D; ## Sequence Diagram To put a sequence diagram in your post use below snippet + **Code** ``` @@ -100,6 +85,7 @@ Bob-->>John: Jolly good! ## Gantt diagram To put a gantt diagram in your post use below snippet + **Code** ``` @@ -132,8 +118,9 @@ Future task : des3, after des2, 5d Future task2 : des4, after des3, 5d {% end %} -## Class diagram - exclamation experimental +## Class diagram - experimental To put a class diagram in your post use below snippet + **Code** ``` @@ -173,8 +160,9 @@ Class01 : int gorilla Class08 <--> C2: Cool label {% end %} -## Git graph - exclamation experimental +## Git graph - experimental To put a git graph in your post use below snippet + **Code** ``` @@ -218,7 +206,7 @@ commit merge newbranch {% end %} -## Entity Relationship Diagram - exclamation experimental +## Entity Relationship Diagram - experimental To put an ER diagram in your post use below snippet **Code** @@ -289,17 +277,33 @@ Sit down: 5: Me ```markdown {%/* chart() */%} { -"type": "bar", -"data": { -"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], -"datasets": [{ -"label": "# of Votes", -"data": [12, 19, 3, 5, 8, 3], -"backgroundColor": ["rgba(255, 99, 132, 0.2)", "rgba(54, 162, 235, 0.2)", "rgba(255, 206, 86, 0.2)", "rgba(75, 192, 192, 0.2)", "rgba(153, 102, 255, 0.2)", "rgba(255, 159, 64, 0.2)"], -"borderColor": ["rgba(255, 99, 132, 1)", "rgba(54, 162, 235, 1)", "rgba(255, 206, 86, 1)", "rgba(75, 192, 192, 1)", "rgba(153, 102, 255, 1)", "rgba(255, 159, 64, 1)"], -"borderWidth": 1 -}] -} + "type": "bar", + "data": { + "labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], + "datasets": [ + { + "label": "# of Votes", + "data": [12, 19, 3, 5, 8, 3], + "backgroundColor": [ + "rgba(255, 99, 132, 0.2)", + "rgba(54, 162, 235, 0.2)", + "rgba(255, 206, 86, 0.2)", + "rgba(75, 192, 192, 0.2)", + "rgba(153, 102, 255, 0.2)", + "rgba(255, 159, 64, 0.2)" + ], + "borderColor": [ + "rgba(255, 99, 132, 1)", + "rgba(54, 162, 235, 1)", + "rgba(255, 206, 86, 1)", + "rgba(75, 192, 192, 1)", + "rgba(153, 102, 255, 1)", + "rgba(255, 159, 64, 1)" + ], + "borderWidth": 1 + } + ] + } } {%/* end */%} ``` @@ -307,16 +311,32 @@ Sit down: 5: Me **Output** {% chart() %} { -"type": "bar", -"data": { -"labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], -"datasets": [{ -"label": "# of Votes", -"data": [12, 19, 3, 5, 8, 3], -"backgroundColor": ["rgba(255, 99, 132, 0.2)", "rgba(54, 162, 235, 0.2)", "rgba(255, 206, 86, 0.2)", "rgba(75, 192, 192, 0.2)", "rgba(153, 102, 255, 0.2)", "rgba(255, 159, 64, 0.2)"], -"borderColor": ["rgba(255, 99, 132, 1)", "rgba(54, 162, 235, 1)", "rgba(255, 206, 86, 1)", "rgba(75, 192, 192, 1)", "rgba(153, 102, 255, 1)", "rgba(255, 159, 64, 1)"], -"borderWidth": 1 -}] -} + "type": "bar", + "data": { + "labels": ["Red", "Blue", "Yellow", "Green", "Purple", "Orange"], + "datasets": [ + { + "label": "# of Votes", + "data": [12, 19, 3, 5, 8, 3], + "backgroundColor": [ + "rgba(255, 99, 132, 0.2)", + "rgba(54, 162, 235, 0.2)", + "rgba(255, 206, 86, 0.2)", + "rgba(75, 192, 192, 0.2)", + "rgba(153, 102, 255, 0.2)", + "rgba(255, 159, 64, 0.2)" + ], + "borderColor": [ + "rgba(255, 99, 132, 1)", + "rgba(54, 162, 235, 1)", + "rgba(255, 206, 86, 1)", + "rgba(75, 192, 192, 1)", + "rgba(153, 102, 255, 1)", + "rgba(255, 159, 64, 1)" + ], + "borderWidth": 1 + } + ] + } } {% end %} diff --git a/content/posts/welcome-to-deep-thought.md b/content/posts/welcome-to-deep-thought.md index bd65a41..ac26738 100644 --- a/content/posts/welcome-to-deep-thought.md +++ b/content/posts/welcome-to-deep-thought.md @@ -83,10 +83,6 @@ We have them! --- -## BlockQuotes -{% quote(author="Noam Chomsky") %}Language is a process of free creation; its laws and principles are fixed, but the manner in which the principles of generation are used is free and infinitely varied. Even the interpretation and use of words involves a process of free creation. -{% end %} - ## Youtube with `youtube(id="the_id_here")` diff --git a/sass/site.scss b/sass/site.scss new file mode 100644 index 0000000..735e36c --- /dev/null +++ b/sass/site.scss @@ -0,0 +1,43 @@ +@import "https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;515;600;700&display=swap"; + +$font-stack: "Fira Code", monospace; + +$link: #363636; +$link-hover: #2d96bd; + +$read-more: #2d96bd; +$read-more-hover: #ef3982; + +body { + font: 100% $font-stack; + display: flex; + flex-direction: column; + min-height: 100vh; +} +main { + flex: 1; +} +.center { + display: flex; + justify-content: center; + align-items: center; +} +.link { + color: $link; + &:hover { + color: $link-hover; + } +} +.read-more { + color: $read-more; + &:hover { + color: $read-more-hover; + } +} + +$breakpoint-mobile: 768px; +@media (max-width: $breakpoint-mobile) { + body { + font: 85% $font-stack; + } +} diff --git a/static/.DS_Store b/static/.DS_Store deleted file mode 100644 index 2388b96..0000000 Binary files a/static/.DS_Store and /dev/null differ diff --git a/static/css/style.min.css b/static/css/style.min.css deleted file mode 100644 index 48b0f38..0000000 --- a/static/css/style.min.css +++ /dev/null @@ -1 +0,0 @@ -@import "https://fonts.googleapis.com/css2?family=Fira+Code:wght@300;400;500;515;600;700&display=swap";body{font:100% "Fira Code",monospace;display:flex;flex-direction:column;min-height:100vh}main{flex:1}.center{display:flex;justify-content:center;align-items:center}.link{color:#363636}.link:hover{color:#2d96bd}.read-more{color:#2d96bd}.read-more:hover{color:#ef3982} diff --git a/static/icons/.DS_Store b/static/icons/.DS_Store deleted file mode 100644 index a9ae806..0000000 Binary files a/static/icons/.DS_Store and /dev/null differ diff --git a/static/images/.DS_Store b/static/images/.DS_Store deleted file mode 100644 index bb71462..0000000 Binary files a/static/images/.DS_Store and /dev/null differ diff --git a/static/js/search.js b/static/js/site.js similarity index 87% rename from static/js/search.js rename to static/js/site.js index 1bbffaf..92b558a 100644 --- a/static/js/search.js +++ b/static/js/site.js @@ -1,3 +1,22 @@ +document.addEventListener("DOMContentLoaded", () => { + const $navbarBurgers = Array.prototype.slice.call( + document.querySelectorAll(".navbar-burger"), + 0 + ); + + if ($navbarBurgers.length > 0) { + $navbarBurgers.forEach((el) => { + el.addEventListener("click", () => { + const target = el.dataset.target; + const $target = document.getElementById(target); + + el.classList.toggle("is-active"); + $target.classList.toggle("is-active"); + }); + }); + } +}); + function debounce(func, wait) { var timeout; @@ -24,7 +43,7 @@ function makeTeaser(body, terms) { }); var termFound = false; var index = 0; - var weighted = []; // contains elements of ["word", weight, index_in_document] + var weighted = []; // contains elements of ['word', weight, index_in_document] // split in sentences, then words var sentences = body.toLowerCase().split(". "); @@ -113,13 +132,13 @@ function makeTeaser(body, terms) { function formatSearchResultItem(item, terms) { return ( - `
` + - `

` + - `${item.doc.title}` + + `
` + + `

` + + `${item.doc.title}` + `

` + - `
` + + `
` + `${makeTeaser(item.doc.body, terms)}` + - `` + + `` + `Read More` + `` + `
` + @@ -203,7 +222,7 @@ document modal.classList.remove("is-active"); html.classList.remove("is-clipped"); }); - + document.querySelector(".delete").addEventListener("click", function (e) { e.preventDefault(); modal.classList.remove("is-active"); diff --git a/templates/404.html b/templates/404.html index 5000544..37ff5d8 100644 --- a/templates/404.html +++ b/templates/404.html @@ -1,28 +1,28 @@ -{% extends "base.html" %} +{% extends 'base.html' %} {% block main %} -
-
-
-
-
-
- +
+
+
+
+
+
+
-
-

+
+

HTTP 404

-

+

It seems you are looking for something that I don't have.

-

+

{{ macros:: social_links( social_config=config.extra.social) }}


-

- +

+ Home

diff --git a/templates/base.html b/templates/base.html index f4a6064..1c7d92e 100644 --- a/templates/base.html +++ b/templates/base.html @@ -1,56 +1,65 @@ -{% import "macros.html" as macros %} +{% import 'macros.html' as macros %} - - + + - - - - - - - + + + + + + + - - + + {% block title %}{{ config.title }}{% endblock title %} - {{ macros::google_analytics(gtag=config.extra.analytics.google) }} + {% if config.extra.analytics.google %} + + + {% endif %} - + {% block nav %} -