mirror of
https://github.com/Xevion/v1.xevion.dev.git
synced 2025-12-12 14:13:27 -06:00
added burger menu support, removed a couple imports
This commit is contained in:
23
app/static/script.js
Normal file
23
app/static/script.js
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
console.log('loaded')
|
||||||
|
|
||||||
|
// Close mobile & tablet menu on item click
|
||||||
|
$('.navbar-item').each(function (e) {
|
||||||
|
$(this).click(function () {
|
||||||
|
if ($('#navbar-burger-id').hasClass('is-active')) {
|
||||||
|
$('#navbar-burger-id').removeClass('is-active');
|
||||||
|
$('#navbar-menu-id').removeClass('is-active');
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
|
|
||||||
|
// Open or Close mobile & tablet menu
|
||||||
|
$('#navbar-burger-id').click(function () {
|
||||||
|
console.log("hit")
|
||||||
|
if ($('#navbar-burger-id').hasClass('is-active')) {
|
||||||
|
$('#navbar-burger-id').removeClass('is-active');
|
||||||
|
$('#navbar-menu-id').removeClass('is-active');
|
||||||
|
} else {
|
||||||
|
$('#navbar-burger-id').addClass('is-active');
|
||||||
|
$('#navbar-menu-id').addClass('is-active');
|
||||||
|
}
|
||||||
|
});
|
||||||
@@ -4,7 +4,7 @@
|
|||||||
<head>
|
<head>
|
||||||
{% block title %}
|
{% block title %}
|
||||||
{% if title %}
|
{% if title %}
|
||||||
<title>{{ title }} - Xevion.dev</title>
|
<title>{{ title }} - Xevion.dev</title>
|
||||||
{% else %}
|
{% else %}
|
||||||
<title>Xevion.dev</title>
|
<title>Xevion.dev</title>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
@@ -12,10 +12,8 @@
|
|||||||
{% block head %}
|
{% block head %}
|
||||||
<link href="https://fonts.googleapis.com/css?family=Raleway&display=swap" rel="stylesheet">
|
<link href="https://fonts.googleapis.com/css?family=Raleway&display=swap" rel="stylesheet">
|
||||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css">
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulma/0.7.5/css/bulma.min.css">
|
||||||
<!-- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/bulmaswatch/0.7.2/yeti/bulmaswatch.min.css"> -->
|
|
||||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma-divider@2.0.1/dist/css/bulma-divider.min.css">
|
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bulma-divider@2.0.1/dist/css/bulma-divider.min.css">
|
||||||
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
|
<script defer src="https://use.fontawesome.com/releases/v5.3.1/js/all.js"></script>
|
||||||
<script src="https://cdn.jsdelivr.net/npm/particles.js@2.0.0/particles.min.js"></script>
|
|
||||||
<style type="text/css">
|
<style type="text/css">
|
||||||
/* Single line word breaking for content */
|
/* Single line word breaking for content */
|
||||||
.word-break {
|
.word-break {
|
||||||
@@ -37,15 +35,14 @@
|
|||||||
Xevion
|
Xevion
|
||||||
</a>
|
</a>
|
||||||
|
|
||||||
<a role="button" class="navbar-burger burger" aria-label="menu" aria-expanded="false"
|
<a role="button" id="navbar-burger-id" class="navbar-burger burger" onclick="document.querySelector('.navbar-menu').classList.toggle('is-active');" aria-label="menu" aria-expanded="false">
|
||||||
data-target="navbarBasicExample">
|
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden="true"></span>
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden="true"></span>
|
||||||
<span aria-hidden="true"></span>
|
<span aria-hidden="true"></span>
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="navbarBasicExample" class="navbar-menu">
|
<div id="navbar-menu-id" class="navbar-menu">
|
||||||
<div class="navbar-start">
|
<div class="navbar-start">
|
||||||
{% block navbarstart %}
|
{% block navbarstart %}
|
||||||
<a href="{{ url_for('index') }}" class="navbar-item">Home</a>
|
<a href="{{ url_for('index') }}" class="navbar-item">Home</a>
|
||||||
@@ -62,9 +59,9 @@
|
|||||||
<a href="{{ url_for('signup') }}" class="button is-outlined is-info">Signup</a>
|
<a href="{{ url_for('signup') }}" class="button is-outlined is-info">Signup</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
{% if not hideLogin %}
|
{% if not hideLogin %}
|
||||||
<a href="{{ url_for('login') }}" class="button is-outlined is-info">Login</a>
|
<a href="{{ url_for('login') }}" class="button is-outlined is-info">Login</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|
||||||
{% else %}
|
{% else %}
|
||||||
<a href="{{ url_for('logout') }}" class="button is-outlined is-info">Logout</a>
|
<a href="{{ url_for('logout') }}" class="button is-outlined is-info">Logout</a>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
|
|||||||
Reference in New Issue
Block a user