Skip to content

Commit 74382cf

Browse files
committed
added some more styling to example page and refractored name of src file
1 parent 74b4248 commit 74382cf

5 files changed

Lines changed: 99 additions & 6 deletions

File tree

examples/assets/hero.jpg

40.7 KB
Loading

examples/assets/style.css

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,300,400,600,700,800);
2+
3+
@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,200,300,600,700);
4+
* {
5+
-webkit-font-smoothing: antialiased;
6+
}
7+
body {
8+
background: #fff;
9+
font-family: "Open Sans", Arial, sans-serif;
10+
}
11+
h1,
12+
h2,
13+
h3 {
14+
font-family: "Source Sans Pro", Arial, sans-serif;
15+
}
16+
.hero {
17+
background-image: url(hero.jpg);
18+
background-size: 100%;
19+
height: 212px;
20+
padding: 40px;
21+
margin-bottom: 20px;
22+
text-align: center;
23+
color: #fff;
24+
}
25+
.hero h1,
26+
.hero h3 {
27+
margin: 5px;
28+
color: #fff;
29+
font-weight: 400;
30+
text-shadow: 0 0 1px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.3);
31+
}

examples/assets/style.less

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
@import url(http://fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,300,400,600,700,800);
2+
@import url(http://fonts.googleapis.com/css?family=Source+Sans+Pro:400,200,300,600,700);
3+
4+
* {
5+
-webkit-font-smoothing: antialiased;
6+
}
7+
body {
8+
background: #fff;
9+
font-family: "Open Sans", Arial, sans-serif;
10+
}
11+
h1, h2, h3 {
12+
font-family: "Source Sans Pro", Arial, sans-serif;
13+
}
14+
.hero {
15+
background-image: url(hero.jpg); background-size:100%;
16+
height: 212px;
17+
padding:40px;
18+
margin-bottom:20px;
19+
text-align: center;
20+
color:#fff;
21+
h1,h3 {margin:5px; color:#fff; font-weight: 400;text-shadow: 0 0 1px rgba(0,0,0,.05), 0 1px 2px rgba(0,0,0,.3);}
22+
}

examples/index.html

Lines changed: 46 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,23 @@
11
<!DOCTYPE html>
22
<html>
33
<head>
4-
<link rel="stylesheet" href="http://twitter.github.com/bootstrap/assets/css/bootstrap.css">
4+
<!-- strictly for styling and demo purposes -->
5+
<link rel="stylesheet" href="http://cdn.jsdelivr.net/foundation/4.3.1/css/foundation.min.css">
6+
<link rel="stylesheet" href="assets/style.css">
7+
8+
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
9+
<link href="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.css" rel="stylesheet" type="text/css" />
10+
<script src="http://twitter.github.com/bootstrap/assets/js/google-code-prettify/prettify.js" type="text/javascript"></script>
11+
<script type="text/javascript">
12+
$(document).ready(function() {
13+
$("pre", this).addClass("prettyprint");
14+
});
15+
</script>
16+
<!-- end unnecessary files for demo -->
17+
518
<script src="../components/angular/angular.min.js"></script>
619
<script src="../components/angular-cookies/angular-cookies.min.js"></script>
7-
<script src="../src/localFactory.js"></script>
20+
<script src="../src/localStorage.js"></script>
821
<script>
922
var eS = angular.module('exampleStore', ['localStorage']);
1023

@@ -20,11 +33,38 @@
2033
<body>
2134
<div ng-app="exampleStore">
2235
<div ng-controller="MainCtrl">
23-
<p>{{test}}</p>
24-
<label>Local Storage Bound:</label> <input type="text" ng-model="test">
25-
<a ng-click="clearTest()">Clear Value from LC</a>
36+
<div class="hero">
37+
<h1>the simplest localStorage implementation, <b>ever</b></h1>
38+
<h3>angular localStorage module</h3>
39+
</div>
40+
<div class="row">
41+
<div class="large-12 columns">
42+
<h2>How to use localStorage module</h2>
43+
</div>
44+
</div>
45+
<div class="row">
46+
<div class="large-4 columns">
47+
<p>Variable: <b>{{test}}</b></p>
48+
<label>localStorage variable value:</label> <input type="text" ng-model="test">
49+
<a ng-click="clearTest()">Clear Value from LC</a>
50+
51+
<p style="font-size: 12px;"><i>Change the value in the textbox and refresh the page!</i></p>
52+
</div>
53+
<div class="large-8 columns">
54+
<pre>
55+
var eS = angular.module('exampleStore', ['localStorage']);
56+
57+
eS.controller('MainCtrl', ['$scope', '$store', function ( $scope, $store ) {
58+
$store.bind($scope, 'test', 'Some Default Text');
59+
60+
$scope.clearTest = function () {
61+
$store.remove('test');
62+
};
63+
}]);
64+
</pre>
65+
</div>
66+
</div>
2667

27-
<p><i>Change the value in the textbox and refresh the page!</i></p>
2868
</div>
2969
</div>
3070
</body>
File renamed without changes.

0 commit comments

Comments
 (0)