giscus comments
[mdref/mdref] / views / layout.phtml
index b0e96a8667a00e1210e100af0fd4760ddeb5766d..21693f6dfce8a327e9aa2a348d39be6c41e9ec37 100644 (file)
                <?php else: ?>
                        <?php include __DIR__."/index.phtml" ?>
                <?php endif; ?>
+               <?php if (isset($entry) && ($comments = $entry->getRepo()->getCommentProvider())) : ?>
 
+                       <div class="comments">
+                               <?php foreach ($comments as $providerName => $providerData) : ?>
+                                       <?php include __DIR__."/comments.$providerName.phtml" ?>
+                               <?php endforeach; ?>
+
+                       </div>
+               <?php endif; ?>
 
                        <footer>
                                <?php include __DIR__."/footer.phtml" ?>
@@ -37,7 +45,7 @@
                        </footer>
                <?php if (isset($baseUrl)) : ?>
 
-                       <script src="index.js"></script>
+                       <script src="index.js" defer></script>
                <?php endif; ?>
 
                </div>