mirror of
https://github.com/sorenpeter/timeline.git
synced 2025-12-15 10:57:01 +00:00
Added fallback avatar and moved imgs to /media
This commit is contained in:
parent
b15e888584
commit
34a52988e0
10 changed files with 30 additions and 37 deletions
|
|
@ -38,7 +38,7 @@
|
|||
/* Add a bit of transparency so light media isn't so glaring in dark mode */
|
||||
img,
|
||||
video {
|
||||
opacity: 0.8;
|
||||
opacity: 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -57,6 +57,10 @@ header > nav a {
|
|||
/* border: none;*/
|
||||
}
|
||||
|
||||
header > nav form {
|
||||
margin-top: -0.5rem;
|
||||
}
|
||||
|
||||
header > nav select {
|
||||
padding: 0.4rem;
|
||||
}
|
||||
|
|
@ -68,34 +72,12 @@ header > nav select {
|
|||
margin-right: 0.25rem;
|
||||
}
|
||||
|
||||
|
||||
/*body {
|
||||
font-family: sans-serif;
|
||||
line-height: 1.25;
|
||||
header p a img.logo {
|
||||
border: none;
|
||||
height: 1.5rem;
|
||||
width: 1.5rem;
|
||||
vertical-align: sub;
|
||||
}
|
||||
*/
|
||||
/*main {
|
||||
max-width: 700px;
|
||||
margin: 1rem auto;
|
||||
}
|
||||
*/
|
||||
|
||||
/*nav {
|
||||
display: flex;
|
||||
flex-wrap: wrap;
|
||||
justify-content: space-between;
|
||||
max-width: calc(var(--nav-width) + var(--gap) * 2);
|
||||
margin-inline-start: auto;
|
||||
margin-inline-end: auto;
|
||||
}*/
|
||||
|
||||
/*nav ul {
|
||||
width: 100%;
|
||||
display: flex;
|
||||
justify-content: space-between;
|
||||
padding-left: 0.5rem;
|
||||
margin: 0.25rem 0rem;
|
||||
}*/
|
||||
|
||||
header img.avatar {
|
||||
height: 1.5rem;
|
||||
|
|
@ -105,8 +87,9 @@ header img.avatar {
|
|||
|
||||
header p a,
|
||||
header p a:visited {
|
||||
font-weight: bold;
|
||||
color: var(--text);
|
||||
/* font-weight: bold;*/
|
||||
/* color: var(--text);*/
|
||||
color: var(--accent);
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
Before Width: | Height: | Size: 46 KiB After Width: | Height: | Size: 46 KiB |
BIN
media/default.png
Normal file
BIN
media/default.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 21 KiB |
BIN
media/logo.png
Normal file
BIN
media/logo.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3 KiB |
|
Before Width: | Height: | Size: 8.5 KiB After Width: | Height: | Size: 8.5 KiB |
|
|
@ -1,7 +1,7 @@
|
|||
</main>
|
||||
|
||||
<footer><center><small>
|
||||
© 2023 <?= $config['public_nick'] ?> | powered by <a href="https://github.com/sorenpeter/timeline" target="_blank">timeline - a single user twtxt/yarn pod </a>
|
||||
© 2024 <?= $config['public_nick'] ?> | powered by <a href="https://github.com/sorenpeter/timeline" target="_blank">timeline - a single user twtxt/yarn pod </a>
|
||||
</small></center></footer>
|
||||
|
||||
</body>
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ $profile = getTwtsFromTwtxtString($config['public_txt_url']);
|
|||
<link rel="stylesheet" type="text/css" href="<?= $baseURL ?>/libs/simple.css">
|
||||
<link rel="stylesheet" type="text/css" href="<?= $baseURL ?>/libs/timeline.css">
|
||||
<link rel="stylesheet" type="text/css" href="<?= $baseURL ?>/custom.css">
|
||||
<link rel="icon" type="image/x-icon" href="<?= $baseURL ?>/media/logo.png">
|
||||
<title><?= $title ?></title>
|
||||
</head>
|
||||
<body>
|
||||
|
|
@ -20,12 +21,17 @@ $profile = getTwtsFromTwtxtString($config['public_txt_url']);
|
|||
<header>
|
||||
<p>
|
||||
<a href="/">
|
||||
<!-- <img class="logo" src="<?= $baseURL ?>/media/logo.png"> -->
|
||||
<?= $config['site_title']; ?>
|
||||
</a>
|
||||
<!-- <a href="/">
|
||||
<img class="avatar" src="<?= $profile->avatar ?>" alt="" loading="lazy">
|
||||
<?= parse_url($profile->mainURL, PHP_URL_HOST); ?>
|
||||
</a>
|
||||
<!-- <a href="<?= $baseURL ?>">
|
||||
<a href="/">
|
||||
<img class="avatar" src="<?= $profile->avatar ?>" alt="" loading="lazy">
|
||||
<?= $profile->nick ?></a>@<?= parse_url($profile->mainURL, PHP_URL_HOST); ?> -->
|
||||
<?= $profile->nick ?>@<?= parse_url($profile->mainURL, PHP_URL_HOST); ?>
|
||||
</a> -->
|
||||
</p>
|
||||
<nav>
|
||||
|
||||
|
|
@ -42,11 +48,11 @@ $profile = getTwtsFromTwtxtString($config['public_txt_url']);
|
|||
<li><a href="<?= $baseURL ?>/logout">Log Out</a></li>
|
||||
<li><?php include 'partials/lists.php'; ?></li>
|
||||
<?php /*}*/ } else { ?>
|
||||
<li><a href="<?= $baseURL ?>">Timeline</a></li>
|
||||
<li><a href="<?= $baseURL ?>?profile=<?= $url ?>">Profile</a></li>
|
||||
<li><a href="<?= $baseURL ?>/gallery?profile=<?= $profile->mainURL ?>">Gallery</a></li>
|
||||
<li><a href="<?= $baseURL ?>/following">Following <?php // echo count($twtFollowingList); ?></a></li>
|
||||
<li><a href="<?= $baseURL ?>/login">Log in</a></li>
|
||||
<li><a href="<?= $baseURL ?>">Timeline</a></li>
|
||||
<li><a href="<?= $baseURL ?>/login" class="secondary">Log in</a></li>
|
||||
<?php } ?>
|
||||
</ul>
|
||||
</nav>
|
||||
|
|
|
|||
|
|
@ -12,7 +12,7 @@ $profileURL = $baseURL . '/?profile=' . $profile->mainURL;
|
|||
<div class="profile">
|
||||
|
||||
<a href="<?=$profileURL?>">
|
||||
<img class="avatar" src="<?=$profile->avatar?>" alt="" loading="lazy">
|
||||
<img class="avatar" src="<?=$profile->avatar?>" onerror="this.onerror=null;this.src='<?= $baseURL ?>/media/default.png';">
|
||||
</a>
|
||||
|
||||
<div>
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@
|
|||
<?php foreach ($twts as $twt) {?>
|
||||
<article class="post-entry" id="<?=$twt->hash?>">
|
||||
<a href="<?=$baseURL?>/?profile=<?=$twt->mainURL?>">
|
||||
<img src='<?=$twt->avatar?>' class="avatar" onerror="this.onerror=null;this.src='imgs/image_not_found.png';">
|
||||
<img src='<?=$twt->avatar?>' class="avatar" onerror="this.onerror=null;this.src='<?= $baseURL ?>/media/default.png';">
|
||||
</a>
|
||||
<div>
|
||||
<a href="<?=$baseURL?>/?profile=<?=$twt->mainURL?>" class="author">
|
||||
|
|
|
|||
|
|
@ -12,6 +12,10 @@ cache_refresh_time = 15
|
|||
; Max execution time to avoid running to the infinite
|
||||
max_execution_time = 300
|
||||
|
||||
; Title of your website
|
||||
; used to navigate to the root of your domain
|
||||
site_title = "Timeline"
|
||||
|
||||
; Check that your current user has permissions for this file
|
||||
; Check also the user owner is correct, www-data for instance
|
||||
; TODO: Implement a way to know we have access to this file
|
||||
|
|
|
|||
Loading…
Reference in a new issue