Skip to content

Commit

Permalink
...
Browse files Browse the repository at this point in the history
  • Loading branch information
RobinDev committed Dec 12, 2022
1 parent bd62159 commit 3a8cc87
Show file tree
Hide file tree
Showing 2 changed files with 62 additions and 58 deletions.
1 change: 1 addition & 0 deletions packages/core/src/Resources/config/packages/twig.yaml
Expand Up @@ -7,6 +7,7 @@ twig:
"%kernel.project_dir%/templates": App
"%pw.package_dir%/core/src/templates/TwigBundle": Twig
"%pw.package_dir%/core/src/../src/templates": Pushword
"%kernel.project_dir%/public": ~
#'%kernel.project_dir%/templates/bundles/PushwordCoreBundle/': PushwordCore
globals:
apps: "@pushword.apps"
Expand Down
119 changes: 61 additions & 58 deletions packages/core/src/templates/base.html.twig
Expand Up @@ -2,75 +2,78 @@
{% block html_opener %}<html>{% endblock %}

{% block head %}
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">

{% block favicon %}
{% set favicon_path = apps.get().get('favicon_path') ?? '/bundles/pushwordcore/favicons/' %}
<link rel="apple-touch-icon" sizes="180x180" href="{{ favicon_path }}apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ favicon_path }}favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ favicon_path }}favicon-16x16.png">
<link rel="manifest" href="{{ favicon_path }}site.webmanifest">
<link rel="mask-icon" href="{{ favicon_path }}safari-pinned-tab.svg" color="#000000">
<link rel="shortcut icon" href="{{ favicon_path }}favicon.ico">
<meta name="apple-mobile-web-app-title" content="{{ apps.get().get('name') }}">
<meta name="application-name" content="{{ apps.get().get('name') }}">
<meta name="msapplication-TileColor" content="{{ app_color ?? '#fff' }}">
<meta name="msapplication-config" content="{{ favicon_path }}browserconfig.xml">
<meta name="theme-color" content="{{ app_color ?? '#fff' }}">
{% endblock %}
{% block favicon %}
{% set favicon_path = apps.get().get('favicon_path') ?? '/bundles/pushwordcore/favicons/' %}
<link rel="apple-touch-icon" sizes="180x180" href="{{ favicon_path }}apple-touch-icon.png">
<link rel="icon" type="image/png" sizes="32x32" href="{{ favicon_path }}favicon-32x32.png">
<link rel="icon" type="image/png" sizes="16x16" href="{{ favicon_path }}favicon-16x16.png">
<link rel="manifest" href="{{ favicon_path }}site.webmanifest">
<link rel="mask-icon" href="{{ favicon_path }}safari-pinned-tab.svg" color="#000000">
<link rel="shortcut icon" href="{{ favicon_path }}favicon.ico">
<meta name="apple-mobile-web-app-title" content="{{ apps.get().get('name') }}">
<meta name="application-name" content="{{ apps.get().get('name') }}">
<meta name="msapplication-TileColor" content="{{ app_color ?? '#fff' }}">
<meta name="msapplication-config" content="{{ favicon_path }}browserconfig.xml">
<meta name="theme-color" content="{{ app_color ?? '#fff' }}">
{% endblock %}

<title>{% block title %}Pushword CMS !{% endblock %}</title>
<title>{% block title %}Pushword CMS !{% endblock %}</title>


{% block css %}
{% set stylesheets = apps.get().get('assetsVersionned').stylesheets %}
{% for stylesheet in stylesheets %}
<link rel="stylesheet" href="{{ stylesheet }}">
{% endfor %}
{% block css_var %}
<style>
:root {
--primary: {{ apps.get().get('css_var:color_primary') ?? '#EF8206' }};
--secondary: {{ apps.get().get('css_var:color_secondary') ?? '#d97706' }};
--font-family: {{ apps.get().get('css_var:font_family') ?? 'Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol' }};
}
</style>
{% endblock %}
{% block css %}

{# <link rel="stylesheet" href="{{ asset('assets/app.css') }}"> #}
{% block css_stylesheets %}
{% set stylesheets = apps.get().get('assetsVersionned').stylesheets %}
{% for stylesheet in stylesheets %}
<link rel="stylesheet" href="{{ stylesheet }}">
{% endfor %}
{% endblock %}
{% block css_var %}
<style>
:root {
--primary: {{ apps.get().get('css_var:color_primary') ?? '#EF8206' }};
--secondary: {{ apps.get().get('css_var:color_secondary') ?? '#d97706' }};
--font-family: {{ apps.get().get('css_var:font_family') ?? 'Inter var, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol' }};
}
</style>
{% endblock %}

<style>.nojs{display:inline-block}</style>
<script>document.head.insertAdjacentHTML('beforeend', '<style>.nojs{display:none !important}</style>');</script>
{% endblock %}
{# <link rel="stylesheet" href="{{ asset('assets/app.css') }}"> #}

{% block feed %}
<link
rel="alternate"
type="application/rss+xml"
href="{{ apps.get().baseUrl|default('') }}/feed.xml"
title="{{ apps.get().name|default('') }} &raquo; {{ 'feed.alternate_title'|trans }}"
/>
{% endblock %}
<style>.nojs{display:inline-block}</style>
<script>document.head.insertAdjacentHTML('beforeend', '<style>.nojs{display:none !important}</style>');</script>
{% endblock %}

{% block robots %}{% endblock %}
{% block alternate_language %}{% endblock %}
{% block open_graph %}{% endblock %}
</head>
{% block feed %}
<link
rel="alternate"
type="application/rss+xml"
href="{{ apps.get().baseUrl|default('') }}/feed.xml"
title="{{ apps.get().name|default('') }} &raquo; {{ 'feed.alternate_title'|trans }}"
/>
{% endblock %}

{% block robots %}{% endblock %}
{% block alternate_language %}{% endblock %}
{% block open_graph %}{% endblock %}
</head>
{% endblock %}

<body{% if body_class is defined %} class="{{ body_class|default('') }}"{% endif %}{% if body_style is defined %} style="{{ body_style|default('') }}"{% endif %}>
<body{% if body_class is defined %} class="{{ body_class|default('') }}"{% endif %}{% if body_style is defined %} style="{{ body_style|default('') }}"{% endif %}>

{% block body %}{% endblock %}
{% block body %}{% endblock %}

{% block script %}
{% set javascripts = apps.get().get('assetsVersionned').javascripts %}
{% for javascript in javascripts %}
<script{% if javascript is iterable %}{{ attr(javascript) }}{% else %} src="{{ javascript }}" async{% endif %}></script>
{% endfor %}
{# <script src="{{ asset('assets/app.js') }}"></script> #}
{% endblock %}
{% block script %}
{% set javascripts = apps.get().get('assetsVersionned').javascripts %}
{% for javascript in javascripts %}
<script{% if javascript is iterable %}{{ attr(javascript) }}{% else %} src="{{ javascript }}" async{% endif %}></script>
{% endfor %}
{# <script src="{{ asset('assets/app.js') }}"></script> #}
{% endblock %}

</body>
</body>
</html>

0 comments on commit 3a8cc87

Please sign in to comment.