Rails noob here。使用rails 4实现wrapbootstrap主题的问题应用程序
我一直在摸索整合一个wrapbootstrap单页视差主题(https://wrapbootstrap.com/theme/ashley-one-page-parallax-WB0R11207)到我的rails 4应用程序的过程。
解压缩文件后,index.html页面(主要)工作,开箱即用。
的过程中,我已经通过将其集成到一个新的Rails应用程序尝试了:
- 传输的所有CSS文件,以资产/样式文件夹
- 传输的所有JS文件,以资产/ JavaScript的文件夹
- 引用中的application.js所有的JS和CSS文件和application.css
- 传输的所有图像资产/ images文件夹
- 生成新的页面控制器/视图,移动前雇主ously讨论HTML文件进入这个观点
- 分配根上面的html文件
我遇到的问题是,所有的JS和CSS似乎并没有被执行。标题中有JS和CSS包含标签。
我试过耙子资产:预编译,但那不成功。
关于我要去哪里的错误提示?
此外,index.html文件包括在所述头部一束CSS设置的,即:
<!-- Bootstrap -->
<link type="text/css" rel="stylesheet" href="bootstrap/css/bootstrap.min.css">
<!-- web font -->
<link href="http://fonts.googleapis.com/css?family=Open+Sans:300,400,600,800" rel="stylesheet" type="text/css">
<!-- plugin css -->
<link rel="stylesheet" type="text/css" href="js-plugin/animation-framework/animate.css" />
<link rel="stylesheet" type="text/css" href="js-plugin/magnific-popup/magnific-popup.css" />
<link type="text/css" rel="stylesheet" href="js-plugin/isotope/css/style.css">
<link rel="stylesheet" type="text/css" href="js-plugin/flexslider/flexslider.css" />
<link rel="stylesheet" type="text/css" href="js-plugin/pageSlide/jquery.pageslide.css" />
<!-- Owl carousel-->
<link rel="stylesheet" href="js-plugin/owl.carousel/owl-carousel/owl.carousel.css">
<link rel="stylesheet" href="js-plugin/owl.carousel/owl-carousel/owl.theme.css">
和在所述主体的底部处的束的javascrip标记,即:
<script type="text/javascript" src="js-plugin/respond/respond.min.js"></script>
<script type="text/javascript" src="js-plugin/jquery/1.8.3/jquery.min.js"></script>
<script type="text/javascript" src="js-plugin/jquery-ui/jquery-ui-1.8.23.custom.min.js"></script>
<!-- third party plugins -->
<script type="text/javascript" src="bootstrap/js/bootstrap.js"></script>
<script type="text/javascript" src="js-plugin/easing/jquery.easing.1.3.js"></script>
<script type="text/javascript" src="js-plugin/flexslider/jquery.flexslider-min.js"></script>
<script type="text/javascript" src="js-plugin/isotope/jquery.isotope.min.js"></script>
<script type="text/javascript" src="js-plugin/neko-contact-ajax-plugin/js/jquery.form.js"></script>
<script type="text/javascript" src="js-plugin/neko-contact-ajax-plugin/js/jquery.validate.min.js"></script>
<script type="text/javascript" src="js-plugin/magnific-popup/jquery.magnific-popup.min.js"></script>
<script type="text/javascript" src="js-plugin/parallax/js/jquery.scrollTo-1.4.3.1-min.js"></script>
<script type="text/javascript" src="js-plugin/parallax/js/jquery.localscroll-1.2.7-min.js"></script>
我正确理解,在资产管道中,视图中不需要这些标注?不应该将所有的CSS和JS预编译在application.css和application.js中吗?
你把字体放在哪里才能让它们正常工作? –
我将各个字体切片放在assets文件夹中,然后用custom-icons.css(位于app-> assets-> stylesheets中)调用它们。在CSS文件中,我调用了自定义字体: @ font-face font-family:'custom-icons'; src:url('custom-icons.eot?94416284'); src:url('custom-icons.eot?94416284#iefix')format('embedded-opentype'), url('custom-icons.woff?(''custom-icons.svg'94416284#custom-icons')格式(''custom-icons'')格式('woff'), url('custom-icons.ttf?94416284')格式('truetype'), ' SVG'); font-weight:normal; font-style:normal; – dmt2989
是否必须将您创建的文件夹添加到资产搜索路径? –