1+ // Data for sections - Edit these arrays/objects to update content
2+
3+ // Image Slideshow: Add image paths (place images in an 'images' folder in your repo)
4+ const slides = [
5+ 'images/slide1.jpg' ,
6+ 'images/slide2.jpg' ,
7+ 'images/slide3.jpg'
8+ // Add more as needed
9+ ] ;
10+
11+ // Upcoming Shows: Array of gig objects with date in YYYY-MM-DD format
12+ const gigs = [
13+ { date : '2025-10-01' , time : '8:00 PM' , venue : 'Local Theater' , description : 'Poetry Night' } ,
14+ { date : '2025-09-15' , time : '7:00 PM' , venue : 'City Hall' , description : 'Past Event' } , // This will be hidden
15+ // Add more gigs here
16+ ] ;
17+
18+ // About Us: Array of 4 people
19+ const aboutUs = [
20+ {
21+ name : 'Person 1' ,
22+ bio : 'Short bio for Person 1, passionate about poetry and performance.' ,
23+ image : 'images/person1.jpg'
24+ } ,
25+ {
26+ name : 'Person 2' ,
27+ bio : 'Short bio for Person 2, a creative soul with a love for words.' ,
28+ image : 'images/person2.jpg'
29+ } ,
30+ {
31+ name : 'Person 3' ,
32+ bio : 'Short bio for Person 3, blending music and poetry.' ,
33+ image : 'images/person3.jpg'
34+ } ,
35+ {
36+ name : 'Person 4' ,
37+ bio : 'Short bio for Person 4, dedicated to storytelling.' ,
38+ image : 'images/person4.jpg'
39+ }
40+ ] ;
41+
42+ // Guest Artists: Up to 3 people (add fewer if needed)
43+ const guestArtists = [
44+ {
45+ name : 'Guest 1' ,
46+ bio : 'Guest artist with a unique perspective on poetry.' ,
47+ image : 'images/guest1.jpg'
48+ } ,
49+ {
50+ name : 'Guest 2' ,
51+ bio : 'Guest artist known for evocative performances.' ,
52+ image : 'images/guest2.jpg'
53+ }
54+ // Add a third if needed
55+ ] ;
56+
57+ // Our Poetry: Array of poems
58+ const poems = [
59+ {
60+ title : 'Poem 1' ,
61+ content : `Line 1
62+ Line 2
63+ Line 3`
64+ } ,
65+ {
66+ title : 'Poem 2' ,
67+ content : `Another line 1
68+ Another line 2`
69+ }
70+ // Add more poems
71+ ] ;
72+
73+ // Function to initialize slideshow
74+ function initSlideshow ( ) {
75+ const container = document . querySelector ( '.slideshow-container' ) ;
76+ slides . forEach ( ( src , index ) => {
77+ const slide = document . createElement ( 'div' ) ;
78+ slide . classList . add ( 'slide' ) ;
79+ if ( index === 0 ) slide . style . display = 'block' ;
80+ const img = document . createElement ( 'img' ) ;
81+ img . src = src ;
82+ img . alt = `Slide ${ index + 1 } ` ;
83+ slide . appendChild ( img ) ;
84+ container . appendChild ( slide ) ;
85+ } ) ;
86+
87+ let currentSlide = 0 ;
88+ setInterval ( ( ) => {
89+ const slidesElements = document . querySelectorAll ( '.slide' ) ;
90+ slidesElements [ currentSlide ] . style . display = 'none' ;
91+ currentSlide = ( currentSlide + 1 ) % slides . length ;
92+ slidesElements [ currentSlide ] . style . display = 'block' ;
93+ } , 3000 ) ; // Change slide every 3 seconds
94+ }
95+
96+ // Function to populate upcoming shows
97+ function populateGigs ( ) {
98+ const list = document . getElementById ( 'gigs-list' ) ;
99+ const section = document . getElementById ( 'upcoming-shows' ) ;
100+ const now = new Date ( ) ;
101+ const futureGigs = gigs . filter ( gig => new Date ( gig . date ) > now ) ;
102+
103+ if ( futureGigs . length === 0 ) {
104+ section . classList . add ( 'hidden' ) ;
105+ return ;
106+ }
107+
108+ futureGigs . forEach ( gig => {
109+ const li = document . createElement ( 'li' ) ;
110+ li . innerHTML = `<strong>${ gig . date } at ${ gig . time } </strong> - ${ gig . venue } <br>${ gig . description } ` ;
111+ list . appendChild ( li ) ;
112+ } ) ;
113+ }
114+
115+ // Function to populate bios
116+ function populateBios ( containerId , people ) {
117+ const container = document . querySelector ( `#${ containerId } .bio-container` ) ;
118+ people . forEach ( person => {
119+ const div = document . createElement ( 'div' ) ;
120+ div . classList . add ( 'bio' ) ;
121+ div . innerHTML = `
122+ <img src="${ person . image } " alt="${ person . name } ">
123+ <h3>${ person . name } </h3>
124+ <p>${ person . bio } </p>
125+ ` ;
126+ container . appendChild ( div ) ;
127+ } ) ;
128+ }
129+
130+ // Function to populate poems
131+ function populatePoems ( ) {
132+ const container = document . getElementById ( 'poems-container' ) ;
133+ poems . forEach ( poem => {
134+ const div = document . createElement ( 'div' ) ;
135+ div . classList . add ( 'poem' ) ;
136+ div . innerHTML = `
137+ <h3>${ poem . title } </h3>
138+ <p>${ poem . content } </p>
139+ ` ;
140+ container . appendChild ( div ) ;
141+ } ) ;
142+ }
143+
144+ // Initialize everything on page load
145+ window . addEventListener ( 'DOMContentLoaded' , ( ) => {
146+ initSlideshow ( ) ;
147+ populateGigs ( ) ;
148+ populateBios ( 'about-us' , aboutUs ) ;
149+ populateBios ( 'guest-artists' , guestArtists ) ;
150+ populatePoems ( ) ;
151+ } ) ;
0 commit comments