Top.vue 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <template>
  2. <div class="header__top">
  3. <v-skeleton-loader v-show="!loaded" class="ad-skeleton" type="image"></v-skeleton-loader>
  4. <div class="header-top section" v-show="isMobile() && loaded">
  5. <div class="header-top__wrapper section-wrapper section-wrapper_extra">
  6. <div class="header-top__banner">
  7. <!--<AdsTopBanner/>-->
  8. <BannersHeader/>
  9. </div>
  10. </div>
  11. </div>
  12. </div>
  13. </template>
  14. <script>
  15. export default {
  16. data(){
  17. return{
  18. width: null,
  19. ismainpage: false,
  20. loaded: false
  21. }
  22. },
  23. created(){
  24. if (process.browser){
  25. this.width = window.innerWidth;
  26. }
  27. },
  28. mounted(){
  29. this.loaded = true;
  30. },
  31. methods: {
  32. isMobile () {
  33. if (this.$route.path != '/') {
  34. return true;
  35. }
  36. else {
  37. if( this.width <= 576 ) {
  38. return false;
  39. }
  40. else {
  41. return true;
  42. }
  43. }
  44. }
  45. }
  46. };
  47. </script>
  48. <style>
  49. .header-top__banner {
  50. display: flex;
  51. justify-content: center;
  52. }
  53. .ad-skeleton {
  54. max-width: 900px;
  55. margin: auto;
  56. }
  57. @media all and (max-width: 576px) {
  58. .ad-skeleton {
  59. max-width: 300px;
  60. height: 250px;
  61. display: none;
  62. }
  63. }
  64. </style>