Skip to content

Commit

Permalink
start using webp assets
Browse files Browse the repository at this point in the history
  • Loading branch information
pjc09h committed Sep 12, 2023
1 parent ce37718 commit 8cd9afa
Show file tree
Hide file tree
Showing 60 changed files with 75 additions and 114 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ This is based on Laravel Tinker and in fact uses the same REPL under the hood.

# Gracie Gazelle

![Gracie Gazelle](public/images/mascot.png)
![Gracie Gazelle](public/images/mascot.webp)

Gracie is a veteran pirate of the digital ocean.
On land, predators form companies to hunt down prey.
Expand All @@ -247,6 +247,6 @@ She proudly puts the forbidden share symbols on her hat and belt, and is now one
## Tyson Tan

Character design and bio by Tyson Tan, who offers mascot design services for free and open source software, free of charge, under a free license.
[Download the high resolution version.](public/images/mascotFullVersion.png)
[Download the high resolution version.](public/images/mascotFullVersion.webp)

[tysontan.com](https://tysontan.com) / <tysontan@tysontan.com> / [@TysonTanX](https://twitter.com/tysontanx)
11 changes: 3 additions & 8 deletions app/App.php
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,9 @@ public static function manifest()
"description" => $app->env->siteDescription,
"icons" => [
[
"src" => "/images/logos/liquidrop-bookish-1k.png",
"sizes" => "1024x1024",
"type" => "image/png",
],
[
"src" => "/images/logos/liquidrop-postmod-1k.png",
"sizes" => "1024x1024",
"type" => "image/png",
"src" => "/images/logos/colorfulWaves-whiteShadow-2k.webp",
"sizes" => "2048x2048",
"type" => "image/webp",
],
],
/*
Expand Down
2 changes: 1 addition & 1 deletion app/User.php
Original file line number Diff line number Diff line change
Expand Up @@ -760,7 +760,7 @@ public static function displayAvatar(?string $uri, string $username): string
# disabled or missing: show default
if (empty($uri)) {
#if (!self::hasAvatarsEnabled() || empty($uri)) {
$uri = "/images/avatars/default.png";
$uri = "/images/avatars/default.webp";

return "<img src='{$uri}' alt='default avatar' title='default avatar' width='120'>";
}
Expand Down
Binary file removed public/images/avatars/default.png
Binary file not shown.
Binary file added public/images/avatars/default.webp
Binary file not shown.
Binary file removed public/images/icons/archive.png
Binary file not shown.
Binary file added public/images/icons/archive.webp
Binary file not shown.
File renamed without changes
Binary file added public/images/icons/rss.webp
Binary file not shown.
Binary file removed public/images/icons/version.png
Binary file not shown.
Binary file added public/images/icons/version.webp
Binary file not shown.
Binary file removed public/images/logos/liquidrop-bookish-1k.png
Binary file not shown.
Binary file removed public/images/logos/liquidrop-postmod-1k.png
Binary file not shown.
Binary file removed public/images/logos/patreon.png
Binary file not shown.
Binary file added public/images/logos/patreon.webp
Binary file not shown.
File renamed without changes.
Binary file removed public/images/logos/torrents.bio.png
Binary file not shown.
Binary file added public/images/logos/torrents.bio.webp
Binary file not shown.
Binary file removed public/images/mascot.png
Binary file not shown.
Binary file added public/images/mascot.webp
Binary file not shown.
Binary file removed public/images/mascotFullVersion.png
Binary file not shown.
Binary file added public/images/mascotFullVersion.webp
Binary file not shown.
Binary file removed public/images/noartwork.png
Binary file not shown.
Binary file added public/images/noartwork.webp
Binary file not shown.
Binary file removed public/images/oink.png
Binary file not shown.
Binary file added public/images/oink.webp
Binary file not shown.
Binary file removed public/images/plausible-optout.png
Binary file not shown.
Binary file added public/images/plausibleOptOut.webp
Binary file not shown.
Binary file removed public/images/symbols/disabled.png
Binary file not shown.
Binary file removed public/images/symbols/donor.png
Binary file not shown.
Binary file removed public/images/symbols/donor_2.png
Binary file not shown.
Binary file removed public/images/symbols/donor_3.png
Binary file not shown.
Binary file removed public/images/symbols/donor_4.png
Binary file not shown.
Binary file removed public/images/symbols/donor_5.png
Binary file not shown.
Binary file removed public/images/symbols/donor_6.png
Binary file not shown.
Binary file removed public/images/symbols/first-line-support.png
Binary file not shown.
Binary file removed public/images/symbols/rss.png
Binary file not shown.
Binary file removed public/images/symbols/table-order.png
Binary file not shown.
Binary file removed public/images/symbols/uploader.png
Binary file not shown.
Binary file removed public/images/symbols/warned.png
Binary file not shown.
Binary file removed public/images/table-order.png
Diff not rendered.
2 changes: 1 addition & 1 deletion public/opensearch.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
<Url type="text/html"
template="https://torrents.bio/torrents.php?search={searchTerms}" />
<LongName>Search torrents.bio for BitTorrent biology data</LongName>
<Image height="2048" width="2048" type="image/webp">https://torrents.bio/images/favicon.webp</Image>
<Image height="2048" width="2048" type="image/webp">https://torrents.bio/images/logos/simpleFavicon-2k.webp</Image>
<Query role="example" searchTerms="saccharomyces cerevisiae" />
<Developer>Omics Tools LLC</Developer>
<Attribution>
Expand Down
2 changes: 1 addition & 1 deletion resources/js/global.js
Original file line number Diff line number Diff line change
Expand Up @@ -383,7 +383,7 @@ function getCover(event) {
if ($("#coverCont img").length == 0) {
coverCont.appendChild(document.createElement("img"));
}
$("#coverCont img")[0].src = image ? image : "/public/images/noartwork.png";
$("#coverCont img")[0].src = image ? image : "/public/images/noartwork.webp";
coverCont.style.display = "block";
coverListener = (mevent) => {
let wh = window.innerHeight,
Expand Down
16 changes: 14 additions & 2 deletions resources/scss/assets/icons.scss
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ img.torrent_header {
content: "";
margin-right: 0.5rem;

background-image: url("/images/icons/version.png");
background-image: url("/images/icons/version.webp");
background-size: 100% 100%;
display: inline-block;

Expand All @@ -218,7 +218,7 @@ img.torrent_header {
content: "";
margin-right: 0.5rem;

background-image: url("/images/icons/archive.png");
background-image: url("/images/icons/archive.webp");
background-size: 100% 100%;
display: inline-block;

Expand All @@ -235,6 +235,18 @@ img.torrent_header {
}


/**
* collages
*/

.locked {
&:before {
content: "🔒";
margin-right: 0.5rem;
}
}


/**
* badges
*/
Expand Down
4 changes: 2 additions & 2 deletions resources/scss/bookish/layout.scss
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/* Logo */
/*
.logo {
background: url("/images/logos/liquidrop-bookish-1k.png");
background: url("/images/logos/colorfulWaves-whiteShadow-2k.webp");
background-size: contain;
width: 50px;
min-width: 50px;
Expand Down Expand Up @@ -149,4 +149,4 @@ ul .invitetree {
float: left;
margin: 0px;
padding: 0px;
}
}
2 changes: 1 addition & 1 deletion resources/scss/global/fonts.scss
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@
* wikipedia-style external links
*/
a.external {
background-image: url("/images/symbols/external-link-ltr-icon.svg");
background-image: url("/images/icons/externalLink.svg");
background-position: center right;
background-repeat: no-repeat;
padding-right: 13px;
Expand Down
51 changes: 2 additions & 49 deletions resources/scss/global/tables.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ table {
&.compact,
&.dense,
&.small {

th,
td {
border-bottom: none;
Expand All @@ -47,54 +48,6 @@ table.sidebar {
}
}

/**
* sortable tables
*/

$bitmap: "/images/symbols/table-order.png";
$nrsr: no-repeat scroll right;

@mixin bitmap($px) {
background: url($bitmap) $nrsr $px transparent;
}

.headerSort {
cursor: pointer;
}

.headerSort span {
@include bitmap(-38px);
padding: 0px 20px 0 0;
}

.headerSortDown span {
@include bitmap(4px);
}

.headerSortUp span {
@include bitmap(-79px);
}

.headerSort.sorter-false,
.headerSort.sorter-false span {
background-image: none;
cursor: default;
}

/* generic */
#sortable {
list-style-type: none;
margin: 0;
padding: 0;
width: 50%;

li {
padding: 0px;
font-size: 1.2em;
height: 1.5em;
}
}

/* drag and drop controls */
.drag_drop_save {
padding: 6px 0;
Expand Down Expand Up @@ -179,4 +132,4 @@ aside.postActions {
}
}
}
}
}
6 changes: 3 additions & 3 deletions sections/bookmarks/torrents.php
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ class="number_column<?=(($Torrent['Seeders'] == 0) ? ' r00' : '')?>">
$DisplayName .= 'data-cover="'.\Gazelle\Images::process($picture, 'thumb').'" ';
}

