Skip to content

Commit

Permalink
NregUpd 70
Browse files Browse the repository at this point in the history
// ShWHP
- General optimization changes.

// Legacy/Temp
- Added a directory for temporary projects.

// Robots.txt
- Disallowed temp folder crawling.
  • Loading branch information
jakubekgranie committed Dec 5, 2023
1 parent 7820cb1 commit eadc3a7
Show file tree
Hide file tree
Showing 12 changed files with 327 additions and 77 deletions.
53 changes: 31 additions & 22 deletions CSS/cssdata-shatterwares2.css
Original file line number Diff line number Diff line change
Expand Up @@ -144,52 +144,66 @@ abbr{
width: 12.5vw;
font-size: 1.1vw;
}
.nav-button-paragraph::before{
.nav-button-paragraph::before, .locked::before{
content: '';
width: 13px;
height: 13px;
background-image: url('../RESOURCES/SHWHP_RES/animation-assets/corner-anim1.png');
background-size: 100% 100%;
position: absolute;
top: -0.6vw;
left: -0.6vw;
top: -0.2vw;
left: -0.2vw;
z-index: 2;
opacity: 0;
display: none;
}
.nav-button-paragraph::after{
.nav-button-paragraph::after, .locked::after{
content: '';
width: 13px;
height: 13px;
background-image: url('../RESOURCES/SHWHP_RES/animation-assets/corner-anim1.png');
background-size: 100% 100%;
transform: rotate(180deg);
position: absolute;
bottom: -0.6vw;
right: -0.6vw;
bottom: -0.2vw;
right: -0.2vw;
z-index: 2;
opacity: 0;
display: none;
}
@keyframes anim-cornerNav{
0%{
@keyframes anim-cornerNav1{
from{
opacity: 0.2;
filter: blur(1.6vw);
bottom: 0vw;
right: 0vw;
}
100%{
to{
opacity: 1;
top: -0.6vw;
left: -0.6vw;
}
}
@keyframes anim-cornerNav2{
from{
opacity: 0.2;
filter: blur(1.6vw);
}
to{
opacity: 1;
bottom: -0.6vw;
right: -0.6vw;
}
}

.nav-button:hover .nav-button-paragraph::after, .nav-button:hover .nav-button-paragraph::before{
animation: anim-cornerNav 0.2s ease-in forwards;
.nav-button:hover .nav-button-paragraph::after, .nav-button:hover .nav-button-paragraph::before, .locked::before, .locked::after{
display: block;
}
.nav-button:hover .hover-color{
.nav-button:hover .nav-button-paragraph::before, .locked::before{
animation: anim-cornerNav1 0.16s ease-in forwards;
}
.nav-button:hover .nav-button-paragraph::after, .locked::after{
animation: anim-cornerNav2 0.16s ease-in forwards;
}
.nav-button:hover .hover-color, .hover-color-forced{
color: #7d51f1;
}
.nav-button-image{
Expand Down Expand Up @@ -231,9 +245,10 @@ abbr{

.abm-section{
height: 74vh;
padding: 10vh 0;
}
.min-padding{
padding: 10vh 0;
padding: 11.5vh 0;
}
.bs-bb{
box-sizing: border-box;
Expand All @@ -258,7 +273,7 @@ abbr{
filter: drop-shadow(0.2vw 0.2vw 0.1vw #a6a6a6);
}
.t-ss-paragraph-modabm{
width: 671.438px;
max-width: 671.438px;
}
@keyframes blink{
0%{
Expand Down Expand Up @@ -323,12 +338,6 @@ abbr{
.bgr-no-r{
background-repeat: no-repeat;
}
.longsec-child-preset{
min-height: 55vh;
}
.longsec-child-preset-2{
min-height: 74vh;
}
.c-white{
color: white;
}
Expand Down
64 changes: 38 additions & 26 deletions JS/animationutil.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,17 +2,25 @@ var lastButton;

window.onload = () => {
//regulateScroll(); INCOMPATIBLE WITH THE UPDATE LOG
function sessionRandExchange(sessionName, len){
let rand = Math.floor((Math.random()*100))%len;

if(typeof sessionStorage.getItem(sessionName) !== undefined)
while(rand == sessionStorage.getItem(sessionName))
rand = Math.floor((Math.random()*100))%len;

sessionStorage.setItem(sessionName, rand);
}

const names = ["Delve", "Explore", "Reveal", "Decode", "Uncover", "Discover", "Enhance", "Iterate"];
sessionRandExchange("lastRandomName", names.length);
document.getElementById("navSpec").innerHTML = " " + names[sessionStorage.getItem("lastRandomName")];

const bgImages = ["dbh-1.webp", "dbh-2.jpg", "deltarune-2.jpg", "deltarune-4.jpg", "hk-1.jpg", "hk-2.jpg", "tf-1.jpg", "tf-2.webp", "deltarune-5.jpg", "deltarune-6.jpg"];
const path = "RESOURCES/SHWHP_RES/";
let random = Math.floor((Math.random()*100))%bgImages.length;
sessionRandExchange("lastRandomNum", bgImages.length);

if(typeof sessionStorage.getItem("lastRandomNum") !== undefined)
while(random == sessionStorage.getItem("lastRandomNum"))
random = Math.floor((Math.random()*100))%bgImages.length;

sessionStorage.setItem("lastRandomNum", random);
document.getElementById("header").setAttribute("style", "background-image: url('" + path + bgImages[random] + "')");
document.getElementById("header").setAttribute("style", "background-image: url('" + path + bgImages[sessionStorage.getItem("lastRandomNum")] + "')");

// after full site load -> remove user interaction limitations
document.getElementsByTagName("style")[0].remove();
Expand All @@ -26,20 +34,18 @@ window.onload = () => {
const nodeList = document.querySelectorAll(".headerLetter");

function loopedLetterRand(i){ // for every external loop call, start from one letter further.
for(; i < length; i++){
for(; i < length; i++)
nodeList[i].innerHTML = String.fromCharCode(Math.floor((Math.random() * 100))%95 + 32); // 32 - 126
}
}

loopedLetterRand(0); // randomize everything once befote the process begins
setTimeout(() => {
for(let i = 0; i < document.querySelectorAll(".nav-button").length; i++){
for(let i = 0; i < document.querySelectorAll(".nav-button").length; i++)
animationForwarder('navSlash' + (i + 1) + '-1', 'navSlash' + (i + 1) + '-2', 'anim-navBlink', 90); // Guest animation
}

for(let i = 0; i < length; i++){ // for each letter
setTimeout(() => {
loopedLetterRand(i)
loopedLetterRand(i);
nodeList[i].innerHTML = slogan[i]; // separated so all symbols would be scrambled initially (look up)
}, waitTime * i);
}
Expand Down Expand Up @@ -90,6 +96,16 @@ function anShWPHPreset(){
animationForwarder('skip', 'new', 'op-0', 1300);
animationForwarder('skip', 'new', 'dp-none', 1800);
}
function anNavButtonPreset(){
const spec = document.getElementById("spec")
if(spec.classList.contains('locked')){
const classes = ['locked', 'hover-color-forced'];
for(let i = 0; i < 2; i++)
spec.classList.remove(classes[i]);
}
else
anFrwdDoubleExec('skip', 'spec', 'skip', 'spec', 'locked', 0, 'hover-color-forced')
}

function langPicker(buttonid){
if(lastButton != buttonid){
Expand Down Expand Up @@ -119,9 +135,9 @@ function langPicker(buttonid){
}

// After execution (1s), rollback the changes
setTimeout(() => {for(let i = 0; i < 4; i++){
setTimeout(() => {
for(let i = 0; i < 4; i++)
document.getElementById(langNames[i]).style.cursor = null;
}
document.getElementById(buttonid).style.cursor = n_a;
}, 1000);

Expand All @@ -144,9 +160,9 @@ function langPicker(buttonid){
setTimeout(() => {
langDiv.classList.remove('animSwitchByFadeInLang');
langParagraph.classList.remove('animSwitchByFadeInLang');
for(let i = 0; i < 4; i++){
for(let i = 0; i < 4; i++)
document.getElementById(langNames[i]).onclick = function() {langPicker(langNames[i])};
}}, 490);
}, 490);

// Add suitable text
const titles = ['C++', 'HTML & CSS', 'Javascript', 'PHP'];
Expand All @@ -165,9 +181,8 @@ function langStats(){

const ids = ['html', 'php', 'cpp', 'js'];
setTimeout(() => {
for(let i = 0; i < 4; i++){
for(let i = 0; i < 4; i++)
setTimeout(() => {document.getElementById('holder_' + ids[i]).classList.add('holder-transformations')}, (i * 25));
}
}, 500);
setTimeout(() => {
for(let i = 0; i < 4; i++){
Expand All @@ -177,23 +192,20 @@ function langStats(){
}, 725)
}
function unravelBars(langId){
for(let i = 0; i < 10; i++){
for(let i = 0; i < 10; i++)
setTimeout(() => {
let bar = "bar_" + langId + (i + 1);
document.getElementById(bar).classList.add('anim-fadeintr2');
document.getElementById("bar_" + langId + (i + 1)).classList.add('anim-fadeintr2');
}
, (90 * i));
}
, 90 * i);
}

function anFrwdDoubleExec(identifier, identifier2, identifier3, identifier4 ,anim_id, wait_time, anim_id2, wait_time2){
function anFrwdDoubleExec(identifier, identifier2, identifier3, identifier4 ,anim_id, wait_time, anim_id2, wait_time2 = 0){
animationForwarder(identifier, identifier2, anim_id, wait_time);
animationForwarder(identifier3, identifier4, anim_id2, wait_time2);
}
function animationForwarder(identifier, identifier2, anim_id, wait_time = 0){
if(identifier != 'skip'){
if(identifier != 'skip')
document.getElementById(identifier).classList.add(anim_id);
}
setTimeout(() => {document.getElementById(identifier2).classList.add(anim_id)}, wait_time);
}

Expand Down
Binary file added LEGACY/temp/bomb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
101 changes: 101 additions & 0 deletions LEGACY/temp/css.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
.body{
min-width: 70vw;
min-height: 100vh;
margin: 0;
}
.table{
border: 4px grey ridge;
}
.td{
font: 1.5vw monospace;
font-weight: bold;
}
.button{
background-image: url("un.png");
}
.flag{
width: 6vw;
height: 6vw;
background-image: url("flag.png");
position: fixed;
top: 3vw;
right: 3vw;
}
.bg-full{
background-size: cover;
}
.td-unclicked{
cursor: pointer;
}
.td-flag{
background-image: url("flag.png");
}
.td-flag2{
background-image: url("flag2.png");
}
.td-1{
color: blue;
}
.td-2{
color: green;
}
.td-3{
color: red;
}
.td-4{
color: darkblue;
}
.td-5{
color: darkred;
}
.td-6{
color: #007e7d;
}
.td-7{
color: black;
}
.td-8{
color: slategray;
}
.td-bomb{
background: url("bomb.png"), url("un.png");
background-size: 60%, cover;
background-repeat: no-repeat;
background-position: center center, center center;
}
.fx{
display: flex;
}
.fx-center{
align-items: center;
justify-content: center;
}
.anim-rainbow{
animation: rainbow 3s ease-in-out infinite;
}
@keyframes rainbow{
12.5%{
color: red !important;
}
25%{
color: orange;
}
37.5%{
color: yellow;
}
50%{
color: green;
}
62.5%{
color: blue;
}
75%{
color: indigo;
}
87.5%{
color: violet;
}
100%{
color: red !important;
}
}
Binary file added LEGACY/temp/favicon.ico
Binary file not shown.
Binary file added LEGACY/temp/flag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added LEGACY/temp/flag2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit eadc3a7

Please sign in to comment.