diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 0000000..60c5efb --- /dev/null +++ b/.gitmodules @@ -0,0 +1,6 @@ +[submodule "themes/JuiceBar"] + path = themes/JuiceBar + url = https://github.com/hotjuicew/hugo-JuiceBar.git +[submodule "themes/ananke"] + path = themes/ananke + url = https://github.com/theNewDynamic/gohugo-theme-ananke diff --git a/archetypes/default.md b/archetypes/default.md new file mode 100644 index 0000000..6714d08 --- /dev/null +++ b/archetypes/default.md @@ -0,0 +1,6 @@ +--- +title: "{{ replace .Name "-" " " | title }}" +date: {{ .Date }} +categories: [] +draft: true +--- diff --git a/assets/scss/_about.scss b/assets/scss/_about.scss new file mode 100644 index 0000000..1983cb1 --- /dev/null +++ b/assets/scss/_about.scss @@ -0,0 +1,8 @@ +.about-content { + font-size: 1rem; + margin: 2rem 0; + @media (max-width: 768px) { + font-size: 16px; + } +} + diff --git a/assets/scss/_archive.scss b/assets/scss/_archive.scss new file mode 100644 index 0000000..7964541 --- /dev/null +++ b/assets/scss/_archive.scss @@ -0,0 +1,13 @@ +@import "variables"; +.archive { + margin: 0; + padding: 0; + list-style: none; + line-height: 1.3em; + text-align: left; + color: #111; +} + +.dark-mode .archive { + color: $dark-font; +} \ No newline at end of file diff --git a/assets/scss/_footer.scss b/assets/scss/_footer.scss new file mode 100644 index 0000000..8383651 --- /dev/null +++ b/assets/scss/_footer.scss @@ -0,0 +1,9 @@ +@import "variables"; +.footer { + padding: 18px; + font-size: $font-size-content; +} + +.dark-mode .footer { + background-color: $dark-navbar; +} \ No newline at end of file diff --git a/assets/scss/_header.scss b/assets/scss/_header.scss new file mode 100644 index 0000000..ce8fcd6 --- /dev/null +++ b/assets/scss/_header.scss @@ -0,0 +1,147 @@ +@import "variables"; + +.navbar { + height: 6vmin; + @media (max-width: 768px) { + height: 6vh; + } + + .navbar-brand { + padding: 0px 15px; + @media (max-width: 768px) { + padding: 0; + height: 6vh; + } + + .logo h1 { + font-size: 1.5rem; + } + + /* Let the sun icon not be next to the top*/ + .theme-toggle { + margin-top: 5px; + } + } + + .navbar-menu { + background-color: $main-light; + font-size: 1.1rem; + + } + .dark-mode .navbar-menu { + background-color: $dark-navbar; + color: $dark-font; + } + + .search { + align-items: center; + display: flex; + height: 100%; + @media (max-width: 768px) { + display: none; + } + } + + #fastSearch { + height: 60%; + display: flex; + flex-direction: column; + visibility: hidden; + } + + #searchInput { + height: 100%; + flex-shrink: 0 + } + + #searchResults { + position: relative; + margin-top: 10px; + display: inline-block; + border-radius: 5px; + + li { + background-color: $main-light; + padding-left: 1rem; + border-bottom: 1px solid $main-black; + border-left: 1px solid $main-black; + border-right: 1px solid $main-black; + + &:hover { + background-color: $main-grey; + } + + &:first-child { + border-top: 1px solid $main-black; + border-top-left-radius: 5px; + border-top-right-radius: 5px; + } + + &:last-child { + border-bottom-left-radius: 5px; + border-bottom-right-radius: 5px; + } + + a .title { + text-decoration: none; + /*display: block;*/ + font-size: $font-size-content; + padding-left: 0.5rem; + font-weight: normal; + } + } + } +} + +.navbar-item { + @media (max-width: 768px) { + text-align: center; + } +} +.dark-mode { + .navbar.is-light { + background-color: $dark-navbar; + color: $dark-font; + .navbar-menu{ + background-color: $dark-navbar; + color: $dark-font; + } + .navbar-brand > .navbar-item { + color: $dark-font; + background-color: $dark-navbar; + } + + .navbar-start > .navbar-item { + background-color: $dark-navbar; + color: $dark-font; + } + } + +} +.dark-mode #searchResults li { + background-color: $dark-navbar; + border-bottom: 1px solid $dark-font; + border-left: 1px solid $dark-font; + border-right: 1px solid $dark-font; +} + +.dark-mode #searchResults li:first-child { + border-top: 1px solid $dark-font; +} + +.dark-mode #searchResults li:hover { + color: $dark-font; + background-color: $dark-background; +} + +.dark-mode .navbar.is-light .navbar-burger { + color: $dark-font; +} +.dark-mode .navbar.is-light .navbar-brand > a.navbar-item:hover, .dark-mode .navbar.is-light .navbar-start > a.navbar-item:hover { + background-color: $dark-navbar; + color: $dark-font; +} + + + + diff --git a/assets/scss/_index.scss b/assets/scss/_index.scss new file mode 100644 index 0000000..48b7d16 --- /dev/null +++ b/assets/scss/_index.scss @@ -0,0 +1,94 @@ +@import "variables"; + +#home-box { + flex-direction: column; + justify-content: center; + + #home-title { + text-align: center; + } + + .description { + text-align: center; + font-size: $font-size-content; + } + + .typewriter-effect { + display: flex; + justify-content: center; + + .text { + max-width: 0; + text-transform: capitalize; + animation: typing 3s steps(var(--characters)) infinite; + white-space: nowrap; + overflow: hidden; + } + + &:after { + content: " |"; + animation: blink 1s infinite; + animation-timing-function: step-end; + } + } + + //Override bulma's style + .avatar-container { + text-align: center; + + .author-avatar { + object-fit: cover; + border-radius: 50%; + width: 10rem; + height: 10rem; + text-align: center; + margin: 2rem auto 0 auto; + } + } + + .social-icon { + text-align: center; + margin-bottom: 2rem; + + span { + position: relative; + } + + svg { + height: 100%; + } + } + +} + +/*Typewriter effect*/ +@keyframes typing { + 75%, + 100% { + max-width: calc(var(--characters) * 1ch); + } +} + +@keyframes blink { + 0%, + 75%, + 100% { + opacity: 1; + } + 25% { + opacity: 0; + } +} + +/* Rewrite some of bulma's styles */ +.navbar.is-light .navbar-end .navbar-link.is-active, +.navbar.is-light .navbar-end .navbar-link:hover, +navbar .navbar.is-light .navbar-end > a.navbar-item.is-active, +.navbar.is-light .navbar-end > a.navbar-item:hover, +.navbar.is-light .navbar-start .navbar-link.is-active, +.navbar.is-light .navbar-start .navbar-link:hover, +.navbar.is-light .navbar-start > a.navbar-item.is-active, +.navbar.is-light .navbar-start > a.navbar-item:hover, .navbar.is-light .navbar-brand > a.navbar-item:hover { + background-color: $main-light; + color: $main-black; +} \ No newline at end of file diff --git a/assets/scss/_main.scss b/assets/scss/_main.scss new file mode 100644 index 0000000..45632d4 --- /dev/null +++ b/assets/scss/_main.scss @@ -0,0 +1,289 @@ +@import "_variables"; +/* sticky footer */ +body { + display: flex; + flex-direction: column; + min-height: 100vh; + font-family: Ubuntu, Roboto, 'Open Sans', 'Microsoft YaHei', sans-serif; + font-size: $font-size-content; +} +.dark-mode { + color: $dark-font; + background-color: $dark-background; +} +.heading { + text-transform: none; +} + +main { + flex: 1; + flex-shrink: 0; + flex-basis: auto; +} + +header, +footer { + flex-grow: 0; + flex-shrink: 0; + flex-basis: auto; +} + +.dark-mode .title { + color: $dark-font; +} + +.dark-mode hr { + background-color: $dark-navbar; +} + +.title.is-1 { + font-family: Inter, BlinkMacSystemFont, Segoe UI, Roboto, Oxygen, Ubuntu, Cantarell, Fira Sans, Droid Sans, Helvetica Neue, sans-serif; + font-size: $font-size-article-title; +} + +.max-800px { + max-width: 800px; +} + +h1 { + font-weight: 600; +} + +.icon { + color: $main-black; + margin: 0 0.3rem; +} + +.dark-mode .icon { + color: $dark-font; +} + +.icon:hover, .search-svg:hover { + color: $main-orange; + transform: scale(1.2); + transition: all 0.2s linear; +} + +.single-container, +.archive-container, +.each-category { + padding-left: 20vw; + padding-right: 20vw; +} + +p { + font-weight: normal; +} + +input { + height: 100%; + width: 20vw; + align-self: center; + margin-right: 0.5rem; + border-radius: 24px; + padding-left: 1rem; +} + +input:focus { + outline: none; + border: 2px solid; +} + +button { + border: none; + background-color: white; +} + +.dark-mode button { + background-color: $dark-background; + color: $dark-font; + border-color: $dark-navbar; +} + +a { + color: $main-black; +} + +.dark-mode a { + color: $dark-font; +} +.dark-mode .content h1, .dark-mode .content h2, .dark-mode .content h3, .dark-mode .content h4, .dark-mode .content h5, .dark-mode .content h6 { + color: $dark-font; +} + +.dark-mode code { + background-color: $dark-background; +} +.dark-mode .content blockquote { + color: $dark-font; + background-color: $dark-background; +} + +.dark-mode strong { + color: white; +} +.dark-mode .content table thead td, .dark-mode .content table thead th { + color: $dark-font; +} + +.dark-mode .card { + background-color: $dark-navbar; +} + + +.dark-mode .icon:hover { + color: $main-orange; +} + +.dark-mode pre { + color: #f8f8f2; + background-color: #272822; + -moz-tab-size: 4; + -o-tab-size: 4; + tab-size: 4; +} +.hover-underline-animation { + display: inline-block; + position: relative; + @media (min-width: 768px) { + padding: 5px 0; + } + + &:after { + content: ''; + position: absolute; + width: 100%; + transform: scaleX(0); + height: 2px; + bottom: 0; + left: 0; + background-color: $main-orange; + transform-origin: bottom right; + transition: transform 0.25s ease-out; + } + + &:hover:after { + transform: scaleX(1); + transform-origin: bottom left; + } +} + +.title, +.archive-title { + font-size: $font-size-archive-title; + margin-top: 2rem; + margin-bottom: 2rem; + font-weight: bold; +} + +.archive-item { + margin: 5px 0 15px; + padding: 0; + +} + +.archive-item-date { + color: $main-grey; + font-size: $font-size-content; + padding: 5px 0; + margin-top: 5px; + float: right; +} +.archive-item-link { + display: inline-block; + text-decoration: none; + font-size: $font-size-content-larger; + color: #222; + padding: 5px 0; + transition: all 0.1s linear; + +} +.pp-container{ + margin-top: 2rem; +} + +@media (max-width: 768px) { + html { + font-size: 16px; + } + + .content h1 { + font-size: 27px; + } + + .title.is-1 { + margin-top: 25px; + font-size: 25.6px; + text-align: right; + } + + .column { + font-size: 13px; + } + + .section { + padding-bottom: 3rem; + } + + .artical-content h1 { + font-size: 25.6px; + text-align: left; + } + + .artical-content h2 { + font-size: 24px; + } + + .artical-content h3 { + font-size: 22px; + } + + .artical-content h4 { + font-size: 20px; + } + + .artical-content h5 { + font-size: 18px; + } + + .artical-content h6 { + font-size: 17px; + } + + .archive-title { + font-size: 1rem; + margin-top: 1rem; + margin-bottom: 1rem; + font-weight: bold; + } + + .archive-item-link { + font-size: 1.1rem; + } + + .archive-item-date { + font-size: 1rem; + } + + .section { + padding-top: 1rem; + padding-bottom: 1rem; + } + + + .single-container, + .archive-container, + .each-category { + padding-left: 5vw; + padding-right: 5vw; + } + + .title, + .archive-title { + margin-top: 1vh; + } +} + + + + diff --git a/assets/scss/_normalize.scss b/assets/scss/_normalize.scss new file mode 100644 index 0000000..a7fddb2 --- /dev/null +++ b/assets/scss/_normalize.scss @@ -0,0 +1,346 @@ +/*! normalize.css v8.0.0 | MIT License | github.com/necolas/normalize.css */ + +/* Document + ========================================================================== */ + +/** + * 1. Correct the line height in all browsers. + * 2. Prevent adjustments of font size after orientation changes in iOS. + */ +/* Solve the problem that mobile pages generate shadows when clicking on icons or buttons */ +html { + line-height: 1.15; /* 1 */ + -webkit-text-size-adjust: 100%; /* 2 */ + + -webkit-tap-highlight-color: rgba(0, 0, 0, 0); + -webkit-tap-highlight-color: transparent; +} + +/* Sections + ========================================================================== */ + +/** + * Remove the margin in all browsers. + */ + +body { + margin: 0; +} + +/** + * Correct the font size and margin on `h1` elements within `section` and + * `article` contexts in Chrome, Firefox, and Safari. + */ + +h1 { + font-size: 2em; +} + +/* Grouping content + ========================================================================== */ + +/** + * 1. Add the correct box sizing in Firefox. + * 2. Show the overflow in Edge and IE. + */ + +hr { + box-sizing: content-box; /* 1 */ + height: 0; /* 1 */ + overflow: visible; /* 2 */ +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +pre { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/* Text-level semantics + ========================================================================== */ + +/** + * Remove the gray background on active links in IE 10. + */ + +a { + background-color: transparent; +} + +/** + * 1. Remove the bottom border in Chrome 57- + * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. + */ + +abbr[title] { + border-bottom: none; /* 1 */ + text-decoration: underline; /* 2 */ + text-decoration: underline dotted; /* 2 */ +} + +/** + * Add the correct font weight in Chrome, Edge, and Safari. + */ + +b, +strong { + font-weight: 500; +} + +/** + * 1. Correct the inheritance and scaling of font size in all browsers. + * 2. Correct the odd `em` font sizing in all browsers. + */ + +code, +kbd, +samp { + font-family: monospace, monospace; /* 1 */ + font-size: 1em; /* 2 */ +} + +/** + * Add the correct font size in all browsers. + */ + +small { + font-size: 80%; +} + +/** + * Prevent `sub` and `sup` elements from affecting the line height in + * all browsers. + */ + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sub { + bottom: -0.25em; +} + +sup { + top: -0.5em; +} + +/* Embedded content + ========================================================================== */ + +/** + * Remove the border on images inside links in IE 10. + */ + +img { + border-style: none; +} + +/* Forms + ========================================================================== */ + +/** + * 1. Change the font styles in all browsers. + * 2. Remove the margin in Firefox and Safari. + */ + +button, +input, +optgroup, +select, +textarea { + font-family: inherit; /* 1 */ + font-size: 100%; /* 1 */ + line-height: 1.15; /* 1 */ + margin: 0; /* 2 */ +} + +/** + * Show the overflow in IE. + * 1. Show the overflow in Edge. + */ + +button, +input { + /* 1 */ + overflow: visible; +} + +/** + * Remove the inheritance of text transform in Edge, Firefox, and IE. + * 1. Remove the inheritance of text transform in Firefox. + */ + +button, +select { + /* 1 */ + text-transform: none; +} + +/** + * Correct the inability to style clickable types in iOS and Safari. + */ + +button, +[type='button'], +[type='reset'], +[type='submit'] { + -webkit-appearance: button; + cursor: pointer; +} + +/** + * Remove the inner border and padding in Firefox. + */ + +button::-moz-focus-inner, +[type='button']::-moz-focus-inner, +[type='reset']::-moz-focus-inner, +[type='submit']::-moz-focus-inner { + border-style: none; + padding: 0; +} + +/** + * Restore the focus styles unset by the previous rule. + */ + +button:-moz-focusring, +[type='button']:-moz-focusring, +[type='reset']:-moz-focusring, +[type='submit']:-moz-focusring { + outline: 1px dotted ButtonText; +} + +/** + * Correct the padding in Firefox. + */ + +fieldset { + padding: 0.35em 0.75em 0.625em; +} + +/** + * 1. Correct the text wrapping in Edge and IE. + * 2. Correct the color inheritance from `fieldset` elements in IE. + * 3. Remove the padding so developers are not caught out when they zero out + * `fieldset` elements in all browsers. + */ + +legend { + box-sizing: border-box; /* 1 */ + color: inherit; /* 2 */ + display: table; /* 1 */ + max-width: 100%; /* 1 */ + padding: 0; /* 3 */ + white-space: normal; /* 1 */ +} + +/** + * Add the correct vertical alignment in Chrome, Firefox, and Opera. + */ + +progress { + vertical-align: baseline; +} + +/** + * Remove the default vertical scrollbar in IE 10+. + */ + +textarea { + overflow: auto; +} + +/** + * 1. Add the correct box sizing in IE 10. + * 2. Remove the padding in IE 10. + */ + +[type='checkbox'], +[type='radio'] { + box-sizing: border-box; /* 1 */ + padding: 0; /* 2 */ +} + +/** + * Correct the cursor style of increment and decrement buttons in Chrome. + */ + +[type='number']::-webkit-inner-spin-button, +[type='number']::-webkit-outer-spin-button { + height: auto; +} + +/** + * 1. Correct the odd appearance in Chrome and Safari. + * 2. Correct the outline style in Safari. + */ + +[type='search'] { + -webkit-appearance: textfield; /* 1 */ + outline-offset: -2px; /* 2 */ +} + +/** + * Remove the inner padding in Chrome and Safari on macOS. + */ + +[type='search']::-webkit-search-decoration { + -webkit-appearance: none; +} + +/** + * 1. Correct the inability to style clickable types in iOS and Safari. + * 2. Change font properties to `inherit` in Safari. + */ + +::-webkit-file-upload-button { + -webkit-appearance: button; /* 1 */ + font: inherit; /* 2 */ +} + +/* Interactive + ========================================================================== */ + +/* + * Add the correct display in Edge, IE 10+, and Firefox. + */ + +details { + display: block; +} + +/* + * Add the correct display in all browsers. + */ + +summary { + display: list-item; +} + +/* Misc + ========================================================================== */ + +/** + * Add the correct display in IE 10+. + */ + +template { + display: none; +} + +/** + * Add the correct display in IE 10. + */ + +[hidden] { + display: none; +} diff --git a/assets/scss/_pagination.scss b/assets/scss/_pagination.scss new file mode 100644 index 0000000..53b09aa --- /dev/null +++ b/assets/scss/_pagination.scss @@ -0,0 +1,9 @@ +.pagination { + justify-content: space-around; + margin: 0 10vw 1rem 10vw; + + .pag-link { + font-weight: bold; + } + +} \ No newline at end of file diff --git a/assets/scss/_single.scss b/assets/scss/_single.scss new file mode 100644 index 0000000..c6ed289 --- /dev/null +++ b/assets/scss/_single.scss @@ -0,0 +1,115 @@ +#scrollToTopButton{ + position: fixed; + bottom: 20px; + right: 20px; + z-index: 9999; +} +#verification{ + display: flex; + flex-direction: column; + align-items: center; + margin-top: 20vh; + #secret-word{ + font-size: 1.5rem; + margin-bottom: 1rem; + } + form { + display: flex; + flex-direction: column; + width: auto; + input[type="password"] { + margin-bottom: 1.5rem; + padding: 10px 20px; + } + input[type="submit"] { + padding: 10px 20px; + cursor: pointer; + } + input[type="submit"]:hover { + background-color: $main-orange; + } + + } +} + + +.hidden{ + display: none; +} +.single-container{ + + .archive{ + + .author-image { + object-fit: cover; + border-radius: 50%; + width: 48px; + height: 48px; + } + + .author-info { + display: flex; + font-size: 1rem; + } + + .small-categories-container { + margin-right: 3rem; + text-align: right; + } + + .article-content > :not(.toc-container){ + a{ + color: #6086b4; + } + } + + + } + + + .pre-and-post { + display: flex; + margin: 5px 0; + justify-content: space-between; + a { + font-weight: bolder; + } + } + + .article-content { + margin: 2rem 0; + } +} + +@media (max-width: 768px) { + #verification{ + + #secret-word{ + font-size: 1rem; + margin-top: 1rem; + } + form { + + input[type="password"] { + padding: 10px 20px; + width: auto; + margin-bottom: 1rem; + } + input[type="submit"] { + padding: 10px 20px; + cursor: pointer; + background-color: $main-orange; + } + + + } + } + + .single-container .title { + text-align: left; + .small-categories-container { + margin-right: 5vw; + } + } +} + diff --git a/assets/scss/_summary.scss b/assets/scss/_summary.scss new file mode 100644 index 0000000..aa619cd --- /dev/null +++ b/assets/scss/_summary.scss @@ -0,0 +1,37 @@ +@import "variables"; + +.post-title { + margin-bottom: 1rem; + @media (max-width: 768px){ + margin-bottom: 0.5rem; + } +} + +.post-link { + color: $main-black; + font-size: $font-size-content-larger; + @media (max-width: 768px) { + font-size: $font-size-content; + } +} + +#post-container { + padding: 1rem; + background-color: $main-light; + border-radius: 24px; + + .excerpt { + display: -webkit-box; + -webkit-line-clamp: 3; + -webkit-box-orient: vertical; + overflow: hidden; + } + + .post-time-container { + margin-top: 0.5rem; + } +} +.dark-mode #post-container { + background-color: $dark-navbar; + color: $dark-font; +} \ No newline at end of file diff --git a/assets/scss/_taxonomy.scss b/assets/scss/_taxonomy.scss new file mode 100644 index 0000000..e69de29 diff --git a/assets/scss/_terms.scss b/assets/scss/_terms.scss new file mode 100644 index 0000000..15b5d92 --- /dev/null +++ b/assets/scss/_terms.scss @@ -0,0 +1,38 @@ + +.card-container { + display: flex; + padding-left: 20vw; + padding-right: 20vw; + flex-direction: row; + flex-wrap: wrap; + + .card { + height: 72px; + width: auto; + margin: 2rem; + border-radius: 6%; + + &:hover { + transform: scale(1.1); + transition: all 0.3s linear; + } + } +} + +@media (max-width: 768px) { + + .card-container { + display: flex; + padding: 0 20vw; + flex-direction: column; + flex-wrap: wrap; + } + + .card { + margin: 1rem; + + } +} + + + diff --git a/assets/scss/_toc.scss b/assets/scss/_toc.scss new file mode 100644 index 0000000..40dcf3e --- /dev/null +++ b/assets/scss/_toc.scss @@ -0,0 +1,58 @@ +@import "variables"; + +.post-toc { + margin-left: 16px; + font-size: 0.9em; + line-height: 1.6; + overflow: hidden; + white-space: nowrap; + @media (max-width: 768px){ + margin-left: 0; + } + nav{ + margin-left: -1rem; + } + ul,li { + list-style: none; + } + nav { + font-weight: bold; + } + nav > ul > li > a::before { + content: "┃"; + color: $main-orange; + } + ul > li > ul > li :first-child::before { + content: "┃"; + color: #fded01; + } + a :last-child { + margin-left: 5px; + } +} + +#TableOfContents a:hover, #TableOfContents a:active { + color: $main-orange; +} +.toc-container { + position: fixed; + right: 5vw; + overflow: auto; + top: 100px; + width: 15vw; + bottom: 50px; + button{ + display: none; + } + @media (max-width: 768px){ + position: static; + width: auto; + #hide{ + display: none; + } + button{ + display: inline; + } + } + margin-bottom: 1rem; +} \ No newline at end of file diff --git a/assets/scss/_variables.scss b/assets/scss/_variables.scss new file mode 100644 index 0000000..3af3848 --- /dev/null +++ b/assets/scss/_variables.scss @@ -0,0 +1,13 @@ +$main-black: #363636; +$main-orange: #FAB005; +$main-light: #f5f5f5; +$main-grey: rgb(142, 139, 139); +$dark-background: #1F1F1F; +$dark-navbar: #2D2F31; +$dark-font: #E3E3E3; +$font-size-home-title: 2.5rem; +$font-size-article-title: 2.5rem; +$font-size-article-title-mobile: 1.8rem; +$font-size-content: 1rem; +$font-size-content-larger: 1.3rem; +$font-size-archive-title: 1.9rem; \ No newline at end of file diff --git a/assets/scss/style.scss b/assets/scss/style.scss new file mode 100644 index 0000000..a0df4cb --- /dev/null +++ b/assets/scss/style.scss @@ -0,0 +1,13 @@ +@import "normalize"; +@import "main"; +@import "header"; +@import "single"; +@import "archive"; +@import "footer"; +@import "header"; +@import "index"; +@import "terms"; +@import "summary"; +@import "toc"; +@import "about"; +@import "pagination"; \ No newline at end of file diff --git a/content/about.md b/content/about.md new file mode 100644 index 0000000..f113653 --- /dev/null +++ b/content/about.md @@ -0,0 +1,25 @@ +--- +title: "About us" +date: 2023-06-14T20:56:49+02:00 +author: Andre +heroimage: /images/hopeless-cloud.png +layout: about +--- + +# Hopeless-cloud + +## Who are we? + +We are just a bunch of people that self host open source software. + +## What is our mission? + +Our mission is to make the world just a bit better by helper others. + +## How can I join? + +You can join us by writing one of our members. + +[Matrix - ProfessionalUwU](@professionaluwu:hopeless-cloud.xyz) +[Matrix - AustrianToast](@professionaluwu:hopeless-cloud.xyz) +[Email](support@hopeless-cloud.xyz) \ No newline at end of file diff --git a/content/post/Introduction.md b/content/post/Introduction.md new file mode 100644 index 0000000..fd6dfc7 --- /dev/null +++ b/content/post/Introduction.md @@ -0,0 +1,11 @@ +--- +title: "Introduction" +date: 2023-06-14T20:46:23+02:00 +categories: ["Essay"] +--- +# Welcome to hopeless-cloud + +## Our provider Oracle Cloud + +The only reason we choose Oracle Cloud is that it was completely free. +4 Arm cores + 24GB RAM diff --git a/content/post/Markdown_Syntax_Guide.md b/content/post/Markdown_Syntax_Guide.md new file mode 100644 index 0000000..c69f6c3 --- /dev/null +++ b/content/post/Markdown_Syntax_Guide.md @@ -0,0 +1,145 @@ +--- +title: "Markdown Syntax Guide" +date: 2023-06-14T20:45:23+02:00 +categories: ["Guide"] +--- + +This article offers a sample of basic Markdown syntax that can be used in Hugo content files, also it shows whether basic HTML elements are decorated with CSS in a Hugo theme. + +## Headings + +The following HTML `

