1<?php
2/**
3 * DokuWiki Image Detail Page
4 *
5 */
6
7//Library of template function
8use ComboStrap\TplUtility;
9use dokuwiki\Extension\Event;
10
11require_once(__DIR__ . '/class/TplUtility.php');
12
13global $lang;
14global $conf;
15global $IMG;
16global $ERROR;
17global $REV;
18
19/**
20 * Bootstrap meta-headers
21 */
22TplUtility::registerHeaderHandler();
23
24// must be run from within DokuWiki
25if (!defined('DOKU_INC')) die();
26
27/**
28 * Should be run before the HTML head function
29 * (ie {@link tpl_metaheaders}
30 */
31$railBar = TplUtility::getRailBar();
32$pageHeader = TplUtility::getPageHeader();
33$pageFooter = TplUtility::getFooter();
34
35?>
36<!DOCTYPE html>
37<html lang="<?php echo $conf['lang'] ?>" dir="<?php echo $lang['direction'] ?>" class="no-js">
38<head>
39
40    <?php // Avoid using character entities in your HTML, provided their encoding matches that of the document (generally UTF-8) ?>
41    <meta charset="utf-8"/>
42
43    <?php // Responsive meta tag ?>
44    <meta name="viewport" content="width=device-width,initial-scale=1"/>
45
46    <script>(function (H) {
47            H.className = H.className.replace(/\bno-js\b/, 'js')
48        })(document.documentElement)
49    </script>
50
51    <?php // Headers ?>
52    <?php tpl_metaheaders() ?>
53
54    <title>
55        <?php echo hsc(tpl_img_getTag('IPTC.Headline', $IMG)) ?>
56        [<?php echo strip_tags($conf['title']) ?>]
57    </title>
58
59    <?php // Favicon ?>
60    <?php TplUtility::renderFaviconMetaLinks() ?>
61
62    <?php // Hook ?>
63    <?php tpl_includeFile('meta.html') ?>
64
65</head>
66
67<body>
68
69<?php echo $pageHeader ?>
70
71<div class="site container <?php echo tpl_classes(); ?>" style="position: relative">
72
73    <?php // To go at the top of the page, style is for the fix top page --> ?>
74    <div id="dokuwiki__top"></div>
75
76
77    <?php
78    //  A trigger to show content on the top part of the website
79    $data = "";// Mandatory
80    Event::createAndTrigger('TPL_PAGE_TOP_OUTPUT', $data);
81    ?>
82
83    <!-- Must contain One row -->
84    <div class="row" style="min-height: 60vh">
85
86        <div role="main" class="col-md-<?php tpl_getConf(TplUtility::CONF_GRID_COLUMNS) ?>">
87            <!-- ********** CONTENT ********** -->
88
89
90            <?php tpl_flush() ?>
91            <?php tpl_includeFile('pageheader.html') ?>
92            <!-- detail start -->
93            <?php
94            if ($ERROR):
95                echo '<h1>' . $ERROR . '</h1>';
96            else: ?>
97                <?php if ($REV) echo p_locale_xhtml('showrev'); ?>
98                <h1><?php echo nl2br(hsc(tpl_img_getTag('simple.title'))); ?></h1>
99
100                <p>
101                    <?php tpl_img(900, 700); /* parameters: maximum width, maximum height (and more) */ ?>
102                </p>
103
104                <div class="img_detail">
105                    <?php tpl_img_meta(); ?>
106                </div>
107                <?php //Comment in for Debug// dbg(tpl_img_getTag('Simple.Raw'));?>
108            <?php endif; ?>
109
110            <!-- detail stop -->
111            <?php tpl_includeFile('pagefooter.html') ?>
112            <?php tpl_flush() ?>
113
114            <?php /* doesn't make sense like this; @todo: maybe add tpl_imginfo()? <div class="docInfo"><?php tpl_pageinfo(); ?></div> */ ?>
115
116        </div>
117
118    </div>
119
120    <?php echo $railBar ?>
121</div>
122
123<?php echo $pageFooter ?>
124<?php echo TplUtility::getPoweredBy() ?>
125
126<?php
127// The stylesheet (before indexer work and script at the end)
128TplUtility::addPreloadedResources();
129?>
130
131
132</body>
133</html>
134