Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
sangam14 committed Dec 3, 2023
1 parent a056607 commit 856092a
Show file tree
Hide file tree
Showing 508 changed files with 104,999 additions and 0 deletions.
Binary file added .DS_Store
Binary file not shown.
4 changes: 4 additions & 0 deletions .dockerignore
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
75 changes: 75 additions & 0 deletions .github/workflows/hugo.yml
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
.cnab/
3 changes: 3 additions & 0 deletions .gitmodules
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 added .hugo_build.lock
Empty file.
1 change: 1 addition & 0 deletions CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
https://kubedaily.com
13 changes: 13 additions & 0 deletions Hugo.gitignore
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
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Kubedaily
Binary file added assets/.DS_Store
Binary file not shown.
50 changes: 50 additions & 0 deletions assets/js/component/article-nav.js
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');
}
});
47 changes: 47 additions & 0 deletions assets/js/component/color-preference.js
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()
})
3 changes: 3 additions & 0 deletions assets/js/component/docsearch.min.js

Large diffs are not rendered by default.

21 changes: 21 additions & 0 deletions assets/js/component/dropdown.js
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'));
}
});
13 changes: 13 additions & 0 deletions assets/js/component/sidebar.js
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;
}
});
}
47 changes: 47 additions & 0 deletions assets/js/component/toc.js
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);
}
}
});
});
}
27 changes: 27 additions & 0 deletions assets/scss/base.scss
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;
}
42 changes: 42 additions & 0 deletions assets/scss/component/_button.scss

Large diffs are not rendered by default.

Loading

0 comments on commit 856092a

Please sign in to comment.