Skip to content
This repository was archived by the owner on May 29, 2019. It is now read-only.

Commit 3f33a16

Browse files
Jon Jaquespkozlowski-opensource
authored andcommitted
demo(all): upgrade project to bs3.0.0-rc2 and get docs looking spiffy
1 parent e80217a commit 3f33a16

File tree

3 files changed

+114
-89
lines changed

3 files changed

+114
-89
lines changed

Gruntfile.js

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ module.exports = function(grunt) {
44

55
grunt.loadNpmTasks('grunt-contrib-watch');
66
grunt.loadNpmTasks('grunt-contrib-concat');
7-
grunt.loadNpmTasks('grunt-contrib-copy');
7+
grunt.loadNpmTasks('grunt-contrib-copy');
88
grunt.loadNpmTasks('grunt-contrib-jshint');
99
grunt.loadNpmTasks('grunt-contrib-uglify');
1010
grunt.loadNpmTasks('grunt-html2js');
@@ -17,7 +17,8 @@ module.exports = function(grunt) {
1717

1818
grunt.initConfig({
1919
ngversion: '1.0.5',
20-
bsversion: '2.3.1',
20+
bsversion: '3.0.0-rc1',
21+
faversion: '3.2.1',
2122
modules: [],//to be filled in by build task
2223
pkg: grunt.file.readJSON('package.json'),
2324
dist: 'dist',
@@ -29,6 +30,10 @@ module.exports = function(grunt) {
2930
all: 'angular.module("ui.bootstrap", ["ui.bootstrap.tpls", <%= srcModules %>]);'
3031
},
3132
delta: {
33+
docs: {
34+
files: ['misc/demo/index.html'],
35+
tasks: ['after-test']
36+
},
3237
html: {
3338
files: ['template/**/*.html'],
3439
tasks: ['html2js', 'karma:watch:run']
@@ -165,7 +170,7 @@ module.exports = function(grunt) {
165170
options: {
166171
dest: 'dist/docs',
167172
scripts: [
168-
'angular.js',
173+
'angular.js',
169174
'<%= concat.dist_tpls.dest %>'
170175
],
171176
styles: [
@@ -182,7 +187,7 @@ module.exports = function(grunt) {
182187
}
183188
});
184189

185-
//register before and after test tasks so we've don't have to change cli
190+
//register before and after test tasks so we've don't have to change cli
186191
//options on the goole's CI server
187192
grunt.registerTask('before-test', ['enforce', 'jshint', 'html2js']);
188193
grunt.registerTask('after-test', ['build', 'copy']);

misc/demo/assets/demo.css

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -86,16 +86,39 @@ section {
8686
line-height: 1;
8787
}
8888

89-
.icon-github {
90-
background: no-repeat url('github-16px.png');
91-
width: 16px;
92-
height: 16px;
93-
}
9489

95-
/* Not enough room on mobile for markup tab, js tab, and plunk btn.
90+
/* Not enough room on mobile for markup tab, js tab, and plunk btn.
9691
And no one cares about plunk button on a phone anyway */
9792
@media only screen and (max-device-width: 480px) {
9893
#plunk-btn {
9994
display: none;
10095
}
96+
}
97+
98+
.navbar-nav .dropdown .navbar-brand {
99+
max-width: 100%;
100+
margin-right: inherit;
101+
margin-left: inherit;
102+
}
103+
104+
.header-placeholder {
105+
height: 175px;
106+
}
107+
108+
@media screen and (min-width: 768px) {
109+
110+
.dropdown.open > .navbar-brand + .dropdown-menu {
111+
left: 10px;
112+
}
113+
114+
.header-placeholder {
115+
height: 50px;
116+
}
117+
118+
.navbar-nav .dropdown .navbar-brand {
119+
max-width: 200px;
120+
margin-right: 5px;
121+
margin-left: 10px;
122+
}
123+
101124
}

misc/demo/index.html

Lines changed: 76 additions & 79 deletions
Original file line numberDiff line numberDiff line change
@@ -10,51 +10,49 @@
1010
<script src="ui-bootstrap-tpls-<%= pkg.version%>.js"></script>
1111
<script src="assets/plunker.js"></script>
1212
<script src="assets/app.js"></script>
13-
<link href="http://netdna.bootstrapcdn.com/twitter-bootstrap/<%= bsversion %>/css/bootstrap.min.css" rel="stylesheet"/>
13+
14+
<link href="http://netdna.bootstrapcdn.com/bootstrap/<%= bsversion %>/css/bootstrap.css" rel="stylesheet"/>
15+
<link href="http://netdna.bootstrapcdn.com/font-awesome/<%= faversion %>/css/font-awesome.min.css" rel="stylesheet">
1416
<link rel="stylesheet" href="assets/rainbow.css"/>
1517
<link rel="stylesheet" href="assets/demo.css"/>
16-
1718
<link rel="author" href="https://github.com/angular-ui/bootstrap/graphs/contributors">
1819
</head>
1920
<body class="ng-cloak" ng-controller="MainCtrl">
2021
<header class="navbar navbar-fixed-top">
2122
<div class="navbar-inner">
2223
<div class="container">
23-
<div class="dropdown pull-left">
24-
<a class="brand dropdown-toggle" role="button" data-toggle="dropdown" href="#">
25-
UI Bootstrap
26-
<b class="caret"></b>
27-
</a>
28-
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
29-
<li><a href="https://github.com/angular-ui/"><strong>Related Projects:</strong></a></li>
30-
<li class="divider"></li>
31-
<li><a href="http://angular-ui.github.io/">AngularUI</a></li>
32-
<li><a href="http://angular-ui.github.io/ng-grid/">Grid</a></li>
33-
<li><a href="https://github.com/angular-ui/AngularJs.tmbundle">AngularJS.tmbundle</a></li>
34-
<li><a href="https://github.com/angular-ui/ui-router">Router <span class="label label-success">New!</span></a></li>
35-
</ul>
36-
</div>
37-
<div class="nav-collapse">
38-
<ul class="nav">
39-
<li>
40-
<a href="#" role="button" class="dropdown-toggle">
41-
Directives <b class="caret"></b>
42-
</a>
43-
<ul class="dropdown-menu">
44-
<% demoModules.forEach(function(module) { %>
45-
<li><a href="#<%= module.name %>"><%= module.displayName %></a></li>
46-
<% }); %>
47-
</ul>
48-
</li>
49-
<li><a href="#getting_started">Getting started</a></li>
24+
<ul class="nav navbar-nav">
25+
<li class="dropdown">
26+
<a href="#" class="navbar-brand dropdown-toggle">
27+
UI Bootstrap <b class="caret"></b>
28+
</a>
29+
<ul class="dropdown-menu" role="menu" aria-labelledby="dLabel">
30+
<li><a href="https://github.com/angular-ui/"><strong>Related Projects:</strong></a></li>
31+
<li class="divider"></li>
32+
<li><a href="http://angular-ui.github.io/">AngularUI</a></li>
33+
<li><a href="http://angular-ui.github.io/ng-grid/">Grid</a></li>
34+
<li><a href="https://github.com/angular-ui/AngularJs.tmbundle">AngularJS.tmbundle</a></li>
35+
<li><a href="https://github.com/angular-ui/ui-router">Router <span class="label label-success">New!</span></a></li>
36+
</ul>
37+
</li>
38+
39+
<li class="dropdown">
40+
<a href="#" role="button" class="dropdown-toggle">
41+
Directives <b class="caret"></b>
42+
</a>
43+
<ul class="dropdown-menu">
44+
<% demoModules.forEach(function(module) { %>
45+
<li><a href="#<%= module.name %>"><%= module.displayName %></a></li>
46+
<% }); %>
47+
</ul>
48+
</li>
49+
<li><a href="#getting_started">Getting started</a></li>
5050
</ul>
51-
</div>
5251
</div>
5352
</div>
5453
</header>
55-
<div style="margin: 32px;"></div>
54+
<div class="header-placeholder"></div>
5655
<div role="main">
57-
5856
<header class="hero-unit" id="overview">
5957
<div class="container">
6058
<h1>
@@ -116,15 +114,13 @@ <h1>
116114
</div>
117115
</div>
118116
</header>
119-
120117
<div class="container">
121-
122-
<section id="getting_started">
123-
<div class="page-header">
124-
<h1>Getting started</h1>
125-
</div>
126-
<div class="row">
127-
<div class="span12">
118+
<section id="getting_started" class="row">
119+
<div class="col-12">
120+
<div class="page-header">
121+
<h1>Getting started</h1>
122+
</div>
123+
<div>
128124
<h3>Dependencies</h3>
129125
<p>
130126
This repository contains a set of <strong>native AngularJS directives</strong> based on
@@ -166,47 +162,48 @@ <h3>CSS</h3>
166162
</div>
167163
</div>
168164
</section>
169-
170-
<% demoModules.forEach(function(module) { %>
171-
<section id="<%= module.name %>">
172-
<div class="page-header">
173-
<h1><%= module.displayName %><small>
174-
(<a target="_blank" href="https://github.com/angular-ui/bootstrap/tree/master/src/<%= module.name %>">ui.bootstrap.<%= module.name %></a>)
175-
</small></h1>
176-
</div>
177-
<div class="row">
178-
<div class="span6">
179-
<%= module.docs.html %>
180-
</div>
181-
<div class="span6">
182-
<%= module.docs.md %>
183-
</div>
184-
</div>
185-
<hr>
186-
<div class="row">
187-
<div class="span12" ng-controller="PlunkerCtrl">
188-
<div class="pull-right">
189-
<button class="btn btn-info" id="plunk-btn" ng-click="edit('<%= ngversion%>', '<%= bsversion %>', '<%= pkg.version%>', '<%= module.name %>')"><i class="icon-edit icon-white"></i> Edit in plunker</button>
190-
</div>
191-
<tabset>
192-
<tab heading="Markup">
193-
<div plunker-content="markup">
194-
<pre ng-non-bindable><code data-language="html"><%- module.docs.html %></code></pre>
165+
<% demoModules.forEach(function(module) { %>
166+
<section id="<%= module.name %>" class="row">
167+
<div class="col-12">
168+
<div class="page-header">
169+
<h1><%= module.displayName %><small>
170+
(<a target="_blank" href="https://github.com/angular-ui/bootstrap/tree/master/src/<%= module.name %>">ui.bootstrap.<%= module.name %></a>)
171+
</small></h1>
172+
</div>
173+
<div class="row">
174+
<div class="col-6">
175+
<%= module.docs.html %>
195176
</div>
196-
</tab>
197-
<tab heading="JavaScript">
198-
<div plunker-content="javascript">
199-
<pre ng-non-bindable><code data-language="javascript"><%- module.docs.js %></code></pre>
177+
<div class="col-6">
178+
<%= module.docs.md %>
200179
</div>
201-
</tab>
202-
</tabset>
203-
</div>
204-
</div>
205-
</section>
206-
<script><%= module.docs.js %></script>
207-
<% }); %>
208-
</div>
209-
</div>
180+
</div>
181+
<hr>
182+
<div class="row">
183+
<div class="col-12" ng-controller="PlunkerCtrl">
184+
<div class="pull-right">
185+
<button class="btn btn-info" id="plunk-btn" ng-click="edit('<%= ngversion%>', '<%= bsversion %>', '<%= pkg.version%>', '<%= module.name %>')"><i class="icon-edit icon-white"></i> Edit in plunker</button>
186+
</div>
187+
<tabset>
188+
<tab heading="Markup">
189+
<div plunker-content="markup">
190+
<pre ng-non-bindable><code data-language="html"><%- module.docs.html %></code></pre>
191+
</div>
192+
</tab>
193+
<tab heading="JavaScript">
194+
<div plunker-content="javascript">
195+
<pre ng-non-bindable><code data-language="javascript"><%- module.docs.js %></code></pre>
196+
</div>
197+
</tab>
198+
</tabset>
199+
</div>
200+
</div>
201+
</div>
202+
</section>
203+
<script><%= module.docs.js %></script>
204+
<% }); %>
205+
</div><!-- /.container -->
206+
</div><!-- /.main -->
210207
<footer class="footer">
211208
<div class="container">
212209
<p>Designed and built by <a href="https://github.com/angular-ui?tab=members" target="_blank">Angular-UI team</a> and <a href="https://github.com/angular-ui/bootstrap/graphs/contributors" target="_blank">contributors</a>.</p>

0 commit comments

Comments
 (0)