templates/frontend/home/model_1.html.twig line 1

Open in your IDE?
  1. {% extends 'base.html.twig' %}
  2. {% block title %}  {%  for p in frontend_page %}
  3.                     {% if p.adminLink == page_admink_link %} {{p.name}}{% endif %}{% endfor %}{% endblock %}
  4. {% block link_css %}
  5.     <link rel="stylesheet" href="{{ asset('assets/css/simple-lightbox.min.css') }}">
  6. {% endblock %}
  7. {% block css %}
  8.     <style>
  9.         #scroll-button {
  10.             animation-name: bounce;
  11.             animation-timing-function: ease;
  12.             animation-duration: 2s;
  13.             animation-iteration-count: infinite;
  14.             background: url("https://laketahoeprep.org/images/icons/scroll-arrow.svg") 50% 0 no-repeat;
  15.             background-size: 100% auto;
  16.             display: inline-block;
  17.             height: 80px;
  18.             width: 20px;
  19.         }
  20.         @media only screen and (min-width : 768px) {
  21.             #carroussel-desktop{
  22.                 display: block;
  23.             }
  24.             #carroussel-mobile{
  25.                 display: none;
  26.             }
  27.         }
  28.         @media only screen and (max-width : 767px) {
  29.             #carroussel-desktop{
  30.                 display: none;
  31.             }
  32.             #carroussel-mobile{
  33.                 display: block;
  34.             }
  35.         }
  36.     </style>
  37.     <style>
  38.         .dropdown-menu.show{
  39.             position: fixed!important;
  40.         }
  41.         .dropdown-menu{
  42.             min-width: 15rem;
  43.         }
  44.         .dropdown-item{
  45.             min-height: 35px;
  46.             padding: .5rem 1rem;
  47.         }
  48.         .dropdown-item:focus, .dropdown-item:hover{
  49.             background-color: {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %}52!important;
  50.         }
  51.         .content {
  52.             display: flex;
  53.             margin: 0 auto;
  54.             justify-content: center;
  55.             align-items: center;
  56.             flex-wrap: wrap;
  57.             max-width: 1000px;
  58.         }
  59.         p.overview {
  60.             font-size: 12.5px;
  61.             height: 200px;
  62.             width: 100%;
  63.             overflow: hidden;
  64.             text-overflow: ellipsis;
  65.             text-align: left;
  66.         }
  67.         .heading {
  68.             width: 100%;
  69.             margin-left: 1rem;
  70.             font-weight: 900;
  71.             font-size: 1.618rem;
  72.             text-transform: uppercase;
  73.             letter-spacing: 0.1ch;
  74.             line-height: 1;
  75.             padding-bottom: 0.5em;
  76.             margin-bottom: 1rem;
  77.             position: relative;
  78.         }
  79.         .heading:after {
  80.             display: block;
  81.             content: "";
  82.             position: absolute;
  83.             width: 60px;
  84.             height: 4px;
  85.             background: linear-gradient(135deg, #1a9be6, #1a57e6);
  86.             bottom: 0;
  87.         }
  88.         .description {
  89.             width: 100%;
  90.             margin-top: 0;
  91.             margin-left: 1rem;
  92.             margin-bottom: 3rem;
  93.         }
  94.         .card {
  95.             color: inherit;
  96.             width: calc(33% - 2rem);
  97.             min-width: calc(33% - 2rem);
  98.             height: 200px;
  99.             min-height: 200px;
  100.             perspective: 1000px;
  101.             margin: 1rem;
  102.             position: relative;
  103.             border:none;
  104.         }
  105.         @media screen and (max-width: 800px) {
  106.             .card {
  107.                 width: calc(50% - 2rem);
  108.             }
  109.         }
  110.         @media screen and (max-width: 500px) {
  111.             .card {
  112.                 /*width: 100%;*/
  113.             }
  114.             .card p{
  115.                 font-size: 12px;
  116.             }
  117.             .frontWeb,
  118.             .back{
  119.                 height: 150px!important;
  120.                 min-height: 150px!important;
  121.             }
  122.         }
  123.         .frontWeb,
  124.         .back {
  125.             display: flex;
  126.             border-radius: 6px;
  127.             background-position: center;
  128.             background-size: cover;
  129.             text-align: center;
  130.             justify-content: center;
  131.             align-items: center;
  132.             position: absolute;
  133.             height: 100%;
  134.             width: 100%;
  135.             -webkit-backface-visibility: hidden;
  136.             backface-visibility: hidden;
  137.             transform-style: preserve-3d;
  138.             transition: ease-in-out 600ms;
  139.         }
  140.         .frontWeb {
  141.             cursor: pointer;
  142.             background-size: cover;
  143.             padding: 2rem;
  144.             font-size: 1.62rem;
  145.             font-weight: 600;
  146.             color: rgba(255, 255, 255, 0.8);
  147.             overflow: hidden;
  148.             font-family: Poppins, sans-serif;
  149.         }
  150.         .frontWeb:before {
  151.             position: absolute;
  152.             display: block;
  153.             content: "";
  154.             top: 0;
  155.             left: 0;
  156.             right: 0;
  157.             bottom: 0;
  158.             background: #000;
  159.             opacity: 0.7;
  160.             z-index: -1;
  161.         }
  162.         .card:hover .frontWeb {
  163.             transform: rotateY(180deg);
  164.         }
  165.         @media screen and (max-width: 800px) {
  166.             .card:hover .frontWeb {
  167.                 transform: rotateY(0deg);
  168.             }
  169.         }
  170.         .card:nth-child(even):hover .frontWeb {
  171.             transform: rotateY(-180deg);
  172.         }
  173.         @media screen and (max-width: 800px) {
  174.             .card:nth-child(even):hover .frontWeb {
  175.                 transform: rotateY(0deg);
  176.             }
  177.         }
  178.         .card {
  179.             -webkit-transition: transform 0.6s;
  180.             transform-style: preserve-3d;
  181.             transition: 0.5s;
  182.             -webkit-transition: 0.5s;
  183.             position: relative;
  184.             transition: transform 0.6s;
  185.             -webkit-transition: transform 0.6s;
  186.         }
  187.         .card.flip {
  188.             transform: rotateY(180deg);
  189.             -webkit-transform: rotateY(180deg);
  190.         }
  191.         .back {
  192.             background: #fff;
  193.             transform: rotateY(-180deg);
  194.             padding: 0 2em;
  195.         }
  196.         .card:hover .back {
  197.             transform: rotateY(0deg);
  198.         }
  199.         @media screen and (max-width: 800px) {
  200.             .card:hover .back {
  201.                 transform: rotateY(-180deg);
  202.             }
  203.         }
  204.         .card:nth-child(even) .back {
  205.             transform: rotateY(180deg);
  206.         }
  207.         .card:nth-child(even):hover .back {
  208.             transform: rotateY(0deg);
  209.         }
  210.         @media screen and (max-width: 800px) {
  211.             .card:nth-child(even):hover .back {
  212.                 transform: rotateY(180deg);
  213.             }
  214.         }
  215.         .button {
  216.             text-decoration: none;
  217.             transform: translateZ(40px);
  218.             cursor: pointer;
  219.             -webkit-backface-visibility: hidden;
  220.             backface-visibility: hidden;
  221.             font-weight: bold;
  222.             color: #fff;
  223.             padding: 0.5em 1em;
  224.             border-radius: 100px;
  225.             font: inherit;
  226.             background: linear-gradient(135deg, #1a9be6, #1a57e6);
  227.             border: none;
  228.             position: relative;
  229.             transform-style: preserve-3d;
  230.             transition: 300ms ease;
  231.         }
  232.         .button:before {
  233.             transition: 300ms ease;
  234.             position: absolute;
  235.             display: block;
  236.             content: "";
  237.             transform: translateZ(-40px);
  238.             -webkit-backface-visibility: hidden;
  239.             backface-visibility: hidden;
  240.             height: calc(100% - 20px);
  241.             width: calc(100% - 20px);
  242.             border-radius: 100px;
  243.             left: 10px;
  244.             top: 16px;
  245.             box-shadow: 0 0 10px 10px rgba(26, 87, 230, 0.25);
  246.             background-color: rgba(26, 87, 230, 0.25);
  247.         }
  248.         .button:hover {
  249.             text-decoration: underline;
  250.             transform: translateZ(55px);
  251.         }
  252.         .button:hover:before {
  253.             transform: translateZ(-55px);
  254.         }
  255.         .button:active {
  256.             transform: translateZ(20px);
  257.         }
  258.         .button:active:before {
  259.             transform: translateZ(-20px);
  260.             top: 12px;
  261.         }
  262.         .movie_gens {
  263.             font-size: 12.5px;
  264.         }
  265.         .release_date {
  266.             font-weight: bold;
  267.         }
  268.         .release_date span {
  269.             font-weight: normal;
  270.         }
  271.         #btnFlipHover {
  272.             display: none;
  273.         }
  274.         #blogSlider {
  275.             position: relative;
  276.         }
  277.         #blogSlider .MS-content {
  278.             white-space: nowrap;
  279.             overflow: hidden;
  280.             /*margin: 0 5%;*/
  281.         }
  282.         #blogSlider .MS-content .item {
  283.             display: inline-block;
  284.             width: 33.3333%;
  285.             position: relative;
  286.             vertical-align: top;
  287.             overflow: hidden;
  288.             height: 100%;
  289.             white-space: normal;
  290.             padding: 0 10px;
  291.         }
  292.         @media (max-width: 991px) {
  293.             #blogSlider .MS-content .item {
  294.                 width: 50%;
  295.             }
  296.         }
  297.         @media (max-width: 767px) {
  298.             #blogSlider .MS-content .item {
  299.                 width: 100%;
  300.             }
  301.         }
  302.         #blogSlider .MS-content .item .imgTitle {
  303.             position: relative;
  304.         }
  305.         #blogSlider .MS-content .item .imgTitle .blogTitle {
  306.             margin: 0;
  307.             text-align: left;
  308.             letter-spacing: 2px;
  309.             color: #252525;
  310.             font-style: italic;
  311.             position: absolute;
  312.             background-color: rgba(255, 255, 255, 0.5);
  313.             width: 100%;
  314.             bottom: 0;
  315.             font-weight: bold;
  316.             /*padding: 0 0 2px 10px;*/
  317.         }
  318.         #blogSlider .MS-content .item .imgTitle img {
  319.             height: auto;
  320.             width: 100%;
  321.         }
  322.         #blogSlider .MS-content .item p {
  323.             font-size: 16px;
  324.             margin: 2px 10px 0 5px;
  325.             text-indent: 15px;
  326.         }
  327.         #blogSlider .MS-content .item a {
  328.             margin: 0 20px 0 0;
  329.             font-size: 16px;
  330.             font-weight: bold;
  331.             letter-spacing: 1px;
  332.             transition: linear 0.1s;
  333.         }
  334.         #blogSlider .MS-content .item a:hover {
  335.             text-shadow: 0 0 1px grey;
  336.         }
  337.         #blogSlider .MS-controls button {
  338.             position: absolute;
  339.             border: none;
  340.             background-color: #f1f1f16b;
  341.             outline: 0;
  342.             font-size: 50px;
  343.             top: 205px;
  344.             color: rgba(0, 0, 0, 0.4);
  345.             transition: 0.15s linear;
  346.         }
  347.         #blogSlider .MS-controls button:hover {
  348.             color: rgba(0, 0, 0, 0.8);
  349.         }
  350.         @media (max-width: 992px) {
  351.             #blogSlider .MS-controls button {
  352.                 font-size: 30px;
  353.             }
  354.         }
  355.         @media (max-width: 767px) {
  356.             #blogSlider .MS-controls button {
  357.                 font-size: 20px;
  358.             }
  359.         }
  360.         #blogSlider .MS-controls .MS-left {
  361.             left: 0px;
  362.         }
  363.         @media (max-width: 767px) {
  364.             #blogSlider .MS-controls .MS-left {
  365.                 left: -10px;
  366.             }
  367.         }
  368.         #blogSlider .MS-controls .MS-right {
  369.             right: -15px;
  370.         }
  371.         @media (max-width: 767px) {
  372.             #blogSlider .MS-controls .MS-right {
  373.                 right: -10px;
  374.             }
  375.             .lastMenu{
  376.                 margin-left: 30%;
  377.             }
  378.         }
  379.         .o-hidden {
  380.             overflow:hidden;
  381.         }
  382.         .nav {
  383.             transition: transform 0.4s;
  384.             transform: translateX(50%);
  385.             left: -50%;
  386.         }
  387.         .nav.justify-content-end {
  388.             transform: translateX(0);
  389.             left: 0;
  390.         }
  391.         .news {
  392.             width: 160px;
  393.             height: 50px;
  394.         }
  395.         .news-scroll a {
  396.             text-decoration: none
  397.         }
  398.         .dot {
  399.             height: 6px;
  400.             width: 6px;
  401.             margin-left: 3px;
  402.             margin-right: 3px;
  403.             margin-top: 2px !important;
  404.             background-color: {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %};
  405.             border-radius: 50%;
  406.             display: inline-block
  407.         }
  408.         .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){
  409.             border-color: transparent!important;
  410.         }
  411.         .ck.ck-editor__main>.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{
  412.             border: transparent!important;
  413.         }
  414.         marquee p {
  415.             display: contents;
  416.         }
  417.         @media (max-width: 334px){
  418.             #left-margin{
  419.                 margin-left: unset!important;
  420.             }
  421.             .head-1{
  422.                 width: 35%!important;
  423.             }
  424.             .head-2{
  425.                 width: 35%!important;
  426.             }
  427.             .head-3{
  428.                 width: 45%!important;
  429.             }
  430.             .head-4{
  431.                 width: 40%!important;
  432.             }
  433.             .head-5{
  434.                 width: 40%!important;
  435.             }
  436.         }
  437.         @media  (min-width: 335px) and (max-width: 425px){
  438.             #left-margin{
  439.                 margin-left: 1%!important;
  440.             }
  441.             #rigth-margin{
  442.                 margin-right: 2%!important;
  443.             }
  444.             .head-1{
  445.                 width: 35%!important;
  446.             }
  447.             .head-2{
  448.                 width: 35%!important;
  449.             }
  450.             .head-3{
  451.                 width: 45%!important;
  452.             }
  453.             .head-4{
  454.                 width: 40%!important;
  455.             }
  456.             .head-5{
  457.                 width: 40%!important;
  458.             }
  459.         }
  460.     </style>
  461. {% endblock %}
  462. {% block body %}
  463.     <div class=" d-flex flex-column flex-row-fluid">
  464.         {% set testD = 0 %}
  465.         {% set sNotif = [] %}
  466.         {% if school_notifs|length >0 %}
  467.             {% for no in school_notifs %}
  468.                 {% if no.startAt is not null %}
  469.                     {% if date_now >= no.startAt %}
  470.                         {% if no.expiredAt is not null  %}
  471.                             {% if no.expiredAt >= date_now %}
  472.                                 {% set sNotif = sNotif|merge([no]) %}
  473.                             {% endif %}
  474.                         {% else %}
  475.                             {% set sNotif = sNotif|merge([no]) %}
  476.                         {% endif %}
  477.                     {% endif %}
  478.                 {% else %}
  479.                     {% if no.expiredAt is not null  %}
  480.                         {% if no.expiredAt >= date_now %}
  481.                             {% set sNotif = sNotif|merge([no]) %}
  482.                         {% endif %}
  483.                     {% else %}
  484.                         {% set sNotif = sNotif|merge([no]) %}
  485.                     {% endif %}
  486.                 {% endif %}
  487.             {% endfor %}
  488.         {% endif %}
  489.         {% if educati_notifs|length >0 %}
  490.             {% set testD = 1 %}
  491.         {% endif %}
  492.         {% if sNotif|length >0 %}
  493.             {% set testD = 1 %}
  494.         {% endif %}
  495.         {% if testD == 1 %}
  496.         <div class=" mt-5">
  497.             <div class="row">
  498.                 <div class="col-md-12">
  499.                     <div class="d-flex justify-content-between align-items-center breaking-news " style="
  500.                     border-bottom-style: solid;border-bottom-color:  {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %}24!important;border-bottom-width: 2px;
  501.                     ">
  502.                         <marquee style="display: inline-block;font-size: 16px;min-height: 35px; padding-top: 6px;" class="news-scroll" behavior="scroll" direction="left" onmouseover="this.stop();" onmouseout="this.start();">
  503.                             {% for n in sNotif %}
  504.                                 <span>{{ n.content|raw }}</span><i class="dot" style="margin-right: 10px"></i>
  505.                             {% endfor %}
  506.                             {% for n in educati_notifs %}
  507.                                 <span>{{ n.content|raw }}</span><i class="dot" style="margin-right: 10px"></i>
  508.                             {% endfor %}
  509.                         </marquee>
  510.                     </div>
  511.                 </div>
  512.             </div>
  513.         </div>
  514.         {% endif %}
  515.         <div class="card-header row align-items-center" style="padding:.1rem 0.9rem!important;" >
  516.             <div class="flex-shrink-0" style="width: 3%;margin-right: 2%;" id="right-margin">
  517.                 <a id="left-button" style="float: right" href="#" class="btn-left btn-link toggle text-dark"><i style="" class="bi bi-caret-left"></i></a>
  518.             </div>
  519.             <div id="nav-link" class=" d-flex align-items-center  scrolling-wrapper row  flex-nowrap mt-4 pb-4 pt-2 foo scrollItem" style="
  520.              width: 90%; scroll-behavior: smooth;overflow-x: auto;-webkit-overflow-scrolling: touch;scroll-snap-type: x mandatory;">
  521.                 <div class=" head-1" style="width: 20%" >
  522.                     <div class=" nav-item dropdown list-item">
  523.                         <a class=" dropdown-toggle text-center minimalist_item text-primary  " data-bs-popperConfig="null"  href="#" id="navbarDropdown1" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  524.                             {{ 'minimalis_template_item0'|trans }}
  525.                         </a>
  526.                         <ul class="dropdown-menu " aria-labelledby="navbarDropdown">
  527.                             {%  for p in frontend_page %}
  528.                                 {% if p.adminLink == 'admin_page_director_speech' %}
  529.                                     <li><a class="dropdown-item text-primary" href="#{{ p.slug }}">{{ p.name }}</a></li>
  530.                                 {% endif %}
  531.                                 {% if p.adminLink == 'admin_page_blog' %}
  532.                                     <li><a class="dropdown-item text-primary" href="{{ path('app_show_frontend_page',{'slug':p.slug}) }}">{{ p.name }}</a></li>
  533.                                 {% endif %}
  534.                             {% endfor %}
  535.                             <li><a class="dropdown-item text-primary" href="#summary_page">{{ 'summary_page'|trans }}</a></li>
  536.                         </ul>
  537.                     </div>
  538.                 </div>
  539.                 <div class="head-2" style="width: 20%">
  540.                     <div class="  nav-item dropdown list-item">
  541.                         <a class="nav-link dropdown-toggle text-center minimalist_item text-primary " href="#" id="navbarDropdown2" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  542.                             {{ 'minimalis_template_item1'|trans }}
  543.                         </a>
  544.                         <ul class="dropdown-menu " aria-labelledby="navbarDropdown">
  545.                             {%  for p in frontend_page %}
  546.                                 {% if p.adminLink == 'admin_page_about_us' %}
  547.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_about') }}#{{ p.slug }}">{{ p.name }}</a></li>
  548.                                 {% endif %}
  549.                                 {% if p.adminLink == 'admin_page_story' %}
  550.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_about') }}#{{ p.slug }}">{{ p.name }}</a></li>
  551.                                 {% endif %}
  552.                                 {% if p.adminLink == 'admin_page_team' %}
  553.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_about') }}#{{ p.slug }}">{{ p.name }}</a></li>
  554.                                 {% endif %}
  555.                             {% endfor %}
  556.                         </ul>
  557.                     </div>
  558.                 </div>
  559.                 <div class=" head-3" style="width: 30%" >
  560.                     <div class="nav-item dropdown list-item">
  561.                         <a class="nav-link dropdown-toggle text-center minimalist_item text-primary " href="#" id="navbarDropdown3" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  562.                             {{ 'minimalis_template_item2'|trans }}
  563.                         </a>
  564.                         <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
  565.                             {%  for p in frontend_page %}
  566.                                 {% if p.adminLink == 'admin_page_our_mission' %}
  567.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_school_life') }}#{{ p.slug }}">{{ p.name }}</a></li>
  568.                                 {% endif %}
  569.                                 {% if p.adminLink == 'admin_page_infrastructure' %}
  570.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_school_life') }}#{{ p.slug }}">{{ p.name }}</a></li>
  571.                                 {% endif %}
  572.                                 {% if p.adminLink == 'admin_page_activity' %}
  573.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_school_life') }}#{{ p.slug }}">{{ p.name }}</a></li>
  574.                                 {% endif %}
  575.                                 {% if p.adminLink == 'admin_page_partner' %}
  576.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_school_life') }}#{{ p.slug }}">{{ p.name }}</a></li>
  577.                                 {% endif %}
  578.                             {% endfor %}
  579.                         </ul>
  580.                     </div>
  581.                 </div>
  582.                 <div class="head-4" style="width: 30%" >
  583.                     <div class="nav-item dropdown list-item">
  584.                         <a class="nav-link dropdown-toggle text-center minimalist_item text-primary " href="#" id="navbarDropdown4" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  585.                             {{ 'minimalis_template_item3'|trans }}
  586.                         </a>
  587.                         <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
  588.                             {%  for p in frontend_page %}
  589.                                 {% if p.adminLink == 'admin_page_pedagogy' %}
  590.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_student_parent') }}#{{ p.slug }}">{{ p.name }}</a></li>
  591.                                 {% endif %}
  592.                                 {% if p.adminLink == 'admin_page_calendar' %}
  593.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_student_parent') }}#{{ p.slug }}">{{ p.name }}</a></li>
  594.                                 {% endif %}
  595.                                 {% if p.adminLink == 'admin_page_admission' %}
  596.                                     <li><a class="dropdown-item text-primary" href="{{ path('page_student_parent') }}#{{ p.slug }}">{{ p.name }}</a></li>
  597.                                 {% endif %}
  598.                                 {% if p.adminLink == 'admin_page_students' %}
  599.                                     <li><a target="_blank" class="dropdown-item text-primary" href="{{ path('app_show_frontend_page',{'slug':p.slug}) }}" style="font-weight: bold"><strong style="color:red;font-weight:bold;font-size:16px">F</strong>inote</a></li>
  600.                                 {% endif %}
  601.                                 {% if p.adminLink == 'admin_page_bank_of_test' %}
  602.                                     <li><a class="dropdown-item text-primary" href="{{ path('app_show_frontend_page',{'slug':p.slug}) }}">{{ p.name }}</a></li>
  603.                                 {% endif %}
  604.                             {% endfor %}
  605.                         </ul>
  606.                     </div>
  607.                 </div>
  608.                 <div style="width: 30%" class="head-5 lastMenu">
  609.                 <div class="nav-item dropdown list-item">
  610.             <a class="nav-link dropdown-toggle text-center minimalist_item text-primary " href="#" id="navbarDropdown5" role="button" data-bs-toggle="dropdown" aria-expanded="false">
  611.                 {{ 'minimalis_template_item4'|trans }}
  612.             </a>
  613.             <ul class="dropdown-menu" aria-labelledby="navbarDropdown">
  614.                 {%  for p in frontend_page %}
  615.                     {% if p.adminLink == 'admin_page_gallery' %}
  616.                         <li><a class="dropdown-item text-primary" href="{{ path('app_show_frontend_page',{'slug':p.slug}) }}">{{ p.name }}</a></li>
  617.                     {% endif %}
  618.                 {% endfor %}
  619.             </ul>
  620.         </div>
  621.              </div>
  622.             </div>
  623.             <div class="flex-shrink-0" style="width: 3%;margin-left: 2%;" id="left-margin">
  624.                 <a id="right-button" style="" href="#" class="btn-right btn-link toggle text-dark"><i style="" class="bi bi-caret-right"></i></a>
  625.             </div>
  626.         </div>
  627.         <div class="card-body " style="padding: 0rem 0rem;">
  628.             <div class="">
  629.                 <div id="mobile-background" style="position: absolute;filter: blur(2px);-webkit-filter: blur(2px);" class="container-fluid"></div>
  630.                 {% if images_slider|length >0 %}
  631.                     <div class="" id="carroussel-desktop">
  632.                         <div id="carouselExampleIndicators" class="carousel slide mb-5" data-bs-ride="carousel" style=" background: transparent;" >
  633.                             <div class="carousel-indicators">
  634.                                 {% for im in images_slider  %}
  635.                                     <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="{{ loop.index -1 }}" class="active" aria-current="true" aria-label="Slide {{ loop.index }}"></button>
  636.                                 {% endfor %}
  637.                             </div>
  638.                             <div class="carousel-inner">
  639.                                 {% for im in images_slider  %}
  640.                                     <div id="img-{{ loop.index}}" class="carousel-item {% if loop.index == 1 %}active{% endif %}" style="">
  641.                                         {% if im.image == '' %}
  642.                                             <img style="max-height: 600px;object-fit:fill;" class="d-block  " src="{{ asset('assets/media/avatars/background.jpeg') }}" alt="">
  643.                                         {% else %}
  644.                                             <img style="max-height: 600px;object-fit: fill; margin: auto;"  class="d-block  " src="{{ asset('uploads/'~im.image) }}" alt="">
  645.                                         {% endif %}
  646.                                         <div class="carousel-caption " style="text-align: center;padding: 10px;opacity: 0.8">
  647.                                             <h3 class="home-title school-name" style="text-shadow: 1px 1px 2px #f1edf3, 0 0 1em #f1edf3, 0 0 0.2em #f1edf3;color: {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %} !important" >
  648.                                                 {{ school_global.name }}
  649.                                             </h3>
  650.                                             <p>
  651.                                                 {% if school_global.slogan != ''  %}
  652.                                                     <span style="font-size: 12px;color: {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %} !important;text-shadow: 1px 1px 2px #f1edf3, 0 0 1em #f1edf3, 0 0 0.2em #f1edf3">{{ school_global.slogan }}</span>
  653.                                                 {% endif %}
  654.                                             </p>
  655.                                         </div>
  656.                                     </div>
  657.                                 {% endfor %}
  658.                             </div>
  659.                             <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="prev">
  660.                                 <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  661.                                 <span class="visually-hidden">Previous</span>
  662.                             </button>
  663.                             <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide="next">
  664.                                 <span class="carousel-control-next-icon" aria-hidden="true"></span>
  665.                                 <span class="visually-hidden">Next</span>
  666.                             </button>
  667.                         </div>
  668.                     </div>
  669.                     <div class="" id="carroussel-mobile">
  670.                         <div id="carouselExampleIndicators2" class="carousel slide mb-5" data-bs-ride="carousel" style=" background: transparent;" >
  671.                             <div class="carousel-indicators">
  672.                                 {% for im in images_slider  %}
  673.                                     <button type="button" data-bs-target="#carouselExampleIndicators" data-bs-slide-to="{{ loop.index -1 }}" class="active" aria-current="true" aria-label="Slide {{ loop.index }}"></button>
  674.                                 {% endfor %}
  675.                             </div>
  676.                             <div class="carousel-inner">
  677.                                 {% for im in images_slider  %}
  678.                                     <div id="img-mini-{{ loop.index}}" class="carousel-item {% if loop.index == 1 %}active{% endif %}"
  679.                                             {% if im.imageMini == '' %}
  680.                                                 style="background-image: url('{{ asset('uploads/'~im.image) }}');height: 600px;object-fit: fill;background-size: cover;background-position: 50% 50%;background-repeat: no-repeat"
  681.                                             {% else %}
  682.                                                 style="background-image: url('{{ asset('uploads/'~im.imageMini) }}');height: 600px;object-fit: fill;background-size:cover;background-position: 50% 50%;background-repeat: no-repeat"
  683.                                             {% endif %}
  684.                                     >
  685.                                         <div class="carousel-caption " style="text-align: left;padding: 10px;opacity: 0.8">
  686.                                             <h3 class="home-title school-name" style="color: {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %} !important">
  687.                                                 {{ school_global.name }}
  688.                                             </h3>
  689.                                             <p>
  690.                                                 {% if school_global.slogan != ''  %}
  691.                                                     <span style="font-size: 12px;color: {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %} !important">{{ school_global.slogan }}</span>
  692.                                                 {% endif %}
  693.                                             </p>
  694.                                         </div>
  695.                                     </div>
  696.                                 {% endfor %}
  697.                             </div>
  698.                             <button class="carousel-control-prev" type="button" data-bs-target="#carouselExampleIndicators2" data-bs-slide="prev">
  699.                                 <span class="carousel-control-prev-icon" aria-hidden="true"></span>
  700.                                 <span class="visually-hidden">Previous</span>
  701.                             </button>
  702.                             <button class="carousel-control-next" type="button" data-bs-target="#carouselExampleIndicators2" data-bs-slide="next">
  703.                                 <span class="carousel-control-next-icon" aria-hidden="true"></span>
  704.                                 <span class="visually-hidden">Next</span>
  705.                             </button>
  706.                         </div>
  707.                     </div>
  708.                 {% endif %}
  709.             </div>
  710.             {%  for p in frontend_page %}
  711.                 {% if p.adminLink == 'admin_page_director_speech' %}
  712.                     {% if p.richText != ''  %}
  713.                     <div class="row container scrool-div" id="{{ p.slug }}" style="margin-top: 32px">
  714.                         <div class="richText">
  715.                             <div class="ck ck-content ck-editor__editable ck-rounded-corners ck-editor__editable_inline ck-read-only ck-blurred" lang="en" dir="ltr" role="textbox" aria-label="Rich Text Editor, main" contenteditable="false">
  716.                                 {{  p.richText|raw }}
  717.                             </div>
  718.                         </div>
  719.                     </div>
  720.                     {% endif %}
  721.                 {% endif %}
  722.             {% endfor %}
  723.             <main class="scrool-div" id="d-b" style="min-height: {% if articles|length > 0%}400px{% else %} 50px {% endif %};margin-top: 50px">
  724.                 {%  if display_articles == 1 %}
  725.                     <!-- ======= News ======= -->
  726.                     {% if articles|length > 0%}
  727.                         <section id="article" class="about-us" style="margin-top: 32px">
  728.                             <div id="blogSlider" class="  mb-100">
  729.                                 <div class="section-title">
  730.                                     <a href="{{ path('app_show_frontend_page',{'slug':page_blog.slug}) }}"> <h2 class="bold text-center text-primary" style="text-align: center">{{ page_blog.name }}</h2></a>
  731.                                 </div>
  732.                                 <div class="MS-content ">
  733.                                     {% for a in articles %}
  734.                                         <div  class="item card" style="margin: 0rem!important;">
  735.                                             <div class="imgTitle">
  736.                                                 {% if a.imageCover == '' %}
  737.                                                     <img onclick='window.location = "{{ path('blog_show_article',{slug:a.slug}) }}"' style="height: 200px;cursor: pointer;object-fit: cover" src="{{ asset('assets/media/avatars/blank.png') }}" alt="" />
  738.                                                 {% else %}
  739.                                                     <img  onclick='window.location = "{{ path('blog_show_article',{slug:a.slug}) }}"' style="height: 200px;cursor: pointer;object-fit: cover" src="{{ asset('uploads/'~a.imageCover) }}" alt="" />
  740.                                                 {% endif %}
  741.                                             </div>
  742.                                             <h5  class="trun" style="height: 30px;padding-top: 4px">
  743.                                                 <a style="font-size: 14px;color: black"  href="{{ path('blog_show_article',{slug:a.slug}) }}">
  744.                                                     {{ a.title|slice(0,40) }} {% if a.title|length >40 %} ...{% endif %}
  745.                                                 </a>
  746.                                             </h5>
  747.                                             <div class="trun" style="font-size: 13px;">
  748.                                                 {{ a.content|striptags|u.truncate(50, '...')|raw  }}
  749.                                             </div>
  750.                                             <div class="read-more mt-2">
  751.                                                 <a style="font-size: 11px" class="btn btn-link btn-get-started " href="{{ path('blog_show_article',{slug:a.slug}) }}">{{ 'read_more'|trans }}</a>
  752.                                             </div>
  753.                                         </div>
  754.                                     {% endfor %}
  755.                                     {% for a in educati_articles %}
  756.                                         <div  class="item card" style="margin: 0rem!important;">
  757.                                             <div class="imgTitle">
  758.                                                 <img onclick='window.open("{{ educati_article_show~a.slug  }}", "_blank");' style="height: 200px;cursor: pointer;object-fit: cover" src="{{ educati_uploads_dir }}{{ a.image_cover }}" alt="" />
  759.                                             </div>
  760.                                             <h5  class="trun" style="height: 30px;padding-top: 4px">
  761.                                                 <a style="font-size: 14px;color: black" target="_blank"  href="{{ educati_article_show~a.slug  }}">
  762.                                                     {{ a.title|slice(0,40) }} {% if a.title|length >40 %} ...{% endif %}
  763.                                                 </a>
  764.                                             </h5>
  765.                                             <div class="trun" style="font-size: 13px;">
  766.                                                 {{ a.content|striptags|u.truncate(50, '...')|raw  }}
  767.                                             </div>
  768.                                             <div class="read-more mt-2">
  769.                                                 <a style="font-size: 11px" target="_blank" class="btn btn-link btn-get-started " href="{{ educati_article_show~a.slug }}">{{ 'read_more'|trans }}</a>
  770.                                             </div>
  771.                                         </div>
  772.                                     {% endfor %}
  773.                                 </div>
  774.                                 <div class="MS-controls">
  775.                                     <button class="MS-left"><i class="bi bi-arrow-left" aria-hidden="true"></i></button>
  776.                                     <button class="MS-right"><i class="bi bi-arrow-right" aria-hidden="true"></i></button>
  777.                                 </div>
  778.                             </div>
  779.                         </section>
  780.                     {% else %}
  781.                         {% if educati_articles|length > 0 %}
  782.                             <section id="article" class="about-us" style="margin-top: 32px">
  783.                                 <div id="blogSlider" class="  mb-100">
  784.                                     <div class="section-title">
  785.                                         <a href="{{ path('app_show_frontend_page',{'slug':page_blog.slug}) }}"> <h2 class="bold text-center text-primary" style="text-align: center">{{ page_blog.name }}</h2></a>
  786.                                     </div>
  787.                                     <div class="MS-content ">
  788.                                         {% for a in educati_articles %}
  789.                                             <div  class="item card" style="margin: 0rem!important;">
  790.                                                 <div class="imgTitle">
  791.                                                     <img onclick='window.open("{{ educati_article_show~a.slug  }}", "_blank");' style="height: 200px;cursor: pointer;object-fit: cover" src="{{ educati_uploads_dir }}{{ a.image_cover }}" alt="" />
  792.                                                 </div>
  793.                                                 <h5  class="trun" style="height: 30px;padding-top: 4px">
  794.                                                     <a style="font-size: 14px;color: black" target="_blank"  href="{{ educati_article_show~a.slug  }}">
  795.                                                         {{ a.title|slice(0,40) }} {% if a.title|length >40 %} ...{% endif %}
  796.                                                     </a>
  797.                                                 </h5>
  798.                                                 <div class="trun" style="font-size: 13px;">
  799.                                                     {{ a.content|striptags|u.truncate(50, '...')|raw  }}
  800.                                                 </div>
  801.                                                 <div class="read-more mt-2">
  802.                                                     <a style="font-size: 11px" target="_blank" class="btn btn-link btn-get-started " href="{{ educati_article_show~a.slug }}">{{ 'read_more'|trans }}</a>
  803.                                                 </div>
  804.                                             </div>
  805.                                         {% endfor %}
  806.                                     </div>
  807.                                     <div class="MS-controls">
  808.                                         <button class="MS-left"><i class="bi bi-arrow-left" aria-hidden="true"></i></button>
  809.                                         <button class="MS-right"><i class="bi bi-arrow-right" aria-hidden="true"></i></button>
  810.                                     </div>
  811.                                 </div>
  812.                             </section>
  813.                         {% endif %}
  814.                     {% endif %}
  815.                 {% else %}
  816.                     {% if images|length >0 %}
  817.                         {%  for p in frontend_page %}
  818.                         {% if p.adminLink == 'admin_page_gallery' %}
  819.                             <a href="{{ path('app_show_frontend_page',{'slug':p.slug}) }}"> <h2 class="mb-5 bold text-center text-primary" style="text-align: center;margin-top: 32px">{{ p.name }} </h2></a>
  820.                         {% endif %}
  821.                         {% endfor %}
  822.                         <div class="gallery">
  823.                             {% for img in images %}
  824.                                 {% if loop.index <= 3 %}
  825.                                 <a href="{{ asset('uploads/'~img.image) }}" class="big" rel="rel1">
  826.                                     <img style="max-height: 300px;object-fit: cover;" class="img-fluid" src="{{ asset('uploads/'~img.image) }}" alt="" title="{{ img.description|raw }}">
  827.                                 </a>
  828.                                 {% endif %}
  829.                             {% endfor %}
  830.                         </div>
  831.                     {% endif %}
  832.                 {% endif %}
  833.             </main>
  834.             {% if info != null %}
  835.             <div id="summary_page" class="scrool-div d-flex flex-column flex-row-fluid" style="margin-top: 32px">
  836.                 <div class="card-body row pt-head">
  837.                     <h2 class="bold text-center text-primary">{{ 'summary_page'|trans }}</h2>
  838.                         <div class="row container-fluid">
  839.                             {% if  info.creationYear != '' %}
  840.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  841.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/from.jpg') }}");'>
  842.                                         <p><span class="fs-6">{{ 'from_origin'|trans }} </span><br/> {{ info.creationYear }}</p>
  843.                                     </div>
  844.                                     <div class="back">
  845.                                         <div>
  846.                                             <div class="release_date"> <span>{{ 'creation_year'|trans}} <br/> ({{ info.creationYear }})</span></div>
  847.                                         </div>
  848.                                     </div>
  849.                                 </div>
  850.                             {% endif %}
  851.                             {% if  info.schoolReligion != null  %}
  852.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  853.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/religion2.jpeg') }}");'>
  854.                                         <p><span class="fs-6">{{ 'school_religion'|trans}}</span><br/>{{ info.schoolReligion.name }}</p>
  855.                                     </div>
  856.                                     <div class="back">
  857.                                         <div>
  858.                                             <div class="release_date">{{ 'school_religion'|trans}} <br/> {{ info.schoolReligion.name }}</div>
  859.                                         </div>
  860.                                     </div>
  861.                                 </div>
  862.                             {% endif %}
  863.                             {% if info.schoolCycles|length >0 %}
  864.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  865.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/level.png') }}");'>
  866.                                         <p>
  867.                                             <span class="fs-6">{{ 'school_cycle'|trans}}</span>
  868.                                             {% for c in info.schoolCycles  %}
  869.                                                 <br/> {{ c.name }}
  870.                                             {% endfor %}
  871.                                         </p>
  872.                                     </div>
  873.                                     <div class="back">
  874.                                         <div>
  875.                                             <div class="release_date">
  876.                                                 {{ 'school_cycle'|trans}} <br/>
  877.                                                 {% for c in info.schoolCycles  %}
  878.                                                     <br/> {{ c.name }}
  879.                                                 {% endfor %}
  880.                                             </div>
  881.                                         </div>
  882.                                     </div>
  883.                                 </div>
  884.                             {% endif %}
  885.                             {% if  info.nbStudent != '' %}
  886.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  887.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/student.jpeg') }}");'>
  888.                                         <p> <span class="fs-6">{{ 'nb_student'|trans}}</span><br/>{{ info.nbStudent }}</p>
  889.                                     </div>
  890.                                     <div class="back">
  891.                                         <div>
  892.                                             <div class="release_date">{{ 'nb_student'|trans}} <br/> {{ info.nbStudent }}</div>
  893.                                         </div>
  894.                                     </div>
  895.                                 </div>
  896.                             {% endif %}
  897.                             {% if  info.schoolLanguage != null  %}
  898.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  899.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/language.jpeg') }}");'>
  900.                                         <p> <span class="fs-6">{{ 'school_language'|trans}}</span><br/>{{ info.schoolLanguage.name }}</p>
  901.                                     </div>
  902.                                     <div class="back">
  903.                                         <div>
  904.                                             <div class="release_date">{{ 'school_language'|trans}} <br/> {{ info.schoolLanguage.name }}</div>
  905.                                         </div>
  906.                                     </div>
  907.                                 </div>
  908.                             {% endif %}
  909.                             {% if  info.schoolFee != null  %}
  910.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  911.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/fee.jpeg') }}");'>
  912.                                         <p><span class="fs-6">{{ 'school_fee'|trans}} </span><br/>{{ info.schoolFee.name }}</p>
  913.                                     </div>
  914.                                     <div class="back">
  915.                                         <div>
  916.                                             <div class="release_date">{{ 'school_fee'|trans}} <br/> {{ info.schoolFee.name }}</div>
  917.                                         </div>
  918.                                     </div>
  919.                                 </div>
  920.                             {% endif %}
  921.                             {% if  info.hasTransportService  %}
  922.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  923.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/bus.jpeg') }}");'>
  924.                                         <p><span class="fs-6">{{ 'transport_service'|trans }}</span></p>
  925.                                     </div>
  926.                                     <div class="back">
  927.                                         <div>
  928.                                             <div class="release_date">{{ 'transport_service'|trans }}</div>
  929.                                         </div>
  930.                                     </div>
  931.                                 </div>
  932.                             {% endif %}
  933.                             {% if  info.hasShoolCafetaria  %}
  934.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  935.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/cafetaria.jpeg') }}");'>
  936.                                         <p><span class="fs-6">{{ 'school_cafetaria'|trans }}</span></p>
  937.                                     </div>
  938.                                     <div class="back">
  939.                                         <div>
  940.                                             <div class="release_date">{{ 'school_cafetaria'|trans }}</div>
  941.                                         </div>
  942.                                     </div>
  943.                                 </div>
  944.                             {% endif %}
  945.                             {% if  info.nbStaff != '' %}
  946.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  947.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/staff.jpeg') }}");'>
  948.                                         <p><span class="fs-6">{{ 'staff_member'|trans}}</span> <br/> {{ info.nbStaff  }}</p>
  949.                                     </div>
  950.                                     <div class="back">
  951.                                         <div>
  952.                                             <div class="release_date">{{ 'staff_member'|trans}} <br/> {{ info.nbStaff  }}</div>
  953.                                         </div>
  954.                                     </div>
  955.                                 </div>
  956.                             {% endif %}
  957.                             {% if  info.hasBoardingSchoolBoy  or info.hasBoardingSchoolGirl   %}
  958.                                 <div class="card col-lg-4 col-md-4 col-sm-6">
  959.                                     <div class="frontWeb" style='background-image: url("{{ asset('assets/media/avatars/bed.jpeg') }}");'>
  960.                                         <p>
  961.                                             {% if info.hasBoardingSchoolBoy %}
  962.                                                 <span class="fs-6"> {{ 'boarding_school_boy'|trans }}</span>
  963.                                                 <br/>
  964.                                             {% endif %}
  965.                                             {% if info.hasBoardingSchoolGirl %}
  966.                                                 <span class="fs-6"> {{ 'boarding_school_girl'|trans }}</span>
  967.                                             {% endif %}
  968.                                         </p>
  969.                                     </div>
  970.                                     <div class="back">
  971.                                         <div>
  972.                                             <div class="release_date">
  973.                                                 {% if info.hasBoardingSchoolBoy %}
  974.                                                     {{ 'boarding_school_boy'|trans }}
  975.                                                     <br/>
  976.                                                 {% endif %}
  977.                                                 {% if info.hasBoardingSchoolGirl %}
  978.                                                     {{ 'boarding_school_girl'|trans }}
  979.                                                 {% endif %}
  980.                                             </div>
  981.                                         </div>
  982.                                     </div>
  983.                                 </div>
  984.                             {% endif %}
  985.                         </div>
  986.                 </div>
  987.             </div>
  988.             {% endif %}
  989.         </div>
  990.     </div>
  991. {% endblock %}
  992.  {% block js %}
  993.      <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.2.0/js/tether.min.js"></script>
  994.      <script src="https://cdnjs.cloudflare.com/ajax/libs/color-thief/2.3.0/color-thief.umd.js"></script>
  995.      <script src="{{ asset('assets/plugins/custom/ckeditor/ckeditor-classic.bundle.js') }}"></script>
  996.      <script src="{{ asset('assets/js/intense.min.js') }}"></script>
  997.      <script src="{{ asset('assets/js/multislider.min.js') }}"></script>
  998.      <script src="{{ asset('assets/js/simple-lightbox.jquery.min.js') }}"></script>
  999.      <script>
  1000.          var gallery = $('.gallery a').simpleLightbox({
  1001.          });
  1002.          var dropdown1 = new bootstrap.Dropdown(document.getElementById('navbarDropdown1'), {
  1003.              popperConfig: function (defaultBsPopperConfig) {
  1004.              }
  1005.          });
  1006.          var dropdown2 = new bootstrap.Dropdown(document.getElementById('navbarDropdown2'), {
  1007.              popperConfig: function (defaultBsPopperConfig) {
  1008.              }
  1009.          });
  1010.          var dropdown3 = new bootstrap.Dropdown(document.getElementById('navbarDropdown3'), {
  1011.              popperConfig: function (defaultBsPopperConfig) {
  1012.              }
  1013.          });
  1014.          var dropdown4 = new bootstrap.Dropdown(document.getElementById('navbarDropdown4'), {
  1015.              popperConfig: function (defaultBsPopperConfig) {
  1016.              }
  1017.          });
  1018.          var dropdown5 = new bootstrap.Dropdown(document.getElementById('navbarDropdown5'), {
  1019.              popperConfig: function (defaultBsPopperConfig) {
  1020.              }
  1021.          });
  1022.          window.addEventListener('scroll', function(e) {
  1023.              dropdown1.hide();
  1024.              dropdown2.hide();
  1025.              dropdown3.hide();
  1026.              dropdown4.hide();
  1027.              dropdown5.hide();
  1028.          });
  1029.          window.onload = function() {
  1030.              var elements = document.querySelectorAll( '.demo' );
  1031.              Intense( elements );
  1032.          }
  1033.          $('#right-button').click(function() {
  1034.              event.preventDefault();
  1035.              $('#nav-link').animate({
  1036.                  scrollLeft: "+=300px"
  1037.              }, "fast");
  1038.          });
  1039.          $('#left-button').click(function() {
  1040.              event.preventDefault();
  1041.              $('#nav-link').animate({
  1042.                  scrollLeft: "-=300px"
  1043.              }, "fast");
  1044.          });
  1045.      </script>
  1046.      {%  if display_articles == 1 %}
  1047.      <script type="text/javascript">
  1048.          $('#blogSlider').multislider({
  1049.              interval: 4000,
  1050.              slideAll: false,
  1051.              duration: 2000
  1052.          });
  1053.          // duration of scroll animation
  1054.      </script>
  1055.      {% endif %}
  1056.      <script>
  1057.          const colorThief = new ColorThief();
  1058.          const rgbToHex = (r, g, b) => '#' + [r, g, b].map(x => {
  1059.              const hex = x.toString(16)
  1060.              return hex.length === 1 ? '0' + hex : hex
  1061.          }).join('')
  1062.          function getImageMainColor(id){
  1063.              const img = new Image();
  1064.              img.crossOrigin = 'Anonymous';
  1065.              img.src = $('#img-'+id).attr('data-url');
  1066.              img.addEventListener('load', function() {
  1067.                  let color =   colorThief.getColor(img);
  1068.                  let hex = rgbToHex(color[0],color[1],color[2]);
  1069.                  if($('#img-'+id).attr('data-url') !== undefined){
  1070.                      let link = $('#img-'+id.toString()).attr('data-url');
  1071.                      $('#mobile-background').css('width',document. getElementById('carouselExampleIndicators').getBoundingClientRect().width);
  1072.                      $('#mobile-background').css('height',document. getElementById('carouselExampleIndicators').getBoundingClientRect().height);
  1073.                      //$('#mobile-background').css('height',document. getElementById('carouselExampleIndicators').getBoundingClientRect().height);
  1074.                      $('#mobile-background').css('background-image',"url('"+link+"')");
  1075.                      //$('#back-image').css('background-size',"cover");
  1076.                      $('#mobile-background').css('background-size',"cover");
  1077.                      $('.carousel-control-prev-icon').css('color',invertHex(hex.split('#')[1]));
  1078.                      $('.carousel-control-next-icon').css('color',invertHex(hex.split('#')[1]));
  1079.                  }else{
  1080.                      $('#carouselExampleIndicators').css('background-color','transparent');
  1081.                  }
  1082.              });
  1083.          }
  1084.          function invertHex(hexnum){
  1085.              if(hexnum.length != 6) {
  1086.                  return "ffffff";
  1087.              }
  1088.              hexnum = hexnum.toUpperCase();
  1089.              var splitnum = hexnum.split("");
  1090.              var resultnum = "";
  1091.              var simplenum = "FEDCBA9876".split("");
  1092.              var complexnum = new Array();
  1093.              complexnum.A = "5";
  1094.              complexnum.B = "4";
  1095.              complexnum.C = "3";
  1096.              complexnum.D = "2";
  1097.              complexnum.E = "1";
  1098.              complexnum.F = "0";
  1099.              for(i=0; i<6; i++){
  1100.                  if(!isNaN(splitnum[i])) {
  1101.                      resultnum += simplenum[splitnum[i]];
  1102.                  } else if(complexnum[splitnum[i]]){
  1103.                      resultnum += complexnum[splitnum[i]];
  1104.                  } else {
  1105.                      console.error("Hex colors must only include hex numbers 0-9, and A-F");
  1106.                      return false;
  1107.                  }
  1108.              }
  1109.              return '#'+resultnum;
  1110.          }
  1111.          $('#carouselExampleIndicators').on('slide.bs.carousel', function (e) {
  1112.              getImageMainColor(parseInt(e.to,10)+1);
  1113.          });
  1114.          if($('img-1') !== undefined){
  1115.              getImageMainColor(1);
  1116.          }
  1117.          $('#carouselExampleIndicators').on('slide.bs.carousel', function (e) {
  1118.              getImageMainColor(parseInt(e.to,10)+1);
  1119.          })
  1120.          window.addEventListener('resize', function(event) {
  1121.              $('#mobile-background').css('width',document. getElementById('carouselExampleIndicators').getBoundingClientRect().width);
  1122.              $('#mobile-background').css('height',document. getElementById('carouselExampleIndicators').getBoundingClientRect().height);
  1123.          }, true);
  1124.      </script>
  1125.      <script>
  1126.      </script>
  1127.  {% endblock %}