Showing posts with label Squircles with audio. Show all posts
Showing posts with label Squircles with audio. Show all posts

Memasang Kode Circlarium with Audio
Login ke akun blog klik tombol blog baru, buat satubuah link baru   
kemudian beri nama sesuai fungsi,  klik Edit HTML pada link baru tersebut, 
hapus semua kode template ganti dengan kode blank template, yang tersedia pada sumber  berikut :  Get Blank Template.   edit background warna sesuai keinginan klik simpan selesai.
Kemudian klik entri halaman baru HTML pada link tersebut.
copy kode dibawah ini, pastekan kedalam halaman baru tersebut dan klik simpan selesai
<style class="Mys2010-styles">
body {);color:red;height:100%;overflow:hidden;}
header {
  -o-transition-duration: 0.3s;
  -moz-transition-duration: 0.3s;
  -webkit-transition-duration: 0.3s;
  transition-duration: 0.3s;
  padding:  0px 0;
  position: fixed;
  top: -4px;
  width: 100%;
text-align: center;
font-size:  6px;
background: linear-gradient(270deg,  #FF0000, #660099, #FFFF00, #660099,#fff, #B20000, #fff, #660099, #FFFF00, #660099,#FF0000);
  border-bottom: 3px solid #dad;  
}
.ap {
position: fixed;
right: 0;
bottom: 0;
left: 0;
height: 60px;
margin: auto;
font-family: Arial, sans-serif;
font-size: 10px;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
text-align: center;
font-size:  11px;
background: linear-gradient(270deg,  #fff, #660099, #fff, #660099,#f00, #fff, #f00, #660099, #fff, #660099,#fff);
border-top: 2px solid #fff;
z-index: 9999;
} 
h2 {
padding: 15px; 
background: -webkit-linear-gradient(transparent 10%, goldenrod 50%, transparent 90%); 
background: linear-gradient(transparent 10%, #009999 50%, transparent 90%); 
} 
#M-2010, #teks, #posisi, #dibawah  {
    position: absolute;
    font-size: 11px;
    margin: 2px
}
#M-2010, #teks div {
    text-decoration: underline;
    cursor: pointer
}
#teks, #posisi {
    text-align: right;
    right:  50px;
}
#teks, #dibawah {
    text-align: left;
    left:  50px;
}
 #dibawah, #posisi {
    bottom: 17px;
} 
body {
  background: linear-gradient(270deg, #9191FE,#222, #990099, #222, #9191FE, #660099, #660099, #660099, #222, #660099, #660099,#222 , #333, #444,#111, #111, #111,#111, #111, #111, #111, #111, #111, #111,#111 , #111, #111, #111, #111, #111, #444, #333,#222, #660099, #660099, #222, #660099, #660099,#660099 , #9191FE, #222, #990099, #222, #9191FE);
}
body::before {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  left: 0; 
background-image: linear-gradient(bottom, rgba(255,255,255,.3) 26%, rgb(188,52,255) 63%, rgba( 0, 0, 0, 0.8 ) 91%);
background-image: -o-linear-gradient(bottom, rgba(255,255,255,.3) 26%, rgb(188,52,255) 63%, rgba( 0, 0, 0, 0.8 ) 91%);
background-image: -moz-linear-gradient(bottom, rgba(255,255,255,.3) 26%, rgb(188,52,255) 63%, rgba( 0, 0, 0, 0.8 ) 91%);
background-image: -webkit-linear-gradient(bottom, rgba(255,255,255,.3) 26%, rgb(188,52,255) 63%, rgba( 0, 0, 0, 0.8 ) 91%);
background-image: -ms-linear-gradient(bottom, rgba(255,255,255,.3) 26%, rgb(188,52,255) 63%, rgba( 0, 0, 0, 0.8 ) 91%);
  -webkit-animation: overlay infinite 12s;
          animation: overlay infinite 12s;
  content: '';
}
@-webkit-keyframes transform {
  0%, 16% {
    opacity: 0;
    -webkit-transform: translateY(-50%) rotateX(-90deg);
            transform: translateY(-50%) rotateX(-90deg);
  }
  18% {
    opacity: 1;
  }
  40% {
    opacity: 1;
    -webkit-transform: translateY(-50%) rotateX(0deg);
            transform: translateY(-50%) rotateX(0deg);
  }
}
@keyframes transform {
  0%, 16% {
    opacity: 0;
    -webkit-transform: translateY(-50%) rotateX(-90deg);
            transform: translateY(-50%) rotateX(-90deg);
  }
  18% {
    opacity: 1;
  }
  40% {
    opacity: 1;
    -webkit-transform: translateY(-50%) rotateX(0deg);
            transform: translateY(-50%) rotateX(0deg);
  }
}
@-webkit-keyframes overlay {
  0% {
    opacity: .5;
  }
  18%, 81% {
    opacity: 0;
  }
  92%, 100% {
    opacity: .5;
  }
}
@keyframes overlay {
  0% {
    opacity: .5;
  }
  18%, 81% {
    opacity: 0;
  }
  92%, 100% {
    opacity: .5;
  }
}
@-webkit-keyframes opacity {
  0%, 4% {
    opacity: 0;
  }
  18%, 81% {
    opacity: 1;
  }
  92%, 100% {
    opacity: 0;
  }
}
@keyframes opacity {
  0%, 4% {
    opacity: 0;
  }
  18%, 81% {
    opacity: 1;
  }
  92%, 100% {
    opacity: 0;
  }
}
.shadow-top:after { 
    content: " ";
    box-shadow: 0 0 200px 80px #FFFF00;    
}
.shadow-top:before {  
    content: " ";
    box-shadow: 0 0 200px 250px #0033CC;    
}
#M2010-shadow  { 
margin:-50px;
box-shadow: 0 0 150px 80px  #FF0000;  
}
.shadow1:before,.shadow1:after {
    z-index:-1;
    position:absolute;
    content: " ";
    bottom:25px;
    left:10px;
    width:50%;     
    max-width:110px;
    box-shadow: 0 0 200px 90px #FFFF00;  
    -webkit-transform:rotate(-8deg);
    -moz-transform:rotate(-8deg);
    -o-transform:rotate(-8deg);
    -ms-transform:rotate(-8deg);
    transform:rotate(-8deg);
}
.shadow1:after {
    -webkit-transform:rotate(8deg);
    -moz-transform:rotate(8deg);
    -o-transform:rotate(8deg);
    -ms-transform:rotate(8deg);
    transform:rotate(8deg);
    right:10px;
    left:auto;
}
/*end*/
  body {
  margin-top:7px; 
  text-align: center; 
}
/*end*/
.loader {
  position: absolute;
  top: 0;
  bottom:40px;
  left:560px;   
  margin: auto;
  width: 220px;
  height:220px;
}
.loader {
  border-color: #bd313b transparent;
  border-style: solid;
  border-width:8px;
  border-radius: 50%;
  transform: rotate(1deg);
  animation: spin 100ms linear infinite, color 200ms linear infinite;
}
@keyframes spin {
  from {
    transform: rotate(0deg);
  }
  to {
    transform: rotate(360deg);
  }
}
@keyframes color {
  0% {
    border-color: #bd313b transparent;
  }
  25% {
    border-color: #6d31bd transparent;
  }
  50% {
    border-color: #31bdb3 transparent;
  }
  75% {
    border-color: #81bd31 transparent;
  }
  100% {
    border-color: #bd313b transparent;
  }
}
img {
  position: absolute;
  top: 180px;
  left: 573px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid #B26B00;
  width: 204px;
  height: 204px;
  z-index: 3;
  opacity: 1;
  animation: photo-ani 17s forwards;
}
/* Keyframes */
@keyframes line-ani {
  to {
    stroke-dashoffset: 0;
  }
}
@keyframes photo-ani {
  0% {
    opacity: 0;
  }
  50% {
    opacity: 0;
  }
  100% {
    opacity: 1;
  }
}
</style>
<div class="loader">
</div>
<div class="img">
<img src="https://sites.google.com/site/pelajaranku1/fileku/logo-mys2010.png"/> 
 <div align="center">