`—`

` elements represent six levels of section headings. `

` is the highest section level while `

` is the lowest. + +# H1 + +## H2 + +### H3 + +#### H4 + +##### H5 + +###### H6 + +## Paragraph + +Xerum, quo qui aut unt expliquam qui dolut labo. Aque venitatiusda cum, voluptionse latur sitiae dolessi aut parist aut dollo enim qui voluptate ma dolestendit peritin re plis aut quas inctum laceat est volestemque commosa as cus endigna tectur, offic to cor sequas etum rerum idem sintibus eiur? Quianimin porecus evelectur, cum que nis nust voloribus ratem aut omnimi, sitatur? Quiatem. Nam, omnis sum am facea corem alique molestrunt et eos evelece arcillit ut aut eos eos nus, sin conecerem erum fuga. Ri oditatquam, ad quibus unda veliamenimin cusam et facea ipsamus es exerum sitate dolores editium rerore eost, temped molorro ratiae volorro te reribus dolorer sperchicium faceata tiustia prat. + +Itatur? Quiatae cullecum rem ent aut odis in re eossequodi nonsequ idebis ne sapicia is sinveli squiatum, core et que aut hariosam ex eat. + +## Blockquotes + +The blockquote element represents content that is quoted from another source, optionally with a citation which must be within a `footer` or `cite` element, and optionally with in-line changes such as annotations and abbreviations. + +#### Blockquote without attribution + +> Tiam, ad mint andaepu dandae nostion secatur sequo quae. **Note** that you can use *Markdown syntax* within a blockquote. + +#### Blockquote with attribution + +> Don’t communicate by sharing memory, share memory by communicating. +> — Rob Pike[1](https://hugo-paper.vercel.app/post/markdown-syntax/#fn:1) + +## Tables + +Tables aren’t part of the core Markdown spec, but Hugo supports supports them out-of-the-box. + +| Name | Age | +| ----- | ---- | +| Bob | 27 | +| Alice | 23 | + +#### Inline Markdown within tables + +| Italics | Bold | Code | +| --------- | -------- | ------ | +| *italics* | **bold** | `code` | + +## Code Blocks + +#### Code block with backticks + +```html + + + + + Example HTML5 Document + + +

