templates/pages/homepage.html.twig line 40

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block content %}
  3.     {% if data_t_scopus is not defined %}{% set data_t_scopus = null %} {% endif %}
  4.     {% if data_reuter is not defined %}{% set data_reuter = null %} {% endif %}
  5.     <!-- Load Facebook SDK for JavaScript -->
  6.     <div id="fb-root"></div>
  7.     <script>
  8.         (function(d, s, id) {
  9.             var js, fjs = d.getElementsByTagName(s)[0];
  10.             if (d.getElementById(id)) return;
  11.             js = d.createElement(s); js.id = id;
  12.             js.src = "https://connect.facebook.net/en_US/sdk.js#xfbml=1&version=v3.0";
  13.             fjs.parentNode.insertBefore(js, fjs);
  14.         }(document, 'script', 'facebook-jssdk'));
  15.     </script>
  16.        <div class="container container-home">
  17.             {% for message in app.flashes('success') %}
  18.                 <div class="alert alert-success alert-dismissible alert-success-journal w-100 mx-auto d-flex p-2 mb-4" role="alert">
  19.                     <span class="">{{ message }}</span>
  20.                     <span type="button" class="close position-static ml-auto" data-dismiss="alert" aria-label="Close" style="padding: 0 !important;"><span aria-hidden="true">&times;</span></span>
  21.                 </div>
  22.             {% endfor %}
  23.            {% for message in app.flashes('warning') %}
  24.                <div class="alert alert-warning alert-dismissible alert-warning-journal w-100 mx-auto d-flex p-2 mb-4" role="alert">
  25.                    <span class="">{{ message }}</span>
  26.                    <span type="button" class="close position-static ml-auto" data-dismiss="alert" aria-label="Close" style="padding: 0 !important;"><span aria-hidden="true">&times;</span></span>
  27.                </div>
  28.            {% endfor %}
  29.            {% for message in app.flashes('error') %}
  30.                <div class="alert alert-error alert-dismissible alert-error-journal w-100 mx-auto d-flex p-2 mb-4" role="alert">
  31.                    <span class="">{{ message }}</span>
  32.                    <span type="button" class="close position-static ml-auto" data-dismiss="alert" aria-label="Close" style="padding: 0 !important;"><span aria-hidden="true">&times;</span></span>
  33.                </div>
  34.            {% endfor %}
  35.             {% include 'pages/parts/form-search.html.twig' %}
  36.             <div class="page-content">
  37.                 {{ render(path('latestJournals')) }}
  38.                <div class="page-title">
  39.                    <h2>Find Journals or Authors</h2>
  40.                    <p>
  41.                         Your research is easier with a journal that you can save.
  42.                         Follow the author to stay up-to-date on new articles as they are published!
  43.                    </p>
  44.                </div>
  45.                <div class="row icons-homepage px-1 mx-0">
  46.                    <div class="col-md-3 block-intro">
  47.                        <a href="{{ path('journalSearch') }}" >
  48.                            <img class="img-fluid logo-gj" src="{{ asset('assets/images/refonte/homepage/search.svg') }}" alt="researchguide"  />
  49.                            <h5>Journal Search</h5>
  50.                            <p>Find the best journal for your research, depending on various criteria (Title, article keywords).</p>
  51.                        </a>
  52.                    </div>
  53.                    <div class="col-md-3 block-intro">
  54.                        <a href="{{ path('get_authors') }}">
  55.                            <img class="img-fluid logo-gj" src="{{ asset('assets/images/refonte/homepage/lamp.svg') }}" alt="researchguide"  />
  56.                            <h5>Author Search</h5>
  57.                            <p> Find your authors with their published articles and corresponding journals.</p>
  58.                        </a>
  59.                    </div>
  60.                    <div class="col-md-3 block-intro">
  61.                        <a href="{{ path('journalSearch') }}" >
  62.                            <img class="img-fluid logo-gj" src="{{ asset('assets/images/refonte/homepage/save_icon.svg') }}" alt="researchguide"  />
  63.                            <h5>Save journal </h5>
  64.                            <p>Save your favorite journals for easy reference. Stay up-to-date on recent and updated journals.</p>
  65.                        </a>
  66.                    </div>
  67.                    <div class="col-md-3 block-intro">
  68.                        <a href="{{ path('get_authors') }}">
  69.                            <img class="img-fluid logo-gj" src="{{ asset('assets/images/refonte/homepage/follow_author_icon.svg') }}" alt="researchguide"  />
  70.                            <h5>Follow author </h5>
  71.                            <p>Follow your author to receive new journals and latest journal developments in your field.</p>
  72.                        </a>
  73.                    </div>
  74.                </div>
  75.                <div class="row description-block  mx-0">
  76.                    <div class="col-md-6 right-content">
  77.                        <h5>Find your Journal easily</h5>
  78.                        <p class="paragraphe">You can choose to filter by Author or Journal title in order to find the perfect fit for your needs! </p>
  79.                        <div class="row check-bloc">
  80.                            <div class="col-2 col-md-2 img-check">
  81.                                <img class="img-fluid" src="{{ asset('assets/images/refonte/homepage/check.svg') }}" alt="researchguide"  />
  82.                            </div>
  83.                            <div class="col-10 col-md-10">
  84.                                <p class="check-bloc-title">Search your Journal by title or related keywords.</p>
  85.                                <p class="check-bloc-text"></p>
  86.                            </div>
  87.                        </div>
  88.                        <div class="row check-bloc">
  89.                            <div class="col-2 col-md-2 img-check">
  90.                                <img class="img-fluid" src="{{ asset('assets/images/refonte/homepage/check.svg') }}" alt="researchguide"  />
  91.                            </div>
  92.                            <div class="col-10 col-md-10">
  93.                                <p class="check-bloc-title">Use the Author’s name to find your Journal.</p>
  94.                                <p class="check-bloc-text"></p>
  95.                            </div>
  96.                        </div>
  97.                        {% if app.user== null %}
  98.                            <div class="row block-connexion">
  99.                                <div class="col-md-5 p-0">
  100.                                    <a href="{{ path('journalSearch')}}">
  101.                                        <button class="btn btn-connexion btn-journal btn-block">Find a Journal</button>
  102.                                    </a>
  103.                                </div>
  104.                                <div class="col-md-5 pl-3" >
  105.                                    <a href="{{ path('get_authors')}}">
  106.                                        <button class="btn btn-connexion btn-author btn-block">Find an Author</button>
  107.                                    </a>
  108.                                </div>
  109.                            </div>
  110.                        {% endif %}
  111.                    </div>
  112.                    <div class="col-md-6 left-content find-journal-bg">
  113.                        <div class="row">
  114.                            <div class="col-md-6 img-sample">
  115.                               {#<img class="img-fluid" src="{{ asset('assets/images/refonte/homepage/sample.svg') }}" alt="GuideJournal"  />#}
  116.                            </div>
  117.                            <div class="col-md-6 img-sample">
  118.                                {#<img class="img-fluid" src="{{ asset('assets/images/refonte/homepage/sample.svg') }}" alt="GuideJournal"  />#}
  119.                            </div>
  120.                        </div>
  121.                    </div>
  122.                </div>
  123.                {#<div class="container my-5 ad-banner">
  124.                     researchguide ad
  125.                     <ins class="adsbygoogle"
  126.                         style="display:block"
  127.                         data-ad-client="ca-pub-9897811061542650"
  128.                         data-ad-slot="3798275752"
  129.                         data-ad-format="auto"
  130.                         data-full-width-responsive="true"></ins>
  131.                     <script>
  132.                         (adsbygoogle = window.adsbygoogle || []).push({});
  133.                     </script>
  134.                </div>#}
  135.                <div class="row recent-articles mx-0" style="padding-top:10%">
  136.                    <div class="col-md-12 last-articles">
  137.                        <h5 class="title">Blog Posts</h5>
  138.                    </div>
  139.                    <div class="col-md-6 left-content"><p>Browse the latest Articles</p></div>
  140.                        <div class="container c-carousel">
  141.                            <div class="row row-carousel">
  142.                                <div class="col-md-12 col-carousel mb-4">
  143.                                    <div class="carousel-articles">
  144.                                        {% set articles= content.featured_articles %}
  145.                                        {% for a in articles %}
  146.                                            <div class="col-md-4 article-infos">
  147.                                                {% if a.cover_image %}
  148.                                                    {% set media = a.cover_image %}
  149.                                                    {% if media is defined and media is not null  and media.thumbnails['sulu-400x400'] %}
  150.                                                        <a href="{{ a.path }}">
  151.                                                            <img class="card-img-top" data-src="{{ media.thumbnails['sulu-400x400'] }}" src="{{ media.url? media.url:media.thumbnails['sulu-400x400'] }}" data-holder-rendered="true" alt="{{ a.title }}">
  152.                                                        </a>
  153.                                                    {% else %}
  154.                                                        <a href="{{ a.path }}">
  155.                                                            <img class="card-img-top img-responsive" data-src="{{ asset('assets/images/refonte/homepage/article.svg') }}" src="{{ asset('assets/images/refonte/homepage/article.svg') }}" data-holder-rendered="true" alt="{{ a.title }}">
  156.                                                        </a>
  157.                                                    {% endif %}
  158.                                                {% else %}
  159.                                                    <a href="{{ a.path }}">
  160.                                                        <img class="card-img-top" data-src="{{ asset('assets/images/refonte/homepage/article.svg') }}" src="{{ asset('assets/images/refonte/homepage/article.svg') }}" data-holder-rendered="true" alt="researchguide">
  161.                                                    </a>
  162.                                                {% endif %}
  163.                                             <div class="fav-img">
  164.                                                 <a href="{{ a.path }}"> <img class="img-fluid" src="{{ asset('assets/images/refonte/homepage/favoris.svg') }}" alt="researchguide"  /></a>
  165.                                             </div>
  166.                                             <div class="content">
  167.                                                 <h6 class="title-article"><a href="{{ a.path }}"> {{ a.title }}</a></h6>
  168.                                                 {% if a.excerptDescription|trim|length > 1 %}
  169.                                                     <p>
  170.                                                         {{ a.excerptDescription|slice(0,60)|raw  }}...   <br><a href="{{ a.path }}" style="float: right;font-weight: 400" class="text-warning">Read More →</a>
  171.                                                     </p>
  172.                                                 {% endif %}
  173.                                             </div>
  174.                                         </div>
  175.                                     {% endfor %}
  176.                                 </div>
  177.                             </div>
  178.                         </div>
  179.                     </div>
  180.                    {% for item in sulu_navigation_root_tree('main') %}
  181.                        {% if item.title|lower == "blog" %}
  182.                            <div class="col-md-12 text-center bloc-btn">
  183.                                <a href="{{ sulu_content_path(item.url, item.webspaceKey) }}">
  184.                                    <button class="btn btn-connexion-articles btn-blog">Explore more</button>
  185.                                </a>
  186.                            </div>
  187.                        {% endif %}
  188.                    {% endfor %}
  189.             </div>
  190.             
  191.         </div>
  192.     </div>
  193.         {# should check if !catgories  #}
  194.     {% if app.user and app.user.categories.values is empty and app.request.cookies.get('skip-categories') != "true" %}
  195.         <form action="{{ path('save_favorite_categories') }}" method="post">
  196.             <div id="choose-categories-modal" class="modal registre-modal" style="display:flex; z-index: 100;">
  197.                 <div class="modal-content animate register-modal-content p-3" style="box-shadow: none !important;border: 0 !important;">
  198.                     <span class="close skip-check-categories d-flex justify-content-end" title="Close Modal" style="margin-left:0 !important;left:20px;top:20px;cursor: pointer;">
  199.                         <svg width="35" height="35" viewBox="0 0 50 50" fill="none" xmlns="http://www.w3.org/2000/svg" style="float: right">
  200.                             <path fill-rule="evenodd" clip-rule="evenodd" d="M21.4898 25.1794L0.521973 46.1519L4.0579 49.687L25.0249 28.7154L45.9919 49.687L49.5279 46.1519L28.5601 25.1794L49.5279 4.20702L45.9919 0.671875L25.0249 21.6435L4.0579 0.671875L0.521973 4.20702L21.4898 25.1794Z" fill="#58595B"/>
  201.                         </svg>
  202.                     </span>
  203.                     <h2 class="modal-register-title w-100 mx-0 text-center my-2" style="margin-top: 60px; color:black">
  204.                         Select your favorite categories:
  205.                     </h2>
  206.                     <p class="text-center"> <i>This help us recommend the most useful journals</i></p>
  207.                     <div id="register-step-2" style="">
  208.                         <div class="d-flex flex-wrap register-categories">
  209.                             {% set categories = publicationManager.getAllCategories()  %}
  210.                             {% for category in categories|sort((a, b) => a.name <=> b.name) %}
  211.                                 {% if category.name != '' and category.name != ' ' %}
  212.                                     <div class="category-item">
  213.                                         <svg xmlns="http://www.w3.org/2000/svg" style="display:none" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="feather feather-check"><polyline points="20 6 9 17 4 12"/></svg>
  214.                                         <span id="{{ category.id }}">{{category.name}}</span>
  215.                                     </div>
  216.                                 {% endif %}
  217.                             {% endfor %}
  218.                         </div>
  219.                     </div>
  220.                     <div class="d-flex px-4 px-sm-5 my-2">
  221.                         <input type="hidden" id="selected-categories" name="selected-categories">
  222.                         <button type="submit" id="register-btn-2" class="btn form-register-btn mx-auto mt-0" style=" width: 100% !important;" disabled>
  223.                             <p id="register-btn-text" class="form-register-btn-text my-auto">Validate</p>
  224.                         </button>
  225.                     </div>
  226.                     <br><a  href="/" class="skip-check-categories text-center form-register-btn-text my-auto text-dark"  style="font-weight: 300 !important;width: 100% !important;">Skip</a>
  227.                 </div>
  228.             </div>
  229.         </form>
  230.     {% endif %}
  231.     <div class="container-fluid container-banner">
  232.         <div class="banner py-5">
  233.             <h6 class="pt-0">Trusted by great companies</h6>
  234.             <div class="container">
  235.             <div class="row partenaires">
  236.                 <div class="col-sm-4 mt-4 mt-lg-0">
  237.                     <a href="https://monarkit.net" target="_blank"><img class="img-fluid" src="{{ asset('assets/images/refonte/homepage/monark.svg') }}" alt="monarkIt"  /></a>
  238.                 </div>
  239.                 <div class="col-sm-4 mt-4 mt-lg-0">
  240.                     <a href="https://aion-lab.com" target="_blank"><img class="img-fluid" src="{{ asset('assets/images/refonte/homepage/aion.svg') }}" alt="aion"  /></a>
  241.                 </div>
  242.                 <div class="col-sm-4 mt-4 mt-lg-0">
  243.                     <a href="https://app-estimator.com" target="_blank"><img class="img-fluid" width="190" src="{{ asset('assets/images/refonte/homepage/estimitor.svg') }}" alt="estimator"  /></a>
  244.                 </div>
  245.             </div>
  246.             </div>
  247.         </div>
  248.     </div>
  249.    <div class="suggest-articles container">
  250.         <div class="d-flex flex-column flex-lg-row justify-content-center mx-0">
  251.             <div class="left-content mr-0 mr-lg-5">
  252.                 {% if app.user and app.user.categories is not empty %}
  253.                     {% set favoriteUserCategories = publicationManager.showJournalByFavoriteUserCategories(app.user) %}
  254.                     {% if favoriteUserCategories %}
  255.                         <div class="row line-1">
  256.                             {% for ind,favorite in favoriteUserCategories|slice(0,4) %}
  257.                                 {% set id = ind + 1 %}
  258.                                 <div class="col-12 col-sm-6 text-center home-categorie-card">
  259.                                     <a href="{{ path('journal_show',{'id':favorite.id}) }}">
  260.                                         <div class="img-journal" >
  261.                                             <p>{{ favorite.title }}</p>
  262.                                         </div>
  263.                                     </a>
  264.                                 </div>
  265.                             {% endfor %}
  266.                         </div>
  267.                     {% endif %}
  268.                 {% else %}
  269.                     <div class="row line-1">
  270.                         <div class="col-6 col-md-6 text-center">
  271.                             <img class="img-fluid" src="{{ asset('assets/images/refonte/journal-selected-1.jpg') }}" alt="suggest-article"  />
  272.                         </div>
  273.                         <div class="col-6 col-md-6 text-center s-img">
  274.                             <img class="img-fluid" src="{{ asset('assets/images/refonte/journal-selected-2.jpg') }}" alt="suggest-article"  />
  275.                         </div>
  276.                     </div>
  277.                     <div class="row line-2 mt-3">
  278.                         <div class="col-6 col-md-6 text-center">
  279.                             <img class="img-fluid" src="{{ asset('assets/images/refonte/journal-selected-3.jpg') }}" alt="suggest-article"  />
  280.                         </div>
  281.                         <div class="col-6 col-md-6 text-center f-img">
  282.                             <img class="img-fluid" src="{{ asset('assets/images/refonte/journal-selected-4.jpg') }}" alt="suggest-article"  />
  283.                         </div>
  284.                     </div>
  285.                 {% endif %}
  286.             </div>
  287.             <div class="right-content d-flex flex-column text-center text-lg-left">
  288.                 <h6 class="selected-journals">Journals selected <br> for you</h6>
  289.                 <p>
  290.                     Explore these  recommended journals that we think you'll find most useful.<br><br>
  291.                     With these, you will be sure to have a complete research.
  292.                 </p>
  293.                 <a href="{{ path('journalSearch') }}">
  294.                     <button class="btn">Find a Journal</button>
  295.                 </a>
  296.             </div>
  297.         </div>
  298.     </div>
  299.     <!-- Exemple de div pour un emplacement publicitaire -->
  300.     <div id="banner-ad-1">
  301.         <!-- L'espace réservé pour l'annonce sera rempli ici par Prebid -->
  302.     </div>
  303.     <section class="newsletter-section px-3 container">
  304.         <div class="newsletter-container">
  305.             <div class="newsletter-content">
  306.                 <p class="newsletter-title">Sign up to our newsletter!</p>
  307.                 <p class="newsletter-description">so you can be the first to find out the latest articles and journals. </p>
  308.                 <div class="newsletter-btn-subscribe-container">
  309.                     <form action="{{ path('newsletter') }}" method="post" class="d-flex">
  310.                         <input type="hidden" name="newsletter" value="true" class="newsletter-input-hidden">
  311.                         <input name="email" type="email" class="newsletter-btn-submit" placeholder="Subscribe to our newsletter" required/>
  312.                         <input type="submit" value="Submit" class="newsletter-input-submit">
  313.                     </form>
  314.                 </div>
  315.             </div>
  316.         </div>
  317.     </section>
  318.     <!-- Pubi 0001-->
  319.     <!-- /21831250958/guidejournal_home_pub0001 -->
  320. {#    <div id='div-gpt-ad-1563781924570-0' style="align-content: center">#}
  321. {#        <script>#}
  322. {#            googletag.cmd.push(function() { googletag.display('div-gpt-ad-1563781924570-0'); });#}
  323. {#        </script>#}
  324. {#    </div>#}
  325.     <!-- Fin pub 0001-->
  326. {% endblock %}
  327.     
  328. {% block vignetteAd %}
  329.     <div class="fixed-pub-area w-100"></div>
  330.     {% include '_includes/pubs/custom-vignette-ad.html.twig' %}
  331. {% endblock %}
  332. {% block javascripts %}
  333.     <script>
  334.         $('.category-item').click(function (e) {
  335.             $('#register-btn-2').prop( "disabled", false );
  336.             let svg = e.currentTarget.firstElementChild;
  337.             let span = e.currentTarget.lastElementChild;
  338.             var categoryInput = document.getElementById('selected-categories')
  339.             svg.style.display === 'block' ? svg.style.display = 'none' : svg.style.display = 'block'
  340.             if(svg.style.display === 'block') {
  341.               // remove category
  342.                 let spanValue = span.id;
  343.                 // put span value in input
  344.                 if(categoryInput.value){
  345.                     categoryInput.value = categoryInput.value+","+spanValue;
  346.                 } else {
  347.                     categoryInput.value = spanValue;
  348.                 }
  349.             }else{
  350.                 // add category
  351.                 let spanValue = span.id;
  352.                 if(categoryInput.value){
  353.                     let categories = categoryInput.value.split(",");
  354.                     let index = categories.indexOf(spanValue);
  355.                     if (index > -1) {
  356.                         categories.splice(index, 1);
  357.                     }
  358.                     categoryInput.value = categories.join(",");
  359.                 }
  360.             }
  361.             e.currentTarget.classList.toggle('active');
  362.         })
  363.     </script>
  364. {% endblock %}