{% extends '@BidcozCore/Layout/base.html.twig' %}
{% block doctype %}<!DOCTYPE html>{% endblock %}
{% if organization is defined %}
{% set theme = organization.theme %}
{% if campaign is defined and campaign is not null %}
{% set theme = campaign.theme %}
{% endif %}
{% endif %}
{% block theme %}
{{ parent() }}
{% set showBidcozImage = true %}
{% if organization is defined %}
{# Utilize primary, secondary, and tertiary styles #}
{% include '@BidcozManage/Theme/css.html.twig' %}
{# Utilize google fonts for theme #}
{% include '@BidcozCore/Layout/Fonts/index.html.twig' with { theme: theme } %}
{% if theme.logo is defined %}
{% set showBidcozImage = false %}
<link rel="shortcut icon" href="{{ vich_uploader_asset(theme.logo, 'file') }}" />
{% endif %}
{% else %}
{% block homepageStylesheets '' %}
{% endif %}
{% if showBidcozImage %}
<link rel="shortcut icon" href="/icon.png" />
{% endif %}
{% endblock %}
{% block bodyClass %}{{- theme is defined ? 'theme-' ~ theme.themeName : 'bidcoz' }}{% block homepageClass '' %}{{ organization is defined or campaign is defined ? '' : ' no-campaign'}}{% endblock %}
{% block body %}
<div class="bounds d-flex flex-column">
{% block homepagePreloader '' %}
{% set beforeAlertsContent = block('beforeAlerts')|trim %}
{% set alertsContent = block('alerts')|trim %}
{% set afterAlertsContent = block('afterAlerts')|trim %}
{% set beforeContentHTML = block('beforeContent')|trim %}
{% block header %}
{% include '@BidcozCore/Layout/Blocks/header.html.twig' with {
hasSidebar: block('sidebar') is defined,
isToolkit: false
} %}
{% endblock %}
<!-- This section is for notifications for the user to take action on. -->
<div class="notifications-container">
<div class="notifications-close">
<i class="fas fa-times"></i>
</div>
<h4 class="mt-2">Notifications</h4>
{% if beforeAlertsContent or alertsContent or afterAlertsContent %}
{% block beforeAlerts '' %}
{% block alerts %}
{% set route = app.request.get('_route') %}
{% if route != 'account_campaign_purchases' and is_logged_in() and campaign is defined and campaign is not null %}
{% set expiringPurchases = user_campaign_expiring_purchases(app.user, campaign) %}
{% if expiringPurchases|length %}
<div class="alert warning d-flex flex-column">
<div class="message flex-grow-1 mb-2">
You have <b>{{ expiringPurchases|length }}</b> item(s) expiring soon.
</div>
<a href="{{ path('account_campaign_purchases', campaignParams ) }}" class="btn btn-warning btn-sm w-100">Checkout</a>
</div>
{% endif %}
{% endif %}
{% if is_granted('IS_IMPERSONATOR') %}
<div class="alert info exit-impersonation d-flex">
<div class="message flex-grow-1">
<a href="{{ path('admin_index', {'_switch_user': '_exit'}) }}">Exit impersonation</a>
</div>
</div>
{% endif %}
{% endblock %}
{% block afterAlerts '' %}
{% else %}
You have no notifications at this time.
{% endif %}
</div>
<!-- This section is for help content for the user to read. -->
<div class="help-container">
<div class="help-container-close">
<i class="fas fa-times"></i>
</div>
<h4 class="mt-2">Help</h4>
<div class="alert alert-warning">
<h6 class="title text-white mb-2"></h6>
<div class="message text-white flex-grow-1">
No help article for this section.
</div>
</div>
</div>
<!-- This section is for toast notifications to make users aware of a successful
or failed https request. -->
{% block toast %}
<div class="toast-container">
{% set close = true %}
{% include '@BidcozCore/Layout/Blocks/alerts.html.twig' %}
</div>
{% endblock %}
<!--
<div class="toast-container">
{# block toast %}
{% if numMessages > 0 %}
{% include '@BidcozCore/Layout/Blocks/alerts.html.twig' %}
{% endif %}
{% endblock #}
</div>
-->
{% if beforeContentHTML %}
<div class="container pre-content">
{% block beforeContent '' %}
</div>
{% endif %}
<div class="container homepage-intro">
{% block homepageIntro '' %}
</div>
<div class="layout-container d-flex flex-column flex-grow-1 content" role="main">
<div class="container" role="main">
{% set _sidebar = block('sidebar') is defined ? block('sidebar')|trim : '' %}
{% set _internal_sidebar = block('internal_sidebar') is defined ? block('internal_sidebar')|trim %}
<div class="row{{ _sidebar ? ' sidebar-row' : '' }}">
{% if _internal_sidebar %}
<div class="col-sm-12 col-lg-4 col-xl-3 sidebar">
{{ _internal_sidebar|raw }}
</div>
{% endif %}
{% set content_class = '' %}
{% if _sidebar %}
{% set content_class = 'col-lg-8' %}
{% endif %}
{% if _internal_sidebar %}
{% set content_class = 'col-lg-8 col-xl-9' %}
{% endif %}
<div class="col-sm-12 {{ content_class }} main-content">
{% block content '' %}
{% block homepageSponsorships '' %}
</div>
{% if _sidebar %}
<div class="col-sm-12 col-lg-4 sidebar">
{{ _sidebar|raw }}
</div>
{% endif %}
</div>
</div>
{% if block('sponsorships')|trim %}
<div class="container sponsorships-container">
{% block sponsorships '' %}
</div>
{% endif %}
</div>
<div id="primary-modal" class="modal">
<div class="modal-close">
{% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close' } %}
</div>
<div class="modal-content mx-auto">
<!-- content to be populated via http request -->
</div>
</div>
{% if not is_logged_in() %}
{% set loginPath = campaign is defined ? path('campaign_login_user', { orgSlug: organization.slug, campaignSlug: campaign.slug }) : '/login' %}
<div id="login-modal" class="modal" data-url="{{ loginPath }}">
<div class="modal-dialog">
<div class="modal-content mx-auto">
<div class="modal-close float-right">
{% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close' } %}
</div>
<div class="modal-html">
<!-- Load login content here via http request -->
</div>
</div>
</div>
</div>
{% set registerPath = campaign is defined ? path('campaign_register_user', { orgSlug: organization.slug, campaignSlug: campaign.slug }) : '/register' %}
{% set currentRoute = app.request.attributes.get('_route') %}
{% if currentRoute != 'campaign_register_user' %}
<div id="register-modal" class="modal py-0 py-md-5" data-url="{{ registerPath }}">
<div class="modal-dialog">
<div class="modal-content mx-auto p-0 position-relative">
<div class="modal-close position-absolute" style="right: 1rem; top: 1rem; z-index: 1;">
{% include '@BidcozCore/Components/icon.html.twig' with { icon: 'close' } %}
</div>
<div class="modal-html mx-n3">
<!-- Load registration content here via http request -->
</div>
</div>
</div>
</div>
{% endif %}
{% endif %}
{% block trial '' %}
{% block contentBottom '' %}
{% block tour '' %}
{% block shareButtons '' %}
{% block footer %}
{% include '@BidcozCore/Layout/Blocks/footer.html.twig' %}
{% endblock %}
{% include '@BidcozCore/Layout/Blocks/user.html.twig' %}
</div>
{% endblock %}
{% block stylesheets %}
{% if campaign is defined and campaign is not null %}
{% if item is defined and item is not null %}
{% set imageUrl = item.primaryImage is defined and item.primaryImage.image is defined ? vich_uploader_asset(item.primaryImage.image, 'file') : '' %}
{% set imageWidth = 400 %}
{% else %}
{% if campaign.logo is defined and campaign.logo is not null %}
{% set imageUrl = vich_uploader_asset(campaign.logo, 'file') %}
{% set imageWidth = 320 %}
{% else %}
{% set imageUrl = 'img/default_logo_campaign.png' %}
{% set imageWidth = 320 %}
{% endif %}
{% endif %}
{# Hack for St. Henry - Remove #}
{% if campaign.slug == 'walk-a-thon2018' and campaign.organization.slug == 'sainthenryschoolhs' %}
{% set imageUrl = 'https://s3.us-east-2.amazonaws.com/bidcoz-images/sainthenryschoolhs/st_henry.png' %}
{% set imageWidth = 533 %}
{% endif %}
{% set ogImageUrl = asset(imageUrl)|replace({' ': '%20'}) %}
{% if 'https' in ogImageUrl %}
<meta property="og:image:secure_url" content="{{ ogImageUrl }}" />
{% else %}
<meta property="og:image:url" content="{{ ogImageUrl }}" />
{% endif %}
<meta property="og:image:width" content="{{ imageWidth }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ campaign.name }}" />
<meta property="og:description" content="{{ campaign.description }}" />
<meta property="og:url" content="{{ app.request.schemeAndHttpHost ~ app.request.requestUri }}" />
{% endif %}
<link rel="stylesheet" href="/components/jquery-ui/themes/base/all.css">
<link rel="stylesheet" href="/components/datetimepicker/jquery.datetimepicker.css">
<link rel="stylesheet" href="/components/datatables.net-bs/css/dataTables.bootstrap.min.css">
<link rel="stylesheet" href="/components/datatables.net-buttons-bs/css/buttons.bootstrap.min.css">
<link rel="stylesheet" href="/components/jReject/css/jquery.reject.css">
<link rel="stylesheet" href="/components/lightbox2/dist/css/lightbox.css">
<link rel="stylesheet" href="/components/colorpicker/jquery.colorpicker.css">
<link href="//fonts.googleapis.com/css?family=Lato:100,300,400,700,900,100italic,300italic,400italic,700italic,900italic" rel="stylesheet" type="text/css">
<link href="//fonts.googleapis.com/css?family=Open+Sans:300italic,400italic,600italic,700italic,800italic,400,300,600,700,800" rel="stylesheet" type="text/css">
<link rel="stylesheet" href="/components/hint.css/hint.min.css">
<link rel="stylesheet" href="/components/intl-tel-input/build/css/intlTelInput.min.css">
<style>
.iti{ width: 100%;}
.iti__flag { z-index: 4; }
.intl-tel-input {
display: table-cell;
}
.intl-tel-input .selected-flag {
z-index: 4;
}
.intl-tel-input .country-list {
z-index: 5;
}
.input-group .intl-tel-input .form-control {
border-radius: 4px 0 0 4px;
}
.iti .intl-phone { padding-left: 55px!important; }
</style>
{% if organization is defined or campaign is defined %}
<link rel="stylesheet" href="/css/admin.css">
{% else %}
<link rel="stylesheet" href="/css/manage.css">
{% endif %}
<!-- <link rel="stylesheet" href="/css/common.css"> -->
{% endblock %}
{% block javascripts %}
<!--
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
-->
<script src="/components/jquery/dist/jquery.js" type="text/javascript"></script>
<script src="/components/jquery-ui/jquery-ui.js" type="text/javascript"></script>
<script src="/components/bootstrap/dist/js/bootstrap.min.js" type="text/javascript"></script>
<script src="/components/tinymce/tinymce.min.js?v=1" type="text/javascript"></script>
<script src="/components/jquery.countdown/dist/jquery.countdown.js" type="text/javascript"></script>
<script src="/components/jcarousel/dist/jquery.jcarousel.min.js" type="text/javascript"></script>
<script src="/components/datetimepicker/jquery.datetimepicker.js" type="text/javascript"></script>
<script src="/components/devbridge-autocomplete/dist/jquery.autocomplete.min.js" type="text/javascript"></script>
<script src="/components/datatables.net/js/jquery.dataTables.min.js" type="text/javascript"></script>
<script src="/components/datatables.net-bs/js/dataTables.bootstrap.min.js" type="text/javascript"></script>
<script src="/components/datatables.net-buttons/js/dataTables.buttons.min.js" type="text/javascript"></script>
<script src="/components/datatables.net-buttons/js/buttons.print.min.js" type="text/javascript"></script>
<script src="/components/datatables.net-buttons/js/buttons.html5.min.js" type="text/javascript"></script>
<script src="/components/datatables.net-buttons-bs/js/buttons.bootstrap.min.js" type="text/javascript"></script>
<script src="/components/datatables.net-select/js/dataTables.select.min.js" type="text/javascript"></script>
<script src="/components/jReject/js/jquery.reject.js" type="text/javascript"></script>
<script src="/components/lightbox2/dist/js/lightbox.min.js" type="text/javascript"></script>
<script src="/components/colorpicker/jquery.colorpicker.js" type="text/javascript"></script>
<script src="/components/colorpicker/i18n/jquery.ui.colorpicker-nl.js"></script>
<script src="/components/colorpicker/parts/jquery.ui.colorpicker-rgbslider.js"></script>
<script src="/components/colorpicker/parts/jquery.ui.colorpicker-memory.js"></script>
<script src="/components/moment/min/moment.min.js"></script>
<script src="/components/moment-timezone/builds/moment-timezone-with-data.min.js"></script>
<script src="/components/responsive-bootstrap-toolkit/dist/bootstrap-toolkit.min.js"></script>
<script src="/components/intl-tel-input/build/js/intlTelInput.min.js"></script>
<script src="/js/plugins/jquery.browser.mobile.js" type="text/javascript"></script>
<script src="/js/main.js?v=11" type="text/javascript"></script>
{% if stripe.publishable_key and not is_logged_in() %}
{% include '_credit_card_js.html.twig' with { doNotSubmit: true } %}
{% endif %}
{% endblock %}