mirror of
https://github.com/sorenpeter/timeline.git
synced 2025-12-16 03:17:01 +00:00
Merge pull request #38 from eapl-gemugami/37-header-link-not-redirecting-to-home-page
feat(header): add base_url to logo link
This commit is contained in:
commit
eb34813e5e
2 changed files with 20 additions and 23 deletions
|
|
@ -1,5 +1,6 @@
|
|||
<?php
|
||||
# Shows the timeline for a user
|
||||
|
||||
declare (strict_types = 1);
|
||||
|
||||
# Parameters
|
||||
|
|
@ -15,7 +16,6 @@ declare (strict_types = 1);
|
|||
# If page is higher than N, shows nothing
|
||||
#
|
||||
# hash(string) =
|
||||
#
|
||||
|
||||
require_once('libs/session.php');
|
||||
require_once('libs/twtxt.php');
|
||||
|
|
@ -38,7 +38,6 @@ if (isset($config['site_title'])) {
|
|||
// HACKED by sp@darch.dk
|
||||
if(!empty($_GET['list'])) {
|
||||
$url = $baseURL.$_GET['list'];
|
||||
//$url = "https://darch.dk/".$_GET['list'];
|
||||
}
|
||||
else {
|
||||
$url = $config['public_txt_url'];
|
||||
|
|
@ -93,12 +92,10 @@ if (!empty($_GET['url'])) { // Show profile for some user
|
|||
*/
|
||||
|
||||
if (!empty($twtsURL)) {
|
||||
|
||||
$parsedTwtxtFile = getTwtsFromTwtxtString($twtsURL);
|
||||
if (!is_null($parsedTwtxtFile)) {
|
||||
$parsedTwtxtFiles[$parsedTwtxtFile->mainURL] = $parsedTwtxtFile;
|
||||
}
|
||||
|
||||
} else { // Show timeline for the URL
|
||||
$parsedTwtxtFiles = [];
|
||||
foreach ($fileLines as $currentLine) {
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@
|
|||
$profile = getTwtsFromTwtxtString($config['public_txt_url']);
|
||||
|
||||
?>
|
||||
|
||||
<!doctype html>
|
||||
<html>
|
||||
<head>
|
||||
|
|
@ -12,7 +11,6 @@ $profile = getTwtsFromTwtxtString($config['public_txt_url']);
|
|||
<link rel="icon" type="image/x-icon" href="<?= $baseURL ?>/media/logo.png">
|
||||
<?php if( isset($_SESSION['password'])) { ?>
|
||||
<script src="<?= $baseURL ?>/libs/tiny-mde.min.js"></script>
|
||||
<!-- <link rel="stylesheet" type="text/css" href="<?= $baseURL ?>/libs/tiny-mde.min.css" /> -->
|
||||
<link rel="stylesheet" type="text/css" href="<?= $baseURL ?>/libs/tiny-mde.css" />
|
||||
<?php } ?>
|
||||
<link rel="stylesheet" type="text/css" href="<?= $baseURL ?>/libs/simple.css">
|
||||
|
|
@ -26,23 +24,25 @@ $profile = getTwtsFromTwtxtString($config['public_txt_url']);
|
|||
|
||||
<header>
|
||||
<p>
|
||||
<a href="/">
|
||||
<a href="<?= $baseURL ?>">
|
||||
<img class="logo" src="<?= $baseURL ?>/media/logo.png">
|
||||
<?= $config['site_title']; ?>
|
||||
</a>
|
||||
<!-- <a href="/">
|
||||
<!--
|
||||
<a href="/">
|
||||
<img class="logo" src="<?= $profile->avatar ?>" alt="" loading="lazy">
|
||||
<?= parse_url($profile->mainURL, PHP_URL_HOST); ?>
|
||||
</a>
|
||||
<a href="/">
|
||||
<img class="logo" src="<?= $profile->avatar ?>" alt="" loading="lazy">
|
||||
<?= $profile->nick ?>@<?= parse_url($profile->mainURL, PHP_URL_HOST); ?>
|
||||
</a> -->
|
||||
</a>
|
||||
-->
|
||||
</p>
|
||||
<nav>
|
||||
|
||||
<ul class="secondary">
|
||||
<?php //if ($validSession) { // TODO: Make login seqcure ?>
|
||||
<?php //if ($validSession) { // TODO: Make login secure ?>
|
||||
<?php if( isset($_SESSION['password'])) { /*
|
||||
if($_SESSION['password']=="$password") {*/ // Hacky login ?>
|
||||
<li><a href="<?= $baseURL ?>/refresh?url=<?= $url ?>"><i class="fa fa-refresh"></i><span>Refresh</span></a></li>
|
||||
|
|
|
|||
Loading…
Reference in a new issue