11<!DOCTYPE html>
22< html lang ="en ">
3+
34< head >
45 {% if title %}
56 < title > {{ title }}</ title >
89 {% endif %}
910 < meta charset ="utf-8 ">
1011 < meta name ="viewport " content ="width=device-width, initial-scale=1 ">
11- < link type ="image/png " href ="/images/favicon.png " rel ="icon "/>
12- < script src ="https://code.jquery.com/jquery-3.7.1.min.js " integrity ="sha256-/JqT3SQfawRcv/BIHPThkBvs0OEvtFFmqPF/lYI/Cxo= " crossorigin ="anonymous "> </ script >
13- < script src ="https://code.jquery.com/ui/1.14.1/jquery-ui.min.js " integrity ="sha256-AlTido85uXPlSyyaZNsjJXeCs07eSv3r43kyCVc8ChI= " crossorigin ="anonymous "> </ script >
12+ < link type ="image/png " href ="/images/favicon.png " rel ="icon " />
13+ <!-- https://releases.jquery.com/ -->
14+ < script src ="https://code.jquery.com/jquery-4.0.0.min.js "
15+ integrity ="sha256-OaVG6prZf4v69dPg6PhVattBXkcOWQB62pdZ3ORyrao= " crossorigin ="anonymous "> </ script >
16+ < script src ="https://code.jquery.com/ui/1.14.2/jquery-ui.min.js "
17+ integrity ="sha256-mblSWfbYzaq/f+4akyMhE6XELCou4jbkgPv+JQPER2M= " crossorigin ="anonymous "> </ script >
1418 <!-- Bootstrap CSS -->
15- < link href ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/css/bootstrap.min.css " rel ="stylesheet " integrity ="sha384-4Q6Gf2aSP4eDXB8Miphtr37CMZZQ5oXLH2yaXMJ2w8e2ZtHTl7GptT4jmndRuHDT " crossorigin ="anonymous ">
16- < script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.6/dist/js/bootstrap.bundle.min.js " integrity ="sha384-j1CDi7MgGQ12Z7Qab0qlWQ/Qqz24Gc6BM0thvEMVjHnfYGF0rmFCozFSxQBxwHKO " crossorigin ="anonymous "> </ script >
19+ < link href ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/css/bootstrap.min.css " rel ="stylesheet "
20+ integrity ="sha384-sRIl4kxILFvY47J16cr9ZwB07vP4J8+LH7qKQnuqkuIAvNWLzeN8tE5YBujZqJLB " crossorigin ="anonymous ">
21+ < script src ="https://cdn.jsdelivr.net/npm/bootstrap@5.3.8/dist/js/bootstrap.bundle.min.js "
22+ integrity ="sha384-FKyoEForCGlyvwx9Hj09JcYn3nv7wiPVlz7YYwJrWVcXK/BmnVDxM+D2scQbITxI "
23+ crossorigin ="anonymous "> </ script >
1724 <!--
1825 https://developers.google.com/fonts/docs/material_icons
1926 https://fonts.google.com/icons?selected=Material+Icons
2027 -->
2128 < link rel ="stylesheet " type ="text/css " href ="https://fonts.googleapis.com/icon?family=Material+Icons ">
2229 <!-- https://datatables.net/download/ -->
23- < link href ="https://cdn.datatables.net/v/dt/dt-2.3.0/datatables.min.css " rel ="stylesheet " integrity ="sha384-b6zpX2e8uzvhWek1oBTKdifu88SXYijvZlp44itAjiEbD8ic6XRiVFQ9F6u4gspj " crossorigin ="anonymous ">
24- < script src ="https://cdn.datatables.net/v/dt/dt-2.3.0/datatables.min.js " integrity ="sha384-AFcRPcI5tCh/IuCki8nD5IrM9bWey0NmCM+Gyq+zHDmYZq9QlZ418kOdfglyNTWt " crossorigin ="anonymous "> </ script >
30+ < link href ="https://cdn.datatables.net/v/dt/dt-2.3.7/datatables.min.css " rel ="stylesheet "
31+ integrity ="sha384-wCnlGUpaekN+Mtc+qIoipdqIqe2dvC7hWyzVg8wajZ1sxKnVTbnyBd7pyx7JT0Su " crossorigin ="anonymous ">
32+
33+ < script src ="https://cdn.datatables.net/v/dt/dt-2.3.7/datatables.min.js "
34+ integrity ="sha384-aQ8I1X2x8U0AR8D7C4Ah0OvZlwMslQdN5YDAQBA56jXrrhcECijs/i7H+5DDrlV1 "
35+ crossorigin ="anonymous "> </ script >
2536
26- < link href ="https://cdn.datatables.net/v/dt/dt-2.3.0/kt-2.12.1/datatables.min.css " rel ="stylesheet " integrity ="sha384-/YpIbsed/Dv9QgeNWjIb5nPT1nACnZJQJUd8d5tcyG8UcGf7j3RQmaYzeD97p5+k " crossorigin ="anonymous ">
27- < script src ="https://cdn.datatables.net/v/dt/dt-2.3.0/kt-2.12.1/datatables.min.js " integrity ="sha384-67//YzL0FsBz16FHgNNcM0LYFi74m5ewRkLyeS4kw/QgoLBN8qGoJgRm/b4O7RD8 " crossorigin ="anonymous "> </ script >
37+ <!-- KeyTable -->
38+ < link href ="https://cdn.datatables.net/v/dt/dt-2.3.7/kt-2.12.2/datatables.min.css " rel ="stylesheet "
39+ integrity ="sha384-Eac85yP5lBhrQqmpDsnIkRbo8qsT31NqN7cVfNQV9yh9bNzyoopDRxW37m9CEotr " crossorigin ="anonymous ">
2840
29- < script src ="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js " integrity ="sha512-LhccdVNGe2QMEfI3x4DVV3ckMRe36TfydKss6mJpdHjNFiV07dFpS2xzeZedptKZrwxfICJpez09iNioiSZ3hA== " crossorigin ="anonymous "> </ script >
41+ < script src ="https://cdn.datatables.net/v/dt/dt-2.3.7/kt-2.12.2/datatables.min.js "
42+ integrity ="sha384-fqpOlZTL6uPWivQbo5PyFzkynwSZvXOqyfQzwBC2AjU5csKU9On5ij12UV1uEDw0 "
43+ crossorigin ="anonymous "> </ script >
44+
45+ < script src ="https://cdnjs.cloudflare.com/ajax/libs/showdown/2.1.0/showdown.min.js "
46+ integrity ="sha512-LhccdVNGe2QMEfI3x4DVV3ckMRe36TfydKss6mJpdHjNFiV07dFpS2xzeZedptKZrwxfICJpez09iNioiSZ3hA== "
47+ crossorigin ="anonymous "> </ script >
3048
3149 < link rel ="stylesheet " type ="text/css " href ="{{ url_for('static', filename='css/style.css') }} ">
3250 < script type ="text/javascript " src ="/js/script.js "> </ script >
3351 < script type ="text/javascript " src ="/js/scrolltable.js "> </ script >
3452 < script type ="text/javascript " src ="https://www.google.com/jsapi "> </ script >
3553 < script type ="text/javascript " src ="https://www.gstatic.com/charts/loader.js "> </ script >
3654</ head >
55+
3756< body >
38- <!-- https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_sidenav_push -->
39- < div id ="mySidenav " class ="sidenav ">
40- < a id ="closeLeftNav " href ="javascript:void(0) " class ="closebtn " style ="position: relative; top: 100%; transform: translateY(-100%); text-align: right; "> <<</ a >
41- < a id ="userLeftNav " href ="{{url_for('user.create')}} "> Register User</ a >
42- < a id ="authorLeftNav " href ="{{url_for('author.create')}} "> Add Author</ a >
43- < a id ="bookLeftNav " href ="{{url_for('book.create')}} "> Add Book</ a >
44- </ div >
45- < div id ="main " class ="container-fluid text-center ">
46- < nav role ="navigation " class ="navbar navbar-fixed-top navbar-expand-sm bg-light ">
47- < div class ="container-fluid ">
48- < a class ="navbar-brand " href ="{{url_for('home.index')}} "> < img src = "{{ url_for('static', filename='images/logo.png')}} " alt ="Logo " width ="50 " ,height ="60 "> </ a >
49- < div class ="navbar-header ">
50- < button type ="button " class ="navbar-toggler " data-toggle ="collapse " data-target ="#myNavbar ">
51- < span class ="navbar-toggler-icon "> </ span >
52- </ button >
57+ <!-- https://www.w3schools.com/howto/tryit.asp?filename=tryhow_js_sidenav_push -->
58+ < div id ="mySidenav " class ="sidenav ">
59+ < a id ="closeLeftNav " href ="javascript:void(0) " class ="closebtn "
60+ style ="position: relative; top: 100%; transform: translateY(-100%); text-align: right; "> <<</ a >
61+ < a id ="userLeftNav " href ="{{url_for('user.create')}} "> Register User</ a >
62+ < a id ="authorLeftNav " href ="{{url_for('author.create')}} "> Add Author</ a >
63+ < a id ="bookLeftNav " href ="{{url_for('book.create')}} "> Add Book</ a >
64+ </ div >
65+ < div id ="main " class ="container-fluid text-center ">
66+ < nav role ="navigation " class ="navbar navbar-fixed-top navbar-expand-sm bg-light ">
67+ < div class ="container-fluid ">
68+ < a class ="navbar-brand " href ="{{url_for('home.index')}} "> < img
69+ src ="{{ url_for('static', filename='images/logo.png')}} " alt ="Logo " width ="50 " ,height ="60 "> </ a >
70+ < div class ="navbar-header ">
71+ < button type ="button " class ="navbar-toggler " data-toggle ="collapse " data-target ="#myNavbar ">
72+ < span class ="navbar-toggler-icon "> </ span >
73+ </ button >
74+ </ div >
75+ < div class ="collapse navbar-collapse " id ="myNavbar ">
76+ < ul class ="navbar-nav mr-auto ">
77+ < li class ="nav-item "> < a class ="nav-link " href ="{{url_for('fibonacci.fibonacci')}} "> Fibonacci</ a > </ li >
78+ < li class ="nav-item "> < a id ="user " class ="nav-link " href ="{{url_for('user.index')}} "> Users</ a > </ li >
79+ < li class ="nav-item "> < a id ="author " class ="nav-link " href ="{{url_for('author.index')}} "> Authors</ a > </ li >
80+ < li class ="nav-item "> < a id ="book " class ="nav-link " href ="{{url_for('book.index')}} "> Books</ a > </ li >
81+ < li class ="nav-item "> < a id ="chat " class ="nav-link " href ="{{url_for('chat.index')}} "> Chat</ a > </ li >
82+ </ ul >
83+ < ul class ="nav navbar-nav ms-auto ">
84+ {% if session["user"] %}
85+ <!-- Logged in -->
86+ < li > < a href ="{{url_for('auth.logout')}} " class ="btn btn-default btn-sm "> < span
87+ class ="material-icons "> logout</ span > </ a > </ li >
88+ {% else %}
89+ <!-- Not Logged in -->
90+ < li > < a href ="{{url_for('auth.login')}} " class ="btn btn-default btn-sm "> < span
91+ class ="material-icons "> login</ span > </ a > </ li >
92+ {% endif %}
93+ </ ul >
94+ </ div >
5395 </ div >
54- < div class =" collapse navbar-collapse " id =" myNavbar " >
55- < ul class ="navbar-nav mr-auto " >
56- < li class ="nav-item " > < a class =" nav-link " href =" {{url_for('fibonacci.fibonacci')}} " > Fibonacci </ a > </ li >
57- < li class =" nav-item " > < a id =" user " class =" nav-link " href =" {{url_for('user.index')}} " > Users </ a > </ li >
58- < li class =" nav-item " > < a id =" author " class =" nav-link " href =" {{url_for('author.index')}} " > Authors </ a > </ li >
59- < li class =" nav-item " > < a id =" book " class =" nav-link " href =" {{url_for('book.index')}} " > Books </ a > </ li >
60- < li class =" nav-item " > < a id =" chat " class =" nav-link " href =" {{url_for('chat.index')}} " > Chat </ a > </ li >
61- </ ul >
62- < ul class =" nav navbar-nav ms-auto " >
63- {% if session["user"] %}
64- <!-- Logged in -- >
65- < li > < a href =" {{url_for('auth.logout')}} " class =" btn btn-default btn-sm " > < span class =" material-icons " > logout </ span > </ a > </ li >
66- {% else %}
67- <!-- Not Logged in -- >
68- < li > < a href =" {{url_for('auth.login')}} " class =" btn btn-default btn-sm " > < span class =" material-icons " > login </ span > </ a > </ li >
69- {% endif %}
70- </ ul >
96+ </ nav >
97+ <!--<div id="main" class="container-fluid text-center">-- >
98+ < div class ="content " style =" margin-top: 10px " >
99+ {% block content %}
100+ {% endblock %}
101+ < div id =" notification " class =" container " style =" margin-top: 10px " >
102+ {% with messages = get_flashed_messages(with_categories=true) %}
103+ {% if messages %}
104+ < hr >
105+ {% for category, message in messages %}
106+ < div class =" alert alert-{{ category }} alert-dismissable fade show " role =" alert " >
107+ {{ message }}
108+ < button type =" button " class =" btn-close " data-bs-dismiss =" alert " aria-label =" Close " > </ button >
109+ </ div >
110+ {% endfor %}
111+ {% endif %}
112+ {% endwith %}
71113 </ div >
114+ < footer class ="container-fluid text-center ">
115+ < p > Copyright © {{ now.year }} Teh Kok How</ p >
116+ </ footer >
72117 </ div >
73- </ nav >
74- <!--<div id="main" class="container-fluid text-center">-->
75- < div class ="content " style ="margin-top: 10px ">
76- {% block content %}
77- {% endblock %}
78- < div id ="notification " class ="container " style ="margin-top: 10px ">
79- {% with messages = get_flashed_messages(with_categories=true) %}
80- {% if messages %}
81- < hr >
82- {% for category, message in messages %}
83- < div class ="alert alert-{{ category }} alert-dismissable fade show " role ="alert ">
84- {{ message }}
85- < button type ="button " class ="btn-close " data-bs-dismiss ="alert " aria-label ="Close "> </ button >
86- </ div >
87- {% endfor %}
88- {% endif %}
89- {% endwith %}
90- </ div >
91- < footer class ="container-fluid text-center ">
92- < p > Copyright © {{ now.year }} Teh Kok How</ p >
93- </ footer >
94118 </ div >
95- </ div >
96119</ body >
120+
97121</ html >
0 commit comments