Add new templates and tests for improved functionality
- Created index.html template for the homepage with service cards and partner logos. - Added page_from_md.html template for rendering pages from markdown. - Developed services.html template detailing various services offered. - Implemented tests for link handling in markdown, ensuring external links open in new tabs and internal links function correctly. - Enhanced markdown parser tests to validate heading extraction, content rendering, and link safety. - Introduced utility tests for template rendering, HTML minification, and JavaScript minification. Co-authored-by: Copilot <copilot@github.com>
This commit is contained in:
@@ -0,0 +1,565 @@
|
||||
/* Color Palette and Typography */
|
||||
|
||||
/* Global Styles */
|
||||
:root {
|
||||
--primary: #10263d;
|
||||
--secondary: #1b3c52;
|
||||
--tertiary: #2f74ad;
|
||||
--quaternary: #a3523f;
|
||||
--quinary: #d9834d;
|
||||
--white: #ffffff;
|
||||
--black: var(--primary);
|
||||
--black-translucent: rgba(16, 38, 61, 0.55);
|
||||
--black-translucent-hover: rgba(16, 38, 61, 0.75);
|
||||
--color-background: var(--primary);
|
||||
--color-text: var(--primary);
|
||||
--color-text-inverse: var(--white);
|
||||
--color-link: #1f5f96;
|
||||
--color-link-hover: #174875;
|
||||
--color-link-inverse: var(--secondary);
|
||||
--color-background-inverse: var(--white);
|
||||
--color-muted: #e8eef6;
|
||||
--color-muted-hover-bg: #2b5677;
|
||||
--header-start: #0b8f69;
|
||||
--header-end: #083f76;
|
||||
--hero-start: #087f5d;
|
||||
--hero-end: #062f5c;
|
||||
--color-gray-50: oklch(98.5% 0.002 247.839);
|
||||
--color-gray-dark: var(--primary);
|
||||
--color-gray-medium-dark: var(--secondary);
|
||||
--color-border-faint: rgba(255, 255, 255, 0.72);
|
||||
--color-input-border: #a8b6c7;
|
||||
--bg-inverse: var(--secondary);
|
||||
}
|
||||
*,
|
||||
*::before,
|
||||
*::after {
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
html {
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
|
||||
body {
|
||||
font-family: ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji",
|
||||
"Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
|
||||
line-height: 1.3;
|
||||
color: var(--color-text);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
width: 100%;
|
||||
overflow-x: hidden;
|
||||
}
|
||||
a {
|
||||
color: var(--color-link);
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:hover {
|
||||
color: var(--color-link-hover);
|
||||
text-decoration: underline;
|
||||
}
|
||||
a:focus-visible,
|
||||
button:focus-visible,
|
||||
input:focus-visible,
|
||||
textarea:focus-visible {
|
||||
outline: 2px solid var(--quinary);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
svg {
|
||||
max-width: 64px;
|
||||
max-height: 64px;
|
||||
}
|
||||
img,
|
||||
video,
|
||||
iframe {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
}
|
||||
|
||||
iframe {
|
||||
width: 100%;
|
||||
min-height: 440px;
|
||||
display: block;
|
||||
}
|
||||
|
||||
ul {
|
||||
list-style-type: none;
|
||||
padding: 0;
|
||||
}
|
||||
li {
|
||||
margin-bottom: 0.2rem;
|
||||
}
|
||||
|
||||
h2 img {
|
||||
display: inline;
|
||||
max-height: 1.5em;
|
||||
min-height: 1.5em;
|
||||
vertical-align: middle;
|
||||
/* position left of text */
|
||||
}
|
||||
h3 img {
|
||||
display: inline;
|
||||
max-height: 1.2em;
|
||||
min-height: 1.2em;
|
||||
vertical-align: middle;
|
||||
/* position left of text */
|
||||
}
|
||||
#header {
|
||||
/*background-color: var(--color-gray-medium-dark);*/
|
||||
background: linear-gradient(120deg, var(--header-start), var(--header-end));
|
||||
color: var(--white);
|
||||
padding: 1rem 1rem 2rem 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
|
||||
#page-title {
|
||||
width: 100%;
|
||||
}
|
||||
.page-title-header {
|
||||
font-size: clamp(1.6rem, 4.5vw, 2.5rem);
|
||||
line-height: 1.2;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1rem;
|
||||
}
|
||||
.page-subtitle {
|
||||
font-size: clamp(1rem, 3.4vw, 1.5rem);
|
||||
line-height: 1.2;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.header-cta {
|
||||
margin-top: 1rem;
|
||||
padding-inline: 1.5rem;
|
||||
}
|
||||
.header-cta-buttons {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
gap: 0.75rem;
|
||||
flex-wrap: wrap;
|
||||
}
|
||||
#site-navigation {
|
||||
color: var(--white);
|
||||
width: 100%;
|
||||
position: relative;
|
||||
z-index: 50;
|
||||
}
|
||||
#site-navigation-container {
|
||||
max-width: 1200px;
|
||||
margin: 0 auto;
|
||||
padding: 0 1rem;
|
||||
min-height: 80px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
position: relative;
|
||||
}
|
||||
#site-navigation-content {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
}
|
||||
#site-navigation-bar {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
width: 100%;
|
||||
justify-content: space-between;
|
||||
min-width: 0;
|
||||
}
|
||||
#site-navigation-brand {
|
||||
flex-shrink: 0;
|
||||
min-width: 0;
|
||||
}
|
||||
a.site-home-link {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
color: var(--white);
|
||||
text-decoration: none;
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
gap: 0.75rem;
|
||||
transition: opacity 0.2s ease;
|
||||
min-width: 0;
|
||||
}
|
||||
a.site-home-link:hover {
|
||||
opacity: 0.9;
|
||||
}
|
||||
.nav-logo {
|
||||
height: 50px;
|
||||
width: auto;
|
||||
object-fit: contain;
|
||||
}
|
||||
.nav-text {
|
||||
font-size: 1.5rem;
|
||||
font-weight: bold;
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
}
|
||||
.hamburger-menu {
|
||||
display: none;
|
||||
flex-direction: column;
|
||||
justify-content: space-around;
|
||||
width: 30px;
|
||||
height: 30px;
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: pointer;
|
||||
padding: 0;
|
||||
z-index: 1001;
|
||||
}
|
||||
.hamburger-line {
|
||||
width: 30px;
|
||||
height: 3px;
|
||||
background: var(--white);
|
||||
border-radius: 2px;
|
||||
transition: all 0.3s ease;
|
||||
transform-origin: center;
|
||||
}
|
||||
.nav-menu {
|
||||
display: flex;
|
||||
}
|
||||
#site-nav-links {
|
||||
display: flex;
|
||||
gap: 0.5rem;
|
||||
align-items: center;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
list-style: none;
|
||||
}
|
||||
a.site-nav-link {
|
||||
color: var(--color-muted);
|
||||
text-decoration: none;
|
||||
font-weight: 600;
|
||||
font-size: 1rem;
|
||||
padding: 0.75rem 1rem;
|
||||
border-radius: 0.5rem;
|
||||
transition: all 0.2s ease;
|
||||
position: relative;
|
||||
}
|
||||
a.site-nav-link:hover {
|
||||
color: var(--white);
|
||||
background-color: var(--color-muted-hover-bg);
|
||||
}
|
||||
a.site-nav-link.active {
|
||||
color: var(--white);
|
||||
background-color: rgba(255, 255, 255, 0.2);
|
||||
}
|
||||
#main-content {
|
||||
padding-top: 0;
|
||||
}
|
||||
#main {
|
||||
background-color: var(--white);
|
||||
min-height: 100vh;
|
||||
margin: 0 auto;
|
||||
padding: 0;
|
||||
box-sizing: border-box;
|
||||
border: 0 solid;
|
||||
}
|
||||
.bigbutton {
|
||||
border-radius: 0.5rem;
|
||||
padding: 0.5rem 1rem;
|
||||
background: linear-gradient(135deg, var(--quaternary), var(--quinary));
|
||||
color: var(--white);
|
||||
margin-top: 0.5rem;
|
||||
border: 1px solid var(--color-border-faint);
|
||||
}
|
||||
.bigbutton:hover {
|
||||
background: linear-gradient(135deg, #934332, #c86f3a);
|
||||
color: var(--white);
|
||||
border-color: var(--white);
|
||||
}
|
||||
.bigbutton a {
|
||||
color: var(--white);
|
||||
font-weight: bold;
|
||||
font-size: 1.2rem;
|
||||
text-decoration: none;
|
||||
}
|
||||
.bigbutton a:hover {
|
||||
color: var(--white);
|
||||
font-weight: bold;
|
||||
text-decoration: none;
|
||||
border-color: var(--white);
|
||||
}
|
||||
.bigbutton a span:last-of-type {
|
||||
margin-left: 0.5rem;
|
||||
}
|
||||
|
||||
#hero {
|
||||
background: linear-gradient(
|
||||
to right,
|
||||
var(--hero-start),
|
||||
var(--hero-end)
|
||||
);
|
||||
color: var(--white);
|
||||
padding: 4rem 0;
|
||||
}
|
||||
#hero .container {
|
||||
text-align: left;
|
||||
}
|
||||
#hero h1 {
|
||||
font-size: clamp(1.35rem, 4vw, 2rem);
|
||||
line-height: 1.2;
|
||||
font-weight: bold;
|
||||
margin-bottom: 1rem;
|
||||
text-align: center;
|
||||
}
|
||||
#hero p {
|
||||
font-size: clamp(1rem, 3vw, 1.5rem);
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
.section {
|
||||
background-color: var(--white);
|
||||
padding-block: 3rem;
|
||||
}
|
||||
.section:nth-last-child(4) {
|
||||
min-height: 300px;
|
||||
height: auto;
|
||||
text-align: center;
|
||||
}
|
||||
.section:nth-last-child(5) {
|
||||
min-height: 300px;
|
||||
height: auto;
|
||||
text-align: center;
|
||||
}
|
||||
.section-container {
|
||||
padding-inline: 1rem;
|
||||
margin-inline: auto;
|
||||
}
|
||||
.section h2 {
|
||||
font-size: clamp(1.3rem, 4vw, 2.25rem);
|
||||
font-weight: bold;
|
||||
margin-bottom: 2rem;
|
||||
}
|
||||
.section-content {
|
||||
font-size: clamp(1rem, 2.3vw, 1.125rem);
|
||||
color: var(--color-text);
|
||||
margin-bottom: 1rem;
|
||||
overflow-wrap: anywhere;
|
||||
}
|
||||
.section-content hr {
|
||||
max-width: 80%;
|
||||
margin: 3rem auto 1rem auto;
|
||||
}
|
||||
.section-cards {
|
||||
display: grid;
|
||||
gap: 2rem;
|
||||
grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
|
||||
}
|
||||
.section-card {
|
||||
background-color: var(--white);
|
||||
border-radius: 0.5rem;
|
||||
padding: 1.5rem;
|
||||
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
|
||||
transition: box-shadow 0.3s ease;
|
||||
}
|
||||
.section-card:hover {
|
||||
box-shadow: 0 10px 15px rgba(0, 0, 0, 0.2);
|
||||
}
|
||||
.section-card-title {
|
||||
font-size: 1.25rem;
|
||||
margin-bottom: 1rem;
|
||||
font-weight: bold;
|
||||
}
|
||||
.section-card-detail {
|
||||
background-color: var(--color-background-inverse);
|
||||
border-radius: 0.375rem;
|
||||
padding: 0.75rem;
|
||||
}
|
||||
img[src*="img/partner/"] {
|
||||
max-width: 200px;
|
||||
max-height: 100px;
|
||||
margin: 0 auto;
|
||||
display: block;
|
||||
margin: 2rem auto;
|
||||
}
|
||||
img[src*="img/partner/"].hidden {
|
||||
max-width: 200px;
|
||||
max-height: 100px;
|
||||
display: none;
|
||||
}
|
||||
#call-to-action {
|
||||
background: linear-gradient(120deg, #0a8e67, #073b70);
|
||||
color: var(--white);
|
||||
margin-top: 0;
|
||||
padding: 3rem 0;
|
||||
text-align: center;
|
||||
}
|
||||
#cta-container {
|
||||
max-width: 800px;
|
||||
padding: 0 1.5rem;
|
||||
text-align: center;
|
||||
}
|
||||
#cta-container iframe {
|
||||
max-width: 100%;
|
||||
height: auto;
|
||||
min-height: 520px;
|
||||
}
|
||||
#contact-form {
|
||||
display: block;
|
||||
max-width: 600px;
|
||||
max-height: 600px;
|
||||
margin: 0 auto;
|
||||
scroll-behavior: auto;
|
||||
}
|
||||
#contact-form input,
|
||||
#contact-form textarea {
|
||||
width: 100%;
|
||||
padding: 0.5rem;
|
||||
margin-bottom: 1rem;
|
||||
border: 1px solid var(--color-input-border);
|
||||
border-radius: 0.25rem;
|
||||
}
|
||||
#contact-form textarea {
|
||||
height: 150px;
|
||||
}
|
||||
#footer {
|
||||
background-color: var(--color-background);
|
||||
color: var(--quaternary);
|
||||
padding: 2rem 0;
|
||||
text-align: center;
|
||||
display: block;
|
||||
}
|
||||
.footer-link {
|
||||
color: var(--quinary);
|
||||
text-decoration: underline;
|
||||
}
|
||||
#services {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.container {
|
||||
margin: 0 auto;
|
||||
width: min(100%, 1200px);
|
||||
max-width: 100%;
|
||||
padding-inline: 1rem;
|
||||
}
|
||||
|
||||
|
||||
@media screen and (max-width: 640px) {
|
||||
#header {
|
||||
padding: 0;
|
||||
padding-bottom: 1.5rem;
|
||||
}
|
||||
|
||||
h1, h1.page-title-header, #hero h1 {
|
||||
font-size: 1.4rem;
|
||||
}
|
||||
.page-subtitle {
|
||||
font-size: 1rem;
|
||||
}
|
||||
.section h2 {
|
||||
font-size: 1.3rem;
|
||||
}
|
||||
.section-content {
|
||||
font-size: 1rem;
|
||||
}
|
||||
#page-title {
|
||||
margin: 0.5rem auto;
|
||||
padding: 0.5rem;
|
||||
}
|
||||
#hero {
|
||||
padding: 1.5rem 0;
|
||||
}
|
||||
.container {
|
||||
width: 100%;
|
||||
max-width: 100%;
|
||||
padding: 0 0.9rem;
|
||||
}
|
||||
|
||||
}
|
||||
@media screen and (max-width: 768px) {
|
||||
#site-navigation-container {
|
||||
padding: 0 1rem;
|
||||
min-height: 60px;
|
||||
}
|
||||
|
||||
#site-navigation-bar {
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
a.site-home-link {
|
||||
font-size: 1.25rem;
|
||||
gap: 0.5rem;
|
||||
max-width: calc(100% - 44px);
|
||||
}
|
||||
|
||||
.nav-logo {
|
||||
height: 35px;
|
||||
}
|
||||
|
||||
.nav-text {
|
||||
font-size: 1.25rem;
|
||||
}
|
||||
|
||||
.hamburger-menu {
|
||||
display: flex;
|
||||
}
|
||||
|
||||
.nav-menu {
|
||||
position: absolute;
|
||||
top: 100%;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background-color: var(--color-gray-dark);
|
||||
transform: translateY(-100%);
|
||||
opacity: 0;
|
||||
visibility: hidden;
|
||||
transition: all 0.3s ease;
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.1);
|
||||
z-index: 1000;
|
||||
width: 100%;
|
||||
max-height: calc(100vh - 60px);
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.nav-menu.open {
|
||||
transform: translateY(0);
|
||||
opacity: 1;
|
||||
visibility: visible;
|
||||
}
|
||||
|
||||
#site-nav-links {
|
||||
flex-direction: column;
|
||||
width: 100%;
|
||||
padding: 1rem 0;
|
||||
}
|
||||
|
||||
a.site-nav-link {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
padding: 1rem;
|
||||
margin: 0.25rem 0;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
a.site-nav-link:hover {
|
||||
background-color: var(--color-muted-hover-bg);
|
||||
}
|
||||
|
||||
/* Hamburger animation */
|
||||
.hamburger-menu.open .hamburger-line:nth-child(1) {
|
||||
transform: rotate(45deg) translate(6px, 6px);
|
||||
}
|
||||
|
||||
.hamburger-menu.open .hamburger-line:nth-child(2) {
|
||||
opacity: 0;
|
||||
}
|
||||
|
||||
.hamburger-menu.open .hamburger-line:nth-child(3) {
|
||||
transform: rotate(-45deg) translate(6px, -6px);
|
||||
}
|
||||
}
|
||||
|
||||
@media screen and (max-width: 420px) {
|
||||
.nav-text {
|
||||
display: none;
|
||||
}
|
||||
|
||||
a.site-home-link {
|
||||
max-width: calc(100% - 40px);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user