Gitignore, "selfhosted" menu section

This commit is contained in:
DarkCat09 2022-10-13 13:34:50 +04:00
parent 9c4115b9ed
commit aadf941df7
4 changed files with 106 additions and 20 deletions

2
.gitignore vendored Normal file
View file

@ -0,0 +1,2 @@
dist/
.vscode/

View file

@ -4,6 +4,7 @@ RED='\033[1;31m'
GREEN='\033[1;32m'
YELLOW='\033[1;33m'
BLUE='\033[1;34m'
BOLD='\033[1m'
RESET='\033[0m'
minjs="dist/script.min.js"
@ -19,9 +20,15 @@ title() {
echo -e "${BLUE}[*]${RESET} $1"
}
start() {
echo
echo -e "${YELLOW}[+]${RESET} ${BOLD}Building web site in:${RESET}"
echo -e "${BOLD}$PWD${RESET}"
}
success() {
echo
echo -e "${GREEN}[V]${RESET} Done"
echo -e "${GREEN}[V]${RESET} ${BOLD}Done${RESET}"
echo
}
@ -46,7 +53,6 @@ html_minify () {
--collapse-whitespace \
--remove-attribute-quotes \
--remove-comments \
--remove-optional-tags \
--remove-script-type-attributes \
--remove-style-link-type-attributes \
--use-short-doctype \
@ -61,6 +67,11 @@ copy_files() {
find -maxdepth 1 -exec bash -c "if [[ {} =~ $regex ]]; then :; else cp -r {} dist/; fi" \;
}
start
title "Creating dist/"
mkdir -p dist/
title "Checking dependencies"
check_deps terser
check_deps lessc
@ -68,8 +79,6 @@ check_deps cleancss
check_deps html-minifier
check_deps python3
mkdir dist/
title "Minifying JS"
js_minify
@ -79,8 +88,10 @@ lessc "styles.less" "$mincss"
title "Minifying CSS"
cleancss -o "$mincss" "$mincss"
title "Minifying HTML"
title "Editing HTML"
cat index.html | python3 html_conv.py "$minjs_name" "$mincss_name" >"$minhtml"
title "Minifying HTML"
html_minify "$minhtml"
title "Copying other files"

View file

@ -47,6 +47,7 @@
</a>
</label>
</li>
<!--
<li>
<input type="radio" name="section-input" id="help-section">
<label for="help-section">
@ -55,6 +56,7 @@
</a>
</label>
</li>
-->
</ul>
<div class="row-fill"></div>
<ul class="section">
@ -876,6 +878,61 @@
</div>
</div>
</div>
<div class="hidden" id="selfhosted">
<div class="card">
<div>Hosted on Raspberry Pi 4B</div>
<div>
<div class="icon">
<i class="fa-solid fa-house"></i>
</div>
<div class="content">
<a href="https://dc09.ru" target="_blank">
dc09.ru
</a>
</div>
</div>
<div>
<div class="icon">
<i class="fa-brands fa-git-alt"></i>
</div>
<div class="content">
<a href="https://git.dc09.ru" target="_blank">
git.dc09.ru
</a>
</div>
</div>
<div>
<div class="icon">
<i class="fa-solid fa-link"></i>
</div>
<div class="content">
<a href="https://url.dc09.ru" target="_blank">
url.dc09.ru
</a>
</div>
</div>
<div>
<div class="icon">
<i class="fa-solid fa-address-book"></i>
</div>
<div class="content">
<a href="https://sync.dc09.ru" target="_blank">
sync.dc09.ru
</a>
</div>
</div>
<div>
<div class="icon">
<i class="fa-brands fa-wikipedia-w"></i>
</div>
<div class="content">
<a href="https://wt.dc09.ru" target="_blank">
wt.dc09.ru
</a>
</div>
</div>
</div>
</div>
</div>
<!-- Context Menu -->
<div class="menu context-menu">

View file

@ -203,8 +203,8 @@ a {
}
.icon {
width: 1.5rem;
font-size: 1.25rem;
width: 1.5rem !important;
font-size: 1.25rem !important;
}
.inline-popup {
@ -272,8 +272,15 @@ a {
justify-content: center;
i {
width: 100%;
width: 1.1rem;
text-align: center;
display: flex;
flex-direction: row;
justify-content: center;
}
img {
width: 1rem;
}
}
}
@ -287,18 +294,6 @@ a {
padding: 4px 3px;
}
.icon {
i {
width: 1.1rem;
display: flex;
flex-direction: row;
justify-content: center;
}
img {
width: 1rem;
}
}
.content {
display: flex;
flex-direction: row;
@ -367,6 +362,27 @@ a {
}
}
}
#selfhosted {
.card {
& > div {
margin-top: 0;
padding: 5px;
border-radius: 5px;
a {
display: block;
}
&:hover {
background-color: @menuhl;
}
}
}
}
}
.context-menu {