Files
remark42/frontend/templates/last-comments.ejs
T
Pavel MineevandUmputun 5825a55b69 Update frontend
* change root dit and change way to import modules
* update deps to latest versions
* use latest tools for building bundles
* rewrite webpack config
* use nomodule technique for loading modern bundle
* inject polyfills by babel usebuiltins
* update eslint rules
* rename all style files to CSS
* use postcss preset env for building styles
* proper typescript typing
* put all html files to templates folder
* etc
2021-01-12 13:39:26 -06:00

56 lines
1.4 KiB
Plaintext

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width,initial-scale=1" />
<title>Last comments</title>
<style>
body {
padding: 0;
margin: 0;
}
.container {
max-width: 400px;
margin: 40px;
}
</style>
<% if (htmlWebpackPlugin.options.env === 'production') { %>
<link rel="stylesheet" href="last-comments.css" />
<% } %>
</head>
<body>
<div class="container">
<div class="remark42__last-comments" data-max="50"></div>
</div>
<script>
var remark_config = {
site_id: 'remark',
host: '<%= htmlWebpackPlugin.options.REMARK_URL %>',
components: ['last-comments']
};
(function (c, d) {
for (var i = 0; i < c.length; i++) {
var s = d.createElement('script');
var e = '.js';
var r = d.head || d.body;
if ('noModule' in s) {
s.type = 'module';
e = '.mjs';
} else {
s.async = true;
}
s.defer = true;
s.src = remark_config.host + '/web/' + c[i] + e;
r.appendChild(s);
}
})(remark_config.components || ['embed'], document);
</script>
<noscript> Please enable JavaScript to view the comments powered by Remark. </noscript>
</body>
</html>