Into which Slate directories do I need to copy the Materialize files?
I managed to create a Materialized layout by using
<!-- Compiled and minified CSS -->
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/css/materialize.min.css">
<!-- Compiled and minified JavaScript -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.98.2/js/materialize.min.js"></script>
Then I copied the content of the Materialize /sass folder to slates /global directory, added the line
<!--Import materialize.css-->
{{ 'materialize.scss' | asset_url | stylesheet_tag }}
into my theme.liquid and ran slate build, deploy and watch. Can’t see the Materialize files uploaded to my theme files. What am I doing wrong?
2
Answers
added following code to src/styles/theme.scss
This allowed
to run properly and create the theme.scss file out of all SCSS components. So the theme.scss seems to be concatenated and uploaded properly. Unfortunately, there seems to be an overall Shopify issue which is discussed on the slate github repo
I am looking at your question. Did you get it to work as expected.
I have been trying myself to add the bootstrap grid to my slate them
added bootstrap files: vendor/bootstrap/_grid.scss (for example, there are a bunch of them)
reference the bootstrap assets in src/styles/theme.scss like so:
/================ UTILS ================/
@import url(‘tools/mixins.scss’);
/================ SETTINGS ================/
@import url(‘settings/variables.scss.liquid’);
/================ COMMON ================/
@import url(‘global/normalize.scss’);
@import url(‘global/slate-reset.scss’);
@import url(‘global/helper-classes.scss’);
//@import url(‘global/grid-bootstrap.scss’);
@import url(‘global/layout.scss’);
@import url(‘global/icons.scss’);
@import url(‘global/rte.scss’);
@import url(‘global/responsive-tables.scss’);
@import url(‘global/links-buttons.scss’);
@import url(‘global/forms.scss’);
@import url(‘global/blank-states.scss’);
/================ BOOTSTRAP ================/
@import url(‘vendor/bootstrap/_grid.scss’);
/================ MODULES ================/
@import url(‘modules/site-header.scss’);
@import url(‘modules/gift-card-template.scss’);
really does not seem to work though My code editor
Which task manager is used in the slate theme. I am thinking I could tweak the tasks to have a new stylesheet generated and do sthg like that:
{{ ‘theme.scss.css’ | asset_url | stylesheet_tag }}
//bootstrap grid
{{ ‘grid.scss.css’ | asset_url | stylesheet_tag }}