[CORE] Typo in GSFile and slight Twig weirdness in base template
This commit is contained in:
parent
b1e514832b
commit
be91fb754d
|
@ -43,7 +43,7 @@ class GSFile
|
|||
bool $is_local = true,
|
||||
int $actor_id = null): Attachment
|
||||
{
|
||||
Event::handle('HashFile', [$file->getPathname(), &$hash]);
|
||||
Event::handle('HashFile', [$sfile->getPathname(), &$hash]);
|
||||
// The following properly gets the mimetype with `file` or other
|
||||
// available methods, so should be safe
|
||||
$mimetype = $sfile->getMimeType();
|
||||
|
|
25
templates/attachments/show.html.twig
Normal file
25
templates/attachments/show.html.twig
Normal file
|
@ -0,0 +1,25 @@
|
|||
{% extends 'left/left.html.twig' %}
|
||||
|
||||
{% block stylesheets %}
|
||||
{{ parent() }}
|
||||
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public.css') }}"
|
||||
media="screen and (min-width: 1300px)">
|
||||
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public_mid.css') }}"
|
||||
media="screen and (max-width: 1300px)">
|
||||
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/network/public_small.css') }}"
|
||||
media="screen and (max-width: 750px)">
|
||||
{% endblock %}
|
||||
|
||||
{# {% block header %} #}
|
||||
{# {{ parent() }} #}
|
||||
{# {% endblock %} #}
|
||||
|
||||
{# {% block left %} #}
|
||||
{# {{ parent() }} #}
|
||||
{# {% endblock %} #}
|
||||
|
||||
{% block body %}
|
||||
<div class="content">
|
||||
yooo
|
||||
</div>
|
||||
{% endblock body %}
|
|
@ -18,9 +18,12 @@
|
|||
<link rel='stylesheet' type='text/css' href="{{ asset('assets/css/' ~ stylesheet) }}">
|
||||
{% endfor %}
|
||||
{% endblock %}
|
||||
{% for type, element in handle_event('ShowHeadElements', app.request) %}
|
||||
{% for arr in handle_event('ShowHeadElements', app.request) %}
|
||||
{# Only one element, but has dynamic value, can't access it directly #}
|
||||
{% for type, element in arr %}
|
||||
<{{type}} rel="{{element['rel']}}" type="{{element['type']}}" href="{{element['href']}}" title="{{element['title']}}">
|
||||
{% endfor %}
|
||||
{% endfor %}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user