Advertisement
Guest User

Untitled

a guest
Jul 28th, 2017
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.62 KB | None | 0 0
  1. <template>
  2. <div class="main-loader layout-column layout-align-center-center">
  3. <span class="subtitle">{{ $t('whoweare') }}</span>
  4. <div class="title-wrapper">
  5. <transition name="fade" appear>
  6. <h1 v-bind:data-hover="animatedTextLanguage">{{animatedTextLanguage}}</h1>
  7. </transition>
  8. </div>
  9. </div>
  10. </transition>
  11. </template>
  12.  
  13. <script>
  14.  
  15. export default {
  16. components: {
  17.  
  18. },
  19. i18n: {
  20. messages: {
  21. en: {
  22. title: 'Making the real digital evolution',
  23. whoweare: 'We are etéreo'
  24. },
  25. es: {
  26. title: 'La auténtica revolución digital',
  27. whoweare: 'Somos etéreo'
  28. }
  29. }
  30. },
  31.  
  32. computed: {
  33. animatedTextLanguage() {
  34. return this.$i18n.messages[this.$i18n.locale].title;
  35. }
  36. }
  37. }
  38. </script>
  39.  
  40. <style lang="scss" scoped>
  41.  
  42. @import '~assets/css/variables.scss'; // will be fixed soon
  43.  
  44. .main-loader {
  45. position: fixed;
  46. width: 100vw;
  47. height: 100vh;
  48. top: 0;
  49. background-color: white;
  50. }
  51. .fade-enter-active,
  52. .fade-leave-active {
  53. transition: opacity 1s
  54. }
  55.  
  56. .fade-enter,
  57. .fade-leave-active {
  58. opacity: 0
  59. }
  60. h1 {
  61. color: $silver;
  62. font-size: 36px;
  63. position: relative;
  64. display: block;
  65. &:after {
  66. position: absolute;
  67. content: attr(data-hover);
  68. color: black;
  69. left: 0;
  70. width: 0;
  71. transition: width 3s;
  72. overflow: hidden;
  73. white-space: nowrap;
  74. width: 0;
  75. }
  76. }
  77. .subtitle {
  78. transform: translateY(-500px);
  79. opacity: 0;
  80. }
  81.  
  82.  
  83. </style>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement