{% extends 'base_simple.html.twig' %}
{% block css %}
<style>
@media only screen and (max-width: 425px){
.main-body{
margin-top: 30px!important;
}
}
.blog {
padding: 40px 0 20px 0;
}
.blog .entry {
padding: 30px;
margin-bottom: 60px;
box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.4);
}
.blog .entry .entry-img {
max-height: 500px;
/*margin: -30px -30px 20px -30px;*/
overflow: hidden;
text-align: center;
}
.blog .entry .entry-title {
font-size: 20px;
font-weight: bold;
padding: 0;
margin: 0 0 20px 0;
}
.blog .entry .entry-title a {
color: #111;
transition: 0.3s;
}
.blog .entry .entry-title a:hover {
color: #0084d6;
}
.blog .entry .entry-meta {
margin-bottom: 15px;
color: #aaaaaa;
}
.blog .entry .entry-meta ul {
display: flex;
flex-wrap: wrap;
list-style: none;
padding: 0;
margin: 0;
}
.blog .entry .entry-meta ul li + li {
padding-left: 20px;
}
.blog .entry .entry-meta i {
font-size: 14px;
padding-right: 4px;
}
.blog .entry .entry-meta a {
color: #5e5e5e;
font-size: 14px;
display: inline-block;
line-height: 20px;
transition: 0.3s;
}
.blog .entry .entry-meta a:hover {
color: #0084d6;
}
.blog .entry .entry-content p {
line-height: 24px;
}
.blog .entry .entry-content .read-more {
-moz-text-align-last: right;
text-align-last: right;
}
.blog .entry .entry-content .read-more a {
display: inline-block;
background: #0084d6;
color: #fff;
padding: 7px 25px;
transition: 0.3s;
font-size: 14px;
border-radius: 4px;
}
.blog .entry .entry-content .read-more a:hover {
background: #0084d6;
}
.blog .entry .entry-content h3 {
font-size: 22px;
margin-top: 30px;
font-weight: bold;
}
.blog .entry .entry-content blockquote {
overflow: hidden;
background-color: #fafafa;
padding: 60px;
position: relative;
text-align: center;
margin: 20px 0;
}
.blog .entry .entry-content blockquote p {
color: #4d4643;
line-height: 1.6;
margin-bottom: 0;
font-style: italic;
font-weight: 500;
font-size: 22px;
}
.blog .entry .entry-content blockquote .quote-left {
position: absolute;
left: 20px;
top: 20px;
font-size: 36px;
color: #e7e7e7;
}
.blog .entry .entry-content blockquote .quote-right {
position: absolute;
right: 20px;
bottom: 20px;
font-size: 36px;
color: #e7e7e7;
}
.blog .entry .entry-content blockquote::after {
content: '';
position: absolute;
left: 0;
top: 0;
bottom: 0;
width: 3px;
background-color: #111;
margin-top: 20px;
margin-bottom: 20px;
}
.blog .entry .entry-footer {
padding-top: 10px;
border-top: 1px solid #e6e6e6;
}
.blog .entry .entry-footer i {
color: #5e5e5e;
display: inline;
}
.blog .entry .entry-footer a {
color: #8b8b8b;
transition: 0.3s;
}
.blog .entry .entry-footer a:hover {
color: #0084d6;
}
.blog .entry .entry-footer .cats {
list-style: none;
display: inline;
padding: 0 20px 0 0;
font-size: 14px;
}
.blog .entry .entry-footer .cats li {
display: inline-block;
}
.blog .entry .entry-footer .tags {
list-style: none;
display: inline;
padding: 0;
font-size: 14px;
}
.blog .entry .entry-footer .tags li {
display: inline-block;
}
.blog .entry .entry-footer .tags li + li::before {
padding-right: 6px;
color: #6c757d;
content: ",";
}
.blog .entry .entry-footer .share {
font-size: 16px;
}
.blog .entry .entry-footer .share i {
padding-left: 5px;
}
.blog .entry-single {
margin-bottom: 30px;
}
.blog .blog-author {
padding: 20px;
margin-bottom: 30px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.blog .blog-author img {
width: 120px;
}
.blog .blog-author h4 {
margin-left: 140px;
font-weight: 600;
font-size: 22px;
margin-bottom: 0px;
padding: 0;
}
.blog .blog-author .social-links {
margin: 0 0 5px 140px;
}
.blog .blog-author .social-links a {
color: #777777;
}
.blog .blog-author p {
margin-left: 140px;
font-style: italic;
color: #bfb9b6;
}
.blog .blog-comments {
margin-bottom: 30px;
}
.blog .blog-comments .comments-count {
font-weight: bold;
}
.blog .blog-comments .comment {
margin-top: 30px;
position: relative;
}
.blog .blog-comments .comment .comment-img {
width: 50px;
}
.blog .blog-comments .comment h5 {
margin-left: 65px;
font-size: 16px;
margin-bottom: 2px;
}
.blog .blog-comments .comment h5 a {
font-weight: bold;
color: #4d4643;
transition: 0.3s;
}
.blog .blog-comments .comment h5 a:hover {
color: #0084d6;
}
.blog .blog-comments .comment h5 .reply {
padding-left: 10px;
color: #111;
}
.blog .blog-comments .comment time {
margin-left: 65px;
display: block;
font-size: 14px;
color: #777777;
margin-bottom: 5px;
}
.blog .blog-comments .comment p {
margin-left: 65px;
}
.blog .blog-comments .comment.comment-reply {
padding-left: 40px;
}
.blog .blog-comments .reply-form {
margin-top: 30px;
padding: 30px;
box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}
.blog .blog-comments .reply-form h4 {
font-weight: bold;
font-size: 22px;
}
.blog .blog-comments .reply-form p {
font-size: 14px;
}
.blog .blog-comments .reply-form input {
border-radius: 0;
padding: 20px 10px;
font-size: 14px;
border-radius: 4px;
}
.blog .blog-comments .reply-form input:focus {
box-shadow: none;
border-color: #0084d6;
}
.blog .blog-comments .reply-form textarea {
border-radius: 0;
padding: 10px 10px;
font-size: 14px;
border-radius: 4px;
}
.blog .blog-comments .reply-form textarea:focus {
box-shadow: none;
border-color: #0084d6;
}
.blog .blog-comments .reply-form .form-group {
margin-bottom: 25px;
}
.blog .blog-comments .reply-form .btn-primary {
padding: 8px 20px;
border: 0;
border-radius: 4px;
background-color: #0084d6;
}
.blog .blog-comments .reply-form .btn-primary:hover {
background-color: #0084d6;
}
.blog .blog-pagination {
color: #444444;
}
.blog .blog-pagination ul {
display: flex;
padding-left: 0;
list-style: none;
}
.blog .blog-pagination li {
border: 1px solid white;
margin: 0 5px;
transition: 0.3s;
}
.blog .blog-pagination li.active {
background: white;
}
.blog .blog-pagination li a {
color: #b4aca8;
padding: 7px 16px;
display: inline-block;
}
.blog .blog-pagination li.active, .blog .blog-pagination li:hover {
background: #0084d6;
border: 1px solid #0084d6;
border-radius: 4px;
}
.blog .blog-pagination li.active a, .blog .blog-pagination li:hover a {
color: #fff;
}
.blog .blog-pagination li.disabled {
background: #fff;
border: 1px solid white;
}
.blog .blog-pagination li.disabled i {
color: #f6f5f5;
padding: 10px 16px;
display: inline-block;
}
.blog .sidebar {
padding: 30px;
/*margin: 0 0 60px 20px;*/
box-shadow: 0px 2px 15px rgba(0, 0, 0, 0.1);
}
.blog .sidebar .sidebar-title {
font-size: 20px;
font-weight: 700;
padding: 0 0 0 0;
margin: 0 0 15px 0;
color: #111;
position: relative;
}
.blog .sidebar .sidebar-item {
margin-bottom: 30px;
}
.blog .sidebar .search-form form {
background: #fff;
border: 1px solid #ddd;
padding: 3px 10px;
position: relative;
border-radius: 4px;
}
.blog .sidebar .search-form form input[type="text"] {
border: 0;
padding: 4px;
width: calc(100% - 40px);
}
.blog .sidebar .search-form form button {
position: absolute;
top: 0;
right: 0;
bottom: 0;
border: 0;
background: none;
font-size: 16px;
padding: 0 15px;
margin: -1px;
background: #0084d6;
color: #fff;
transition: 0.3s;
border-radius: 0 4px 4px 0;
}
.blog .sidebar .search-form form button:hover {
background: #0084d6;
}
.blog .sidebar .categories ul {
list-style: none;
padding: 0;
}
.blog .sidebar .categories ul li + li {
padding-top: 10px;
}
.blog .sidebar .categories ul a {
color: #2b2b2b;
transition: 0.3s;
}
.blog .sidebar .categories ul a:hover {
color: #0084d6;
}
.blog .sidebar .categories ul a span {
padding-left: 5px;
color: #aaaaaa;
font-size: 14px;
}
.blog .sidebar .recent-posts .post-item + .post-item {
margin-top: 15px;
}
.blog .sidebar .recent-posts img {
width: 80px;
float: left;
}
.blog .sidebar .recent-posts h4 {
font-size: 15px;
margin-left: 95px;
font-weight: bold;
}
.blog .sidebar .recent-posts h4 a {
color: black;
transition: 0.3s;
}
.blog .sidebar .recent-posts h4 a:hover {
color: #0084d6;
}
.blog .sidebar .recent-posts time {
display: block;
margin-left: 95px;
font-style: italic;
font-size: 14px;
color: #777777;
}
.blog .sidebar .tags {
margin-bottom: -10px;
}
.blog .sidebar .tags ul {
list-style: none;
padding: 0;
}
.blog .sidebar .tags ul li {
display: inline-block;
}
.blog .sidebar .tags ul a {
color: #515151;
font-size: 14px;
padding: 6px 14px;
margin: 0 6px 8px 0;
border: 1px solid #dddddd;
display: inline-block;
transition: 0.3s;
border-radius: 4px;
}
.blog .sidebar .tags ul a:hover {
color: #fff;
border: 1px solid #0084d6;
background: #0084d6;
}
.blog .sidebar .tags ul a span {
padding-left: 5px;
color: #aaaaaa;
font-size: 14px;
}
.widget {
position: relative;
display: block;
margin-bottom: 30px;
}
.widget_title {
background-color: #fff;
z-index: 3;
}
.widget_title:after {
position: relative;
display: inline-block;
bottom: 35px;
left: 52%;
content: " ";
width: 50%;
border-top: 2px solid #eee;
z-index: 1;
}
.widget_black h2:after {
display: table;
position: relative;
left: 50%;
bottom: 10px;
height: 2px;
content: " ";
text-shadow: none;
width: 15%;
background-color: #000;
z-index: 2;
}
.widget i:hover {
color: #f7510f;
cursor: pointer;
}
.widget_adv {
text-align: center;
margin: 30px;
}
.widget_advertisement {
text-align: center;
margin: 30px 0;
}
.widget_body img {
float: left;
position: relative;
margin-right: 25px;
}
.widget .add_img {
display: inline-block;
padding: 12px 12px;
}
.widget .media {
margin-top: 0;
margin-bottom: 30px;
}
.widget .media-heading {
margin-bottom: 5px;
font-size: 15px;
line-height: 18px;
}
.widget .media-date {
color: #b2b0b0;
}
.widget_article_social {
color: #a5a5a5;
margin-top: 15px;
}
.widget_article_social i {
padding: 5px;
margin-right: 5px;
color: #fff;
font-size: 10px;
background-color: #a5a5a5;
}
.widget_article_social span {
margin-right: 10px;
}
.widget_article_social a {
font-weight: bold;
}
.widget_img {
text-align: center;
margin: 0 auto;
}
.widget .adv_img {
display: inline-block;
}
.widget_body .btn {
border-radius: 0;
}
.widget hr {
border-color: #e0e0e0;
}
.widget-title hr {
border-width: 4px;
margin-bottom: 0;
}
.widget-title hr:before {
width: 80px;
background-color: #ddd;
display: block;
height: 4px;
position: relative;
content: "";
top: -4px;
}
.widget_divider {
display: inline-block;
vertical-align: baseline;
zoom: 1;
width: 98%;
position: relative;
text-align: right;
text-transform: uppercase;
font-size: 11px;
}
.widget_divider::after {
content: '';
display: block;
width: 75%;
left: 0;
text-align: right;
position: absolute;
top: 12px;
border-top: 1px solid #f1f1f1;
}
.media-body, .media-left, .media-right{
display: table-cell;
vertical-align: top;
}
.media-left, .media > .pull-left{
padding-right: 10px;
}
.media-body{
}
.ck.ck-editor__main>.ck-editor__editable:not(.ck-focused){
border-color: transparent!important;
}
.ck.ck-editor__main>.ck-editor__editable:not(.ck-editor__nested-editable).ck-focused{
border: transparent!important;
}
.padded {
padding: 100px 0;
}
.wrapper-grey {
background: #F4F4F4;
}
.avatar {
width: 30px;
border-radius: 50%;
}
.avatar-bordered {
box-shadow: 0 1px 2px rgba(0,0,0,0.2);
border: white 1px solid;
}
.avatar-large {
width: 50px;
}
/* .banner {
color: white;
text-align: center;
height: 100vh;
background-size: cover !important;
display: flex;
align-items: center;
justify-content: center;
}
.banner h1 {
font-size: 50px;
font-weight: bold;
text-shadow: 0px 1px rgba(0, 0, 0, 0.2);
}
.banner p {
font-size: 25px;
font-weight: lighter;
color: rgba(255, 255, 255, 0.8);
margin-bottom: 50px;
} */
.card {
height: 250px;
text-shadow: 0 1px 3px rgba(0,0,0,0.6);
background-size: cover !important;
color: white;
position: relative;
border-radius: 5px;
margin-bottom: 20px;
}
.card-user {
position: absolute;
right: 10px;
top: 10px;
}
.card-category {
position: absolute;
top: 10px;
left: 10px;
font-size: 20px;
}
.card-description {
position: absolute;
bottom: 10px;
left: 10px;
}
.card-description h2 {
font-size: 22px;
}
.card-description p {
font-size: 15px;
}
.card-link {
position: absolute;
top: 0;
bottom: 0;
width: 100%;
z-index:2;
background: black;
opacity: 0;
}
.card-link:hover{
opacity: 0.1;
}
.features img {
width: 100px;
}
.features h2 {
font-size: 20px;
margin-bottom: 10px;
}
.features p {
font-size: 15px;
font-weight: lighter;
}
</style>
{% endblock %}
{% block body %}
<div class=" d-flex flex-column flex-row-fluid">
<div class="card-body row pt-10 mt-10">
<h1 style="font-weight: bolder;font-size: 38px;margin-bottom: 5px" class="bold text-left text-primary">
<a href="{{ path('blog_page') }}"> {% if blog_name == ''%} {{ 'educati_article_header'|trans}} {% else%} {{ blog_name|raw }} {% endif%} </a>
</h1>
<div class="row mt-10">
<div class=" col-lg-8 col-md-8 col-sm-12" style="margin-bottom: 100px">
<div class="row entries">
<article class="entry entry-single richText" data-aos="fade-up">
<div class="entry-img">
{% if article.imageCover == null %}
<img style="max-height: 350px; " src="{{ asset('assets/media/avatars/blank_article.png') }}" alt="" class="img-thumbnail img-fluid">
{% else %}
{% if article.imageCover != 'blank_article.png' %}
<img style="max-height: 350px; " src="{{ asset('uploads/'~article.imageCover) }}" alt="" class="img-thumbnail img-fluid">
{% endif %}
{% endif %}
</div>
<h1 class="title entry-title article-title " style="font-size: 28px">
{{ article.title }}
</h1>
<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">
{{ article.content|raw }}
</div>
<div class="entry-footer clearfix">
<div class="m-8">
<time style="float: right;font-weight: bold" datetime="2020-01-01">{{ article.date|date('Y-m-d') }}</time>
</div>
<div style="" class="float-right share">
<a href="{{ links.facebook }}" title="Share on Facebook"><i class="bi bi-facebook" style="color:#0492e0"></i> </a>
<a href="{{ links.whatsapp }}" title="Share on Whatsapp"><i class="bi bi-whatsapp" style="color: #5b3434"></i> </a>
</div>
</div>
</article><!-- End blog entry -->
</div>
<div class="row">
<div class="widget reviews m30">
<div class="widget_title widget_black">
<h2><a href="#">{{ 'recents_articles'|trans }}</a></h2>
</div>
{% for r in recents %}
<div class="media">
<div class="media-left">
<a href="{{ path('blog_show_article',{'slug':r.slug}) }}">
{% if r.imageCover == '' %}
<img style="width: 100px;height: 100px;object-fit: cover" src="{{ asset('assets/media/avatars/blank_article.png') }}" alt="" class=" ">
{% else %}
<img style="width: 100px;height: 100px;object-fit: cover" src="{{ asset('uploads/'~r.imageCover) }}" alt="" class=" ">
{% endif %}
</a>
</div>
<div class="media-body">
<h5 class="media-heading">
<a class="fs-2" href="{{ path('blog_show_article',{'slug':r.slug}) }}" >{{ r.title|striptags|u.truncate(85, '...')|raw }}
</a>
</h5>
<div class="media-body">
<a class="text-gray-500" href="{{ path('blog_show_article',{'slug':r.slug}) }}">
{{ r.content|striptags|u.truncate(200, '...')|raw }}
</a>
</div>
</div>
</div>
<div class="separator"></div>
{% endfor %}
</div>
</div>
</div>
<div class="col-lg-4 col-md-4 col-sm-12">
{% include 'blog/ads_list.html.twig' %}
</div>
</div>
</div>
</div>
{% endblock %}
{% block js %}
<script src="{{ asset('assets/plugins/custom/ckeditor/ckeditor-classic.bundle.js') }}"></script>
<script id="templateAds" type="text/html">
<div class="col-md-12">
<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]]');">
<div class="card-category" style="text-shadow: 1px 1px 2px #7f3e98, 0 0 1em #7f3e98, 0 0 0.2em #7f3e98;">[[title]]</div>
<div class="card-description">
<p style="text-shadow: 1px 1px 2px #7f3e98, 0 0 1em #7f3e98, 0 0 0.2em #7f3e98;">[[content]]</p>
</div>
<a target="_blank" class="card-link" href="[[link]]" ></a>
</div>
</div>
</script>
<script>
$.ajax({
url: "{{ path('list_ads_json',{'limit':10,'offset':0}) }}"+'?lang='+getCookie('lang'),
type: 'GET',
dataType: 'json',
success: function(res){
let templateRep = document.getElementById("templateAds");
let templateRepHtml = templateRep.innerHTML;
let listHtml = "";
res.data.forEach(function (e){
let link = "{{ path('display_ads',{'slug':'0000'}) }}";
link = link.replace('0000',e.slug)
listHtml += templateRepHtml
.replace("[[image]]",e.image)
.replace("[[link]]",link)
.replace("[[title]]",e.title)
.replace("[[content]]",e.description);
});
$('#ads_list').html(listHtml);
},
error :function (error) {
console.log(error);
}
});
</script>
{% endblock %}