Added favicon

This commit is contained in:
Alejandro Celaya
2018-12-07 09:17:31 +01:00
parent 7b78bee135
commit 737137b19f
4 changed files with 35 additions and 30 deletions
@@ -20,5 +20,6 @@ class TranslatorExtension implements ExtensionInterface
public function register(Engine $engine): void public function register(Engine $engine): void
{ {
$engine->registerFunction('translate', [$this->translator, 'translate']); $engine->registerFunction('translate', [$this->translator, 'translate']);
$engine->registerFunction('locale', [$this->translator, 'getLocale']);
} }
} }
@@ -25,11 +25,14 @@ class TranslatorExtensionTest extends TestCase
public function properFunctionsAreReturned() public function properFunctionsAreReturned()
{ {
$engine = $this->prophesize(Engine::class); $engine = $this->prophesize(Engine::class);
$registerFunction = $engine->registerFunction('translate', Argument::type('callable'))->will(function () { $registerTranslate = $engine->registerFunction('translate', Argument::type('callable'))->will(function () {
});
$registerLocale = $engine->registerFunction('locale', Argument::type('array'))->will(function () {
}); });
$this->extension->register($engine->reveal()); $this->extension->register($engine->reveal());
$registerFunction->shouldHaveBeenCalledOnce(); $registerTranslate->shouldHaveBeenCalledOnce();
$registerLocale->shouldHaveBeenCalledOnce();
} }
} }
+29 -28
View File
@@ -1,31 +1,32 @@
<!DOCTYPE html> <!DOCTYPE html>
<html> <html lang="<?= $this->locale() ?>">
<head> <head>
<title><?= $this->section('title', '') ?> | URL shortener</title> <title><?= $this->section('title', '') ?> | URL shortener</title>
<meta charset="utf-8" /> <meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge" /> <meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1" /> <meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css" /> <link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<style> <link rel="shortcut icon" href="/favicon.ico">
body {padding-top: 60px;} <style>
.app {display: flex; min-height: 100vh; flex-direction: column;} body {padding-top: 60px;}
.app-content {flex: 1;} .app {display: flex; min-height: 100vh; flex-direction: column;}
.app-footer p {margin-bottom: 20px;} .app-content {flex: 1;}
</style> .app-footer p {margin-bottom: 20px;}
<?= $this->section('stylesheets', '') ?> </style>
</head> <?= $this->section('stylesheets', '') ?>
<body class="app"> </head>
<div class="app-content"> <body class="app">
<main class="container"> <div class="app-content">
<?= $this->section('main', '') ?> <main class="container">
</main> <?= $this->section('main', '') ?>
</div> </main>
<footer class="app-footer">
<div class="container">
<hr />
<p>&copy; <?= date('Y') ?> <a href="https://shlink.io">Shlink</a></p>
</div> </div>
</footer>
</body> <footer class="app-footer">
<div class="container">
<hr>
<p>&copy; <?= date('Y') ?> <a href="https://shlink.io">Shlink</a></p>
</div>
</footer>
</body>
</html> </html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB