Skip to content

Commit

Permalink
Hide hamburger after clicking anywhere else on page & publish
Browse files Browse the repository at this point in the history
  • Loading branch information
Furrman committed Dec 21, 2022
1 parent 7517350 commit 19641c7
Show file tree
Hide file tree
Showing 4 changed files with 139 additions and 41 deletions.
21 changes: 15 additions & 6 deletions docs/preview/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,11 +47,19 @@ <h1 id="logotype">TWARDY FITNESS CENTER</h1>
<li class="prices-section"><a href="#prices-section">CENNIK</a></li>
<li class="contact-section"><a href="#contact-section">KONTAKT</a></li>
</ul>
<div class="burger">
<span></span>
<span></span>
<span></span>
</div>

<input id="menu-toggle" type="checkbox" />
<label class='menu-button-container' for="menu-toggle">
<div class='menu-button'></div>
</label>

<ul class="menu">
<li class="intro-section active"><a href="#intro-section">INTRO</a></li>
<li class="about-section"><a href="#about-section">O MNIE</a></li>
<li class="gallery-section"><a href="#gallery-section">GALERIA</a></li>
<li class="prices-section"><a href="#prices-section">CENNIK</a></li>
<li class="contact-section"><a href="#contact-section">KONTAKT</a></li>
</ul>
</nav>
</header>

Expand All @@ -69,7 +77,7 @@ <h1 id="logotype">TWARDY FITNESS CENTER</h1>

<div class="rotate-notification">
<img class="rotate-image" src="../assets/images/rotate-phone.png" />
<p class="rotate-label">Obróć telefon do pełnego widoku video</p>
<p class="rotate-label">Obróć telefon do pełnego widoku wideo</p>
</div>

<div class="h2-container">
Expand Down Expand Up @@ -135,4 +143,5 @@ <h2 class="primary-color">PÓŁŚRODKÓW</h2>
<script src="lib/jquery/dist/jquery.js"></script>
<script src="lib/bootstrap/dist/js/bootstrap.min.js"></script>
<script src="js/nav-scroll.js"></script>
<script src="js/nav-hamburger.js"></script>
</html>
5 changes: 5 additions & 0 deletions docs/preview/js/nav-hamburger.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
jQuery(document).ready(function($) {
$('body').on('mousedown', function() {
$('#menu-toggle').prop('checked', false);
});
});
152 changes: 118 additions & 34 deletions docs/preview/styles/css/style.css

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

2 changes: 1 addition & 1 deletion docs/preview/styles/css/style.css.map

Large diffs are not rendered by default.

0 comments on commit 19641c7

Please sign in to comment.