mirror of
https://github.com/thecyberlearn/quantum-website-2026.git
synced 2026-08-18 07:43:20 +00:00
# quantum-website-main
fix: rename header.js → shared-header.js; add .htaccess for Hostinger # quantum_blog_claude_app fix: update shared header URL to shared-header.js # site-auditor fix: update shared header URL to shared-header.js
This commit is contained in:
parent
d2e4063cf8
commit
80a39e1a2a
55
.htaccess
Normal file
55
.htaccess
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
Options -Indexes
|
||||||
|
|
||||||
|
# ── Routing: clean URLs ──────────────────────────────────────────
|
||||||
|
<IfModule mod_rewrite.c>
|
||||||
|
RewriteEngine On
|
||||||
|
|
||||||
|
# www → non-www redirect
|
||||||
|
RewriteCond %{HTTP_HOST} ^www\.quantumtaskai\.com [NC]
|
||||||
|
RewriteRule ^(.*)$ https://quantumtaskai.com/$1 [R=301,L]
|
||||||
|
|
||||||
|
# Serve .html files without extension
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-f
|
||||||
|
RewriteCond %{REQUEST_FILENAME} !-d
|
||||||
|
RewriteCond %{REQUEST_FILENAME}.html -f
|
||||||
|
RewriteRule ^(.*)$ $1.html [L]
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# ── Custom 404 ────────────────────────────────────────────────────
|
||||||
|
ErrorDocument 404 /404.html
|
||||||
|
|
||||||
|
# ── Security headers ─────────────────────────────────────────────
|
||||||
|
<IfModule mod_headers.c>
|
||||||
|
Header always set X-Frame-Options "SAMEORIGIN"
|
||||||
|
Header always set X-Content-Type-Options "nosniff"
|
||||||
|
Header always set X-XSS-Protection "1; mode=block"
|
||||||
|
Header always set Referrer-Policy "strict-origin-when-cross-origin"
|
||||||
|
Header always set Permissions-Policy "camera=(), microphone=(), geolocation=()"
|
||||||
|
|
||||||
|
# ── Caching: HTML (1 hour) ──────────────────────────────────────
|
||||||
|
<FilesMatch "\.html$">
|
||||||
|
Header set Cache-Control "public, max-age=3600, must-revalidate"
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# ── Caching: Static assets (1 year) ────────────────────────────
|
||||||
|
<FilesMatch "\.(ico|png|jpg|jpeg|webp|gif|svg|woff|woff2|ttf|css)$">
|
||||||
|
Header set Cache-Control "public, max-age=31536000, immutable"
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# ── Caching: JS (1 year) ────────────────────────────────────────
|
||||||
|
<FilesMatch "\.js$">
|
||||||
|
Header set Cache-Control "public, max-age=31536000, immutable"
|
||||||
|
</FilesMatch>
|
||||||
|
|
||||||
|
# ── Caching: shared-header.js (1 hour — overrides JS rule above)
|
||||||
|
<FilesMatch "^shared-header\.js$">
|
||||||
|
Header set Cache-Control "public, max-age=3600, must-revalidate"
|
||||||
|
</FilesMatch>
|
||||||
|
</IfModule>
|
||||||
|
|
||||||
|
# ── Gzip compression ─────────────────────────────────────────────
|
||||||
|
<IfModule mod_deflate.c>
|
||||||
|
AddOutputFilterByType DEFLATE text/html text/plain text/css
|
||||||
|
AddOutputFilterByType DEFLATE application/javascript application/json
|
||||||
|
AddOutputFilterByType DEFLATE image/svg+xml
|
||||||
|
</IfModule>
|
||||||
2
404.html
2
404.html
@ -64,7 +64,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/header.js"></script>
|
<script src="/shared-header.js"></script>
|
||||||
<div class="page">
|
<div class="page">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
<div class="num">404</div>
|
<div class="num">404</div>
|
||||||
|
|||||||
12
CLAUDE.md
12
CLAUDE.md
@ -14,7 +14,7 @@ digital-branding.html — AI Digital Branding services page (SOSTAC+RACE)
|
|||||||
privacy.html — Privacy Policy
|
privacy.html — Privacy Policy
|
||||||
terms.html — Terms of Service
|
terms.html — Terms of Service
|
||||||
404.html — Custom 404 page
|
404.html — Custom 404 page
|
||||||
header.js — Shared self-injecting header (loaded cross-domain)
|
shared-header.js — Shared self-injecting header (loaded cross-domain)
|
||||||
robots.txt — Search engine crawl instructions
|
robots.txt — Search engine crawl instructions
|
||||||
sitemap.xml — XML sitemap (4 pages)
|
sitemap.xml — XML sitemap (4 pages)
|
||||||
Dockerfile — nginx:alpine image
|
Dockerfile — nginx:alpine image
|
||||||
@ -25,12 +25,12 @@ img/ — logo.png, favicon.ico, favicon-*.png, apple-touch-ic
|
|||||||
|
|
||||||
## Shared Header
|
## Shared Header
|
||||||
|
|
||||||
`header.js` is a self-injecting IIFE loaded by all Quantum Tasks AI apps:
|
`shared-header.js` is a self-injecting IIFE loaded by all Quantum Tasks AI apps:
|
||||||
- Static site: `<script src="/header.js">`
|
- Static site: `<script src="/shared-header.js">`
|
||||||
- Blog (blog.quantumtaskai.com): `<script src="https://quantumtaskai.com/header.js">`
|
- Blog (blog.quantumtaskai.com): `<script src="https://quantumtaskai.com/shared-header.js">`
|
||||||
- Auditor (audit.quantumtaskai.com): `<script src="https://quantumtaskai.com/header.js">`
|
- Auditor (audit.quantumtaskai.com): `<script src="https://quantumtaskai.com/shared-header.js">`
|
||||||
|
|
||||||
To update nav links or colors across all apps — edit `header.js` only.
|
To update nav links or colors across all apps — edit `shared-header.js` only.
|
||||||
|
|
||||||
## Local Development
|
## Local Development
|
||||||
|
|
||||||
|
|||||||
@ -680,7 +680,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<script src="/header.js"></script>
|
<script src="/shared-header.js"></script>
|
||||||
|
|
||||||
<main id="main-content">
|
<main id="main-content">
|
||||||
|
|
||||||
|
|||||||
@ -890,7 +890,7 @@
|
|||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
|
|
||||||
<script src="/header.js"></script>
|
<script src="/shared-header.js"></script>
|
||||||
|
|
||||||
<main id="main-content">
|
<main id="main-content">
|
||||||
|
|
||||||
|
|||||||
@ -61,7 +61,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/header.js"></script>
|
<script src="/shared-header.js"></script>
|
||||||
|
|
||||||
<div class="page-hero">
|
<div class="page-hero">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
Shared Header — hosted at https://quantumtaskai.com/header.js
|
Shared Header — hosted at https://quantumtaskai.com/shared-header.js
|
||||||
Update nav links and colors in this file only.
|
Update nav links and colors in this file only.
|
||||||
All connected apps will reflect changes on next page load.
|
All connected apps will reflect changes on next page load.
|
||||||
To bust cache after updates, add ?v=2 to the script src.
|
Cache: 1 hour (set via .htaccess) — no version bumps needed.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
(function () {
|
(function () {
|
||||||
@ -61,7 +61,7 @@
|
|||||||
</style>
|
</style>
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<script src="/header.js"></script>
|
<script src="/shared-header.js"></script>
|
||||||
|
|
||||||
<div class="page-hero">
|
<div class="page-hero">
|
||||||
<div class="inner">
|
<div class="inner">
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user