Permalink
Browse files

upgrade to bootstrap 2 (http://grahamrhay.wordpress.com/2012/02/09/up…

…grading-from-bootstrap-1-4-0-to-2-0/)

TODO modify Forms to support <form class="form-horizontal">
	  <fieldset class="control-group">
  • Loading branch information...
1 parent c9e7ce1 commit d021f589d465f0438c3b02907916346b14d185b9 @heralight committed Apr 12, 2012
View
@@ -8,7 +8,7 @@ you must run, in the project root directory:
git submodule init
git add modules/bootstrap
cd modules/bootstrap
- git co v1.4.0
+ git co v2.0.2
This will pull in the necessary files. Note this template is built against twitter-bootstrap v1.4.0,
so you'll need to checkout that tag.
@@ -1,8 +1,8 @@
# bootstrap
-../../../modules/bootstrap/js/bootstrap-alerts.js
+../../../modules/bootstrap/js/bootstrap-alert.js
../../../modules/bootstrap/js/bootstrap-dropdown.js
../../../modules/bootstrap/js/bootstrap-modal.js
../../../modules/bootstrap/js/bootstrap-scrollspy.js
-../../../modules/bootstrap/js/bootstrap-tabs.js
-../../../modules/bootstrap/js/bootstrap-twipsy.js
+../../../modules/bootstrap/js/bootstrap-tab.js
+../../../modules/bootstrap/js/bootstrap-tooltip.js
../../../modules/bootstrap/js/bootstrap-popover.js
@@ -1,23 +1,23 @@
/*
* Import the files you want to use. This is just a copy of
- * ../../../modules/bootstrap/lib/bootstrap.less
+ * ../../../modules/bootstrap/less/bootstrap.less
*/
// CSS Reset
-@import "../../../modules/bootstrap/lib/reset.less";
+@import "../../../modules/bootstrap/less/reset.less";
// Core variables and mixins
-@import "../../../modules/bootstrap/lib/variables.less"; // Modify this for custom colors, font-sizes, etc
-@import "../../../modules/bootstrap/lib/mixins.less";
+@import "../../../modules/bootstrap/less/variables.less"; // Modify this for custom colors, font-sizes, etc
+@import "../../../modules/bootstrap/less/mixins.less";
// Grid system and page structure
-@import "../../../modules/bootstrap/lib/scaffolding.less";
+@import "../../../modules/bootstrap/less/scaffolding.less";
// Styled patterns and elements
-@import "../../../modules/bootstrap/lib/type.less";
-@import "../../../modules/bootstrap/lib/forms.less";
-@import "../../../modules/bootstrap/lib/tables.less";
-@import "../../../modules/bootstrap/lib/patterns.less";
+@import "../../../modules/bootstrap/less/type.less";
+@import "../../../modules/bootstrap/less/forms.less";
+@import "../../../modules/bootstrap/less/tables.less";
+@import "../../../modules/bootstrap/less/patterns.less";
// Custom styles
@import "custom.less";
@@ -31,14 +31,14 @@ object BootstrapAlerts extends Factory with Loggable {
notices(messages).toList match {
case msgs if (msgs.length == 0) => Nil
case msgs if (msgs.length == 1) =>
- <div id={noticeType.id} class={"alert-message %s".format(lowerCaseTitle(noticeType))} data-alert="">
- <a class="close" href="#">&times;</a>
+ <div id={noticeType.id} class={"alert alert-%s".format(lowerCaseTitle(noticeType))} data-alert="">
+ <a class="close" data-dismiss="alert">&times;</a>
<p>{noticeTitle(noticeType).map(t => <strong>{t}</strong>).openOr(Text(""))} {msgs(0)}</p>
</div>
case msgs =>
- <div id={noticeType.id} class={"alert-message %s".format(lowerCaseTitle(noticeType))} data-alert="">
+ <div id={noticeType.id} class={"alert alert-%s".format(lowerCaseTitle(noticeType))} data-alert="">
{noticeTitle(noticeType).map(t => <strong>{t}</strong>).openOr(Text(""))}
- <a class="close" href="#">&times;</a>
+ <a class="close" data-dismiss="alert">&times;</a>
{ msgs.flatMap(e => { <p>{e}</p> }) }
</div>
}
@@ -14,7 +14,7 @@ import util.Helpers._
trait BaseScreen extends LiftScreen {
override def allTemplatePath = "templates-hidden" :: "bootstrap-screen" :: Nil
override val cancelButton = super.cancelButton % ("class" -> "btn") % ("tabindex" -> "1")
- override val finishButton = super.finishButton % ("class" -> "btn primary") % ("tabindex" -> "1")
+ override val finishButton = super.finishButton % ("class" -> "btn btn-primary") % ("tabindex" -> "1")
def displayOnly(fieldName: => String, html: NodeSeq) =
new Field {
@@ -83,7 +83,7 @@ object ProfileLocUser extends UserSnippet {
def profile(xhtml: NodeSeq): NodeSeq = serve { user =>
val editLink: NodeSeq =
if (User.currentUser.filter(_.id.is == user.id.is).isDefined)
- <a href={Site.editProfile.url} class="btn info">Edit Your Profile</a>
+ <a href={Site.editProfile.url} class="btn btn-info">Edit Your Profile</a>
else
NodeSeq.Empty
@@ -8,7 +8,7 @@ <h1>$name$</h1>
</span>
</p>
<p>Vestibulum id ligula porta felis euismod semper. Integer posuere erat a ante venenatis dapibus posuere velit aliquet. Duis mollis, est non commodo luctus, nisi erat porttitor ligula, eget lacinia odio sem nec elit.</p>
- <p><span lift="Menu.item?name=About;donthide=true;linktoself=true;a:class=btn primary large">Learn More &raquo;</span></p>
+ <p><span lift="Menu.item?name=About;donthide=true;linktoself=true;a:class=btn btn-primary btn-large">Learn More &raquo;</span></p>
</div>
<!-- Example row of columns -->
<div class="row">
@@ -46,7 +46,7 @@
</div>
</fieldset>
<div class="actions">
- <input type="submit" id="id_submit" class="btn primary" value="Submit"></input>
+ <input type="submit" id="id_submit" class="btn btn-primary" value="Submit"></input>
<input type="submit" id="id_cancel" class="btn" value="Cancel"></input>
</div>
</form>
@@ -27,14 +27,16 @@
-->
</head>
<body>
- <div class="topbar">
- <div class="fill">
+ <div id="navbar" class="navbar navbar-fixed-top">
+ <div class="navbar-inner">
<div class="container">
<a class="brand" href="/">$name$</a>
- <ul class="nav">
- <span lift="GroupMenu?group=topbar;current_class=active"></span>
- </ul>
- <span lift="UserTopbar"></span>
+ <div class="nav-collapse">
+ <ul class="nav">
+ <span lift="GroupMenu?group=topbar;current_class=active"></span>
+ </ul>
+ <span lift="UserTopbar"></span>
+ </div><!--/.nav-collapse -->
</div>
</div>
</div>

0 comments on commit d021f58

Please sign in to comment.