✨feature: Add script to tag external links to open in new tab and add class for styling
This commit is contained in:
@@ -5,6 +5,7 @@
|
||||
import { registerButtonComponent } from './components/button.js';
|
||||
import { registerBackToTopButton } from './components/backToTop.js';
|
||||
import GetHeaderHeight from './modules/GetHeaderHeight.js';
|
||||
import tagExternalLinks from './modules/TagExternalLinks.js';
|
||||
import Navigation from './modules/Navigation.js';
|
||||
|
||||
// Add passive event listeners
|
||||
@@ -50,23 +51,26 @@ import Navigation from './modules/Navigation.js';
|
||||
* Application entrypoint
|
||||
*/
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
// Register button component
|
||||
registerButtonComponent();
|
||||
registerBackToTopButton();
|
||||
// Tag external links
|
||||
tagExternalLinks();
|
||||
|
||||
// Initialize Navigation
|
||||
const navigation = new Navigation('navMainToggle', '.menu-vdi__toggle');
|
||||
// Register button component
|
||||
registerButtonComponent();
|
||||
registerBackToTopButton();
|
||||
|
||||
// Initialize Navigation
|
||||
navigation.desktopMenuDropdowns();
|
||||
navigation.mobileMenuToggle();
|
||||
// Initialize Navigation
|
||||
const navigation = new Navigation('navMainToggle', '.menu-vdi__toggle');
|
||||
|
||||
// Initialize Header Height
|
||||
GetHeaderHeight();
|
||||
// Initialize Navigation
|
||||
navigation.desktopMenuDropdowns();
|
||||
navigation.mobileMenuToggle();
|
||||
|
||||
// Add Back to Top button to body
|
||||
const backToTop = document.createElement('back-to-top');
|
||||
document.body.appendChild(backToTop);
|
||||
// Initialize Header Height
|
||||
GetHeaderHeight();
|
||||
|
||||
// Add Back to Top button to body
|
||||
const backToTop = document.createElement('back-to-top');
|
||||
document.body.appendChild(backToTop);
|
||||
});
|
||||
|
||||
console.log(`theme.js loaded.`);
|
||||
|
||||
Reference in New Issue
Block a user