Skip to content

Commit d29a846

Browse files
committed
Merge branch 'add-bootstrap'
2 parents 5a90408 + f62e747 commit d29a846

20 files changed

+5858
-69
lines changed

config.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@
2323
# and then run:
2424
# sass-convert -R --from scss --to sass sass scss && rm -rf sass && mv scss sass
2525
require 'sassy-buttons'
26+
require 'compass-bootstrap'

index.html

Lines changed: 117 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,136 @@ <h1><a href="#home">Course Tracker</a></h1>
1515
<button>Sign in</button>
1616
</div>
1717
</header>
18-
<section>
18+
<section id="guide">
1919
<ol>
2020
<li>
2121
<img />
22-
<p>A brief instruction for the first step that does not exceed one line?</p>
22+
<p>Choose your major</p>
2323
</li>
2424
<li>
2525
<img />
26-
<p>Another instruction for step two that should be on the same line as the other</p>
26+
<p>Check completed courses</p>
2727
</li>
2828
<li>
2929
<img />
30-
<p>Yet another instruction for the final step that might as well follow the crowd.</p>
30+
<p>Save your progress</p>
3131
</li>
3232
</ol>
33-
<button>Get Started</button>
33+
<a href="#step1">Let's Get Started</a>
3434
</section>
35-
<form>
36-
<input type="text" placeholder="What's your major?" />
35+
<form id="step1">
36+
<input type="text" placeholder="Computer Science, BS" />
37+
<button>Step 1. Choose your major</button>
3738
</form>
39+
<section id="curriculum">
40+
<form>
41+
<h2>Step 2. Check the courses you already completed</h2>
42+
<div>
43+
<h3>Required Computer Science Courses</h3>
44+
<ul>
45+
<li>
46+
<label>
47+
<input type="checkbox" value="cs1122" />
48+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
49+
</label>
50+
</li>
51+
<li>
52+
<label>
53+
<input type="checkbox" value="cs1122" />
54+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
55+
</label>
56+
</li>
57+
</ul>
58+
<h3>Required Computer Science Courses</h3>
59+
<ul>
60+
<li>
61+
<label>
62+
<input type="checkbox" value="cs1122" />
63+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
64+
</label>
65+
</li>
66+
<li>
67+
<label>
68+
<input type="checkbox" value="cs1122" />
69+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
70+
</label>
71+
</li>
72+
<li>
73+
<label>
74+
<input type="checkbox" value="cs1122" />
75+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
76+
</label>
77+
</li>
78+
<li>
79+
<label>
80+
<input type="checkbox" value="cs1122" />
81+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
82+
</label>
83+
</li>
84+
</ul>
85+
</div>
86+
<div>
87+
<h3>Required Computer Science Courses</h3>
88+
<ul>
89+
<li>
90+
<label>
91+
<input type="checkbox" value="cs1122" />
92+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
93+
</label>
94+
</li>
95+
<li>
96+
<label>
97+
<input type="checkbox" value="cs1122" />
98+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
99+
</label>
100+
</li>
101+
<li>
102+
<label>
103+
<input type="checkbox" value="cs1122" />
104+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
105+
</label>
106+
</li>
107+
<li>
108+
<label>
109+
<input type="checkbox" value="cs1122" />
110+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
111+
</label>
112+
</li>
113+
</ul>
114+
<h3>Required Computer Science Courses</h3>
115+
<ul>
116+
<li>
117+
<label>
118+
<input type="checkbox" value="cs1122" />
119+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
120+
</label>
121+
</li>
122+
<li>
123+
<label>
124+
<input type="checkbox" value="cs1122" />
125+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
126+
</label>
127+
</li>
128+
<li>
129+
<label>
130+
<input type="checkbox" value="cs1122" />
131+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
132+
</label>
133+
</li>
134+
<li>
135+
<label>
136+
<input type="checkbox" value="cs1122" />
137+
<strong>CS 1122</strong>Computer Science and Engineering <span>2 credits</span>
138+
</label>
139+
</li>
140+
</ul>
141+
</div>
142+
<input type="submit" value="Step 3. Save Progress" />
143+
</form>
144+
</section>
145+
<footer>
146+
<p>Copyright &copy;2013 CourseTracker. All rights reserved.</p>
147+
</footer>
38148
<!-- /JavaScript include tags -->
39149
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/1.9.1/jquery.min.js" type="text/javascript"></script>
40150
</body>

