diff --git a/App/Controllers/Home.php b/App/Controllers/Home.php index cdd8940..ec8710f 100644 --- a/App/Controllers/Home.php +++ b/App/Controllers/Home.php @@ -7,14 +7,14 @@ class Home { public function index() { - echo "This is index of home"; // Nanti di replace sama twig view ke App\Views\Data\pengumuman.html + // echo "This is index of home"; // Nanti di replace sama twig view ke App\Views\Data\pengumuman.html View::render('Data/pengumuman.html'); return true; } public function login() { - echo "You have to login"; // Nanti di replace sama twig view ke App\Views\Access\login.html + // echo "You have to login"; // Nanti di replace sama twig view ke App\Views\Access\login.html View::render('Access/login.html'); return true; } diff --git a/App/Controllers/Posts.php b/App/Controllers/Posts.php index 3823c8f..11621d3 100644 --- a/App/Controllers/Posts.php +++ b/App/Controllers/Posts.php @@ -7,14 +7,14 @@ class Posts { public function index() { - echo "This is index of posts."; // Nanti di replace sama twig view ke App\Views\Data\pengumuman.html + // echo "This is index of posts."; // Nanti di replace sama twig view ke App\Views\Data\pengumuman.html View::render('Data/pengumuman.html'); return true; } public function entry() { - echo "You can entry new data here."; // Nanti di replace sama twig view ke App\Views\Data\entry_pengumuman.html + // echo "You can entry new data here."; // Nanti di replace sama twig view ke App\Views\Data\entry_pengumuman.html View::render('Data/entry_pengumuman.html'); return true; } @@ -22,7 +22,7 @@ class Posts public function edit($id = null) { if ($id) { - echo "You can edit exists data with id $id here"; // Nanti di replace sama twig view ke App\Views\Data\edit_pengumuman.html + // echo "You can edit exists data with id $id here"; // Nanti di replace sama twig view ke App\Views\Data\edit_pengumuman.html View::render('Data/edit_pengumuman.html'); return true; } diff --git a/App/Views/Access/login.html b/App/Views/Access/login.html index 3e045d4..536f496 100644 --- a/App/Views/Access/login.html +++ b/App/Views/Access/login.html @@ -20,7 +20,7 @@ - +
diff --git a/App/Views/Data/edit_pengumuman.html b/App/Views/Data/edit_pengumuman.html index cd116b1..08e64ef 100644 --- a/App/Views/Data/edit_pengumuman.html +++ b/App/Views/Data/edit_pengumuman.html @@ -1,58 +1,55 @@ - - - - - Edit Pengumuman - - -
-

Pengumuman 1

+{% extends "base.html" %} - - +{% block title %}Edit Pengumuman{% endblock %} -
+{% block body %} + +

Pengumuman 1

- - + + -
+
- - + + -
+
- - + + -
+
- - + + -
+
- - + + - - +
- - + + - - + + -
+ + - -
- - + + + +
+ + + +{% endblock %} diff --git a/App/Views/Data/entry_pengumuman.html b/App/Views/Data/entry_pengumuman.html index 9ae03e4..fdb4d35 100644 --- a/App/Views/Data/entry_pengumuman.html +++ b/App/Views/Data/entry_pengumuman.html @@ -1,36 +1,33 @@ - - - - - Tambah Pengumuman - - -
-

Tambah Pengumuman

+{% extends "base.html" %} - - +{% block title %}Tambah Pengumuman{% endblock %} -
+{% block body %} + +

Tambah Pengumuman

- - + + - - +
- - + + - - + + - -
- - + + + + + + + + +{% endblock %} diff --git a/App/Views/Data/pengumuman.html b/App/Views/Data/pengumuman.html index cb1404a..16837af 100644 --- a/App/Views/Data/pengumuman.html +++ b/App/Views/Data/pengumuman.html @@ -1,22 +1,21 @@ - - - - - Pengumuman - - -

List Pengumuman

+{% extends "base.html" %} -

Pengumuman 1

- Edit -

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.

+{% block title %}Pengumuman{% endblock %} -

Pengumuman 1

- Edit -

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.

+{% block body %} +

List Pengumuman

-

Pengumuman 1

- Edit -

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.

- - +

Pengumuman 1

+Edit +

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.

+ +

Pengumuman 1

+Edit +

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.

+ +

Pengumuman 1

+Edit +

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.

+ ++ Tambah Pengumuman +{% endblock %} diff --git a/App/Views/base.html b/App/Views/base.html new file mode 100644 index 0000000..52ec523 --- /dev/null +++ b/App/Views/base.html @@ -0,0 +1,12 @@ + + + + + {% block title %}{% endblock %} + + + Home + {% block body %} + {% endblock %} + +