Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!doctype html>
- <html lang="en">
- <head>
- <!-- Required meta tags -->
- <meta charset="utf-8">
- <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
- <!-- Bootstrap CSS -->
- <link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
- <title>Corona</title>
- </head>
- <body>
- <audio src="img/ibupertiwi.mp3" autoplay="autoplay"></audio>
- <div class="pos-f-t">
- <div class="collapse" id="navbarToggleExternalContent">
- <div class="bg-dark p-4">
- <div id="list-example" class="list-group">
- <a class="list-group-item list-group-item-action" href="contact.html">
- <svg class="bi bi-envelope" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
- <path fill-rule="evenodd" d="M14 3H2a1 1 0 00-1 1v8a1 1 0 001 1h12a1 1 0 001-1V4a1 1 0 00-1-1zM2 2a2 2 0 00-2 2v8a2 2 0 002 2h12a2 2 0 002-2V4a2 2 0 00-2-2H2z" clip-rule="evenodd"/>
- <path fill-rule="evenodd" d="M.071 4.243a.5.5 0 01.686-.172L8 8.417l7.243-4.346a.5.5 0 01.514.858L8 9.583.243 4.93a.5.5 0 01-.172-.686z" clip-rule="evenodd"/>
- <path d="M6.752 8.932l.432-.252-.504-.864-.432.252.504.864zm-6 3.5l6-3.5-.504-.864-6 3.5.504.864zm8.496-3.5l-.432-.252.504-.864.432.252-.504.864zm6 3.5l-6-3.5.504-.864 6 3.5-.504.864z"/>
- </svg> contact</a>
- <a class="list-group-item list-group-item-action" href="support.html">
- <svg class="bi bi-award" width="1em" height="1em" viewBox="0 0 16 16" fill="currentColor" xmlns="http://www.w3.org/2000/svg">
- <path fill-rule="evenodd" d="M9.669.864L8 0 6.331.864l-1.858.282-.842 1.68-1.337 1.32L2.6 6l-.306 1.854 1.337 1.32.842 1.68 1.858.282L8 12l1.669-.864 1.858-.282.842-1.68 1.337-1.32L13.4 6l.306-1.854-1.337-1.32-.842-1.68L9.669.864zm1.196 1.193l-1.51-.229L8 1.126l-1.355.702-1.51.229-.684 1.365-1.086 1.072L3.614 6l-.25 1.506 1.087 1.072.684 1.365 1.51.229L8 10.874l1.356-.702 1.509-.229.684-1.365 1.086-1.072L12.387 6l.248-1.506-1.086-1.072-.684-1.365z" clip-rule="evenodd"/>
- <path d="M4 11.794V16l4-1 4 1v-4.206l-2.018.306L8 13.126 6.018 12.1 4 11.794z"/>
- </svg>support</a>
- </div>
- <div class="col-9">
- <div class="tab-content" id="v-pills-tabContent">
- <div class="tab-pane fade show active" id="v-pills-home" role="tabpanel" aria-labelledby="v-pills-home-tab"></div>
- <div class="tab-pane fade" id="v-pills-profile" role="tabpanel" aria-labelledby="v-pills-profile-tab"></div>
- <div class="tab-pane fade" id="v-pills-messages" role="tabpanel" aria-labelledby="v-pills-messages-tab">...</div>
- <div class="tab-pane fade" id="v-pills-settings" role="tabpanel" aria-labelledby="v-pills-settings-tab">...</div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <nav class="navbar navbar-dark bg-dark">
- <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarToggleExternalContent" aria-controls="navbarToggleExternalContent" aria-expanded="false" aria-label="Toggle navigation">
- <span class="navbar-toggler-icon"></span>
- </button>
- </nav>
- </div>
- <div class="jumbotron jumbotron-fluid bg-info text-white">
- <div class="container text-center" >
- <h1 class="display-4 ">Pantau Covid-19 </h1>
- <p class="lead">"yuk pantau virus covid-19 secara real time di indonesia"</p>
- </div>
- </div>
- <div class="alert alert-danger alert-dismissible fade show">
- <center>Pengumuman:</center>
- <p><center>Haloo sobat terima kasih atas kunjunganya di website ini mungkin ini adalah beberapa aturam di web ini antara lain :<p></center>
- <p><center>1.Pastikan anda terhubung jaringan internet (online).<br>
- 2.Data ini mungkin di ambil 1 hari yang lalu.<br>
- 3.Api kami menggunakan https://coronavirus-19-api.herokuapp.com<br>
- 4.Jika ingin melihat lebih update silahkan cek di web kementrian kesehatan.</br></center>
- <button type="button" class="close" data-dismiss="alert" aria-label="Close">
- <span aria-hidden="true">×</span>
- </button>
- </div>
- <h2><Center>Global dan Indonesia</h2></center>
- <style>
- .box {
- padding: 30px 40px;
- border-radius: 5px;
- }
- .foot {
- background: black;
- height: 50px;
- line-height: 50px;
- display: black;
- margin-top: 150px;
- font-family: cursive;
- }
- </style>
- <div class="container">
- <div class="row">
- <div class="col-md-4">
- <div class="bg-danger box text-white">
- <div class="row">
- <div class="col-md-6">
- <h5>Positif</h5>
- <h2 id="data-kasus">1234</h2>
- <h5>Orang</h5>
- </div>
- <div class="col-md-4">
- <img src="img/sad.svg" style="width: 100px;">
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="bg-warning box text-white">
- <div class="row">
- <div class="col-md-6">
- <h5>meninggal</h5>
- <h2 id="data-mati">1234</h2>
- <h5>Orang</h5>
- </div>
- <div class="col-md-4">
- <img src="img/cry.svg" style="width: 100px;">
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-4">
- <div class="bg-success box text-white">
- <div class="row">
- <div class="col-md-6">
- <h5>sembuh</h5>
- <h2 id="data-sembuh">1234</h2>
- <h5>Orang</h5>
- </div>
- <div class="col-md-4">
- <img src="img/happy.svg" style="width: 100px;">
- </div>
- </div>
- </div>
- </div>
- <div class="col-md-6 mt-3">
- <div class="bg-primary box text-white">
- <div class="row">
- <div class="col-md-6">
- <h2>Indonesia</h2>
- <h5 id="data-id">positif: 20 orang <br>meninggal: 12 orang <br> sembuh: 122 orang</h5>
- </div>
- <div class="col-md-4">
- <img src="img/indonesia.svg" style="width: 100px;">
- </div>
- </div>
- </div>
- </div>
- </div>
- <table class="table table-bordered mt-3">
- <thead>
- <th>No</th>
- <th>Nama Provinsi</th>
- <th>Positif</th>
- <th>Sembuh</th>
- <th>Meninggal</th>
- </thead>
- <tbody id="table-data">
- </tbody>
- </table>
- </div>
- <div class="foot">
- <center><p>CopyRight-<a href="https://web.facebook.com/steven.rhicard.12" >@Stevan_Richard</a></p></center>
- </div>
- <!-- Optional JavaScript -->
- <!-- jQuery first, then Popper.js, then Bootstrap JS -->
- <script src="https://code.jquery.com/jquery-3.4.1.slim.min.js" integrity="sha384-J6qa4849blE2+poT4WnyKhv5vZF5SrPo0iEjwBvKU7imGFAV0wwj1yYfoRSJoZ+n" crossorigin="anonymous"></script>
- <script src="https://cdn.jsdelivr.net/npm/popper.js@1.16.0/dist/umd/popper.min.js" integrity="sha384-Q6E9RHvbIyZFJoft+2mJbHaEWldlvI9IOYy5n3zV9zzTtmI3UksdQRVvoxMfooAo" crossorigin="anonymous"></script>
- <script src="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/js/bootstrap.min.js" integrity="sha384-wfSDF2E50Y2D1uUdj0O3uMBJnjuUD4Ih7YwaYd1iqfktj0Uod8GCExl3Og8ifwB6" crossorigin="anonymous"></script>
- <script src="https://code.jquery.com/jquery-3.4.1.min.js"></script>
- </body>
- </html>
- <script>
- $(document).ready(function(){
- //panggil semua fungsi data global //
- semuaData();
- dataNegara();
- dataProvinsi();
- function semuaData(){
- $.ajax({
- url : 'https://coronavirus-19-api.herokuapp.com/all',
- success : function(data){
- try{
- var json = data;
- var kasus = data.cases;
- var meninggal = data.deaths;
- var sembuh = data.recovered;
- $('#data-kasus').html(kasus);
- $('#data-mati').html(meninggal);
- $('#data-sembuh').html(sembuh);
- }catch{
- alert('eror kang sistemna');
- }
- }
- });
- }
- function dataNegara(){
- $.ajax({
- url : 'https://coronavirus-19-api.herokuapp.com/countries',
- success : function(data){
- try{
- var json = data;
- var html = [];
- if(json.length > 0){
- var i;
- for(i = 0; i < json.length; i++){
- var dataNegara = json[i];
- var namaNegara = dataNegara.country;
- if(namaNegara === 'Indonesia'){
- var kasus = dataNegara.cases;
- var mati = dataNegara.deaths;
- var sembuh = dataNegara.recovered;
- $('#data-id').html('positif :'+kasus+' orang <br> meninggal :'+mati+' orang <br> sembuh :'+sembuh+' orang <br>')
- }
- }
- }
- }catch{
- alert('eror kang sistemna');
- }
- }
- });
- }
- function dataProvinsi(){
- $.ajax({
- url : 'curl.php',
- type : 'GET',
- success : function(data){
- try{
- $('#table-data').html(data);
- }catch{
- alert('eror kang sistemna');
- }
- }
- });
- }
- });
- </script>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement