2023-08-13 11:57:38 +00:00
/* ------ STAR WARS KOTOR SHRINE HEADER COMPONENT ------ */
document . querySelector ( ".main-header" ) . innerHTML = `
< img src = "/shrines/starwarskotor/img/swkotor-header.jpg" alt = "" >
` ;
/* Navigation component content */
document . querySelector ( ".navbar" ) . innerHTML = `
< ul class = "nav__menu" >
2023-08-30 01:36:02 +00:00
< li > < a href = "/shrines/starwarskotor/" > Shrine Home < / a > < / l i >
2023-08-13 11:57:38 +00:00
< li > < a href = "/shrines/starwarskotor/articles/" > Articles < / a > < / l i >
< li > < a href = "/shrines/starwarskotor/guides/" > Guides < / a > < / l i >
< li > < a href = "/shrines/starwarskotor/resources/" > Resources < / a > < / l i >
2023-08-21 04:36:06 +00:00
< li > < a href = "/shrines/starwarskotor/universes/" > Universes < / a > < / l i >
2023-08-13 11:57:38 +00:00
< li > < a href = "/home.html" > Main Site < / a > < / l i >
< / u l >
` ;
// Make the navigation bar sticky
const header = document . querySelector ( ".main-header" ) ;
const navbar = document . querySelector ( ".navbar" ) ;
window . addEventListener ( "scroll" , e => {
const scrollPos = window . scrollY || document . documentElement . scrollTop ;
const stickyLine = header . scrollHeight - navbar . scrollHeight ;
if ( scrollPos > stickyLine ) {
navbar . classList . add ( "sticky-nav" ) ;
} else {
navbar . classList . remove ( "sticky-nav" ) ;
}
} ) ;
/* ------ STAR WARS KOTOR SHRINE SIDEBAR COMPONENT ------ */
document . querySelector ( ".right-sidebar" ) . innerHTML = `
< div class = "sidebar--sticky" >
< h2 > About < / h 2 >
< p > < cite > Star Wars : Knights of the Old Republic < / c i t e > i s a s p a c e o p e r a r o l e - p l a y i n g v i d e o g a m e s e r i e s t h a t t a k e s p l a c e i n t h e < c i t e > S t a r W a r s < / c i t e > u n i v e r s e . T h e s t o r y t a k e s p l a c e a p p r o x i m a t e l y 4 , 0 0 0 y e a r s b e f o r e t h e r i s e o f t h e G a l a c t i c E m p i r e . < / p >
< h2 > Fan Listings < / h 2 >
< p > I have joined these fan listings for the < cite > KotOR < / c i t e > g a m e s : < / p >
< a href = "https://glitterskies.org/kotor/" target = "_blank" > < img src = "/links/fanlistings/kotor-100x50.png" alt = "A website button of a Star Wars: Knights of the Old Republic fanlisting" title = "Erased Identity - Star Wars: Knights of the Old Republic fanlisting" > < / a >
< a href = "https://glitterskies.org/kotor2/" target = "_blank" > < img src = "/links/fanlistings/kotor2-100x50.jpg" alt = "A website button of a Star Wars: Knights of the Old Republic 2 fanlisting" title = "Mysteries of Malachor - Star Wars: Knights of the Old Republic 2: The Sith Lords fanlisting" > < / a >
< / d i v >
` ;
/* ------ STAR WARS KOTOR SHRINE FOOTER COMPONENT ------ */
document . querySelector ( ".main-footer" ) . innerHTML = `
2023-08-30 09:59:58 +00:00
< p > Made with ♥ and the Force by Leilukin | Shrine Launched : 17 February 2023 < / p >
< p >
< a href = "#page-top" >
< i class = "fa fa-arrow-up" > < /i> Back to top <i class="fa fa-arrow-up"></i >
< / a >
< / p >
2023-08-13 11:57:38 +00:00
` ;