Browse Source

add wanted label to magnet subject when leechers have no seeds

main
ghost 1 year ago
parent
commit
5f46332ceb
  1. 21
      src/public/assets/theme/default/css/framework.css
  2. 6
      src/public/index.php
  3. 6
      src/public/magnet.php

21
src/public/assets/theme/default/css/framework.css

@ -54,8 +54,16 @@ @@ -54,8 +54,16 @@
}
.label-green {
color: #277b1b;
border: 1px #92bc8c solid;
color: #fff;
background-color: #65916d;
}
.position-relative {
position: relative;
}
.top--2 {
top: -2px;
}
.line-height-26 {
@ -112,6 +120,10 @@ @@ -112,6 +120,10 @@
font-weight: normal;
}
.font-size-10 {
font-size: 10px;
}
.font-size-12 {
font-size: 12px;
}
@ -199,6 +211,11 @@ @@ -199,6 +211,11 @@
margin-left: 16px;
}
.margin-x-4 {
margin-left: 4px;
margin-right: 4px;
}
.margin-r-4 {
margin-right: 4px;
}

6
src/public/index.php

@ -220,6 +220,12 @@ echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?> @@ -220,6 +220,12 @@ echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?>
<div class="padding-16 <?php echo $magnet->sensitive ? 'blur-2 blur-hover-0' : false ?>">
<a href="<?php echo sprintf('%s/magnet.php?magnetId=%s', WEBSITE_URL, $magnet->magnetId) ?>">
<h2 class="margin-b-8"><?php echo $magnet->metaTitle ?></h2>
<?php if ($magnet->leechers && !$magnet->seeders) { ?>
<span class="label label-green margin-x-4 font-size-10 position-relative top--2 cursor-default"
title="<?php echo _('Active leechers waiting for seeds') ?>">
<?php echo _('wanted') ?>
</span>
<?php } ?>
</a>
<div class="float-right opacity-0 parent-hover-opacity-09">
<?php if (!$magnet->public) { ?>

6
src/public/magnet.php

@ -199,6 +199,12 @@ echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?> @@ -199,6 +199,12 @@ echo '<?xml version="1.0" encoding="UTF-8"?>' . PHP_EOL ?>
<div class="padding-16 <?php echo $response->magnet->sensitive ? 'blur-2 blur-hover-0' : false ?>">
<a name="magnet-<?php echo $response->magnet->magnetId ?>"></a>
<h1 class="margin-b-8"><?php echo $response->magnet->metaTitle ?></h1>
<?php if ($response->magnet->leechers && !$response->magnet->seeders) { ?>
<span class="label label-green margin-x-4 font-size-10 position-relative top--2 cursor-default"
title="<?php echo _('Active leechers waiting for seeds') ?>">
<?php echo _('wanted') ?>
</span>
<?php } ?>
<div class="float-right opacity-0 parent-hover-opacity-09">
<?php if (!$response->magnet->public) { ?>
<span class="margin-l-8" title="<?php echo _('Private') ?>">

Loading…
Cancel
Save