Improve performance (defer css, resize img)
This commit is contained in:
		
							parent
							
								
									3c23aa2fcb
								
							
						
					
					
						commit
						27bcc20b93
					
				
					 1 changed files with 6 additions and 4 deletions
				
			
		| 
						 | 
				
			
			@ -21,12 +21,11 @@
 | 
			
		|||
    <meta name="msapplication-config" content="{{ url('theme://images/icons/browserconfig.xml') }}">
 | 
			
		||||
    <meta name="theme-color" content="#ffffff">
 | 
			
		||||
    <link rel="canonical" href="{{ page.url(true, true) }}" />
 | 
			
		||||
    <link rel="stylesheet" href="{{ url('theme://dist/app.css') }}" />
 | 
			
		||||
{% endblock head %}
 | 
			
		||||
 | 
			
		||||
{# block stylesheets %}
 | 
			
		||||
{% block stylesheets %}
 | 
			
		||||
    {% do assets.addCss('theme://dist/app.css', 100) %}
 | 
			
		||||
{% endblock #}
 | 
			
		||||
{% endblock %}
 | 
			
		||||
 | 
			
		||||
{% block javascripts %}
 | 
			
		||||
    {% do assets.addJs('theme://dist/app.js', 100) %}
 | 
			
		||||
| 
						 | 
				
			
			@ -47,7 +46,10 @@
 | 
			
		|||
                        <a href="/" class="col-12">
 | 
			
		||||
                            {% include 'partials/logo.html.twig' with {style: 'filter: invert(100%); margin-right: 0.5rem;'} %}
 | 
			
		||||
                            {% for media_item in header_page.media.images %}
 | 
			
		||||
                                <img alt="Eines der Bilder im Seiten-Header." src="{{ media_item.quality(15).url }}" />
 | 
			
		||||
                                {% set aspect = media_item.width / media_item.height %}
 | 
			
		||||
                                {% set new_height = 100 %}
 | 
			
		||||
                                {% set new_width = new_height * aspect %}
 | 
			
		||||
                                <img alt="" src="{{ media_item.cropResize(new_width,new_height).quality(75).url }}" />
 | 
			
		||||
                            {% endfor %}
 | 
			
		||||
                        </a>
 | 
			
		||||
                    </div>
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue