-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
508 changed files
with
104,999 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
# See https://docs.docker.com/engine/reference/builder/#dockerignore-file | ||
# Put files here that you don't want copied into your bundle's invocation image | ||
.gitignore | ||
template.Dockerfile |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
# Sample workflow for building and deploying a Hugo site to GitHub Pages | ||
name: Deploy Hugo site to Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: false | ||
|
||
# Default to bash | ||
defaults: | ||
run: | ||
shell: bash | ||
|
||
jobs: | ||
# Build job | ||
build: | ||
runs-on: ubuntu-latest | ||
env: | ||
HUGO_VERSION: 0.108.0 | ||
steps: | ||
- name: Install Hugo CLI | ||
run: | | ||
wget -O ${{ runner.temp }}/hugo.deb https://github.com/gohugoio/hugo/releases/download/v${HUGO_VERSION}/hugo_extended_${HUGO_VERSION}_linux-amd64.deb \ | ||
&& sudo dpkg -i ${{ runner.temp }}/hugo.deb | ||
- name: Install Dart Sass Embedded | ||
run: sudo snap install dart-sass-embedded | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
submodules: recursive | ||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
- name: Install Node.js dependencies | ||
run: "[[ -f package-lock.json || -f npm-shrinkwrap.json ]] && npm ci || true" | ||
- name: Build with Hugo | ||
env: | ||
# For maximum backward compatibility with Hugo modules | ||
HUGO_ENVIRONMENT: production | ||
HUGO_ENV: production | ||
run: | | ||
hugo \ | ||
--minify \ | ||
--baseURL "${{ steps.pages.outputs.base_url }}/" | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: ./public | ||
|
||
# Deployment job | ||
deploy: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
needs: build | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
.cnab/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[submodule "themes/PaperMod"] | ||
path = themes/PaperMod | ||
url = https://github.com/adityatelange/hugo-PaperMod.git |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
https://kubedaily.com |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
# Generated files by hugo | ||
/public/ | ||
/resources/_gen/ | ||
/assets/jsconfig.json | ||
hugo_stats.json | ||
.DS_Store | ||
# Executable may be added to repository | ||
hugo.exe | ||
hugo.darwin | ||
hugo.linux | ||
.DS_Store | ||
# Temporary lock file while building | ||
/.hugo_build.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Kubedaily |
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
const body = document.body; | ||
|
||
const btnArticleNavMenu = document.querySelector("#article-nav-menu-btn") | ||
if (btnArticleNavMenu) { | ||
btnArticleNavMenu.addEventListener('click', function () { | ||
body.classList.add('offcanvas-sidebar-on') | ||
}); | ||
} | ||
|
||
const btnArticleNavToc = document.querySelector("#article-nav-toc-btn") | ||
if (btnArticleNavToc) { | ||
btnArticleNavToc.addEventListener('click', function () { | ||
body.classList.add('offcanvas-toc-on') | ||
}); | ||
} | ||
|
||
const btnCloseArticleNavMenu = document.querySelector("#sidebar .btn-close") | ||
if (btnCloseArticleNavMenu) { | ||
btnCloseArticleNavMenu.addEventListener('click', function () { | ||
body.classList.remove('offcanvas-sidebar-on') | ||
}); | ||
} | ||
|
||
const btnCloseArticleNavToc = document.querySelector("#toc .btn-close") | ||
if (btnCloseArticleNavToc) { | ||
btnCloseArticleNavToc.addEventListener('click', function () { | ||
body.classList.remove('offcanvas-toc-on') | ||
}); | ||
|
||
const tocLinks = document.querySelectorAll("#toc ul a"); | ||
tocLinks.forEach(link => { | ||
link.addEventListener('click', function () { | ||
body.classList.remove('offcanvas-toc-on') | ||
}); | ||
}); | ||
} | ||
|
||
body.addEventListener('click', e => { | ||
const isBtnArticleNavMenu = e.target.closest('#article-nav-menu-btn'); | ||
const isSidebar = e.target.closest('#sidebar'); | ||
if (!isBtnArticleNavMenu && !isSidebar && body.classList.contains('offcanvas-sidebar-on')) { | ||
body.classList.remove('offcanvas-sidebar-on'); | ||
} | ||
|
||
const isBtnArticleNavToc = e.target.closest('#article-nav-toc-btn'); | ||
const toc = e.target.closest('#toc'); | ||
if (!isBtnArticleNavToc && !toc && body.classList.contains('offcanvas-toc-on')) { | ||
body.classList.remove('offcanvas-toc-on'); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const lsKeyColorPreference = 'color-preference' | ||
const lsKeyColorPreferenceDarkVariant = 'color-preference-dark-variant' | ||
|
||
const getColorPreference = () => { | ||
let lastUsedColorPreference = localStorage.getItem(lsKeyColorPreference) | ||
if (lastUsedColorPreference !== null) | ||
return lastUsedColorPreference | ||
else | ||
return window.matchMedia('(prefers-color-scheme: dark)').matches ? 'dark' : 'light' | ||
} | ||
|
||
let colorPreference = getColorPreference() | ||
document.firstElementChild.setAttribute('data-color', colorPreference) | ||
|
||
const getColorPreferenceDarkVariant = () => { | ||
let lastUsedColorPreferenceDarkVariant = localStorage.getItem(lsKeyColorPreferenceDarkVariant) | ||
return lastUsedColorPreferenceDarkVariant !== null ? lastUsedColorPreferenceDarkVariant : 'dark' | ||
} | ||
|
||
let colorPreferenceDarkVariant = getColorPreferenceDarkVariant() | ||
|
||
let colorSchemes = document.querySelectorAll('.color-scheme') | ||
colorSchemes.forEach(el => { | ||
el.addEventListener('click', function () { | ||
let newColorPreference = el.dataset.value | ||
if (newColorPreference !== colorPreference) { | ||
colorPreference = newColorPreference | ||
setColorPreference() | ||
|
||
if (newColorPreference === 'dark' || newColorPreference === 'night') { | ||
colorPreferenceDarkVariant = newColorPreference | ||
localStorage.setItem(lsKeyColorPreferenceDarkVariant, colorPreferenceDarkVariant) | ||
} | ||
} | ||
}) | ||
}); | ||
|
||
const setColorPreference = () => { | ||
localStorage.setItem(lsKeyColorPreference, colorPreference) | ||
document.firstElementChild.setAttribute('data-color', colorPreference) | ||
} | ||
|
||
window.matchMedia('(prefers-color-scheme: dark)') | ||
.addEventListener('change', ({matches: isDark}) => { | ||
colorPreference = isDark ? colorPreferenceDarkVariant : 'light' | ||
setColorPreference() | ||
}) |
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
const dropdowns = document.querySelectorAll('.dropdown') | ||
const dropdownOpenSelector = '.dropdown-menu.show'; | ||
|
||
dropdowns.forEach(el => { | ||
el.addEventListener('click', function (e) { | ||
const alreadyShown = el.querySelector('.dropdown-menu.show'); | ||
|
||
document.querySelectorAll(dropdownOpenSelector).forEach(openDropdownEl => openDropdownEl.classList.remove('show')); | ||
|
||
if (!alreadyShown) { | ||
el.querySelector('.dropdown-menu').classList.toggle('show') | ||
} | ||
}) | ||
}); | ||
|
||
document.body.addEventListener('click', function (e) { | ||
const isDropdownMenu = e.target.closest('.dropdown'); | ||
if (!isDropdownMenu) { | ||
document.querySelectorAll(dropdownOpenSelector).forEach(el => el.classList.remove('show')); | ||
} | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
const fromDesktop = window.matchMedia('(min-width: 1280px)'); | ||
const sidebarSticky = document.querySelector("#sidebar .sticky") | ||
if (fromDesktop && sidebarSticky) { | ||
window.addEventListener("scroll", function () { | ||
if (document.body.scrollTop > 80 || document.documentElement.scrollTop > 80) { | ||
sidebarSticky.style.top = "20px"; | ||
sidebarSticky.style.bottom = "65px"; | ||
} else { | ||
sidebarSticky.style.top = null; | ||
sidebarSticky.style.bottom = null; | ||
} | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
const fromLargeTablet = window.matchMedia('(min-width: 1024px)'); | ||
const tocSticky = document.querySelector("#toc .sticky") | ||
if (fromLargeTablet && tocSticky) { | ||
window.addEventListener("scroll", function () { | ||
if (document.body.scrollTop > 80 || document.documentElement.scrollTop > 80) { | ||
tocSticky.style.top = "20px"; | ||
tocSticky.style.bottom = "65px"; | ||
} else { | ||
tocSticky.style.top = null; | ||
tocSticky.style.bottom = null; | ||
} | ||
}); | ||
} | ||
|
||
if ('IntersectionObserver' in window) { | ||
document.addEventListener('DOMContentLoaded', function () { | ||
const links = document.querySelectorAll('#TableOfContents a'); | ||
let activeLink = null; | ||
const linksById = {}; | ||
|
||
const observer = new IntersectionObserver(entries => { | ||
entries.forEach(entry => { | ||
if (entry.isIntersecting) { | ||
if (activeLink) { | ||
activeLink.classList.remove('active'); | ||
} | ||
|
||
activeLink = linksById[entry.target.id]; | ||
if (activeLink) { | ||
activeLink.classList.add('active'); | ||
} | ||
} | ||
}); | ||
}, {rootMargin: `0% 0% -80% 0%`}); | ||
|
||
links.forEach(link => { | ||
const id = link.getAttribute('href') ? link.getAttribute('href').slice(1) : null; // Checking if href exists before slicing # | ||
if (id) { | ||
const target = document.getElementById(id); | ||
if (target) { | ||
linksById[id] = link; | ||
observer.observe(target); | ||
} | ||
} | ||
}); | ||
}); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
/*! | ||
* Docura (https://docura.github.io/) | ||
* Copyright 2022-2023 Dumindu Madunuwan | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
@import "reset"; | ||
@import "variables"; | ||
@import "layout"; | ||
|
||
@import "component/site-header"; | ||
@import "component/site-footer"; | ||
@import "component/article"; | ||
@import "component/sidebar"; | ||
@import "component/toc"; | ||
|
||
@import "component/button"; | ||
@import "component/dropdown"; | ||
@import "component/chroma"; | ||
|
||
html { | ||
font-family: var(--font-family); | ||
background: var(--background); | ||
color: var(--color); | ||
scroll-behavior: smooth; | ||
scroll-padding: 2em; | ||
} |
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.