Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
…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
heralight committed Apr 12, 2012
1 parent c9e7ce1 commit d021f58
Show file tree
Hide file tree
Showing 9 changed files with 29 additions and 27 deletions.
2 changes: 1 addition & 1 deletion src/main/g8/README.md
Expand Up @@ -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.
Expand Down
6 changes: 3 additions & 3 deletions src/main/g8/src/main/javascript/script.jsm
@@ -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
18 changes: 9 additions & 9 deletions src/main/g8/src/main/less/styles.less
@@ -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";
8 changes: 4 additions & 4 deletions src/main/g8/src/main/scala/$package$/snippet/Alerts.scala
Expand Up @@ -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>
}
Expand Down
Expand Up @@ -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 {
Expand Down
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion src/main/g8/src/main/webapp/index.html
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion src/main/g8/src/main/webapp/login.html
Expand Up @@ -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>
Expand Down
14 changes: 8 additions & 6 deletions src/main/g8/src/main/webapp/templates-hidden/base-wrap.html
Expand Up @@ -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>
Expand Down

0 comments on commit d021f58

Please sign in to comment.