This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
It converts timestamp / milliseconds to readable time ago string. for eg. 12 mins ago, 1 month ago | |
How to use? | |
import { timeago } from '@/filters.js'; | |
export default { | |
name: ..., | |
filters:{timeago}, | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!--- | |
1. Set Tabwidth in data | |
2. Tabs are swipeable | |
3. Scrollable tabs | |
4. No external libraries used expcept vuejs | |
5. Using vuejs transition for animation | |
Demo : https://dagalti.github.io/vue-tabs.html | |
Codepen : https://codepen.io/dagalti/pen/pYKXQW | |
--> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* How to Use? | |
1. Add v-viewmore to content div. | |
2.Add CSS to the component. | |
3. Javascript | |
import { viewmore } from 'vue-viewmore-directive.js' | |
export default { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
///Create keyframes for moving X position TranslateX | |
//How to use? | |
// import {animate} from dynamic-keyframes.js | |
// animate(element, from_X_pos, to_X_pos, callback_function_after_animation_finish) | |
export const animate = (elm, from, to, done) =>{ | |
var animfn = "linear" | |
var duration = "300ms" | |
var direction = "forwards" ///or "backwards" | |
var style = document.createElement('style'); |