Andrei | рефакторинг проекта (разнес стили и скрипты главной страницы в /static/js/front-page.js и /static/css/fron-page.css)

dev_10_refactoring
parent a8c50aa368
commit 2a72ff28f2
  1. 11
      wp-content/themes/cosmopet/modules/static-pages/front-page/template-front-page.php
  2. 190
      wp-content/themes/cosmopet/static/css/front-page.css
  3. 0
      wp-content/themes/cosmopet/static/css/libs/materialize.min.css
  4. 173
      wp-content/themes/cosmopet/static/front-page/css/carousel.css
  5. 0
      wp-content/themes/cosmopet/static/img/Stars-for-form.png
  6. 0
      wp-content/themes/cosmopet/static/img/about_card-gif1.gif
  7. 0
      wp-content/themes/cosmopet/static/img/about_card-gif2.gif
  8. 0
      wp-content/themes/cosmopet/static/img/about_card-gif3.gif
  9. 0
      wp-content/themes/cosmopet/static/img/about_card-logo1.svg
  10. 0
      wp-content/themes/cosmopet/static/img/about_card-logo2.svg
  11. 0
      wp-content/themes/cosmopet/static/img/about_card-logo3.svg
  12. 0
      wp-content/themes/cosmopet/static/img/about_card-logo4.svg
  13. 0
      wp-content/themes/cosmopet/static/img/about_slider-img1.png
  14. 0
      wp-content/themes/cosmopet/static/img/about_slider-img2.png
  15. 0
      wp-content/themes/cosmopet/static/img/about_slider-img3.png
  16. 0
      wp-content/themes/cosmopet/static/img/about_slider-img4.png
  17. 0
      wp-content/themes/cosmopet/static/img/about_slider-img5.png
  18. 0
      wp-content/themes/cosmopet/static/img/about_us-card-img.png
  19. 0
      wp-content/themes/cosmopet/static/img/aks.svg
  20. 0
      wp-content/themes/cosmopet/static/img/animations/Anim7.svg
  21. 0
      wp-content/themes/cosmopet/static/img/animations/BALANCED_RECIPE.svg
  22. 0
      wp-content/themes/cosmopet/static/img/animations/HIGH_ABSOLUTION.svg
  23. 0
      wp-content/themes/cosmopet/static/img/animations/MAIN.svg
  24. 0
      wp-content/themes/cosmopet/static/img/animations/SAFETY.svg
  25. 0
      wp-content/themes/cosmopet/static/img/animations/SPECIAL_STRUCTURE.svg
  26. 0
      wp-content/themes/cosmopet/static/img/animations/anim2.svg
  27. 0
      wp-content/themes/cosmopet/static/img/animations/anim5.svg
  28. 0
      wp-content/themes/cosmopet/static/img/animations/gus.svg
  29. 0
      wp-content/themes/cosmopet/static/img/bars.svg
  30. 0
      wp-content/themes/cosmopet/static/img/blog-anim.svg
  31. 0
      wp-content/themes/cosmopet/static/img/blog_card-img.jpg
  32. 0
      wp-content/themes/cosmopet/static/img/blogger.png
  33. 0
      wp-content/themes/cosmopet/static/img/border-mobile.png
  34. 0
      wp-content/themes/cosmopet/static/img/border.png
  35. 0
      wp-content/themes/cosmopet/static/img/card-line.svg
  36. 0
      wp-content/themes/cosmopet/static/img/cat-lakom.svg
  37. 0
      wp-content/themes/cosmopet/static/img/cat_dog.png
  38. 0
      wp-content/themes/cosmopet/static/img/close.svg
  39. 0
      wp-content/themes/cosmopet/static/img/cosmo-1.png
  40. 0
      wp-content/themes/cosmopet/static/img/cosmo-2.png
  41. 0
      wp-content/themes/cosmopet/static/img/cosmo-3.png
  42. 0
      wp-content/themes/cosmopet/static/img/cosmo-4.png
  43. 0
      wp-content/themes/cosmopet/static/img/cosmo-top-1.svg
  44. 0
      wp-content/themes/cosmopet/static/img/cosmo-top-2.svg
  45. 0
      wp-content/themes/cosmopet/static/img/cosmo-top-3.svg
  46. 0
      wp-content/themes/cosmopet/static/img/cosmo-top-4.svg
  47. 0
      wp-content/themes/cosmopet/static/img/cosmobaka.svg
  48. 0
      wp-content/themes/cosmopet/static/img/cosmocat.png
  49. 0
      wp-content/themes/cosmopet/static/img/cosmocats.svg
  50. 0
      wp-content/themes/cosmopet/static/img/cosmodog-img.png
  51. 0
      wp-content/themes/cosmopet/static/img/cosmodog.png
  52. 0
      wp-content/themes/cosmopet/static/img/cosmodogs.svg
  53. 0
      wp-content/themes/cosmopet/static/img/dec-m.svg
  54. 0
      wp-content/themes/cosmopet/static/img/dicount-dog.png
  55. 0
      wp-content/themes/cosmopet/static/img/dicsount-sale-mob.png
  56. 0
      wp-content/themes/cosmopet/static/img/dicsount-sale.png
  57. 0
      wp-content/themes/cosmopet/static/img/discount-line-w.svg
  58. 0
      wp-content/themes/cosmopet/static/img/discount-line.svg
  59. 0
      wp-content/themes/cosmopet/static/img/discount_cosmodog.jpg
  60. 0
      wp-content/themes/cosmopet/static/img/discount_cosmodog2.png
  61. 0
      wp-content/themes/cosmopet/static/img/discount_cosmodog3.jpg
  62. 0
      wp-content/themes/cosmopet/static/img/dog-lakom.svg
  63. 0
      wp-content/themes/cosmopet/static/img/dog.png
  64. 0
      wp-content/themes/cosmopet/static/img/entoprotein-img.svg
  65. 0
      wp-content/themes/cosmopet/static/img/error_result1.png
  66. 0
      wp-content/themes/cosmopet/static/img/error_result2.png
  67. 0
      wp-content/themes/cosmopet/static/img/error_result3.png
  68. 0
      wp-content/themes/cosmopet/static/img/error_result4.png
  69. 0
      wp-content/themes/cosmopet/static/img/footer__figure.svg
  70. 0
      wp-content/themes/cosmopet/static/img/footer__figure__arrow.svg
  71. 0
      wp-content/themes/cosmopet/static/img/footer_line-mob.svg
  72. 0
      wp-content/themes/cosmopet/static/img/footer_line-mob2.svg
  73. 0
      wp-content/themes/cosmopet/static/img/footer_line.svg
  74. 0
      wp-content/themes/cosmopet/static/img/footer_logo.svg
  75. 0
      wp-content/themes/cosmopet/static/img/footer_logo2.svg
  76. 0
      wp-content/themes/cosmopet/static/img/footer_shop.svg
  77. 0
      wp-content/themes/cosmopet/static/img/footer_shop2.svg
  78. 0
      wp-content/themes/cosmopet/static/img/footer_user.svg
  79. 0
      wp-content/themes/cosmopet/static/img/gift-line.svg
  80. 0
      wp-content/themes/cosmopet/static/img/gift-new-mob.png
  81. 0
      wp-content/themes/cosmopet/static/img/gift-new.png
  82. 0
      wp-content/themes/cosmopet/static/img/gift.png
  83. 0
      wp-content/themes/cosmopet/static/img/gov.png
  84. 0
      wp-content/themes/cosmopet/static/img/hero-1.png
  85. 0
      wp-content/themes/cosmopet/static/img/hero-2.png
  86. 0
      wp-content/themes/cosmopet/static/img/home-line.svg
  87. 0
      wp-content/themes/cosmopet/static/img/home-line2.svg
  88. 0
      wp-content/themes/cosmopet/static/img/i-arr_down.svg
  89. 0
      wp-content/themes/cosmopet/static/img/i-arr_down_black.svg
  90. 0
      wp-content/themes/cosmopet/static/img/icons/arrdown.svg
  91. 0
      wp-content/themes/cosmopet/static/img/icons/arrright.png
  92. 0
      wp-content/themes/cosmopet/static/img/icons/bars.svg
  93. 0
      wp-content/themes/cosmopet/static/img/icons/bars2.svg
  94. 0
      wp-content/themes/cosmopet/static/img/icons/footer_line-mob.svg
  95. 0
      wp-content/themes/cosmopet/static/img/icons/footer_line-mob2.svg
  96. 0
      wp-content/themes/cosmopet/static/img/icons/footer_line.svg
  97. 0
      wp-content/themes/cosmopet/static/img/icons/footer_line2.svg
  98. 0
      wp-content/themes/cosmopet/static/img/icons/i-back.svg
  99. 0
      wp-content/themes/cosmopet/static/img/icons/i-card.svg
  100. 0
      wp-content/themes/cosmopet/static/img/icons/i-card2.svg
  101. Some files were not shown because too many files have changed in this diff Show More

