refactor: Move app name to a config variable

See #205
This commit is contained in:
Pierre Rudloff 2019-01-06 16:59:16 +01:00
parent 5b7b101a8a
commit c6cf05f8ec
6 changed files with 16 additions and 5 deletions

View File

@ -112,6 +112,13 @@ class Config
*/
public $avconvVerbosity = 'error';
/**
* App name
*
* @var string
*/
public $appName = 'AllTube Download';
/**
* YAML config file path.
*

View File

@ -42,3 +42,6 @@ remux: false
# MP3 bitrate when converting (in kbit/s)
audioBitrate: 128
# App name
appName: AllTube Download

View File

@ -162,6 +162,7 @@ class FrontController
$response,
'extractors.tpl',
[
'config' => $this->config,
'extractors' => $this->download->listExtractors(),
'class' => 'extractors',
'title' => _('Supported websites'),

View File

@ -10,13 +10,13 @@
<meta property="og:description" content="{$description|escape}" />
{/if}
<link rel="stylesheet" href="{base_url}/dist/main.css" />
<title>AllTube Download{if isset($title)} - {$title|escape}{/if}</title>
<title>{$config->appName}{if isset($title)} - {$title|escape}{/if}</title>
<link rel="canonical" href="{$canonical}" />
<link rel="icon" href="{base_url}/img/favicon.png" />
<meta property="og:title" content="AllTube Download{if isset($title)} - {$title|escape}{/if}" />
<meta property="og:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}" />
<meta property="og:image" content="{base_url}/img/logo.png" />
<meta name="twitter:card" content="summary" />
<meta name="twitter:title" content="AllTube Download{if isset($title)} - {$title|escape}{/if}" />
<meta name="twitter:title" content="{$config->appName}{if isset($title)} - {$title|escape}{/if}" />
<meta name="twitter:image" content="{base_url}/img/logo.png" />
<meta name="twitter:creator" content="@Tael67" />
<meta name="theme-color" content="#4F4F4F">

View File

@ -1,4 +1,4 @@
<h1 class="logobis">
<a class="logocompatible" href="{base_url}">
AllTube Download<span class="logocompatiblemask"><img src="{base_url}/img/logocompatiblemask.png" width="447" height="107" alt="" /></span>
<span class="logocompatiblemask"><img src="{base_url}/img/logocompatiblemask.png" width="447" height="107" alt="{$config->appName}" /></span>
</a></h1>

View File

@ -2,7 +2,7 @@
{include file='inc/header.tpl'}
<main class="main">
<div><img class="logo" src="{base_url}/img/logo.png"
alt="AllTube Download" width="328" height="284"></div>
alt="{$config->appName}" width="328" height="284"></div>
<form action="{path_for name="video"}">
<label class="labelurl" for="url">
{t}Copy here the URL of your video (Youtube, Dailymotion, etc.){/t}