From 77beeaec73e82f6757662908515075ff0fe91298 Mon Sep 17 00:00:00 2001 From: Tim Schumacher Date: Fri, 10 Jun 2016 00:46:17 +0200 Subject: [PATCH] Convert the navigation from fixed to sticky. Ticket #56 --- .../CalciferBundle/Resources/assets/js/events.js | 6 ++++++ .../Resources/views/layout.html.twig | 8 ++++---- .../Resources/views/navigation.html.twig | 15 +++++++-------- 3 files changed, 17 insertions(+), 12 deletions(-) diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js index 22e1c14..3e041be 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/assets/js/events.js @@ -13,6 +13,12 @@ jQuery(document).ready(function () { jQuery('.icon.link').popup(); } + $('.ui.sticky') + .sticky({ + context: '#main' + }) + ; + if (jQuery('input[type=datetime]').length > 0) { jQuery('input[type=datetime]').datetimepicker({lang: 'de', format: 'Y-m-d H:i'}); } diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/layout.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/layout.html.twig index 00d49c0..65c1829 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/layout.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/layout.html.twig @@ -19,15 +19,15 @@ -{% include "CalciferBundle::navigation.html.twig" %} +
+ {% include "CalciferBundle::navigation.html.twig" %} +
{% block body %}{% endblock %}
- - {% block javascripts %}{% endblock %} - \ No newline at end of file + diff --git a/src/Hackspace/Bundle/CalciferBundle/Resources/views/navigation.html.twig b/src/Hackspace/Bundle/CalciferBundle/Resources/views/navigation.html.twig index 8b92d06..ecf70cb 100755 --- a/src/Hackspace/Bundle/CalciferBundle/Resources/views/navigation.html.twig +++ b/src/Hackspace/Bundle/CalciferBundle/Resources/views/navigation.html.twig @@ -1,8 +1,7 @@ - \ No newline at end of file + +