twitter-bootstrap 从 wrapbootstrap 实现引导主题
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/14762660/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Implementing bootstrap theme from wrapbootstrap
提问by raycchan
I've downloaded a theme through wrapbootstrap but cannot figure out how to implement it. I assumed it was going to be just copying over the CSS and JS files but there seems to be much more to it.
我已经通过 wrapbootstrap 下载了一个主题,但不知道如何实现它。我以为它只是复制 CSS 和 JS 文件,但似乎还有更多内容。
The theme I have downloaded is https://wrapbootstrap.com/theme/awesome-admin-WB0663265
我下载的主题是https://wrapbootstrap.com/theme/awesome-admin-WB0663265
I have temporarily uploaded it onto Github here github.com/raycchan/temp(i'll remove this ASAP once I resolve it)
我暂时把它上传到 Github 上github.com/raycchan/temp(我会尽快删除它,一旦我解决了它)
There are example templates here that have the generated .html file as well as the .html.erb files, and once I plug the erb files into my rails app it throws out errors like the ones below:
这里有一些示例模板,其中包含生成的 .html 文件以及 .html.erb 文件,一旦我将 erb 文件插入我的 rails 应用程序,它就会抛出如下错误:
But it doesn't recognize these:
但它不识别这些:
<%= data.page.title || "Bootstrap Admin" %> # data undefined
<%=partial 'dashboard-navigation'%> # partial undefined
Could someone instruct me step by step how to implement this bootstrap theme? Thank you
有人可以逐步指导我如何实现这个引导程序主题吗?谢谢
回答by R Milushev
It is really interesting to give a Rails soul to the nice template . A few simple steps:
为漂亮的模板赋予 Rails 灵魂真的很有趣。几个简单的步骤:
- copy .css to
app/assets/stylesheetsand .js toapp/assets/javasripts - include the new files in the manifest files
application.cssandapplication.js - for font-awesome use this description
- 复制 .css
app/assets/stylesheets和 .js 到app/assets/javasripts - 在清单文件中包含新文件
application.css和application.js - 对于字体真棒使用此描述
Then share the result with us .
然后与我们分享结果。

