문제

I have created a Grails project. And now i want to use twitter-bootstrap. I have installed bootstrap successfully. But i want to know how to reference the following 3 links in the index.html page

<r:require modules="bootstrap" />
<r:layoutResources />
<!-- Latest compiled and minified CSS -->
<link rel="stylesheet"
    href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap.min.css">

<!-- Optional theme -->
<link rel="stylesheet"
    href="//netdna.bootstrapcdn.com/bootstrap/3.1.1/css/bootstrap-theme.min.css">

<!-- Latest compiled and minified JavaScript -->
<script
    src="//netdna.bootstrapcdn.com/bootstrap/3.1.1/js/bootstrap.min.js"></script>
도움이 되었습니까?

해결책

If you have the bootstrap plugin installed you just need to call the required module

BuidConfig.groovy

compile ":twitter-bootstrap:2.3.2"

Then in your GSP

<r:require modules='bootstrap-css, bootstrap-js, bootstrap-modal, ...'/>
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top