Skip to content

Commit

Permalink
Merge branch 'master' of https://github.com/copostic/SupFile
Browse files Browse the repository at this point in the history
  • Loading branch information
FoufouRS committed May 23, 2018
2 parents ff78f07 + 2a3d5aa commit 0b4fa7a
Show file tree
Hide file tree
Showing 6 changed files with 184 additions and 6 deletions.
2 changes: 1 addition & 1 deletion config/routes.conf.php
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<?php
$routes = [];
$routes['default'] = 'main';
$routes['home'] = 'main';
19 changes: 19 additions & 0 deletions controllers/main.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<?php
if ($action == 'home') {
$title = 'Yacht parts, spares and consumables, delivered anywhere in the world';
} else {
$action = 404;
}

if ($action == 404) {
header("HTTP/1.0 404 Not Found");
$smarty->display(VIEWS . 'inc/header.tpl');
$smarty->display(VIEWS . '404.tpl');
} else {
$smarty->display(VIEWS . 'inc/header.tpl');
$smarty->display(VIEWS . $action . '.tpl');
}


$smarty->display(VIEWS . 'inc/footer.tpl');

7 changes: 6 additions & 1 deletion index.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,10 @@
define('CONFIG', 'config/');
require_once(CONFIG . 'conf.php');
require_once(LIB . 'vendor/autoload.php');
require_once (LIB . 'Router.php');
$Router = new Router();
$url = $Router->getUrl();
$action = $Router->getAction();
$smarty = new Smarty();

$smarty = new Smarty();
require_once CONTROLLERS . $Router->getController() . '.php';
8 changes: 4 additions & 4 deletions libraries/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ class Router

public function __construct() {
$routes = [];
require_once '../config/routes.conf.php';
require_once CONFIG . 'routes.conf.php';
$this->routes = $routes;
$url = explode('?', $_SERVER['REQUEST_URI']);
$this->url = explode('/', $url[0]);
$this->action = empty($this->url[BASE_URL_PART + 1]) ? 'home' : $this->url[BASE_URL_PART + 1];
$this->id = empty($this->url[BASE_URL_PART + 2]) ? null : $this->url[BASE_URL_PART + 2];
$this->page = empty($this->url[BASE_URL_PART + 2]) ? null : $this->url[BASE_URL_PART + 2];
$this->res();
}

Expand Down Expand Up @@ -46,8 +46,8 @@ public function getAction() {
return $this->action;
}

public function getId() {
return $this->id;
public function getPage() {
return $this->page;
}

public function getUrl() {
Expand Down
154 changes: 154 additions & 0 deletions public/stylesheet/fonts/open-sans.less
Original file line number Diff line number Diff line change
@@ -0,0 +1,154 @@
/* Open Sans @font-face kit */

@OpenSansPath: "./open-sans";

/* BEGIN Light */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/Light/OpenSans-Light.eot');
src: url('@{OpenSansPath}/Light/OpenSans-Light.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/Light/OpenSans-Light.woff') format('woff'),
url('@{OpenSansPath}/Light/OpenSans-Light.ttf') format('truetype'),
url('@{OpenSansPath}/Light/OpenSans-Light.svg#OpenSansLight') format('svg');
font-weight: 300;
font-style: normal;
}

.open-sans-light {
font-family: 'Open Sans', sans-serif;
font-weight: 300;
}

/* END Light */

/* BEGIN Light Italic */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot');
src: url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.woff') format('woff'),
url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.ttf') format('truetype'),
url('@{OpenSansPath}/LightItalic/OpenSans-LightItalic.svg#OpenSansLightItalic') format('svg');
font-weight: 300;
font-style: italic;
}

.open-sans-light {
font-family: 'Open Sans', sans-serif;
font-style: italic;
font-weight: 300;
}

/* END Light Italic */

/* BEGIN Regular */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot');
src: url('@{OpenSansPath}/Regular/OpenSans-Regular.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/Regular/OpenSans-Regular.woff') format('woff'),
url('@{OpenSansPath}/Regular/OpenSans-Regular.ttf') format('truetype'),
url('@{OpenSansPath}/Regular/OpenSans-Regular.svg#OpenSansRegular') format('svg');
font-weight: normal;
font-style: normal;
}

/* END Regular */

/* BEGIN Italic */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot');
src: url('@{OpenSansPath}/Italic/OpenSans-Italic.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/Italic/OpenSans-Italic.woff') format('woff'),
url('@{OpenSansPath}/Italic/OpenSans-Italic.ttf') format('truetype'),
url('@{OpenSansPath}/Italic/OpenSans-Italic.svg#OpenSansItalic') format('svg');
font-weight: normal;
font-style: italic;
}

/* END Italic */

/* BEGIN Semibold */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot');
src: url('@{OpenSansPath}/Semibold/OpenSans-Semibold.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/Semibold/OpenSans-Semibold.woff') format('woff'),
url('@{OpenSansPath}/Semibold/OpenSans-Semibold.ttf') format('truetype'),
url('@{OpenSansPath}/Semibold/OpenSans-Semibold.svg#OpenSansSemibold') format('svg');
font-weight: 600;
font-style: normal;
}

/* END Semibold */

/* BEGIN Semibold Italic */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot');
src: url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.woff') format('woff'),
url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.ttf') format('truetype'),
url('@{OpenSansPath}/SemiboldItalic/OpenSans-SemiboldItalic.svg#OpenSansSemiboldItalic') format('svg');
font-weight: 600;
font-style: italic;
}

/* END Semibold Italic */

/* BEGIN Bold */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot');
src: url('@{OpenSansPath}/Bold/OpenSans-Bold.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/Bold/OpenSans-Bold.woff') format('woff'),
url('@{OpenSansPath}/Bold/OpenSans-Bold.ttf') format('truetype'),
url('@{OpenSansPath}/Bold/OpenSans-Bold.svg#OpenSansBold') format('svg');
font-weight: bold;
font-style: normal;
}

/* END Bold */

/* BEGIN Bold Italic */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot');
src: url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.woff') format('woff'),
url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.ttf') format('truetype'),
url('@{OpenSansPath}/BoldItalic/OpenSans-BoldItalic.svg#OpenSansBoldItalic') format('svg');
font-weight: bold;
font-style: italic;
}

/* END Bold Italic */

/* BEGIN Extrabold */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot');
src: url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.woff') format('woff'),
url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.ttf') format('truetype'),
url('@{OpenSansPath}/ExtraBold/OpenSans-ExtraBold.svg#OpenSansExtrabold') format('svg');
font-weight: 800;
font-style: normal;
}

/* END Extrabold */

/* BEGIN Extrabold Italic */
@font-face {
font-family: 'Open Sans';
src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot');
src: url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.eot?#iefix') format('embedded-opentype'),
url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.woff') format('woff'),
url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.ttf') format('truetype'),
url('@{OpenSansPath}/ExtraBoldItalic/OpenSans-ExtraBoldItalic.svg#OpenSansExtraboldItalic') format('svg');
font-weight: 800;
font-style: italic;
}

/* END Extrabold Italic */
Empty file added views/404.tpl
Empty file.

0 comments on commit 0b4fa7a

Please sign in to comment.