javascripts/bootstrap-alerts.js

Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
/* ==========================================================
2+
* bootstrap-alerts.js v1.3.0
3+
* http://twitter.github.com/bootstrap/javascript.html#alerts
4+
* ==========================================================
5+
* Copyright 2011 Twitter, Inc.
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* ========================================================== */
19+
20+
21+
(function( $ ){
22+
23+
/* CSS TRANSITION SUPPORT (https://gist.github.com/373874)
24+
* ======================================================= */
25+
26+
var transitionEnd
27+
28+
$(document).ready(function () {
29+
30+
$.support.transition = (function () {
31+
var thisBody = document.body || document.documentElement
32+
, thisStyle = thisBody.style
33+
, support = thisStyle.transition !== undefined || thisStyle.WebkitTransition !== undefined || thisStyle.MozTransition !== undefined || thisStyle.MsTransition !== undefined || thisStyle.OTransition !== undefined
34+
return support
35+
})()
36+
37+
// set CSS transition event type
38+
if ( $.support.transition ) {
39+
transitionEnd = "TransitionEnd"
40+
if ( $.browser.webkit ) {
41+
transitionEnd = "webkitTransitionEnd"
42+
} else if ( $.browser.mozilla ) {
43+
transitionEnd = "transitionend"
44+
} else if ( $.browser.opera ) {
45+
transitionEnd = "oTransitionEnd"
46+
}
47+
}
48+
49+
})
50+
51+
/* ALERT CLASS DEFINITION
52+
* ====================== */
53+
54+
var Alert = function ( content, selector ) {
55+
this.$element = $(content)
56+
.delegate(selector || '.close', 'click', this.close)
57+
}
58+
59+
Alert.prototype = {
60+
61+
close: function (e) {
62+
var $element = $(this).parent('.alert-message')
63+
64+
e && e.preventDefault()
65+
$element.removeClass('in')
66+
67+
function removeElement () {
68+
$element.remove()
69+
}
70+
71+
$.support.transition && $element.hasClass('fade') ?
72+
$element.bind(transitionEnd, removeElement) :
73+
removeElement()
74+
}
75+
76+
}
77+
78+
79+
/* ALERT PLUGIN DEFINITION
80+
* ======================= */
81+
82+
$.fn.alert = function ( options ) {
83+
84+
if ( options === true ) {
85+
return this.data('alert')
86+
}
87+
88+
return this.each(function () {
89+
var $this = $(this)
90+
91+
if ( typeof options == 'string' ) {
92+
return $this.data('alert')[options]()
93+
}
94+
95+
$(this).data('alert', new Alert( this ))
96+
97+
})
98+
}
99+
100+
$(document).ready(function () {
101+
new Alert($('body'), '.alert-message[data-alert] .close')
102+
})
103+
104+
})( window.jQuery || window.ender )

javascripts/bootstrap-dropdown.js

Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
/* ============================================================
2+
* bootstrap-dropdown.js v1.3.0
3+
* http://twitter.github.com/bootstrap/javascript.html#dropdown
4+
* ============================================================
5+
* Copyright 2011 Twitter, Inc.
6+
*
7+
* Licensed under the Apache License, Version 2.0 (the "License");
8+
* you may not use this file except in compliance with the License.
9+
* You may obtain a copy of the License at
10+
*
11+
* http://www.apache.org/licenses/LICENSE-2.0
12+
*
13+
* Unless required by applicable law or agreed to in writing, software
14+
* distributed under the License is distributed on an "AS IS" BASIS,
15+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16+
* See the License for the specific language governing permissions and
17+
* limitations under the License.
18+
* ============================================================ */
19+
20+
21+
(function( $ ){
22+
23+
var d = 'a.menu, .dropdown-toggle'
24+
25+
function clearMenus() {
26+
$(d).parent('li').removeClass('open')
27+
}
28+
29+
$(function () {
30+
$('html').bind("click", clearMenus)
31+
$('body').dropdown( '[data-dropdown] a.menu, [data-dropdown] .dropdown-toggle' )
32+
})
33+
34+
/* DROPDOWN PLUGIN DEFINITION
35+
* ========================== */
36+
37+
$.fn.dropdown = function ( selector ) {
38+
return this.each(function () {
39+
$(this).delegate(selector || d, 'click', function (e) {
40+
var li = $(this).parent('li')
41+
, isActive = li.hasClass('open')
42+
43+
clearMenus()
44+
!isActive && li.toggleClass('open')
45+
return false
46+
})
47+
})
48+
}
49+
50+
})( window.jQuery || window.ender )

0 commit comments

Comments
 (0)