next step pagedjs

master
grgr 3 years ago
parent 9633ececf0
commit b8a990686d

@ -2,8 +2,18 @@
const reference = document.getElementById("reference"); const reference = document.getElementById("reference");
const contributionsList = document.getElementById("contributions"); const contributionsList = document.getElementById("contributions");
const pagedjs = document.createElement('script')
pagedjs.src = 'https://unpkg.com/pagedjs/dist/paged.polyfill.js'
function fetchContents(){
window.addEventListener('load',()=>{
fetchContents()
document.getElementsByTagName('head')[0].appendChild(pagedjs)
})
function fetchContents(){
fetch("https://hub.xpub.nl/soupboat/atlas-api/contributions") fetch("https://hub.xpub.nl/soupboat/atlas-api/contributions")
.then((response) => response.json()) .then((response) => response.json())
.then((data) => populateContributions(data)); .then((data) => populateContributions(data));

@ -5,11 +5,11 @@
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" />
<script src="contents.js" defer></script> <script src="contents.js" defer></script>
<!-- <script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js" defer ></script> <!-- <script src="https://unpkg.com/pagedjs/dist/paged.polyfill.js" defer ></script>-->
<link href="interface.css" rel="stylesheet" type="text/css" /> --> <link href="interface.css" rel="stylesheet" type="text/css" />
<link rel="stylesheet" href="style.css" /> <link rel="stylesheet" href="style.css" />
<!-- <link rel="stylesheet" href="print.css"/> --> <link rel="stylesheet" href="print.css"/>
<title>Emergent Opera</title> <title>Emergent Opera</title>
</head> </head>
<body> <body>

@ -9,6 +9,8 @@
} }
@media screen {
body, html{ body, html{
@ -111,3 +113,4 @@ dd {
} }
}
Loading…
Cancel
Save