You can find these instructions at https://chnsa.ws/25r.
Create new folders: js & includes.
Create new file in includes: footer.html.
Cut <footer> … </footer> from index.html & paste into footer.html & save it.
You can find these instructions at https://chnsa.ws/25r.
Create new folders: js & includes.
Create new file in includes: footer.html.
Cut <footer> … </footer> from index.html & paste into footer.html & save it.
| // Function to include HTML content below a specified element, id, or class | |
| function includeHTML(url, targetElement = null) { | |
| fetch(url) | |
| .then(response => response.text()) | |
| .then(data => { | |
| const parser = new DOMParser(); | |
| const htmlContent = parser.parseFromString(data, 'text/html'); | |
| const includedContent = htmlContent.querySelector('body').childNodes; | |
| if (targetElement) { |
| font-family: system-ui, -apple-system,"Segoe UI", Roboto, "Helvetica Neue", "Noto Sans", "Liberation Sans", Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji"; |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no"> | |
| <title>Untitled</title> | |
| <link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-LN+7fdVzj6u52u30Kp6M/trliBMCMKTyK833zpbD+pXdCLuTusPj697FH4R/5mcr" crossorigin="anonymous"> | |
| <link rel="stylesheet" href="/css/main.css"> |
| <!DOCTYPE html> | |
| <html lang="en"> | |
| <head> | |
| <meta charset="utf-8"> | |
| <meta name="description" content=""> | |
| <meta name="viewport" content="width=device-width, initial-scale=1"> | |
| <title>Untitled</title> | |
| // Place your settings in this file to overwrite the default settings | |
| { | |
| // Color Picker | |
| "colorHelper.formatsOrder": [ | |
| "hsl", | |
| "hex", | |
| "named" | |
| ], | |
| "css.format.spaceAroundSelectorSeparator": true, | |
| "diffEditor.ignoreTrimWhitespace": false, |
| { | |
| "name": "bootstrap-4", | |
| "version": "1.0.0", | |
| "description": "Bootstrap 4", | |
| "main": "index.js", | |
| "scripts": {}, | |
| "author": "", | |
| "license": "ISC", | |
| "dependencies": { | |
| "bootstrap": "^4.3.1", |
| // Override Bootstrap 4 variables below | |
| // Bootstrap 4 | |
| @import "../node_modules/bootstrap/scss/bootstrap.scss"; | |
| // Site SCSS below |