chrome style fix + improv animations + hover interactions
This commit is contained in:
parent
d7fa536c82
commit
3e508fd3a9
35
index.html
35
index.html
@ -8,6 +8,7 @@
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
||||
<div class="about"><a href="https://vvvvvvaria.org/logs/narrowcast/" target="_blank">back<span> ↗</span><br>↬ stage </a></div>
|
||||
|
||||
<div id="side" class="sidebar sidemin">
|
||||
@ -76,35 +77,31 @@
|
||||
-->
|
||||
|
||||
|
||||
<p class="note"> * move and resize the elements above by dragging their corners and sides *</p>
|
||||
<p class="note"> * move and resize the elements above by dragging their corners / sides and click on the page to set the position *</p>
|
||||
|
||||
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- button to hide side pannel -->
|
||||
|
||||
<!-- BBUTTON HIDE side pannel -->
|
||||
<script type="text/javascript">
|
||||
|
||||
<script type="text/javascript">
|
||||
|
||||
function fside() {
|
||||
function fside() {
|
||||
var element = document.getElementById("side");
|
||||
element.classList.toggle("sideminclicked");
|
||||
}
|
||||
</script>
|
||||
}
|
||||
</script>
|
||||
|
||||
<!-- drag and resize library: https://interactjs.io/docs/installation#cdn-streamlined -->
|
||||
<script src="interact.min.js"></script>
|
||||
<!-- script above same as <script src="https://cdnjs.cloudflare.com/ajax/libs/interact.js/1.2.6/interact.min.js"></script> -->
|
||||
|
||||
<!-- DRAG and RESIZE library -->
|
||||
|
||||
<!-- source: https://interactjs.io/docs/installation#cdn-streamlined -->
|
||||
<script src="interact.min.js"></script>
|
||||
<!-- script above same as https://cdnjs.cloudflare.com/ajax/libs/interact.js/1.2.6/interact.min.js -->
|
||||
|
||||
<!-- also found this other options:
|
||||
<!-- also found this other options:
|
||||
https://www.webcomponents.org/element/jifalops/drag-resize
|
||||
https://codepen.io/zz85/pen/gbOoVP -->
|
||||
|
||||
<script>
|
||||
interact('.resize-drag')
|
||||
<script>
|
||||
interact('.resize-drag')
|
||||
.draggable({
|
||||
onmove: window.dragMoveListener
|
||||
})
|
||||
@ -133,7 +130,7 @@
|
||||
target.textContent = event.rect.width + '×' + event.rect.height;
|
||||
});
|
||||
|
||||
function dragMoveListener (event) {
|
||||
function dragMoveListener (event) {
|
||||
var target = event.target,
|
||||
// keep the dragged position in the data-x/data-y attributes
|
||||
x = (parseFloat(target.getAttribute('data-x')) || 0) + event.dx,
|
||||
@ -148,7 +145,7 @@
|
||||
target.setAttribute('data-x', x);
|
||||
target.setAttribute('data-y', y);
|
||||
}
|
||||
</script>
|
||||
</script>
|
||||
|
||||
|
||||
</body>
|
||||
|
@ -124,7 +124,7 @@ button.minimize{
|
||||
.sidetop {
|
||||
height: 45vh;
|
||||
font-size: 1.2rem;
|
||||
justify-content: end;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.sidetop p {
|
||||
@ -191,12 +191,12 @@ button.minimize{
|
||||
|
||||
.resize-drag {
|
||||
width: 620px;
|
||||
padding: 1.4rem 0.4rem 0.4rem 1.4rem;
|
||||
padding: 0.4rem 1.8rem 1.8rem 0.4rem;
|
||||
margin: 1rem;
|
||||
touch-action: none;
|
||||
/* This makes things *much* easier */
|
||||
box-sizing: border-box;
|
||||
box-shadow: inset 0.6rem 0.2rem 0.9rem #ffe4fd;
|
||||
box-shadow: inset -0.6rem 0rem 0.8rem #ffe4fd;
|
||||
border-radius: 0.1rem 0.1rem 0.2rem 0.1rem;
|
||||
position: relative;
|
||||
}
|
||||
.drag::before, .resize-drag::before, .live > *::before {
|
||||
@ -212,7 +212,8 @@ button.minimize{
|
||||
display: block;
|
||||
}
|
||||
|
||||
.resize-drag {
|
||||
.resize-drag:hover {
|
||||
box-shadow: 0.2rem 0.2rem 0.6rem #ffe4fd;
|
||||
animation: corners 8s infinite alternate;
|
||||
-o-animation: corners 8s infinite alternate;
|
||||
-moz-animation: corners 8s infinite alternate;
|
||||
@ -221,29 +222,31 @@ button.minimize{
|
||||
|
||||
@keyframes corners {
|
||||
0% {
|
||||
border-radius: 1% 0% 0% 0% / 45% 0% 0% 0%;
|
||||
-webkit-border-radius: 1% 0% 0% 0% / 45% 0% 0% 0%;
|
||||
border-radius: 0.1rem 0.1rem 0.2rem 0.1rem;
|
||||
-webkit-border-radius: 0.1rem 0.1rem 0.2rem 0.1rem;
|
||||
}
|
||||
70% {
|
||||
border-radius: 2rem 0rem 1rem 2rem;
|
||||
-webkit-border-radius: 2rem 0rem 1rem 2rem;
|
||||
}
|
||||
100% {
|
||||
border-radius: 0rem 4rem 2rem 1rem / 0rem 1rem 2rem 0rem;
|
||||
-webkit-border-radius: 0rem 4rem 2rem 1rem / 0rem 1rem 2rem 0rem; }
|
||||
@-webkit-keyframes corners {
|
||||
0% {
|
||||
border-radius: 1% 0% 0% 0% / 45% 0% 0% 0%;
|
||||
-webkit-border-radius: 1% 0% 0% 0% / 45% 0% 0% 0%;
|
||||
}
|
||||
70% {
|
||||
border-radius: 2rem 0rem 1rem 2rem;
|
||||
-webkit-border-radius: 2rem 0rem 1rem 2rem;
|
||||
}
|
||||
100% {
|
||||
20% {
|
||||
border-radius: 0rem 4rem 2rem 1rem / 0rem 1rem 2rem 0rem;
|
||||
-webkit-border-radius: 0rem 4rem 2rem 1rem / 0rem 1rem 2rem 0rem;
|
||||
}
|
||||
100% {
|
||||
border-radius: 1% 0% 0% 0% / 45% 0% 0% 0%;
|
||||
-webkit-border-radius: 1% 0% 0% 0% / 45% 0% 0% 0%;
|
||||
}
|
||||
}
|
||||
@-webkit-keyframes corners {
|
||||
0% {
|
||||
border-radius: 2rem 0rem 1rem 2rem;
|
||||
-webkit-border-radius: 2rem 0rem 1rem 2rem;
|
||||
}
|
||||
20% {
|
||||
border-radius: 0rem 4rem 2rem 1rem / 0rem 1rem 2rem 0rem;
|
||||
-webkit-border-radius: 0rem 4rem 2rem 1rem / 0rem 1rem 2rem 0rem;
|
||||
}
|
||||
100% {
|
||||
border-radius: 1% 0% 0% 0% / 45% 0% 0% 0%;
|
||||
-webkit-border-radius: 1% 0% 0% 0% / 45% 0% 0% 0%;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user