diff --git a/firebase.md b/firebase.md index 97a49aa..b164b02 100644 --- a/firebase.md +++ b/firebase.md @@ -758,6 +758,13 @@ background-image: linear-gradient( 109.6deg, rgba(113,14,51,0.83) 15.2%, rgba(21 ## Animations +Vue Animations: + +### transitions + +You can use Animista css animations with Vue's transition element: + + ### Router Animations @@ -815,6 +822,57 @@ You can then in any component add any of the animations from the documentation: To use with nuxt install as a plugin: +#### Custom animations with AOS library + +Custom Cubic-bezier easings: +Custom easings: + +You can use custom animations with the AOS library. For example, we can use Animista. + +The base template is: + +```scss +[data-aos="test-roll"] { + // initial here + transition-property: transform, opacity, filter; + &.aos-animate { + // final here + } +} +``` + +In Animista you should copy the keyframes. Take the 0% content and put it as the intitial content in the above template. + +The the 100% content and place it in the final content in the above template. + +You need to update the `transition-property` with the elements you are animating from one state to another. + +Using custom easings is straightforward. + +Create the scss: + +```scss +[data-aos] { + body[data-aos-easing="new-easing"] &, + &[data-aos][data-aos-easing="new-easing"] { + transition-timing-function: cubic-bezier(0.25, 1, 0.57, 0.55); + } +} +``` + +Then apply in the html: + +```html + +``` + ## Alternative to fill-height Using `fill-height` prop on a `` can result in a bug where the width of the container doesn't reach all the way to the right hand side. @@ -834,6 +892,35 @@ set a default which applies to all, set the one you want to apply for upwards document setting a default cols (check this with triangle) +## Dynamic Mobile Layouts + +### Cols + + + +You can control how items are rendered based on the viewport width. For example, you can have a page appear across 2 columns on desktop, but display a single column on mobile : + +One way is to use the the viewport cols props for ``: + +```html + +``` + +This will set a default of 12, and then use 6 on sm and anything above it. + +You can find all props for the dynamic cols in + +If you set a row to use more than 12 columns, it will overfill on to the next line. + + + + + ## CSS Spacing diff --git a/src/views/Triangle.vue b/src/views/Triangle.vue index 04123cf..22f949b 100644 --- a/src/views/Triangle.vue +++ b/src/views/Triangle.vue @@ -27,6 +27,7 @@ color="rgb(0, 0, 0, 0)" class="d-flex align-center justify-center flex-column pa-6" data-aos="zoom-in" + data-aos-duration="3000" > Learn more @@ -57,7 +58,9 @@ flat color="rgb(0, 0, 0, 0)" class="d-flex align-center justify-center flex-column pa-6" - data-aos="zoom-in" + data-aos="test-roll" + data-aos-duration="3000" + data-aos-easing="new-easing" > See more @@ -112,4 +115,27 @@ export default { h1 { color: white; } + +[data-aos="test-roll"] { + -webkit-transform: translateX(-1000px) rotate(-720deg); + transform: translateX(-1000px) rotate(-720deg); + -webkit-filter: blur(50px); + filter: blur(50px); + opacity: 0; + transition-property: transform, opacity, filter; + &.aos-animate { + -webkit-transform: translateX(0) rotate(0deg); + transform: translateX(0) rotate(0deg); + -webkit-filter: blur(0); + filter: blur(0); + opacity: 1; + } +} + +[data-aos] { + body[data-aos-easing="new-easing"] &, + &[data-aos][data-aos-easing="new-easing"] { + transition-timing-function: cubic-bezier(0.25, 1, 0.57, 0.55); + } +}