Skip to content

Commit 33ccb7b

Browse files
committed
Code syntax highlighting. Styles updates.
1 parent 738c9c2 commit 33ccb7b

File tree

15 files changed

+799
-40
lines changed

15 files changed

+799
-40
lines changed

app/css/app.css

Lines changed: 23 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,17 @@ body {
44
padding-bottom: 20px;
55
}
66

7+
/* Redefining bootstrap styles */
8+
.container .jumbotron,
9+
.nav-pills > li > a,
10+
.btn, .form-control, pre {
11+
border-radius: 0;
12+
}
13+
:not(pre) > code[class*="language-"], pre[class*="language-"] {
14+
background: #FFF;
15+
}
16+
17+
718
/* Everything but the jumbotron gets side spacing for mobile first views */
819
.header,
920
.marketing,
@@ -84,7 +95,7 @@ body {
8495
.content .page {
8596
position: absolute;
8697
padding: 30px;
87-
background: #EEE;
98+
background: #CBE0CF;
8899
text-align: left;
89100
width: 100%;
90101
height: 100%;
@@ -154,6 +165,8 @@ body {
154165
}
155166
.container .content .page-code .pre-html:after {
156167
content: 'HTML';
168+
top: -2px;
169+
right: 10px;
157170
}
158171
.container .content .page-code .pre-css {
159172
position: absolute;
@@ -166,11 +179,18 @@ body {
166179
}
167180
.container .content .page-code .pre-css:after {
168181
content: 'CSS';
182+
right: 9px;
169183
}
170184
.container .content .page-code .back {
171185
position: absolute;
172-
top: 0;
173-
right: 8px;
186+
top: -2px;
187+
right: 12px;
188+
font-size: 20px;
189+
}
190+
.container .content .page-code small {
191+
position: absolute;
192+
bottom: 1px;
193+
color: #444;
174194
}
175195

176196

app/index.html

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@
44
<meta charset="utf-8">
55
<title>ngView Animation Effects</title>
66
<link rel="stylesheet" href="css/bootstrap.min.css"/>
7-
<link rel="stylesheet" href="css/app.css"/>
7+
<link rel="stylesheet" href="lib/prism/themes/prism.css" />
8+
<link rel="stylesheet" href="css/app.css"/>
89
</head>
910
<body>
1011

@@ -56,11 +57,13 @@ <h4>Animation Effect</h4>
5657
<script src="lib/angular/angular.js"></script>
5758
<script src="lib/angular/angular-route.min.js"></script>
5859
<script src="lib/angular/angular-animate.min.js"></script>
60+
<script src="lib/prism/prism.js"></script>
5961
<script src="js/app.js"></script>
6062
<script src="js/controllers/indexController.js"></script>
6163
<script src="js/controllers/pageController.js"></script>
6264
<script src="js/controllers/aboutController.js"></script>
6365
<script src="js/controllers/codeController.js"></script>
6466
<script src="js/directives/backAnimation.js"></script>
67+
<script src="js/directives/prism.js"></script>
6568
</body>
6669
</html>

app/js/controllers/indexController.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ app.controller('indexController', ['$scope', '$route', function($scope, $route)
99
{name: 'Fade in/out', className: 'fade'},
1010
{name: 'Flip', className: 'flip'},
1111
{name: 'Rotate', className: 'rotate'},
12-
{name: 'Slide+popin', className: 'slide-pop'}
12+
{name: 'Slide + Pop in', className: 'slide-pop'}
1313
];
1414

1515
$scope.effect = $scope.effects[0].className;

app/js/directives/prism.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
app.directive('nagPrism', function() {
2+
return {
3+
link: function(scope, element) {
4+
Prism.highlightElement(element.find('code')[0]);
5+
}
6+
};
7+
});

0 commit comments

Comments
 (0)