-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Copy over default site bundle templates
- Loading branch information
Showing
12 changed files
with
194 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
{% trans_default_domain 'ngsite' %} | ||
|
||
<nav class="page-navigation"> | ||
<ul> | ||
|
||
{# First page link (for mobile) #} | ||
{% if pages.mobile_first_page %} | ||
<li class="page-item d-block d-xs-none"><a href="{{ pages.mobile_first_page }}" class="page-link"><i class="fa fa-angle-double-left"></i></a></li> | ||
{% endif %} | ||
|
||
{# Previous page link #} | ||
{% if pages.previous_page %} | ||
<li class="page-item"><a href="{{ pages.previous_page }}" class="page-link" rel="prev">{{ 'pagination.previous'|trans }}</a></li> | ||
{% endif %} | ||
|
||
{# First page link #} | ||
{% if pages.first_page %} | ||
<li class="page-item d-none d-xs-block"><a href="{{ pages.first_page }}" class="page-link">1</a></li> | ||
{% endif %} | ||
|
||
{# Second page link #} | ||
{% if pages.second_page %} | ||
<li class="page-item d-none d-xs-block"><a href="{{ pages.second_page }}" class="page-link">2</a></li> | ||
{% endif %} | ||
|
||
{# Dots if start is over 3 #} | ||
{% if pages.separator_before %} | ||
<li class="page-item disabled d-none d-xs-block"><span class="page-link page-link-separate">...</span></li> | ||
{% endif %} | ||
|
||
{# Middle pages #} | ||
{% for page, page_url in pages.middle_pages %} | ||
{% if page == pager.currentPage %} | ||
<li class="page-item current"><span class="page-link">{{ page }}<span class="d-inline d-xs-none"> of {{ pager.nbPages }}</span></span></li> | ||
{% else %} | ||
<li class="page-item d-none d-xs-block"><a href="{{ page_url }}" class="page-link">{{ page }}</a></li> | ||
{% endif %} | ||
{% endfor %} | ||
|
||
{# Dots if end is under 3 to last #} | ||
{% if pages.separator_after %} | ||
<li class="page-item disabled d-none d-xs-block"><span class="page-link page-link-separate">...</span></li> | ||
{% endif %} | ||
|
||
{# Second to last page link #} | ||
{% if pages.second_to_last_page %} | ||
<li class="page-item d-none d-xs-block"><a href="{{ pages.second_to_last_page }}" class="page-link">{{ pager.nbPages - 1 }}</a></li> | ||
{% endif %} | ||
|
||
{# Last page link #} | ||
{% if pages.last_page %} | ||
<li class="page-item d-none d-xs-block"><a href="{{ pages.last_page }}" class="page-link">{{ pager.nbPages }}</a></li> | ||
{% endif %} | ||
|
||
{# Next page link #} | ||
{% if pages.next_page %} | ||
<li class="page-item"><a href="{{ pages.next_page }}" class="page-link" rel="next">{{ 'pagination.next'|trans }}</a></li> | ||
{% endif %} | ||
|
||
{# Last page link (for mobile) #} | ||
{% if pages.mobile_last_page %} | ||
<li class="page-item d-block d-xs-none"><a href="{{ pages.mobile_last_page }}" class="page-link"><i class="fa fa-angle-double-right"></i></a></li> | ||
{% endif %} | ||
|
||
</ul> | ||
</nav> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
{% if ibexa.configResolver.hasParameter('site_settings.facebook_api', 'ngsite') | ||
and ibexa.configResolver.hasParameter('facebook_app_id', 'netgen_open_graph') %} | ||
{% set facebook_api = ibexa.configResolver.getParameter('site_settings.facebook_api', 'ngsite') %} | ||
|
||
{% if facebook_api %} | ||
{% set facebook_app_id = ibexa.configResolver.getParameter('facebook_app_id', 'netgen_open_graph') %} | ||
{% set facebook_locale = 'en_US' %} | ||
{% if ibexa.configResolver.hasParameter('site_settings.facebook_locale', 'ngsite') %} | ||
{% set facebook_locale = ibexa.configResolver.parameter('site_settings.facebook_locale', 'ngsite') %} | ||
{% endif %} | ||
|
||
{% if facebook_app_id is not empty and facebook_locale is not empty %} | ||
<script> | ||
window.fbAsyncInit = function() { | ||
FB.init({ | ||
appId : '{{ facebook_app_id|raw|escape('js') }}', | ||
autoLogAppEvents : true, | ||
xfbml : true, | ||
version : 'v2.12' | ||
}); | ||
}; | ||
(function(d, s, id){ | ||
var js, fjs = d.getElementsByTagName(s)[0]; | ||
if (d.getElementById(id)) {return;} | ||
js = d.createElement(s); js.id = id; | ||
js.src = "https://connect.facebook.net/{{ facebook_locale|raw|escape('js') }}/sdk.js"; | ||
fjs.parentNode.insertBefore(js, fjs); | ||
}(document, 'script', 'facebook-jssdk')); | ||
</script> | ||
{% endif %} | ||
{% endif %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% include '@ibexadesign/parts/google_maps_init.html.twig' %} | ||
|
||
{% set container_id = container_id|default(0) %} | ||
{% set latitude = latitude|default(ibexa.configResolver.parameter('google_maps.latitude', 'ngsite')) %} | ||
{% set longitude = longitude|default(ibexa.configResolver.parameter('google_maps.longitude', 'ngsite')) %} | ||
{% set zoom = zoom|default(ibexa.configResolver.parameter('google_maps.zoom', 'ngsite')) %} | ||
{% set map_type = map_type|default(ibexa.configResolver.parameter('google_maps.map_type', 'ngsite')) %} | ||
|
||
<script type="text/javascript"> | ||
google.maps.event.addDomListener(window, 'load', function(){ | ||
initializeGoogleMaps({ | ||
containerId: "{{ container_id|raw|escape('js') }}", | ||
latitude: {{ latitude|raw|escape('js') }}, | ||
longitude: {{ longitude|raw|escape('js') }}, | ||
zoom: {{ zoom|raw|escape('js') }}, | ||
mapType: "{{ map_type|raw|escape('js') }}" | ||
}); | ||
}); | ||
</script> | ||
|
||
<div | ||
id="map-canvas-{{ container_id|raw|escape( 'js' ) }}" | ||
class="google-maps" | ||
style="height:{{ map_height|default(560)|raw|escape('js') }}px; width:100%;"> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
{% if include_google_maps_script|default(false) %} | ||
{% include '@ibexadesign/parts/google_maps_script.html.twig' %} | ||
{% endif %} | ||
|
||
<script type="text/javascript"> | ||
function initializeGoogleMaps( options ) { | ||
var mapCenter = new google.maps.LatLng( | ||
options.latitude > 90 || options.latitude < -90 ? defaults.latitude : options.latitude, | ||
options.longitude > 180 || options.longitude < -180 ? defaults.longitude : options.longitude | ||
); | ||
var mapOptions = { | ||
zoom: options.zoom > 21 || options.zoom < 0 ? defaults.zoom : options.zoom, | ||
center: mapCenter, | ||
mapTypeId: google.maps.MapTypeId[options.mapType] | ||
}; | ||
var map = new google.maps.Map(document.getElementById('map-canvas-' + options.containerId), mapOptions); | ||
var marker = new google.maps.Marker({ | ||
position: mapCenter, | ||
map: map | ||
}); | ||
} | ||
</script> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{% set google_maps_api_key = ibexa.configResolver.parameter('api_keys.google_maps')|default('') %} | ||
|
||
<script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?v=3.exp&key={{ google_maps_api_key }}"></script> |
8 changes: 8 additions & 0 deletions
8
templates/themes/common/parts/google_tag_manager_code_noscript.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{% if ibexa.configResolver.hasParameter('site_settings.google_tag_manager_code', 'ngsite') %} | ||
{% set google_tag_manager_code = ibexa.configResolver.getParameter('site_settings.google_tag_manager_code', 'ngsite') %} | ||
|
||
{% if google_tag_manager_code is not empty %} | ||
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id={{ google_tag_manager_code|raw|escape('js') }}" | ||
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript> | ||
{% endif %} | ||
{% endif %} |
11 changes: 11 additions & 0 deletions
11
templates/themes/common/parts/google_tag_manager_code_script.html.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% if ibexa.configResolver.hasParameter('site_settings.google_tag_manager_code', 'ngsite') %} | ||
{% set google_tag_manager_code = ibexa.configResolver.getParameter('site_settings.google_tag_manager_code', 'ngsite') %} | ||
|
||
{% if google_tag_manager_code is not empty %} | ||
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start': | ||
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0], | ||
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src= | ||
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f); | ||
})(window,document,'script','dataLayer','{{ google_tag_manager_code|raw|escape('js') }}');</script> | ||
{% endif %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
{% if open_graph is defined %} | ||
{% for key, value in open_graph %} | ||
<meta property="{{ key|trim }}" content="{{ value|trim }}" /> | ||
{% endfor %} | ||
{% endif %} | ||
|
||
{% if content is defined %} | ||
{% set meta_tags = get_netgen_open_graph(content.innerContent) %} | ||
|
||
{% for meta_tag in meta_tags %} | ||
{% if open_graph is not defined or open_graph[meta_tag.tagName] is not defined %} | ||
<meta property="{{ meta_tag.tagName|trim }}" content="{{ meta_tag.tagValue|trim }}" /> | ||
{% endif %} | ||
{% endfor %} | ||
{% endif %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
pagination.previous: 'Previous' | ||
pagination.next: 'Next' |