Skip to content

Commit

Permalink
refactor: Move app name to a config variable
Browse files Browse the repository at this point in the history
  • Loading branch information
Rudloff committed Jan 6, 2019
1 parent 5b7b101 commit c6cf05f
Show file tree
Hide file tree
Showing 6 changed files with 16 additions and 5 deletions.
7 changes: 7 additions & 0 deletions classes/Config.php
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,13 @@ class Config
*/
public $avconvVerbosity = 'error';

/**
* App name
*
* @var string
*/
public $appName = 'AllTube Download';

/**
* YAML config file path.
*
Expand Down
3 changes: 3 additions & 0 deletions config/config.example.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,6 @@ remux: false

# MP3 bitrate when converting (in kbit/s)
audioBitrate: 128

# App name
appName: AllTube Download
1 change: 1 addition & 0 deletions controllers/FrontController.php
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,7 @@ public function extractors(Request $request, Response $response)
$response,
'extractors.tpl',
[
'config' => $this->config,
'extractors' => $this->download->listExtractors(),
'class' => 'extractors',
'title' => _('Supported websites'),
Expand Down
6 changes: 3 additions & 3 deletions templates/inc/head.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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">
Expand Down
2 changes: 1 addition & 1 deletion templates/inc/logo.tpl
Original file line number Diff line number Diff line change
@@ -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>
2 changes: 1 addition & 1 deletion templates/index.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -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}
Expand Down

0 comments on commit c6cf05f

Please sign in to comment.