Andrei | рефакторинг проекта (разнес статику страницы "О компании")

dev_10_refactoring
parent 468fddc866
commit 985080f2ad
  1. 8
      wp-content/themes/cosmopet/modules/static-pages/about/template-about.php
  2. 19
      wp-content/themes/cosmopet/static/about/img/home-line2.svg
  3. 0
      wp-content/themes/cosmopet/static/css/about-page.css
  4. 0
      wp-content/themes/cosmopet/static/img/about_top_image.png
  5. 0
      wp-content/themes/cosmopet/static/img/about_top_image2.png
  6. 0
      wp-content/themes/cosmopet/static/img/advantage1.svg
  7. 0
      wp-content/themes/cosmopet/static/img/advantage2.svg
  8. 0
      wp-content/themes/cosmopet/static/img/advantage3.svg
  9. 0
      wp-content/themes/cosmopet/static/img/advantage4.svg
  10. 0
      wp-content/themes/cosmopet/static/img/diagram.svg
  11. 0
      wp-content/themes/cosmopet/static/img/etap1.svg
  12. 0
      wp-content/themes/cosmopet/static/img/etap2.svg
  13. 0
      wp-content/themes/cosmopet/static/img/etap3.svg
  14. 0
      wp-content/themes/cosmopet/static/img/etaps_right.svg
  15. 0
      wp-content/themes/cosmopet/static/img/hero_image.png
  16. 0
      wp-content/themes/cosmopet/static/img/hero_image_desctop.png
  17. 0
      wp-content/themes/cosmopet/static/img/hero_image_mobile.png
  18. 0
      wp-content/themes/cosmopet/static/img/protein.png
  19. 0
      wp-content/themes/cosmopet/static/img/protein_ellipse.png
  20. 0
      wp-content/themes/cosmopet/static/img/protein_mobile.png
  21. 0
      wp-content/themes/cosmopet/static/js/about-page.js
  22. 14
      wp-content/themes/cosmopet/templates/_pages/about.twig

@ -9,12 +9,12 @@
<?php <?php
add_action('wp_enqueue_scripts', function() { add_action('wp_enqueue_scripts', function() {
enqueue_static_assets('front-page'); // Для директории /static/main/ wp_enqueue_style('gp-front-page-style', get_template_directory_uri() . '/static/css/front-page.css');
enqueue_static_assets('about'); // Для директории /static/main/ wp_enqueue_style('gp-about-page-style', get_template_directory_uri() . '/static/css/about-page.css');
// С дополнительными параметрами wp_enqueue_script( 'gp-about-page-main', get_template_directory_uri() . '/static/js/about-page.js', array(), null, true );
// enqueue_static_assets('theme', ['css' => false, 'version' => '1.0.0']);
}); });
$context = Timber::get_context(); $context = Timber::get_context();
$context['title'] = get_field('title'); $context['title'] = get_field('title');
$context['text'] = get_field('text'); $context['text'] = get_field('text');

@ -1,19 +0,0 @@
<svg width="319" height="408" viewBox="0 0 319 408" fill="none" xmlns="http://www.w3.org/2000/svg">
<g filter="url(#filter0_bd_4407_4824)">
<path d="M30.3333 25C30.3333 26.4728 31.5272 27.6667 33 27.6667C34.4728 27.6667 35.6667 26.4728 35.6667 25C35.6667 23.5272 34.4728 22.3333 33 22.3333C31.5272 22.3333 30.3333 23.5272 30.3333 25ZM290.5 25H291V24.5H290.5V25ZM287.833 365C287.833 366.473 289.027 367.667 290.5 367.667C291.973 367.667 293.167 366.473 293.167 365C293.167 363.527 291.973 362.333 290.5 362.333C289.027 362.333 287.833 363.527 287.833 365ZM257.833 55C257.833 56.4728 259.027 57.6667 260.5 57.6667C261.973 57.6667 263.167 56.4728 263.167 55C263.167 53.5272 261.973 52.3333 260.5 52.3333C259.027 52.3333 257.833 53.5272 257.833 55ZM33 25.5H290.5V24.5H33V25.5ZM290 25V365H291V25H290ZM290.146 24.6464L260.146 54.6464L260.854 55.3536L290.854 25.3536L290.146 24.6464Z" fill="white" fill-opacity="0.3"/>
</g>
<defs>
<filter id="filter0_bd_4407_4824" x="-24.666" y="-32.6667" width="372.832" height="455.333" filterUnits="userSpaceOnUse" color-interpolation-filters="sRGB">
<feFlood flood-opacity="0" result="BackgroundImageFix"/>
<feGaussianBlur in="BackgroundImageFix" stdDeviation="27.5"/>
<feComposite in2="SourceAlpha" operator="in" result="effect1_backgroundBlur_4407_4824"/>
<feColorMatrix in="SourceAlpha" type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0" result="hardAlpha"/>
<feOffset dx="-3" dy="9"/>
<feGaussianBlur stdDeviation="15.5"/>
<feComposite in2="hardAlpha" operator="out"/>
<feColorMatrix type="matrix" values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"/>
<feBlend mode="normal" in2="effect1_backgroundBlur_4407_4824" result="effect2_dropShadow_4407_4824"/>
<feBlend mode="normal" in="SourceGraphic" in2="effect2_dropShadow_4407_4824" result="shape"/>
</filter>
</defs>
</svg>

