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

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-21 16:18:57  来源:igfitidea点击:

Implementing bootstrap theme from wrapbootstrap

ruby-on-railsruby-on-rails-3twitter-bootstrapthemes

提问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 to app/assets/javasripts
  • include the new files in the manifest files application.cssand application.js
  • for font-awesome use this description
  • 复制 .cssapp/assets/stylesheets和 .js 到app/assets/javasripts
  • 在清单文件中包含新文件application.cssapplication.js
  • 对于字体真棒使用此描述

Then share the result with us .

然后与我们分享结果。