Basic buttons working.
This commit is contained in:
parent
3683d5eae6
commit
5d45c14a7e
@ -9,10 +9,10 @@ import com.jessebrault.site.icon.BarsIcon
|
|||||||
<h2>$siteTagLine</h2>
|
<h2>$siteTagLine</h2>
|
||||||
</div>
|
</div>
|
||||||
<nav>
|
<nav>
|
||||||
<button class="bars-wrapper">
|
<button id="nav-bars" class="bars-wrapper">
|
||||||
<BarsIcon />
|
<BarsIcon />
|
||||||
</button>
|
</button>
|
||||||
<ul>
|
<ul id="nav-items">
|
||||||
<Each items={menuItems} transform={<li><a href={it.path}>$it.name</a></li>} />
|
<Each items={menuItems} transform={<li><a href={it.path}>$it.name</a></li>} />
|
||||||
</ul>
|
</ul>
|
||||||
</nav>
|
</nav>
|
||||||
|
@ -21,6 +21,7 @@ import com.jessebrault.site.icon.YoutubeIcon
|
|||||||
</div>
|
</div>
|
||||||
<p>Copyright $copyrightYear Jesse R. Brault. All rights reserved.</p>
|
<p>Copyright $copyrightYear Jesse R. Brault. All rights reserved.</p>
|
||||||
</footer>
|
</footer>
|
||||||
|
<script src="/main.js"></script>
|
||||||
<Each items={pageScripts} transform={<script src={it}></script>} />
|
<Each items={pageScripts} transform={<script src={it}></script>} />
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
<div class="banner-text blurb-container">
|
<div class="banner-text blurb-container">
|
||||||
<p id="jesse-brault-name">Jesse Brault</p>
|
<p id="jesse-brault-name">Jesse Brault</p>
|
||||||
<p>American conductor, composer, and developer.</p>
|
<p>American conductor, composer, and developer.</p>
|
||||||
<button type="button">Read More</button>
|
<button id="biography-read-more-button" type="button">Read More</button>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
@ -3,9 +3,9 @@ package com.jessebrault.site.biography
|
|||||||
|
|
||||||
import com.jessebrault.site.StandardPage
|
import com.jessebrault.site.StandardPage
|
||||||
---
|
---
|
||||||
<StandardPage title={title} banner={<BiographyBanner />}>
|
<StandardPage title={title} banner={<BiographyBanner />} pageScripts={['/biography.js']}>
|
||||||
<div class="article-container">
|
<div class="article-container">
|
||||||
<article>
|
<article id="biography-article">
|
||||||
<%= renderBiography() %>
|
<%= renderBiography() %>
|
||||||
</article>
|
</article>
|
||||||
</div>
|
</div>
|
||||||
|
7
static/biography.js
Normal file
7
static/biography.js
Normal file
@ -0,0 +1,7 @@
|
|||||||
|
window.addEventListener('load', function () {
|
||||||
|
const readMoreButton = document.getElementById('biography-read-more-button')
|
||||||
|
const biographyArticle = document.getElementById('biography-article')
|
||||||
|
readMoreButton.addEventListener('click', function () {
|
||||||
|
biographyArticle.scrollIntoView({ behavior: 'smooth' })
|
||||||
|
})
|
||||||
|
})
|
@ -420,6 +420,21 @@ form.contact {
|
|||||||
margin: 0;
|
margin: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@media screen and (max-width: 767px) {
|
||||||
|
nav ul {
|
||||||
|
position: absolute;
|
||||||
|
left: 0;
|
||||||
|
z-index: 1;
|
||||||
|
width: 100%;
|
||||||
|
display: none;
|
||||||
|
flex-direction: column;
|
||||||
|
align-items: center;
|
||||||
|
row-gap: 10px;
|
||||||
|
background-color: var(--petrol);
|
||||||
|
padding: 20px;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@media screen and (min-width: 768px) {
|
@media screen and (min-width: 768px) {
|
||||||
html {
|
html {
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
13
static/main.js
Normal file
13
static/main.js
Normal file
@ -0,0 +1,13 @@
|
|||||||
|
window.addEventListener('load', function () {
|
||||||
|
const navBars = document.getElementById('nav-bars')
|
||||||
|
const navItems = document.getElementById('nav-items')
|
||||||
|
navBars.addEventListener('click', function () {
|
||||||
|
if (window.matchMedia('screen and (max-width: 767px)').matches) {
|
||||||
|
if (navItems.style.display === 'flex') {
|
||||||
|
navItems.style.display = 'none'
|
||||||
|
} else {
|
||||||
|
navItems.style.display = 'flex'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
})
|
Loading…
Reference in New Issue
Block a user