@ -7,14 +7,11 @@
<?php
var_dump('test123tesst123');
function theme_enqueue_scripts() {
// Swiper
wp_enqueue_style('gp-front-page-carousel', get_template_directory_uri() . '/static/front-page/css/carousel.css');
wp_enqueue_style('gp-front-page-materialize-css', get_template_directory_uri() . '/static/front-page/css/materialize.min.css');
wp_enqueue_style('gp-front-page-style', get_template_directory_uri() . '/static/front-page/css/style.css');
wp_enqueue_script( 'gp-front-page-materialize', get_template_directory_uri() . '/static/front-page/js/materialize.min.js', array(), null, true );
wp_enqueue_script( 'gp-front-page-main', get_template_directory_uri() . '/static/front-page/js/main.js', array(), null, true );
wp_enqueue_style('gp-front-page-materialize-css', get_template_directory_uri() . '/static/css/libs/materialize.min.css');
wp_enqueue_style('gp-front-page-style', get_template_directory_uri() . '/static/css/front-page.css');
wp_enqueue_script( 'gp-front-page-materialize', get_template_directory_uri() . '/static/js/libs/materialize.min.js', array(), null, true );
wp_enqueue_script( 'gp-front-page-main', get_template_directory_uri() . '/static/js/front-page.js', array(), null, true );
}
add_action('wp_enqueue_scripts', 'theme_enqueue_scripts');

