Skip to content

Commit

Permalink
2024-04-13 08:32:06
Browse files Browse the repository at this point in the history
  • Loading branch information
KaiKimera committed Apr 13, 2024
1 parent 4b2c361 commit 522e45c
Show file tree
Hide file tree
Showing 14 changed files with 139 additions and 51 deletions.
4 changes: 2 additions & 2 deletions assets/css/vendor/bootstrap.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/vendor/bootstrap.min.css.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/vendor/fancybox.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/css/vendor/fontawesome.min.css

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/code/highlight.min.js
Original file line number Diff line number Diff line change
Expand Up @@ -1208,4 +1208,4 @@ begin:"\\b[0-9]{4}(-[0-9][0-9]){0,2}([Tt \\t][0-9][0-9]?(:[0-9][0-9]){2})?(\\.[0
;return c.pop(),c.push(i),r.contains=c,{name:"YAML",case_insensitive:!0,
aliases:["yml"],contains:l}}});const He=ae;for(const e of Object.keys(Ke)){
const n=e.replace("grmr_","").replace("_","-");He.registerLanguage(n,Ke[e])}
export{He as default};
export{He as default};
30 changes: 0 additions & 30 deletions assets/js/code/modules/_hl.lang.sh

This file was deleted.

2 changes: 1 addition & 1 deletion assets/js/vendor/bootstrap.bundle.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/vendor/bootstrap.bundle.min.js.map

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/vendor/clipboard.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/vendor/fuse.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion assets/js/vendor/headroom.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

18 changes: 9 additions & 9 deletions assets/js/vendor/qrcode.min.js

Large diffs are not rendered by default.

118 changes: 118 additions & 0 deletions assets/update.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
#!/usr/bin/env -S bash -e
#
# Adding repository in Packagist.
#
# @package Bash
# @author Kai Kimera <[email protected]>
# @copyright 2024 iHub TO
# @license MIT
# @version 0.0.1
# @link https://lib.onl
# -------------------------------------------------------------------------------------------------------------------- #

(( EUID == 0 )) && { echo >&2 'This script should not be run as root!'; exit 1; }
curl="$( command -v curl )"; ! [[ -x "${curl}" ]] && { echo >&2 "'curl' is not installed!"; exit 1; }

# -------------------------------------------------------------------------------------------------------------------- #
# INITIALIZATION.
# -------------------------------------------------------------------------------------------------------------------- #

init() {
hlJS
vendor
}

# -------------------------------------------------------------------------------------------------------------------- #
# HLJS.
# -------------------------------------------------------------------------------------------------------------------- #

hlJS() {
local lang=(
'apache'
'autohotkey'
'autoit'
'awk'
'cmake'
'dns'
'dockerfile'
'dos'
'excel'
'http'
'nginx'
'pf'
'pgsql'
'powershell'
'properties'
'routeros'
'twig'
'vbscript'
)

# hlJS: Core.
echo '' && echo "--- [UI/CODE] Update: 'hlJS Core'" && echo ''
${curl} -o 'js/code/highlight.min.js' \
'https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/es/highlight.min.js'

# hlJS: Languages.
for i in "${lang[@]}"; do
echo '' && echo "--- [UI/CODE] Update: 'hlJS ${i}'" && echo ''
${curl} -o "js/code/modules/${i}.min.js" \
"https://cdn.jsdelivr.net/gh/highlightjs/cdn-release/build/es/languages/${i}.min.js"
done
}

# -------------------------------------------------------------------------------------------------------------------- #
# VENDOR.
# -------------------------------------------------------------------------------------------------------------------- #

vendor() {
# Bootstrap.
echo '' && echo "--- [UI/VENDOR] Update: 'Bootstrap'" && echo ''
${curl} -o 'css/vendor/bootstrap.min.css' \
'https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css'
${curl} -o 'css/vendor/bootstrap.min.css.map' \
'https://cdn.jsdelivr.net/npm/bootstrap@5/dist/css/bootstrap.min.css.map'
${curl} -o 'js/vendor/bootstrap.bundle.min.js.map' \
'https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js.map'
${curl} -o 'js/vendor/bootstrap.bundle.min.js' \
'https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js'

# FancyBox.
echo '' && echo "--- [UI/VENDOR] Update: 'FancyBox'" && echo ''
${curl} -o 'css/vendor/fancybox.min.css' \
'https://cdn.jsdelivr.net/npm/@fancyapps/ui@5/dist/fancybox/fancybox.css'
${curl} -o 'js/vendor/fancybox.min.js' \
'https://cdn.jsdelivr.net/npm/@fancyapps/ui@5/dist/fancybox/fancybox.umd.js'

# Font Awesome.
echo '' && echo "--- [UI/VENDOR] Update: 'Font Awesome'" && echo ''
${curl} -o 'css/vendor/fontawesome.min.css' \
'https://cdn.jsdelivr.net/npm/@fortawesome/fontawesome-free/css/all.min.css' \
&& sed -i '' 's|../webfonts/|/fonts/|g' 'css/vendor/fontawesome.min.css'

# ClipboardJS.
echo '' && echo "--- [UI/VENDOR] Update: 'ClipboardJS'" && echo ''
${curl} -o 'js/vendor/clipboard.min.js' \
'https://cdn.jsdelivr.net/npm/clipboard/dist/clipboard.min.js'

# Fuse Search.
echo '' && echo "--- [UI/VENDOR] Update: 'Fuse Search'" && echo ''
${curl} -o 'js/vendor/fuse.min.js' \
'https://cdn.jsdelivr.net/npm/fuse.js/dist/fuse.min.js'

# Headroom.
echo '' && echo "--- [UI/VENDOR] Update: 'Headroom'" && echo ''
${curl} -o 'js/vendor/headroom.min.js' \
'https://cdn.jsdelivr.net/npm/headroom.js/dist/headroom.min.js'

# Easy QRCode.
echo '' && echo "--- [UI/VENDOR] Update: 'Easy QRCode'" && echo ''
${curl} -o 'js/vendor/qrcode.min.js' \
'https://cdn.jsdelivr.net/npm/easyqrcodejs@4/dist/easy.qrcode.min.js'
}

# -------------------------------------------------------------------------------------------------------------------- #
# -------------------------------------------------< INIT FUNCTIONS >------------------------------------------------- #
# -------------------------------------------------------------------------------------------------------------------- #

init "$@"; exit 0
2 changes: 1 addition & 1 deletion data/ui.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ scripts:
vendor:
external:
internal:
# https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.min.js
# https://cdn.jsdelivr.net/npm/bootstrap@5/dist/js/bootstrap.bundle.min.js
- 'js/vendor/bootstrap.bundle.min.js'
# https://cdn.jsdelivr.net/npm/fuse.js/dist/fuse.min.js
- 'js/vendor/fuse.min.js'
Expand Down

0 comments on commit 522e45c

Please sign in to comment.