add assets base url

This commit is contained in:
Simon Vieille 2021-03-30 14:37:10 +02:00
parent 4ca57e91f5
commit 21b7863762
36 changed files with 73 additions and 24 deletions

2
.env
View File

@ -33,3 +33,5 @@ DATABASE_URL="postgresql://db_user:db_password@127.0.0.1:5432/db_name?serverVers
# Delivery is disabled by default via "null://localhost"
MAILER_URL=null://localhost
###< symfony/swiftmailer-bundle ###
ASSET_BASE_URL=null

View File

@ -1,3 +1,5 @@
const Mario = require('../../images/mario.gif')
const Knmc = function(w) {
this.window = w;
}
@ -12,7 +14,7 @@ Knmc.prototype.init = function() {
if (chars.indexOf(seq) !== -1) {
chars = '';
var url = '/bundles/deblanblog/skin2018/frontoffice/img/mario.gif';
var url = Mario;
var image = new Image();
image.classList.add('fixed');
image.style.position = 'fixed';

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1002 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.0 KiB

BIN
assets/webapp/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

BIN
assets/webapp/favicon.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 KiB

View File

@ -0,0 +1,41 @@
{
"name": "Deblan - Blog",
"icons": [
{
"src": "\/android-icon-36x36.png",
"sizes": "36x36",
"type": "image\/png",
"density": "0.75"
},
{
"src": "\/android-icon-48x48.png",
"sizes": "48x48",
"type": "image\/png",
"density": "1.0"
},
{
"src": "\/android-icon-72x72.png",
"sizes": "72x72",
"type": "image\/png",
"density": "1.5"
},
{
"src": "\/android-icon-96x96.png",
"sizes": "96x96",
"type": "image\/png",
"density": "2.0"
},
{
"src": "\/android-icon-144x144.png",
"sizes": "144x144",
"type": "image\/png",
"density": "3.0"
},
{
"src": "\/android-icon-192x192.png",
"sizes": "192x192",
"type": "image\/png",
"density": "4.0"
}
]
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.8 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.6 KiB

View File

@ -15,3 +15,7 @@ framework:
#fragments: true
php_errors:
log: true
assets:
base_urls:
- "%env(ASSET_BASE_URL)%"

1
public/favicon.ico Symbolic link
View File

@ -0,0 +1 @@
../assets/webapp/favicon.ico

1
public/favicon.png Symbolic link
View File

@ -0,0 +1 @@
../assets/webapp/favicon.png

View File

@ -1,5 +1,3 @@
{% set assets_host = '' %}
<!DOCTYPE html>
<!--
_==/ i i \==_
@ -37,26 +35,26 @@ XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
{#
<link rel="alternate" type="application/rss+xml" title="Flux RSS" href="https://{{ app.request.host ~ cms_path('rss') }}">
<link rel="apple-touch-icon" sizes="57x57" href="{{ asset('apple-icon-57x57.png') }}?v={{ assets_cache_version }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ asset('apple-icon-60x60.png') }}?v={{ assets_cache_version }}0">
<link rel="apple-touch-icon" sizes="72x72" href="{{ asset('apple-icon-72x72.png') }}?v={{ assets_cache_version }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ asset('apple-icon-76x76.png') }}?v={{ assets_cache_version }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ asset('apple-icon-114x114.png') }}?v={{ assets_cache_version }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ asset('apple-icon-120x120.png') }}?v={{ assets_cache_version }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ asset('apple-icon-144x144.png') }}?v={{ assets_cache_version }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ asset('apple-icon-152x152.png') }}?v={{ assets_cache_version }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset('apple-icon-180x180.png') }}?v={{ assets_cache_version }}">
<link rel="icon" type="image/png" href="{{ asset('favicon.png') }}?v={{ assets_cache_version }}" >
<link rel="icon" type="image/png" sizes="192x192" href="{{ asset('android-icon-192x192.png') }}?v={{ assets_cache_version }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('favicon.png') }}?v={{ assets_cache_version }}">
<link rel="icon" type="image/png" sizes="96x96" href="{{ asset('favicon-96x96.png') }}?v={{ assets_cache_version }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('favicon-16x16.png') }}?v={{ assets_cache_version }}">
<link rel="manifest" href="{{ asset('manifest.json') }}?v={{ assets_cache_version }}">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{ asset('ms-icon-144x144.png') }}?v={{ assets_cache_version }}">
<meta name="theme-color" content="#ffffff">
#}
<link rel="apple-touch-icon" sizes="57x57" href="{{ asset('build/webapp/apple-icon-57x57.png') }}">
<link rel="apple-touch-icon" sizes="60x60" href="{{ asset('build/webapp/apple-icon-60x60.png') }}">
<link rel="apple-touch-icon" sizes="72x72" href="{{ asset('build/webapp/apple-icon-72x72.png') }}">
<link rel="apple-touch-icon" sizes="76x76" href="{{ asset('build/webapp/apple-icon-76x76.png') }}">
<link rel="apple-touch-icon" sizes="114x114" href="{{ asset('build/webapp/apple-icon-114x114.png') }}">
<link rel="apple-touch-icon" sizes="120x120" href="{{ asset('build/webapp/apple-icon-120x120.png') }}">
<link rel="apple-touch-icon" sizes="144x144" href="{{ asset('build/webapp/apple-icon-144x144.png') }}">
<link rel="apple-touch-icon" sizes="152x152" href="{{ asset('build/webapp/apple-icon-152x152.png') }}">
<link rel="apple-touch-icon" sizes="180x180" href="{{ asset('build/webapp/apple-icon-180x180.png') }}">
<link rel="icon" type="image/png" href="{{ asset('build/webapp/favicon.png') }}" >
<link rel="icon" type="image/png" sizes="192x192" href="{{ asset('build/webapp/android-icon-192x192.png') }}">
<link rel="icon" type="image/png" sizes="32x32" href="{{ asset('build/webapp/favicon.png') }}">
<link rel="icon" type="image/png" sizes="96x96" href="{{ asset('build/webapp/favicon-96x96.png') }}">
<link rel="icon" type="image/png" sizes="16x16" href="{{ asset('build/webapp/favicon-16x16.png') }}">
<link rel="manifest" href="{{ asset('build/webapp/manifest.json') }}">
<meta name="msapplication-TileColor" content="#ffffff">
<meta name="msapplication-TileImage" content="{{ asset('build/webapp/ms-icon-144x144.png') }}">
<meta name="theme-color" content="#ffffff">
</head>
<body>
<div class="page" data-grid="va-stretch">

View File

@ -18,7 +18,7 @@
{% elseif post.quickImage %}
<div class="quick-image">
<a href="{{ url }}" target="_blank">
<img src="{{ assets_host ~ asset('build/images/px.png') }}" data-src="{{ image }}" alt="{{ title }}" title="{{ title }}">
<img src="{{ asset('build/images/px.png') }}" data-src="{{ image }}" alt="{{ title }}" title="{{ title }}">
</a>
</div>
{% endif %}

View File

@ -43,7 +43,7 @@
</div>
<div class="small-menu hidden-large hidden-medium visible-small">
<a href="{{ safe_path('posts') }}">
<img src="{{ assets_host ~ asset('build/images/logo-small.png') }}" class="fixed" alt="Deblan blog">
<img src="{{ asset('build/images/logo-small.png') }}" class="fixed" alt="Deblan blog">
</a>
<nav class="navigation push-right">