mirror of
https://github.com/flarum/core.git
synced 2025-07-31 13:40:20 +02:00
Add ability to upload a logo + favicon, and add custom header HTML
Closes #268. Not going to bother with a preview SVG or anything fancy for now – we can think about that as part of #746. Right now it's just good to finally get this functionality in! Also need to think about apple-touch-icon, msTile stuff, and social sharing image. Not sure if this is all too much for core, but it's definitely too much for the current Appearance page layout. Again, something to think about as part of #746. Code is a bit rough around the edges, but figured there's not much point in using the command bus properly since #870.
This commit is contained in:
@@ -9,7 +9,12 @@
|
||||
<div class="container">
|
||||
<h1 class="Header-title">
|
||||
<a href="{{ array_get($forum, 'attributes.baseUrl') }}">
|
||||
{{ array_get($forum, 'attributes.title') }}
|
||||
<?php $title = array_get($forum, 'attributes.title'); ?>
|
||||
@if ($logo = array_get($forum, 'attributes.logoUrl'))
|
||||
<img src="{{ $logo }}" alt="{{ $title }}" class="Header-logo">
|
||||
@else
|
||||
{{ $title }}
|
||||
@endif
|
||||
</a>
|
||||
</h1>
|
||||
<div id="header-primary" class="Header-primary"></div>
|
||||
|
@@ -11,10 +11,16 @@
|
||||
<link rel="stylesheet" href="{{ $url }}">
|
||||
@endforeach
|
||||
|
||||
@if ($faviconUrl = array_get($forum, 'attributes.faviconUrl'))
|
||||
<link href="{{ $faviconUrl }}" rel="shortcut icon">
|
||||
@endif
|
||||
|
||||
{!! $head !!}
|
||||
</head>
|
||||
|
||||
<body>
|
||||
{!! array_get($forum, 'attributes.headerHtml') !!}
|
||||
|
||||
{!! $layout !!}
|
||||
|
||||
<div id="modal"></div>
|
||||
|
@@ -1,12 +1,12 @@
|
||||
<?php
|
||||
/**
|
||||
* Forum WebApp Template
|
||||
* Forum Web App Template
|
||||
*
|
||||
* NOTE: You shouldn't edit this file directly. Your changes will be overwritten
|
||||
* when you update Flarum. See flarum.org/docs/templates to learn how to
|
||||
* customize your forum's layout.
|
||||
*
|
||||
* Flarum's JavaScript client mounts various components into key elements in
|
||||
* Flarum's JavaScript app mounts various components into key elements in
|
||||
* this template. They are distinguished by their ID attributes:
|
||||
*
|
||||
* - #app
|
||||
@@ -32,7 +32,12 @@
|
||||
<div class="container">
|
||||
<h1 class="Header-title">
|
||||
<a href="{{ array_get($forum, 'attributes.baseUrl') }}" id="home-link">
|
||||
{{ array_get($forum, 'attributes.title') }}
|
||||
<?php $title = array_get($forum, 'attributes.title'); ?>
|
||||
@if ($logo = array_get($forum, 'attributes.logoUrl'))
|
||||
<img src="{{ $logo }}" alt="{{ $title }}" class="Header-logo">
|
||||
@else
|
||||
{{ $title }}
|
||||
@endif
|
||||
</a>
|
||||
</h1>
|
||||
<div id="header-primary" class="Header-primary"></div>
|
||||
|
Reference in New Issue
Block a user