1
0

Added ProjectLawful-ebook downloads (blog::29)
All checks were successful
Build Docker and Deploy / Build Docker (push) Successful in 1m18s
Build Docker and Deploy / Deploy to Server (push) Successful in 27s

This commit is contained in:
2023-09-11 19:59:07 +02:00
parent f7688a224b
commit 300992b49f
49 changed files with 689 additions and 84 deletions

View File

@@ -92,6 +92,18 @@ $connected = true; try { $SITE->modules->Database(); } catch (Exception $e) { $c
<!-- - - - - - - - - - - - - - - - - - - - - -->
<div class="boxedcontent">
<div class="bc_header">Project Lawful ebook (download count)</div>
<div class="bc_data keyvaluelist kvl_250">
<?php foreach ($SITE->modules->ProjectLawful()->listDownloadCounts() as $dlc): ?>
<div><span><?php echo $dlc['variant']; ?>:</span> <span><?php echo $dlc['count']; ?></span></div>
<?php endforeach; ?>
</div>
</div>
<!-- - - - - - - - - - - - - - - - - - - - - -->
<div class="boxedcontent">
<div class="bc_header">ExtendedGitGraph</div>

View File

@@ -39,7 +39,11 @@ else
{
echo $SITE->fragments->BlogviewMarkdown($post);
}
elseif ($post['type'] === 'euler')
elseif ($post['type'] === 'html')
{
echo $SITE->fragments->BlogviewHTML($post);
}
elseif ($post['type'] === 'euler')
{
if ($subview === '') echo $SITE->fragments->BlogviewEulerList($post);
else echo $SITE->fragments->BlogviewEulerSingle($post, $subview);

View File

@@ -51,7 +51,7 @@ $FRAME_OPTIONS->activeHeader = 'programs';
{
if ($xurl['alert'] === null)
{
echo '<a class="iconbutton '.$xurl['css'].'" href="'.$xurl['href'].'">';
echo '<a rel="nofollow" class="iconbutton '.$xurl['css'].'" href="'.$xurl['href'].'">';
echo '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">';
echo '<use xlink:href="/data/images/icons.svg#'.$xurl['svg'].'"/>';
echo '</svg>';

View File

@@ -0,0 +1,18 @@
<?php
require_once (__DIR__ . '/../internals/website.php');
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
$variant = $ROUTE->parameter['variant'];
if (!$SITE->modules->ProjectLawful()->variantExists($variant))
{
$FRAME_OPTIONS->setForced404('epub file not found');
return;
}
$SITE->modules->ProjectLawful()->insertDownload($variant);
$FRAME_OPTIONS->setForcedRedirect('/data/projectlawful/project-lawful-' . $variant . '.epub');