$DisplayName .=' class="tooltip" title="View torrent group" dir="ltr">'.$GroupName.'</a>';
$DisplayName .= ' class="tooltip" title="View torrent group" dir="ltr">'.$GroupName.'</a>';

if ($Torrent['IsSnatched']) {
$DisplayName .= ' ' . Format::torrent_label('Snatched', 'bold');
Expand Down Expand Up @@ -245,7 +245,7 @@ class="number_column<?=(($Torrent['Seeders'] == 0) ? ' r00' : '')?>">
class="bookmark_<?=$GroupID?>">

<?php if (!$picture) {
$picture = staticServer.'/images/noartwork.png';
$picture = staticServer.'/images/noartwork.webp';
} ?>

<img class="tooltip"
Expand Down Expand Up @@ -282,7 +282,7 @@ class="bookmark_<?=$GroupID?>">
<div class="header">
<h2><?php if (!$Sneaky) { ?><a
href="feeds.php?feed=torrents_bookmarks_t_<?=$app->user->extra['torrent_pass']?>&amp;user=<?=$app->user->core['id']?>&amp;auth=<?=$app->user->extra['RSS_Auth']?>&amp;passkey=<?=$app->user->extra['torrent_pass']?>&amp;authkey=<?=$app->user->extra['AuthKey']?>&amp;name=<?=urlencode($ENV->siteName.': Bookmarked Torrents')?>"><img
src="<?=staticServer?>/images/symbols/rss.png"
src="<?=staticServer?>/images/icons/rss.webp"
alt="RSS feed" /></a>&nbsp;<?php } ?><?=$Title?>
</h2>
<div class="linkbox">
Expand Down
4 changes: 2 additions & 2 deletions sections/requests/request.php
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

if ($IsFilled) {
$DisplayLink = "<a href='torrents.php?torrentid=$Request[TorrentID]' dir='ltr'>$Title</a>";
#$DisplayLink = "$ArtistLink<a href='torrents.php?torrentid=$Request[TorrentID]' dir='ltr'>$Title</a>";
#$DisplayLink = "$ArtistLink<a href='torrents.php?torrentid=$Request[TorrentID]' dir='ltr'>$Title</a>";
} else {
$DisplayLink = '<span dir="ltr">'.$Title."</span>";
#$DisplayLink = $ArtistLink.'<span dir="ltr">'.$Title."</span>";
Expand Down Expand Up @@ -142,7 +142,7 @@ class="brackets">Request update</a>
<?php
} else { ?>
<img style="width: 100%;"
src="<?=staticServer?>/images/noartwork.png"
src="<?=staticServer?>/images/noartwork.webp"
alt="<?=$CategoryName?>" class="tooltip"
title="<?=$CategoryName?>" height="220" border="0" />
<?php } ?>
Expand Down
2 changes: 1 addition & 1 deletion sections/torrents/details.php
Original file line number Diff line number Diff line change
Expand Up @@ -321,7 +321,7 @@ class="brackets">View log</a>
alt="<?=$AltName?>" /></div>
<?php } else { ?>
<div><img width="100%"
src="<?=staticServer?>/images/noartwork.png"
src="<?=staticServer?>/images/noartwork.webp"
alt="<?=$Categories[$GroupCategoryID - 1]?>"
class="brackets tooltip"
title="<?=$Categories[$GroupCategoryID - 1]?>" /></div>
Expand Down
10 changes: 5 additions & 5 deletions sections/user/notify_edit.php
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
<h3>
<a
href="feeds.php?feed=torrents_notify_<?=$N['ID']?>_<?=$app->user->extra['torrent_pass']?>&amp;user=<?=$app->user->core['id']?>&amp;auth=<?=$app->user->extra['RSS_Auth']?>&amp;passkey=<?=$app->user->extra['torrent_pass']?>&amp;authkey=<?=$app->user->extra['AuthKey']?>&amp;name=<?=urlencode($N['Label'])?>"><img
src="<?=staticServer?>/images/symbols/rss.png"
src="<?=staticServer?>/images/icons/rss.webp"
alt="RSS feed"></a>
<?=\Gazelle\Text::esc($N['Label'])?>
<a href="user.php?action=notify_delete&amp;id=<?=$N['ID']?>&amp;auth=<?=$app->user->extra['AuthKey']?>"
Expand Down Expand Up @@ -186,8 +186,8 @@ class="box pad slight_margin"
<input type="checkbox" name="categories<?=$i?>[]"
id="<?=$Category?>_<?=$N['ID']?>"
value="<?=$Category?>" <?php if (in_array($Category, $N['Categories'])) {
echo ' checked="checked"';
} ?>>
echo ' checked="checked"';
} ?>>
<label
for="<?=$Category?>_<?=$N['ID']?>"><?=$Category?></label><br>
<?php } ?>
Expand All @@ -200,8 +200,8 @@ class="box pad slight_margin"
<input type="checkbox" name="newgroupsonly<?=$i?>"
id="newgroupsonly_<?=$N['ID']?>"
<?php if ($N['NewGroupsOnly'] == '1') { # todo: Fix strict equality checking
echo ' checked="checked"';
} ?>>
echo ' checked="checked"';
} ?>>
<label
for="newgroupsonly_<?=$N['ID']?>">Only
notify for new releases, not new formats</label>
Expand Down
Loading

0 comments on commit 8cd9afa

Please sign in to comment.