├── README.md ├── js ├── function.js └── rainbow-custom.min.js ├── dr.min.js ├── dr.js ├── dr.coffee ├── LICENSE ├── index.html └── css └── style.css /README.md: -------------------------------------------------------------------------------- 1 | dR 2 | == 3 | 4 | another and small domReady library 5 | -------------------------------------------------------------------------------- /js/function.js: -------------------------------------------------------------------------------- 1 | dR( function() { 2 | console.log( 'Dom is ready!' ); 3 | Rainbow.color(); 4 | } ); -------------------------------------------------------------------------------- /dr.min.js: -------------------------------------------------------------------------------- 1 | window.dR=function(a){var b;b=document;if(/complete|loaded|interactive/.test(b.readyState)){return a;}else{if(b.addEventListener){return b.addEventListener("DOMContentLoaded",a,false); 2 | }else{if(b.attachEvent){return b.attachEvent("onDOMContentLoaded",a);}else{return b.onDOMContentLoaded=a;}}}}; -------------------------------------------------------------------------------- /dr.js: -------------------------------------------------------------------------------- 1 | // Generated by CoffeeScript 1.6.2 2 | window.dR = function(fn) { 3 | var d; 4 | 5 | d = document; 6 | if (/complete|loaded|interactive/.test(d.readyState)) { 7 | return fn; 8 | } else { 9 | if (d.addEventListener) { 10 | return d.addEventListener("DOMContentLoaded", fn, false); 11 | } else if (d.attachEvent) { 12 | return d.attachEvent("onDOMContentLoaded", fn); 13 | } else { 14 | return d["onDOMContentLoaded"] = fn; 15 | } 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /dr.coffee: -------------------------------------------------------------------------------- 1 | # dR (another Dom Ready library) 2 | # dr.coffee 3 | # Author: Miguel Angel (miguel@miduga.es) 4 | # 5 | # URL: http://miduga.es/projects/dR 6 | window.dR = (fn) -> 7 | # save document var for compression and optimization 8 | d = document 9 | # compare the readystate with a regular expression 10 | if /complete|loaded|interactive/.test(d.readyState) then fn 11 | else 12 | if d.addEventListener then d.addEventListener "DOMContentLoaded", fn, false 13 | else if d.attachEvent then d.attachEvent "onDOMContentLoaded", fn 14 | else d["onDOMContentLoaded"] = fn -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2013 midudev 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy of 6 | this software and associated documentation files (the "Software"), to deal in 7 | the Software without restriction, including without limitation the rights to 8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of 9 | the Software, and to permit persons to whom the Software is furnished to do so, 10 | subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS 17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR 18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER 19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN 20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 21 | -------------------------------------------------------------------------------- /index.html: -------------------------------------------------------------------------------- 1 | 2 | 3 |
4 |
18 |
19 | A simple domReady library that let's you know when, obviously, the dom is ready in only 295bytes (minified).
26 |Based on: 27 |
36 | dR( function() {
37 | console.log( 'Yikes! Dom is ready, dude!' );
38 | } );
39 |
40 |
41 |
43 | dR ->
44 | console.log 'Yikes! Dom is ready, dude!'
45 |
--------------------------------------------------------------------------------
/css/style.css:
--------------------------------------------------------------------------------
1 | /* serious reset */
2 | html,body,div,span,object,iframe,h1,h2,h3,h4,h5,p,blockquote,a,code,em,img,small,strong,sub,sup,i,dl,dt,dd,ol,ul,li,fieldset,form,label,legend,table,caption,tbody,tfoot,thead,tr,th,td,article,aside,canvas,details,figure,figcaption,footer,header,menu,nav,section,summary,time,audio,video{border:0;font-size:100%;font:inherit;vertical-align:baseline;margin:0;padding:0}article,aside,details,figcaption,figure,footer,header,menu,nav,section{display:block}body{line-height:1}ol,ul{list-style:none}blockquote{quotes:none}blockquote:before,blockquote:after{content:none}table{border-collapse:collapse;border-spacing:0}
3 |
4 | .none {
5 | display: none;
6 | }
7 |
8 | html, body {
9 | width: 550px;
10 | display: block;
11 | margin: 40px auto 40px;
12 | font-family: 'Roboto', sans-serif;
13 | }
14 |
15 | p {
16 | font-size: 15px;
17 | margin-bottom: 15px;
18 | line-height: 160%;
19 | font-weight: 300;
20 | color: #333;
21 | }
22 |
23 | ol, ul {
24 | margin-top: -15px;
25 | padding-left: 10px;
26 | margin-bottom: 25px;
27 | padding-top: 10px;
28 | }
29 |
30 | li {
31 | padding-bottom: 5px;
32 | }
33 |
34 | a {
35 | color: #09f;
36 | text-decoration: none;
37 | font-weight: 400;
38 | }
39 |
40 | a:hover {
41 | color: #333;
42 | text-shadow: 1px 1px 0px #ddd, 2px 2px 0px #eee;
43 | }
44 |
45 | strong {
46 | font-weight: 400;
47 | color: #444;
48 | }
49 |
50 | .dot {
51 | background: #000;
52 | float: left;
53 | height: 5px;
54 | margin-left: 4px;
55 | width: 5px;
56 | -webkit-border-radius: 5px;
57 | -moz-border-radius: 5px;
58 | border-radius: 5px;
59 | opacity: 0;
60 | }
61 |
62 | h1 {
63 | font-size: 130px;
64 | display: block;
65 | color: #333;
66 | font-family: 'Roboto Slab', serif;
67 | text-shadow: 2px 2px 0px #ccc, 3px 3px 0px #ddd;
68 | letter-spacing: -20px;
69 | display: inline;
70 | }
71 |
72 | header {
73 | padding-bottom: 20px;
74 | position: relative;
75 | }
76 |
77 | header span {
78 | color: #555;
79 | margin-left: 20px;
80 | }
81 |
82 | h2 {
83 | font-size: 18px;
84 | display: block;
85 | color: #555;
86 | border-bottom: 1px solid #ccc;
87 | padding-bottom: 3px;
88 | margin-bottom: 10px;
89 | font-family: 'Roboto Slab', serif;
90 | }
91 |
92 | h3 {
93 | font-size: 16px;
94 | display: block;
95 | color: #666;
96 | padding-bottom: 3px;
97 | margin-bottom: 10px;
98 | font-family: 'Roboto Slab', serif;
99 | }
100 |
101 | /* entypo */
102 | [class*="entypo-"]:before {
103 | font-family: 'entypo', sans-serif;
104 | display: block;
105 | width: 32px;
106 | height: 32px;
107 | font-size: 32px;
108 | float: left;
109 | }
110 |
111 | #download {
112 | right: 0px;
113 | top: 50px;
114 | position: absolute;
115 | vertical-align: top;
116 | line-height: 28px;
117 | border-radius: 4px;
118 | box-shadow: #439230 0 6px 0px, rgba(0, 0, 0, 0.3) 0 10px 3px;
119 | font-family: Arial, Helvetica, sans-serif;
120 | font-size: 20px;
121 | color: #fff;
122 | text-decoration: none;
123 | display: inline-block;
124 | text-align: center;
125 | padding: 10px 15px 8px;
126 | margin: .5em .5em .5em 0;
127 | cursor: pointer;
128 | text-shadow: 0 1px 1px rgba(0,0,0,0.4);
129 | -webkit-transition: 0.1s linear;
130 | -moz-transition: 0.1s linear;
131 | -ms-transition: 0.1s linear;
132 | -o-transition: 0.1s linear;
133 | transition: 0.1s linear;
134 |
135 | background: #82cc5d;
136 | background: -moz-linear-gradient(top, #82cc5d 0%, #53b73c 100%);
137 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#82cc5d), color-stop(100%,#53b73c));
138 | background: -webkit-linear-gradient(top, #82cc5d 0%,#53b73c 100%);
139 | background: -ms-linear-gradient(top, #82cc5d 0%,#53b73c 100%);
140 | background: linear-gradient(to bottom, #82cc5d 0%,#53b73c 100%);
141 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#82cc5d', endColorstr='#53b73c',GradientType=0 );
142 | border: 1px solid #429E34;
143 | }
144 |
145 | #download:hover {
146 | box-shadow: #439230 0 6px 0px, rgba(0, 0, 0, 0.3) 0 10px 3px;
147 | background: #99cc80;
148 | background: -moz-linear-gradient(top, #99cc80 0%, #53b73c 100%);
149 | background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,#99cc80), color-stop(100%,#53b73c));
150 | background: -webkit-linear-gradient(top, #99cc80 0%,#53b73c 100%);
151 | background: -ms-linear-gradient(top, #99cc80 0%,#53b73c 100%);
152 | background: linear-gradient(to bottom, #99cc80 0%,#53b73c 100%);
153 | filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#99cc80', endColorstr='#53b73c',GradientType=0 );
154 | }
155 |
156 | #download:active {
157 | box-shadow: #439230 0 3px 0, rgba(0, 0, 0, 0.2) 0 6px 3px;
158 | }
159 |
160 | #download span {
161 | margin-left: 5px;
162 | color: #f0f0f0;
163 | font-weight: normal;
164 | font-size: 12px;
165 | text-shadow: 0 none;
166 | }
167 |
168 | /**
169 | * Blackboard theme
170 | *
171 | * Adapted from Domenico Carbotta's TextMate theme of the same name
172 | *
173 | * @author Domenico Carbotta
174 | * @author Craig Campbell
175 | * @version 1.0.2
176 | */
177 | pre {
178 | background: #272822;
179 | word-wrap: break-word;
180 | margin: 0px 0px 30px 0px;
181 | padding: 5px;
182 | color: #f0f0f0;
183 | font-size: 14px;
184 | }
185 |
186 | pre, code {
187 | font-family: 'Inconsolata', courier, monospace;
188 | }
189 |
190 | pre .comment {
191 | color: #727272;
192 | }
193 |
194 | pre .constant {
195 | color: #D8FA3C;
196 | }
197 |
198 | pre .storage {
199 | color: #FBDE2D;
200 | }
201 |
202 | pre .string, pre .comment.docstring {
203 | color: #61CE3C;
204 | }
205 |
206 | pre .string.regexp, pre .support.tag.script, pre .support.tag.style {
207 | color: #fff;
208 | }
209 |
210 | pre .keyword, pre .selector {
211 | color: #FBDE2D;
212 | }
213 |
214 | pre .inherited-class {
215 | font-style: italic;
216 | }
217 |
218 | pre .entity {
219 | color: #FF6400;
220 | }
221 |
222 | pre .support, *[data-language="c"] .function.call {
223 | color: #8DA6CE;
224 | }
225 |
226 | pre .variable.global, pre .variable.class, pre .variable.instance {
227 | color: #FF6400;
228 | }
--------------------------------------------------------------------------------
/js/rainbow-custom.min.js:
--------------------------------------------------------------------------------
1 | /* Rainbow v1.2 rainbowco.de | included languages: generic, coffeescript, javascript */
2 | window.Rainbow=function(){function q(a){var b,c=a.getAttribute&&a.getAttribute("data-language")||0;if(!c){a=a.attributes;for(b=0;b