Skip to content

Commit 2d18468

Browse files
committed
added green theme
my first github open source cooperation :-)
1 parent da7a604 commit 2d18468

File tree

2 files changed

+143
-0
lines changed

2 files changed

+143
-0
lines changed

css/green-snake.css

+138
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,138 @@
1+
/*
2+
JavaScript Snake
3+
By Patrick Gillespie
4+
http://patorjk.com/games/snake
5+
*/
6+
body {
7+
margin:0px;
8+
padding:0px;
9+
background-color: darkgreen;
10+
}
11+
12+
#game-area {
13+
margin:10px;
14+
padding:0px;
15+
background-color: lightgreen;
16+
}
17+
18+
#mode-wrapper {
19+
color: #ffffff;
20+
font-family: Verdana, arial, helvetica, sans-serif;
21+
font-size: 14px;
22+
23+
}
24+
25+
#game-area:focus { outline: none; }
26+
27+
a.snake-link, a.snake-link:link, a.snake-link:visited {
28+
color: black;
29+
}
30+
31+
a.snake-link:hover {
32+
color: #FfFf54;
33+
}
34+
35+
.snake-pause-screen {
36+
font-family: Verdana, arial, helvetica, sans-serif;
37+
font-size: 14px;
38+
position:absolute;
39+
width:300px;
40+
height:80px;
41+
text-align:center;
42+
top:50%;
43+
left:50%;
44+
margin-top:-40px;
45+
margin-left:-150px;
46+
display:none;
47+
background-color:black;
48+
color:white;
49+
}
50+
51+
.snake-panel-component {
52+
position: absolute;
53+
font-family: Verdana, arial, helvetica, sans-serif;
54+
font-size: 14px;
55+
color: black;
56+
text-align: center;
57+
background-color: white;
58+
padding: 8px;
59+
margin: 0px;
60+
}
61+
62+
.snake-snakebody-block {
63+
margin: 0px;
64+
padding: 0px;
65+
background-color: #FF0000;
66+
position: absolute;
67+
border: 0px solid #000080;
68+
background-repeat: no-repeat;
69+
}
70+
71+
.snake-snakebody-alive {
72+
background-image: url('./images/snakeblock.png');
73+
}
74+
.snake-snakebody-dead {
75+
background-image: url('./images/deadblock.png');
76+
}
77+
78+
.snake-food-block {
79+
margin: 0px;
80+
padding: 0px;
81+
background-color: black;
82+
border: 0px solid #000080;
83+
position: absolute;
84+
}
85+
86+
.snake-playing-field {
87+
margin: 0px;
88+
padding: 0px;
89+
position: absolute;
90+
background-color: white;
91+
border: 0px solid #0000A8;
92+
}
93+
94+
.snake-game-container {
95+
margin: 0px;
96+
padding: 0px;
97+
border-width: 0px;
98+
border-style: none;
99+
zoom: 1;
100+
background-color: #FC5454;
101+
position: relative;
102+
}
103+
104+
.snake-welcome-dialog {
105+
padding: 8px;
106+
margin: 0px;
107+
background-color: #000000;
108+
color: #ffffff;
109+
font-family: Verdana, arial, helvetica, sans-serif;
110+
font-size: 14px;
111+
position: absolute;
112+
top: 50%;
113+
left: 50%;
114+
width: 300px;
115+
/*height: 150px;*/
116+
margin-top: -100px;
117+
margin-left: -158px;
118+
text-align: center;
119+
display: block;
120+
}
121+
122+
.snake-try-again-dialog {
123+
padding: 8px;
124+
margin: 0px;
125+
background-color: #000000;
126+
color: #ffffff;
127+
font-family: Verdana, arial, helvetica, sans-serif;
128+
font-size: 14px;
129+
position: absolute;
130+
top: 50%;
131+
left: 50%;
132+
width: 300px;
133+
height: 100px;
134+
margin-top: -75px;
135+
margin-left: -158px;
136+
text-align: center;
137+
display: none;
138+
}

index.html

+5
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,9 @@
4040
break;
4141
case 2:
4242
changeTheme('css/dark-snake.css?' + Math.random());
43+
break;
44+
case 3:
45+
changeTheme('css/green-snake.css?' + Math.random());
4346
break;
4447
default:
4548
changeTheme('css/main-snake.css?' + Math.random());
@@ -71,6 +74,8 @@
7174
<option>Light Theme</option>
7275
<option selected>Main Theme</option>
7376
<option>Dark Theme</option>
77+
<option>Green Theme</option>
78+
7479
</select>
7580
</div>
7681
<div style="display:inline-block;margin-right:10px;">

0 commit comments

Comments
 (0)