Before

Width:  |  Height:  |  Size: 1.8 KiB

Before

Width:  |  Height:  |  Size: 2.5 KiB

After

Width:  |  Height:  |  Size: 2.5 KiB

Before

Width:  |  Height:  |  Size: 3.6 KiB

After

Width:  |  Height:  |  Size: 3.6 KiB

Before

Width:  |  Height:  |  Size: 3.4 KiB

After

Width:  |  Height:  |  Size: 3.4 KiB

@ -10,15 +10,15 @@
<a href="#about" class="home_link main_link scroll_link">{{ function('pll_e', 'Узнать больше') }}</a> <a href="#about" class="home_link main_link scroll_link">{{ function('pll_e', 'Узнать больше') }}</a>
</div> </div>
</div> </div>
<img class="hero_image" src="{{ theme.link }}/static/about/img/hero_image_desctop.png" alt="hero image"> <img class="hero_image" src="{{ theme.link }}/static/img/hero_image_desctop.png" alt="hero image">
<img class="hero_image_mobile" src="{{ theme.link }}/static/about/img/hero_image_mobile.png" alt="hero image"> <img class="hero_image_mobile" src="{{ theme.link }}/static/img/hero_image_mobile.png" alt="hero image">
<img src="{{ theme.link }}/static/about/img/home-line2.svg" alt="" class="home_line2"> <img src="{{ theme.link }}/static/img/home-line2.svg" alt="" class="home_line2">
</section> </section>
<section class="about"> <section class="about">
<div class="cont"> <div class="cont">
<div class="section_top"> <div class="section_top">
<img src="{{ theme.link }}/static/about/img/about_top_image.png" alt="E-protein" class="about_top_image"> <img src="{{ theme.link }}/static/img/about_top_image.png" alt="E-protein" class="about_top_image">
<img src="{{ theme.link }}/static/about/img/about_top_image2.png" alt="E-protein" class="about_top_image2"> <img src="{{ theme.link }}/static/img/about_top_image2.png" alt="E-protein" class="about_top_image2">
<div class="block_title">{{text}}</div> <div class="block_title">{{text}}</div>
</div> </div>
<h2 class="section_title2" id="about">{{adv_title}}</p> <h2 class="section_title2" id="about">{{adv_title}}</p>
@ -81,7 +81,7 @@
{% endfor %} {% endfor %}
</div> </div>
<img class="etaps_anim" src="{{ theme.link }}/static/about/img/etaps_right.svg" alt="4"> <img class="etaps_anim" src="{{ theme.link }}/static/img/etaps_right.svg" alt="4">
</div> </div>
<div class="w-100 d-flex justify-content-center mobile_none2"> <div class="w-100 d-flex justify-content-center mobile_none2">
<a href="#" class="main_link main_link_black">К продукции</a> <a href="#" class="main_link main_link_black">К продукции</a>
@ -97,7 +97,7 @@
<div class="faq_top"> <div class="faq_top">
<div class="faq_title">{{item.q}}</div> <div class="faq_title">{{item.q}}</div>
<span class="faq_arr_down"> <span class="faq_arr_down">
<img src="{{ theme.link }}/static/about/img/icons/arrdown.svg" alt=""> <img src="{{ theme.link }}/static/img/icons/arrdown.svg" alt="">
</span> </span>
</div> </div>
<p class="faq_body">{{item.answ}}</p> <p class="faq_body">{{item.answ}}</p>

Loading…
Cancel
Save