From: Raphaƫl Gertz Date: Thu, 10 Oct 2024 21:23:03 +0000 (+0200) Subject: Add package and route configuration X-Git-Tag: 0.0.2~2 X-Git-Url: https://git.rapsys.eu/treebundle/commitdiff_plain/54b4908c048705b0963c284f465d70d2096fab3a?ds=sidebyside Add package and route configuration Add public directory Add base and index templates --- diff --git a/Resources/config/packages/rapsystree.yaml b/Resources/config/packages/rapsystree.yaml new file mode 100644 index 0000000..88c2aea --- /dev/null +++ b/Resources/config/packages/rapsystree.yaml @@ -0,0 +1,32 @@ +# Parameters configuration +parameters: + +# Services configuration +services: + # Register tree controller + Rapsys\TreeBundle\Controller\TreeController: + arguments: [ '@service_container', '@twig' ] + tags: [ 'controller.service_arguments' ] + +# Twig Configuration +twig: + # Enforce debug + #auto_reload: ~ + debug: '%kernel.debug%' + #strict_variables: '%kernel.debug%' + + # Disable cache + # XXX: enable forced regeneration of css and js at each page load + cache: false + + # Fix form layout for css + # XXX: @RapsysTree is a shortcut to vendor/rapsys/treebundle/Resources/views directory here + #form_theme: [ '@RapsysTree/form/form_div_layout.html.twig' ] + + # Set twig paths + paths: + # Required by email.image(site_logo) directive + # XXX: Allow twig to resolve @RapsysTree/png/logo.png in vendor/rapsys/treebundle/Resources/public/png/logo.png + '%kernel.project_dir%/vendor/rapsys/treebundle/Resources/public': 'RapsysTree' + # Override default exception controller + #exception_controller: Rapsys\TreeBundle\Controller\ErrorController::preview diff --git a/Resources/config/routes/rapsystree.yaml b/Resources/config/routes/rapsystree.yaml new file mode 100644 index 0000000..b58bb21 --- /dev/null +++ b/Resources/config/routes/rapsystree.yaml @@ -0,0 +1,5 @@ +# Routes configuration +rapsystree: + path: '/{path<.*>?}' + controller: Rapsys\TreeBundle\Controller\TreeController::index + methods: GET diff --git a/Resources/public/.keep b/Resources/public/.keep new file mode 100644 index 0000000..e69de29 diff --git a/Resources/views/base.html.twig b/Resources/views/base.html.twig new file mode 100644 index 0000000..77819c9 --- /dev/null +++ b/Resources/views/base.html.twig @@ -0,0 +1,162 @@ + + + + {% block meta %}{% endblock %} + {% block title %}{{ [title.page, title.section, title.site]|filter(v => v)|join(' - ') }}{% endblock %} + {% block stylesheet %} + + {% if description is defined and description %} + + {% endif %} + {% if keywords is defined and keywords %} + + {% endif %} + {% if icon is defined and icon %} + + + {% for size, icon in icon.png %} + {# Apple #} + {% if size in [120, 152, 167, 180] %} + {% if size == 180 %} + + {% endif %} + + {# Windows #} + {% elseif size in [70, 150, 310] %} + + {# Others #} + {% else %} + + {% endif %} + {% endfor %} + {% endif %} + {# stylesheet '//fonts.googleapis.com/css?family=Irish+Grover' '//fonts.googleapis.com/css?family=La+Belle+Aurore' '@RapsysAirBundle/Resources/public/css/{reset,screen}.css' #} + {% stopwatch 'stylesheet' %} + {% stylesheet '@RapsysAir/css/{reset,droidsans,lemon,notoemoji,screen}.css' %} + + {% endstylesheet %} + {% endstopwatch %} + {% if canonical is defined and canonical %} + + {% endif %} + {% if alternates is defined and alternates %} + {% for lang, alternate in alternates %} + + {% endfor %} + {% endif %} + {% if facebook is defined and facebook %} + {% for property, contents in facebook %} + {% if contents is iterable %} + {% for content in contents %} + + {% endfor %} + {% else %} + + {% endif %} + {% endfor %} + {% endif %} + {% endblock %} + + + {% block body %} + {% block header %} + + {% endblock %} + {% block message %} + {# pass an array argument to get the messages of those types (['warning', 'error']) #} + {% for label, messages in app.flashes %} + {% if messages %} +
+
    + {% for message in messages %} +
  • {{ message }}
  • + {% endfor %} +
+
+ {% endif %} + {% endfor %} + {% endblock %} + {# + {% block sidebar %}{% endblock %} + #} + {% block content %} +
+
+

{% trans %}Outdoor space reservation system{% endtrans %}

+
+
+ {% endblock %} + {% block footer %} + + {% endblock %} + {% endblock %} + {% block javascript %} + {% stopwatch 'javascript' %} + {#{% javascript '@RapsysAir/js/*.js' %} + + {% endjavascript %}#} + {% endstopwatch %} + {% endblock %} + + diff --git a/Resources/views/index.html.twig b/Resources/views/index.html.twig new file mode 100644 index 0000000..1ec5d90 --- /dev/null +++ b/Resources/views/index.html.twig @@ -0,0 +1,4 @@ +{% extends '@RapsysTree/base.html.twig' %} +{% block content %} + TODO +{% endblock %}