diff --git a/_templates/calltoaction.php b/_templates/calltoaction.php new file mode 100644 index 0000000000000000000000000000000000000000..ba6056abce1263792856881a854d71a525d26e64 --- /dev/null +++ b/_templates/calltoaction.php @@ -0,0 +1,12 @@ +<section class="py-5 text-center container"> + <div class="row py-lg-5"> + <div class="col-lg-6 col-md-8 mx-auto"> + <h1 class="fw-light">Album example</h1> + <p class="lead text-body-secondary">Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don’t simply skip over it entirely.</p> + <p> + <a href="#" class="btn btn-primary my-2">Main call to action</a> + <a href="#" class="btn btn-secondary my-2">Secondary action</a> + </p> + </div> + </div> + </section> \ No newline at end of file diff --git a/index.php b/index.php index a422c04dc4cafd06ade12555acdcfc92d85f23db..ac318152a84e6385ae3db95766b6b4766e588bc7 100644 --- a/index.php +++ b/index.php @@ -182,18 +182,8 @@ include 'libs/load.php'; <main> - <section class="py-5 text-center container"> - <div class="row py-lg-5"> - <div class="col-lg-6 col-md-8 mx-auto"> - <h1 class="fw-light">Album example</h1> - <p class="lead text-body-secondary">Something short and leading about the collection below—its contents, the creator, etc. Make it short and sweet, but not too short so folks don’t simply skip over it entirely.</p> - <p> - <a href="#" class="btn btn-primary my-2">Main call to action</a> - <a href="#" class="btn btn-secondary my-2">Secondary action</a> - </p> - </div> - </div> - </section> +<!-- To load Welcome card (calltoaction.php) from template folder --> +<?load_template('calltoaction');?> <div class="album py-5 bg-body-tertiary"> <div class="container"> diff --git a/libs/load.php b/libs/load.php index db63d70c4bfd30bd585ac137f2074dd6b74ee9cb..a77ad0dea83a9e430c6b61400526a5f8ab277be2 100644 --- a/libs/load.php +++ b/libs/load.php @@ -1,6 +1,6 @@ <?php function load_template($name){ - print("including ". __DIR__."../_templates/$name.php"); + include __DIR__. "/../_templates/$name.php"; } ?> \ No newline at end of file