-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.html
executable file
·224 lines (202 loc) · 6.24 KB
/
index.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
<!doctype html>
<!--
Copyright (c) 2014 The Polymer Project Authors. All rights reserved.
This code may only be used under the BSD style license found at //polymer.github.io/LICENSE
The complete set of authors may be found at //polymer.github.io/AUTHORS
The complete set of contributors may be found at //polymer.github.io/CONTRIBUTORS
Code distributed by Google as part of the polymer project is also
subject to an additional IP rights grant found at //polymer.github.io/PATENTS
-->
<html>
<head>
<script src="bower_components/platform/platform.js"></script>
<link rel="import" href="src/x-life.html">
<script src="//code.jquery.com/jquery-1.11.0.min.js"></script>
<script src="/highlight/highlight.pack.js"></script>
<link href="/prism.css" rel="stylesheet" />
<style>
@import url(//fonts.googleapis.com/css?family=Arvo|Roboto:400,700,900);
body, html{
width:100%;
height:100%;
position: relative;
padding:0;
margin:0;
}
a{
text-decoration: none !important;
color:white;
}
a:hover{
text-decoration: underline;
}
textarea, input { outline: none; }
section{
width:100%;
margin-bottom: 200px;
}
x-life{
position:fixed;
z-index:-1;
height:100%;
}
#main{
position: relative;
height:100%;
margin:0px;
}
#title{
position:absolute;
/*position:fixed;*/
width:400px;
height:140px;
background-color: rgba(254,254,254,0);
text-align:center;
left: 50vw;
top:50vh;
margin-left:-250px;
margin-top:-155px;
border:7px solid rgb(240,240,240);
border:7px solid black;
padding: 30px 50px 50px 50px;
}
#title h1{
font-size: 70px;
font-family: "Roboto";
letter-spacing: 5px;
line-height:0px;
font-weight:900;
color:white;
color:black;
}
h2{
font-family: "Arvo";
font-weight:300;
}
h3{
font-family: "Roboto";
}
#title h2{
font-size: 1em;
font-family: "Arvo";
font-weight:100;
line-height:0px;
margin-top:10px;
color:white;
color:black;
}
.hover{
/*position:absolute;*/
width:50%;
margin-left: 25%;
}
#usage{
top:75px;
}
pre{
background-color: rgb(253,253,253) !important;
font-size: 0.8em !important;
/*padding:15px;
border-radius:2px;*/
}
#try{
line-height:40px;
font-size:1.1em !important;
padding:10px;
}
input{
border:0px solid white;
border-radius:0;
border-bottom:2px solid rgb(200,200,200);
color : rgb(200,200,200);
padding: 10px;
}
input:focus{
border-bottom:2px solid black;
color : black;
}
footer{
width:100%;
padding: 25px 0 25px 0;
text-align:center;
background-color: rgb(20,25,30);
x-index: 9999;
position: relative;
color:white;
font-family:"Arvo", serif;
letter-spacing: 1px;
font-size:0.8em;
}
#by{
font-family:"Arvo", serif;
font-style:italic;
padding: 0 5px 0 5px;
}
</style>
</head>
<body>
<!-- <x-life id='demo' width=1500 height=800 backgroundColor='#c02b36' cellColor = '#e74c3c' cellSize=3></x-life> -->
<x-life id='demo' width=1500 height=800 backgroundColor='rgb(245,245,247)' cellColor = 'rgb(230,230,230)' cellSize=3></x-life>
<section id='main'>
<div id='title'>
<h1> < x-life > </h1>
<h2> A web component for Conway's Game of Life </h2>
<h3>
<iframe src="//ghbtns.com/github-btn.html?user=acrylc&repo=x-life&type=fork"
allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20" ></iframe>
<iframe src="//ghbtns.com/github-btn.html?user=acrylc&repo=x-life&type=watch"
allowtransparency="true" frameborder="0" scrolling="0" width="62" height="20" ></iframe>
</h3>
</section>
<section>
</div>
<div class='hover' id='usage'>
<h2> Install </h2>
<h3> Install the web component using Bower </h3>
<pre> <code class='language-bash'>$ bower install x-life </code></pre>
<br>
<h2> Usage </h2>
<h3> 1. Import polymer </h3>
<pre> <code class='language-markup'> <script src="bower_components/platform/platform.js"> </script> </code></pre>
<h3> 2. Import x-life </h3>
<pre><code class='language-markup'> <link rel='import' href="bower_components/x-life/dist/x-life.html"> </code> </pre>
<h3> 3. Enjoy! </h3>
<pre> <code class='language-markup' > <x-life> </x-life> </code> </pre>
</div>
</section>
<section>
<div class='hover' id='usage'>
<h2>Give it a shot!</h2>
<pre id='try'> <x-life <div style='margin-left:25px' >backgroundColor = <input type='text' value='rgb(250,250,250)' id='backgroundColor'> <br>cellColor = <input type='text' value='rgb(240,240,240)' id='cellColor'> <br>cellSize = <input type='text' value='2.5' id='cellSize'></div>> <br></x-life> </pre>
</div>
</section>
<footer>
<div> <span id='by'>made with <img src='images/heart.png' style='height:11px; padding: 0 2px 0 2px'> and <img src='images/coffee.png' style='height:11px; padding: 0 2px 0 2px'>, by</span> <a href='http://www.mayakreidieh.com'> @acrylc </a> </div>
</footer>
<script>hljs.initHighlightingOnLoad();</script>
<script type='text/javascript'>
$('#demo')[0].width = $('body').width();
$('#demo')[0].height = $('body').height();
window.onresize = function(){
$('#demo')[0].width = $('body').width();
$('#demo')[0].height = $('body').height();
};
(function(){
$('input').blur(function(){
if (this.id==='cellColor' || this.id==='cellSize' || this.id==='backgroundColor'){
$('#demo')[0][this.id]=this.value;
}
});
})();
</script>
<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', 'UA-49609809-3', 'acrylc.github.io');
ga('send', 'pageview');
</script>
<script src="/prism.js"></script>
</body>
</html>