<div class="shadow-top">
</div>
<div class="shadow1">
</div>
<div id="M2010-shadow">
</div>
<header>
<a href="http://sample-mys2010.blogspot.co.id/2016/08/squircles-with-audio.html" target="_blank" title="Mari Belajar">
<h2>
<span style="color:orange; font-size: 10pt">LET'S STUDY</a>  </h2>
</a>  
</div>
</header>
<div class="ap" id="ap">
<div align="center">
<div id="dibawah">
<span style="font-family: arial ; font-size: 12px; color:#80C8FE;"> EDITED BY. <a href="https://sites.google.com/site/sitescode2/code/Squircle-with-Audio-M2010.css"title="Mari Belajar"><span style="color: #FFFF00; font-size: 14px;">&nbsp; M - 2010 </a>&nbsp; DOWNLOAD </a> 
</div>
<div id="posisi">
<span style="font-family: arial ; font-size: 12px; color:#80C8FE;"> COPYRIGHT <a href="http://codepen.io/Myscript2010" target="_blank" title="Mari Belajar"><span style="color: #FFFF00; font-size: 14px;">&nbsp; &copy; - 2016 </a>&nbsp; CODEPEN </a> 
</div>
<h2>
<audio id="mys2010" src="https://sites.google.com/site/safe50534/lagu/Amos-Lee-Violin-M2010s.mp3"controls="controls"></audio></h2>
</a></div>
</div>
<script src="https://sites.google.com/site/safe50534/code/Squircles-M2010.js">
</script>
<script src='https://sites.google.com/site/safe50534/code/Squircles2-M2010.js'>
</script>
<ul class="mys2010-list">
<script src='//assets.codepen.io/assets/common/stopExecutionOnTimeout.js?t=1'>
</script>    
<script src='//cdnjs.cloudflare.com/ajax/libs/jquery/2.1.3/jquery.min.js'>
</script>   
<link rel='stylesheet prefetch' href='http://cdn.jsdelivr.net/mediaelement/2.13.1/mediaelementplayer.min.css'>    
<script src='http://cdn.jsdelivr.net/mediaelement/2.13.1/mediaelement-and-player.min.js'>
</script>  
<script src="//assets.codepen.io/assets/common/stopExecutionOnTimeout-f961f59a28ef4fd551736b43f94620b5.js"></script>   
<script>
      var c = new Sketch.create({
        fullscreen: false,
        width: 504,
        height: 504,
        interval: 3
    }), squircles = [], width = 10, height = 90, space = 22, rows = 23, cols = 23;
