Added page for Lucy

This commit is contained in:
Jason Williams
2022-11-20 12:30:15 -07:00
parent 09179986a3
commit 78d49c9bc0
5 changed files with 128 additions and 4 deletions

View File

@@ -1,13 +1,48 @@
openPerson = false
$(() => {
// Detect page URL
path = window.location.pathname.replace(/\//g, '')
if (path == 'jason' || path == 'flo' || path == 'lucy') {
// A specific path has been set. Display the profile for that person
openPerson = path
// CHANGE THE DISPLAY HERE FOR JASON / FLO
// Display content for the relevant person, and hide other content
$('.main.not' + openPerson).css({
width: 0,
height: 0,
minHeight: 0
})
$('#main-' + openPerson).css('min-height', '100vh')
$('#splash-' + openPerson).css({
width: '50vw',
height: '100vh'
})
// Animate the display of links
$('#links-' + openPerson).animate({
height: $('#links-' + openPerson).get(0).scrollHeight
}, {
duration: 300,
queue: true
})
}
// Handle clicks on profile links (by doing nothing)
$('a.openlink').click(function(e) {
e.preventDefault();
})
// Handle clicks on the banner
$('div.banner').click(function() {
if (typeof $(this).attr('data-person') == 'undefined') return;
// If no profile is open, open one...
if (!openPerson) {
// If no profile is open, open one...
openPerson = $(this).attr('data-person')
if (window.matchMedia('(orientation: portrait)').matches) {