【问题标题】:How to configure twitter bootstrap in grails 3.0.4?如何在 grails 3.0.4 中配置 twitter 引导程序?
【发布时间】:2015-12-15 23:22:57
【问题描述】:

我需要将 grails 2.4.4 应用程序迁移到 Grails 3.0.9。谁能解释一下如何配置 twitter bootstrap 插件以及如何使用它。

【问题讨论】:

  • 非常感谢任何有效的 build.gradle 依赖项和 application.yml 条目。

标签: twitter-bootstrap grails-3.0


【解决方案1】:
After placing the following dependencies in build.gradle: it worked.

build.gradle:

    compile 'org.webjars:bootstrap:3.3.5'
    compile "org.grails:grails-web-boot"
    compile "org.webjars:typeaheadjs:0.11.1"
    compile "org.webjars:bootstrap-tagsinput:0.5"
    compile "org.webjars.bower:bootstrap-table:1.8.1"

application.js:
//= require jquery-2.1.3.js
//= require_tree .
//= require_self
//=require js/jquery-ui-1.10.4.custom.min.js
//=require bootstrap
//=require typeahead
///= require /webjars/bootstrap/3.3.5/js/bootstrap.min
//= require /webjars/bootstrap-tagsinput/0.5/bootstrap-tagsinput
//= require /webjars/typeaheadjs/0.11.1/typeahead.bundle.js

application.css:

*= require main
*= require mobile
*= require_self
*= require webjars/bootstrap/3.3.5/css/bootstrap-theme
*= require webjars/bootstrap/3.3.5/css/bootstrap
*= require webjars/bootstrap-tagsinput/0.5/bootstrap-tagsinput

in the gsp:

    <g:layoutTitle default="main"/></title>
    <meta http-equiv="X-UA-Compatible" content="IE=Edge"/>
    <asset:stylesheet src="application.css"/>
    <asset:javascript src="application.js"/>
    <asset:javascript src="boo.js"/>
    <asset:javascript src="jquery-ui.js"/>
    <g:layoutHead/>

【讨论】:

  • 另外,请务必注释掉 main.css。
猜你喜欢
  • 2015-11-24
  • 1970-01-01
  • 1970-01-01
  • 2015-07-11
  • 2014-04-09
  • 1970-01-01
  • 1970-01-01
  • 2013-01-25
  • 1970-01-01
相关资源
最近更新 更多