Skip to content

Commit

Permalink
flip
Browse files Browse the repository at this point in the history
  • Loading branch information
nalbam committed Sep 3, 2019
1 parent 0e53704 commit f55eb72
Show file tree
Hide file tree
Showing 9 changed files with 60 additions and 12 deletions.
12 changes: 12 additions & 0 deletions static/flip.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
// $(function () {
// setInterval(function () {
// flip();
// }, 5000);
// });

function flip() {
document.querySelector('.flip-body').classList.add('flipped');
setTimeout(function () {
document.querySelector('.flip-body').classList.remove('flipped');
}, 1000);
}
8 changes: 8 additions & 0 deletions static/index.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ div {
display: block;
}

a {
text-decoration: none;
}

.lb-logo {
display: block;
height: 300px;
Expand All @@ -34,6 +38,10 @@ div {
text-align: center;
}

.lb-logo-img {
height: 100%;
}

.lb-title {
height: 30px;
margin-bottom: 15px;
Expand Down
6 changes: 5 additions & 1 deletion static/league.css
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ div {
display: block;
}

a {
text-decoration: none;
}

.lb-logo {
display: block;
height: 100px;
Expand All @@ -34,7 +38,7 @@ div {
text-align: center;
}

.lb-logo img {
.lb-logo-img {
height: 100%;
}

Expand Down
2 changes: 1 addition & 1 deletion static/league.js
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ function sec(t) {

function clear(logo, title) {
if (logo && logo !== '') {
lb_logo.innerHTML = `<img src="${logo}">`;
lb_logo.innerHTML = `<img src="${logo}" class="lb-logo-img">`;
}

lb_title.innerText = title;
Expand Down
6 changes: 5 additions & 1 deletion static/submit.css
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@ footer {
height: 100px;
}

div {
display: block;
}

a {
text-decoration: none;
}
Expand All @@ -34,7 +38,7 @@ a {
text-align: center;
}

.lb-logo img {
.lb-logo-img {
height: 100%;
}

Expand Down
2 changes: 1 addition & 1 deletion static/submit.js
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ let lb_time_valid = false;

function clear(logo, title) {
if (logo && logo !== '') {
lb_logo.innerHTML = `<img src="${logo}">`;
lb_logo.innerHTML = `<img src="${logo}" class="lb-logo-img">`;
}

lb_title.innerText = title;
Expand Down
10 changes: 4 additions & 6 deletions views/index.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@
<div class="flip-container">
<div class="flip-body">
<div class="face front">
<img src="/icon-trophy.png" height="100%">
<img src="/icon-trophy.png" class="lb-logo-img">
</div>
<div class="face back">
<img src="/icon-trophy.png" height="100%">
<img src="/icon-trophy.png" class="lb-logo-img">
</div>
</div>
</div>
Expand All @@ -30,13 +30,11 @@
</html>

<script src="/jquery-3.3.1.min.js"></script>
<script src="/flip.js"></script>
<script>
$(function () {
setInterval(function () {
document.querySelector('.flip-body').classList.add('flipped');
setTimeout(function () {
document.querySelector('.flip-body').classList.remove('flipped');
}, 1000);
flip();
}, 5000);
});
</script>
13 changes: 12 additions & 1 deletion views/league.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@
<meta charset="utf-8">
<title>league</title>
<link rel="stylesheet" href="/league.css">
<link rel="stylesheet" href="/flip.css">
<link rel="stylesheet" href="/pop.css">
</head>

<body>
<figure class="lb-logo">
<img src="/icon-trophy.png">
<div class="flip-container">
<div class="flip-body">
<div class="face front">
<img src="/icon-trophy.png" class="lb-logo-img">
</div>
<div class="face back">
<img src="/icon-trophy.png" class="lb-logo-img">
</div>
</div>
</div>
</figure>

<h1 class="lb-title"></h1>
Expand Down Expand Up @@ -41,6 +51,7 @@

<script src="/socket.io/socket.io.js"></script>
<script src="/jquery-3.3.1.min.js"></script>
<script src="/flip.js"></script>

<script>
let league = '<%= league %>';
Expand Down
13 changes: 12 additions & 1 deletion views/submit.ejs
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,22 @@
<meta charset="utf-8">
<title>submit</title>
<link rel="stylesheet" href="/submit.css">
<link rel="stylesheet" href="/flip.css">
<link rel="stylesheet" href="/pop.css">
</head>

<body>
<figure class="lb-logo">
<img src="/icon-trophy.png">
<div class="flip-container">
<div class="flip-body">
<div class="face front">
<img src="/icon-trophy.png" class="lb-logo-img">
</div>
<div class="face back">
<img src="/icon-trophy.png" class="lb-logo-img">
</div>
</div>
</div>
</figure>

<h1 class="lb-title"></h1>
Expand Down Expand Up @@ -53,6 +63,7 @@

<script src="/socket.io/socket.io.js"></script>
<script src="/jquery-3.3.1.min.js"></script>
<script src="/flip.js"></script>

<script>
let league = '<%= league %>';
Expand Down

0 comments on commit f55eb72

Please sign in to comment.