removed coming soon text
This commit is contained in:
parent
e79215a58e
commit
e56849437e
@ -28,11 +28,8 @@
|
||||
<img alt='Get it on Google Play' src='https://play.google.com/intl/en_us/badges/static/images/badges/en_badge_web_generic.png' id="google_play_badge"/>
|
||||
</a>
|
||||
|
||||
<a href="https://www.youtube.com/watch?v=dQw4w9WgXcQ" id="itchio_badge_link">
|
||||
<a href="https://kacperks.itch.io/sussycraft" id="itchio_badge_link">
|
||||
<img alt="Available on itch.io" src="assets/itchio_badge.png" id="itchio_badge"/>
|
||||
<div id="rotated_text">
|
||||
<p>coming soon!</p>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</div>
|
||||
|
33
script.js
33
script.js
@ -1,33 +0,0 @@
|
||||
document.addEventListener('DOMContentLoaded', () => {
|
||||
|
||||
console.log('DOM fully loaded and parsed');
|
||||
|
||||
var rotated_text = document.getElementById('rotated_text');
|
||||
|
||||
var old_width = rotated_text.offsetWidth;
|
||||
var width;
|
||||
|
||||
// animation frame loop
|
||||
function loop() {
|
||||
|
||||
// get widt of div with id="rotated_text"
|
||||
width = rotated_text.offsetWidth;
|
||||
|
||||
// if width has changed
|
||||
if (width != old_width) {
|
||||
// set new width
|
||||
old_width = width;
|
||||
|
||||
// set font-size of p inside rotated_text to width * n
|
||||
rotated_text.children[0].style.fontSize = width * 0.15 + 'px';
|
||||
}
|
||||
|
||||
|
||||
|
||||
requestAnimationFrame(loop);
|
||||
}
|
||||
|
||||
// start the loop
|
||||
requestAnimationFrame(loop);
|
||||
|
||||
});
|
30
style.css
30
style.css
@ -89,36 +89,6 @@ h1 {
|
||||
margin-bottom: -4px;
|
||||
}
|
||||
|
||||
#rotated_text {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
/* bold font*/
|
||||
font-weight: bold;
|
||||
|
||||
/* center text vertically */
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
|
||||
color: #ffec9e;
|
||||
|
||||
}
|
||||
|
||||
#rotated_text p {
|
||||
margin: 0;
|
||||
|
||||
/* rotate text */
|
||||
transform: rotate(13deg);
|
||||
|
||||
text-shadow: 0 0 15px #000;
|
||||
|
||||
font-size: 400%;
|
||||
}
|
||||
|
||||
|
||||
footer {
|
||||
--footer-height: 50px;
|
||||
|
Loading…
x
Reference in New Issue
Block a user