1
0

programspanel

This commit is contained in:
Mike Schwörer 2018-01-03 21:02:40 +01:00
parent 04a798bfa1
commit 8589cb2324
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
43 changed files with 325 additions and 49 deletions

View File

@ -72,7 +72,7 @@ void Do(int ID, string Name, string Thumbnailname, int Downloads, string Kategor
if (!string.IsNullOrWhiteSpace(github_url)) b.AppendLine($"\t\t'github' => '{ToLiteral(github_url)}',");
b.AppendLine($"\t],");
b.AppendLine($"\t'long_description' => function(){{ return file_get_contents(__DIR__ . '/{Name}_description.md'); }},");
b.AppendLine($"\t'thumbnail_url' => '/images/program_thumbnails/{Name}.png',");
b.AppendLine($"\t'thumbnail_name' => '/images/program_thumbnails/{Name}.png',");
b.AppendLine($"];");
File.WriteAllText(@"C:\Users\schwoerm\Desktop\M\hp\v4\www\rawdata\programs\" + $"{Name}.php", b.ToString(), ENC);

View File

@ -7,7 +7,9 @@ body {
padding-top: 64px;
display: flex;
justify-content: center;
line-height: 1.4; }
line-height: 1.4;
flex-direction: column;
align-items: center; }
.content-responsive {
margin-left: auto;
@ -495,6 +497,9 @@ html, body {
font-size: 22px;
font-weight: 900; }
@media (max-width: 850px) {
.euler_pnl_header a {
font-size: 16px; } }
.euler_pnl_header a:hover {
text-decoration: underline; }
@ -564,6 +569,89 @@ html, body {
.euler_pnl_cell_notexist {
background: #CCCCCC; }
.programs_pnl_base {
display: inline-flex;
flex-direction: column;
border: 1px solid #AAA;
border-radius: 5px 5px 0 0;
margin: 15px;
width: 652px; }
.programs_pnl_header {
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
background: #AAA; }
.programs_pnl_header a {
color: #222;
text-decoration: none;
font-family: Lato, "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 22px;
font-weight: 900; }
.programs_pnl_content {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
background: #DDD;
padding: 6px; }
.programs_pnl_content .programs_pnl_entry {
display: flex;
flex-direction: column;
width: 190px;
border: 1px solid #333;
background: #AAA;
color: #000;
text-decoration: none;
margin: 4px; }
.programs_pnl_content .programs_pnl_entry:hover {
box-shadow: 0 0 8px #000000; }
.programs_pnl_content .programs_pnl_img {
min-height: 140px;
display: flex;
flex-direction: column;
justify-content: flex-start;
margin: 4px; }
.programs_pnl_content .programs_pnl_img img {
width: 100%;
height: auto; }
.programs_pnl_content .programs_pnl_center {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: black;
font-weight: bolder;
font-size: 16pt;
flex-grow: 1; }
.programs_pnl_content .programs_pnl_bottom {
background: #888;
display: flex;
flex-direction: row; }
.programs_pnl_content .programs_pnl_bottom_1, .programs_pnl_content .programs_pnl_bottom_2 {
flex-grow: 1;
text-align: center;
display: flex;
flex-direction: column; }
.programs_pnl_content .programs_pnl_bottom_sub_top {
color: #444; }
.programs_pnl_content .programs_pnl_bottom_sub_bot {
color: #111;
font-weight: bolder; }
@media (max-width: 850px) {
.programs_pnl_base {
width: 320px; }
.programs_pnl_base .programs_pnl_entry {
width: 100%; }
.programs_pnl_base .programs_pnl_bottom_sub_top {
margin-left: 4px;
margin-right: 6px; }
.programs_pnl_base .programs_pnl_bottom_1, .programs_pnl_base .programs_pnl_bottom_2 {
flex-direction: row; } }
.bfjoust_runner_owner {
border: 1px solid #888;
background: #F8F8F8;

View File

@ -9,5 +9,6 @@
@import 'styles_errorview';
@import 'styles_eulerpanel';
@import 'styles_programspanel';
@import 'styles_bfjoustrunner';
@import 'styles_befungerunner';

View File

@ -28,6 +28,8 @@
font-weight: 900;
}
@media (max-width: 850px) { .euler_pnl_header a { font-size: 16px; } }
.euler_pnl_header a:hover {
text-decoration: underline;
}

View File

@ -12,6 +12,9 @@ body {
justify-content: center;
line-height: 1.4;
flex-direction: column;
align-items: center;
}
.content-responsive {

View File

@ -0,0 +1,130 @@
@import 'styles_config';
.programs_pnl_base {
display: inline-flex;
flex-direction: column;
border: 1px solid #AAA;
border-radius: 5px 5px 0 0;
margin: 15px;
width: 652px;
}
.programs_pnl_header {
display: flex;
align-items: center;
justify-content: center;
padding: 4px;
background: #AAA;
}
.programs_pnl_header a {
color: #222;
text-decoration: none;
font-family: $FONT_HEADER;
font-size: 22px;
font-weight: 900;
}
.programs_pnl_content {
display: flex;
flex-direction: row;
flex-wrap: wrap;
justify-content: center;
background: #DDD;
padding: 6px;
.programs_pnl_entry {
display: flex;
flex-direction: column;
width: 190px;
border: 1px solid #333;
background: #AAA;
color: #000;
text-decoration: none;
margin: 4px;
&:hover {
box-shadow: 0 0 8px #000000;
}
}
.programs_pnl_img {
min-height: 140px;
display:flex;
flex-direction: column;
justify-content: flex-start;
margin: 4px;
}
.programs_pnl_img img {
width: 100%;
height: auto;
}
.programs_pnl_center {
display: flex;
justify-content: center;
align-items: center;
text-align: center;
color: black;
font-weight: bolder;
font-size: 16pt;
flex-grow: 1;
}
.programs_pnl_bottom {
background: #888;
display: flex;
flex-direction: row;
}
.programs_pnl_bottom_1, .programs_pnl_bottom_2 {
flex-grow: 1;
text-align: center;
display:flex;
flex-direction: column;
}
.programs_pnl_bottom_sub_top {
color: #444;
}
.programs_pnl_bottom_sub_bot {
color: #111;
font-weight: bolder;
}
}
@media (max-width: 850px) {
.programs_pnl_base {
width: 320px;
.programs_pnl_entry {
width: 100%;
}
.programs_pnl_bottom_sub_top {
margin-left: 4px;
margin-right: 6px;
}
.programs_pnl_bottom_1, .programs_pnl_bottom_2 {
flex-direction: row;
}
}
}

View File

@ -9,7 +9,7 @@
<div class="euler_pnl_base">
<div class="euler_pnl_header">
<a href="">Project Euler with Befunge-93</a>
<a href="/blog/1/Project_Euler_with_Befunge">Project Euler with Befunge-93</a>
</div>
<div class="euler_pnl_content">

View File

@ -0,0 +1,45 @@
<?php
require_once(__DIR__ . '/../internals/programs.php');
$allprograms = Programs::listAllNewestFirst();
?>
<div class="programs_pnl_base">
<div class="programs_pnl_header">
<a href="/programs">Newest Programs by me</a>
</div>
<div class="programs_pnl_content">
<?php
for ($i=0; $i<6; $i++)
{
$prog = $allprograms[$i];
echo '<a href="' . $prog['url'] . '" class="programs_pnl_entry">' . "\n";
echo ' <div class="programs_pnl_img">' . "\n";
echo ' <img src="' . $prog['thumbnail_url'] . '" alt="Thumbnail ' . $prog['name'] . ' " />' . "\n";
echo ' </div>' . "\n";
echo ' <div class="programs_pnl_center">' . "\n";
echo htmlspecialchars($prog['name']) . "\n";
echo ' </div>' . "\n";
echo ' <div class="programs_pnl_bottom">' . "\n";
echo ' <div class="programs_pnl_bottom_1">' . "\n";
echo ' <span class="programs_pnl_bottom_sub_top">Date</span>' . "\n";
echo ' <span class="programs_pnl_bottom_sub_bot">' . $prog['add_date'] . '</span>' . "\n";
echo ' </div>' . "\n";
echo ' <div class="programs_pnl_bottom_2">' . "\n";
echo ' <span class="programs_pnl_bottom_sub_top">Language</span>' . "\n";
echo ' <span class="programs_pnl_bottom_sub_bot">' . $prog['prog_language'] . '</span>' . "\n";
echo ' </div>' . "\n";
echo ' </div>' . "\n";
echo '</a>' . "\n";
}
?>
</div>
</div>

View File

@ -5,6 +5,10 @@ class Programs
public static function readSingle($f)
{
$a = require $f;
$a['thumbnail_url'] = '/data/images/program_thumbnails/' . $a['thumbnail_name'];
$a['url'] = '/programs/view/' . $a['name'];
return $a;
}
@ -12,7 +16,14 @@ class Programs
{
$files = glob(__DIR__ . '/../statics/programs/*.php');
return array_map(readSingle, $files);
return array_map('self::readSingle', $files);
}
public static function listAllNewestFirst()
{
$data = self::listAll();
usort($data, function($a, $b) { return strcasecmp($b['add_date'], $a['add_date']); });
return $data;
}
public static function listUpdateData()

View File

@ -14,5 +14,5 @@
for ($i = 0; $i < count($entries); $i++)
{
print($entries[$i]['POINTS'] . '||' . htmlentities($entries[$i]['PLAYER']) . "\r\n");
print($entries[$i]['POINTS'] . '||' . htmlspecialchars($entries[$i]['PLAYER']) . "\r\n");
}

View File

@ -17,6 +17,8 @@
<?php include (__DIR__ . '/../fragments/eulerpanel.php'); ?>
<?php include (__DIR__ . '/../fragments/programspanel.php'); ?>
</div>
<?php include (__DIR__ . '/../fragments/footer.php'); ?>

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/All in One_description.md'); },
'thumbnail_url' => 'All in One.png',
'thumbnail_name' => 'All in One.png',
];

View File

@ -15,5 +15,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Beepster_description.md'); },
'thumbnail_url' => 'Beepster.png',
'thumbnail_name' => 'Beepster.png',
];

View File

@ -15,5 +15,5 @@ return
'wiki' => 'https://github.com/Mikescher/BefunUtils/wiki',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/BefunUtils_description.md'); },
'thumbnail_url' => 'BefunUtils.png',
'thumbnail_name' => 'BefunUtils.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/BefunZ_description.md'); },
'thumbnail_url' => 'BefunZ.png',
'thumbnail_name' => 'BefunZ.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Blitzer_description.md'); },
'thumbnail_url' => 'Blitzer.png',
'thumbnail_name' => 'Blitzer.png',
];

View File

@ -15,5 +15,5 @@ return
'homepage' => 'http://borderlinedefense.99k.org/',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Borderline Defense_description.md'); },
'thumbnail_url' => 'Borderline Defense.png',
'thumbnail_name' => 'Borderline Defense.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Crystal Grid_description.md'); },
'thumbnail_url' => 'Crystal Grid.png',
'thumbnail_name' => 'Crystal Grid.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Deal or no Deal_description.md'); },
'thumbnail_url' => 'Deal or no Deal.png',
'thumbnail_name' => 'Deal or no Deal.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Dynamic Link Fighters_description.md'); },
'thumbnail_url' => 'Dynamic Link Fighters.png',
'thumbnail_name' => 'Dynamic Link Fighters.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'https://github.com/Mikescher/extendedGitGraph/',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/ExtendedGitGraph_description.md'); },
'thumbnail_url' => 'ExtendedGitGraph.png',
'thumbnail_name' => 'ExtendedGitGraph.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Graveyard of Numbers_description.md'); },
'thumbnail_url' => 'Graveyard of Numbers.png',
'thumbnail_name' => 'Graveyard of Numbers.png',
];

