mirror of https://github.com/jlelse/teleposter
58 lines
1.4 KiB
HTML
58 lines
1.4 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://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/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 != "" && url != "") $('#viewerAuthor').html('<a href="' + url + '">' + author + '</a><br>');
|
|
else if (author && author != "") $('#viewerAuthor').html(author + '<br>');
|
|
if (url && url != "") $('#viewerAuthor').html('<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> |