templates/index.html.twig line 1
{% extends "base.html.twig" %}
{% block title %}
{{ tString("base_title_tag") }}
{% endblock %}
{% block meta %}
<meta name="description" content="{{ tString("meta_description") }}">
<!-- Twitter -->
<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@">
<meta name="twitter:creator" content="@">
<meta name="twitter:title" content="{{ tString("meta_title") }}">
<meta name="twitter:description" content="{{ tString("meta_description") }}">
<meta name="twitter:image" content="{{ asset("images/logo/sdoktor-logo.png") }}">
<!-- Facebook -->
<meta property="og:url" content="{{ app.request.schemeAndHttpHost }}">
<meta property="og:title" content="{{ tString("meta_title") }}">
<meta property="og:description" content="{{ tString("meta_description") }}">
<meta property="og:type" content="website">
<meta property="og:image" content="{{ asset("images/logo/sdoktor-logo.png") }}">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
{% endblock %}
{% block header %}
{{ include('components/header.html.twig') }}
{% endblock %}
{% block body %}
{{ include('components/index/banner-2.html.twig') }}
{{ include('components/index/cta.html.twig') }}
{{ include('components/index/solution.html.twig') }}
{{ include('components/index/trusted.html.twig') }}
{{ include('components/index/download.html.twig') }}
{{ include('components/index/why.html.twig') }}
{{ include('components/index/about-app.html.twig') }}
{{ include('components/packages/how_it_works.html.twig') }}
{{ include('components/index/query.html.twig') }}
{% block download %}{% endblock %}
{% endblock %}
{% block javascripts %}
<script>
// Function to set a cookie with a given name, value, and expiration date
function setCookie(name, value, days) {
var expires = "";
if (days) {
var date = new Date();
date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000));
expires = "; expires=" + date.toUTCString();
}
document.cookie = name + "=" + value + expires + "; path=/";
}
// Function to get the value of a cookie by its name
function getCookie(name) {
var nameEQ = name + "=";
var cookies = document.cookie.split(';');
for (var i = 0; i < cookies.length; i++) {
var cookie = cookies[i];
while (cookie.charAt(0) == ' ') {
cookie = cookie.substring(1, cookie.length);
}
if (cookie.indexOf(nameEQ) == 0) {
return cookie.substring(nameEQ.length, cookie.length);
}
}
return null;
}
// Check if the user's choice is already stored in a cookie
var userType = getCookie("userType");
// If the user's choice is not stored, show the modal
if (userType === null) {
//$("#userTypeModal").modal("show");
}
// Handle the "Korisnik" (User) button click
$("#patientButton").click(function () {
setCookie("userType", "patient", 365);
$("#userTypeModal").modal("hide");
// Redirect to a specific URL based on the user's choice
window.location.href = "/?_locale={{ app.request.locale }}"; // Change to your desired URL for patients
});
// Handle the "Liječnik" (Doctor) button click
$("#doctorButton").click(function () {
setCookie("userType", "doctor", 365);
$("#userTypeModal").modal("hide");
// Redirect to a specific URL based on the user's choice
window.location.href = "/{{ app.request.locale }}/{{ "paketi"|trans }}/"; // Change to your desired URL for doctors
});
</script>
{% endblock %}