fix navbar dropdown menu
This commit is contained in:
57
start.sh
57
start.sh
@@ -1,33 +1,8 @@
|
|||||||
|
# builds if executable isn't foound
|
||||||
set +ex
|
if [ ! -f "tailwindcss" ]
|
||||||
# Check if tailwindcss is already installed
|
then
|
||||||
if command -v tailwindcss &> /dev/null; then
|
sh build.sh
|
||||||
echo "tailwindcss is already installed."
|
|
||||||
else
|
|
||||||
# checks OS and architecture for correct release
|
|
||||||
echo "Installing & building tailwind..."
|
|
||||||
|
|
||||||
ASSET="tailwindcss"
|
|
||||||
|
|
||||||
if [[ "$OSTYPE" == "linux-gnu"* ]]; then
|
|
||||||
ASSET="$ASSET-linux"
|
|
||||||
elif [[ "$OSTYPE" == "darwin"* ]]; then
|
|
||||||
ASSET="$ASSET-macos"
|
|
||||||
fi
|
fi
|
||||||
if [[ "$(uname -m)" == "x86_64"* ]]; then
|
|
||||||
ASSET="$ASSET-x64"
|
|
||||||
elif [[ "$(uname -m)" == "arm64"* ]]; then
|
|
||||||
ASSET="$ASSET-arm64"
|
|
||||||
fi
|
|
||||||
pushd /tmp
|
|
||||||
curl -sLO "https://github.com/tailwindlabs/tailwindcss/releases/latest/download/${ASSET}"
|
|
||||||
chmod +x $ASSET
|
|
||||||
mv $ASSET /usr/local/bin/tailwindcss
|
|
||||||
popd
|
|
||||||
fi
|
|
||||||
|
|
||||||
|
|
||||||
source env.sh
|
|
||||||
|
|
||||||
# initialized and configures tailwind if not configured
|
# initialized and configures tailwind if not configured
|
||||||
if [ ! -f "tailwind.config.js" ]
|
if [ ! -f "tailwind.config.js" ]
|
||||||
@@ -37,23 +12,13 @@ then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# compiles tailwind css & launches locally
|
# compiles tailwind css & launches locally
|
||||||
# rm -rf public static/css
|
rm -rf public static/css
|
||||||
# ./tailwindcss -i css/index.css -o ./static/css/index.css --watch
|
./tailwindcss -i css/index.css -o ./static/css/index.css --watch & zola serve &
|
||||||
|
|
||||||
# zola serve &
|
|
||||||
|
|
||||||
# compiles tailwind css for prod & builds project
|
# compiles tailwind css for prod & builds project
|
||||||
# ./tailwindcss -i css/index.css -o ./static/css/index.css --minify
|
./tailwindcss -i css/index.css -o ./static/css/index.css --minify
|
||||||
# zola build
|
zola build
|
||||||
|
|
||||||
# # kills zola and tw bg processes on interrupt
|
# kills zola and tw bg processes on interrupt
|
||||||
# trap 'kill $(jobs -p); exit 1' INT
|
trap 'kill $(jobs -p); exit 1' INT
|
||||||
# wait
|
wait
|
||||||
|
|
||||||
|
|
||||||
rm -rf public static/css
|
|
||||||
tailwindcss -i css/index.css -o ./static/css/index.css --minify
|
|
||||||
|
|
||||||
zola build -o ~/Documents/web/$NAME/
|
|
||||||
|
|
||||||
open ~/Documents/web/$NAME/index.html
|
|
||||||
File diff suppressed because one or more lines are too long
@@ -96,11 +96,9 @@ function hideMenu(menuName) {
|
|||||||
"rotate-0",
|
"rotate-0",
|
||||||
"-rotate-90"
|
"-rotate-90"
|
||||||
);
|
);
|
||||||
setTimeout(function () {
|
|
||||||
if (!menuElement.classList.contains("hidden")) {
|
if (!menuElement.classList.contains("hidden")) {
|
||||||
menuElement.classList.add("hidden");
|
menuElement.classList.add("hidden");
|
||||||
}
|
}
|
||||||
}, 300);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function showHamburger() {
|
function showHamburger() {
|
||||||
|
|||||||
@@ -124,7 +124,7 @@
|
|||||||
{% set menu_id = header_label ~ "-menu" | slugify %}
|
{% set menu_id = header_label ~ "-menu" | slugify %}
|
||||||
|
|
||||||
<nav>
|
<nav>
|
||||||
<div id="{{menu_id}}" class="nav_menu mt-0 sm:mt-0 md:mt-0 lg:mt-0 xl:mt-0 2xl:mt-0 z-30 absolute inset-x-0 transform shadow-lg lg:backdrop-blur xl:backdrop-blur transition duration-200 ease-in opacity-0 -translate-y-1 hidden">
|
<div id="{{menu_id}}" class="nav_menu mt-0 sm:mt-0 md:mt-0 lg:mt-0 xl:mt-0 2xl:mt-0 z-50 absolute inset-x-0 transform shadow-lg lg:backdrop-blur xl:backdrop-blur transition duration-200 ease-in opacity-0 -translate-y-1 hidden">
|
||||||
<div class="bg-white lg:bg-semi-white md:bg-semi-white xl:bg-semi-white">
|
<div class="bg-white lg:bg-semi-white md:bg-semi-white xl:bg-semi-white">
|
||||||
<div id="menu" class="mx-8 lg:mx-10 xl:mx-10 px-6 sm:p-6 md:p-8">
|
<div id="menu" class="mx-8 lg:mx-10 xl:mx-10 px-6 sm:p-6 md:p-8">
|
||||||
{{header_menu | safe }}
|
{{header_menu | safe }}
|
||||||
|
|||||||
Reference in New Issue
Block a user