From f17f0bd79b0f8cc8fcec46361f555884d3ad39dc Mon Sep 17 00:00:00 2001 From: Habibi <muhhabibih@gmail.com> Date: Sun, 21 Oct 2018 21:15:22 +0700 Subject: [PATCH] Finish browse and search result prototype --- app/view/browse.php | 1 + app/view/result.php | 7 ++++++ app/view/static/css/browse.css | 24 ------------------- app/view/static/html/browse.html | 16 ------------- config/devel.php | 2 +- public/index.php | 3 ++- public/static/css/base.css | 5 +++- public/static/css/browse.css | 22 +++++++++++++++++ .../static/css/search_result.css | 8 ++++++- public/static/html/browse.html | 21 ++++++++++++++++ .../static/html/search_result.html | 4 ++-- 11 files changed, 67 insertions(+), 46 deletions(-) create mode 100644 app/view/result.php delete mode 100644 app/view/static/css/browse.css delete mode 100644 app/view/static/html/browse.html create mode 100644 public/static/css/browse.css rename {app/view => public}/static/css/search_result.css (88%) create mode 100644 public/static/html/browse.html rename {app/view => public}/static/html/search_result.html (87%) diff --git a/app/view/browse.php b/app/view/browse.php index 13fa810..a68f53d 100644 --- a/app/view/browse.php +++ b/app/view/browse.php @@ -1,5 +1,6 @@ <?php include __STATIC__.'/html/header.html'; + include __STATIC__.'/html/browse.html'; // Include content here; include __STATIC__.'/html/footer.html'; // echo $_COOKIE["user"]; diff --git a/app/view/result.php b/app/view/result.php new file mode 100644 index 0000000..9fae434 --- /dev/null +++ b/app/view/result.php @@ -0,0 +1,7 @@ +<?php + include __STATIC__.'/html/header.html'; + include __STATIC__.'/html/search_result.html'; + // Include content here; + include __STATIC__.'/html/footer.html'; + // echo $_COOKIE["user"]; +?> \ No newline at end of file diff --git a/app/view/static/css/browse.css b/app/view/static/css/browse.css deleted file mode 100644 index fd087ab..0000000 --- a/app/view/static/css/browse.css +++ /dev/null @@ -1,24 +0,0 @@ -.search-book input { - display: block; - height: 38px; - width: 100%; - border: 2px solid; - border-color: #898989; - border-radius: 5px; - - margin-bottom: 20px; - padding-left: 10px; -} - -.search-book button { - width: 120px; - height: 35px; - background-color: #00aeef; - border-color: #00aeef; - border-radius: 5px; -} - -.search-book button span { - color: white; - font-size: 18px; -} \ No newline at end of file diff --git a/app/view/static/html/browse.html b/app/view/static/html/browse.html deleted file mode 100644 index 644c638..0000000 --- a/app/view/static/html/browse.html +++ /dev/null @@ -1,16 +0,0 @@ -<link rel="stylesheet" href="../css/browse.css"> -<link rel="stylesheet" href="../css/base.css"> -<div class="content search-book"> - <h1 class="title">Search Book</h1> - <form> - <input - type="text" - name='search-book' - id='search-book' - placeholder="Input search terms..." - /> - <div class="justify-content-end"> - <button type='submit' id='search-book-button'><span>Search</span></button> - </div> - </form> -</div> \ No newline at end of file diff --git a/config/devel.php b/config/devel.php index 0a440e5..3da4d5b 100644 --- a/config/devel.php +++ b/config/devel.php @@ -1,5 +1,5 @@ <?php - $APP_CONFIG = array( + return array( "db" => array( "host" => "localhost", "user" => "root", diff --git a/public/index.php b/public/index.php index 58e0d33..6ad12e0 100644 --- a/public/index.php +++ b/public/index.php @@ -39,7 +39,8 @@ // TODO: Add Book Routes $router = addUserRoutes($router, $userUsecase); - $router->add("/browse/", "GET", 'render', $authMiddleware, 'browse.php'); + $router->add("/browse/", "GET", 'render', null, 'browse.php'); + $router->add("/results/", "GET", "render", null, "result.php"); $router->add("/login/", "GET", 'render', null, 'login.php'); $router->add("/register/", "GET", 'render', null, 'register.php'); $router->add("/history/", "GET", 'render', $authMiddleware, 'history.php'); diff --git a/public/static/css/base.css b/public/static/css/base.css index 3d528b6..20cfbab 100644 --- a/public/static/css/base.css +++ b/public/static/css/base.css @@ -5,9 +5,12 @@ body { } .title { - font-size: 80px; + font-size: 55px; color: #f26600; +} +.title h1 { + margin-top: 0px; margin-bottom: 30px; } diff --git a/public/static/css/browse.css b/public/static/css/browse.css new file mode 100644 index 0000000..59d17d5 --- /dev/null +++ b/public/static/css/browse.css @@ -0,0 +1,22 @@ +.search-book { + height: 40px; + width: 100%; + border: 3px solid; + border-color: #898989; + border-radius: 6px; + + margin-bottom: 30px; + padding: 10px; +} + +.button-search-book { + width: 150px; + height: 40px; + background-color: #00aeef; + border-color: #00aeef; +} + +.button-search-book span { + color: white; + font-size: 20px; +} \ No newline at end of file diff --git a/app/view/static/css/search_result.css b/public/static/css/search_result.css similarity index 88% rename from app/view/static/css/search_result.css rename to public/static/css/search_result.css index b20c250..777d8fb 100644 --- a/app/view/static/css/search_result.css +++ b/public/static/css/search_result.css @@ -8,8 +8,14 @@ align-self: flex-end; } -.search-result-title h2 { +.search-result-title h1 { + font-size: 110px; margin-bottom: 45px; + margin-top: 10px; +} + +.search-result-title h2 { + margin-bottom: 65px; font-size: 30px; color: #4c4c4c; } diff --git a/public/static/html/browse.html b/public/static/html/browse.html new file mode 100644 index 0000000..3e9968c --- /dev/null +++ b/public/static/html/browse.html @@ -0,0 +1,21 @@ +<link rel="stylesheet" href="/static/css/base.css"> +<link rel="stylesheet" href="/static/css/browse.css"> +<div class="content"> + <div class="title"> + <h1> + Search Book + </h1> + </div> + <form> + <input + type="text" + class="search-book" + name="search-book" + placeholder="Input search terms..." + /> + <div class="justify-content-end"> + <button type="Submit" class="button-search-book"><span>Search</span></button> + </div> + </form> + +</div> \ No newline at end of file diff --git a/app/view/static/html/search_result.html b/public/static/html/search_result.html similarity index 87% rename from app/view/static/html/search_result.html rename to public/static/html/search_result.html index 8d14df4..8eba183 100644 --- a/app/view/static/html/search_result.html +++ b/public/static/html/search_result.html @@ -1,5 +1,5 @@ -<link rel="stylesheet" href="../css/base.css"> -<link rel="stylesheet" href="../css/search_result.css"> +<link rel="stylesheet" href="/static/css/base.css"> +<link rel="stylesheet" href="/static/css/search_result.css"> <div class="content search-result"> <div class="search-result-title"> <h1 class="title">Search Result</h1> -- GitLab