View File

@ -7,13 +7,12 @@ return
'stars' => 2,
'ui_language' => 'English',
'prog_language' => 'Delphi',
'short_description' => 'Try creating the biggest chain reaction and see yourself climb up in the global l" +
"eaderboard.',
'short_description' => 'Try creating the biggest chain reaction and see yourself climb up in the global leaderboard.',
'add_date' => '2009-01-24',
'urls' =>
[
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/H2O_description.md'); },
'thumbnail_url' => 'H2O.png',
'thumbnail_name' => 'H2O.png',
];

View File

@ -7,13 +7,12 @@ return
'stars' => 5,
'ui_language' => 'English',
'prog_language' => 'C#',
'short_description' => 'An automatic parser and solver for Hexcells, Hexcells Plus and Hexcells Infinite." +
"',
'short_description' => 'An automatic parser and solver for Hexcells, Hexcells Plus and Hexcells Infinite.',
'add_date' => '2015-05-06',
'urls' =>
[
'github' => 'https://github.com/Mikescher/HexSolver',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/HexSolver_description.md'); },
'thumbnail_url' => 'HexSolver.png',
'thumbnail_name' => 'HexSolver.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Infinity Tournament_description.md'); },
'thumbnail_url' => 'Infinity Tournament.png',
'thumbnail_name' => 'Infinity Tournament.png',
];

