-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #5 from bim-g/layout
[ENH] refactor module view with new aproch
- Loading branch information
Showing
22 changed files
with
457 additions
and
270 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<?php | ||
|
||
$view->assign("title","My Art"); | ||
$view->render("/art.php"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?php | ||
$view->assign("title","W3css Courses"); | ||
|
||
$view->setLayout("/layout"); | ||
$view->render("/home"); | ||
// $view->render("/contact.php"); |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
<?php | ||
include __DIR__."/../vendor/autoload.php"; | ||
use Wepesi\App\View; | ||
|
||
$rootDir = __DIR__."/view"; | ||
$view = new View($rootDir); | ||
|
||
// to work without layout | ||
// include_once __DIR__."/example_one.php"; | ||
|
||
// example with layout | ||
include_once __DIR__."/example_two.php"; |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,68 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
<title><?=$title??"Wepesi view title"?></title> | ||
<meta charset="UTF-8"> | ||
<meta name="viewport" content="width=device-width, initial-scale=1"> | ||
<link rel="stylesheet" href="https://www.w3schools.com/w3css/4/w3.css"> | ||
<link href="https://fonts.googleapis.com/css?family=Raleway" rel="stylesheet" type="text/css"> | ||
<style> | ||
body {font-family: "Raleway", Arial, sans-serif} | ||
.w3-row img {margin-bottom: -8px} | ||
</style> | ||
</head> | ||
<body> | ||
|
||
<!-- !PAGE CONTENT! --> | ||
<div class="w3-content" style="max-width:1500px"> | ||
|
||
<!-- Header --> | ||
<header class="w3-container w3-xlarge w3-padding-24"> | ||
<a href="#" class="w3-left w3-button w3-white">MY ART</a> | ||
<a href="#about" class="w3-right w3-button w3-white">About</a> | ||
</header> | ||
|
||
<!-- Photo Grid --> | ||
<div class="w3-row"> | ||
<div class="w3-half"> | ||
<img src="https://www.w3schools.com/w3images/streetart.jpg" style="width:100%"> | ||
<img src="https://www.w3schools.com/w3images/streetart2.jpg" style="width:100%"> | ||
<img src="https://www.w3schools.com/w3images/streetart5.jpg" style="width:100%"> | ||
</div> | ||
|
||
<div class="w3-half"> | ||
<img src="https://www.w3schools.com/w3images/streetart3.jpg" style="width:100%"> | ||
<img src="https://www.w3schools.com/w3images/streetart4.jpg" style="width:100%"> | ||
</div> | ||
</div> | ||
|
||
<!-- End Page Content --> | ||
</div> | ||
|
||
<!-- Footer / About Section --> | ||
<footer class="w3-light-grey w3-padding-64 w3-center" id="about"> | ||
<h2>About</h2> | ||
<img src="https://www.w3schools.com/w3images/boy.jpg" class="w3-image w3-padding-32" width="300" height="300"> | ||
<form style="margin:auto;width:60%" action="/action_page.php" target="_blank"> | ||
<p>Just me, myself and I, exploring the universe of unknownment. I have a heart of love and an interest of lorem ipsum and mauris neque quam blog. I want to share my world with you. Praesent tincidunt sed tellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam non fringilla. Praesent tincidunt sed tellus ut rutrum. Sed vitae justo condimentum, porta lectus vitae, ultricies congue gravida diam non fringilla.</p> | ||
<p class="w3-large w3-text-pink">Do not hesitate to contact me!</p> | ||
<div class="w3-section"> | ||
<label><b>Name</b></label> | ||
<input class="w3-input w3-border" type="text" required name="Name"> | ||
</div> | ||
<div class="w3-section"> | ||
<label><b>Email</b></label> | ||
<input class="w3-input w3-border" type="text" required name="Email"> | ||
</div> | ||
<div class="w3-section"> | ||
<label><b>Message</b></label> | ||
<input class="w3-input w3-border" required name="Message"> | ||
</div> | ||
<button type="submit" class="w3-button w3-block w3-dark-grey">Send</button> | ||
</form> | ||
<br> | ||
<p>Powered by <a href="https://www.w3schools.com/w3css/default.asp" target="_blank" class="w3-hover-text-green">w3.css</a></p> | ||
</footer> | ||
|
||
</body> | ||
</html> |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,36 @@ | ||
|
||
<!-- Contact Container --> | ||
<div class="w3-container w3-padding-64 w3-theme-l5" id="contact"> | ||
<div class="w3-row"> | ||
<div class="w3-col m5"> | ||
<div class="w3-padding-16"><span class="w3-xlarge w3-border-teal w3-bottombar">Contact Us</span></div> | ||
<h3>Address</h3> | ||
<p>Swing by for a cup of coffee, or whatever.</p> | ||
<p><i class="fa fa-map-marker w3-text-teal w3-xlarge"></i> Chicago, US</p> | ||
<p><i class="fa fa-phone w3-text-teal w3-xlarge"></i> +00 1515151515</p> | ||
<p><i class="fa fa-envelope-o w3-text-teal w3-xlarge"></i> [email protected]</p> | ||
</div> | ||
<div class="w3-col m7"> | ||
<form class="w3-container w3-card-4 w3-padding-16 w3-white" action="/action_page.php" target="_blank"> | ||
<div class="w3-section"> | ||
<label>Name</label> | ||
<input class="w3-input" type="text" name="Name" required> | ||
</div> | ||
<div class="w3-section"> | ||
<label>Email</label> | ||
<input class="w3-input" type="text" name="Email" required> | ||
</div> | ||
<div class="w3-section"> | ||
<label>Message</label> | ||
<input class="w3-input" type="text" name="Message" required> | ||
</div> | ||
<input class="w3-check" type="checkbox" checked name="Like"> | ||
<label>I Like it!</label> | ||
<button type="submit" class="w3-button w3-right w3-theme">Send</button> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
<!-- Image of location/map --> | ||
<img src="https://www.w3schools.com/w3images/map.jpg" class="w3-image w3-greyscale-min" style="width:100%;"> |
Oops, something went wrong.