forked from achmizs/deus-gaming
Compare commits
3 Commits
full-scree
...
master
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
fa1ccf6bde | ||
|
|
098d77eae1 | ||
|
|
f891cd84ae |
@ -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
|
||||||
|
|||||||
@ -6,11 +6,11 @@
|
|||||||
/*= Hover styles =*/
|
/*= Hover styles =*/
|
||||||
/*=--------------=*/
|
/*=--------------=*/
|
||||||
|
|
||||||
.img img:hover {
|
.image-wrapper img:hover {
|
||||||
filter: drop-shadow(0 0 3px #777);
|
filter: drop-shadow(0 0 3px #777);
|
||||||
cursor: zoom-in;
|
cursor: zoom-in;
|
||||||
}
|
}
|
||||||
.img img:active {
|
.image-wrapper img:active {
|
||||||
transform: scale(0.975);
|
transform: scale(0.975);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -324,6 +324,12 @@ hr {
|
|||||||
clear: both;
|
clear: both;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.no-hyphens {
|
||||||
|
-webkit-hyphens: none !important;
|
||||||
|
-moz-hyphens: none !important;
|
||||||
|
hyphens: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
/*=-----------------=*/
|
/*=-----------------=*/
|
||||||
/* Copyright notice. */
|
/* Copyright notice. */
|
||||||
/*=-----------------=*/
|
/*=-----------------=*/
|
||||||
|
|||||||
@ -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: "article img, .gallery img",
|
contentImagesSelector: ".gallery img",
|
||||||
focusedImageSelector: "article img.focused, .gallery img.focused",
|
focusedImageSelector: ".gallery img.focused",
|
||||||
shrinkRatio: 0.975,
|
shrinkRatio: 0.975,
|
||||||
hideUITimerDuration: 1500,
|
hideUITimerDuration: 1500,
|
||||||
hideUITimerExpired: () => {
|
hideUITimerExpired: () => {
|
||||||
@ -118,14 +118,11 @@ function imageFocusSetup() {
|
|||||||
image.addEventListener("click", GW.imageClickedToFocus);
|
image.addEventListener("click", GW.imageClickedToFocus);
|
||||||
});
|
});
|
||||||
|
|
||||||
// Wrap all images in a span.
|
// Add image wrapper class.
|
||||||
document.querySelectorAll(GW.imageFocus.contentImagesSelector).forEach(image => {
|
document.querySelectorAll(GW.imageFocus.contentImagesSelector).forEach(image => {
|
||||||
let wrapper = document.createElement("span");
|
let wrapper = image.closest(".img");
|
||||||
wrapper.classList.add("image-wrapper", "img");
|
if (wrapper)
|
||||||
image.parentElement.insertBefore(wrapper, image);
|
wrapper.classList.add("image-wrapper");
|
||||||
wrapper.appendChild(image);
|
|
||||||
wrapper.classList.add(...image.classList);
|
|
||||||
image.classList.remove(...image.classList);
|
|
||||||
});
|
});
|
||||||
|
|
||||||
// Create the image focus overlay.
|
// Create the image focus overlay.
|
||||||
@ -603,10 +600,3 @@ function focusImageSpecifiedByURL() {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/******************/
|
|
||||||
/* INITIALIZATION */
|
|
||||||
/******************/
|
|
||||||
|
|
||||||
imageFocusSetup();
|
|
||||||
focusImageSpecifiedByURL();
|
|
||||||
|
|||||||
@ -456,10 +456,10 @@ registerInitializer('earlyInitialize', true, () => (query("#content") != null),
|
|||||||
/*************************/
|
/*************************/
|
||||||
|
|
||||||
registerInitializer('pageLayoutFinished', false, () => (document.readyState == "complete"), () => {
|
registerInitializer('pageLayoutFinished', false, () => (document.readyState == "complete"), () => {
|
||||||
GWLog("INITIALIZER pageLayoutFinished");
|
|
||||||
|
|
||||||
forceInitializer('earlyInitialize');
|
forceInitializer('earlyInitialize');
|
||||||
|
|
||||||
|
GWLog("INITIALIZER pageLayoutFinished");
|
||||||
|
|
||||||
// We pre-query the relevant elements, so we don’t have to run queryAll on
|
// We pre-query the relevant elements, so we don’t have to run queryAll on
|
||||||
// every firing of the scroll listener.
|
// every firing of the scroll listener.
|
||||||
GW.scrollState = {
|
GW.scrollState = {
|
||||||
@ -472,5 +472,18 @@ 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();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user