@ -1,11 +1,5 @@
/* .sellers_card .sellers_card-img {
width: auto!important;
height: 330px;
} */
/* Home start */
.home{
position: relative;
@ -4548,3 +4542,187 @@ color: #f4f1f0;
.discount_block{
padding-bottom: 80px;
}
/* .sellers_card .sellers_card-img {
width: auto!important;
height: 330px;
} */
.slider {
position: relative;
height: 400px;
width: 100%;
}
.slider.fullscreen {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.slider.fullscreen ul.slides {
height: 100%;
}
.slider.fullscreen ul.indicators {
z-index: 2;
bottom: 30px;
}
.slider .slides {
background-color: #9e9e9e;
margin: 0;
height: 400px;
}
.slider .slides li {
opacity: 0;
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: 100%;
height: inherit;
overflow: hidden;
}
.slider .slides li img {
height: 100%;
width: 100%;
background-size: cover;
background-position: center;
}
.slider .slides li .caption {
color: #fff;
position: absolute;
top: 15%;
left: 15%;
width: 70%;
opacity: 0;
}
.slider .slides li .caption p {
color: #e0e0e0;
}
.slider .slides li.active {
z-index: 2;
}
.slider .indicators {
position: absolute;
text-align: center;
left: 0;
right: 0;
bottom: 0;
margin: 0;
}
.slider .indicators .indicator-item {
display: inline-block;
position: relative;
cursor: pointer;
height: 16px;
width: 16px;
margin: 0 12px;
background-color: #e0e0e0;
-webkit-transition: background-color 0.3s;
transition: background-color 0.3s;
border-radius: 50%;
}
.slider .indicators .indicator-item.active {
background-color: #4caf50;
}
.carousel {
overflow: hidden;
position: relative;
width: 100%;
min-height: 660px;
-webkit-perspective: 500px;
perspective: 500px;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
}
.carousel.carousel-slider {
top: 0;
left: 0;
}
.carousel.carousel-slider .carousel-fixed-item {
position: absolute;
left: 0;
right: 0;
bottom: 20px;
z-index: 1;
}
.carousel.carousel-slider .carousel-fixed-item.with-indicators {
bottom: 68px;
}
.carousel.carousel-slider .carousel-item {
width: 100%;
height: 100%;
min-height: 400px;
position: absolute;
top: 0;
left: 0;
}
.carousel.carousel-slider .carousel-item h2 {
font-size: 24px;
font-weight: 500;
line-height: 32px;
}
.carousel.carousel-slider .carousel-item p {
font-size: 15px;
}
.carousel .carousel-item {
visibility: hidden;
/* width: 200px; */
/* height: 200px; */
width: 257px;
height: 489px;
position: absolute;
top: 0;
left: 0;
}
.carousel .carousel-item > img {
width: 100%;
}
.carousel .indicators {
position: absolute;
text-align: center;
left: 0;
right: 0;
bottom: 0;
margin: 0;
}
.carousel .indicators .indicator-item {
display: inline-block;
position: relative;
cursor: pointer;
margin: 24px 4px;
width: 8px;
height: 8px;
opacity : 0.5;
content: "";
border-radius: 50%;
border: 1px solid #fff;
background-color: unset;
/* round-color 0.3s; */
border-radius: 50%;
}
.carousel .indicators .indicator-item {
width: 9px;
height: 9px;
content: "";
border-radius: 50%;
border: 1px solid #fff;
background-color: unset;
}
.carousel .indicators .indicator-item.active {
background-color: #fff;
opacity: 1;
}
.carousel.scrolling .carousel-item .materialboxed,
.carousel .carousel-item:not(.active) .materialboxed {
pointer-events: none;
}

@ -1,173 +0,0 @@
.slider {
position: relative;
height: 400px;
width: 100%;
}
.slider.fullscreen {
height: 100%;
width: 100%;
position: absolute;
top: 0;
left: 0;
right: 0;
bottom: 0;
}
.slider.fullscreen ul.slides {
height: 100%;
}
.slider.fullscreen ul.indicators {
z-index: 2;
bottom: 30px;
}
.slider .slides {
background-color: #9e9e9e;
margin: 0;
height: 400px;
}
.slider .slides li {
opacity: 0;
position: absolute;
top: 0;
left: 0;
z-index: 1;
width: 100%;
height: inherit;
overflow: hidden;
}
.slider .slides li img {
height: 100%;
width: 100%;
background-size: cover;
background-position: center;
}
.slider .slides li .caption {
color: #fff;
position: absolute;
top: 15%;
left: 15%;
width: 70%;
opacity: 0;
}
.slider .slides li .caption p {
color: #e0e0e0;
}
.slider .slides li.active {
z-index: 2;
}
.slider .indicators {
position: absolute;
text-align: center;
left: 0;
right: 0;
bottom: 0;
margin: 0;
}
.slider .indicators .indicator-item {
display: inline-block;
position: relative;
cursor: pointer;
height: 16px;
width: 16px;
margin: 0 12px;
background-color: #e0e0e0;
-webkit-transition: background-color 0.3s;
transition: background-color 0.3s;
border-radius: 50%;
}
.slider .indicators .indicator-item.active {
background-color: #4caf50;
}
.carousel {
overflow: hidden;
position: relative;
width: 100%;
min-height: 660px;
-webkit-perspective: 500px;
perspective: 500px;
-webkit-transform-style: preserve-3d;
transform-style: preserve-3d;
-webkit-transform-origin: 0% 50%;
transform-origin: 0% 50%;
}
.carousel.carousel-slider {
top: 0;
left: 0;
}
.carousel.carousel-slider .carousel-fixed-item {
position: absolute;
left: 0;
right: 0;
bottom: 20px;
z-index: 1;
}
.carousel.carousel-slider .carousel-fixed-item.with-indicators {
bottom: 68px;
}
.carousel.carousel-slider .carousel-item {
width: 100%;
height: 100%;
min-height: 400px;
position: absolute;
top: 0;
left: 0;
}
.carousel.carousel-slider .carousel-item h2 {
font-size: 24px;
font-weight: 500;
line-height: 32px;
}
.carousel.carousel-slider .carousel-item p {
font-size: 15px;
}
.carousel .carousel-item {
visibility: hidden;
/* width: 200px; */
/* height: 200px; */
width: 257px;
height: 489px;
position: absolute;
top: 0;
left: 0;
}
.carousel .carousel-item > img {
width: 100%;
}
.carousel .indicators {
position: absolute;
text-align: center;
left: 0;
right: 0;
bottom: 0;
margin: 0;
}
.carousel .indicators .indicator-item {
display: inline-block;
position: relative;
cursor: pointer;
margin: 24px 4px;
width: 8px;
height: 8px;
opacity : 0.5;
content: "";
border-radius: 50%;
border: 1px solid #fff;
background-color: unset;
/* round-color 0.3s; */
border-radius: 50%;
}
.carousel .indicators .indicator-item {
width: 9px;
height: 9px;
content: "";
border-radius: 50%;
border: 1px solid #fff;
background-color: unset;
}
.carousel .indicators .indicator-item.active {
background-color: #fff;
opacity: 1;
}
.carousel.scrolling .carousel-item .materialboxed,
.carousel .carousel-item:not(.active) .materialboxed {
pointer-events: none;
}

Before

Width:  |  Height:  |  Size: 1.1 KiB

After

Width:  |  Height:  |  Size: 1.1 KiB

Before

Width:  |  Height:  |  Size: 491 KiB

After

Width:  |  Height:  |  Size: 491 KiB

Before

Width:  |  Height:  |  Size: 107 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Before

Width:  |  Height:  |  Size: 2.6 KiB

After

Width:  |  Height:  |  Size: 2.6 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save