{% extends 'base.html.twig' %}
{% block title %}
{{ 'student_and_parent'|trans }}
{% endblock %}
{% block css %}
<style>
.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;
}
/* #watermark {
height: 400px;
width: 100%;
padding-top: 30px;
overflow: hidden;
background-color: {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %}30;
}*/
.team3 {
font-size: 16px;
}
.team3 h1,
.team3 h2,
.team3 h3,
.team3 h4,
.team3 h5,
.team3 h6 {
color: #3e4555;
}
.team3 .font-weight-medium {
font-weight: 500;
}
.team3 .bg-light {
background-color: #f4f8fa !important;
}
.team3 .subtitle {
color: #8d97ad;
line-height: 24px;
font-size: 13px;
}
.team3 ul {
margin-top: 30px;
}
.team3 h5 {
line-height: 22px;
font-size: 18px;
}
.team3 ul li a {
color: #8d97ad;
padding-right: 15px;
-webkit-transition: 0.1s ease-in;
-o-transition: 0.1s ease-in;
transition: 0.1s ease-in;
}
.team3 ul li a:hover {
-webkit-transform: translate3d(0px, -5px, 0px);
transform: translate3d(0px, -5px, 0px);
color: #316ce8;
}
.team3 .title {
margin: 30px 0 0 0;
}
.team3 .subtitle {
margin: 0 0 0px 0;
font-size: 13px;
}
</style>
<style>
/* TIMELINE
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.timeline {
white-space: nowrap;
overflow-x: hidden;
}
.timeline ol {
font-size: 0;
width: 100vw;
padding: 250px 0;
transition: all 1s;
}
.timeline ol li {
position: relative;
display: inline-block;
list-style-type: none;
width: 160px;
height: 3px;
background: {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %}!important;
}
.timeline ol li:last-child {
width: 250px;
}
.timeline ol li:not(:first-child) {
margin-left: 14px;
}
.timeline ol li div {
position: absolute;
left: calc(100% + 7px);
width: 250px;
padding: 15px;
font-size: 1rem;
white-space: normal;
color: black;
background: white;
}
.timeline ol li div::before {
content: '';
position: absolute;
top: 100%;
left: 0;
width: 0;
height: 0;
border-style: solid;
}
.timeline ol li:nth-child(odd) div {
top: -16px;
transform: translateY(-100%);
}
.timeline ol li:nth-child(odd) div::before {
top: 100%;
border-width: 8px 8px 0 0;
border-color: white transparent transparent transparent;
}
.timeline ol li:nth-child(even) div {
top: calc(100% + 16px);
}
.timeline ol li:nth-child(even) div::before {
top: -8px;
border-width: 8px 0 0 8px;
border-color: transparent transparent transparent white;
}
.timeline time {
display: block;
font-weight: bold;
margin-bottom: 8px;
}
/* TIMELINE ARROWS
–––––––––––––––––––––––––––––––––––––––––––––––––– */
.timeline .arrows {
display: flex;
justify-content: center;
margin-bottom: 20px;
}
.timeline .arrows .arrow__prev {
margin-right: 20px;
}
.timeline .disabled {
opacity: .5;
}
.timeline .arrows img {
width: 45px;
height: 45px;
}
/* GENERAL MEDIA QUERIES
–––––––––––––––––––––––––––––––––––––––––––––––––– */
@media screen and (max-width: 599px) {
.timeline ol,
.timeline ol li {
width: auto;
}
.timeline ol {
padding: 0;
transform: none !important;
}
.timeline ol li {
display: block;
height: auto;
background: transparent;
}
.timeline ol li:first-child {
margin-top: 25px;
}
.timeline ol li:not(:first-child) {
margin-left: auto;
}
.timeline ol li div {
width: 94%;
height: auto !important;
margin: 0 auto 25px;
}
.timeline ol li div {
position: static;
}
.timeline ol li:nth-child(odd) div {
transform: none;
}
.timeline ol li:nth-child(odd) div::before,
.timeline ol li:nth-child(even) div::before {
left: 50%;
top: 100%;
transform: translateX(-50%);
border: none;
border-left: 1px solid white;
height: 25px;
}
.timeline ol li:last-child,
.timeline ol li:nth-last-child(2) div::before,
.timeline ol li:not(:last-child)::after,
.timeline .arrows {
display: none;
}
}
.section {
padding: 50px 0;
}
.section .container {
width: 90%;
max-width: 1200px;
margin: 0 auto;
text-align: center;
}
.section h1 {
font-size: 2.5rem;
}
.section h2 {
font-size: 1.3rem;
}
figure img{
min-width: 320px!important;
max-width: 500px;
}
@media only screen and (max-width: 425px){
figure img{
min-width: 350px!important;
max-width: 100%!important;
}
}
.card-body{
padding-left: 0rem !important;
padding-right: 0rem !important;
}
</style>
{% endblock %}
{% block body %}
<div class=" d-flex flex-column flex-row-fluid">
<div class="card-body pt-10">
<div class="row ">
{% if page_pedagogy is not null %}
<div class="container scrool-div" id="{{ page_pedagogy.slug }}">
<h2 class="bold text-center text-primary mb-5">{{ page_pedagogy.name }}</h2>
<div class="separator"></div>
<div class=" mt-4 row mb-8">
{% set colors = ['#f65151','#ca51f6','#518ef6','#dec27e','#de997e','#F0FFF0','#FFA07A','#228B22','#00FFFF','#FF69B4','#CD853F'] %}
<div class="accordion" id="accordionExample">
<div class="accordion-item">
<h2 class="accordion-header" id="headingOne">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne" aria-expanded="true" aria-controls="collapseOne">
<h3 class="title text-primary">{{ 'class_list'|trans }}</h3>
</button>
</h2>
<div id="collapseOne" class="accordion-collapse collapse show" aria-labelledby="headingOne" data-bs-parent="#accordionExample">
<div class="accordion-body row" style="overflow-y: scroll; height: 300px">
{% for c in classes %}
<div class=" col-md-4 col-lg-4 col-sm-12 col-xs-12 ">
<div class="card m-4" style="border-style: solid;background-color: {{ colors[random(1,10)] }}">
<div class="card-header" style="border-bottom: none;padding: 10px">
<h3 class="card-title">{{ c.name }}</h3>
<div class="card-toolbar">
<button type="button" class="btn btn-sm btn-light btn-show-class" data-id="{{ c.id }}" data-name="{{ c.name }}">
<span class="fa fa-book"></span>
</button>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
<div class="row">
<div class="accordion" id="accordionExample2">
<div class="accordion-item">
<h2 class="accordion-header" id="headingOne1">
<button class="accordion-button" type="button" data-bs-toggle="collapse" data-bs-target="#collapseOne1" aria-expanded="true" aria-controls="collapseOne1">
<h3 class="title text-primary">{{ 'school_department'|trans }}</h3>
</button>
</h2>
<div id="collapseOne1" class="accordion-collapse collapse show" aria-labelledby="headingOne1" data-bs-parent="#accordionExample1">
<div class="accordion-body row" style="overflow-y: scroll; height: 300px">
{% for c in departments %}
<div class="col-lg-4 col-md-4 col-sm-12 col-xs-12 p-4">
<div class="card" style="border-style: solid;background-color: {{ colors[random(1,10)] }}">
<div class="card-header" style="border-bottom: none;padding: 10px">
<h3 class="card-title">{{ c.name }}</h3>
<div class="card-toolbar">
<button type="button" class="btn btn-sm btn-light btn-show-team" data-id="{{ c.id }}" data-name="{{ c.name }}">
<span class="fa fa-user-friends"></span>
</button>
</div>
</div>
</div>
</div>
{% endfor %}
</div>
</div>
</div>
</div>
</div>
</div>
{% endif %}
</div>
<div class="row " style="margin-top: 80px;">
{% if page_calendar is not null %}
<div class="container scrool-div" id="{{ page_calendar.slug }}">
<h2 class="bold text-center text-primary mb-5 mt-5">{{ page_calendar.name }}</h2>
<div class="row" style="">
<section class="timeline">
<ol>
{% for e in events %}
<li>
<div style="max-height: 160px!important;">
<a href="javascript:void(0)" class="btn-show fs-7" data-id="{{ e.id }}">
<em class="fs-7" style="font-weight: bold;">{{ e.date_event2 | date('F') |trans }}</em><br/>
<time class="fs-8" style="{% if e.past == '0' %} color: {% if first_color != ''%}{{first_color}}{% else %}#7f3e98{% endif %}; {% endif %}">{{ e.date_event2 }}</time> {{ e.description|striptags|u.truncate(80, '...')|raw }}</a>
</div>
</li>
{% endfor %}
<li></li>
</ol>
<div class="arrows">
<button class="arrow arrow__prev disabled btn btn-primary" disabled>
<span class="bi bi-caret-left fs-1"></span>
</button>
<button class="arrow arrow__next btn btn-primary">
<span class="bi bi-caret-right fs-1"></span>
</button>
</div>
</section>
</div>
</div>
{% endif %}
</div>
<div class="row " style="margin-top: 80px;">
{% if page_admission is not null %}
<div class="container scrool-div" id="{{ page_admission.slug }}">
<h2 class="bold text-center text-primary mb-5 mt-5">{{ page_admission.name }}</h2>
<div class="row mt-4">
<div class="card shadow-sm">
<div class="card-header">
<h3 class="card-title"><span class="text-muted" style="margin-right: 10px;">{{ school_global.name }}</span> <span class="text-primary">{{ 'admission_requirements'|trans }}</span></h3>
</div>
<div class="card-body" id="watermark">
<ul style="list-style: none">
{% for c in admission_infos %}
<li class="ck ck-content ck-editor__editable ck-rounded-corners ck-editor__editable_inline ck-read-only ck-blurred">
{{ c.description|raw }}
</li>
{% endfor %}
</ul>
</div>
<div class="card-footer pt-20">
{% for r in admission_pages %}
<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">
{{ r.schoolFeeDescription|raw }}
</div>
<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">
{{ r.schoolFeeOther|raw }}
</div>
{% endfor %}
</div>
</div>
</div>
</div>
{% endif %}
</div>
</div>
</div>
<div class="modal fade" data-bs-focus="false" tabindex="-1" id="kt_modal_show">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="modal_show_title">
<span class="fa fa-spin fa-satellite"></span>
</h5>
<div class="btn btn-icon btn-sm btn-active-light-primary ms-2" data-bs-dismiss="modal" aria-label="Close">
<span class="fa fa-window-close"></span>
</div>
<!--end::Close-->
</div>
<div class="modal-body">
<div class=" d-flex flex-column flex-row-fluid " id="modal_show_img">
</div>
<div class=" d-flex flex-column flex-row-fluid" id="modal_show_content">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-bs-dismiss="modal">{{ 'close'|trans }}</button>
</div>
</div>
</div>
</div>
<div class="modal fade" data-bs-focus="false" tabindex="-1" id="kt_modal_class_and_course">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="class_name">
</h5>
<div class="btn btn-icon btn-sm btn-active-light-primary ms-2" data-bs-dismiss="modal" aria-label="Close">
<span class="fa fa-window-close"></span>
</div>
</div>
<div class="modal-body">
<h2>{{ 'course_list'|trans }}</h2>
<div class="mb-10 mt-10 row" id="course_list">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-bs-dismiss="modal">{{ 'close'|trans }}</button>
</div>
</div>
</div>
</div>
<div class="modal fade" data-bs-focus="false" tabindex="-1" id="kt_modal_team">
<div class="modal-dialog modal-fullscreen">
<div class="modal-content">
<div class="modal-header">
<h5 class="modal-title" id="department_name">
</h5>
<div class="btn btn-icon btn-sm btn-active-light-primary ms-2" data-bs-dismiss="modal" aria-label="Close">
<span class="fa fa-window-close"></span>
</div>
</div>
<div class="modal-body">
<h2>{{ 'staff_member'|trans }}</h2>
<div class="mb-10 mt-10 row" id="member_list">
</div>
</div>
<div class="modal-footer">
<button type="button" class="btn btn-light" data-bs-dismiss="modal">{{ 'close'|trans }}</button>
</div>
</div>
</div>
</div>
{% endblock %}
{% block js %}
<script src="{{ asset('assets/plugins/custom/ckeditor/ckeditor-classic.bundle.js') }}"></script>
<script src="{{ asset('assets/js/hammer.min.js') }}"></script>
<script id="classCourse" type="text/html">
<div class="col-md-4 col-lg-4 mb-5 border-dashed p-2" style="[[back_color]]">
<div class="form-check form-check-custom form-check-solid">
<label class="form-check-label bold">
[[course_name]]
</label>
</div>
<div class="input-group mb-5 mt-5">
<span class="input-group-text">{{ 'week_hour'|trans }}</span>
<span class="input-group-text">[[week_hour]]</span>
</div>
<div class="input-group mb-5 mt-5">
<span class="input-group-text">{{ 'year_hour'|trans }}</span>
<span class="input-group-text">[[year_hour]]</span>
</div>
<div class="input-group mb-5 mt-5">
<span class="input-group-text">{{ 'coefficient'|trans }}</span>
<span class="input-group-text">[[coefficient]]</span>
</div>
</div>
</script>
<script id="teamMemberHtml" type="text/html">
<div class="col-lg-3 mb-4 team3">
<div class="row">
<div class="col-md-12">
<img style="width: 270px;height: 250px" src="[[image]]" alt="wrapkit" class="img-fluid" />
</div>
<div class="col-md-12">
<div class="pt-2">
<h3 class="mt-4 font-weight-medium mb-0">[[name]]</h3>
<h4 class="subtitle">[[position]]</h4>
<h4 class="subtitle">[[department]]</h4>
<a href = "mailto: [[email1]]" class="subtitle"> [[email2]]</a>
<a href = "tel: [[phone1]]" class="subtitle"> [[phone2]]</a>
</div>
</div>
</div>
</div>
</script>
<script>
$(document).ready(function (){
})
</script>
<script>
let colors = ['#f65151','#ca51f6','#518ef6','#dec27e','#de997e','#F0FFF0','#FFA07A','#228B22','#00FFFF','#FF69B4','#CD853F'];
function getRandomInt(max) {
return Math.floor(Math.random() * max);
}
$(document).ready(function (){
//let modalShow = bootstrap.Modal.getOrCreateInstance(document.getElementById('kt_modal_show'));
let modalManageCourse = bootstrap.Modal.getOrCreateInstance(document.getElementById('kt_modal_class_and_course'));
let modalManageTeam = bootstrap.Modal.getOrCreateInstance(document.getElementById('kt_modal_team'));
$('.btn-show-class').on('click', function () {
let url = "{{ path('get_class_course_list',{'id':'00000'}) }}";
url = url.replace('00000',this.getAttribute('data-id'));
let name = this.getAttribute('data-name');
$('#class_name').html(name);
$('#item_class').val(this.getAttribute('data-id'));
$.ajax({
url: url,
type: 'GET',
dataType: 'json',
success: function(res){
$('#course_list').html('');
let templateRep = document.getElementById("classCourse");
let templateRepHtml = templateRep.innerHTML;
res.data.forEach(function (item){
let listHtml = "";
listHtml += templateRepHtml.replace("[[course_name]]",item.class_course.name)
.replace("[[back_color]]","background-color:"+colors[getRandomInt(10)])
.replace("[[week_hour]]",item.week_hour)
.replace("[[year_hour]]",item.year_hour)
.replace("[[coefficient]]",item.coefficient)
;
$('#course_list').append(listHtml);
});
modalManageCourse.show();
},
error :function (error) {
Swal.fire({
text: "{{ 'object_not_found'|trans }}",
icon: "error",
buttonsStyling: false,
confirmButtonText: "{{ 'close'|trans }}",
customClass: {
confirmButton: "btn btn-primary"
}
});
}
});
});
$('.btn-show-team').on('click', function () {
let url = "{{ path('app_get_team_member_by_department',{'id':'00000'}) }}";
url = url.replace('00000',this.getAttribute('data-id'));
let name = this.getAttribute('data-name');
$('#department_name').html(name);
$.ajax({
url: url,
type: 'GET',
dataType: 'json',
success: function(res){
$('#member_list').html('');
let templateRep1 = document.getElementById("teamMemberHtml");
let templateRepHtml1 = templateRep1.innerHTML;
res.data.forEach(function (item){
let listHtml = "";
let imgUrl = "{{ asset('assets/media/avatars/user.png') }}";
if(item.image.length>0){
imgUrl = "{{ asset('uploads/') }}"+item.image;
}
listHtml = templateRepHtml1.replace("[[name]]",item.name)
.replace("[[position]]",item.position.name)
.replace("[[email2]]",item.email)
.replace("[[email1]]",item.email)
.replace("[[phone1]]",item.phone)
.replace("[[phone2]]",item.phone)
.replace("[[image]]",imgUrl)
.replace("[[department]]",item.department.name)
;
console.log(listHtml);
$('#member_list').append(listHtml);
});
modalManageTeam.show();
},
error :function (error) {
Swal.fire({
text: "{{ 'object_not_found'|trans }}",
icon: "error",
buttonsStyling: false,
confirmButtonText: "{{ 'close'|trans }}",
customClass: {
confirmButton: "btn btn-primary"
}
});
}
});
});
})
</script>
<script>
let modalShow = bootstrap.Modal.getOrCreateInstance(document.getElementById('kt_modal_show'));
$('.btn-show').on('click', function () {
let url = "{{ path('get_one_entity',{'entity':'event','id':'00000'}) }}";
url = url.replace('00000',this.getAttribute('data-id'));
$.ajax({
url: url,
type: 'GET',
dataType: 'json',
success: function(res){
$('#modal_show_title').html(res.data.date_event.replace('T',' '));
$('#modal_show_content').html(res.data.description);
if(res.data.image !== ""){
let img='<img class="img-responsive img" style="max-width: 400px;max-height: 300px" src="'+"{{ asset('uploads/') }}"+res.data.image +'"'+' />';
$('#modal_show_img').html(img);
}
else{
$('#modal_show_img').html('');
}
modalShow.show();
},
error :function (error) {
Swal.fire({
text: "{{ 'object_not_found'|trans }}",
icon: "error",
buttonsStyling: false,
confirmButtonText: "{{ 'close'|trans }}",
customClass: {
confirmButton: "btn btn-primary"
}
});
}
});
});
$(document).ready(function (){
// VARIABLES
const timeline = document.querySelector(".timeline ol"),
elH = document.querySelectorAll(".timeline li > div"),
arrows = document.querySelectorAll(".timeline .arrows .arrow"),
arrowPrev = document.querySelector(".timeline .arrows .arrow__prev"),
arrowNext = document.querySelector(".timeline .arrows .arrow__next"),
firstItem = document.querySelector(".timeline li:first-child"),
lastItem = document.querySelector(".timeline li:last-child"),
xScrolling = 280,
disabledClass = "disabled";
// START
window.addEventListener("load", init);
function init() {
setEqualHeights(elH);
animateTl(xScrolling, arrows, timeline);
setSwipeFn(timeline, arrowPrev, arrowNext);
setKeyboardFn(arrowPrev, arrowNext);
}
// SET EQUAL HEIGHTS
function setEqualHeights(el) {
let counter = 0;
for (let i = 0; i < el.length; i++) {
const singleHeight = el[i].offsetHeight;
if (counter < singleHeight) {
counter = singleHeight;
}
}
for (let i = 0; i < el.length; i++) {
//el[i].style.height = `${counter}px`;
}
}
// CHECK IF AN ELEMENT IS IN VIEWPORT
// http://stackoverflow.com/questions/123999/how-to-tell-if-a-dom-element-is-visible-in-the-current-viewport
function isElementInViewport(el) {
const rect = el.getBoundingClientRect();
return (
rect.top >= 0 &&
rect.left >= 0 &&
rect.bottom <=
(window.innerHeight || document.documentElement.clientHeight) &&
rect.right <= (window.innerWidth || document.documentElement.clientWidth)
);
}
// SET STATE OF PREV/NEXT ARROWS
function setBtnState(el, flag = true) {
if (flag) {
el.classList.add(disabledClass);
} else {
if (el.classList.contains(disabledClass)) {
el.classList.remove(disabledClass);
}
el.disabled = false;
}
}
// ANIMATE TIMELINE
function animateTl(scrolling, el, tl) {
let counter = 0;
for (let i = 0; i < el.length; i++) {
el[i].addEventListener("click", function () {
if (!arrowPrev.disabled) {
arrowPrev.disabled = true;
}
if (!arrowNext.disabled) {
arrowNext.disabled = true;
}
const sign = this.classList.contains("arrow__prev") ? "" : "-";
if (counter === 0) {
tl.style.transform = `translateX(-${scrolling}px)`;
} else {
const tlStyle = getComputedStyle(tl);
// add more browser prefixes if needed here
const tlTransform =
tlStyle.getPropertyValue("-webkit-transform") ||
tlStyle.getPropertyValue("transform");
const values =
parseInt(tlTransform.split(",")[4]) +
parseInt(`${sign}${scrolling}`);
tl.style.transform = `translateX(${values}px)`;
}
setTimeout(() => {
isElementInViewport(firstItem)
? setBtnState(arrowPrev)
: setBtnState(arrowPrev, false);
isElementInViewport(lastItem)
? setBtnState(arrowNext)
: setBtnState(arrowNext, false);
}, 1100);
counter++;
});
}
}
// ADD SWIPE SUPPORT FOR TOUCH DEVICES
function setSwipeFn(tl, prev, next) {
const hammer = new Hammer(tl);
hammer.on("swipeleft", () => next.click());
hammer.on("swiperight", () => prev.click());
}
// ADD BASIC KEYBOARD FUNCTIONALITY
function setKeyboardFn(prev, next) {
document.addEventListener("keydown", (e) => {
if (e.which === 37 || e.which === 39) {
const timelineOfTop = timeline.offsetTop;
const y = window.pageYOffset;
if (timelineOfTop !== y) {
window.scrollTo(0, timelineOfTop);
}
if (e.which === 37) {
prev.click();
} else if (e.which === 39) {
next.click();
}
}
});
}
})
</script>
{% endblock %}