From 9b06c6b9c448c8f5a7a6894036166fa48da57223 Mon Sep 17 00:00:00 2001 From: ghost Date: Wed, 29 Dec 2021 12:10:47 +0200 Subject: [PATCH] implement homepage page draft --- .../controller/common/footer/guest.php | 6 + .../common/{footer.php => footer/user.php} | 2 +- src/application/controller/common/header.php | 3 - .../controller/common/header/guest.php | 3 + .../controller/common/header/user.php | 3 + src/application/controller/index.php | 2 +- .../{footer.phtml => footer/guest.phtml} | 0 src/application/view/common/footer/user.phtml | 5 + .../{header.phtml => header/guest.phtml} | 0 src/application/view/common/header/user.phtml | 29 ++++ src/application/view/home.phtml | 61 ++++++++ src/application/view/index.phtml | 2 - src/application/view/login.phtml | 4 +- src/application/view/register_off.phtml | 4 +- src/application/view/register_on.phtml | 4 +- src/application/view/welcome.phtml | 4 +- src/bootstrap.php | 4 +- src/public/css/user.css | 132 ++++++++++++++++++ 18 files changed, 251 insertions(+), 17 deletions(-) create mode 100644 src/application/controller/common/footer/guest.php rename src/application/controller/common/{footer.php => footer/user.php} (56%) delete mode 100644 src/application/controller/common/header.php create mode 100644 src/application/controller/common/header/guest.php create mode 100644 src/application/controller/common/header/user.php rename src/application/view/common/{footer.phtml => footer/guest.phtml} (100%) create mode 100644 src/application/view/common/footer/user.phtml rename src/application/view/common/{header.phtml => header/guest.phtml} (100%) create mode 100644 src/application/view/common/header/user.phtml create mode 100644 src/application/view/home.phtml delete mode 100644 src/application/view/index.phtml create mode 100644 src/public/css/user.css diff --git a/src/application/controller/common/footer/guest.php b/src/application/controller/common/footer/guest.php new file mode 100644 index 0000000..2871cf9 --- /dev/null +++ b/src/application/controller/common/footer/guest.php @@ -0,0 +1,6 @@ +getTotal(); +$blocksTotal = $_modelBlock->getTotal(); + +require(PROJECT_DIR . '/application/view/common/footer/guest.phtml'); \ No newline at end of file diff --git a/src/application/controller/common/footer.php b/src/application/controller/common/footer/user.php similarity index 56% rename from src/application/controller/common/footer.php rename to src/application/controller/common/footer/user.php index e3fe90e..8fdb33d 100644 --- a/src/application/controller/common/footer.php +++ b/src/application/controller/common/footer/user.php @@ -3,4 +3,4 @@ $usersTotal = $_modelUser->getTotal(); $blocksTotal = $_modelBlock->getTotal(); -require(PROJECT_DIR . '/application/view/common/footer.phtml'); \ No newline at end of file +require(PROJECT_DIR . '/application/view/common/footer/user.phtml'); \ No newline at end of file diff --git a/src/application/controller/common/header.php b/src/application/controller/common/header.php deleted file mode 100644 index 5eb173f..0000000 --- a/src/application/controller/common/header.php +++ /dev/null @@ -1,3 +0,0 @@ - +

+

+ + \ No newline at end of file diff --git a/src/application/view/common/header.phtml b/src/application/view/common/header/guest.phtml similarity index 100% rename from src/application/view/common/header.phtml rename to src/application/view/common/header/guest.phtml diff --git a/src/application/view/common/header/user.phtml b/src/application/view/common/header/user.phtml new file mode 100644 index 0000000..9524fa9 --- /dev/null +++ b/src/application/view/common/header/user.phtml @@ -0,0 +1,29 @@ + + + + + <?php echo $metaTitle ?> + + + + + + + + + +
+
+ + +
+
\ No newline at end of file diff --git a/src/application/view/home.phtml b/src/application/view/home.phtml new file mode 100644 index 0000000..fb8adc9 --- /dev/null +++ b/src/application/view/home.phtml @@ -0,0 +1,61 @@ + +
+
+ +
+
+ +
+ + +
+
+
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make +
+
+ Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make +
+
+ +
+
+ + + +
+

+

+

+

+
+ +
+
diff --git a/src/application/view/index.phtml b/src/application/view/index.phtml deleted file mode 100644 index 65c8ec0..0000000 --- a/src/application/view/index.phtml +++ /dev/null @@ -1,2 +0,0 @@ - - \ No newline at end of file diff --git a/src/application/view/login.phtml b/src/application/view/login.phtml index 7dac51e..5b3ab5b 100644 --- a/src/application/view/login.phtml +++ b/src/application/view/login.phtml @@ -1,4 +1,4 @@ - +

