Skip to content

Latest commit

 

History

History
171 lines (132 loc) · 6.89 KB

File metadata and controls

171 lines (132 loc) · 6.89 KB

Website Template - NO BOOTSTRAP

Chapter 2

Features

Welcome Splash

When the page is loaded a splash is display for about 5 seconds. It contains a heading and an image.

Desktop Screenshot with Cookie Consent
Desktop Screenshot with Cookie Consent

Cookie Consent

The cookie consent and the use of cookies is independent of the rest of the HTML/CSS/JavaScript. If you want to quickly disable the consent and use of cookies then edit index.html and comment out the line -

    <script src="./assets/js/cookies.js"></script>

Change it to:

    <!-- <script src="./assets/js/cookies.js"></script> -->
Desktop Screenshot with Cookie Consent
Desktop Screenshot with Cookie Consent

Gallery

This is a dynamically created gallery. It designed to create the necessary HTML/CSS when the page is loaded. The image URLs are stored in a list. It's only necessary to edit the list and the gallery will change on the next page load.

CSS Grid was used to arrange the images.

Screen Shot Chrome on Android 12
Simple Image Gallery

Lightbox

This lightbox is also dynamically created. However, the HTML/CSS is not created until an image is selected from the gallery.

While the lightbox is active page scrolling is disabled.

Simple Image Lightbox
Simple Image Lightbox

Contact Form

This is just a basic contact form without validation or email capability, and the form fields were laid out using CSS Grid. There is also a character counter for the message box.

Basic Contact Form
Basic Contact Form

Theme Switch

This demonstrates dynamic loading of CSS files. There is a collection of CSS files that set the colors.

Color Theme Example - Alt 2 Color Theme Example - Alt 4
Color Theme Examples

NOTE: If the cookie consent was accepted the theme choice will be saved to a cookie. If the consent is declined then no cookie will be saved. When the page loads if the consent cookie is present then the theme cookie is read and it's contents contain the theme CSS file name and the ID of the radio button that selected it.

Develop and Debug

This was created out of necessity. I was testing on my phone and couldn't find my USB cable for remote debugging. And I needed to see some run-time variables and test results. This "devdebug" output is optional and is off by default. To enable it add devdebug in the query:

http[s]://your-webserver/path/to/?devdebug
Optional Debug Data Ouput
Optional Debug Data Ouput

Details

From top to bottom the pieces are:

This is some data from the to top button.
This is some data from the "to top" button.

This is the test result for loading and executing a JavaScript file.
This is the test result for loading and executing a JavaScript file.

This is the result of detecting the browser.
This is the result of detecting the browser.

This is the result of waiting for and responding to CSS events.
This is the result of waiting for and responding to CSS events.

First page load, no cookies have been saved.
First page load, no cookies have been saved.

The cookie consent has been accepted and a theme was saved.
The cookie consent has been accepted and a theme was saved.

Continue

To chapter 3 - Desktop vs Mobile...