{% extends 'NCBSWBundle::layout.html.twig' %}{% block title %}{{ app.session.get('ui_str')["meta.site.home.subtitle"] }} - {{ parent() }}{% endblock %}{% block content %}<div class="row home-tile" style="margin:25px 1px 0px 1px;"> <div class="col-sm-6" style="padding:0px; border:3px solid #fff;"><a style="display:block;color:#000;text-decoration:none;padding: 0px 10px 5px 10px;" href="javascript:openBibleIndex();" title="{{ app.session.get('ui_str')["homepage.quadrants.bible.mouseover"] }}"><span class="tile-title" style="color:#212529;"><i class="fad fa-book-bible" style="padding:right:25px;color:#c4122e;;"></i> {{ app.session.get('ui_str')["homepage.quadrants.bible.title"] }}</span><br><span>{{ app.session.get('ui_str')["homepage.quadrants.bible.label"] }}</span></a> </div> <div class="col-sm-6" style="padding:0px; border:3px solid #fff;"><a style="display:block;color:#000;text-decoration:none;padding: 0px 10px 5px 10px;" href="{{ path('bible_stories') }}" title="{{ app.session.get('ui_str')["homepage.quadrants.stories.mouseover"] }}"><span class="tile-title" style="color:#212529;"><i class="fad fa-book-open-reader" style="padding:right:25px;color:#296e47;"></i> {{ app.session.get('ui_str')["homepage.quadrants.stories.title"] }}</span><br><span>{{ app.session.get('ui_str')["homepage.quadrants.stories.label"] }}</span></a> </div> </div><div class="row home-tile" style="margin:0px 1px 25px 1px;"> <div class="col-sm-6" style="padding:0px; border:3px solid #fff;"><a style="display:block;color:#000;text-decoration:none;padding: 0px 10px 5px 10px;" href="{{ path('consider') }}" title="{{ app.session.get('ui_str')["homepage.quadrants.consider.mouseover"] }}"><span class="tile-title" style="color:#212529;"><i class="fad fa-sun" style="padding:right:25px;color:#ffc107;"></i> {{ app.session.get('ui_str')["homepage.quadrants.consider.title"] }}</span><br><span>{{ app.session.get('ui_str')["homepage.quadrants.consider.label"] }}</span></a> </div> <div class="col-sm-6" style="padding:0px; border:3px solid #fff;"><a class="tile-link" style="display:block;color:#000;text-decoration:none;padding: 0px 10px 5px 10px;" href="{{ path('swedenborg') }}" title="{{ app.session.get('ui_str')["homepage.quadrants.swedenborg.mouseover"] }}"><span class="tile-title" style="color:#212529;"><i class="fad fa-feather-pointed" style="padding:right:25px;color:#6c3a2a;"></i> {{ app.session.get('ui_str')["homepage.quadrants.swedenborg.title"] }}</span><br><span>{{ app.session.get('ui_str')["homepage.quadrants.swedenborg.label"] }}</span></a> </div> </div><hr /> <h4><i class="fas fa-message-bot" style="color:#2a836d;"></i> {{ app.session.get('ui_str')["chatbot.heading"]|raw }}</h4> <div class="row"> <div class="input-group col"> <textarea class="form-control" rows="1" id="sQuestion" style="display: block; overflow: hidden; resize: none; min-height:38px;" placeholder="{{ app.session.get('ui_str')["chatbot.questionplaceholder"]|raw }}"></textarea> <span class="input-group-append"> <button type="button" x class="btn btn-primary" onclick=AskBot() id="btnSubmit">{{ app.session.get('ui_str')["form.submitbutton"]|raw }}</button> </span> </div> </div> {% if feature_data is defined %} <hr style="margin-top: 1.5rem;"> <h3 style="font-size:20px; display:inline;">{{ app.session.get('ui_str')["homepage.featuredcontent"] }}</h3> <small> {% if see_more %} (<a href="{{ path('landing_page') }}">{{ app.session.get('ui_str')["general.seeless"] }}</a>) {% else %} (<a href="{{ path('landing_page') }}?mfc=1">{{ app.session.get('ui_str')["general.seemore"] }}</a>) {% endif %} </small> {% set feature_num = 0 %} <div class="card-deck" style="margin-top:20px;"> {% for feature_record in feature_data %} {% set feature_num = feature_num+1 %} {% if feature_record.story_url != '' %} {% set sLink = path('bible_translated_story_for_commentary', {'storyUrl': feature_record.story_url, 'bibleTranslationUrl': bible_translation_url, 'commentaryUrl': feature_record.url}) %} {% else %} {% set sLink = path('exposition_translation', {'translationUrl': feature_record.url}) %} {% endif %} <div class="card"> <a href="{{ sLink }}"><img class="card-img-top" src="{{ asset('/bundles/ncbsw/media/'~feature_record.image_file) }}" alt="{{ feature_record.image_title }}"></a> <div class="card-body"> <a href="{{ sLink }}" class="card-body-link"> <h4 class="card-title">{{ feature_record.title }}</h4> <p class="card-text text-content">{{ feature_record.description }}</p> </a> </div> </div> {% if feature_num == 3 %} </div> <div class="card-deck" style="margin-top:20px;"> {% set feature_num = 0 %} {% endif %} {% endfor %} </div> <div style="clear:both;"></div> <span class="see-more"><h4>{% if see_more %} <a href="{{ path('landing_page') }}">{{ app.session.get('ui_str')["general.seeless"] }}...</a> {% else %} <a href="{{ path('landing_page') }}?mfc=1">{{ app.session.get('ui_str')["general.seemore"] }}...</a> {% endif %}</h4></span>{% endif %}<script> var isCtrl = false; var isShift = false; var isAlt = false; document.onkeyup=function(e){ if(e.keyCode == 17) isCtrl=false; else if(e.keyCode == 16) isShift=false; else if(e.keyCode == 18) isAlt=false; } document.onkeydown=function(e){ if(e.keyCode == 17) isCtrl=true; else if(e.keyCode == 16) isShift=true; else if(e.keyCode == 18) isAlt=true; if(isChatbotFocused()) { if(e.keyCode == 13) { if(!isShift && !isCtrl && !isAlt) { e.preventDefault(); AskBot(); } else { if(isCtrl || isAlt) { var textarea = document.querySelector('#sQuestion'); textarea.value = textarea.value + "\r\n"; autoHeight("sQuestion"); } } } } } function AskBot() { var sQuestion = $("#sQuestion").val(); if(sQuestion.trim().length === 0) { alert("{{ app.session.get('ui_str')["chatbot.enter.question"] }}"); } else { localStorage.NCBSW_ChatbotQue = sQuestion; var sUrl = "{{ path('chatbot') }}"; window.location = sUrl; } } function autoHeight(vOdj) { var oQue = document.getElementById(vOdj); if(oQue) { oQue.style.height = 'auto'; oQue.style.height = (oQue.scrollHeight) + 'px'; } } $('#sQuestion').on('input', function () { autoHeight("sQuestion"); }); function isChatbotFocused() { const textarea = document.getElementById('sQuestion'); return document.activeElement === textarea; }</script> <script src="{{ asset('/bundles/ncbsw/js/lazyload.js') }}" type="text/javascript"></script>{% endblock %}