@@ -18,4 +18,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/src/application/view/register_off.phtml b/src/application/view/register_off.phtml index 8836bca..76b0ef5 100644 --- a/src/application/view/register_off.phtml +++ b/src/application/view/register_off.phtml @@ -1,4 +1,4 @@ - +

@@ -10,4 +10,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/src/application/view/register_on.phtml b/src/application/view/register_on.phtml index 3eeae89..7086cfd 100644 --- a/src/application/view/register_on.phtml +++ b/src/application/view/register_on.phtml @@ -1,4 +1,4 @@ - +

@@ -14,4 +14,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/src/application/view/welcome.phtml b/src/application/view/welcome.phtml index 60dcfde..95d8bb2 100644 --- a/src/application/view/welcome.phtml +++ b/src/application/view/welcome.phtml @@ -1,4 +1,4 @@ - +

@@ -18,4 +18,4 @@
- \ No newline at end of file + \ No newline at end of file diff --git a/src/bootstrap.php b/src/bootstrap.php index 6af90bd..6d62d99 100644 --- a/src/bootstrap.php +++ b/src/bootstrap.php @@ -51,7 +51,7 @@ if (isset($_GET['_route_'])) { switch ($_GET['_route_']) { case '': - require(PROJECT_DIR . '/application/controller/index.php'); + require(PROJECT_DIR . '/application/controller/home.php'); break; case 'login': require(PROJECT_DIR . '/application/controller/login.php'); @@ -70,5 +70,5 @@ if (isset($_GET['_route_'])) { } } else { - require(PROJECT_DIR . '/application/controller/index.php'); + require(PROJECT_DIR . '/application/controller/home.php'); } \ No newline at end of file diff --git a/src/public/css/user.css b/src/public/css/user.css new file mode 100644 index 0000000..e370ee7 --- /dev/null +++ b/src/public/css/user.css @@ -0,0 +1,132 @@ +* { + -moz-transition: all .4s ease-in; + -o-transition: all .4s ease-in; + /* issue #2 + -webkit-transition: all .5s ease-in; + transition: all .5s ease-in; */ +} + +a, +a:visited, +a:active { + color: #fff +} + +.container { + max-width: 1024px; + margin: 16px auto; + padding: 0 16px; + overflow: hidden +} + +.container .side { + float: left; + width: 30%; + padding-right: 16px +} + +.container .side form input { + height: 36px; + width: 100%; + padding: 16px 8px; + border-radius: 3px; + margin-bottom: 16px; + font-family: Roboto-Regular, Sans-Serif, Verdana; + font-size: 14px; + background: rgb(56, 65, 78); + color: #dfe8f4; + outline: none; +} + +.container .side .suggestions { + padding: 16px 8px; +} + +.container .side .suggestions h4 { + text-align: center; + text-transform: uppercase +} + +.container .main { + float: left; + width: 70% +} + +.container .main .menu .item { + display: inline-block; + /* background: rgba(39, 46, 57, 0.28); */ + background: rgba(101, 114, 134, 0.28); + border-radius: 3px; + cursor: pointer; + text-align: center; + padding: 8px 16px +} + +.container .main .menu .item.active, +.container .main .menu .item:hover { + background: #272E39; +} + +.container .main .menu .item span { + font-size: 12px; + margin: 0 8px +} + +.container .main .post { + margin: 8px 0; + padding: 16px; + background: #272E39; + border-radius: 3px; + overflow: hidden +} + +.container .main .post textarea { + height: 52px; + width: 100%; + padding: 16px 8px; + border-radius: 3px; + margin-bottom: 16px; + font-family: Roboto-Regular, Sans-Serif, Verdana; + font-size: 14px; + background: rgba(101, 114, 134, 0.28); + color: #dfe8f4; + outline: none + +} + +.container .main .post textarea:focus { + height: 120px; + /*background: rgb(79, 90, 107);*/ +} + +.container .main .post button { + float: right; + padding: 8px 16px; + border-radius: 3px; + cursor: pointer; + background-color: #337ab7; + color: #fff; + border: 0 +} + +.container .main .post button:hover { + background-color: #437baa +} + +.container .main .post .content { + background: rgb(89,99,116); + border-radius: 3px; + padding: 16px; +} + +.container .main .content .item { + padding: 16px; + margin-bottom: 8px; + background: rgba(101, 114, 134, 0.28); + border-radius: 3px; + color: #dfe8f4 +} + +.container .main .footer { + margin: 36px 0 +} \ No newline at end of file