Skip to content

Commit 6559504

Browse files
committed
feat(css): add network.css
1 parent 2578c44 commit 6559504

File tree

6 files changed

+121
-2
lines changed

6 files changed

+121
-2
lines changed

‎www/index.html‎

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,26 @@
3535
<canvas id="bevy"></canvas>
3636
<div id="orientationlock">Please lock your device in portrait mode to use this game.</div>
3737
<div id="presentation">
38-
<h1>bevy-rust-wasm-experiments</h1>
38+
<header>
39+
<ul class="site-networks">
40+
<li class="twitter">
41+
<a href="https://twitter.com/topheman" title="@topheman on twitter">
42+
<span class="icon"></span>
43+
<span class="desc">Twitter</span>
44+
</a>
45+
</li>
46+
<li class="github">
47+
<a
48+
href="https://github.com/topheman/bevy-rust-wasm-experiments"
49+
title="topheman on github"
50+
>
51+
<span class="icon"></span>
52+
<span class="desc">Github</span>
53+
</a>
54+
</li>
55+
</ul>
56+
<h1 class="title">bevy-rust-wasm-experiments</h1>
57+
</header>
3958
<p class="logo-wrapper"><img src="./bevy-rust-wasm-experiments-logo-445x380.png" /></p>
4059
<p class="text-center"><button id="start">PLAY</button></p>
4160
<p class="text-center">or snap the Qrcode below to play with your mobile device 👇</p>

‎www/main.js‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import './style.css'
2+
import './network.css'
23

34
import init from './public/out/bevy-rust-wasm-experiments'
45
import './components/qrcode-display'

‎www/network.css‎

Lines changed: 94 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,94 @@
1+
/** github logo from my other sites**/
2+
/** networks header */
3+
.site-networks {
4+
z-index: 20;
5+
position: absolute;
6+
right: 20px;
7+
top: 10px;
8+
margin: 0;
9+
padding: 0;
10+
}
11+
12+
ul.site-networks {
13+
list-style: none;
14+
text-align: center;
15+
padding: 0px 0px 10px 0px;
16+
}
17+
18+
ul.site-networks li {
19+
position: relative;
20+
display: inline-block;
21+
vertical-align: middle;
22+
margin-left: 15px;
23+
}
24+
25+
ul.site-networks li a {
26+
display: block;
27+
width: 32px;
28+
height: 32px;
29+
text-decoration: none;
30+
padding-top: 0px;
31+
-webkit-transition: all 0.5s;
32+
-moz-transition: all 0.5s;
33+
-ms-transition: all 0.5s;
34+
-o-transition: all 0.5s;
35+
transition: all 0.5s;
36+
}
37+
38+
ul.site-networks li a span.icon {
39+
position: absolute;
40+
display: block;
41+
width: 32px;
42+
height: 32px;
43+
-webkit-transition: all 0.5s;
44+
-moz-transition: all 0.5s;
45+
-ms-transition: all 0.5s;
46+
-o-transition: all 0.5s;
47+
transition: all 0.5s;
48+
}
49+
50+
ul.site-networks li a span.desc {
51+
display: none;
52+
}
53+
54+
ul.site-networks li a:hover span.icon {
55+
left: 0px;
56+
-webkit-transform: rotate(360deg);
57+
-moz-transform: rotate(360deg);
58+
-ms-transform: rotate(360deg);
59+
-o-transform: rotate(360deg);
60+
transform: rotate(360deg);
61+
}
62+
63+
/** since logos are included with the css in base64, we don't bother about pixel ratio media query (everybody gets the retina version)*/
64+
ul.site-networks li.twitter a span.icon {
65+
background-image: url(/twitter-retina.png);
66+
background-size: 32px 32px;
67+
}
68+
69+
ul.site-networks li.github a span.icon {
70+
background-image: url(/github-retina.png);
71+
background-size: 32px 32px;
72+
}
73+
74+
@media only screen and (max-width: 700px) and (min-width: 370px) {
75+
ul.site-networks {
76+
/* right: 70px; */
77+
}
78+
ul.site-networks li {
79+
margin-left: 0px;
80+
}
81+
.site-title {
82+
font-size: 26px;
83+
}
84+
.content {
85+
padding: 0 10px;
86+
}
87+
img {
88+
max-width: 100%;
89+
}
90+
}
91+
92+
.hide-site-networks .site-networks {
93+
display: none;
94+
}

‎www/public/github-retina.png‎

3.53 KB
Loading

‎www/public/twitter-retina.png‎

2.2 KB
Loading

‎www/style.css‎

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,15 @@ button.back-home-page {
5959

6060
@media screen and (max-width: 600px) {
6161
#presentation h1 {
62-
font-size: 1.4rem;
62+
font-size: 1.2rem;
6363
}
6464
}
6565

66+
#presentation h1.title {
67+
max-width: 80%;
68+
margin-top: 0px;
69+
}
70+
6671
#presentation .logo-wrapper {
6772
text-align: center;
6873
}

0 commit comments

Comments
 (0)