summaryrefslogtreecommitdiff
path: root/public/app/views/components/header_includes.php
blob: 5ddd5bcde6d87e2c14df0e6bec942662dd611aa9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php 
    if (!isset($administration)) {
        $administration = false;
    }
?>

<!-- FONTS and LIBRARY CSS (self-hosted)
    /////////////////////////////////////////////////////////////////////////-->

    <!-- Fira Sans (self-hosted) -->
<link rel="stylesheet" href="/assets/css/googlefonts/fira-sans-300-400-500.css">

    <!-- fontawesome icons (self-hosted) -->
<link rel="stylesheet" href="/assets/css/fontawesome-6.4.0/css/all.min.css">

    <!-- bootstrap -->
<link rel="stylesheet" href="/assets/css/bootstrap-5.3.0/css/bootstrap.min.css">

    <!-- datatables css -->
<link rel="stylesheet" href="/assets/js/DataTables/datatables.min.css">

    <!-- select2 css -->
<link rel="stylesheet" href="/assets/js/select2-4.1.0-rc0/css/select2.min.css">


<!-- CUSTOM CSS
    /////////////////////////////////////////////////////////////////////////-->

    <!-- main css -->
<link rel="stylesheet" href="/assets/css/class.css">

    <!-- overides  -->
<link rel="stylesheet" href="/assets/css/overides.css">


<!-- THEME overides CSS
    /////////////////////////////////////////////////////////////////////////-->

<?php   // decide a theme
    Render::view('components/theme');
?>

<!-- JAVASCRIPT 
    /////////////////////////////////////////////////////////////////////////-->

    <!-- bootstrap bundle js -->
<script src="/assets/css/bootstrap-5.3.0/js/bootstrap.bundle.min.js"></script>

    <!-- jquery -->
<script src="/assets/js/jquery-3.7.0.min.js"></script>

    <!-- basic cookie handling (vanilla js) -->
<script src="/assets/js/cookie.js"></script>

    <!-- pdfmake -->
<script src="<?=SITE_URL?>/assets/js/pdfmake/pdfmake.min.js"></script>
<script src="<?=SITE_URL?>/assets/js/pdfmake/vfs_fonts.js"></script>

    <!-- DataTables js -->
<script src="/assets/js/DataTables/datatables.min.js"></script>

    <!-- select2-4.1.0-rc.0 js -->
<script src="/assets/js/select2-4.1.0-rc0/js/select2.min.js"></script>

<?php /* DEPRICATED:
    <!-- marked -->
    <script src="/assets/js/marked/marked.min.js"></script>
    */
?>
<?php /* NOTE:

    <!-- #1
    build your own DataTables ...
    --- -- -- - - -
    
    https://datatables.net/download/
    -->


    <!-- #2
    date handling in vanilla js ...
    --- -- -- - - -

    https://stackoverflow.com/questions/27267565/javascript-returning-incorrect-date-from-an-input-type-date

    // convert to UTC to avoid "date minus one" issues where the supplied date is interpreted incorrectly as
    // the previous date.

    date = new Date(document.getElementById('date').value);
    console.log("original date: " + date.toString());
    console.log("UTC date string: " + date.toUTCString());

    //produces local machine timezone, and therefore incorrect date value

    date = new Date(date.toUTCString());
    console.log("UTC date string Date constructor: " + date.toString());

    utcDate = new Date(utcString.substr(0, utcString.indexOf("GMT")));
    console.log("UTC date string Date constructor (without 'GMT*'): " + utcDate.toString());
    console.log("UTC date number: " + date.getUTCDate());
    date.setDate(date.getUTCDate());
    date.setMonth(date.getUTCMonth());
    date.setFullYear(date.getUTCFullYear());
    console.log("UTC modified date: " + date.toString());

    Output:

    original date: Fri Jan 29 2021 23:16:11 GMT-0600 (Central Standard Time)
    UTC date string: Sat, 30 Jan 2021 05:16:11 GMT
    UTC date string Date constructor: Fri Jan 29 2021 23:16:11 GMT-0600 (Central Standard Time)
    UTC date string Date constructor (without 'GMT*'): Sat Jan 30 2021 23:16:11 GMT-0600 (Central Standard Time)
    UTC date number: 30
    UTC modified date: Sat Jan 30 2021 23:16:11 GMT-0600 (Central Standard Time)
    -->
*/