Laravel 5.4 adding zurb foundation 6.3.0

此生再无相见时 提交于 2019-12-04 21:01:38

i solve that ,look at :

https://laracasts.com/discuss/channels/tips/using-foundation-630-with-laravel-54

in resources/assets/sass/app.scss

add this after clear all what you find:

// Settings
@import "settings";

// Foundation
@import "node_modules/foundation-sites/scss/foundation";

// Include Everything (True) for the Flex Grid :);
@include foundation-everything(true);

in resources/assets/js/bootstrap.js, look for require('bootsrap-sass'); and remove it.

go to this path (with File Explorer) node_modules\foundation-sites\scss\settings and copy the file _settings.scss

to the new path resources\assets\sass , and you can remove the _variables.scss file.

Open the file _settings.scss in code editor , and change the line 44:

@import 'util/util';

to

@import "../../../node_modules/foundation-sites/scss/util/util";

in webpack.mix.js

open your file webpack.mix.js in the root of your project. and comment or remove the code:

change this:

mix.js('resources/assets/js/app.js', 'public/js')
   .sass('resources/assets/sass/app.scss', 'public/css');

to this:

mix.sass('resources/assets/sass/app.scss', 'public/css');
mix.combine([
    'node_modules/jquery/dist/jquery.min.js',
    'node_modules/foundation-sites/dist/js/foundation.min.js'
], 'public/js/app.js');

DO NOT FORGOT TO ADD the Initializing code to run JavaScript

IN YOUR FOOTER:

<script> $(document).foundation();</script>
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!