-
Notifications
You must be signed in to change notification settings - Fork 0
/
material.html
109 lines (97 loc) · 3.77 KB
/
material.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<title id="pageTitle">Pertemuan</title> <!-- Mengubah judul menjadi "Pertemuan" -->
<!-- Reset and Base Styles -->
<link rel="stylesheet" href="dist/reset.css">
<link rel="stylesheet" href="dist/reveal.css">
<link rel="stylesheet" href="dist/theme/black.css">
<!-- Syntax Highlighting Theme -->
<link rel="stylesheet" href="plugin/highlight/monokai.css">
<!-- Custom Styles -->
<style>
.reveal {
font-size: 1.2em; /* Base font size */
}
section {
line-height: 1.6; /* Improve readability */
margin: 0 auto;
text-align: justify;
overflow-wrap: break-word;
max-height: 100%; /* Maksimalkan tinggi konten */
overflow-y: auto; /* Aktifkan scroll jika konten melebihi batas */
padding: 20px; /* Tambahkan padding agar nyaman dibaca */
}
table {
width: 90%; /* Ensure tables fit slide */
margin: 0 auto;
border-collapse: collapse;
}
th, td {
border: 1px solid #ddd;
padding: 8px;
text-align: left;
}
th {
background-color: #333;
color: white;
}
ul, ol {
margin-left: 20px;
}
img {
max-width: 100%;
height: auto; /* Ensure images fit */
}
</style>
</head>
<body>
<div class="reveal">
<div class="slides">
<!-- Membaca file markdown eksternal -->
<section id="markdownSection" data-separator="^---$" data-separator-vertical="^\n\n"></section>
</div>
</div>
<!-- Reveal.js Core Script -->
<script src="dist/reveal.js"></script>
<!-- Plugins -->
<script src="plugin/markdown/markdown.js"></script>
<script src="plugin/highlight/highlight.js"></script>
<script src="plugin/notes/notes.js"></script>
<script>
// Fungsi untuk mendapatkan parameter dari URL
function getParameter(name) {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get(name);
}
// Fungsi untuk mengubah judul dan markdown
function setUpPresentation() {
const meetingNumber = getParameter("pertemuan") || "1"; // Gunakan parameter pertemuan atau default "1"
const markdownFile = getParameter("materi") || "Pertemuan_1.md"; // Gunakan parameter materi atau default
// Set the page title dynamically as "Pertemuan <nomor>"
document.getElementById("pageTitle").innerText = "Pertemuan " + meetingNumber;
// Set the markdown file to load
document.getElementById("markdownSection").setAttribute("data-markdown", markdownFile);
}
// Set Up the Presentation based on URL parameters
setUpPresentation();
// Initialize Reveal.js
Reveal.initialize({
width: 960, // Base width
height: 700, // Base height
margin: 0.1, // Slide margin
minScale: 0.5, // Minimum scale
maxScale: 1.5, // Maximum scale
hash: true, // Enable URL hash
plugins: [RevealMarkdown, RevealHighlight, RevealNotes], // Load plugins
slideNumber: 'c/t', // Display current slide / total slides
markdown: {
smartypants: true, // Enable smart quotes
notesSeparator: '^Note:' // Define notes separator
}
});
</script>
</body>
</html>