Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit db76ee9

Browse files
committed
Start angular app for demo
1 parent 2980b8d commit db76ee9

6 files changed

Lines changed: 200 additions & 11 deletions

File tree

demo/Gruntfile.js

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -81,6 +81,13 @@ module.exports = function(grunt) {
8181
flatten:true,
8282
filter:'isFile',
8383
expand:true
84+
},
85+
{
86+
src:'../devicon.json',
87+
dest:'assets/',
88+
flatten:true,
89+
filter:'isFile',
90+
expand:true
8491
}
8592
],
8693
},
@@ -154,7 +161,8 @@ module.exports = function(grunt) {
154161
copy: {
155162
files: [
156163
'../font/*',
157-
'../scss/devicon.scss'
164+
'../scss/devicon.scss',
165+
'../devicon.json'
158166
],
159167
tasks: ['copy:dev']
160168
},
@@ -165,6 +173,7 @@ module.exports = function(grunt) {
165173
files: [
166174
'assets/**/*.css',
167175
'assets/**/*.js',
176+
'assets/**/*.json',
168177
'**/*.html'
169178
]
170179
}

demo/assets/devicon.json

Lines changed: 149 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,149 @@
1+
[{
2+
3+
"ProgrammingLanguages": {
4+
"name": "Programming Languages",
5+
"icons": [
6+
7+
{
8+
"name": "html5",
9+
"options": {
10+
"simple": true,
11+
"text": true,
12+
"color": true
13+
}
14+
}, {
15+
"name": "css3",
16+
"options": {
17+
"simple": true,
18+
"text": true,
19+
"color": true
20+
}
21+
}, {
22+
"name": "js",
23+
"options": {
24+
"simple": true,
25+
"text": false,
26+
"color": true
27+
}
28+
}, {
29+
"name": "javascript",
30+
"options": {
31+
"simple": true,
32+
"text": true,
33+
"color": true
34+
}
35+
}, {
36+
"name": "mysql",
37+
"options": {
38+
"simple": true,
39+
"text": true,
40+
"color": true
41+
}
42+
}
43+
44+
]
45+
},
46+
47+
"DevelopmentTools": {
48+
"name": "Development tools",
49+
"icons": [
50+
51+
{
52+
"name": "sass",
53+
"options": {
54+
"simple": true,
55+
"text": false,
56+
"color": true
57+
}
58+
}, {
59+
"name": "less",
60+
"options": {
61+
"simple": true,
62+
"text": false,
63+
"color": true
64+
}
65+
}, {
66+
"name": "laravel",
67+
"options": {
68+
"simple": true,
69+
"text": true,
70+
"color": true
71+
}
72+
}, {
73+
"name": "bootstrap",
74+
"options": {
75+
"simple": true,
76+
"text": true,
77+
"color": true
78+
}
79+
}, {
80+
"name": "foundation",
81+
"options": {
82+
"simple": true,
83+
"text": true,
84+
"color": true
85+
}
86+
}, {
87+
"name": "angularjs",
88+
"options": {
89+
"simple": true,
90+
"text": true,
91+
"color": true
92+
}
93+
}, {
94+
"name": "jquery",
95+
"options": {
96+
"simple": true,
97+
"text": true,
98+
"color": true
99+
}
100+
}, {
101+
"name": "grunt",
102+
"options": {
103+
"simple": true,
104+
"text": true,
105+
"color": true
106+
}
107+
}, {
108+
"name": "bower",
109+
"options": {
110+
"simple": true,
111+
"text": true,
112+
"color": true
113+
}
114+
}, {
115+
"name": "git",
116+
"options": {
117+
"simple": true,
118+
"text": true,
119+
"color": true
120+
}
121+
}
122+
123+
]
124+
},
125+
126+
"DesigningTools": {
127+
"name": "Designing tools",
128+
"icons": [
129+
130+
{
131+
"name": "photoshop",
132+
"options": {
133+
"simple": true,
134+
"text": false,
135+
"color": true
136+
}
137+
}, {
138+
"name": "illustrator",
139+
"options": {
140+
"simple": true,
141+
"text": false,
142+
"color": true
143+
}
144+
}
145+
146+
]
147+
}
148+
149+
}]

demo/assets/script.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
var phonecatApp = angular.module('devicon', []);
2+
3+
phonecatApp.controller('IconListCtrl', function ($scope, $http) {
4+
$http.get('assets/devicon.json').success(function(data) {
5+
$scope.icons = data[0];
6+
});
7+
8+
});

demo/assets/scss/style.scss

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,14 @@
11
@import
22
"../scss/devicon.scss";
33

4+
.devicons {
5+
list-style: none;
6+
li {
7+
display: inline-block;
8+
padding: 1rem 2rem;
9+
}
10+
}
11+
412
i {
513
font-size: 5rem;
614
}

demo/assets/style.css

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,14 @@
316316
color: #faa625;
317317
}
318318

319+
.devicons {
320+
list-style: none;
321+
}
322+
.devicons li {
323+
display: inline-block;
324+
padding: 1rem 2rem;
325+
}
326+
319327
i {
320328
font-size: 5rem;
321329
}

demo/index.html

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -16,29 +16,36 @@
1616

1717
<script src="assets/components/modernizr.js"></script>
1818
</head>
19-
<body>
19+
<body ng-app="devicon">
2020
<!--[if lt IE 7]>
2121
<p class="chromeframe">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> or <a href="http://www.google.com/chromeframe/?redirect=true">activate Google Chrome Frame</a> to improve your experience.</p>
2222
<![endif]-->
2323

24-
<header class="header">
24+
<!-- <header class="header">
2525
<h1>devicon</h1>
26-
</header>
27-
28-
<main class="main">
29-
<ul>
30-
<li><i class="devicon-sass"></i></li>
26+
</header> -->
27+
28+
<main class="main" ng-controller="IconListCtrl">
29+
<ul class="devicons" ng-repeat="type in icons">
30+
<h2>{{ type.name }}</h2>
31+
<li ng-repeat="icon in type.icons">
32+
<i class="devicon-{{ icon.name }}"></i>
33+
<i class="devicon-{{ icon.name }}-color"></i>
34+
<i ng-if="icon.options.text == true" class="devicon-{{ icon.name }}-text"></i>
35+
<i ng-if="icon.options.text == true" class="devicon-{{ icon.name }}-text-color"></i>
36+
</li>
3137
</ul>
3238
</main>
3339

34-
<footer class="footer">
40+
<!-- <footer class="footer">
3541
<a href="http://konpa.fr">konpa</a>
36-
</footer>
42+
</footer> -->
3743

3844
<script src="assets/components/jquery.js"></script>
3945
<script src="assets/components/fastclick.js"></script>
4046
<script src="assets/components/foundation.js"></script>
41-
<script src="assets/js/script.js"></script>
47+
<script src="assets/components/angular.js"></script>
48+
<script src="assets/script.js"></script>
4249

4350
<script>
4451
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){

0 commit comments

Comments
 (0)