summaryrefslogtreecommitdiff
path: root/public/app/views/templates
diff options
context:
space:
mode:
Diffstat (limited to 'public/app/views/templates')
-rw-r--r--public/app/views/templates/course.php93
-rw-r--r--public/app/views/templates/lesson.php82
-rw-r--r--public/app/views/templates/page.php64
3 files changed, 239 insertions, 0 deletions
diff --git a/public/app/views/templates/course.php b/public/app/views/templates/course.php
new file mode 100644
index 0000000..1d212b8
--- /dev/null
+++ b/public/app/views/templates/course.php
@@ -0,0 +1,93 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title><?=SITE_TITLE?> - <?=$title?></title>
+
+ <?php // header includes
+ ////////////////////////////////////////////////////////////////////////
+ Render::view('components/header_includes');
+ ?>
+
+</head>
+<body class="classroom">
+
+ <?php // top-bar
+ ////////////////////////////////////////////////////////////////////////
+ Render::view('components/top_bar', [
+ 'id' => $id,
+ 'label' => $breadcrumbs[ $id ]['rec']['label'],
+ 'parents' => $breadcrumbs[ $id ]['parents']
+ ]);
+ ?>
+
+
+<div class="main-content container">
+ <div class="row">
+
+ <div class="col col-md-5 col-lg-4 d-sm-none d-md-block side-bar">
+
+ <?php // tree of courses
+ ////////////////////////////////////////////////////////////////////////
+ Render::view('components/courses_menu', [
+ 'categories' => $categories,
+ 'open_path' => $course_path
+ ]);
+ ?>
+
+ </div>
+
+ <div class="col col-sm-12 col-md-7 col-lg-8 course-view">
+
+ <!-- Category Title -->
+ <h3>
+ <?=$breadcrumbs[ $id ]['rec']['label']?>
+ </h3>
+
+
+ <!-- Sub-Categories -->
+ <?php
+ Render::view('components/subcategories',[
+ 'id' => $id,
+ 'breadcrumbs' => $breadcrumbs
+ ])
+ ?>
+
+
+ <!-- Articles List -->
+ <?php if ($lessons) : ?>
+
+ <h5>Μαθήματα</h5>
+
+ <?php // list of posts/articles
+ ////////////////////////////////////////////////////
+ Render::view("components/lessons_list", [
+ 'lessons' => $lessons,
+ 'fieldset' => ['intro', 'level'] // ['intro', 'date']
+ ]);
+ ?>
+ <?php endif; ?>
+
+
+
+
+ </div>
+
+ </div>
+ </div>
+
+ <footer>
+ <div class="container">
+
+ <?php // render footer
+ ////////////////////////////////////////////////////////////////
+ Render::view('components/footer', [ 'entity' => $entity ]);
+ ?>
+
+ </div>
+ </footer>
+
+
+ <script src="/assets/js/classroom.js"></script>
+</body>
+</html>
diff --git a/public/app/views/templates/lesson.php b/public/app/views/templates/lesson.php
new file mode 100644
index 0000000..0867cd3
--- /dev/null
+++ b/public/app/views/templates/lesson.php
@@ -0,0 +1,82 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title><?=SITE_TITLE?> - <?=$title?></title>
+
+ <?php // header includes
+ ////////////////////////////////////////////////////////////////////////
+ Render::view('components/header_includes');
+ ?>
+
+</head>
+<body class="classroom">
+
+ <?php // top-bar
+ ////////////////////////////////////////////////////////////////////////
+ Render::view('components/top_bar', [
+ 'id' => $id,
+ 'label' => $breadcrumbs[ $course_id ]['rec']['label'],
+ 'parents' => $breadcrumbs[ $course_id ]['parents']
+ ]);
+ ?>
+
+
+<div class="main-content container">
+ <div class="row">
+
+ <div class="col col-md-5 col-lg-4 d-sm-none d-md-block side-bar">
+
+ <?php // tree of courses
+ ////////////////////////////////////////////////////////////////////////
+ Render::view('components/courses_menu', [
+ 'categories' => $categories,
+ 'open_path' => $course_path
+ ]);
+ ?>
+
+ </div>
+
+ <div class="col col-sm-12 col-md-7 col-lg-8 lesson-view">
+
+ <!-- Lesson Title -->
+ <h3>
+ <?=$title?>
+ </h3>
+
+ <!-- intro -->
+ <?php if ($lesson['intro'] != "") : ?>
+ <p class="intro"><?=$lesson['intro']?></p>
+ <?php endif; ?>
+
+ <!-- body -->
+ <div class="article-body">
+ <?php
+
+ $parsedown = new Parsedown();
+ echo $parsedown->text($lesson['body']);
+
+ ?>
+ </div>
+
+
+ </div>
+
+ </div>
+ </div>
+
+ <footer>
+ <div class="container">
+
+ <?php // render footer
+ ////////////////////////////////////////////////////////////////
+ Render::view('components/footer', [ 'entity' => $entity ]);
+ ?>
+
+ </div>
+ </footer>
+
+ <script src="/assets/js/classroom.js"></script>
+ <script src="/assets/js/lesson-features.js"></script>
+</body>
+</html>
diff --git a/public/app/views/templates/page.php b/public/app/views/templates/page.php
new file mode 100644
index 0000000..6afe45e
--- /dev/null
+++ b/public/app/views/templates/page.php
@@ -0,0 +1,64 @@
+<!DOCTYPE html>
+<html lang="en">
+<head>
+ <meta charset="utf-8">
+ <title><?=SITE_TITLE?> - <?=$page['title']?></title>
+
+ <?php // header includes
+ ////////////////////////////////////////////////////////////////////////
+ Render::view('components/header_includes');
+ ?>
+
+</head>
+<body class="classroom">
+
+ <?php // top-bar
+ ////////////////////////////////////////////////////////////////////////
+ Render::view('components/top_bar', [
+ 'id' => 0,
+ 'label' => '',
+ 'parents' => []
+ ]);
+ ?>
+
+
+ <div class="main-content container page-container">
+
+
+ <div class="lesson-view">
+
+ <!-- page Title -->
+ <h3>
+ <?=$page['title']?>
+ </h3>
+
+ <!-- page body -->
+ <div class="article-body">
+ <?php
+
+ $parsedown = new Parsedown();
+ echo $parsedown->text($page['body']);
+
+ ?>
+ </div>
+
+
+ </div>
+
+ </div>
+
+ <footer>
+ <div class="container">
+
+ <?php // render footer
+ ////////////////////////////////////////////////////////////////
+ Render::view('components/footer', [ 'entity' => $entity ]);
+ ?>
+
+ </div>
+ </footer>
+
+ <script src="/assets/js/classroom.js"></script>
+ <script src="/assets/js/lesson-features.js"></script>
+</body>
+</html>