This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// let's suppose here you have a general configuration that exports the path to sources like this | |
// get the node modules path | |
const nodemodules = path.join(cwd, 'node_modules'); | |
const includePaths = [nodemodules, ] | |
module.exports = { | |
module: { | |
rules: [ | |
{ | |
test: /\.s[ac]ss$/i, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This headline should be dinamic, so you can choose the hN, as appropriate --> | |
<h2 class="title__hl"> | |
<span class="title__title">Some title here</span> | |
</hl> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- This is the markup output --> | |
<picture class="picture__base"> | |
<source srcset="image-cropped?witdh=480" media="(min-width: 480px)"> | |
<source srcset="image-cropped?witdh=768" media="(min-width: 768px)"> | |
<source srcset="image-cropped?witdh=1024" media="(min-width: 1024px)"> | |
<img class="picture__img" src="cropped?witdh=480.png" alt="image-alt"> | |
</picture> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--/* Firsy of all, you need to import the clientlibs template */--> | |
<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html"> | |
<!--/* You can then use the call API, to call the right clientlib category, for the right use case. In the example below | |
you're calling the js files only, for the 'my.category' category */--> | |
<sly data-sly-call="${clientLib.js @ categories='my.category'}" /> | |
<!--/* Supposing you have special style rules for your authoring mode, you can test for wcmmode and include the right styles too | |
while avoid requesting them in publish, for performance sake */--> | |
<sly data-sly-call="${clientLib.css @ categories='my.category.author'}" |