View File

@ -7,12 +7,11 @@ return
'stars' => 2,
'ui_language' => 'English',
'prog_language' => 'Delphi',
'short_description' => '40 of the best keygen themes together with a funny little keygen dance animation." +
"',
'short_description' => '40 of the best keygen themes together with a funny little keygen dance animation.',
'add_date' => '2010-03-16',
'urls' =>
[
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Keygen Dancer_description.md'); },
'thumbnail_url' => 'Keygen Dancer.png',
'thumbnail_name' => 'Keygen Dancer.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/LAN-Control_description.md'); },
'thumbnail_url' => 'LAN-Control.png',
'thumbnail_name' => 'LAN-Control.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/LightShow_description.md'); },
'thumbnail_url' => 'LightShow.png',
'thumbnail_name' => 'LightShow.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Logistixx_description.md'); },
'thumbnail_url' => 'Logistixx.png',
'thumbnail_name' => 'Logistixx.png',
];

View File

@ -15,5 +15,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/NedSchend_description.md'); },
'thumbnail_url' => 'NedSchend.png',
'thumbnail_name' => 'NedSchend.png',
];

View File

@ -15,5 +15,5 @@ return
'github' => 'https://github.com/Mikescher/Passpad',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Passpad_description.md'); },
'thumbnail_url' => 'Passpad.png',
'thumbnail_name' => 'Passpad.png',
];

