This is an HTML project, based in PHP for including the files for quick publish the HTML files
- Run
yarnto install dependency - Run
yarn watchto watch SCSS files changed - Run
yarn compressedto compress the CSS file - Run
yarn buildto build HTML files in./build/export-html
assetscontain SCSS, CSS, Images, JS filesincludescontain included PHP functions filetemplates-partscontain part of PHP files you can call the PHP files in this folder bytemplate_partsfunction with an array variable params.build.shto generate HTML files in./buildfolderpackage.json
Just clone and do whatever you want with PHP and SCSS files.
For example, I have a template named templates/list-post.php so in index.php file we can call the template and passing data look like this.
template_part('list-post', [
'data' => [
[
'title' => 'post 1',
'description' => 'Description 1'
],
[
'title' => 'post 2',
'description' => 'Description 2'
],
[
'title' => 'post 3',
'description' => 'Description 3'
]
]
]);In template file templates-parts/list-post.php can use
if (isset($data)) {
foreach ($data as $datum) {
echo $datum['title'];
echo $datum['description'];
}
}Change the styles please use *.scss in folder ./assets/scss
Email: kiemhd@outlook.com
Team: xdevlabs.com