mirror of https://github.com/jlelse/teleposter
58 lines
1.5 KiB
HTML
58 lines
1.5 KiB
HTML
<!DOCTYPE html>
|
|
<html lang="en">
|
|
|
|
<head>
|
|
<meta charset="utf-8">
|
|
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
|
<meta name="viewport" content="width=device-width, initial-scale=1">
|
|
<link rel="stylesheet"
|
|
href="https://cdnjs.cloudflare.com/ajax/libs/twitter-bootstrap/4.1.3/css/bootstrap.min.css">
|
|
<style>
|
|
* {
|
|
max-width: 100% !important;
|
|
height: auto;
|
|
word-break: break-all;
|
|
word-break: break-word;
|
|
}
|
|
|
|
</style>
|
|
</head>
|
|
|
|
<body>
|
|
<main role="main" class="container">
|
|
<div id="viewerTitle" class="mt-3"></div>
|
|
<div id="viewerAuthor"></div>
|
|
<div id="viewerViews"></div>
|
|
<div id="viewerContent"></div>
|
|
</main>
|
|
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
|
|
<script>
|
|
|
|
function setTitle(title) {
|
|
$('#viewerTitle').html('<h1>' + title + '</h1>');
|
|
}
|
|
|
|
function setAuthor(author, url) {
|
|
if (author && url && author.length > 0 && url.length > 0) $('#viewerAuthor').html('By <a href="' + url + '">' + author + '</a><br>');
|
|
else if (author && author.length > 0) $('#viewerAuthor').html('By ' + author + '<br>');
|
|
else if (url && url.length > 0) $('#viewerAuthor').html('By <a href="' + url + '"><i>Author</i></a><br>');
|
|
else $('#viewerAuthor').html('');
|
|
}
|
|
|
|
function setViews(views) {
|
|
$('#viewerViews').html(views + ' times viewed<br><br>');
|
|
}
|
|
|
|
function setDescription(description) {
|
|
$('#viewerContent').html(description);
|
|
}
|
|
|
|
function setContent(content) {
|
|
$('#viewerContent').html(content);
|
|
}
|
|
|
|
|
|
</script>
|
|
</body>
|
|
|
|
</html> |