View File

@ -15,5 +15,5 @@ return
'github' => 'https://github.com/Mikescher/Serpilicum',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Serpilicum_description.md'); },
'thumbnail_url' => 'Serpilicum.png',
'thumbnail_name' => 'Serpilicum.png',
];

View File

@ -13,5 +13,5 @@ return
[
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/SharkSim_description.md'); },
'thumbnail_url' => 'SharkSim.png',
'thumbnail_name' => 'SharkSim.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Sieb des Eratosthenes_description.md'); },
'thumbnail_url' => 'Sieb des Eratosthenes.png',
'thumbnail_name' => 'Sieb des Eratosthenes.png',
];

View File

@ -7,13 +7,12 @@ return
'stars' => 2,
'ui_language' => 'German',
'prog_language' => 'Delphi',
'short_description' => 'List all files in a folder that match a specific pattern and export them in plain" +
"text.',
'short_description' => 'List all files in a folder that match a specific pattern and export them in plaintext.',
'add_date' => '2010-01-12',
'urls' =>
[
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Smart Directory Lister_description.md'); },
'thumbnail_url' => 'Smart Directory Lister.png',
'thumbnail_name' => 'Smart Directory Lister.png',
];

View File

@ -15,5 +15,5 @@ return
'github' => 'https://github.com/Mikescher/SuperBitBros',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/SuperBitBros_description.md'); },
'thumbnail_url' => 'SuperBitBros.png',
'thumbnail_name' => 'SuperBitBros.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/TicTacToe_description.md'); },
'thumbnail_url' => 'TicTacToe.png',
'thumbnail_name' => 'TicTacToe.png',
];

View File

@ -7,13 +7,12 @@ return
'stars' => 0,
'ui_language' => 'German',
'prog_language' => 'Delphi',
'short_description' => 'Simulate the popular Monty Hall problem (ger: Ziegenproblem) with this program fo" +
"r yourself.',
'short_description' => 'Simulate the popular Monty Hall problem (ger: Ziegenproblem) with this program for yourself.',
'add_date' => '2008-04-10',
'urls' =>
[
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/Ziegenproblem_description.md'); },
'thumbnail_url' => 'Ziegenproblem.png',
'thumbnail_name' => 'Ziegenproblem.png',
];

View File

@ -7,13 +7,12 @@ return
'stars' => 3,
'ui_language' => 'English',
'prog_language' => 'Java',
'short_description' => 'A powerful 2D Tiled-Game-Engine for java. Completely in canvas and with network s" +
"upport.',
'short_description' => 'A powerful 2D Tiled-Game-Engine for java. Completely in canvas and with network support.',
'add_date' => '2012-05-28',
'urls' =>
[
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/absCanvas_description.md'); },
'thumbnail_url' => 'absCanvas.png',
'thumbnail_name' => 'absCanvas.png',
];

View File

@ -14,5 +14,5 @@ return
'download' => 'direkt',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/exeExtract_description.md'); },
'thumbnail_url' => 'exeExtract.png',
'thumbnail_name' => 'exeExtract.png',
];

View File

@ -15,5 +15,5 @@ return
'sourceforge' => 'http://sourceforge.net/projects/jcircuits/',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/jCircuits_description.md'); },
'thumbnail_url' => 'jCircuits.png',
'thumbnail_name' => 'jCircuits.png',
];

View File

@ -16,5 +16,5 @@ return
'wiki' => 'https://github.com/Mikescher/jClipCorn/wiki',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/jClipCorn_description.md'); },
'thumbnail_url' => 'jClipCorn.png',
'thumbnail_name' => 'jClipCorn.png',
];

View File

@ -14,5 +14,5 @@ return
'github' => 'https://github.com/Mikescher/jQCCounter',
],
'long_description' => function(){ return file_get_contents(__DIR__ . '/jQCCounter_description.md'); },
'thumbnail_url' => 'jQCCounter.png',
'thumbnail_name' => 'jQCCounter.png',
];