forked from diosamuel/sekretaris
-
Notifications
You must be signed in to change notification settings - Fork 0
/
belajar.html
89 lines (85 loc) · 3.25 KB
/
belajar.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
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Sekretaris</title>
<link rel="stylesheet" type="text/css" href="css/bootstrap.min.css">
</head>
<body>
<div id="app">
<div class="jumbotron d-flex">
<img src="logostransparent.png" style="height:5em;width:5em">
<h1 style="position:relative;top:10px;margin-left:1em">Sekretaris</h1>
</div>
<div class="container">
<h2>{{katanya}}</h2>
<hr>
<h4>{{date}}</h4>
<p>Tekan tombol + dipojok bawah</p>
<br>
<br>
<div v-if="dataHariIni.length<1">
<h3>Kosong :(</h3>
</div>
<div class="card" v-for="(len,i) in dataHariIni">
<div class="card-header bg-light border border-primary">
<h2 class="text-primary">Pelajaran ke {{i+1}} : {{ dataHariIni[i].class }}</h2>
<br>
<button @click="deleteMapel(i)" class="btn btn-small btn-outline-danger">Hapus</button>
</div>
<div class="card-body">
<p>Mata Pelajaran</p>
<select class="form-control col-md-6" v-model="dataHariIni[i].class">
<option v-for="mapel in pelajaran.map(i=>i.toUpperCase()).sort()">{{mapel}}</option>
</select>
<br>
<p>Tugas</p>
<div>
<div class="form-check">
<input class="form-check-input" type="radio" :name=i :id="'for'+i" value="false" checked v-model="dataHariIni[i].tugas">
<label class="form-check-label" :for="'for'+i">
Tidak ada
</label>
</div>
<div class="form-check">
<input class="form-check-input" type="radio" :name=i :id="'_for'+i" value="true" v-model="dataHariIni[i].tugas">
<label class="form-check-label" :for="'_for'+i">
Ada
</label>
</div>
<textarea v-if="dataHariIni[i].tugas=='true'" v-model="dataHariIni[i].judulTugas" placeholder="latihan soal..." class="form-control col-md-6"></textarea>
</div>
<br>
<p>Keterangan</p>
<textarea class="form-control" style="height:200px" placeholder="Membahas..." v-model="dataHariIni[i].ket"/></textarea>
</div>
</div>
<div v-if="dataHariIni.length>0" class="mt-5 mb-5">
<button class="btn btn-info" @click="save">Kirim Ke Whatsapp</button>
<button class="btn btn-info" onclick="copythe()">Copy to Clipboard</button>
<div class="container mb-5 mt-5">
<textarea class="form-control" style="height:500px" v-model='pesanBelajar' id="myInput" placeholder="Kalau tombol Whatsapp error, salin ini yak atau teken copy to clipboard ">
</textarea>
</div>
</div>
</div>
<div style="position:fixed;bottom:0;right:0">
<button class="btn btn-primary mb-2 mr-2" style="border-radius:100%;width:4em;height:4em;" @click="tambah"><h2>+</h2></button>
</div>
</div>
</body>
<script>
function copythe() {
var copyText = document.getElementById("myInput");
copyText.select();
copyText.setSelectionRange(0, 99999);
document.execCommand("copy");
alert('Copied!')
}
</script>
<script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.29.1/moment.min.js"></script>
<script type="text/javascript" src="https://momentjs.com/downloads/moment-with-locales.js"></script>
<script type="text/javascript" src="js/vue.js"></script>
<script type="text/javascript" src="js/main.js"></script>
</html>