diff --git a/.gitignore b/.gitignore index 208bdea3..9a13d5e9 100644 --- a/.gitignore +++ b/.gitignore @@ -13,7 +13,7 @@ composer.lock *.sqlite *.db *.sqlite3 -docs/* +apidocs/** tests/test_data/sessions/* cache.properties build/** @@ -25,4 +25,8 @@ app/config/*.toml phinx.yml .idea/ Caddyfile -build/humbuglog.txt \ No newline at end of file +build/humbuglog.txt +public/images/anime/** +public/images/avatars/** +public/images/manga/** +public/images/characters/** \ No newline at end of file diff --git a/README.md b/README.md index c8d5d2ca..9bdcd556 100644 --- a/README.md +++ b/README.md @@ -45,6 +45,10 @@ Update your anime/manga list on Kitsu.io and MyAnimeList.net 3. Configure settings in `app/config/config.toml` to your liking 4. Create the following directories if they don't exist, and make sure they are world writable * public/js/cache + * public/images/avatars + * public/images/anime + * public/images/characters + * public/images/manga 5. Make sure the `console` script is executable ### Using MAL API diff --git a/app/appConf/minify_config.php b/app/appConf/minify_config.php index 22898a06..44ecd993 100644 --- a/app/appConf/minify_config.php +++ b/app/appConf/minify_config.php @@ -18,46 +18,6 @@ return [ - /* - |-------------------------------------------------------------------------- - | CSS Folder - |-------------------------------------------------------------------------- - | - | The folder where css files exist, in relation to the document root - | - */ - 'css_root' => 'css/', - - /* - |-------------------------------------------------------------------------- - | Path from - |-------------------------------------------------------------------------- - | - | Path fragment to rewrite in css files - | - */ - 'path_from' => '', - - /* - |-------------------------------------------------------------------------- - | Path to - |-------------------------------------------------------------------------- - | - | The path fragment replacement for the css files - | - */ - 'path_to' => '', - - /* - |-------------------------------------------------------------------------- - | CSS Groups file - |-------------------------------------------------------------------------- - | - | The file where the css groups are configured - | - */ - 'css_groups_file' => __DIR__ . '/minify_css_groups.php', - /* |-------------------------------------------------------------------------- | JS Folder @@ -70,13 +30,40 @@ return [ /* |-------------------------------------------------------------------------- - | JS Groups file + | JS Groups |-------------------------------------------------------------------------- | - | The file where the javascript groups are configured + | Config array for javascript files to concatenate and minify | */ - 'js_groups_file' => __DIR__ . '/minify_js_groups.php', - + 'groups' => [ + 'base' => [ + 'base/classList.js', + 'base/AnimeClient.js', + ], + 'event' => [ + 'base/events.js', + ], + 'table' => [ + 'base/sort_tables.js', + ], + 'table_edit' => [ + 'base/sort_tables.js', + 'anime_edit.js', + 'manga_edit.js', + ], + 'edit' => [ + 'anime_edit.js', + 'manga_edit.js', + ], + 'anime_collection' => [ + 'lib/mustache.js', + 'anime_collection.js', + ], + 'manga_collection' => [ + 'lib/mustache.js', + 'manga_collection.js', + ], + ] ]; // End of minify_config.php \ No newline at end of file diff --git a/app/appConf/minify_css_groups.php b/app/appConf/minify_css_groups.php deleted file mode 100644 index e0272ef5..00000000 --- a/app/appConf/minify_css_groups.php +++ /dev/null @@ -1,40 +0,0 @@ - - * @copyright 2015 - 2017 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.0 - * @link https://github.com/timw4mail/HummingBirdAnimeClient - */ - - -// -------------------------------------------------------------------------- - -/** - * This is the config array for css files to concatenate and minify - */ -return [ - /*----- - Css - -----*/ - - /* - For each group create an array like so - - 'my_group' => array( - 'path/to/css/file1.css', - 'path/to/css/file2.css' - ), - */ - 'base' => [ - 'base.css' - ] -]; -// End of css_groups.php \ No newline at end of file diff --git a/app/appConf/minify_js_groups.php b/app/appConf/minify_js_groups.php deleted file mode 100644 index 12d910ea..00000000 --- a/app/appConf/minify_js_groups.php +++ /dev/null @@ -1,53 +0,0 @@ - - * @copyright 2015 - 2017 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.0 - * @link https://github.com/timw4mail/HummingBirdAnimeClient - */ - - -// -------------------------------------------------------------------------- - -/** - * This is the config array for javascript files to concatenate and minify - */ -return [ - 'base' => [ - 'base/classList.js', - 'base/AnimeClient.js', - ], - 'event' => [ - 'base/events.js', - ], - 'table' => [ - 'base/sort_tables.js', - ], - 'table_edit' => [ - 'base/sort_tables.js', - 'anime_edit.js', - 'manga_edit.js', - ], - 'edit' => [ - 'anime_edit.js', - 'manga_edit.js', - ], - 'anime_collection' => [ - 'lib/mustache.js', - 'anime_collection.js', - ], - 'manga_collection' => [ - 'lib/mustache.js', - 'manga_collection.js', - ], -]; - -// End of js_groups.php \ No newline at end of file diff --git a/app/appConf/routes.php b/app/appConf/routes.php index d8b81816..0d3e5971 100644 --- a/app/appConf/routes.php +++ b/app/appConf/routes.php @@ -147,6 +147,16 @@ return [ // --------------------------------------------------------------------- // Default / Shared routes // --------------------------------------------------------------------- + 'image_proxy' => [ + 'path' => '/public/images/{type}/{file}', + 'action' => 'images', + 'controller' => DEFAULT_CONTROLLER, + 'verb' => 'get', + 'tokens' => [ + 'type' => '[a-z0-9\-]+', + 'file' => '[a-z0-9\-]+\.[a-z]{3}' + ] + ], 'cache_purge' => [ 'path' => '/cache_purge', 'action' => 'clearCache', diff --git a/app/views/anime/cover.php b/app/views/anime/cover.php index 4c539a11..b3526d68 100644 --- a/app/views/anime/cover.php +++ b/app/views/anime/cover.php @@ -15,7 +15,7 @@ isAuthenticated()): ?> - + " alt="" />
@@ -28,17 +28,17 @@ isAuthenticated()): ?>
- Edit
- +
@@ -48,13 +48,13 @@
- + 0): ?>
Rewatched time(s)
- + 0): ?>
@@ -70,7 +70,7 @@
- +
Rating: / 10
Episodes: diff --git a/app/views/anime/details.php b/app/views/anime/details.php index eea521c2..f354f277 100644 --- a/app/views/anime/details.php +++ b/app/views/anime/details.php @@ -1,7 +1,7 @@
- + " alt="" />

@@ -79,8 +79,8 @@ 0): ?>

Characters

-
- +
+ $char): ?>
diff --git a/app/views/character.php b/app/views/character.php index 41a63087..8b0dfb3c 100644 --- a/app/views/character.php +++ b/app/views/character.php @@ -1,12 +1,126 @@ -
+ +
- + " alt="" />
-

+

-

+

+ + +

Media

+
+ +
+

Anime

+
+ $anime): ?> + + +
+
+ + +
+

Manga

+
+ + $manga): ?> + + + +
+
+ +
+ + +
+ 0): ?> +

Castings

+ $entries): ?> +

+ $casting): ?> +
+
- img($item['anime']['image']); ?> + img($urlGenerator->assetUrl('images/anime', "{$item['anime']['id']}.jpg")) ?>
+ + + + + + + + + + +
Cast MemberSeries
+
+ +
+ +
+
+
+
+ +
+ generate('anime.details', ['id' => $series['attributes']['slug']]); + $titles = Kitsu::filterTitles($series['attributes']); + ?> + + + + +
+ +
+
+ + + +
\ No newline at end of file diff --git a/app/views/collection/cover.php b/app/views/collection/cover.php index 94690f56..d35f1274 100644 --- a/app/views/collection/cover.php +++ b/app/views/collection/cover.php @@ -11,7 +11,7 @@
- " alt=" cover image" />
diff --git a/app/views/header.php b/app/views/header.php index 0ca31a95..04151e4a 100644 --- a/app/views/header.php +++ b/app/views/header.php @@ -6,7 +6,7 @@ - + @@ -21,17 +21,19 @@ -
- - + } + ?>
\ No newline at end of file diff --git a/app/views/main-menu.php b/app/views/main-menu.php index 249c1eb9..89ce003c 100644 --- a/app/views/main-menu.php +++ b/app/views/main-menu.php @@ -1,37 +1,58 @@ - +get('whose_list') . "'s "; +$lastSegment = $urlGenerator->lastSegment(); +$extraSegment = $lastSegment === 'list' ? '/list' : ''; + +?>

- - get('whose_list') ?>'s List - + a( + $urlGenerator->defaultUrl($url_type), + $whose . ucfirst($url_type) . ' List' + ) ?> get("show_{$url_type}_collection")): ?> - [ Collection] + [a( + $url->generate('collection.view') . $extraSegment, + ucfirst($url_type) . ' Collection' + ) ?>] - [ List] + [a( + $urlGenerator->defaultUrl($other_type) . $extraSegment, + ucfirst($other_type) . ' List' + ) ?>] - - get('whose_list') ?>'s Collection - - [Anime List] - [Manga List] + + [a($urlGenerator->defaultUrl('anime') . $extraSegment, 'Anime List') ?>] + [a($urlGenerator->defaultUrl('manga') . $extraSegment, 'Manga List') ?>] - - [a($url->generate('user_info'), 'About '. $config->get('whose_list')) ?>] - + + [a( + $url->generate('user_info'), + 'About '. $config->get('whose_list') + ) ?>] + isAuthenticated()): ?>   - - + +   + isAuthenticated()): ?> - Logout + a( + $url->generate('logout'), + 'Logout', + ['class' => 'bracketed'] + ) ?> - [get('whose_list') ?>'s Login] + [a($url->generate('login'), "{$whose} Login") ?>]

@@ -40,8 +61,8 @@ menu($menu_name) ?>
diff --git a/app/views/manga/cover.php b/app/views/manga/cover.php index fc4fa9ad..e334ba74 100644 --- a/app/views/manga/cover.php +++ b/app/views/manga/cover.php @@ -17,7 +17,7 @@ +1 Volume */ ?>
- + " />
html(array_shift($item['manga']['titles'])) ?> diff --git a/app/views/manga/details.php b/app/views/manga/details.php index a4dbf48d..7faeb5d6 100644 --- a/app/views/manga/details.php +++ b/app/views/manga/details.php @@ -1,7 +1,7 @@
- <?= $data['title'] ?> cover image + " alt=" cover image" />

@@ -39,7 +39,7 @@ 0): ?>

Characters

- + $char): ?>
diff --git a/app/views/me.php b/app/views/me.php index f0f26405..e9112f81 100644 --- a/app/views/me.php +++ b/app/views/me.php @@ -9,7 +9,12 @@ - + + " alt="" />

@@ -65,13 +70,13 @@

Favorite Characters

