[英]How do I import a bootstrap theme into Rails 6?
I've gotten bootstrap to work, but where exactly do I add vendor files from the theme into my rails 6 application?我已经让 bootstrap 开始工作了,但是我究竟应该在哪里将主题中的供应商文件添加到我的 rails 6 应用程序中呢? In the themes vendor folder there are libraries like AOS and OwlCarousel with a js file and css file... i just have no clue where to put them, and how to get them to work.
在主题供应商文件夹中,有像 AOS 和 OwlCarousel 这样的库,带有一个 js 文件和 css 文件......我只是不知道把它们放在哪里,以及如何让它们工作。 Thank you in advance!
先感谢您!
There are probably many ways to do this but I think this is the easiest.可能有很多方法可以做到这一点,但我认为这是最简单的。
css
file to the app/assets/stylesheets
folder.css
文件添加到app/assets/stylesheets
文件夹。 Add the css
file to the application.css
file by importing it:通过导入将
css
文件添加到application.css
8CBA22E28EB17B5F5C6AE2A266AZ 文件:
// application.css
@import "theme";
Update:更新:
For the javascript:对于 javascript:
You can add to the application.js
您可以添加到
application.js
//= require your.js
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.