var Squircle = function (x, y, alpha) {
    this.x = x;
    this.y = y;
    this.h = 0;
    this.s = '90%';
    this.l = '30%';
    this.a = alpha;
    this.initialDelay = 0;
    this.rounding = true;
    this.rounded = 0;
    this.initialPause = 3;
    this.pause = this.initialPause;
    this.update = function () {
        if (this.initialDelay == 0) {
            if (this.rounded >= width / 2 && this.rounding || this.rounded <= 0 && !this.rounding) {
                this.pause = this.initialPause;
                if (this.rounding) {
                    this.h = this.h >= 360 ? 45 : this.h + 45;
                }
                this.rounding ^= true;
            } else if (this.pause > 0) {
                this.pause--;
            }
            if (this.pause == 0) {
                this.rounded += this.rounding ? 1 : -1;
            }
        } else {
            this.initialDelay--;
        }
    };
    this.draw = function () {
        c.fillStyle = 'hsla(' + this.h + ',' + this.s + ',' + this.l + ',' + this.a;
        c.roundRect(this.x, this.y, width, height, this.rounded).fill();
    };
};
c.roundRect = function (x, y, w, h, r) {
    if (w < 2 * r)
        r = w / 2;
    if (h < 2 * r)
        r = h / 2;
    this.beginPath();
    this.moveTo(x + r, y);
    this.arcTo(x + w, y, x + w, y + h, r);
    this.arcTo(x + w, y + h, x, y + h, r);
    this.arcTo(x, y + h, x, y, r);
    this.arcTo(x, y, x + w, y, r);
    this.closePath();
    return this;
};
function distance(obj1, obj2) {
    var dx = obj1.x - obj2.x, dy = obj1.y - obj2.y;
    return sqrt(dx * dx + dy * dy);
}
c.setup = function () {
    var alt = false;
    for (var r = 0; r < rows; r++) {
        if (window.CP.shouldStopExecution(2)) {
            break;
        }
        for (var c = 0; c < cols; c++) {
            if (window.CP.shouldStopExecution(1)) {
                break;
            }
            squircles.push(new Squircle(c * width + c * space, r * height + r * space, alt ? 0.5 : 1));
            alt ^= true;
        }
        window.CP.exitedLoop(1);
    }
    window.CP.exitedLoop(2);
    var sq = squircles.length, center = squircles[floor(sq / 2)];
    while (sq--) {
        var me = squircles[sq];
        me.initialDelay = ceil(distance(me, center) / (width / 2));
    }
};
c.update = function () {
    var s = squircles.length;
    while (s--) {
        if (window.CP.shouldStopExecution(3)) {
            break;
        }
        squircles[s].update();
    }
    window.CP.exitedLoop(3);
};
c.draw = function () {
    var s = squircles.length;
    while (s--) {
        if (window.CP.shouldStopExecution(4)) {
            break;
        }
        squircles[s].draw();
    }
    window.CP.exitedLoop(4);
};
</script>
<script>
      $(function () {
$('video,audio').mediaelementplayer({
success: function (mediaElement, domObject) {
var audio_src = $('li.current').attr('data-url');
mediaElement.setSrc(audio_src);
mediaElement.addEventListener('ended', function (e) {
mys2010PlayNext(e.target);
}, false);
},
keyActions: []
});
$('.mys2010-list li').click(function () {
$(this).addClass('current').siblings().removeClass('current');
var audio_src = $(this).attr('data-url');
$('audio#mys2010:first').each(function () {
this.player.pause();
this.player.setSrc(audio_src);
this.player.play();
});
});
});
function mys2010PlayNext(currentPlayer) {
if ($('.mys2010-list li.current').length > 0) {
var current_item = $('.mys2010-list li.current:first');
var audio_src = $(current_item).next().text();
$(current_item).next().addClass('current').siblings().removeClass('current');
console.log('if ' + audio_src);
} else {
var current_item = $('.mys2010-list li:first');
var audio_src = $(current_item).next().text();
$(current_item).next().addClass('current').siblings().removeClass('current');
console.log('elseif ' + audio_src);
}
if ($(current_item).is(':last-child')) {
$(current_item).removeClass('current');
} else {
currentPlayer.setSrc(audio_src);
currentPlayer.play();
}}    
</script>   
Audio Code by. Jereme Causing
Design Code is Edited by. Mys2010 on Codepen
If you want to directly copy  and  paste you canDownload Here Squircle with audio