- + $char): ?> @@ -88,7 +93,7 @@ $titles = Kitsu::filterTitles($anime); ?> - + " width="220" alt="" />
@@ -112,7 +117,7 @@ $titles = Kitsu::filterTitles($manga); ?> - + " width="220" alt="" />
diff --git a/composer.json b/composer.json index 26e7ae82..9e6b6ac2 100644 --- a/composer.json +++ b/composer.json @@ -21,7 +21,7 @@ "aura/router": "^3.0", "aura/session": "^2.0", "aviat/banker": "^1.0.0", - "aviat/ion": "^2.0.0", + "aviat/ion": "^2.1.0", "monolog/monolog": "^1.0", "psr/http-message": "~1.0", "psr/log": "~1.0", @@ -37,12 +37,13 @@ "phploc/phploc": "^3.0", "phpmd/phpmd": "^2.4", "phpunit/phpunit": "^6.0", - "robmorgan/phinx": "~0.6.4", + "robmorgan/phinx": "^0.8.0", "consolidation/robo": "~1.0", "henrikbjorn/lurker": "^1.1.0", "symfony/var-dumper": "^3.2", "squizlabs/php_codesniffer": "^3.0.0@beta", - "phpstan/phpstan": "^0.6.4" + "phpstan/phpstan": "^0.6.4", + "spatie/phpunit-snapshot-assertions": "^0.4.1" }, "scripts": { "build": "vendor/bin/robo build", diff --git a/console b/console index 3a7c90fc..674a96e5 100755 --- a/console +++ b/console @@ -18,9 +18,9 @@ unset($APP_DIR); unset($SRC_DIR); unset($CONF_DIR); -// --------------------------------------------------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- // Start console script -// --------------------------------------------------------------------------------------------------------------------- +// ----------------------------------------------------------------------------- $console = new \ConsoleKit\Console([ 'cache-prime' => Command\CachePrime::class, 'cache-clear' => Command\CacheClear::class, diff --git a/humbug.json.dist b/humbug.json.dist deleted file mode 100644 index d1e38834..00000000 --- a/humbug.json.dist +++ /dev/null @@ -1,12 +0,0 @@ -{ - "source": { - "directories": [ - "src" - ] - }, - "timeout": 10, - "logs": { - "text": "build\/humbuglog.txt", - "json": "build\/humbug.json" - } -} \ No newline at end of file diff --git a/phpdox.xml b/phpdox.xml index 7c27270a..9b64cbd1 100644 --- a/phpdox.xml +++ b/phpdox.xml @@ -56,7 +56,7 @@ - + @@ -117,10 +117,10 @@ - - - --> + diff --git a/public/css.js b/public/css.js new file mode 100644 index 00000000..1db6c13e --- /dev/null +++ b/public/css.js @@ -0,0 +1,29 @@ +/** + * Script for optimizing css + */ +const fs = require('fs'); +const postcss = require('postcss'); +const atImport = require('postcss-import'); +const cssNext = require('postcss-cssnext'); +const cssNano = require('cssnano'); + +const css = fs.readFileSync('css/base.css', 'utf8'); + +postcss() + .use(atImport()) + .use(cssNext()) + .use(cssNano({ + autoprefixer: false, + colormin: false, + minifyFontValues: false, + options: { + sourcemap: false + } + })) + .process(css, { + from: 'css/base.css', + to: 'css/app.min.css' + }).then(result => { + fs.writeFileSync('css/app.min.css', result.css); + fs.writeFileSync('css/app.min.css.map', result.map); + }); \ No newline at end of file diff --git a/public/css.php b/public/css.php deleted file mode 100644 index 81e38ccc..00000000 --- a/public/css.php +++ /dev/null @@ -1,180 +0,0 @@ - - * @copyright 2015 - 2017 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.0 - * @link https://github.com/timw4mail/HummingBirdAnimeClient - */ - -namespace Aviat\EasyMin; - -require_once('./min.php'); - -/** - * Simple CSS Minifier - */ -class CSSMin extends BaseMin { - - protected $cssRoot; - protected $pathFrom; - protected $pathTo; - protected $group; - protected $lastModified; - protected $requestedTime; - - public function __construct(array $config, array $groups) - { - $group = $_GET['g']; - $this->cssRoot = $config['css_root']; - $this->pathFrom = $config['path_from']; - $this->pathTo = $config['path_to']; - $this->group = $groups[$group]; - $this->lastModified = $this->getLastModified(); - - $this->send(); - } - - /** - * Send the CSS - * - * @return void - */ - protected function send() - { - if($this->lastModified >= $this->getIfModified() && $this->isNotDebug()) - { - throw new FileNotChangedException(); - } - - $css = ( ! array_key_exists('debug', $_GET)) - ? $this->compress($this->getCss()) - : $this->getCss(); - - $this->output($css); - } - - /** - * Function for compressing the CSS as tightly as possible - * - * @param string $buffer - * @return string - */ - protected function compress($buffer) - { - //Remove CSS comments - $buffer = preg_replace('!/\*[^*]*\*+([^/][^*]*\*+)*/!', '', $buffer); - - //Remove tabs, spaces, newlines, etc. - $buffer = preg_replace('`\s+`', ' ', $buffer); - $replace = [ - ' )' => ')', - ') ' => ')', - ' }' => '}', - '} ' => '}', - ' {' => '{', - '{ ' => '{', - ', ' => ',', - ': ' => ':', - '; ' => ';', - ]; - - //Eradicate every last space! - $buffer = trim(strtr($buffer, $replace)); - $buffer = str_replace('{ ', '{', $buffer); - $buffer = str_replace('} ', '}', $buffer); - - return $buffer; - } - - /** - * Get the most recent file modification date - * - * @return int - */ - protected function getLastModified() - { - $modified = []; - - // Get all the css files, and concatenate them together - if(isset($this->group)) - { - foreach($this->group as $file) - { - $newFile = realpath("{$this->cssRoot}{$file}"); - $modified[] = filemtime($newFile); - } - } - - //Add this page for last modified check - $modified[] = filemtime(__FILE__); - - //Get the latest modified date - rsort($modified); - - return array_shift($modified); - } - - /** - * Get the css to display - * - * @return string - */ - protected function getCss() - { - $css = ''; - - foreach($this->group as $file) - { - $newFile = realpath("{$this->cssRoot}{$file}"); - $css .= file_get_contents($newFile); - } - - // Correct paths that have changed due to concatenation - // based on rules in the config file - $css = str_replace($this->pathFrom, $this->pathTo, $css); - - return $css; - } - - /** - * Output the CSS - * - * @return void - */ - protected function output($css) - { - $this->sendFinalOutput($css, 'text/css', $this->lastModified); - } -} - -// -------------------------------------------------------------------------- -// ! Start Minifying -// -------------------------------------------------------------------------- - -//Get config files -$config = require('../app/appConf/minify_config.php'); -$groups = require($config['css_groups_file']); - -if ( ! array_key_exists($_GET['g'], $groups)) -{ - throw new InvalidArgumentException('You must specify a css group that exists'); -} - -try -{ - new CSSMin($config, $groups); -} -catch (FileNotChangedException $e) -{ - BaseMin::send304(); -} - -//End of css.php \ No newline at end of file diff --git a/public/css/app.min.css b/public/css/app.min.css new file mode 100644 index 00000000..4f637cee --- /dev/null +++ b/public/css/app.min.css @@ -0,0 +1 @@ +:root{-ms-text-size-adjust:100%;-webkit-text-size-adjust:100%;box-sizing:border-box;cursor:default;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;line-height:1.4;overflow-y:scroll;text-size-adjust:100%;scroll-behavior:smooth}audio:not([controls]){display:none}details{display:block}input[type=search]{-webkit-appearance:textfield}input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration{-webkit-appearance:none}main{margin:0 auto;padding:0 1.6em 1.6em;padding:0 16px 16px;padding:0 1.6rem 1.6rem}main,pre,summary{display:block}pre{background:#efefef;color:#444;font-family:"Anonymous Pro","Fira Code",Menlo,Monaco,Consolas,"Courier New",monospace;font-size:1.4em;font-size:14px;font-size:1.4rem;margin:1.6em 0;margin:16px 0;margin:1.6rem 0;overflow:auto;padding:1.6em;padding:16px;padding:1.6rem;word-break:break-all;word-wrap:break-word}progress{display:inline-block}small{color:#777;font-size:75%}big{font-size:125%}template{display:none}textarea{border:1px solid #ccc;border:.1rem solid #ccc;border-radius:0;display:block;margin-bottom:8px;margin-bottom:.8rem;overflow:auto;padding:8px;padding:.8rem;resize:vertical;vertical-align:middle}[hidden]{display:none}[unselectable]{-moz-user-select:none;-ms-user-select:none;-webkit-user-select:none;user-select:none}*,:after,:before{border-style:solid;border-width:0;box-sizing:inherit}*{font-size:inherit;line-height:inherit;margin:0;padding:0}:after,:before{text-decoration:inherit;vertical-align:inherit}a{-webkit-transition:.25s ease;color:#1271db;text-decoration:none;transition:.25s ease}audio,canvas,iframe,img,svg,video{vertical-align:middle}button,input,select,textarea{border:1px solid #ccc;border:.1rem solid #ccc;color:inherit;font-family:inherit;font-style:inherit;font-weight:inherit;min-height:1.4em}code,kbd,pre,samp{font-family:"Anonymous Pro","Fira Code",Menlo,Monaco,Consolas,"Courier New",monospace}table{border-collapse:collapse;border-spacing:0;margin-bottom:16px;margin-bottom:1.6rem}::-moz-selection{background-color:#b3d4fc;text-shadow:none}::selection{background-color:#b3d4fc;text-shadow:none}button::-moz-focus-inner{border:0}body{color:#444;font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;font-size:16px;font-size:1.6rem;font-style:normal;font-weight:400;padding:0}p{margin:0 0 16px;margin:0 0 1.6rem}h1,h2,h3,h4,h5,h6{font-family:system-ui,-apple-system,BlinkMacSystemFont,Segoe UI,Roboto,Oxygen,Ubuntu,Cantarell,Fira Sans,Droid Sans,Helvetica Neue,sans-serif;margin:2em 0 1.6em;margin:20px 0 16px;margin:2rem 0 1.6rem}h1{border-bottom:1px solid rgba(0,0,0,.2);border-bottom:.1rem solid rgba(0,0,0,.2);font-size:3.6em;font-size:36px;font-size:3.6rem}h1,h2{font-style:normal;font-weight:500}h2{font-size:3em;font-size:30px;font-size:3rem}h3{font-size:2.4em;font-size:24px;font-size:2.4rem;font-style:normal;font-weight:500;margin:16px 0 4px;margin:1.6rem 0 .4rem}h4{font-size:1.8em;font-size:18px;font-size:1.8rem}h4,h5{font-style:normal;font-weight:600;margin:16px 0 4px;margin:1.6rem 0 .4rem}h5{font-size:1.6em;font-size:16px;font-size:1.6rem}h6{color:#777;font-size:1.4em;font-style:normal;font-weight:600;margin:16px 0 4px;margin:1.6rem 0 .4rem}code,h6{font-size:14px;font-size:1.4rem}code{background:#efefef;color:#444;font-family:"Anonymous Pro","Fira Code",Menlo,Monaco,Consolas,"Courier New",monospace;word-break:break-all;word-wrap:break-word}a:focus,a:hover{text-decoration:none}dl{margin-bottom:16px;margin-bottom:1.6rem}dd{margin-left:40px;margin-left:4rem}ol,ul{margin-bottom:8px;margin-bottom:.8rem;padding-left:20px;padding-left:2rem}blockquote{border-left:2px solid #1271db;border-left:.2rem solid #1271db;font-style:italic;margin:16px 0;margin:1.6rem 0;padding-left:16px;padding-left:1.6rem}blockquote,figcaption{font-family:Georgia,Times,"Times New Roman",serif}html{font-size:62.5%}article,aside,details,footer,header,main,section,summary{display:block;height:auto;margin:0 auto;width:100%}footer{clear:both;display:inline-block;float:left;max-width:100%;padding:10px 0;padding:1rem 0;text-align:center}footer,hr{border-top:1px solid rgba(0,0,0,.2);border-top:.1rem solid rgba(0,0,0,.2)}hr{display:block;margin-bottom:16px;margin-bottom:1.6rem;width:100%}img{height:auto;vertical-align:baseline}input[type=color],input[type=date],input[type=datetime-local],input[type=datetime],input[type=email],input[type=month],input[type=number],input[type=password],input[type=search],input[type=tel],input[type=text],input[type=time],input[type=url],input[type=week],select{border:1px solid #ccc;border:.1rem solid #ccc;border-radius:0;display:inline-block;padding:8px;padding:.8rem;vertical-align:middle}input:not([type]){-webkit-appearance:none;background-clip:padding-box;background-color:#fff;border:1px solid #ccc;border:.1rem solid #ccc;border-radius:0;color:#444;display:inline-block;padding:8px;padding:.8rem;text-align:left}input[type=color]{padding:8px 16px;padding:.8rem 1.6rem}input:not([type]):focus,input[type=color]:focus,input[type=date]:focus,input[type=datetime-local]:focus,input[type=datetime]:focus,input[type=email]:focus,input[type=month]:focus,input[type=number]:focus,input[type=password]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=text]:focus,input[type=time]:focus,input[type=url]:focus,input[type=week]:focus,select:focus,textarea:focus{border-color:#b3d4fc}input[type=checkbox],input[type=radio]{vertical-align:middle}input[type=checkbox]:focus,input[type=file]:focus,input[type=radio]:focus{outline:thin solid #444}input:not([type])[disabled],input[type=color][disabled],input[type=date][disabled],input[type=datetime-local][disabled],input[type=datetime][disabled],input[type=email][disabled],input[type=month][disabled],input[type=number][disabled],input[type=password][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=text][disabled],input[type=time][disabled],input[type=url][disabled],input[type=week][disabled],select[disabled],textarea[disabled]{background-color:#efefef;color:#777;cursor:not-allowed}input[readonly],select[readonly],textarea[readonly]{background-color:#efefef;border-color:#ccc;color:#777}input:focus:invalid,select:focus:invalid,textarea:focus:invalid{border-color:#e9322d;color:#b94a48}input[type=checkbox]:focus:invalid:focus,input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus{outline-color:#ff4136}select{background-color:#fff;border:1px solid #ccc;border:.1rem solid #ccc}select[multiple]{height:auto}label{line-height:2}fieldset{border:0;margin:0;padding:8px 0;padding:.8rem 0}legend{border-bottom:1px solid #ccc;border-bottom:.1rem solid #ccc;display:block;padding:8px 0;padding:.8rem 0;width:100%}button,input[type=submit],legend{color:#444;margin-bottom:8px;margin-bottom:.8rem}button,input[type=submit]{-moz-user-select:none;-ms-user-select:none;-webkit-transition:.25s ease;-webkit-user-drag:none;-webkit-user-select:none;border:2px solid #444;border:.2rem solid #444;border-radius:0;cursor:pointer;display:inline-block;margin-right:4px;margin-right:.4rem;padding:8px 16px;padding:.8rem 1.6rem;text-align:center;text-decoration:none;text-transform:uppercase;transition:.25s ease;user-select:none;vertical-align:baseline}button a,input[type=submit] a{color:#444}button::-moz-focus-inner,input[type=submit]::-moz-focus-inner{padding:0}button:hover,input[type=submit]:hover{background:#444;border-color:#444;color:#fff}button:hover a,input[type=submit]:hover a{color:#fff}button:active,input[type=submit]:active{background:#6a6a6a;border-color:#6a6a6a;color:#fff}button:active a,input[type=submit]:active a{color:#fff}button:disabled,input[type=submit]:disabled{box-shadow:none;cursor:not-allowed;opacity:.4}nav ul{list-style:none;margin:0;padding:0;text-align:center}nav ul li{display:inline}nav a{-webkit-transition:.25s ease;border-bottom:2px solid transparent;border-bottom:.2rem solid transparent;color:#444;padding:8px 16px;padding:.8rem 1.6rem;text-decoration:none;transition:.25s ease}nav a:hover,nav li.selected a{border-color:rgba(0,0,0,.2)}nav a:active{border-color:rgba(0,0,0,.56)}caption{padding:8px 0;padding:.8rem 0}thead th{background:#efefef;color:#444}tr{background:#fff;margin-bottom:8px;margin-bottom:.8rem}td,th{border:1px solid #ccc;border:.1rem solid #ccc;padding:8px 16px;padding:.8rem 1.6rem;text-align:center;vertical-align:inherit}tfoot tr{background:none}tfoot td{color:#efefef;font-size:8px;font-size:.8rem;font-style:italic;padding:16px 4px;padding:1.6rem .4rem}@media screen{[hidden~=screen]{display:inherit}[hidden~=screen]:not(:active):not(:focus):not(:target){clip:rect(0)!important;position:absolute!important}}@media screen and max-width 40rem{article,aside,section{clear:both;display:block;max-width:100%}img{margin-right:1.6rem}}.media[hidden],[hidden=hidden],template{display:none}body{margin:.5em}button{background:rgba(255,255,255,.65);margin:0}table{min-width:85%;margin:0 auto}td{padding:1em;padding:10px;padding:1rem}thead td,thead th{padding:.5em;padding:5px;padding:.5rem}input[type=number]{width:4em}tbody>tr:nth-child(odd){background:#ddd}a:active,a:hover{color:#7d12db}.bracketed{color:#12db18}.bracketed,h1 a{text-shadow:1px 1px 1px #000}.bracketed:before{content:"[\00a0"}.bracketed:after{content:"\00a0]"}.bracketed:active,.bracketed:hover{color:#db7d12}.grow-1{-webkit-box-flex:1;-ms-flex-positive:1;flex-grow:1}.flex-wrap{-ms-flex-wrap:wrap;flex-wrap:wrap}.flex-no-wrap{-ms-flex-wrap:nowrap;flex-wrap:nowrap}.flex-align-end{-webkit-box-align:end;-ms-flex-align:end;align-items:flex-end}.flex-align-space-around{-ms-flex-line-pack:distribute;align-content:space-around}.flex-justify-space-around{-ms-flex-pack:distribute;justify-content:space-around}.flex-self-center{-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center}.flex{display:-webkit-box;display:-ms-flexbox;display:flex}.small-font{font-size:16px;font-size:1.6rem}.justify{text-align:justify}.align_center{text-align:center!important}.align_left{text-align:left!important}.align_right{text-align:right!important}.valign_top{vertical-align:top}.no_border{border:none}.media-wrap{text-align:center;margin:0 auto}.danger{background-color:#ff4136;border-color:#924949;color:#fff}.danger:active,.danger:hover{background-color:#924949;border-color:#ff4136;color:#fff}.user-btn{border-color:#12db18;color:#12db18;text-shadow:1px 1px 1px #000;padding:0 .5em;padding:0 5px;padding:0 .5rem}.user-btn:active,.user-btn:hover{border-color:#db7d12;background-color:#db7d12}.full_width{width:100%}.cssload-loader{position:relative;left:calc(50% - 31px);width:62px;height:62px;border-radius:50%;-webkit-perspective:780px;perspective:780px}.cssload-inner{position:absolute;width:100%;height:100%;box-sizing:border-box;border-radius:50%}.cssload-inner.cssload-one{left:0;top:0;-webkit-animation:a 1.15s linear infinite;animation:a 1.15s linear infinite;border-bottom:3px solid rgb(0,0,0)}.cssload-inner.cssload-two{right:0;top:0;-webkit-animation:b 1.15s linear infinite;animation:b 1.15s linear infinite;border-right:3px solid rgb(0,0,0)}.cssload-inner.cssload-three{right:0;bottom:0;-webkit-animation:c 1.15s linear infinite;animation:c 1.15s linear infinite;border-top:3px solid rgb(0,0,0)}@-webkit-keyframes a{0%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotate(0deg);transform:rotateX(35deg) rotateY(-45deg) rotate(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotate(1turn);transform:rotateX(35deg) rotateY(-45deg) rotate(1turn)}}@keyframes a{0%{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotate(0deg);transform:rotateX(35deg) rotateY(-45deg) rotate(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(-45deg) rotate(1turn);transform:rotateX(35deg) rotateY(-45deg) rotate(1turn)}}@-webkit-keyframes b{0%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotate(0deg);transform:rotateX(50deg) rotateY(10deg) rotate(0deg)}to{-webkit-transform:rotateX(50deg) rotateY(10deg) rotate(1turn);transform:rotateX(50deg) rotateY(10deg) rotate(1turn)}}@keyframes b{0%{-webkit-transform:rotateX(50deg) rotateY(10deg) rotate(0deg);transform:rotateX(50deg) rotateY(10deg) rotate(0deg)}to{-webkit-transform:rotateX(50deg) rotateY(10deg) rotate(1turn);transform:rotateX(50deg) rotateY(10deg) rotate(1turn)}}@-webkit-keyframes c{0%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotate(0deg);transform:rotateX(35deg) rotateY(55deg) rotate(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(55deg) rotate(1turn);transform:rotateX(35deg) rotateY(55deg) rotate(1turn)}}@keyframes c{0%{-webkit-transform:rotateX(35deg) rotateY(55deg) rotate(0deg);transform:rotateX(35deg) rotateY(55deg) rotate(0deg)}to{-webkit-transform:rotateX(35deg) rotateY(55deg) rotate(1turn);transform:rotateX(35deg) rotateY(55deg) rotate(1turn)}}.sorting,.sorting_asc,.sorting_desc{vertical-align:text-bottom}.sorting:before{content:" ↕\00a0"}.sorting_asc:before{content:" ↑\00a0"}.sorting_desc:before{content:" ↓\00a0"}.form{width:100%}.form thead th,.form thead tr{background:inherit;border:0}.form tr>td:nth-child(odd){text-align:right;min-width:25px;max-width:30%}.form tr>td:nth-child(2n){text-align:left;width:70%}.invisible tbody>tr:nth-child(odd){background:inherit}.invisible td,.invisible th,.invisible tr{border:0}.message{position:relative;margin:.5em auto;padding:.5em;width:95%}.message .close{width:1em;height:1em;position:absolute;right:.5em;top:.5em;text-align:center;vertical-align:middle;line-height:1em}.message:hover .close:after{content:"☒"}.message:hover{cursor:pointer}.message .icon{left:.5em;top:.5em;margin-right:1em}.message.error{border:1px solid #924949;background:#f3e6e6}.message.error .icon:after{content:"✘"}.message.success{border:1px solid #1f8454;background:#70dda9}.message.success .icon:after{content:"✔"}.message.info{border:1px solid #bfbe3a;background:#FFFFCC}.message.info .icon:after{content:"⚠"}.character,.media,.small_character{position:relative;vertical-align:top;display:inline-block;text-align:center;width:220px;height:311px;margin:.25em .125em}.character>img,.media>img,.small_character>img{width:100%}.media .edit_buttons>button{margin:.5em auto}.media_metadata>div,.medium_metadata>div,.name,.row{text-shadow:1px 2px 1px rgba(0,0,0,.85);background:#000;background:rgba(0,0,0,.45);color:#ffffff;padding:.25em .125em;text-align:right}.age_rating,.media_type{text-align:left}.media>.media_metadata{position:absolute;bottom:0;right:0}.media>.medium_metadata{position:absolute;bottom:0;left:0}.media>.name{position:absolute;top:0}.character:hover>.name,.media:hover>.media_metadata>div,.media:hover>.medium_metadata>div,.media:hover>.name,.media:hover>.table .row,.small_character:hover>.name{-webkit-transition:.25s ease;transition:.25s ease;background:rgba(0,0,0,.75)}.media:hover>.edit_buttons[hidden],.media:hover>button[hidden]{-webkit-transition:.25s ease;transition:.25s ease;display:block}.character>.name a,.character>.name a small,.media>.name a,.media>.name a small,.small_character>.name a,.small_character>.name a small{background:none;color:#fff;text-shadow:1px 2px 1px rgba(0,0,0,.85)}.anime .name,.manga .name{text-align:center;width:100%;padding:.5em .25em}.anime .age_rating,.anime .airing_status,.anime .completion,.anime .delete,.anime .edit,.anime .media_type,.anime .user_rating{background:none;text-align:center}.anime .table,.manga .table{position:absolute;bottom:0;left:0;width:100%}.anime .row,.manga .row{width:100%;background:#000;background:rgba(0,0,0,.45);display:-webkit-box;display:-ms-flexbox;display:flex;-ms-flex-line-pack:distribute;align-content:space-around;-ms-flex-pack:distribute;justify-content:space-around;text-align:center;padding:0 inherit}.anime .row>span,.manga .row>span{text-align:left}.anime .row>div,.manga .row>div{font-size:.8em;display:flex-item;-ms-flex-item-align:center;align-self:center;text-align:center;vertical-align:middle}.anime .media>button.plus_one{position:absolute;top:138px;top:calc(50% - 21.5px);left:44px;left:calc(50% - 66.5px)}.manga .row{padding:1px}.manga .media{border:1px solid #ddd;height:310px;margin:.25em}.manga .media>.edit_buttons{position:absolute;top:86px;top:calc(50% - 58.5px);left:43.5px;left:calc(50% - 66.5px)}.media.search>.name{background-color:#555;background-color:rgba(0,0,0,.35);background-size:cover;background-size:contain;background-repeat:no-repeat}.big-check{display:none}.big-check:checked+label{-webkit-transition:.25s ease;transition:.25s ease;background:rgba(0,0,0,.75)}.big-check:checked+label:after{content:"✓";font-size:15em;font-size:150px;font-size:15rem;text-align:center;color:greenyellow;position:absolute;top:147px;left:0;height:100%;width:100%}#series_list article.media{position:relative}#series_list .name,#series_list .name label{position:absolute;display:block;top:0;left:0;height:100%;width:100%;vertical-align:middle;line-height:1.25em}#series_list .name small{color:#fff}.details{margin:15px auto 0;margin:1.5rem auto 0;padding:10px;padding:1rem;font-size:inherit}.description{max-width:800px;max-width:80rem}.fixed{max-width:930px;max-width:93rem}.details .cover{display:block;width:284px}.details h2{margin-top:0}.details .flex>div{margin:10px;margin:1rem}.details .media_details{max-width:300px}.details .media_details td{padding:0 15px;padding:0 1.5rem}.details p{text-align:justify}.details .media_details td:nth-child(odd){width:1%;white-space:nowrap;text-align:right}.details .media_details td:nth-child(2n){text-align:left}.character,.small_character{background:rgba(0,0,0,.5);width:225px;height:350px;vertical-align:middle;white-space:nowrap}.small_character a{display:inline-block;width:100%;height:100%}.character .name,.small_character .name{position:absolute;bottom:0;left:0;z-index:2}.character img,.small_character img{position:relative;top:50%;-webkit-transform:translateY(-50%);transform:translateY(-50%);z-index:1;width:100%}.min-table{min-width:0;margin-left:0}.small_character{width:160px;height:250px}.user-page .media-wrap{text-align:left}.media a{display:inline-block;width:100%;height:100%}@media screen and (max-width:40em){nav a{line-height:4em;line-height:4rem}.media{margin:2px 0}main{padding:0 0,5em .5em;padding:0 .5rem .5rem}}.streaming-logo{width:50px;height:50px;vertical-align:middle}.cover_streaming_link .streaming-logo{width:20px;height:20px} \ No newline at end of file diff --git a/public/css/app.min.css.map b/public/css/app.min.css.map new file mode 100644 index 00000000..66dc9051 --- /dev/null +++ b/public/css/app.min.css.map @@ -0,0 +1 @@ +undefined \ No newline at end of file diff --git a/public/css/base.css b/public/css/base.css index a003688e..177282ff 100644 --- a/public/css/base.css +++ b/public/css/base.css @@ -1,675 +1,16 @@ -:root -{ - -ms-text-size-adjust:100%; - -webkit-text-size-adjust:100%; - box-sizing:border-box; - cursor:default; - font-family:'Open Sans', 'Nimbus Sans L', 'Helvetica Neue', Helvetica, 'Lucida Grande', sans-serif; - line-height:1.4; - overflow-y:scroll; - text-size-adjust:100%; - scroll-behavior: smooth; -} - -audio:not([controls]) -{ - display:none; -} - -details -{ - display:block; -} - -input[type=search] -{ - -webkit-appearance:textfield; -} - -input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration -{ - -webkit-appearance:none; -} - -main -{ - display:block; - margin:0 auto; - padding:0 1.6em 1.6em; - padding:0 16px 16px; - padding:0 1.6rem 1.6rem; -} - -summary -{ - display:block; -} - -pre -{ - background:#efefef; - color:#444; - display:block; - font-family:Menlo, Monaco, Consolas, 'Courier New', monospace; - font-size:1.4em; - font-size:14px; - font-size:1.4rem; - margin:1.6em 0; - margin:16px 0; - margin:1.6rem 0; - overflow:auto; - padding:1.6em; - padding:16px; - padding:1.6rem; - word-break:break-all; - word-wrap:break-word; -} - -progress -{ - display:inline-block; -} - -small -{ - color:#777; - font-size:75%; -} - -big -{ - font-size:125%; -} - -template -{ - display:none; -} - -textarea -{ - border:1px solid #ccc; - border:.1rem solid #ccc; - border-radius:0; - display:block; - margin-bottom:8px; - margin-bottom:.8rem; - overflow:auto; - padding:8px; - padding:.8rem; - resize:vertical; - vertical-align:middle; -} - -[hidden] -{ - display:none; -} - -[unselectable] -{ - -moz-user-select:none; - -ms-user-select:none; - -webkit-user-select:none; - user-select:none; -} - -*,::before,::after -{ - border-style:solid; - border-width:0; - box-sizing:inherit; -} - -* -{ - font-size:inherit; - line-height:inherit; - margin:0; - padding:0; -} - -::before,::after -{ - text-decoration:inherit; - vertical-align:inherit; -} - -a -{ - -webkit-transition:.25s ease; - color:#1271db; - text-decoration:none; - transition:.25s ease; -} - -audio,canvas,iframe,img,svg,video -{ - vertical-align:middle; -} - -button,input,select,textarea -{ - border:1px solid #ccc; - border:.1rem solid #ccc; - color:inherit; - font-family:inherit; - font-style:inherit; - font-weight:inherit; - min-height:1.4em; -} - -code,kbd,pre,samp -{ - font-family:Menlo, Monaco, Consolas, 'Courier New', monospace, monospace; -} - -table -{ - border-collapse:collapse; - border-spacing:0; - margin-bottom:16px; - margin-bottom:1.6rem; -} - -::-moz-selection -{ - background-color:#b3d4fc; - text-shadow:none; -} - -::selection -{ - background-color:#b3d4fc; - text-shadow:none; -} - -button::-moz-focus-inner -{ - border:0; -} - -body -{ - color:#444; - font-family:'Open Sans', 'Nimbus Sans L', 'Helvetica Neue', Helvetica, 'Lucida Grande', sans-serif; - font-size:16px; - font-size:1.6rem; - font-style:normal; - font-weight:400; - padding:0; -} - -p -{ - margin:0 0 16px; - margin:0 0 1.6rem; -} - -h1,h2,h3,h4,h5,h6 -{ - font-family:Lato, 'Open Sans', 'Nimbus Sans L', 'Helvetica Neue', Helvetica, 'Lucida Grande', sans-serif; - margin:2em 0 1.6em; - margin:20px 0 16px; - margin:2rem 0 1.6rem; -} - -h1 -{ - border-bottom:1px solid rgba(0, 0, 0, .2); - border-bottom:.1rem solid rgba(0, 0, 0, .2); - font-size:3.6em; - font-size:36px; - font-size:3.6rem; - font-style:normal; - font-weight:500; -} - -h2 -{ - font-size:3em; - font-size:30px; - font-size:3rem; - font-style:normal; - font-weight:500; -} - -h3 -{ - font-size:2.4em; - font-size:24px; - font-size:2.4rem; - font-style:normal; - font-weight:500; - margin:16px 0 4px; - margin:1.6rem 0 .4rem; -} - -h4 -{ - font-size:1.8em; - font-size:18px; - font-size:1.8rem; - font-style:normal; - font-weight:600; - margin:16px 0 4px; - margin:1.6rem 0 .4rem; -} - -h5 -{ - font-size:1.6em; - font-size:16px; - font-size:1.6rem; - font-style:normal; - font-weight:600; - margin:16px 0 4px; - margin:1.6rem 0 .4rem; -} - -h6 -{ - color:#777; - font-size:1.4em; - font-size:14px; - font-size:1.4rem; - font-style:normal; - font-weight:600; - margin:16px 0 4px; - margin:1.6rem 0 .4rem; -} - -code -{ - background:#efefef; - color:#444; - font-family:Menlo, Monaco, Consolas, 'Courier New', monospace; - font-size:14px; - font-size:1.4rem; - word-break:break-all; - word-wrap:break-word; -} - -a:hover,a:focus -{ - text-decoration:none; -} - -dl -{ - margin-bottom:16px; - margin-bottom:1.6rem; -} - -dd -{ - margin-left:40px; - margin-left:4rem; -} - -ul,ol -{ - margin-bottom:8px; - margin-bottom:.8rem; - padding-left:20px; - padding-left:2rem; -} - -blockquote -{ - border-left:2px solid #1271db; - border-left:.2rem solid #1271db; - font-family:Georgia, Times, 'Times New Roman', serif; - font-style:italic; - margin:16px 0; - margin:1.6rem 0; - padding-left:16px; - padding-left:1.6rem; -} - -figcaption -{ - font-family:Georgia, Times, 'Times New Roman', serif; -} - -html -{ - font-size:62.5%; -} - -main,header,footer,article,section,aside,details,summary -{ - display:block; - height:auto; - margin:0 auto; - width:100%; -} - -footer -{ - border-top:1px solid rgba(0, 0, 0, .2); - border-top:.1rem solid rgba(0, 0, 0, .2); - clear:both; - display:inline-block; - float:left; - max-width:100%; - padding:10px 0; - padding:1rem 0; - text-align:center; -} - -hr -{ - border-top:1px solid rgba(0, 0, 0, .2); - border-top:.1rem solid rgba(0, 0, 0, .2); - display:block; - margin-bottom:16px; - margin-bottom:1.6rem; - width:100%; -} - -img -{ - height:auto; - /* max-width:100%; */ - vertical-align:baseline; -} - -input[type=text],input[type=password],input[type=email],input[type=url],input[type=date],input[type=month],input[type=time],input[type=datetime],input[type=datetime-local],input[type=week],input[type=number],input[type=search],input[type=tel],input[type=color],select -{ - border:1px solid #ccc; - border:.1rem solid #ccc; - border-radius:0; - display:inline-block; - padding:8px; - padding:.8rem; - vertical-align:middle; -} - -input:not([type]) -{ - -webkit-appearance:none; - background-clip:padding-box; - background-color:#fff; - border:1px solid #ccc; - border:.1rem solid #ccc; - border-radius:0; - color:#444; - display:inline-block; - padding:8px; - padding:.8rem; - text-align:left; -} - -input[type=color] -{ - padding:8px 16px; - padding:.8rem 1.6rem; -} - -input[type=text]:focus,input[type=password]:focus,input[type=email]:focus,input[type=url]:focus,input[type=date]:focus,input[type=month]:focus,input[type=time]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=week]:focus,input[type=number]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=color]:focus,select:focus,textarea:focus -{ - border-color:#b3d4fc; -} - -input:not([type]):focus -{ - border-color:#b3d4fc; -} - -input[type=radio],input[type=checkbox] -{ - vertical-align:middle; -} - -input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus -{ - outline:1px solid thin #444; - outline:.1rem solid thin #444; -} - -input[type=text][disabled],input[type=password][disabled],input[type=email][disabled],input[type=url][disabled],input[type=date][disabled],input[type=month][disabled],input[type=time][disabled],input[type=datetime][disabled],input[type=datetime-local][disabled],input[type=week][disabled],input[type=number][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=color][disabled],select[disabled],textarea[disabled] -{ - background-color:#efefef; - color:#777; - cursor:not-allowed; -} - -input:not([type])[disabled] -{ - background-color:#efefef; - color:#777; - cursor:not-allowed; -} - -input[readonly],select[readonly],textarea[readonly] -{ - background-color:#efefef; - border-color:#ccc; - color:#777; -} - -input:focus:invalid,textarea:focus:invalid,select:focus:invalid -{ - border-color:#e9322d; - color:#b94a48; -} - -input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus,input[type=checkbox]:focus:invalid:focus -{ - outline-color:#ff4136; -} - -select -{ - background-color:#fff; - border:1px solid #ccc; - border:.1rem solid #ccc; -} - -select[multiple] -{ - height:auto; -} - -label -{ - line-height:2; -} - -fieldset -{ - border:0; - margin:0; - padding:8px 0; - padding:.8rem 0; -} - -legend -{ - border-bottom:1px solid #ccc; - border-bottom:.1rem solid #ccc; - color:#444; - display:block; - margin-bottom:8px; - margin-bottom:.8rem; - padding:8px 0; - padding:.8rem 0; - width:100%; -} - -input[type=submit],button -{ - -moz-user-select:none; - -ms-user-select:none; - -webkit-transition:.25s ease; - -webkit-user-drag:none; - -webkit-user-select:none; - border:2px solid #444; - border:.2rem solid #444; - border-radius:0; - color:#444; - cursor:pointer; - display:inline-block; - margin-bottom:8px; - margin-bottom:.8rem; - margin-right:4px; - margin-right:.4rem; - padding:8px 16px; - padding:.8rem 1.6rem; - text-align:center; - text-decoration:none; - text-transform:uppercase; - transition:.25s ease; - user-select:none; - vertical-align:baseline; -} - -input[type=submit] a,button a -{ - color:#444; -} - -input[type=submit]::-moz-focus-inner,button::-moz-focus-inner -{ - padding:0; -} - -input[type=submit]:hover,button:hover -{ - background:#444; - border-color:#444; - color:#fff; -} - -input[type=submit]:hover a,button:hover a -{ - color:#fff; -} - -input[type=submit]:active,button:active -{ - background:#6a6a6a; - border-color:#6a6a6a; - color:#fff; -} - -input[type=submit]:active a,button:active a -{ - color:#fff; -} - -input[type=submit]:disabled,button:disabled -{ - box-shadow:none; - cursor:not-allowed; - opacity:.40; -} - -nav ul -{ - list-style:none; - margin:0; - padding:0; - text-align:center; -} - -nav ul li -{ - display:inline; -} - -nav a -{ - -webkit-transition:.25s ease; - border-bottom:2px solid transparent; - border-bottom:.2rem solid transparent; - color:#444; - padding:8px 16px; - padding:.8rem 1.6rem; - text-decoration:none; - transition:.25s ease; -} - -nav a:hover,nav li.selected a -{ - border-color:rgba(0, 0, 0, .2); -} - -nav a:active -{ - border-color:rgba(0, 0, 0, .56); -} - -caption -{ - padding:8px 0; - padding:.8rem 0; -} - -thead th -{ - background:#efefef; - color:#444; -} - -tr -{ - background:#fff; - margin-bottom:8px; - margin-bottom:.8rem; -} - -th,td -{ - border:1px solid #ccc; - border:.1rem solid #ccc; - padding:8px 16px; - padding:.8rem 1.6rem; - text-align:center; - vertical-align:inherit; -} - -tfoot tr -{ - background:none; -} - -tfoot td -{ - color:#efefef; - font-size:8px; - font-size:.8rem; - font-style:italic; - padding:16px 4px; - padding:1.6rem .4rem; -} - -@media screen { - [hidden~=screen] - { - display:inherit; - } - - [hidden~=screen]:not(:active):not(:focus):not(:target) - { - clip:rect(0000)!important; - position:absolute!important; - } -} - -@media screen and max-width 40rem { - article,section,aside - { - clear:both; - display:block; - max-width:100%; - } - - img - { - margin-right:1.6rem; - } +@import "./marx.css"; + +:root { + --link-shadow: 1px 1px 1px #000; + --shadow: 1px 2px 1px rgba(0, 0, 0, 0.85); + --title-overlay: rgba(0, 0, 0, 0.45); + --title-overlay-fallback: #000; + --text-color: #ffffff; + --normal-padding: 0.25em 0.125em; + --link-hover-color: #7d12db; + --edit-link-hover-color: #db7d12; + --edit-link-color: #12db18; + --radius: 5px; } template, [hidden="hidden"], .media[hidden] {display:none} @@ -677,7 +18,7 @@ template, [hidden="hidden"], .media[hidden] {display:none} body {margin: 0.5em;} button { - background:rgba(255, 255, 255, .65); + background:rgba(255,255,255,0.65); margin: 0; } @@ -688,13 +29,11 @@ table { td { padding:1em; - padding:10px; padding:1rem; } thead td, thead th { padding:0.5em; - padding:5px; padding:0.5rem; } @@ -707,7 +46,7 @@ tbody > tr:nth-child(odd) { } a:hover, a:active { - color:#7d12db + color: var(--link-hover-color) } /* ----------------------------------------------------------------------------- @@ -715,49 +54,34 @@ a:hover, a:active { ------------------------------------------------------------------------------*/ .bracketed { - color:#12db18; + color: var(--edit-link-color); } - .bracketed, h1 a { - text-shadow:1px 1px 1px #000; + text-shadow: var(--link-shadow); } - .bracketed:before {content: '[\00a0'} - .bracketed:after {content: '\00a0]'} - .bracketed:hover, .bracketed:active { - color:#db7d12 + color: var(--edit-link-hover-color) } -.grow-1 {-webkit-box-flex: 1;-ms-flex-positive: 1;flex-grow: 1} - -.flex-wrap {-ms-flex-wrap: wrap;flex-wrap: wrap} - -.flex-no-wrap {-ms-flex-wrap: nowrap;flex-wrap: nowrap} - -.flex-align-end {-webkit-box-align: end;-ms-flex-align: end;align-items: flex-end} - -.flex-align-space-around {-ms-flex-line-pack: distribute;align-content: space-around} - -.flex-justify-space-around {-ms-flex-pack: distribute;justify-content: space-around} - -.flex-self-center {-ms-flex-item-align:center;-ms-grid-row-align:center;align-self:center} - -.flex {display: -webkit-box;display: -ms-flexbox;display: flex} +.grow-1 {flex-grow: 1} +.flex-wrap {flex-wrap: wrap} +.flex-no-wrap {flex-wrap: nowrap} +.flex-align-end {align-items: flex-end} +.flex-align-space-around {align-content: space-around} +.flex-justify-space-around {justify-content: space-around} +.flex-self-center {align-self:center} +.flex {display: flex} .small-font { - font-size:16px; font-size:1.6rem; } .justify {text-align:justify} - -.align_center {text-align:center} - -.align_left {text-align:left} - -.align_right {text-align:right} +.align_center {text-align:center !important} +.align_left {text-align:left !important} +.align_right {text-align:right !important} .valign_top {vertical-align:top} @@ -781,17 +105,15 @@ a:hover, a:active { } .user-btn { - border-color:#12db18; - color:#12db18; - text-shadow:1px 1px 1px #000; + border-color: var(--edit-link-color); + color: var(--edit-link-color); + text-shadow: var(--link-shadow); padding:0 0.5em; - padding:0 5px; padding:0 0.5rem; } - .user-btn:hover, .user-btn:active { - border-color:#db7d12; - background-color:#db7d12; + border-color: var(--edit-link-hover-color); + background-color: var(--edit-link-hover-color); } .full_width { @@ -808,8 +130,7 @@ a:hover, a:active { width: 62px; height: 62px; border-radius: 50%; - -webkit-perspective: 780px; - perspective: 780px; + perspective: 780px; } .cssload-inner { @@ -823,111 +144,65 @@ a:hover, a:active { .cssload-inner.cssload-one { left: 0%; top: 0%; - -webkit-animation: cssload-rotate-one 1.15s linear infinite; - animation: cssload-rotate-one 1.15s linear infinite; - border-bottom: 3px solid rgb(0, 0, 0); + animation: cssload-rotate-one 1.15s linear infinite; + border-bottom: 3px solid rgb(0,0,0); } .cssload-inner.cssload-two { right: 0%; top: 0%; - -webkit-animation: cssload-rotate-two 1.15s linear infinite; - animation: cssload-rotate-two 1.15s linear infinite; - border-right: 3px solid rgb(0, 0, 0); + animation: cssload-rotate-two 1.15s linear infinite; + border-right: 3px solid rgb(0,0,0); } .cssload-inner.cssload-three { right: 0%; bottom: 0%; - -webkit-animation: cssload-rotate-three 1.15s linear infinite; - animation: cssload-rotate-three 1.15s linear infinite; - border-top: 3px solid rgb(0, 0, 0); -} - -@-webkit-keyframes cssload-rotate-one { - 0% { - -webkit-transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); - transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); - } - 100% { - -webkit-transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); - transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); - } + animation: cssload-rotate-three 1.15s linear infinite; + border-top: 3px solid rgb(0,0,0); } @keyframes cssload-rotate-one { 0% { - -webkit-transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); - transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); + transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); } 100% { - -webkit-transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); - transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); - } -} - -@-webkit-keyframes cssload-rotate-two { - 0% { - -webkit-transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); - transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); - } - 100% { - -webkit-transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); - transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); + transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); } } @keyframes cssload-rotate-two { 0% { - -webkit-transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); - transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); + transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); } 100% { - -webkit-transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); - transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); - } -} - -@-webkit-keyframes cssload-rotate-three { - 0% { - -webkit-transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); - transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); - } - 100% { - -webkit-transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); - transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); + transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); } } @keyframes cssload-rotate-three { 0% { - -webkit-transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); - transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); + transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); } 100% { - -webkit-transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); - transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); + transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); } } /* ----------------------------------------------------------------------------- Table sorting and form styles ------------------------------------------------------------------------------*/ - .sorting, .sorting_asc, .sorting_desc { vertical-align:text-bottom; } - .sorting::before { content: " ↕\00a0"; } - .sorting_asc::before { content: " ↑\00a0"; } - .sorting_desc::before { content: " ↓\00a0"; } @@ -944,7 +219,6 @@ a:hover, a:active { min-width:25px; max-width:30%; } - .form tr > td:nth-child(even) { text-align:left; width:70%; @@ -953,7 +227,6 @@ a:hover, a:active { .invisible tbody > tr:nth-child(odd) { background: inherit; } - .invisible tr, .invisible td, .invisible th { border:0; } @@ -999,7 +272,7 @@ a:hover, a:active { background: #f3e6e6; } -.message.error .icon::after { + .message.error .icon::after { content: '✘'; } @@ -1007,8 +280,7 @@ a:hover, a:active { border:1px solid #1f8454; background: #70dda9; } - -.message.success .icon::after { + .message.success .icon::after { content: '✔' } @@ -1017,7 +289,7 @@ a:hover, a:active { background: #FFFFCC; } -.message.info .icon::after { + .message.info .icon::after { content: '⚠'; } @@ -1032,7 +304,7 @@ a:hover, a:active { text-align:center; width:220px; height:311px; - margin:0.25em 0.125em; + margin: var(--normal-padding); } .media > img, @@ -1045,60 +317,57 @@ a:hover, a:active { margin:0.5em auto; } -.name, + .name, .media_metadata > div, .medium_metadata > div, .row { - text-shadow:1px 2px 1px rgba(0, 0, 0, .85); - background:#000; - background:rgba(0, 0, 0, .45); - color:#ffffff; - padding:0.25em 0.125em; + text-shadow: var(--shadow); + background: var(--title-overlay-fallback); + background: var(--title-overlay); + color: var(--text-color); + padding: var(--normal-padding); text-align:right; } -.media_type, .age_rating { + .media_type, .age_rating { text-align:left; } -.media > .media_metadata { + .media > .media_metadata { position:absolute; bottom:0; right:0; } -.media > .medium_metadata { + .media > .medium_metadata { position:absolute; bottom: 0; left:0; } -.media > .name { + .media > .name { position:absolute; top: 0; } - -.small_character:hover > .name, + .small_character:hover > .name, .character:hover > .name, .media:hover > .name, .media:hover > .media_metadata > div, .media:hover > .medium_metadata > div, .media:hover > .table .row { - -webkit-transition:.25s ease; transition: .25s ease; - background:rgba(0, 0, 0, .75); + background:rgba(0,0,0,0.75); } -.media:hover > button[hidden], + .media:hover > button[hidden], .media:hover > .edit_buttons[hidden] { - -webkit-transition:.25s ease; transition: .25s ease; display:block; } -.small_character > .name a, + .small_character > .name a, .small_character > .name a small, .character > .name a, .character > .name a small, @@ -1107,13 +376,14 @@ a:hover, a:active { { background:none; color:#fff; - text-shadow:1px 2px 1px rgba(0, 0, 0, .85); + text-shadow: var(--shadow); } + + /* ----------------------------------------------------------------------------- Anime-list-specific styles ------------------------------------------------------------------------------*/ - .anime .name, .manga .name { text-align:center; width:100%; @@ -1131,6 +401,7 @@ a:hover, a:active { text-align:center; } + .anime .table, .manga .table { position:absolute; bottom:0; @@ -1140,15 +411,11 @@ a:hover, a:active { .anime .row, .manga .row { width:100%; - background:#000; - background:rgba(0, 0, 0, .45); - display: -webkit-box; - display: -ms-flexbox; + background: var(--title-overlay-fallback); + background: var(--title-overlay); display: flex; - -ms-flex-line-pack: distribute; - align-content: space-around; - -ms-flex-pack: distribute; - justify-content: space-around; + align-content: space-around; + justify-content: space-around; text-align:center; padding:0 inherit; } @@ -1160,8 +427,7 @@ a:hover, a:active { .anime .row > div, .manga .row > div { font-size:0.8em; display:flex-item; - -ms-flex-item-align:center; - align-self:center; + align-self:center; text-align:center; vertical-align:middle; } @@ -1177,7 +443,6 @@ a:hover, a:active { /* ----------------------------------------------------------------------------- Manga-list-specific styles ------------------------------------------------------------------------------*/ - .manga .row { padding:1px; } @@ -1196,13 +461,13 @@ a:hover, a:active { left: calc(50% - 66.5px); } + /* ----------------------------------------------------------------------------- Search page styles ------------------------------------------------------------------------------*/ - .media.search > .name { background-color:#555; - background-color: rgba(0, 0, 0, .35); + background-color: rgba(000,000,000,0.35); background-size: cover; background-size: contain; background-repeat: no-repeat; @@ -1213,15 +478,13 @@ a:hover, a:active { } .big-check:checked + label { - -webkit-transition:.25s ease; transition: .25s ease; - background:rgba(0, 0, 0, .75); + background:rgba(0,0,0,0.75); } .big-check:checked + label:after { content: '✓'; font-size: 15em; - font-size:150px; font-size: 15rem; text-align:center; color: greenyellow; @@ -1235,7 +498,6 @@ a:hover, a:active { #series_list article.media { position:relative; } - #series_list .name, #series_list .name label { position:absolute; display:block; @@ -1246,7 +508,6 @@ a:hover, a:active { vertical-align:middle; line-height: 1.25em; } - #series_list .name small { color: #fff; } @@ -1254,17 +515,17 @@ a:hover, a:active { /* ---------------------------------------------------------------------------- Details page styles -----------------------------------------------------------------------------*/ - .details { - margin:15px auto 0 auto; margin: 1.5rem auto 0 auto; - padding:10px; padding:1rem; font-size:inherit; } -.details.fixed { - max-width:930px; +.description { + max-width:80rem; +} + +.fixed { max-width:93rem; } @@ -1279,16 +540,13 @@ a:hover, a:active { } .details .flex > div { - margin:10px; margin: 1rem; } .details .media_details { max-width:300px; } - -.details .media_details td { - padding:0 15px; + .details .media_details td { padding:0 1.5rem; } @@ -1301,27 +559,25 @@ a:hover, a:active { white-space:nowrap; text-align:right; } - .details .media_details td:nth-child(even) { text-align:left; } .character, .small_character { - background: rgba(0, 0, 0, .5); + background: rgba(0,0,0,0.5); width: 225px; height: 350px; vertical-align: middle; white-space: nowrap; } - -.small_character a { + .small_character a { display:inline-block; width: 100%; height: 100%; } -.small_character .name, + .small_character .name, .character .name { position: absolute; bottom: 0; @@ -1329,20 +585,23 @@ a:hover, a:active { z-index: 10; } -.small_character img, + .small_character img, .character img { position: relative; top: 50%; - -webkit-transform: translateY(-50%); - transform: translateY(-50%); + transform: translateY(-50%); z-index: 5; width: 100%; } +.min-table { + min-width: 0; + margin-left: 0; +} + /* ---------------------------------------------------------------------------- User page styles -----------------------------------------------------------------------------*/ - .small_character { width: 160px; height: 250px; @@ -1381,7 +640,6 @@ a:hover, a:active { /* ---------------------------------------------------------------------------- Images / Logos -----------------------------------------------------------------------------*/ - .streaming-logo { width: 50px; height: 50px; diff --git a/public/css/base.myth.css b/public/css/base.myth.css deleted file mode 100644 index 60fae728..00000000 --- a/public/css/base.myth.css +++ /dev/null @@ -1,643 +0,0 @@ -@import "./marx.myth.css"; - -:root { - --link-shadow: 1px 1px 1px #000; - --shadow: 1px 2px 1px rgba(0, 0, 0, 0.85); - --title-overlay: rgba(0, 0, 0, 0.45); - --title-overlay-fallback: #000; - --text-color: #ffffff; - --normal-padding: 0.25em 0.125em; - --link-hover-color: #7d12db; - --edit-link-hover-color: #db7d12; - --edit-link-color: #12db18; - --radius: 5px; -} - -template, [hidden="hidden"], .media[hidden] {display:none} - -body {margin: 0.5em;} - -button { - background:rgba(255,255,255,0.65); - margin: 0; -} - -table { - min-width:85%; - margin: 0 auto; -} - -td { - padding:1em; - padding:1rem; -} - -thead td, thead th { - padding:0.5em; - padding:0.5rem; -} - -input[type=number] { - width: 4em; -} - -tbody > tr:nth-child(odd) { - background: #ddd; -} - -a:hover, a:active { - color: var(--link-hover-color) -} - -/* ----------------------------------------------------------------------------- - Utility classes -------------------------------------------------------------------------------*/ - -.bracketed { - color: var(--edit-link-color); -} -.bracketed, h1 a { - text-shadow: var(--link-shadow); -} -.bracketed:before {content: '[\00a0'} -.bracketed:after {content: '\00a0]'} -.bracketed:hover, .bracketed:active { - color: var(--edit-link-hover-color) -} - -.grow-1 {flex-grow: 1} -.flex-wrap {flex-wrap: wrap} -.flex-no-wrap {flex-wrap: nowrap} -.flex-align-end {align-items: flex-end} -.flex-align-space-around {align-content: space-around} -.flex-justify-space-around {justify-content: space-around} -.flex-self-center {align-self:center} -.flex {display: flex} - -.small-font { - font-size:1.6rem; -} - -.justify {text-align:justify} -.align_center {text-align:center} -.align_left {text-align:left} -.align_right {text-align:right} - -.valign_top {vertical-align:top} - -.no_border {border:none} - -.media-wrap { - text-align:center; - margin:0 auto; -} - -.danger { - background-color: #ff4136; - border-color: #924949; - color:#fff; -} - -.danger:hover, .danger:active { - background-color: #924949; - border-color: #ff4136; - color:#fff; -} - -.user-btn { - border-color: var(--edit-link-color); - color: var(--edit-link-color); - text-shadow: var(--link-shadow); - padding:0 0.5em; - padding:0 0.5rem; -} -.user-btn:hover, .user-btn:active { - border-color: var(--edit-link-hover-color); - background-color: var(--edit-link-hover-color); -} - -.full_width { - width: 100%; -} - -/* ----------------------------------------------------------------------------- - CSS loading icon -------------------------------------------------------------------------------*/ - -.cssload-loader { - position: relative; - left: calc(50% - 31px); - width: 62px; - height: 62px; - border-radius: 50%; - perspective: 780px; -} - -.cssload-inner { - position: absolute; - width: 100%; - height: 100%; - box-sizing: border-box; - border-radius: 50%; -} - -.cssload-inner.cssload-one { - left: 0%; - top: 0%; - animation: cssload-rotate-one 1.15s linear infinite; - border-bottom: 3px solid rgb(0,0,0); -} - -.cssload-inner.cssload-two { - right: 0%; - top: 0%; - animation: cssload-rotate-two 1.15s linear infinite; - border-right: 3px solid rgb(0,0,0); -} - -.cssload-inner.cssload-three { - right: 0%; - bottom: 0%; - animation: cssload-rotate-three 1.15s linear infinite; - border-top: 3px solid rgb(0,0,0); -} - -@keyframes cssload-rotate-one { - 0% { - transform: rotateX(35deg) rotateY(-45deg) rotateZ(0deg); - } - 100% { - transform: rotateX(35deg) rotateY(-45deg) rotateZ(360deg); - } -} - -@keyframes cssload-rotate-two { - 0% { - transform: rotateX(50deg) rotateY(10deg) rotateZ(0deg); - } - 100% { - transform: rotateX(50deg) rotateY(10deg) rotateZ(360deg); - } -} - -@keyframes cssload-rotate-three { - 0% { - transform: rotateX(35deg) rotateY(55deg) rotateZ(0deg); - } - 100% { - transform: rotateX(35deg) rotateY(55deg) rotateZ(360deg); - } -} - -/* ----------------------------------------------------------------------------- - Table sorting and form styles -------------------------------------------------------------------------------*/ -.sorting, -.sorting_asc, -.sorting_desc { - vertical-align:text-bottom; -} -.sorting::before { - content: " ↕\00a0"; -} -.sorting_asc::before { - content: " ↑\00a0"; -} -.sorting_desc::before { - content: " ↓\00a0"; -} - -.form { width:100%; } - -.form thead th, .form thead tr { - background: inherit; - border:0; -} - -.form tr > td:nth-child(odd) { - text-align:right; - min-width:25px; - max-width:30%; -} -.form tr > td:nth-child(even) { - text-align:left; - width:70%; -} - -.invisible tbody > tr:nth-child(odd) { - background: inherit; -} -.invisible tr, .invisible td, .invisible th { - border:0; -} - -/* ----------------------------------------------------------------------------- - Message boxes -------------------------------------------------------------------------------*/ - -.message{ - position:relative; - margin:0.5em auto; - padding:0.5em; - width:95%; -} - -.message .close{ - width:1em; - height:1em; - position:absolute; - right:0.5em; - top:0.5em; - text-align:center; - vertical-align:middle; - line-height:1em; -} - -.message:hover .close:after { - content: '☒'; -} - -.message:hover { - cursor:pointer; -} - -.message .icon{ - left:0.5em; - top:0.5em; - margin-right:1em; -} - -.message.error{ - border:1px solid #924949; - background: #f3e6e6; -} - - .message.error .icon::after { - content: '✘'; - } - -.message.success{ - border:1px solid #1f8454; - background: #70dda9; -} - .message.success .icon::after { - content: '✔' - } - -.message.info{ - border:1px solid #bfbe3a; - background: #FFFFCC; -} - - .message.info .icon::after { - content: '⚠'; - } - -/* ----------------------------------------------------------------------------- - Base list styles -------------------------------------------------------------------------------*/ - -.media, .character, .small_character { - position:relative; - vertical-align:top; - display:inline-block; - text-align:center; - width:220px; - height:311px; - margin: var(--normal-padding); -} - -.media > img, -.character > img, -.small_character > img { - width: 100%; -} - -.media .edit_buttons > button { - margin:0.5em auto; -} - - .name, - .media_metadata > div, - .medium_metadata > div, - .row { - text-shadow: var(--shadow); - background: var(--title-overlay-fallback); - background: var(--title-overlay); - color: var(--text-color); - padding: var(--normal-padding); - text-align:right; - } - - .media_type, .age_rating { - text-align:left; - } - - .media > .media_metadata { - position:absolute; - bottom:0; - right:0; - } - - .media > .medium_metadata { - position:absolute; - bottom: 0; - left:0; - } - - .media > .name { - position:absolute; - top: 0; - } - .small_character:hover > .name, - .character:hover > .name, - .media:hover > .name, - .media:hover > .media_metadata > div, - .media:hover > .medium_metadata > div, - .media:hover > .table .row - { - transition: .25s ease; - background:rgba(0,0,0,0.75); - } - - .media:hover > button[hidden], - .media:hover > .edit_buttons[hidden] - { - transition: .25s ease; - display:block; - } - - .small_character > .name a, - .small_character > .name a small, - .character > .name a, - .character > .name a small, - .media > .name a, - .media > .name a small - { - background:none; - color:#fff; - text-shadow: var(--shadow); - } - - - -/* ----------------------------------------------------------------------------- - Anime-list-specific styles -------------------------------------------------------------------------------*/ -.anime .name, .manga .name { - text-align:center; - width:100%; - padding:0.5em 0.25em; -} - -.anime .media_type, -.anime .airing_status, -.anime .user_rating, -.anime .completion, -.anime .age_rating, -.anime .edit, -.anime .delete { - background: none; - text-align:center; -} - - -.anime .table, .manga .table { - position:absolute; - bottom:0; - left:0; - width:100%; -} - -.anime .row, .manga .row { - width:100%; - background: var(--title-overlay-fallback); - background: var(--title-overlay); - display: flex; - align-content: space-around; - justify-content: space-around; - text-align:center; - padding:0 inherit; -} - -.anime .row > span, .manga .row > span { - text-align:left; -} - -.anime .row > div, .manga .row > div { - font-size:0.8em; - display:flex-item; - align-self:center; - text-align:center; - vertical-align:middle; -} - -.anime .media > button.plus_one { - position:absolute; - top: 138px; - top: calc(50% - 21.5px); - left: 44px; - left: calc(50% - 66.5px); -} - -/* ----------------------------------------------------------------------------- - Manga-list-specific styles -------------------------------------------------------------------------------*/ -.manga .row { - padding:1px; -} - -.manga .media { - border:1px solid #ddd; - height:310px; - margin:0.25em; -} - -.manga .media > .edit_buttons { - position:absolute; - top: 86px; - top: calc(50% - 58.5px); - left: 43.5px; - left: calc(50% - 66.5px); -} - - -/* ----------------------------------------------------------------------------- - Search page styles -------------------------------------------------------------------------------*/ -.media.search > .name { - background-color:#555; - background-color: rgba(000,000,000,0.35); - background-size: cover; - background-size: contain; - background-repeat: no-repeat; -} - -.big-check { - display:none; -} - -.big-check:checked + label { - transition: .25s ease; - background:rgba(0,0,0,0.75); -} - -.big-check:checked + label:after { - content: '✓'; - font-size: 15em; - font-size: 15rem; - text-align:center; - color: greenyellow; - position:absolute; - top:147px; - left:0; - height:100%; - width:100%; -} - -#series_list article.media { - position:relative; -} -#series_list .name, #series_list .name label { - position:absolute; - display:block; - top:0; - left:0; - height:100%; - width:100%; - vertical-align:middle; - line-height: 1.25em; -} -#series_list .name small { - color: #fff; -} - -/* ---------------------------------------------------------------------------- - Details page styles ------------------------------------------------------------------------------*/ -.details { - margin: 1.5rem auto 0 auto; - padding:1rem; - font-size:inherit; -} - -.details.fixed { - max-width:93rem; -} - -.details .cover { - display: block; - width: 284px; - /* height: 402px; */ -} - -.details h2 { - margin-top: 0; -} - -.details .flex > div { - margin: 1rem; -} - -.details .media_details { - max-width:300px; -} - .details .media_details td { - padding:0 1.5rem; - } - -.details p { - text-align:justify; -} - -.details .media_details td:nth-child(odd) { - width:1%; - white-space:nowrap; - text-align:right; -} -.details .media_details td:nth-child(even) { - text-align:left; -} - -.character, -.small_character { - background: rgba(0,0,0,0.5); - width: 225px; - height: 350px; - vertical-align: middle; - white-space: nowrap; -} - .small_character a { - display:inline-block; - width: 100%; - height: 100%; - } - - .small_character .name, - .character .name { - position: absolute; - bottom: 0; - left: 0; - z-index: 10; - } - - .small_character img, - .character img { - position: relative; - top: 50%; - transform: translateY(-50%); - z-index: 5; - width: 100%; - } - -/* ---------------------------------------------------------------------------- - User page styles ------------------------------------------------------------------------------*/ -.small_character { - width: 160px; - height: 250px; -} - -.user-page .media-wrap { - text-align: left; -} - -.media a { - display: inline-block; - width: 100%; - height: 100%; -} - -/* ---------------------------------------------------------------------------- - Viewport-based styles ------------------------------------------------------------------------------*/ - -@media screen and (max-width: 40em) { - nav a { - line-height:4em; - line-height:4rem; - } - - .media { - margin:2px 0; - } - - main { - padding:0 0,5em 0.5em; - padding:0 0.5rem 0.5rem; - } -} - -/* ---------------------------------------------------------------------------- - Images / Logos ------------------------------------------------------------------------------*/ -.streaming-logo { - width: 50px; - height: 50px; - vertical-align:middle; -} - -.cover_streaming_link .streaming-logo { - width: 20px; - height: 20px; -} \ No newline at end of file diff --git a/public/css/marx.myth.css b/public/css/marx.css similarity index 75% rename from public/css/marx.myth.css rename to public/css/marx.css index 856fbdf0..db716220 100644 --- a/public/css/marx.myth.css +++ b/public/css/marx.css @@ -1,6 +1,7 @@ -:root -{ - --default-font-list:'Open Sans', 'Nimbus Sans L', 'Helvetica Neue', Helvetica, 'Lucida Grande', sans-serif; +:root { + --default-font-list: system-ui,sans-serif; + --monospace-font-list:'Anonymous Pro','Fira Code',Menlo,Monaco,Consolas,'Courier New',monospace; + --serif-font-list:Georgia,Times,'Times New Roman',serif; -ms-text-size-adjust:100%; -webkit-text-size-adjust:100%; box-sizing:border-box; @@ -9,48 +10,41 @@ line-height:1.4; overflow-y:scroll; text-size-adjust:100%; - scroll-behavior: smooth; + scroll-behavior:smooth; } -audio:not([controls]) -{ +audio:not([controls]) { display:none; } -details -{ +details { display:block; } -input[type=search] -{ +input[type=search] { -webkit-appearance:textfield; } -input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration -{ +input[type=search]::-webkit-search-cancel-button,input[type=search]::-webkit-search-decoration { -webkit-appearance:none; } -main -{ +main { display:block; margin:0 auto; padding:0 1.6em 1.6em; padding:0 1.6rem 1.6rem; } -summary -{ +summary { display:block; } -pre -{ +pre { background:#efefef; color:#444; display:block; - font-family:Menlo, Monaco, Consolas, 'Courier New', monospace; + font-family:var(--monospace-font-list); font-size:1.4em; font-size:1.4rem; margin:1.6em 0; @@ -62,29 +56,24 @@ pre word-wrap:break-word; } -progress -{ +progress { display:inline-block; } -small -{ +small { color:#777; font-size:75%; } -big -{ +big { font-size:125%; } -template -{ +template { display:none; } -textarea -{ +textarea { border:.1rem solid #ccc; border-radius:0; display:block; @@ -95,55 +84,47 @@ textarea vertical-align:middle; } -[hidden] -{ +[hidden] { display:none; } -[unselectable] -{ +[unselectable] { -moz-user-select:none; -ms-user-select:none; -webkit-user-select:none; user-select:none; } -*,::before,::after -{ +*,::before,::after { border-style:solid; border-width:0; box-sizing:inherit; } -* -{ +* { font-size:inherit; line-height:inherit; margin:0; padding:0; } -::before,::after -{ +::before,::after { text-decoration:inherit; vertical-align:inherit; } -a -{ +a { -webkit-transition:.25s ease; color:#1271db; text-decoration:none; transition:.25s ease; } -audio,canvas,iframe,img,svg,video -{ +audio,canvas,iframe,img,svg,video { vertical-align:middle; } -button,input,select,textarea -{ +button,input,select,textarea { border:.1rem solid #ccc; color:inherit; font-family:inherit; @@ -152,37 +133,31 @@ button,input,select,textarea min-height:1.4em; } -code,kbd,pre,samp -{ - font-family:Menlo, Monaco, Consolas, 'Courier New', monospace, monospace; +code,kbd,pre,samp { + font-family:var(--monospace-font-list); } -table -{ +table { border-collapse:collapse; border-spacing:0; margin-bottom:1.6rem; } -::-moz-selection -{ +::-moz-selection { background-color:#b3d4fc; text-shadow:none; } -::selection -{ +::selection { background-color:#b3d4fc; text-shadow:none; } -button::-moz-focus-inner -{ +button::-moz-focus-inner { border:0; } -body -{ +body { color:#444; font-family:var(--default-font-list); font-size:1.6rem; @@ -191,20 +166,17 @@ body padding:0; } -p -{ +p { margin:0 0 1.6rem; } -h1,h2,h3,h4,h5,h6 -{ - font-family:Lato, var(--default-font-list); +h1,h2,h3,h4,h5,h6 { + font-family:var(--default-font-list); margin:2em 0 1.6em; margin:2rem 0 1.6rem; } -h1 -{ +h1 { border-bottom:.1rem solid rgba(0,0,0,0.2); font-size:3.6em; font-size:3.6rem; @@ -212,16 +184,14 @@ h1 font-weight:500; } -h2 -{ +h2 { font-size:3em; font-size:3rem; font-style:normal; font-weight:500; } -h3 -{ +h3 { font-size:2.4em; font-size:2.4rem; font-style:normal; @@ -229,8 +199,7 @@ h3 margin:1.6rem 0 .4rem; } -h4 -{ +h4 { font-size:1.8em; font-size:1.8rem; font-style:normal; @@ -238,8 +207,7 @@ h4 margin:1.6rem 0 .4rem; } -h5 -{ +h5 { font-size:1.6em; font-size:1.6rem; font-style:normal; @@ -247,8 +215,7 @@ h5 margin:1.6rem 0 .4rem; } -h6 -{ +h6 { color:#777; font-size:1.4em; font-size:1.4rem; @@ -257,66 +224,56 @@ h6 margin:1.6rem 0 .4rem; } -code -{ +code { background:#efefef; color:#444; - font-family:Menlo, Monaco, Consolas, 'Courier New', monospace; + font-family:var(--monospace-font-list); font-size:1.4rem; word-break:break-all; word-wrap:break-word; } -a:hover,a:focus -{ +a:hover,a:focus { text-decoration:none; } -dl -{ +dl { margin-bottom:1.6rem; } -dd -{ +dd { margin-left:4rem; } -ul,ol -{ +ul,ol { margin-bottom:.8rem; padding-left:2rem; } -blockquote -{ +blockquote { border-left:.2rem solid #1271db; - font-family:Georgia, Times, 'Times New Roman', serif; + font-family:var(--serif-font-list); font-style:italic; margin:1.6rem 0; padding-left:1.6rem; } -figcaption -{ - font-family:Georgia, Times, 'Times New Roman', serif; +figcaption { + font-family:var(--serif-font-list); } -html -{ +html { font-size:62.5%; } -main,header,footer,article,section,aside,details,summary -{ +main,header,footer,article,section,aside,details,summary { display:block; height:auto; margin:0 auto; width:100%; } -footer -{ +footer { border-top:.1rem solid rgba(0,0,0,0.2); clear:both; display:inline-block; @@ -326,23 +283,20 @@ footer text-align:center; } -hr -{ +hr { border-top:.1rem solid rgba(0,0,0,0.2); display:block; margin-bottom:1.6rem; width:100%; } -img -{ +img { height:auto; - /* max-width:100%; */ +/* max-width:100%; */ vertical-align:baseline; } -input[type=text],input[type=password],input[type=email],input[type=url],input[type=date],input[type=month],input[type=time],input[type=datetime],input[type=datetime-local],input[type=week],input[type=number],input[type=search],input[type=tel],input[type=color],select -{ +input[type=text],input[type=password],input[type=email],input[type=url],input[type=date],input[type=month],input[type=time],input[type=datetime],input[type=datetime-local],input[type=week],input[type=number],input[type=search],input[type=tel],input[type=color],select { border:.1rem solid #ccc; border-radius:0; display:inline-block; @@ -350,8 +304,7 @@ input[type=text],input[type=password],input[type=email],input[type=url],input[ty vertical-align:middle; } -input:not([type]) -{ +input:not([type]) { -webkit-appearance:none; background-clip:padding-box; background-color:#fff; @@ -363,88 +316,73 @@ input:not([type]) text-align:left; } -input[type=color] -{ +input[type=color] { padding:.8rem 1.6rem; } -input[type=text]:focus,input[type=password]:focus,input[type=email]:focus,input[type=url]:focus,input[type=date]:focus,input[type=month]:focus,input[type=time]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=week]:focus,input[type=number]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=color]:focus,select:focus,textarea:focus -{ +input[type=text]:focus,input[type=password]:focus,input[type=email]:focus,input[type=url]:focus,input[type=date]:focus,input[type=month]:focus,input[type=time]:focus,input[type=datetime]:focus,input[type=datetime-local]:focus,input[type=week]:focus,input[type=number]:focus,input[type=search]:focus,input[type=tel]:focus,input[type=color]:focus,select:focus,textarea:focus { border-color:#b3d4fc; } -input:not([type]):focus -{ +input:not([type]):focus { border-color:#b3d4fc; } -input[type=radio],input[type=checkbox] -{ +input[type=radio],input[type=checkbox] { vertical-align:middle; } -input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus -{ +input[type=file]:focus,input[type=radio]:focus,input[type=checkbox]:focus { outline:.1rem solid thin #444; } -input[type=text][disabled],input[type=password][disabled],input[type=email][disabled],input[type=url][disabled],input[type=date][disabled],input[type=month][disabled],input[type=time][disabled],input[type=datetime][disabled],input[type=datetime-local][disabled],input[type=week][disabled],input[type=number][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=color][disabled],select[disabled],textarea[disabled] -{ +input[type=text][disabled],input[type=password][disabled],input[type=email][disabled],input[type=url][disabled],input[type=date][disabled],input[type=month][disabled],input[type=time][disabled],input[type=datetime][disabled],input[type=datetime-local][disabled],input[type=week][disabled],input[type=number][disabled],input[type=search][disabled],input[type=tel][disabled],input[type=color][disabled],select[disabled],textarea[disabled] { background-color:#efefef; color:#777; cursor:not-allowed; } -input:not([type])[disabled] -{ +input:not([type])[disabled] { background-color:#efefef; color:#777; cursor:not-allowed; } -input[readonly],select[readonly],textarea[readonly] -{ +input[readonly],select[readonly],textarea[readonly] { background-color:#efefef; border-color:#ccc; color:#777; } -input:focus:invalid,textarea:focus:invalid,select:focus:invalid -{ +input:focus:invalid,textarea:focus:invalid,select:focus:invalid { border-color:#e9322d; color:#b94a48; } -input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus,input[type=checkbox]:focus:invalid:focus -{ +input[type=file]:focus:invalid:focus,input[type=radio]:focus:invalid:focus,input[type=checkbox]:focus:invalid:focus { outline-color:#ff4136; } -select -{ +select { background-color:#fff; border:.1rem solid #ccc; } -select[multiple] -{ +select[multiple] { height:auto; } -label -{ +label { line-height:2; } -fieldset -{ +fieldset { border:0; margin:0; padding:.8rem 0; } -legend -{ +legend { border-bottom:.1rem solid #ccc; color:#444; display:block; @@ -453,8 +391,7 @@ legend width:100%; } -input[type=submit],button -{ +input[type=submit],button { -moz-user-select:none; -ms-user-select:none; -webkit-transition:.25s ease; @@ -476,62 +413,52 @@ input[type=submit],button vertical-align:baseline; } -input[type=submit] a,button a -{ +input[type=submit] a,button a { color:#444; } -input[type=submit]::-moz-focus-inner,button::-moz-focus-inner -{ +input[type=submit]::-moz-focus-inner,button::-moz-focus-inner { padding:0; } -input[type=submit]:hover,button:hover -{ +input[type=submit]:hover,button:hover { background:#444; border-color:#444; color:#fff; } -input[type=submit]:hover a,button:hover a -{ +input[type=submit]:hover a,button:hover a { color:#fff; } -input[type=submit]:active,button:active -{ +input[type=submit]:active,button:active { background:#6a6a6a; border-color:#6a6a6a; color:#fff; } -input[type=submit]:active a,button:active a -{ +input[type=submit]:active a,button:active a { color:#fff; } -input[type=submit]:disabled,button:disabled -{ +input[type=submit]:disabled,button:disabled { box-shadow:none; cursor:not-allowed; - opacity:.40; + opacity:.4; } -nav ul -{ +nav ul { list-style:none; margin:0; padding:0; text-align:center; } -nav ul li -{ +nav ul li { display:inline; } -nav a -{ +nav a { -webkit-transition:.25s ease; border-bottom:.2rem solid transparent; color:#444; @@ -540,48 +467,40 @@ nav a transition:.25s ease; } -nav a:hover,nav li.selected a -{ +nav a:hover,nav li.selected a { border-color:rgba(0,0,0,0.2); } -nav a:active -{ +nav a:active { border-color:rgba(0,0,0,0.56); } -caption -{ +caption { padding:.8rem 0; } -thead th -{ +thead th { background:#efefef; color:#444; } -tr -{ +tr { background:#fff; margin-bottom:.8rem; } -th,td -{ +th,td { border:.1rem solid #ccc; padding:.8rem 1.6rem; text-align:center; vertical-align:inherit; } -tfoot tr -{ +tfoot tr { background:none; } -tfoot td -{ +tfoot td { color:#efefef; font-size:.8rem; font-style:italic; @@ -589,28 +508,24 @@ tfoot td } @media screen { - [hidden~=screen] - { + [hidden~=screen] { display:inherit; } - [hidden~=screen]:not(:active):not(:focus):not(:target) - { + [hidden~=screen]:not(:active):not(:focus):not(:target) { clip:rect(0000)!important; position:absolute!important; } } @media screen and max-width 40rem { - article,section,aside - { + article,section,aside { clear:both; display:block; max-width:100%; } - img - { + img { margin-right:1.6rem; } } \ No newline at end of file diff --git a/public/cssfilter.js b/public/cssfilter.js new file mode 100644 index 00000000..35d269d1 --- /dev/null +++ b/public/cssfilter.js @@ -0,0 +1,3 @@ +module.exports = function filter(filename) { + return ! String(filename).includes('min'); +} \ No newline at end of file diff --git a/public/cache/.gitkeep b/public/images/avatars/.gitkeep similarity index 100% rename from public/cache/.gitkeep rename to public/images/avatars/.gitkeep diff --git a/public/images/characters/.gitkeep b/public/images/characters/.gitkeep new file mode 100644 index 00000000..e69de29b diff --git a/public/js.php b/public/js.php index 36e0e206..8a9c2d22 100644 --- a/public/js.php +++ b/public/js.php @@ -22,29 +22,48 @@ use Aviat\Ion\Json; // Include guzzle require_once('../vendor/autoload.php'); -require_once('./min.php'); + +//Creative rewriting of /g/groupname to ?g=groupname +$pi = $_SERVER['PATH_INFO']; +$pia = explode('/', $pi); + +$piaLen = count($pia); +$i = 1; + +while($i < $piaLen) +{ + $j = $i+1; + $j = (isset($pia[$j])) ? $j : $i; + + $_GET[$pia[$i]] = $pia[$j]; + + $i = $j + 1; +}; + +class FileNotChangedException extends \Exception {} /** * Simple Javascript minfier, using google closure compiler */ -class JSMin extends BaseMin { +class JSMin { protected $jsRoot; protected $jsGroup; - protected $jsGroupsFile; + protected $configFile; protected $cacheFile; protected $lastModified; protected $requestedTime; protected $cacheModified; - public function __construct(array $config, array $groups) + public function __construct(array $config, string $configFile) { $group = $_GET['g']; + $groups = $config['groups']; $this->jsRoot = $config['js_root']; $this->jsGroup = $groups[$group]; - $this->jsGroupsFile = $config['js_groups_file']; + $this->configFile = $configFile; $this->cacheFile = "{$this->jsRoot}cache/{$group}"; $this->lastModified = $this->getLastModified(); @@ -99,7 +118,7 @@ class JSMin extends BaseMin { protected function closureCall(array $options) { $formFields = http_build_query($options); - + $request = (new Request) ->setMethod('POST') ->setUri('http://closure-compiler.appspot.com/compile') @@ -109,7 +128,7 @@ class JSMin extends BaseMin { 'Content-type' => 'application/x-www-form-urlencoded' ]) ->setBody($formFields); - + $response = wait((new Client)->request($request, [ Client::OP_AUTO_ENCODING => false ])); @@ -128,7 +147,7 @@ class JSMin extends BaseMin { $errorRes = $this->closureCall($options); $errorJson = $errorRes->getBody(); $errorObj = Json::decode($errorJson) ?: (object)[]; - + // Show error if exists if ( ! empty($errorObj->errors) || ! empty($errorObj->serverErrors)) @@ -178,7 +197,7 @@ class JSMin extends BaseMin { //Add this page too, as well as the groups file $modified[] = filemtime(__FILE__); - $modified[] = filemtime($this->jsGroupsFile); + $modified[] = filemtime($this->configFile); rsort($modified); $lastModified = $modified[0]; @@ -227,14 +246,97 @@ class JSMin extends BaseMin { { $this->sendFinalOutput($js, 'application/javascript', $this->lastModified); } + + /** + * Get value of the if-modified-since header + * + * @return int - timestamp to compare for cache control + */ + protected function getIfModified() + { + return (array_key_exists('HTTP_IF_MODIFIED_SINCE', $_SERVER)) + ? strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) + : time(); + } + + /** + * Get value of etag to compare to hash of output + * + * @return string - the etag to compare + */ + protected function getIfNoneMatch() + { + return (array_key_exists('HTTP_IF_NONE_MATCH', $_SERVER)) + ? $_SERVER['HTTP_IF_NONE_MATCH'] + : ''; + } + + /** + * Determine whether or not to send debug version + * + * @return boolean + */ + protected function isNotDebug() + { + return ! $this->isDebugCall(); + } + + /** + * Determine whether or not to send debug version + * + * @return boolean + */ + protected function isDebugCall() + { + return array_key_exists('debug', $_GET); + } + + /** + * Send actual output to browser + * + * @param string $content - the body of the response + * @param string $mimeType - the content type + * @param int $lastModified - the last modified date + * @return void + */ + protected function sendFinalOutput($content, $mimeType, $lastModified) + { + //This GZIPs the CSS for transmission to the user + //making file size smaller and transfer rate quicker + ob_start("ob_gzhandler"); + + $expires = $lastModified + 691200; + $lastModifiedDate = gmdate('D, d M Y H:i:s', $lastModified); + $expiresDate = gmdate('D, d M Y H:i:s', $expires); + + header("Content-Type: {$mimeType}; charset=utf8"); + header("Cache-control: public, max-age=691200, must-revalidate"); + header("Last-Modified: {$lastModifiedDate} GMT"); + header("Expires: {$expiresDate} GMT"); + + echo $content; + + ob_end_flush(); + } + + /** + * Send a 304 Not Modified header + * + * @return void + */ + public static function send304() + { + header("status: 304 Not Modified", true, 304); + } } // -------------------------------------------------------------------------- // ! Start Minifying // -------------------------------------------------------------------------- -$config = require_once('../app/appConf/minify_config.php'); -$groups = require_once($config['js_groups_file']); +$configFile = realpath(__DIR__ . '/../app/appConf/minify_config.php'); +$config = require_once($configFile); +$groups = $config['groups']; $cacheDir = "{$config['js_root']}cache"; if ( ! is_dir($cacheDir)) @@ -249,11 +351,11 @@ if ( ! array_key_exists($_GET['g'], $groups)) try { - new JSMin($config, $groups); + new JSMin($config, $configFile); } catch (FileNotChangedException $e) { - BaseMin::send304(); + JSMin::send304(); } //end of js.php \ No newline at end of file diff --git a/public/js/anime_edit.js b/public/js/anime_edit.js index 911cd4d3..d09c028b 100644 --- a/public/js/anime_edit.js +++ b/public/js/anime_edit.js @@ -8,7 +8,7 @@ // Action to increment episode count _.on('body.anime.list', 'click', '.plus_one', (e) => { let parentSel = _.closestParent(e.target, 'article'); - let watchedCount = parseInt(_.$('.completed_number', parentSel)[0].textContent, 10); + let watchedCount = parseInt(_.$('.completed_number', parentSel)[0].textContent, 10) || 0; let totalCount = parseInt(_.$('.total_number', parentSel)[0].textContent, 10); let title = _.$('.name a', parentSel)[0].textContent; diff --git a/public/js/manga_edit.js b/public/js/manga_edit.js index e010d681..85a488ab 100644 --- a/public/js/manga_edit.js +++ b/public/js/manga_edit.js @@ -9,7 +9,7 @@ let thisSel = e.target; let parentSel = _.closestParent(e.target, 'article'); let type = thisSel.classList.contains('plus_one_chapter') ? 'chapter' : 'volume'; - let completed = parseInt(_.$(`.${type}s_read`, parentSel)[0].textContent, 10); + let completed = parseInt(_.$(`.${type}s_read`, parentSel)[0].textContent, 10) || 0; let total = parseInt(_.$(`.${type}_count`, parentSel)[0].textContent, 10); let mangaName = _.$('.name', parentSel)[0].textContent; diff --git a/public/min.php b/public/min.php deleted file mode 100644 index 200443ff..00000000 --- a/public/min.php +++ /dev/null @@ -1,121 +0,0 @@ - - * @copyright 2015 - 2017 Timothy J. Warren - * @license http://www.opensource.org/licenses/mit-license.html MIT License - * @version 4.0 - * @link https://github.com/timw4mail/HummingBirdAnimeClient - */ - - -namespace Aviat\EasyMin; - -//Creative rewriting of /g/groupname to ?g=groupname -$pi = $_SERVER['PATH_INFO']; -$pia = explode('/', $pi); - -$piaLen = count($pia); -$i = 1; - -while($i < $piaLen) -{ - $j = $i+1; - $j = (isset($pia[$j])) ? $j : $i; - - $_GET[$pia[$i]] = $pia[$j]; - - $i = $j + 1; -}; - -class FileNotChangedException extends \Exception {} -class BaseMin { - - /** - * Get value of the if-modified-since header - * - * @return int - timestamp to compare for cache control - */ - protected function getIfModified() - { - return (array_key_exists('HTTP_IF_MODIFIED_SINCE', $_SERVER)) - ? strtotime($_SERVER['HTTP_IF_MODIFIED_SINCE']) - : time(); - } - - /** - * Get value of etag to compare to hash of output - * - * @return string - the etag to compare - */ - protected function getIfNoneMatch() - { - return (array_key_exists('HTTP_IF_NONE_MATCH', $_SERVER)) - ? $_SERVER['HTTP_IF_NONE_MATCH'] - : ''; - } - - /** - * Determine whether or not to send debug version - * - * @return boolean - */ - protected function isNotDebug() - { - return ! $this->isDebugCall(); - } - - /** - * Determine whether or not to send debug version - * - * @return boolean - */ - protected function isDebugCall() - { - return array_key_exists('debug', $_GET); - } - - /** - * Send actual output to browser - * - * @param string $content - the body of the response - * @param string $mimeType - the content type - * @param int $lastModified - the last modified date - * @return void - */ - protected function sendFinalOutput($content, $mimeType, $lastModified) - { - //This GZIPs the CSS for transmission to the user - //making file size smaller and transfer rate quicker - ob_start("ob_gzhandler"); - - $expires = $lastModified + 691200; - $lastModifiedDate = gmdate('D, d M Y H:i:s', $lastModified); - $expiresDate = gmdate('D, d M Y H:i:s', $expires); - - header("Content-Type: {$mimeType}; charset=utf8"); - header("Cache-control: public, max-age=691200, must-revalidate"); - header("Last-Modified: {$lastModifiedDate} GMT"); - header("Expires: {$expiresDate} GMT"); - - echo $content; - - ob_end_flush(); - } - - /** - * Send a 304 Not Modified header - * - * @return void - */ - public static function send304() - { - header("status: 304 Not Modified", true, 304); - } -} \ No newline at end of file diff --git a/public/package.json b/public/package.json index ded887c8..f642310a 100644 --- a/public/package.json +++ b/public/package.json @@ -1,14 +1,13 @@ { "scripts": { - "build": "postcss -u postcss-import --autoprefixer.browsers \"> 5%\" -u postcss-cssnext -o css/base.css css/base.myth.css", - "watch": "postcss -u postcss-import --autoprefixer.browsers \"> 5%\" -u postcss-cssnext -w -o css/base.css css/base.myth.css" + "build": "node ./css.js", + "watch": "watch 'npm run build' --filter=./cssfilter.js" }, "devDependencies": { - "autoprefixer": "^6.6.1", - "npm-run-all": "^4.0.0", + "cssnano": "^3.10.0", "postcss-cachify": "^1.3.1", - "postcss-cli": "^2.6.0", "postcss-cssnext": "^2.9.0", - "postcss-import": "^9.0.0" + "postcss-import": "^9.0.0", + "watch": "^1.0.2" } -} \ No newline at end of file +} diff --git a/public/templates/anime-ajax-search-results.html b/public/templates/anime-ajax-search-results.html index c5a64562..3e9f5682 100644 --- a/public/templates/anime-ajax-search-results.html +++ b/public/templates/anime-ajax-search-results.html @@ -1,8 +1,9 @@ {{#data}}
- img($item['manga']['image']); ?> + img($urlGenerator->assetUrl('images/manga', "{$item['manga']['id']}.jpg")); ?>