mirror of
https://github.com/voc/streaming-website
synced 2024-11-10 06:34:17 +00:00
Prepare URLs in index
This commit is contained in:
parent
f581ebf00c
commit
a3becf276c
3 changed files with 12 additions and 4 deletions
10
index.php
10
index.php
|
@ -28,8 +28,9 @@ $conference = new Conference();
|
|||
|
||||
$tpl = new PhpTemplate('template/page.phtml');
|
||||
$tpl->set(array(
|
||||
'baseurl' => baseurl(),
|
||||
'baseurl' => forceslash(baseurl()),
|
||||
'route' => $route,
|
||||
'canonicalurl' => forceslash(baseurl()).forceslash($route),
|
||||
'assemblies' => './template/assemblies/',
|
||||
|
||||
'conference' => $conference,
|
||||
|
@ -37,6 +38,13 @@ $tpl->set(array(
|
|||
'schedule' => new Schedule(),
|
||||
));
|
||||
|
||||
if(startswith('//', @$GLOBALS['CONFIG']['BASEURL']))
|
||||
{
|
||||
$tpl->set(array(
|
||||
'httpsurl' => forceslash('https:'.$GLOBALS['CONFIG']['BASEURL']).forceslash($route),
|
||||
'httpurl' => forceslash('http:'. $GLOBALS['CONFIG']['BASEURL']).forceslash($route),
|
||||
));
|
||||
}
|
||||
|
||||
ob_start();
|
||||
try {
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
|
||||
<div class="nav navbar-form navbar-right button-wrapper">
|
||||
<? if(startswith('//', @$GLOBALS['CONFIG']['BASEURL'])): ?>
|
||||
<a class="form-control btn btn-ssl btn-<?= ssl() ? 'success' : 'warning' ?>" href="<?=h( (ssl() ? 'http:' : 'https:').$GLOBALS['CONFIG']['BASEURL'])?>">
|
||||
<a class="form-control btn btn-ssl btn-<?= ssl() ? 'success' : 'warning' ?>" href="<?=h(ssl() ? $httpurl : $httpsurl)?>">
|
||||
<span class="fa fa-<?= ssl() ? 'lock' : 'unlock-alt' ?>"></span>
|
||||
TLS
|
||||
</a>
|
||||
|
|
|
@ -26,8 +26,8 @@
|
|||
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||
|
||||
<base href="<?=h(forceslash($baseurl))?>" />
|
||||
<link href="<?=h(forceslash($baseurl).forceslash($route))?>" rel="canonical" />
|
||||
<base href="<?=h($baseurl)?>" />
|
||||
<link href="<?=h($canonicalurl)?>" rel="canonical" />
|
||||
|
||||
<link href="assets/img/apple-touch-icon.png" rel="apple-touch-icon" />
|
||||
<link href="assets/img/favicon.png" rel="icon" type="image/png" />
|
||||
|
|
Loading…
Reference in a new issue