Compare commits

..

1 Commits

Author SHA1 Message Date
Said Achmiz
7eceb5abdd Initial commit of full-screen-logo-homepage 2020-02-15 11:56:53 -05:00
7 changed files with 87 additions and 46 deletions

View File

@ -1,9 +1,9 @@
AddCharset utf-8 .shtml .html .css .php .txt .js AddCharset utf-8 .shtml .html .css .php .txt .js
# Disable caching of CSS and JS (for testing only). # Disable caching of CSS and JS (for testing only).
# <filesMatch ".(css|js)$"> <filesMatch ".(css|js)$">
# Header set Cache-Control "max-age=0, public" Header set Cache-Control "max-age=0, public"
# </filesMatch> </filesMatch>
Options +Includes Options +Includes
AddType text/html .shtml AddType text/html .shtml

View File

@ -5,11 +5,21 @@
/*=========*/ /*=========*/
body.home-page { body.home-page {
--deus-body-padding: 2rem; --deus-body-padding: 5rem 5rem 10rem 5rem;
width: 100%; width: 100%;
height: 100vh; height: 100vh;
} }
@media only screen and (max-width: 960px) {
body.home-page {
--deus-body-padding: 4rem 4rem 8rem 4rem;
}
}
@media only screen and (max-width: 520px) {
body.home-page {
--deus-body-padding: 3rem 3rem 8rem 3rem;
}
}
body.home-page::before { body.home-page::before {
content: none; content: none;
} }
@ -36,35 +46,77 @@ body.home-page #splash-image img {
height: 100%; height: 100%;
object-fit: contain; object-fit: contain;
} }
body.home-page #splash-image img.tall {
display: none;
}
@media only screen and (max-width: 960px) {
body.home-page #splash-image img.tall {
display: initial;
}
body.home-page #splash-image img.wide {
display: none;
}
}
/*================*/ /*================*/
/* Navigation UI. */ /* Navigation UI. */
/*================*/ /*================*/
body.home-page #main-nav { body.home-page #main-nav {
top: -2rem; top: unset;
bottom: -2rem;
opacity: 0.0; opacity: 0.0;
border-bottom: none;
box-shadow: none;
background-color: transparent;
font-size: 1.75em;
justify-content: center;
} }
body.home-page #main-nav.shown { body.home-page #main-nav.shown {
top: 0; bottom: 0;
opacity: 1.0; opacity: 1.0;
transition: transition:
top 1s ease, bottom 1s ease,
opacity 1s ease; opacity 1s ease;
} }
body.home-page #main-nav a.text {
margin: 0 0.75em;
width: 4em;
}
body.home-page #main-nav .social-buttons {
position: fixed;
top: 0;
right: 0;
font-size: 0.75em;
padding: 0.5em;
}
@media only screen and (max-width: 520px) {
body.home-page #main-nav .social-buttons {
flex-flow: column nowrap;
}
body.home-page #main-nav .social-buttons a + a {
margin: 0.5em 0 0 0;
}
}
body.home-page #main-nav .logo {
display: none;
}
/*===================*/ /*===================*/
/* Copyright notice. */ /* Copyright notice. */
/*===================*/ /*===================*/
body.home-page #copyright { body.home-page #copyright {
bottom: -0.625rem; top: -0.75rem;
opacity: 0.0; opacity: 0.0;
} }
body.home-page #copyright.shown { body.home-page #copyright.shown {
bottom: 0.625rem; top: 0.75rem;
opacity: 0.5; opacity: 0.5;
transition: transition:
bottom 1s ease, top 1s ease,
opacity 1s ease; opacity 1s ease;
} }

View File

@ -6,11 +6,11 @@
/*= Hover styles =*/ /*= Hover styles =*/
/*=--------------=*/ /*=--------------=*/
.image-wrapper img:hover { .img img:hover {
filter: drop-shadow(0 0 3px #777); filter: drop-shadow(0 0 3px #777);
cursor: zoom-in; cursor: zoom-in;
} }
.image-wrapper img:active { .img img:active {
transform: scale(0.975); transform: scale(0.975);
} }

View File

@ -324,12 +324,6 @@ hr {
clear: both; clear: both;
} }
.no-hyphens {
-webkit-hyphens: none !important;
-moz-hyphens: none !important;
hyphens: none !important;
}
/*=-----------------=*/ /*=-----------------=*/
/* Copyright notice. */ /* Copyright notice. */
/*=-----------------=*/ /*=-----------------=*/

View File

@ -84,8 +84,8 @@ String.prototype.hasPrefix = function (prefix) {
function imageFocusSetup() { function imageFocusSetup() {
if (typeof GW.imageFocus == "undefined") if (typeof GW.imageFocus == "undefined")
GW.imageFocus = { GW.imageFocus = {
contentImagesSelector: ".gallery img", contentImagesSelector: "article img, .gallery img",
focusedImageSelector: ".gallery img.focused", focusedImageSelector: "article img.focused, .gallery img.focused",
shrinkRatio: 0.975, shrinkRatio: 0.975,
hideUITimerDuration: 1500, hideUITimerDuration: 1500,
hideUITimerExpired: () => { hideUITimerExpired: () => {
@ -118,13 +118,16 @@ function imageFocusSetup() {
image.addEventListener("click", GW.imageClickedToFocus); image.addEventListener("click", GW.imageClickedToFocus);
}); });
// Add image wrapper class. // Wrap all images in a span.
document.querySelectorAll(GW.imageFocus.contentImagesSelector).forEach(image => { document.querySelectorAll(GW.imageFocus.contentImagesSelector).forEach(image => {
let wrapper = image.closest(".img"); let wrapper = document.createElement("span");
if (wrapper) wrapper.classList.add("image-wrapper", "img");
wrapper.classList.add("image-wrapper"); image.parentElement.insertBefore(wrapper, image);
}); wrapper.appendChild(image);
wrapper.classList.add(...image.classList);
image.classList.remove(...image.classList);
});
// Create the image focus overlay. // Create the image focus overlay.
let imageFocusOverlay = addUIElement("<div id='image-focus-overlay'>" + let imageFocusOverlay = addUIElement("<div id='image-focus-overlay'>" +
`<div class='help-overlay'> `<div class='help-overlay'>
@ -600,3 +603,10 @@ function focusImageSpecifiedByURL() {
}); });
} }
} }
/******************/
/* INITIALIZATION */
/******************/
imageFocusSetup();
focusImageSpecifiedByURL();

View File

@ -456,10 +456,10 @@ registerInitializer('earlyInitialize', true, () => (query("#content") != null),
/*************************/ /*************************/
registerInitializer('pageLayoutFinished', false, () => (document.readyState == "complete"), () => { registerInitializer('pageLayoutFinished', false, () => (document.readyState == "complete"), () => {
forceInitializer('earlyInitialize');
GWLog("INITIALIZER pageLayoutFinished"); GWLog("INITIALIZER pageLayoutFinished");
forceInitializer('earlyInitialize');
// We pre-query the relevant elements, so we dont have to run queryAll on // We pre-query the relevant elements, so we dont have to run queryAll on
// every firing of the scroll listener. // every firing of the scroll listener.
GW.scrollState = { GW.scrollState = {
@ -472,18 +472,5 @@ registerInitializer('pageLayoutFinished', false, () => (document.readyState == "
GW.scrollState.siteNavUI.forEach(element => { GW.scrollState.siteNavUI.forEach(element => {
element.addEventListener("mouseover", () => { showSiteNavUI(); }); element.addEventListener("mouseover", () => { showSiteNavUI(); });
}); });
// Wrap all images in a span.
document.querySelectorAll("main > nav ~ * img").forEach(image => {
let wrapper = document.createElement("span");
wrapper.classList.add("img");
image.parentElement.insertBefore(wrapper, image);
wrapper.appendChild(image);
wrapper.classList.add(...image.classList);
image.classList.remove(...image.classList);
});
imageFocusSetup();
focusImageSpecifiedByURL();
}); });

View File

@ -7,7 +7,8 @@
</head> </head>
<body class='home-page'> <body class='home-page'>
<div id='splash-image' class='hidden'> <div id='splash-image' class='hidden'>
<img src='/deus/assets/images/deus-logo-text-horizontal.png'> <img class='wide' src='/deus/assets/images/deus-logo-text-horizontal.png'>
<img class='tall' src='/deus/assets/images/deus-logo-text.png'>
</div> </div>
<main> <main>
<!--#include virtual="/deus/includes/main-nav.html" --> <!--#include virtual="/deus/includes/main-nav.html" -->
@ -17,12 +18,9 @@
</body> </body>
<script> <script>
document.querySelector("#splash-image").classList.remove("hidden"); document.querySelector("#splash-image").classList.remove("hidden");
setTimeout(() => {
document.querySelector("#splash-image").classList.add("fade");
}, 2000);
setTimeout(() => { setTimeout(() => {
document.querySelector("#main-nav").classList.add("shown"); document.querySelector("#main-nav").classList.add("shown");
document.querySelector("#copyright").classList.add("shown"); document.querySelector("#copyright").classList.add("shown");
}, 2000); }, 1500);
</script> </script>
</html> </html>