anki/ts/card-info/card-info.html
Damien Elmes d668ac8f7f fix card info layout & test code
Closes #1479

Related: #1470
2021-11-12 16:24:08 +10:00

24 lines
866 B
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" id="viewport" content="width=device-width" />
<link href="card-info-base.css" rel="stylesheet" />
<link href="card-info.css" rel="stylesheet" />
<script src="../js/vendor/bootstrap.bundle.min.js"></script>
<script src="card-info.js"></script>
</head>
<body>
<div id="main"></div>
<script>
// use #testXXXX where XXXX is card ID to test
if (window.location.hash.startsWith("#test")) {
const cid = parseInt(window.location.hash.substr("#test".length), 10);
const cardInfo = anki.cardInfo(document.getElementById("main"));
cardInfo.then((c) => c.$set({ cardId: cid, includeRevlog: true }));
}
</script>
</body>
</html>