ref: styling

This commit is contained in:
relikd
2024-02-29 03:20:02 +01:00
parent 854716c901
commit 9d7f82ff10
3 changed files with 6 additions and 6 deletions

View File

@@ -8,11 +8,12 @@
<title>IPA Archive</title>
<link rel="shortcut icon" href="./favicon.ico">
<link rel="apple-touch-icon" sizes="180x180" href="./apple-touch-icon.png">
<script src='script.js'></script>
<link rel="stylesheet" href="style.css">
<script src='script.js'></script>
</head>
<body>
<button style="float: right; margin: 0 16px" onclick="randomIPA()">Random</button>
<h1>IPA Archive</h1>
<form onsubmit="event.preventDefault(); searchIPA(); return false;" autocomplete="off">
<input id="page" hidden>
@@ -29,7 +30,6 @@
<option value="4">Watch</option>
</select></label>
<button type="submit">Search</button>
<button type="button" onclick="randomIPA()">Random</button>
</form>
<div id="content">JavaScript disabled?</div>

View File

@@ -189,7 +189,7 @@ function randomIPA(specificId) {
}
const entry = entryToDict(DB[idx]);
const output = document.getElementById('content');
output.innerHTML = entriesToStr('.full', [idx]);
output.innerHTML = '<h3>Random:</h3>' + entriesToStr('.full', [idx]);
output.firstElementChild.className += ' single';
output.innerHTML += renderTemplate(getTemplate('.randomAction'), { $IDX: idx });
@@ -317,11 +317,11 @@ function printIPA(offset) {
if (!offset) { offset = 0; }
const total = DB_result.length;
var content = '<p>Results: ' + total;
var content = '<h3>Results: ' + total;
if (previousSearch) {
content += ' -- Go to: <a onclick="restoreSearch()">previous search</a>';
}
content += '<p>';
content += '</h3>';
const page = Math.floor(offset / PER_PAGE);
const pages = Math.ceil(total / PER_PAGE);
if (pages > 1) {

View File

@@ -76,8 +76,8 @@ h4 {
width: initial;
}
.randomAction {
text-align: right;
margin: 8px 20px;
float: right;
}
.randomAction button {
margin-left: 8px;