File tree 4 files changed +62
-3
lines changed
4 files changed +62
-3
lines changed Original file line number Diff line number Diff line change 114
114
</ div >
115
115
116
116
< script src ="https://code.jquery.com/jquery-1.10.2.min.js "> </ script >
117
- < script src ="http://bootswatch.com/bower_components/bootstrap/dist/js /bootstrap.min.js "> </ script >
118
- < script src ="http://bootswatch.com/assets/js/bootswatch .js "> </ script >
117
+ < script src ="javascripts /bootstrap.min.js "> </ script >
118
+ < script src ="javascripts/cerulean .js "> </ script >
119
119
</ body >
120
120
</ html >
121
121
Original file line number Diff line number Diff line change
1
+ ( function ( ) {
2
+ $ ( window ) . scroll ( function ( ) {
3
+ var top = $ ( document ) . scrollTop ( ) ;
4
+ $ ( '.splash' ) . css ( {
5
+ 'background-position' : '0px -' + ( top / 3 ) . toFixed ( 2 ) + 'px'
6
+ } ) ;
7
+ if ( top > 50 )
8
+ $ ( '#home > .navbar' ) . removeClass ( 'navbar-transparent' ) ;
9
+ else
10
+ $ ( '#home > .navbar' ) . addClass ( 'navbar-transparent' ) ;
11
+ } ) ;
12
+
13
+ var $button = $ ( "<div id='source-button' class='btn btn-primary btn-xs'>< ></div>" ) . click ( function ( ) {
14
+ var html = $ ( this ) . parent ( ) . html ( ) ;
15
+ html = cleanSource ( html ) ;
16
+ $ ( "#source-modal pre" ) . text ( html ) ;
17
+ $ ( "#source-modal" ) . modal ( ) ;
18
+ } ) ;
19
+
20
+ $ ( '.bs-component [data-toggle="popover"]' ) . popover ( ) ;
21
+ $ ( '.bs-component [data-toggle="tooltip"]' ) . tooltip ( ) ;
22
+
23
+ $ ( ".bs-component" ) . hover ( function ( ) {
24
+ $ ( this ) . append ( $button ) ;
25
+ $button . show ( ) ;
26
+ } , function ( ) {
27
+ $button . hide ( ) ;
28
+ } ) ;
29
+
30
+ function cleanSource ( html ) {
31
+ var lines = html . split ( / \n / ) ;
32
+
33
+ lines . shift ( ) ;
34
+ lines . splice ( - 1 , 1 ) ;
35
+
36
+ var indentSize = lines [ 0 ] . length - lines [ 0 ] . trim ( ) . length ,
37
+ re = new RegExp ( " {" + indentSize + "}" ) ;
38
+
39
+ lines = lines . map ( function ( line ) {
40
+ if ( line . match ( re ) ) {
41
+ line = line . substring ( indentSize ) ;
42
+ }
43
+
44
+ return line ;
45
+ } ) ;
46
+
47
+ lines = lines . join ( "\n" ) ;
48
+
49
+ return lines ;
50
+ }
51
+
52
+ } ) ( ) ;
Original file line number Diff line number Diff line change @@ -41,5 +41,5 @@ footer p{clear:left;margin-bottom:0}
41
41
@media (max-width : 767px ){.splash {padding-top : 4em }
42
42
.splash .logo {width : 100px }
43
43
.splash h1 {font-size : 2em }
44
- # banner {margin-bottom : 2em ;text-align : center }
44
+ # banner {margin-bottom : 2em ;text-align : left }
45
45
}
You can’t perform that action at this time.
0 commit comments