1
0

WebApps+About

This commit is contained in:
Mike Schwörer 2020-01-16 11:48:27 +01:00
parent e1851fce69
commit 5302868327
9 changed files with 108 additions and 152 deletions

View File

@ -18,11 +18,9 @@ $ajax = $parameter['ajax'];
$frame = $parameter['frame']; $frame = $parameter['frame'];
$frameid = $parameter['frameid']; $frameid = $parameter['frameid'];
$AOC = $SITE->modules->AdventOfCode(); $assocdays = $SITE->modules->AdventOfCode()->listSingleYearAssociative($year);
$prev_year = $shownav ? $SITE->modules->AdventOfCode()->getPrevYear($year) : null;
$assocdays = $AOC->listSingleYearAssociative($year); $next_year = $shownav ? $SITE->modules->AdventOfCode()->getNextYear($year) : null;
$prev_year = $shownav ? $AOC->getPrevYear($year) : null;
$next_year = $shownav ? $AOC->getNextYear($year) : null;
if ($ajax) $FRAME_OPTIONS->addScript("/data/javascript/aoc_panel_interactive.js", true); if ($ajax) $FRAME_OPTIONS->addScript("/data/javascript/aoc_panel_interactive.js", true);
@ -37,14 +35,14 @@ if ($ajax) $FRAME_OPTIONS->addScript("/data/javascript/aoc_panel_interactive.js"
if ($ajax) if ($ajax)
echo '<a href="javascript:void();" onclick="javascript:changeAOCPanel(' . $prev_year . ', ' . ($shownav?'true':'false') . ', ' . ($linkheader?'true':'false') . ', ' . ($ajax?'true':'false') . ', \'' . $frameid . '\')" class="aoc_calendar_header_link aoc_prev" >&lt;</a>'; echo '<a href="javascript:void();" onclick="javascript:changeAOCPanel(' . $prev_year . ', ' . ($shownav?'true':'false') . ', ' . ($linkheader?'true':'false') . ', ' . ($ajax?'true':'false') . ', \'' . $frameid . '\')" class="aoc_calendar_header_link aoc_prev" >&lt;</a>';
else else
echo '<a href="' . $AOC->getURLForYear($prev_year) . '" class="aoc_calendar_header_link aoc_prev" >&lt;</a>'; echo '<a href="' . $SITE->modules->AdventOfCode()->getURLForYear($prev_year) . '" class="aoc_calendar_header_link aoc_prev" >&lt;</a>';
} }
else else
{ {
echo '<a href="#" class="aoc_calendar_header_link aoc_prev aoc_link_hidden" >&lt;</a>'; echo '<a href="#" class="aoc_calendar_header_link aoc_prev aoc_link_hidden" >&lt;</a>';
} }
if ($linkheader) echo '<span class="aoc_calendar_header_title"><a href="' . $AOC->getURLForYear($year) . '">'.$year.'</a></span>'; if ($linkheader) echo '<span class="aoc_calendar_header_title"><a href="' . $SITE->modules->AdventOfCode()->getURLForYear($year) . '">'.$year.'</a></span>';
else echo '<span class="aoc_calendar_header_title">'.$year.'</span>'; else echo '<span class="aoc_calendar_header_title">'.$year.'</span>';
if ($next_year !== null) if ($next_year !== null)
@ -52,7 +50,7 @@ if ($ajax) $FRAME_OPTIONS->addScript("/data/javascript/aoc_panel_interactive.js"
if ($ajax) if ($ajax)
echo '<a href="javascript:void();" onclick="javascript:changeAOCPanel(' . $next_year . ', ' . ($shownav?'true':'false') . ', ' . ($linkheader?'true':'false') . ', ' . ($ajax?'true':'false') . ', \'' . $frameid . '\')" class="aoc_calendar_header_link aoc_next" >&gt;</a>'; echo '<a href="javascript:void();" onclick="javascript:changeAOCPanel(' . $next_year . ', ' . ($shownav?'true':'false') . ', ' . ($linkheader?'true':'false') . ', ' . ($ajax?'true':'false') . ', \'' . $frameid . '\')" class="aoc_calendar_header_link aoc_next" >&gt;</a>';
else else
echo '<a href="' . $AOC->getURLForYear($next_year) . '" class="aoc_calendar_header_link aoc_next" >&gt;</a>'; echo '<a href="' . $SITE->modules->AdventOfCode()->getURLForYear($next_year) . '" class="aoc_calendar_header_link aoc_next" >&gt;</a>';
} }
else else
{ {

View File

@ -11,9 +11,7 @@ $parameter = $FRAGMENT_PARAM;
?> ?>
<?php <?php
$BLOG = $SITE->modules->Blog(); $allposts = $SITE->modules->Blog()->listAllNewestFirst();
$allposts = $BLOG->listAllNewestFirst();
?> ?>
<div class="index_pnl_base"> <div class="index_pnl_base">

View File

@ -11,9 +11,7 @@ $parameter = $FRAGMENT_PARAM;
?> ?>
<?php <?php
$BOOKS = $SITE->modules->Books(); $allbooks = $SITE->modules->Books()->listAllNewestFirst();
$allbooks = $BOOKS->listAllNewestFirst();
?> ?>
<div class="index_pnl_base"> <div class="index_pnl_base">

View File

@ -11,9 +11,7 @@ $parameter = $FRAGMENT_PARAM;
?> ?>
<?php <?php
$EULER = $SITE->modules->Euler(); $data = $SITE->modules->Euler()->listAll();
$data = $EULER->listAll();
$RATING_CLASSES = ['euler_pnl_celltime_perfect', 'euler_pnl_celltime_good', 'euler_pnl_celltime_ok', 'euler_pnl_celltime_bad', 'euler_pnl_celltime_fail']; $RATING_CLASSES = ['euler_pnl_celltime_perfect', 'euler_pnl_celltime_good', 'euler_pnl_celltime_ok', 'euler_pnl_celltime_bad', 'euler_pnl_celltime_fail'];
?> ?>

View File

@ -11,9 +11,7 @@ $parameter = $FRAGMENT_PARAM;
?> ?>
<?php <?php
$PROGRAMS = $SITE->modules->Programs(); $allprograms = $SITE->modules->Programs()->listAllNewestFirst();
$allprograms = $PROGRAMS->listAllNewestFirst();
?> ?>
<div class="index_pnl_base"> <div class="index_pnl_base">

View File

@ -20,7 +20,6 @@ class MikescherGitGraph
/** /**
* @return string|null * @return string|null
* @throws Exception
*/ */
public function get() public function get()
{ {

View File

@ -1,24 +1,16 @@
<!DOCTYPE html>
<html lang="en">
<?php <?php
require_once (__DIR__ . '/../internals/base.php'); require_once (__DIR__ . '/../internals/website.php');
require_once (__DIR__ . '/../internals/mikeschergitgraph.php');
global $OPTIONS; /** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
?> ?>
<head>
<meta charset="utf-8">
<title>Mikescher.com - About</title>
<link rel="icon" type="image/png" href="/data/images/favicon.png"/>
<link rel="canonical" href="https://www.mikescher.com/about"/>
<?php printHeaderCSS(); ?>
<?php includeAdditionalScript("/data/javascript/extendedgitgraph.js", 'defer', true) ?>
</head>
<body>
<div id="mastercontainer">
<?php $HEADER_ACTIVE = 'about'; include (__DIR__ . '/../fragments/header.php'); ?> <?php
$FRAME_OPTIONS->title = 'About';
<div id="content" class="content-responsive"> $FRAME_OPTIONS->canonical_url = 'https://www.mikescher.com/about';
$FRAME_OPTIONS->activeHeader = 'about';
?>
<div class="aboutcontent"> <div class="aboutcontent">
@ -35,7 +27,6 @@ global $OPTIONS;
<p>This is my personal homepage, I use it to upload programs I have written, web serials I have style-setted and sometimes for a little bit of blogging.</p> <p>This is my personal homepage, I use it to upload programs I have written, web serials I have style-setted and sometimes for a little bit of blogging.</p>
<p>Its mostly just a collection of stuff I wanted to put only, but I guess thats the core of most personal homepages</p> <p>Its mostly just a collection of stuff I wanted to put only, but I guess thats the core of most personal homepages</p>
</div> </div>
</div> </div>
@ -47,7 +38,10 @@ global $OPTIONS;
<div class="bc_data about_egg_container"> <div class="bc_data about_egg_container">
<?php print(MikescherGitGraph::get()); ?> <?php
$FRAME_OPTIONS->addScript('/data/javascript/extendedgitgraph.js', true);
echo $SITE->modules->ExtendedGitGraph()->get();
?>
</div> </div>
@ -102,13 +96,3 @@ global $OPTIONS;
</div> </div>
</div> </div>
</div>
<?php include (__DIR__ . '/../fragments/footer.php'); ?>
</div>
<?php printAdditionalScripts(); ?>
<?php printAdditionalStylesheets(); ?>
</body>
</html>

View File

@ -15,8 +15,6 @@ if ($prog === null) { $FRAME_OPTIONS->setForced404("Program not found"); return;
$FRAME_OPTIONS->title = $prog['name']; $FRAME_OPTIONS->title = $prog['name'];
$FRAME_OPTIONS->canonical_url =$prog['url']; $FRAME_OPTIONS->canonical_url =$prog['url'];
$FRAME_OPTIONS->activeHeader = 'programs'; $FRAME_OPTIONS->activeHeader = 'programs';
if ($prog['has_extra_images']) $FRAME_OPTIONS->addScript('/data/javascript/ms_basic.js', true);
?> ?>
<div class="blockcontent"> <div class="blockcontent">
@ -74,6 +72,8 @@ if ($prog['has_extra_images']) $FRAME_OPTIONS->addScript('/data/javascript/ms_ba
<?php if ($prog['has_extra_images']): ?> <?php if ($prog['has_extra_images']): ?>
<?php $FRAME_OPTIONS->addScript('/data/javascript/ms_basic.js', true); ?>
<div class="progv_extra imgcarousel_parent" data-imgcarousel-index="0" data-imgcarousel-images="<?php echo htmlspecialchars(json_encode($prog['extraimages_urls'])); ?>" > <div class="progv_extra imgcarousel_parent" data-imgcarousel-index="0" data-imgcarousel-images="<?php echo htmlspecialchars(json_encode($prog['extraimages_urls'])); ?>" >
<a class="imgcarousel_prev"> <a class="imgcarousel_prev">
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24"> <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">

View File

@ -1,25 +1,18 @@
<!DOCTYPE html>
<html lang="en">
<?php <?php
require_once (__DIR__ . '/../internals/base.php'); require_once (__DIR__ . '/../internals/website.php');
require_once (__DIR__ . '/../internals/webapp.php');
$allapps = WebApps::listAllNewestFirst();
/** @var PageFrameOptions $FRAME_OPTIONS */ global $FRAME_OPTIONS;
/** @var URLRoute $ROUTE */ global $ROUTE;
/** @var Website $SITE */ global $SITE;
?> ?>
<head>
<meta charset="utf-8">
<title>Mikescher.com - Tools</title>
<link rel="icon" type="image/png" href="/data/images/favicon.png"/>
<link rel="canonical" href="https://www.mikescher.com/webapps"/>
<?php printHeaderCSS(); ?>
</head>
<body>
<div id="mastercontainer">
<?php $HEADER_ACTIVE='webapps'; include (__DIR__ . '/../fragments/header.php'); ?> <?php
$FRAME_OPTIONS->title = 'External tools, apps and more';
$FRAME_OPTIONS->canonical_url = 'https://www.mikescher.com/webapps';
$FRAME_OPTIONS->activeHeader = 'webapps';
<div id="content" class="content-responsive"> $allapps = $SITE->modules->WebApps()->listAllNewestFirst();
?>
<div class="blockcontent"> <div class="blockcontent">
@ -40,13 +33,3 @@ $allapps = WebApps::listAllNewestFirst();
</div> </div>
</div> </div>
</div>
<?php include (__DIR__ . '/../fragments/footer.php'); ?>
</div>
<?php printAdditionalScripts(); ?>
<?php printAdditionalStylesheets(); ?>
</body>
</html>