Skip to content

Commit

Permalink
at last! the firsts views, also some fixes in routing system
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrés Reyes committed May 26, 2019
1 parent d52ca65 commit a8b907d
Show file tree
Hide file tree
Showing 10 changed files with 260 additions and 22 deletions.
59 changes: 56 additions & 3 deletions public/assets/css/parabox-style.css
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,10 @@ html {
color : var(--pb-title-color);
}

.pb-white-text {
color : #ffffff;
}

.parabox-footer-background {
background : var(--pb-main-footer-color );
}
Expand Down Expand Up @@ -88,7 +92,7 @@ html {
}

.input-login-border {
border : 1px solid var(--pb-title-color);
border : 1px solid var(--pb-title-color)!important;
}

/* GRIDS -------------------------------------------------------------------------------------------------------------*/
Expand Down Expand Up @@ -119,7 +123,7 @@ html {

.pb-call-to-action {
font-size : 6rem;
word-wrap: break-word;
word-wrap : break-word;
}

#pb-login {
Expand All @@ -134,4 +138,53 @@ html {

#pb-hdr-wrapper span {
margin-right : 1rem;
}
}

.pb-h2 {
font-size : 2.8rem!important;
}

.pb_box {
background : var(--pb-main-footer-color);
}

.pb-text {
word-wrap : break-word;
font-size : 1.75rem;
}

p{
white-space:normal;
text-align : justify;
}

.top-1em {
margin-top : 1em!important;
}

.top-11em {
margin-top : 11em!important;
}

.padding0{
padding : 0px;
}

::placeholder { /* Chrome, Firefox, Opera, Safari 10.1+ */
color: var(--pb-title-color);
opacity: 1; /* Firefox */
}

:-ms-input-placeholder { /* Internet Explorer 10-11 */
color: var(--pb-title-color);
}

::-ms-input-placeholder { /* Microsoft Edge */
color: var(--pb-title-color);
}

.shadow {
-webkit-box-shadow: 3px 3px 12px 1px rgba(0,0,0,0.34);
-moz-box-shadow: 3px 3px 12px 1px rgba(0,0,0,0.34);
box-shadow: 3px 3px 12px 1px rgba(0,0,0,0.34);
}
2 changes: 1 addition & 1 deletion public/config/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
}


$config["base-url"] = "http://localhost:8080/parabox/public/";
$config["base-url"] = "http://localhost:8080/public/";
$config["driver"] = "pgsql";
$config["host"] = "localhost";
$config["db-usr"] = "jacobopus";
Expand Down
6 changes: 4 additions & 2 deletions public/config/rutas.php
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,7 @@
*/

$router->add('/', 'app\controllers\IndexController#index');
$router->add('/parabox/', 'app\controllers\IndexController#index');
$router->add('/parabox/index.php', 'app\controllers\IndexController#index');
$router->add('/index.php', 'app\controllers\IndexController#index');

$router->add('/controlpanel', 'app\controllers\ControlPanelController#index');
$router->add('/activity', 'app\controllers\ActivityController#index');
36 changes: 36 additions & 0 deletions public/controllers/ActivityController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php declare(strict_types=1);

namespace app\controllers;


use Exception;
use parabox\controllers\BaseController;
use parabox\services\connection\ConnectionPg as ConnectionPgAlias;
use parabox\services\dependencies\DependencyContainer;

class ActivityController extends BaseController
{
const VERSION = "0.1.0";


/**
*
* @throws Exception
*/
public function index()
{

$this->view->addFragment("first_fragment.html");
$this->view->addFragment("meta.html");
$this->view->addFragment("shared_css.html");
$this->view->addFragment("closing_head.html");
$this->view->addFragment("activity/activity.html");
$this->view->addFragment("shared_js.html");
$this->view->addFragment("ending_tags.html");

$strView = $this->view->render();
$strView = $this->replaceCustomTags($strView);

$this->serve($strView);
}
}
36 changes: 36 additions & 0 deletions public/controllers/ControlPanelController.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
<?php declare(strict_types=1);

namespace app\controllers;


use Exception;
use parabox\controllers\BaseController;
use parabox\services\connection\ConnectionPg as ConnectionPgAlias;
use parabox\services\dependencies\DependencyContainer;

class ControlPanelController extends BaseController
{
const VERSION = "0.1.0";


/**
*
* @throws Exception
*/
public function index()
{

$this->view->addFragment("first_fragment.html");
$this->view->addFragment("meta.html");
$this->view->addFragment("shared_css.html");
$this->view->addFragment("closing_head.html");
$this->view->addFragment("controlpanel/controlpanel.html");
$this->view->addFragment("shared_js.html");
$this->view->addFragment("ending_tags.html");

$strView = $this->view->render();
$strView = $this->replaceCustomTags($strView);

$this->serve($strView);
}
}
45 changes: 45 additions & 0 deletions public/views/activity/activity.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
<body>

