mirror of
https://github.com/ivabus/www
synced 2024-11-22 15:25:06 +03:00
Pulsating 'play button' for code animations
This commit is contained in:
parent
79aa09ac76
commit
3fbb90feba
2 changed files with 76 additions and 2 deletions
|
@ -291,13 +291,12 @@
|
|||
</div>
|
||||
<div class="terminal-content p-xl-5 p-lg-5 p-md-5 p-sm-2 p-3">
|
||||
<code id="terminal-output-2">
|
||||
<span class="light-gray">Click to run demo...</span>
|
||||
{{- partial "play-btn" -}}
|
||||
</code>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
const commands2 = [
|
||||
{ input: "$ tea bun create next ./app<br>", output: `<span class="dark-gray">[package.json] Detected React - added "react-refresh"<br>
|
||||
|
|
75
src/layouts/partials/play-btn.html
Normal file
75
src/layouts/partials/play-btn.html
Normal file
|
@ -0,0 +1,75 @@
|
|||
<div class="play-btn">
|
||||
<i class="icon-play-icon"></i>
|
||||
</div>
|
||||
|
||||
<style>
|
||||
|
||||
.icon-play-icon{
|
||||
position: relative !important;
|
||||
font-size: 22px;
|
||||
left:3px;
|
||||
top:3px;
|
||||
}
|
||||
|
||||
.play-btn{
|
||||
width: 100px;
|
||||
height: 100px;
|
||||
background-color: #8000ff !important;
|
||||
border-radius: 60px;
|
||||
display: block;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
margin-left:auto;
|
||||
margin-right:auto;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.pulse-ring {
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 100px;
|
||||
border: 4px solid #8000ff;
|
||||
position: absolute;
|
||||
top: -50px;
|
||||
left: -50px;
|
||||
opacity: 0;
|
||||
animation: pulsate 2s ease-out;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
@keyframes pulsate {
|
||||
0% { transform: scale(0); opacity: 1; }
|
||||
100% { transform: scale(1); opacity: 0; }
|
||||
}
|
||||
|
||||
.play-btn:before {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 60px;
|
||||
border: 4px solid #8000ff;
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
animation: pulsate 2s ease-out;
|
||||
animation-iteration-count: infinite;
|
||||
}
|
||||
|
||||
.play-btn:after {
|
||||
content: "";
|
||||
display: block;
|
||||
width: 200px;
|
||||
height: 200px;
|
||||
border-radius: 100px;
|
||||
border: 4px solid #8000ff;
|
||||
position: absolute;
|
||||
top: -50px;
|
||||
left: -50px;
|
||||
animation: pulsate 2s ease-out;
|
||||
animation-iteration-count: infinite;
|
||||
animation-delay: 0.5s;
|
||||
}
|
||||
|
||||
</style>
|
Loading…
Reference in a new issue