Skip to content

Instantly share code, notes, and snippets.

View andyfutcher's full-sized avatar

Andy Futcher andyfutcher

View GitHub Profile
@andyfutcher
andyfutcher / head-snippet.html
Last active August 26, 2025 08:38
Main JS HTML Less Snippet; this helps speed up page-speed and lighthouse scores by deferring resources until the DOM has loaded fully.
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Main.HTML Page Customisation: START -->
<!-- Page Encoding -->
<meta charset="UTF-8" />
<!-- Page Meta -->
<title>Blank Main JS Snippet</title>
<meta name="author" content="Your Name">
@andyfutcher
andyfutcher / publish.bash
Last active August 6, 2025 20:31
Publish Script example; useful for Main HTML and Main.JS for hosting a website on Google Cloud and Google CDN.
# GNU General Public License v3.0
# Main HTML is an accessibility aware template putting users and web developers first, Copyright (C) 2025 Andy Futcher. See <https://mainhtml.dev/> for more
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
## Main.HTML not modified from original. Date: 2025-08-01
# Feferences: https://cloud.google.com/sdk/gcloud/reference/storage/cp
# Load Configuration
publish_config="publish.config.bash";
source "$publish_config"; # Loa
@andyfutcher
andyfutcher / default.css
Last active August 21, 2025 20:43
Default.CSS theme template; includes social icons, light and dark mode and tooltip controls.
/* GNU General Public License v3.0
# Main HTML is an accessibility aware template putting users and web developers first, Copyright (C) 2025 Andy Futcher. See <https://mainhtml.dev/> for more
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
## Main.HTML not modified from original. Date: 2025-08-01 ### --> */
/* Main HTML Theme Colours */
:root { /* Page Boundaries */
--page-width:1040px;
--page-margin:auto; /*auto*/
@andyfutcher
andyfutcher / main.html
Last active August 26, 2025 08:38
Main.HTML template; example controls for Main.JS support, including Head Snippets and CSS Wireframe.
<!DOCTYPE html>
<html lang="en">
<head>
<!-- Main.HTML Page Customisation: START -->
<!-- Page Encoding -->
<meta charset="UTF-8" />
<!-- Page Meta -->
<title>Main HTML Template</title>
<meta name="author" content="Your Name">
@andyfutcher
andyfutcher / sitemap.xml
Created August 6, 2025 20:01
Sitemap.xml examples; Combining sitemaps, image sitemaps and sitemap indexes for maximum visibility.
<?xml version="1.0" encoding="UTF-8"?>
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9" xmlns:image="http://www.google.com/schemas/sitemap-image/1.1">
<!-- This sitemap.xml file lists all pages to be indexed and any optional images -->
<url>
<loc>https://www.mainhtml.dev/</loc>
<image:image><image:loc>https://www.mainhtml.dev/images/logo.png</image:loc></image:image>
</url>
<url>
<loc>https://www.mainhtml.dev/project/</loc>
<image:image><image:loc>https://www.mainhtml.dev/images/logo.png</image:loc></image:image>
@andyfutcher
andyfutcher / humans.txt
Created August 6, 2025 19:47
Robots.txt example, Main.JS combines this with humans.txt for reliable fetch() controller.
# Human Readability
## Website Metadata
author: Your Name
website: Your Website
## Main.JS Directive
### Include optional Main.JS property controls here:
main.js.network.capable: true
@andyfutcher
andyfutcher / main.css
Last active August 26, 2025 08:39
Main.CSS v0.6.50 - Main CSS is a theme ready stylesheet wireframe designed for browser conformity and core web-vitals.
/* GNU General Public License v3.0
# Main HTML is an accessibility aware template putting users and web developers first, Copyright (C) 2025 Andy Futcher. See <https://www.mainhtml.dev/> for more
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
## Main.HTML modified for light mode only with Lotti Beans. Date: 2025-08-26 ### --> */
/* Wireframe */
*,*::before,*::after {box-sizing:border-box;margin:0;padding:0;
} :root {--ver-major:0;--ver-minor:7;--ver-pat
@andyfutcher
andyfutcher / main.js
Last active August 26, 2025 08:39
Main.JS v0.7 - An easy-to-use, modern, lightweight and portable website JavaScript framework.
/* GNU General Public License v3.0
# Main JS is a modern, lightweight and portable website JavaScript framework, Copyright (C) 2025 Andy Futcher. See <https://mainjs.org/> for more
# This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
# This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
## Main.JS not modified from original. Date: 2025-08-26 ### */
/* Main.JS Bootloader */
main=window.main||window['main']||{};main.js=main.js||{create:{}};let create=main.js.create; // Main Namespaces
switch(typeof main.js.loaded