<div class="row">
<div class="col-sm-12 col-md-3 shadow">
<header class="row">
<div class="col-sm-12">
<h1 class="org-font org-title-size parabox-title-color-text pb-bajorrelieve">Parabox</h1>
</div>
</header>

<div class="row">
<div class="col-sm-12">
<h1 class="org-font parabox-title-color-text pb-bajorrelieve">Sky Rocketing your Dreams!</h1>
</div>
</div>

</div>

<div class="col-sm-12 col-md-9">

<div class="row">
<div class="col-sm-12 ">
<div style="height : 100vh; background:#dddddd;">
<div class="row">
<div class="col-sm-12">
<h2 class = "pb-h2 parabox-title-color-text org-font top-1em">Vista de Actividad</h2>
</div>
</div>
<div class="row top-1em">
<div class="col-sm-2"></div>
<div class="col-sm-8">
<h4>Actividad X</h4>
<div style="border:6px solid #f5f5f5; background:#ffffff; height: 48vh;">
</div>
</div>
<div class="col-sm-2"></div>
</div>
</div>
</div>
</div>


</div>

</div>
50 changes: 50 additions & 0 deletions public/views/controlpanel/controlpanel.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
<body>

<div class="row">
<div class="col-sm-12 col-md-3 shadow">
<header class="row">
<div class="col-sm-12">
<h1 class="org-font org-title-size parabox-title-color-text pb-bajorrelieve">Parabox</h1>
</div>
</header>

<div class="row">
<div class="col-sm-12">
<h1 class="org-font parabox-title-color-text pb-bajorrelieve">Sky Rocketing your Dreams!</h1>
</div>
</div>

</div>

<div class="col-sm-12 col-md-9">

<div class="row">
<div class="col-sm-12 ">
<div style="height : 100vh; background:#dddddd;">
<div class="row">
<div class="col-sm-12">
<h2 class = "pb-h2 parabox-title-color-text org-font top-1em">Panel de Control</h2>
</div>
</div>
<div class="row top-1em">
<div class="col-sm-4">
<h4>Progresión</h4>
<img src="https://placeimg.com/256/256/animals" />
</div>
<div class="col-sm-4">
<h4>Último amigo</h4>
<img src="https://placeimg.com/256/256/tech" />
</div>
<div class="col-sm-4">
<h4>Última actividad</h4>
<img src="https://placeimg.com/256/256/people" />
</div>
</div>
</div>
</div>
</div>


</div>

</div>
Empty file.
47 changes: 31 additions & 16 deletions public/views/welcome/welcome_body.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,46 @@
<div class="col-sm-12 col-md-3">
<h1 class="org-font org-title-size parabox-title-color-text pb-bajorrelieve">Parabox</h1>
</div>
<!--
<input id = "pb-login-user"
type = "text"
class = "input-login input-login-border radius6 org-font col-sm-12 col-md-2 pb-login-height"
placeholder="" />
<input id = "pb-login-pass"
type = "password"
class = "input-login input-login-border radius6 org-font col-sm-12 col-md-2 pb-login-height"
placeholder="" />
-->

<div class="col-sm-12 col-md-3">
<input type="text" id="pb-user" class="input-login input-login-border parabox-title-color-text" placeholder="username" />
<input type="password" id="pb-pass" class="input-login input-login-border parabox-title-color-text" placeholder="password" />
<button type="button" id="pb-login" class="input-login input-login-border parabox-title-color-text padding0"><span class="parabox-title-color-text">LOGIN</span></button>
</div>
</form>
</div>
<div class = "separator"></div>

<div class = "row">
<div class = "col-sm-6 col-md-12">
<h2 class = "pb-call-to-action parabox-title-color-text org-font">
¿Por que estudiar no puede ser entretenido?
</h2>
<div class = "col-sm-12 col-md-6">
<h2 class = "pb-h2 parabox-title-color-text org-font top-1em">¿Por que estudiar no puede ser entretenido?</h2>
<div>
<p class="org-font parabox-title-color-text pb-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
</p>
</div>
</div>
</div>
</header>

<div class="welcome-heroine-studing">

<div class="welcome-heroine-studing">
<div class = "row ">
<div class="col-sm-2 col-md-6">
</div>
<div class = "col-sm-10 col-md-6">
<h2 class = "pb-h2 pb-white-text org-font top-11em">De hecho, ¡Si puede!</h2>
<div>
<p class="org-font pb-white-text pb-text">Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua.
Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.
Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur.
Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum
</p>
</div>
</div>
</div>
</div>
</div>

<footer class="welcome-footer-height parabox-footer-background">
Expand Down
1 change: 1 addition & 0 deletions src/services/routing/Router.php
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ public function setNotFound(callable $action)

public function dispatch()
{

foreach ($this->routes as $url => $action) {
if ($url == $_SERVER['REQUEST_URI']) {
if (is_callable($action)) {
Expand Down

0 comments on commit a8b907d

Please sign in to comment.