templates/blog/show_article_model_1.html.twig line 1

Open in your IDE?
  1. {% extends 'base_simple.html.twig' %}
  2. {% block css %}
  3.     <style>
  4.         @media only screen and (max-width: 425px){
  5.             .main-body{
  6.                 margin-top: 30px!important;
  7.             }
  8.         }
  9.         .blog {
  10.             padding: 40px 0 20px 0;
  11.         }
  12.         .blog .entry {
  13.             padding: 30px;
  14.             margin-bottom: 60px;
  15.             box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.4);
  16.         }
  17.         .blog .entry .entry-img {
  18.             max-height: 500px;
  19.             /*margin: -30px -30px 20px -30px;*/
  20.             overflow: hidden;
  21.             text-align: center;
  22.         }
  23.         .blog .entry .entry-title {
  24.             font-size: 20px;
  25.             font-weight: bold;
  26.             padding: 0;
  27.             margin: 0 0 20px 0;
  28.         }
  29.         .blog .entry .entry-title a {
  30.             color: #111;
  31.             transition: 0.3s;
  32.         }
  33.         .blog .entry .entry-title a:hover {
  34.             color: #0084d6;
  35.         }
  36.         .blog .entry .entry-meta {
  37.             margin-bottom: 15px;
  38.             color: #aaaaaa;
  39.         }
  40.         .blog .entry .entry-meta ul {
  41.             display: flex;
  42.             flex-wrap: wrap;
  43.             list-style: none;
  44.             padding: 0;
  45.             margin: 0;
  46.         }
  47.         .blog .entry .entry-meta ul li + li {
  48.             padding-left: 20px;
  49.         }
  50.         .blog .entry .entry-meta i {
  51.             font-size: 14px;
  52.             padding-right: 4px;
  53.         }
  54.         .blog .entry .entry-meta a {
  55.             color: #5e5e5e;
  56.             font-size: 14px;
  57.             display: inline-block;
  58.             line-height: 20px;
  59.             transition: 0.3s;
  60.         }
  61.         .blog .entry .entry-meta a:hover {
  62.             color: #0084d6;
  63.         }
  64.         .blog .entry .entry-content p {
  65.             line-height: 24px;
  66.         }
  67.         .blog .entry .entry-content .read-more {
  68.             -moz-text-align-last: right;
  69.             text-align-last: right;
  70.         }
  71.         .blog .entry .entry-content .read-more a {
  72.             display: inline-block;
  73.             background: #0084d6;
  74.             color: #fff;
  75.             padding: 7px 25px;
  76.             transition: 0.3s;
  77.             font-size: 14px;
  78.             border-radius: 4px;
  79.         }
  80.         .blog .entry .entry-content .read-more a:hover {
  81.             background: #0084d6;
  82.         }
  83.         .blog .entry .entry-content h3 {
  84.             font-size: 22px;
  85.             margin-top: 30px;
  86.             font-weight: bold;
  87.         }
  88.         .blog .entry .entry-content blockquote {
  89.             overflow: hidden;
  90.             background-color: #fafafa;
  91.             padding: 60px;
  92.             position: relative;
  93.             text-align: center;
  94.             margin: 20px 0;
  95.         }
  96.         .blog .entry .entry-content blockquote p {
  97.             color: #4d4643;
  98.             line-height: 1.6;
  99.             margin-bottom: 0;
  100.             font-style: italic;
  101.             font-weight: 500;
  102.             font-size: 22px;
  103.         }
  104.         .blog .entry .entry-content blockquote .quote-left {
  105.             position: absolute;
  106.             left: 20px;
  107.             top: 20px;
  108.             font-size: 36px;
  109.             color: #e7e7e7;
  110.         }
  111.         .blog .entry .entry-content blockquote .quote-right {
  112.             position: absolute;
  113.             right: 20px;
  114.             bottom: 20px;
  115.             font-size: 36px;
  116.             color: #e7e7e7;
  117.         }
  118.         .blog .entry .entry-content blockquote::after {
  119.             content: '';
  120.             position: absolute;
  121.             left: 0;
  122.             top: 0;
  123.             bottom: 0;
  124.             width: 3px;
  125.             background-color: #111;
  126.             margin-top: 20px;
  127.             margin-bottom: 20px;
  128.         }
  129.         .blog .entry .entry-footer {
  130.             padding-top: 10px;
  131.             border-top: 1px solid #e6e6e6;
  132.         }
  133.         .blog .entry .entry-footer i {
  134.             color: #5e5e5e;
  135.             display: inline;
  136.         }
  137.         .blog .entry .entry-footer a {
  138.             color: #8b8b8b;
  139.             transition: 0.3s;
  140.         }
  141.         .blog .entry .entry-footer a:hover {
  142.             color: #0084d6;
  143.         }
  144.         .blog .entry .entry-footer .cats {
  145.             list-style: none;
  146.             display: inline;
  147.             padding: 0 20px 0 0;
  148.             font-size: 14px;
  149.         }
  150.         .blog .entry .entry-footer .cats li {
  151.             display: inline-block;
  152.         }
  153.         .blog .entry .entry-footer .tags {
  154.             list-style: none;
  155.             display: inline;
  156.             padding: 0;
  157.             font-size: 14px;
  158.         }
  159.         .blog .entry .entry-footer .tags li {
  160.             display: inline-block;
  161.         }
  162.         .blog .entry .entry-footer .tags li + li::before {
  163.             padding-right: 6px;
  164.             color: #6c757d;
  165.             content: ",";
  166.         }
  167.         .blog .entry .entry-footer .share {
  168.             font-size: 16px;
  169.         }
  170.         .blog .entry .entry-footer .share i {
  171.             padding-left: 5px;
  172.         }
  173.         .blog .entry-single {
  174.             margin-bottom: 30px;
  175.         }
  176.         .blog .blog-author {
  177.             padding: 20px;
  178.             margin-bottom: 30px;
  179.             box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  180.         }
  181.         .blog .blog-author img {
  182.             width: 120px;
  183.         }
  184.         .blog .blog-author h4 {
  185.             margin-left: 140px;
  186.             font-weight: 600;
  187.             font-size: 22px;
  188.             margin-bottom: 0px;
  189.             padding: 0;
  190.         }
  191.         .blog .blog-author .social-links {
  192.             margin: 0 0 5px 140px;
  193.         }
  194.         .blog .blog-author .social-links a {
  195.             color: #777777;
  196.         }
  197.         .blog .blog-author p {
  198.             margin-left: 140px;
  199.             font-style: italic;
  200.             color: #bfb9b6;
  201.         }
  202.         .blog .blog-comments {
  203.             margin-bottom: 30px;
  204.         }
  205.         .blog .blog-comments .comments-count {
  206.             font-weight: bold;
  207.         }
  208.         .blog .blog-comments .comment {
  209.             margin-top: 30px;
  210.             position: relative;
  211.         }
  212.         .blog .blog-comments .comment .comment-img {
  213.             width: 50px;
  214.         }
  215.         .blog .blog-comments .comment h5 {
  216.             margin-left: 65px;
  217.             font-size: 16px;
  218.             margin-bottom: 2px;
  219.         }
  220.         .blog .blog-comments .comment h5 a {
  221.             font-weight: bold;
  222.             color: #4d4643;
  223.             transition: 0.3s;
  224.         }
  225.         .blog .blog-comments .comment h5 a:hover {
  226.             color: #0084d6;
  227.         }
  228.         .blog .blog-comments .comment h5 .reply {
  229.             padding-left: 10px;
  230.             color: #111;
  231.         }
  232.         .blog .blog-comments .comment time {
  233.             margin-left: 65px;
  234.             display: block;
  235.             font-size: 14px;
  236.             color: #777777;
  237.             margin-bottom: 5px;
  238.         }
  239.         .blog .blog-comments .comment p {
  240.             margin-left: 65px;
  241.         }
  242.         .blog .blog-comments .comment.comment-reply {
  243.             padding-left: 40px;
  244.         }
  245.         .blog .blog-comments .reply-form {
  246.             margin-top: 30px;
  247.             padding: 30px;
  248.             box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
  249.         }
  250.         .blog .blog-comments .reply-form h4 {
  251.             font-weight: bold;
  252.             font-size: 22px;
  253.         }
  254.         .blog .blog-comments .reply-form p {
  255.             font-size: 14px;
  256.         }
  257.         .blog .blog-comments .reply-form input {
  258.             border-radius: 0;
  259.             padding: 20px 10px;
  260.             font-size: 14px;
  261.             border-radius: 4px;
  262.         }
  263.         .blog .blog-comments .reply-form input:focus {
  264.             box-shadow: none;
  265.             border-color: #0084d6;
  266.         }
  267.         .blog .blog-comments .reply-form textarea {
  268.             border-radius: 0;
  269.             padding: 10px 10px;
  270.             font-size: 14px;
  271.             border-radius: 4px;
  272.         }
  273.         .blog .blog-comments .reply-form textarea:focus {
  274.             box-shadow: none;
  275.             border-color: #0084d6;
  276.         }
  277.         .blog .blog-comments .reply-form .form-group {
  278.             margin-bottom: 25px;
  279.         }
  280.         .blog .blog-comments .reply-form .btn-primary {
  281.             padding: 8px 20px;
  282.             border: 0;
  283.             border-radius: 4px;
  284.             background-color: #0084d6;
  285.         }
  286.         .blog .blog-comments .reply-form .btn-primary:hover {
  287.             background-color: #0084d6;
  288.         }
  289.         .blog .blog-pagination {
  290.             color: #444444;
  291.         }
  292.         .blog .blog-pagination ul {
  293.             display: flex;
  294.             padding-left: 0;
  295.             list-style: none;
  296.         }
  297.         .blog .blog-pagination li {
  298.             border: 1px solid white;
  299.             margin: 0 5px;
  300.             transition: 0.3s;
  301.         }
  302.         .blog .blog-pagination li.active {
  303.             background: white;
  304.         }
  305.         .blog .blog-pagination li a {
  306.             color: #b4aca8;
  307.             padding: 7px 16px;
  308.             display: inline-block;
  309.         }
  310.         .blog .blog-pagination li.active, .blog .blog-pagination li:hover {
  311.             background: #0084d6;
  312.             border: 1px solid #0084d6;
  313.             border-radius: 4px;
  314.         }
  315.         .blog .blog-pagination li.active a, .blog .blog-pagination li:hover a {
  316.             color: #fff;
  317.         }
  318.         .blog .blog-pagination li.disabled {
  319.             background: #fff;
  320.             border: 1px solid white;
  321.         }
  322.         .blog .blog-pagination li.disabled i {
  323.             color: #f6f5f5;
  324.             padding: 10px 16px;
  325.             display: inline-block;
  326.         }
  327.         .blog .sidebar {
  328.             padding: 30px;
  329.             /*margin: 0 0 60px 20px;*/
  330.             box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
  331.         }
  332.         .blog .sidebar .sidebar-title {
  333.             font-size: 20px;
  334.             font-weight: 700;
  335.             padding: 0 0 0 0;
  336.             margin: 0 0 15px 0;
  337.             color: #111;
  338.             position: relative;
  339.         }
  340.         .blog .sidebar .sidebar-item {
  341.             margin-bottom: 30px;
  342.         }
  343.         .blog .sidebar .search-form form {
  344.             background: #fff;
  345.             border: 1px solid #ddd;
  346.             padding: 3px 10px;
  347.             position: relative;
  348.             border-radius: 4px;
  349.         }
  350.         .blog .sidebar .search-form form input[type="text"] {
  351.             border: 0;
  352.             padding: 4px;
  353.             width: calc(100% - 40px);
  354.         }
  355.         .blog .sidebar .search-form form button {
  356.             position: absolute;
  357.             top: 0;
  358.             right: 0;
  359.             bottom: 0;
  360.             border: 0;
  361.             background: none;
  362.             font-size: 16px;
  363.             padding: 0 15px;
  364.             margin: -1px;
  365.             background: #0084d6;
  366.             color: #fff;
  367.             transition: 0.3s;
  368.             border-radius: 0 4px 4px 0;
  369.         }
  370.         .blog .sidebar .search-form form button:hover {
  371.             background: #0084d6;
  372.         }
  373.         .blog .sidebar .categories ul {
  374.             list-style: none;
  375.             padding: 0;
  376.         }
  377.         .blog .sidebar .categories ul li + li {
  378.             padding-top: 10px;
  379.         }
  380.         .blog .sidebar .categories ul a {
  381.             color: #2b2b2b;
  382.             transition: 0.3s;
  383.         }
  384.         .blog .sidebar .categories ul a:hover {
  385.             color: #0084d6;
  386.         }
  387.         .blog .sidebar .categories ul a span {
  388.             padding-left: 5px;
  389.             color: #aaaaaa;
  390.             font-size: 14px;
  391.         }
  392.         .blog .sidebar .recent-posts .post-item + .post-item {
  393.             margin-top: 15px;
  394.         }
  395.         .blog .sidebar .recent-posts img {
  396.             width: 80px;
  397.             float: left;
  398.         }
  399.         .blog .sidebar .recent-posts h4 {
  400.             font-size: 15px;
  401.             margin-left: 95px;
  402.             font-weight: bold;
  403.         }
  404.         .blog .sidebar .recent-posts h4 a {
  405.             color: black;
  406.             transition: 0.3s;
  407.         }
  408.         .blog .sidebar .recent-posts h4 a:hover {
  409.             color: #0084d6;
  410.         }
  411.         .blog .sidebar .recent-posts time {
  412.             display: block;
  413.             margin-left: 95px;
  414.             font-style: italic;
  415.             font-size: 14px;
  416.             color: #777777;
  417.         }
  418.         .blog .sidebar .tags {
  419.             margin-bottom: -10px;
  420.         }
  421.         .blog .sidebar .tags ul {
  422.             list-style: none;
  423.             padding: 0;
  424.         }
  425.         .blog .sidebar .tags ul li {
  426.             display: inline-block;
  427.         }
  428.         .blog .sidebar .tags ul a {
  429.             color: #515151;
  430.             font-size: 14px;
  431.             padding: 6px 14px;
  432.             margin: 0 6px 8px 0;
  433.             border: 1px solid #dddddd;
  434.             display: inline-block;
  435.             transition: 0.3s;
  436.             border-radius: 4px;
  437.         }
  438.         .blog .sidebar .tags ul a:hover {
  439.             color: #fff;
  440.             border: 1px solid #0084d6;
  441.             background: #0084d6;
  442.         }
  443.         .blog .sidebar .tags ul a span {
  444.             padding-left: 5px;
  445.             color: #aaaaaa;
  446.             font-size: 14px;
  447.         }
  448.         .widget {
  449.             position: relative;
  450.             display: block;
  451.             margin-bottom: 30px;
  452.         }
  453.         .widget_title {
  454.             background-color: #fff;
  455.             z-index: 3;
  456.         }
  457.         .widget_title:after {
  458.             position: relative;
  459.             display: inline-block;
  460.             bottom: 35px;
  461.             left: 52%;
  462.             content: " ";
  463.             width: 50%;
  464.             border-top: 2px solid #eee;
  465.             z-index: 1;
  466.         }
  467.         .widget_black h2:after {
  468.             display: table;
  469.             position: relative;
  470.             left: 50%;
  471.             bottom: 10px;
  472.             height: 2px;
  473.             content: " ";
  474.             text-shadow: none;
  475.             width: 15%;
  476.             background-color: #000;
  477.             z-index: 2;
  478.         }
  479.         .widget i:hover {
  480.             color: #f7510f;
  481.             cursor: pointer;
  482.         }
  483.         .widget_adv {
  484.             text-align: center;
  485.             margin: 30px;
  486.         }
  487.         .widget_advertisement {
  488.             text-align: center;
  489.             margin: 30px 0;
  490.         }
  491.         .widget_body img {
  492.             float: left;
  493.             position: relative;
  494.             margin-right: 25px;
  495.         }
  496.         .widget .add_img {
  497.             display: inline-block;
  498.             padding: 12px 12px;
  499.         }
  500.         .widget .media {
  501.             margin-top: 0;
  502.             margin-bottom: 30px;
  503.         }
  504.         .widget .media-heading {
  505.             margin-bottom: 5px;
  506.             font-size: 15px;
  507.             line-height: 18px;
  508.         }
  509.         .widget .media-date {
  510.             color: #b2b0b0;
  511.         }
  512.         .widget_article_social {
  513.             color: #a5a5a5;
  514.             margin-top: 15px;
  515.         }
  516.         .widget_article_social i {
  517.             padding: 5px;
  518.             margin-right: 5px;
  519.             color: #fff;
  520.             font-size: 10px;
  521.             background-color: #a5a5a5;
  522.         }
  523.         .widget_article_social span {
  524.             margin-right: 10px;
  525.         }
  526.         .widget_article_social a {
  527.             font-weight: bold;
  528.         }
  529.         .widget_img {
  530.             text-align: center;
  531.             margin: 0 auto;
  532.         }
  533.         .widget .adv_img {
  534.             display: inline-block;
  535.         }
  536.         .widget_body .btn {
  537.             border-radius: 0;
  538.         }
  539.         .widget hr {
  540.             border-color: #e0e0e0;
  541.         }
  542.         .widget-title hr {
  543.             border-width: 4px;
  544.             margin-bottom: 0;
  545.         }
  546.         .widget-title hr:before {
  547.             width: 80px;
  548.             background-color: #ddd;
  549.             display: block;
  550.             height: 4px;
  551.             position: relative;
  552.             content: "";
  553.             top: -4px;
  554.         }
  555.         .widget_divider {
  556.             display: inline-block;
  557.             vertical-align: baseline;
  558.             zoom: 1;
  559.             width: 98%;
  560.             position: relative;
  561.             text-align: right;
  562.             text-transform: uppercase;
  563.             font-size: 11px;
  564.         }
  565.         .widget_divider::after {
  566.             content: '';
  567.             display: block;
  568.             width: 75%;
  569.             left: 0;
  570.             text-align: right;
  571.             position: absolute;
  572.             top: 12px;
  573.             border-top: 1px solid #f1f1f1;
  574.         }
  575.         .media-body, .media-left, .media-right{
  576.             display: table-cell;
  577.             vertical-align: top;
  578.         }
  579.         .media-left, .media > .pull-left{
  580.             padding-right: 10px;
  581.         }
  582.         .media-body{
  583.         }
  584.         .ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){
  585.             border-color: transparent!important;
  586.         }
  587.         .ck.ck-editor__main>.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{
  588.             border: transparent!important;
  589.         }
  590.         .padded {
  591.             padding: 100px 0;
  592.         }
  593.         .wrapper-grey {
  594.             background: #F4F4F4;
  595.         }
  596.         .avatar {
  597.             width: 30px;
  598.             border-radius: 50%;
  599.         }
  600.         .avatar-bordered {
  601.             box-shadow: 0 1px 2px rgba(0,0,0,0.2);
  602.             border: white 1px solid;
  603.         }
  604.         .avatar-large {
  605.             width: 50px;
  606.         }
  607.         /* .banner {
  608.           color: white;
  609.           text-align: center;
  610.           height: 100vh;
  611.           background-size: cover !important;
  612.           display: flex;
  613.           align-items: center;
  614.           justify-content: center;
  615.         }
  616.         .banner h1 {
  617.           font-size: 50px;
  618.           font-weight: bold;
  619.           text-shadow: 0px 1px rgba(0, 0, 0, 0.2);
  620.         }
  621.         .banner p {
  622.           font-size: 25px;
  623.           font-weight: lighter;
  624.           color: rgba(255, 255, 255, 0.8);
  625.           margin-bottom: 50px;
  626.         } */
  627.         .card {
  628.             height: 250px;
  629.             text-shadow: 0 1px 3px rgba(0,0,0,0.6);
  630.             background-size: cover !important;
  631.             color: white;
  632.             position: relative;
  633.             border-radius: 5px;
  634.             margin-bottom: 20px;
  635.         }
  636.         .card-user {
  637.             position: absolute;
  638.             right: 10px;
  639.             top: 10px;
  640.         }
  641.         .card-category {
  642.             position: absolute;
  643.             top: 10px;
  644.             left: 10px;
  645.             font-size: 20px;
  646.         }
  647.         .card-description {
  648.             position: absolute;
  649.             bottom: 10px;
  650.             left: 10px;
  651.         }
  652.         .card-description h2 {
  653.             font-size: 22px;
  654.         }
  655.         .card-description p {
  656.             font-size: 15px;
  657.         }
  658.         .card-link {
  659.             position: absolute;
  660.             top: 0;
  661.             bottom: 0;
  662.             width: 100%;
  663.             z-index:2;
  664.             background: black;
  665.             opacity: 0;
  666.         }
  667.         .card-link:hover{
  668.             opacity: 0.1;
  669.         }
  670.         .features img {
  671.             width: 100px;
  672.         }
  673.         .features h2 {
  674.             font-size: 20px;
  675.             margin-bottom: 10px;
  676.         }
  677.         .features p {
  678.             font-size: 15px;
  679.             font-weight: lighter;
  680.         }
  681.     </style>
  682. {% endblock %}
  683. {% block body %}
  684.     <div class=" d-flex flex-column flex-row-fluid">
  685.         <div class="card-body row pt-10 mt-10">
  686.             <h1 style="font-weight: bolder;font-size: 38px;margin-bottom: 5px" class="bold text-left text-primary">
  687.                <a href="{{ path('blog_page') }}"> {% if blog_name == ''%} {{ 'educati_article_header'|trans}} {% else%} {{ blog_name|raw }} {% endif%} </a>
  688.             </h1>
  689.             <div class="row mt-10">
  690.                 <div class=" col-lg-8 col-md-8 col-sm-12" style="margin-bottom: 100px">
  691.                     <div class="row entries">
  692.                         <article class="entry entry-single richText" data-aos="fade-up">
  693.                             <div class="entry-img">
  694.                                 {% if article.imageCover == null %}
  695.                                     <img style="max-height: 350px; " src="{{ asset('assets/media/avatars/blank_article.png') }}" alt="" class="img-thumbnail img-fluid">
  696.                                 {% else %}
  697.                                     {% if article.imageCover != 'blank_article.png'  %}
  698.                                         <img style="max-height: 350px; " src="{{ asset('uploads/'~article.imageCover) }}" alt="" class="img-thumbnail img-fluid">
  699.                                     {% endif %}
  700.                                 {% endif %}
  701.                             </div>
  702.                             <h1 class="title entry-title article-title " style="font-size: 28px">
  703.                                 {{ article.title }}
  704.                             </h1>
  705.                             <div class="entry-content 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">
  706.                                     {{ article.content|raw }}
  707.                             </div>
  708.                             <div class="entry-footer clearfix">
  709.                                 <div class="m-8">
  710.                                     <time style="float: right;font-weight: bold" datetime="2020-01-01">{{ article.date|date('Y-m-d') }}</time>
  711.                                 </div>
  712.                                 <div style="" class="float-right share">
  713.                                     <a href="{{ links.facebook }}" title="Share on Facebook"><i class="bi bi-facebook" style="color:#0492e0"></i> </a>
  714.                                     <a href="{{ links.whatsapp }}" title="Share on Whatsapp"><i class="bi bi-whatsapp" style="color: #5b3434"></i> </a>
  715.                                 </div>
  716.                             </div>
  717.                         </article><!-- End blog entry -->
  718.                     </div>
  719.                     <div class="row">
  720.                         <div class="widget reviews m30">
  721.                             <div class="widget_title widget_black">
  722.                                 <h2><a href="#">{{ 'recents_articles'|trans }}</a></h2>
  723.                             </div>
  724.                             {% for r in recents %}
  725.                                 <div class="media">
  726.                                     <div class="media-left">
  727.                                         <a href="{{ path('blog_show_article',{'slug':r.slug}) }}">
  728.                                             {% if r.imageCover == '' %}
  729.                                                 <img style="width: 100px;height: 100px;object-fit: cover" src="{{ asset('assets/media/avatars/blank_article.png') }}" alt="" class=" ">
  730.                                             {% else %}
  731.                                                 <img style="width: 100px;height: 100px;object-fit: cover" src="{{ asset('uploads/'~r.imageCover) }}" alt="" class=" ">
  732.                                             {% endif %}
  733.                                         </a>
  734.                                     </div>
  735.                                     <div class="media-body">
  736.                                         <h5 class="media-heading">
  737.                                             <a class="fs-2" href="{{ path('blog_show_article',{'slug':r.slug}) }}" >{{ r.title|striptags|u.truncate(85, '...')|raw  }}
  738.                                             </a>
  739.                                         </h5>
  740.                                         <div class="media-body">
  741.                                             <a class="text-gray-500" href="{{ path('blog_show_article',{'slug':r.slug}) }}">
  742.                                                 {{ r.content|striptags|u.truncate(200, '...')|raw  }}
  743.                                             </a>
  744.                                         </div>
  745.                                     </div>
  746.                                 </div>
  747.                                 <div class="separator"></div>
  748.                             {% endfor %}
  749.                         </div>
  750.                     </div>
  751.                 </div>
  752.                 <div class="col-lg-4 col-md-4 col-sm-12">
  753.                     {% include 'blog/ads_list.html.twig' %}
  754.                 </div>
  755.             </div>
  756.         </div>
  757.     </div>
  758. {% endblock %}
  759.  {% block js %}
  760.      <script src="{{ asset('assets/plugins/custom/ckeditor/ckeditor-classic.bundle.js') }}"></script>
  761.      <script id="templateAds" type="text/html">
  762.          <div class="col-md-12">
  763.              <div class="card" style="max-height: 220px; background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.2)), url('{{ asset('uploads/') }}[[image]]');">
  764.                  <div class="card-category" style="text-shadow: 1px 1px 2px #7f3e98, 0 0 1em #7f3e98, 0 0 0.2em #7f3e98;">[[title]]</div>
  765.                  <div class="card-description">
  766.                      <p style="text-shadow: 1px 1px 2px #7f3e98, 0 0 1em #7f3e98, 0 0 0.2em #7f3e98;">[[content]]</p>
  767.                  </div>
  768.                  <a target="_blank" class="card-link" href="[[link]]" ></a>
  769.              </div>
  770.          </div>
  771.      </script>
  772.      <script>
  773.          $.ajax({
  774.              url: "{{ path('list_ads_json',{'limit':10,'offset':0}) }}"+'?lang='+getCookie('lang'),
  775.              type: 'GET',
  776.              dataType: 'json',
  777.              success: function(res){
  778.                  let templateRep = document.getElementById("templateAds");
  779.                  let templateRepHtml = templateRep.innerHTML;
  780.                  let listHtml = "";
  781.                  res.data.forEach(function (e){
  782.                      let link = "{{ path('display_ads',{'slug':'0000'}) }}";
  783.                      link = link.replace('0000',e.slug)
  784.                      listHtml += templateRepHtml
  785.                          .replace("[[image]]",e.image)
  786.                          .replace("[[link]]",link)
  787.                          .replace("[[title]]",e.title)
  788.                          .replace("[[content]]",e.description);
  789.                  });
  790.                  $('#ads_list').html(listHtml);
  791.              },
  792.              error :function (error) {
  793.                  console.log(error);
  794.              }
  795.          });
  796.      </script>
  797.  {% endblock %}