Test

+ + +``` + +#### Code block indented with four spaces + +```html + + + + + Example HTML5 Document + + +

Test

+ + +``` + +#### Code block with Hugo’s internal highlight shortcode + +```html + + + + + Example HTML5 Document + + +

Test

+ + +``` + +## List Types + +#### Ordered List + +1. First item +2. Second item +3. Third item + +#### Unordered List + +- List item +- Another item +- And another item + +#### Nested list + +- Fruit + - Apple + - Orange + - Banana +- Dairy + - Milk + - Cheese + +## Other Elements — abbr, sub, sup, kbd, mark + +GIF is a bitmap image format. + +H2O + +Xn + Yn = Zn + +Press CTRL+ALT+Delete to end the session. + +Most salamanders are nocturnal, and hunt for insects, worms, and other small creatures. + +{{< rawhtml >}} +
+{{< /rawhtml >}} +The above quote is excerpted from Rob Pike’s talk during Gopherfest, November 18, 2015. diff --git a/content/post/lorem-ipsum.md b/content/post/lorem-ipsum.md new file mode 100644 index 0000000..39e79c0 --- /dev/null +++ b/content/post/lorem-ipsum.md @@ -0,0 +1,28 @@ +--- +title: "Lorem Ipsum" +date: 2022-04-10T16:50:28+08:00 +categories : [ "Development" ] +protected: true +password: "111111" +--- +Lorem ipsum dolor sit amet, consectetur... +## What is Lorem Ipsum? +In mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus ut + +Vivamus ut tincidunt urna. Nam eu mollis dolor... + +## In mollis cursus ligula +Etiam et ligula sit amet urna aliquam suscipit... + +- Cras dui nulla, +- ornare eget fermentum quis, +- accumsan vitae purus. + +Nam eget pharetra arcu. Cras dui nulla, ornare eget... + +### Nullam a risus maximus +Fusce facilisis non anteIn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utIn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus ut quis blandit... + +### Donec vel accumsan justo +Maecenas eu libero ac justo tempor pellentesque... +In mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utIn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utIn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus utn mollis cursus ligula, et venenatis neque maximus ut diff --git a/hugo.toml b/hugo.toml new file mode 100644 index 0000000..5816a78 --- /dev/null +++ b/hugo.toml @@ -0,0 +1,38 @@ +baseURL = 'https://hopeless-cloud.xyz/' +languageCode = 'en-us' +theme = "JuiceBar" +title = "Hopeless-cloud" + +[params] +author = "Andre Fuhry" +description = "Just a bunch of people that advocate for open source" +authorImage = "/images/hopeless-cloud.png" +paginate = 5 +Title = "Hopeless-cloud" +content = "Welcome to Hopeless-cloud! Enjoy your stay and have a nice day!" +imageUrl = "/images/hopeless-cloud.png" + +# To add a new social icon +# More social icons can be found in JuiceBar\layouts\partials\svg.html. +[[params.social]] +name = "github" +url = "https://gitea.hopeless-cloud.xyz/ProfessionalUwU" +[[params.social]] +name = "email" +url = "mailto:andre.fuhry@hopeless-cloud.xyz" + +[taxonomies] +category = "categories" +tag = "tags" + +# To add a new navigation link +[[menu.main]] +name = "About" +url = "/about" +[[menu.main]] +name = "Blog" +url = "/post" + +# Used for outputting the documentation (required). +[outputs] +home = ["HTML", "RSS", "JSON"] \ No newline at end of file diff --git a/layouts/404.html b/layouts/404.html new file mode 100644 index 0000000..e098597 --- /dev/null +++ b/layouts/404.html @@ -0,0 +1,6 @@ +{{ define "main" }} +
+

Page not found

+

Go to Home Page

+
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/about.html b/layouts/_default/about.html new file mode 100644 index 0000000..e869230 --- /dev/null +++ b/layouts/_default/about.html @@ -0,0 +1,12 @@ +{{/* 单个帖子的模板 */}} +{{ define "main" }} +
+
+

{{ .Title }}

+
+ {{ .Content }} +
+
+ +
+{{ end }} \ No newline at end of file diff --git a/layouts/_default/baseof.html b/layouts/_default/baseof.html new file mode 100644 index 0000000..6e205a9 --- /dev/null +++ b/layouts/_default/baseof.html @@ -0,0 +1,13 @@ + + + + {{- partial "head.html" . -}} + + {{- partial "header.html" . -}} +
+ {{- block "main" . }}{{- end }} +
+ {{- partial "footer.html" . -}} + + + diff --git a/layouts/_default/index.json b/layouts/_default/index.json new file mode 100644 index 0000000..8d31cca --- /dev/null +++ b/layouts/_default/index.json @@ -0,0 +1,5 @@ +{{- $.Scratch.Add "index" slice -}} +{{- range .Site.RegularPages -}} + {{- $.Scratch.Add "index" (dict "title" .Title "tags" .Params.tags "categories" .Params.categories "contents" .Plain "permalink" .Permalink "date" .Date "section" .Section) -}} +{{- end -}} +{{- $.Scratch.Get "index" | jsonify -}} \ No newline at end of file diff --git a/layouts/_default/list.html b/layouts/_default/list.html new file mode 100644 index 0000000..0ead3a3 --- /dev/null +++ b/layouts/_default/list.html @@ -0,0 +1,16 @@ +{{/* 列表类型页面的通用模板.点击blog之后展示出来的页面 */}} +{{/* user:为博客文章列表创建一个索引页面。 +>> hugo new blog/_index.md */}} +{{ define "main" }} +
+
+
+

{{ .Title }}

+ {{ .Content }} + {{ range .Pages.ByPublishDate.Reverse }} + {{ .Title }} + {{ end }} +
+
+
+{{ end }} diff --git a/layouts/_default/single.html b/layouts/_default/single.html new file mode 100644 index 0000000..5e0d575 --- /dev/null +++ b/layouts/_default/single.html @@ -0,0 +1,15 @@ +{{ define "main" }} +{{- with site.Params.homeInfoParams }} +
+
+

{{ .Title }}

+
+
+ {{ .Content}} +
+
+ {{ partial "social_icons.html" site.Params.socialIcons }} +
+
+{{- end -}} +{{ end }} \ No newline at end of file diff --git a/layouts/_default/summary.html b/layouts/_default/summary.html new file mode 100644 index 0000000..7819d3e --- /dev/null +++ b/layouts/_default/summary.html @@ -0,0 +1,26 @@ +
+
+
+
+

{{ .Title + }}

+ + +
+
+
+ {{ if .Params.protected}} +

Psst! The article you seek is guarded by a mischievous password, hidden within the realms of whimsy and giggles. Unleash your inner unicorn, sprinkle some sparkle, and let the charm of curiosity guide you to unlock its enchanting secrets!

+ {{ else }} + {{ .Summary }} + {{ end }} +
+ +
+ {{ .Date.Format (.Site.Params.dateFormatToUse | default "2006-01-02") }} +
+
+ +
+
+
\ No newline at end of file diff --git a/layouts/categories/taxonomy.html b/layouts/categories/taxonomy.html new file mode 100644 index 0000000..011c29c --- /dev/null +++ b/layouts/categories/taxonomy.html @@ -0,0 +1,23 @@ +{{ define "main" }} +
+
+

Category: {{ .Title }}

+
+
+
+ + + {{ range .Paginator.Pages}} + +
+ {{ .Title }} + + {{ .Date.Format "January 2, 2006" }} + + +
+ + {{ end }} + +
+{{ end }} \ No newline at end of file diff --git a/layouts/categories/terms.html b/layouts/categories/terms.html new file mode 100644 index 0000000..1235677 --- /dev/null +++ b/layouts/categories/terms.html @@ -0,0 +1,33 @@ +{{ define "main" }} +
+
+
+

{{ .Title }}

+ {{ .Content }} +
+
+
+ +
+ + {{ range .Data.Terms.ByCount }} +
+ + + +
+
+ {{ .Page.Title }} + {{ $pageCount := len .Pages }} + + {{ $pageCount }} + +
+
+ +
+ {{ end }} + +
+ +{{ end }} \ No newline at end of file diff --git a/layouts/index.html b/layouts/index.html new file mode 100644 index 0000000..5e6daaf --- /dev/null +++ b/layouts/index.html @@ -0,0 +1,51 @@ +{{ define "main" }} +
+ {{- with site.Params}} +
+
+
+ {{ with .imageUrl }} +
+ + +
+ {{ end }} + + + +

{{ .Title }}

+
+
{{ .Content }}
+ +
+ + + + +
+
+ +
+ {{- end -}} + +
+
+ {{- $paginator := .Paginate (where (where .Site.RegularPages "Type" "post") ".Params.draft" "!=" true) }} + {{ range $paginator.Pages }} + {{ .Render "summary" }} + {{ end }} + {{ partial "pagination.html" . }} + +
+{{ end }} \ No newline at end of file diff --git a/layouts/partials/comment.html b/layouts/partials/comment.html new file mode 100644 index 0000000..96fee31 --- /dev/null +++ b/layouts/partials/comment.html @@ -0,0 +1,49 @@ +{{- if isset .Site.Params "giscus" -}} +
+
+ +{{end}} + diff --git a/layouts/partials/footer.html b/layouts/partials/footer.html new file mode 100644 index 0000000..7f6cc17 --- /dev/null +++ b/layouts/partials/footer.html @@ -0,0 +1,14 @@ + \ No newline at end of file diff --git a/layouts/partials/head.html b/layouts/partials/head.html new file mode 100644 index 0000000..e7c6341 --- /dev/null +++ b/layouts/partials/head.html @@ -0,0 +1,19 @@ + + + + + {{ if not .IsHome }}{{ with .Title }}{{ . }} | {{ end }}{{ end }}{{ .Site.Title }} + + + + {{ $styles := resources.Get "scss/style.scss" | toCSS | minify | fingerprint }} + + + {{ template "_internal/opengraph.html" . }} + {{ template "_internal/twitter_cards.html" . }} + {{ if not (in (string .Site.BaseURL) "localhost") }} + {{ template "_internal/google_analytics_async.html" . }} + {{ end }} + + \ No newline at end of file diff --git a/layouts/partials/header.html b/layouts/partials/header.html new file mode 100644 index 0000000..abee8a9 --- /dev/null +++ b/layouts/partials/header.html @@ -0,0 +1,102 @@ + + + + + \ No newline at end of file diff --git a/layouts/partials/pagination.html b/layouts/partials/pagination.html new file mode 100644 index 0000000..78066f0 --- /dev/null +++ b/layouts/partials/pagination.html @@ -0,0 +1,15 @@ +
+
+ {{ if .Paginator.HasPrev }} + + + {{ end }} + + {{ if .Paginator.HasNext }} + + {{ end }} +
\ No newline at end of file diff --git a/layouts/partials/svg.html b/layouts/partials/svg.html new file mode 100644 index 0000000..c99ded1 --- /dev/null +++ b/layouts/partials/svg.html @@ -0,0 +1,217 @@ +{{- $icon_name := ( .name|lower )}} +{{- if (eq $icon_name "123rf") -}} + + + + +{{- else if (eq $icon_name "adobestock") -}} + + + + +{{- else if (eq $icon_name "applemusic") -}} + + + +{{- else if (eq $icon_name "applepodcasts") -}} + + + + +{{- else if (eq $icon_name "bilibili") -}} + + + + + + + +{{- else if (eq $icon_name "bitcoin") -}} + + + + + +{{- else if (eq $icon_name "email") -}} + + + + +{{- else if (eq $icon_name "facebook") -}} + + + + + +{{- else if (eq $icon_name "github") -}} + + + + +{{- else if (eq $icon_name "gitlab") -}} + + + + + + +{{- else if (eq $icon_name "instagram") -}} + + + + + + + +{{- else if (eq $icon_name "linkedin") -}} + + + + + +{{- else if (eq $icon_name "mastodon") -}} + + + + + +{{- else if (eq $icon_name "medium") -}} + + + + + + +{{- else if (eq $icon_name "paypal") -}} + + + +{{- else if (eq $icon_name "peertube") -}} + + + + +{{- else if (eq $icon_name "phone") -}} + + + + + + +{{- else if (eq $icon_name "qq") -}} + + + + +{{- else if (eq $icon_name "reddit") -}} + + + + +{{- else if (eq $icon_name "rss") -}} + + + + + + +{{- else if (eq $icon_name "slack") -}} + + + + + + + +{{- else if (eq $icon_name "snapchat") -}} + + + +{{- else if (eq $icon_name "spotify") -}} + + + +{{- else if (eq $icon_name "stackoverflow") -}} + + + +{{- else if (eq $icon_name "steam") -}} + + + + +{{- else if (eq $icon_name "telegram") -}} + + + +{{- else if (eq $icon_name "tiktok") -}} + + + +{{- else if (eq $icon_name "twitter") -}} + + + + + +{{- else if (eq $icon_name "youtube") -}} + + + + + +{{- else if $icon_name -}} + + + + +{{- end -}} diff --git a/layouts/partials/toc.html b/layouts/partials/toc.html new file mode 100644 index 0000000..dcd2c1f --- /dev/null +++ b/layouts/partials/toc.html @@ -0,0 +1,34 @@ +{{- $toc := .TableOfContents -}} +{{- if $toc -}} + +
+ {{ if and (gt .WordCount 80) (.Params.toc | default true) }} + + {{ end }} +
+{{- end -}} + \ No newline at end of file diff --git a/layouts/post/list.html b/layouts/post/list.html new file mode 100644 index 0000000..c9c5be2 --- /dev/null +++ b/layouts/post/list.html @@ -0,0 +1,32 @@ +{{ define "main" }} +
+
+
+

Archives

+
+
+
+ +
+
+ + {{ range (where (where site.RegularPages "Type" "in" site.Params.mainSections) ".Params.draft" "!=" true).GroupByDate "2006" }} +

{{ .Key }}

+ {{ range .Pages }} + {{/* {{ range .Paginators.Pages }} */}} + +
+ {{ .Title }} + + {{ .Date.Format "January 2, 2006" }} + + +
+ {{ end }} + {{ end }} +
+ +
+ + +{{ end }} \ No newline at end of file diff --git a/layouts/post/single.html b/layouts/post/single.html new file mode 100644 index 0000000..db508f9 --- /dev/null +++ b/layouts/post/single.html @@ -0,0 +1,144 @@ +{{ define "main" }} +{{ if .Params.protected }} +
+ +
Unlock it!
+
+ + + +
+
+{{ end }} + +
+
+

{{ .Title }}

+
+
+
+
+ {{ with .Site.Params.authorImage }} +
+ +
+ {{ end }} +
+

{{ .Site.Params.Author }}

+

+

+
+
+
+
+ {{ range $idx, $category := .Params.categories }} + {{- if ne $idx 0 }}, {{ end }}{{ + $category }} + {{- end }} +
+
+
+
+
+ {{ partial "toc.html" . }} +
+ {{ .Content }} +
+
+ + + + + + + + {{- /* Comment */ -}} + {{- partial "comment.html" . -}} +
+
+
+ {{ with .PrevInSection }} +

Previous post

+ {{ .Title }} + {{ end }} +
+
+ {{ with .NextInSection }} +

Next post

+ {{ .Title }} + {{ end }} +
+
+
+ +
+ + + + +{{ end }} \ No newline at end of file diff --git a/layouts/shortcodes/rawhtml.html b/layouts/shortcodes/rawhtml.html new file mode 100644 index 0000000..f4f317c --- /dev/null +++ b/layouts/shortcodes/rawhtml.html @@ -0,0 +1,2 @@ + +{{.Inner}} \ No newline at end of file diff --git a/static/images/hopeless-cloud.png b/static/images/hopeless-cloud.png new file mode 100644 index 0000000..b2d3882 Binary files /dev/null and b/static/images/hopeless-cloud.png differ diff --git a/static/js/fastsearch.js b/static/js/fastsearch.js new file mode 100644 index 0000000..92dd71b --- /dev/null +++ b/static/js/fastsearch.js @@ -0,0 +1,180 @@ +var fuse; // holds our search engine +var fuseIndex; +var searchVisible = false; +var firstRun = true; // allow us to delay loading json data unless search activated +var list = document.getElementById('searchResults'); // targets the