update statics/books
move apgte to gitlab (dmca)
This commit is contained in:
parent
35c1ea30c7
commit
eba2d04272
@ -98,4 +98,18 @@ class Books
|
||||
}
|
||||
return null;
|
||||
}
|
||||
|
||||
public static function getRepositoryHost($book)
|
||||
{
|
||||
$r = $book['repository'];
|
||||
if (startsWith($r, "http://")) $r = substr($r, strlen("http://"));
|
||||
if (startsWith($r, "https://")) $r = substr($r, strlen("https://"));
|
||||
if (startsWith($r, "www.")) $r = substr($r, strlen("www."));
|
||||
|
||||
if (startsWith(strtolower($r), "gitlab")) return "Gitlab";
|
||||
if (startsWith(strtolower($r), "github")) return "Github";
|
||||
if (startsWith(strtolower($r), "bitbucket")) return "Bitbucket";
|
||||
|
||||
return "Online";
|
||||
}
|
||||
}
|
@ -52,11 +52,11 @@ if ($book === NULL) httpError(404, 'Book not found');
|
||||
|
||||
<div class="bookv_right_comb" style="grid-row:6">
|
||||
|
||||
<a class="iconbutton" href="<?php echo $book['github'] ?>">
|
||||
<a class="iconbutton" href="<?php echo $book['repository'] ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">
|
||||
<use xlink:href="/data/images/icons.svg#github"/>
|
||||
</svg>
|
||||
<span>Github</span>
|
||||
<span><?php echo Books::getRepositoryHost($book); ?></span>
|
||||
</a>
|
||||
<a class="iconbutton" href="<?php echo $book['online'] ?>">
|
||||
<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 24 24">
|
||||
|
@ -7,7 +7,7 @@ return
|
||||
'title' => 'Harry Potter and the Methods of Rationality: Book 1',
|
||||
'title_short' => 'HPMoR: Book 1',
|
||||
'date' => '2015-04-04',
|
||||
'github' => 'https://github.com/Mikescher/HPMOR-LyX',
|
||||
'repository' => 'https://github.com/Mikescher/HPMOR-LyX',
|
||||
'pages' => '597',
|
||||
'pdf' => 'https://github.com/Mikescher/HPMOR-LyX/raw/master/hpmor_volume1_16x23.pdf',
|
||||
'online' => 'http://www.hpmor.com/',
|
||||
@ -21,7 +21,7 @@ return
|
||||
'title' => 'Harry Potter and the Methods of Rationality: Book 2',
|
||||
'title_short' => 'HPMoR: Book 2',
|
||||
'date' => '2015-04-04',
|
||||
'github' => 'https://github.com/Mikescher/HPMOR-LyX',
|
||||
'repository' => 'https://github.com/Mikescher/HPMOR-LyX',
|
||||
'pages' => '719',
|
||||
'pdf' => 'https://github.com/Mikescher/HPMOR-LyX/raw/master/hpmor_volume2_16x23.pdf',
|
||||
'online' => 'http://www.hpmor.com/',
|
||||
@ -35,7 +35,7 @@ return
|
||||
'title' => 'Harry Potter and the Methods of Rationality: Book 3',
|
||||
'title_short' => 'HPMoR: Book 3',
|
||||
'date' => '2015-04-04',
|
||||
'github' => 'https://github.com/Mikescher/HPMOR-LyX',
|
||||
'repository' => 'https://github.com/Mikescher/HPMOR-LyX',
|
||||
'pages' => '493',
|
||||
'pdf' => 'https://github.com/Mikescher/HPMOR-LyX/raw/master/hpmor_volume3_16x23.pdf',
|
||||
'online' => 'http://www.hpmor.com/',
|
||||
@ -49,9 +49,9 @@ return
|
||||
'title' => 'A Practical Guide to Evil: Book 1',
|
||||
'title_short' => 'APGtE: Book 1',
|
||||
'date' => '2016-12-23',
|
||||
'github' => 'https://github.com/Mikescher/A-Practical-Guide-To-Evil-Lyx',
|
||||
'repository' => 'https://gitlab.com/Mikescher/A-Practical-Guide-To-Evil-Lyx',
|
||||
'pages' => '501',
|
||||
'pdf' => 'https://github.com/Mikescher/A-Practical-Guide-To-Evil-Lyx/raw/master/APGTE_1/APGTE.pdf',
|
||||
'pdf' => 'https://gitlab.com/Mikescher/A-Practical-Guide-To-Evil-Lyx/raw/master/APGTE_1/APGTE.pdf',
|
||||
'online' => 'https://practicalguidetoevil.wordpress.com/',
|
||||
'author' => 'David Verburg',
|
||||
'size' => [12.5, 19.0],
|
||||
@ -63,7 +63,7 @@ return
|
||||
'title' => 'The Metropolitan Man',
|
||||
'title_short' => 'The Metropolitan Man',
|
||||
'date' => '2017-12-02',
|
||||
'github' => 'https://github.com/Mikescher/Metropolitan-Man-Lyx',
|
||||
'repository' => 'https://github.com/Mikescher/Metropolitan-Man-Lyx',
|
||||
'pages' => '258',
|
||||
'pdf' => 'https://github.com/Mikescher/Metropolitan-Man-Lyx/raw/master/src/MM.pdf',
|
||||
'online' => 'https://www.fanfiction.net/s/10360716/1/',
|
||||
|
Loading…
Reference in New Issue
Block a user