made oldblog look more like the new website

This commit is contained in:
flash 2020-11-17 21:58:45 +00:00
parent 0abe7488ca
commit 2e6a946bc9
5 changed files with 75 additions and 0 deletions

View file

@ -32,6 +32,14 @@ if(!empty($post)) {
$title = $post->post_title; $title = $post->post_title;
} else http_response_code(404); } else http_response_code(404);
if($blogMode) {
fm_component('header', [
'title' => $title,
'styles' => [
'/css/2020.css'
],
]);
} else {
echo html_doctype(); echo html_doctype();
?> ?>
<html lang="en"> <html lang="en">
@ -42,6 +50,7 @@ echo html_doctype();
<?=html_meta();?> <?=html_meta();?>
</head> </head>
<body> <body>
<?php } ?>
<div class="wrapper"> <div class="wrapper">
<?php if(!$blogMode) echo html_sidebar(); ?> <?php if(!$blogMode) echo html_sidebar(); ?>
<?php if(empty($post)) { ?> <?php if(empty($post)) { ?>
@ -66,8 +75,10 @@ echo html_doctype();
</div> </div>
<?php } ?> <?php } ?>
</div> </div>
<?php if($blogMode): fm_component('footer'); else: ?>
<?php if(html_old_ie()) { ?> <?php if(html_old_ie()) { ?>
<?=html_script('/assets/fixpng.js');?> <?=html_script('/assets/fixpng.js');?>
<?php } ?> <?php } ?>
</body> </body>
</html> </html>
<?php endif; ?>

View file

@ -25,6 +25,14 @@ if(isset($_GET['blog_dump'])) {
return; return;
} }
if($blogMode) {
fm_component('header', [
'title' => 'flash.moe blog',
'styles' => [
'/css/2020.css'
],
]);
} else {
echo html_doctype(); echo html_doctype();
?> ?>
<html lang="en"> <html lang="en">
@ -40,6 +48,7 @@ echo html_doctype();
<?php endif; ?> <?php endif; ?>
</head> </head>
<body> <body>
<?php } ?>
<?php if($blogMode): ?> <?php if($blogMode): ?>
<div style="max-width: 1000px; margin: 0 auto; font-size: 20px; line-height: 1.7em;"> <div style="max-width: 1000px; margin: 0 auto; font-size: 20px; line-height: 1.7em;">
<div style="margin: 5px; background-color: #222; border-radius: 5px; padding: 2px 5px;">New blog script is still work in progress, enjoy the old version!</div> <div style="margin: 5px; background-color: #222; border-radius: 5px; padding: 2px 5px;">New blog script is still work in progress, enjoy the old version!</div>
@ -77,6 +86,7 @@ HTML;
?> ?>
</div> </div>
<?php endif; ?> <?php endif; ?>
<?php if($blogMode): fm_component('footer'); else: ?>
</div> </div>
<?=html_script('/assets/lastfm2020.js');?> <?=html_script('/assets/lastfm2020.js');?>
<?php <?php
@ -93,3 +103,4 @@ if(!$requireSafe) {
?> ?>
</body> </body>
</html> </html>
<?php endif; ?>

49
public/_v4/compat.php Normal file
View file

@ -0,0 +1,49 @@
<?php
define('FM_NAV', [
['title' => 'Home', 'link' => '/'],
//['title' => 'Blog', 'link' => '//blog.flash.moe'],
['title' => 'Blog', 'link' => '//flash.moe/2020/?blog=1'],
['title' => 'Projects', 'link' => '/projects'],
['title' => 'Contact', 'link' => '/contact'],
['title' => 'Related', 'link' => '/related'],
['title' => 'Etcetera', 'link' => '/etc'],
['title' => 'Forum', 'link' => '//forum.flash.moe'],
]);
define('FM_BGS', [
'/assets/headers/krk-000.jpg', '/assets/headers/krk-001.jpg', '/assets/headers/krk-002.jpg',
'/assets/headers/krk-003.jpg', '/assets/headers/krk-004.jpg', '/assets/headers/krk-005.jpg',
'/assets/headers/krk-006.jpg', '/assets/headers/krk-007.jpg', '/assets/headers/krk-008.jpg',
'/assets/headers/mkt-000.jpg', '/assets/headers/mkt-001.jpg', '/assets/headers/mkt-002.jpg',
'/assets/headers/mkt-003.jpg', '/assets/headers/mkt-004.jpg', '/assets/headers/mkt-005.jpg',
'/assets/headers/mkt-006.jpg', '/assets/headers/mkt-007.jpg', '/assets/headers/mkt-008.jpg',
'/assets/headers/mkt-009.jpg', '/assets/headers/mkt-010.jpg', '/assets/headers/mkt-011.jpg',
'/assets/headers/mkt-012.jpg', '/assets/headers/mkt-013.jpg', '/assets/headers/mkt-014.jpg',
'/assets/headers/mkt-015.jpg', '/assets/headers/mkt-016.jpg', '/assets/headers/mkt-017.jpg',
'/assets/headers/mkt-018.jpg', '/assets/headers/mkt-019.jpg', '/assets/headers/mkt-020.jpg',
'/assets/headers/mkt-021.jpg', '/assets/headers/mkt-022.jpg', '/assets/headers/mkt-023.jpg',
'/assets/headers/mkt-024.jpg', '/assets/headers/mkt-025.jpg', '/assets/headers/mkt-026.jpg',
'/assets/headers/mkt-027.jpg', '/assets/headers/mkt-028.jpg', '/assets/headers/mkt-029.jpg',
'/assets/headers/mkt-030.jpg', '/assets/headers/mkt-031.jpg', '/assets/headers/mkt-032.jpg',
'/assets/headers/mkt-033.jpg', '/assets/headers/mkt-034.jpg', '/assets/headers/mkt-035.jpg',
'/assets/headers/mkt-036.jpg', '/assets/headers/mkt-037.jpg', '/assets/headers/mkt-038.jpg',
'/assets/headers/mkt-039.jpg', '/assets/headers/mkt-040.jpg', '/assets/headers/mkt-041.jpg',
'/assets/headers/mkt-042.jpg', '/assets/headers/mkt-043.jpg', '/assets/headers/mkt-044.jpg',
'/assets/headers/mkt-045.jpg', '/assets/headers/mkt-046.jpg', '/assets/headers/mkt-047.jpg',
'/assets/headers/mkt-048.jpg', '/assets/headers/mkt-049.jpg', '/assets/headers/mkt-050.jpg',
'/assets/headers/mkt-051.jpg', '/assets/headers/mkt-052.jpg', '/assets/headers/mkt-053.jpg',
'/assets/headers/mkt-054.jpg', '/assets/headers/mkt-055.jpg', '/assets/headers/mkt-056.jpg',
'/assets/headers/mkt-057.jpg', '/assets/headers/mkt-058.jpg', '/assets/headers/mkt-059.jpg',
'/assets/headers/mkt-060.jpg', '/assets/headers/mkt-061.jpg', '/assets/headers/mkt-062.jpg',
'/assets/headers/mkt-063.jpg',
]);
define('FM_FEET', [
'if it ain\'t broke, i\'ll break it',
]);
function fm_component(string $_component_name, array $vars = []) {
extract($vars);
require __DIR__ . '/../../components/' . $_component_name . '.php';
}

View file

@ -12,6 +12,7 @@ date_default_timezone_set('UTC');
mb_internal_encoding('UTF-8'); mb_internal_encoding('UTF-8');
set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__); set_include_path(get_include_path() . PATH_SEPARATOR . __DIR__);
require_once 'compat.php';
require_once 'html.php'; require_once 'html.php';
try { try {

View file

@ -233,6 +233,9 @@ p {
.blog { .blog {
margin: 10px; margin: 10px;
} }
.blog * {
user-select: text;
}
.blog h1 a { .blog h1 a {
color: #fff; color: #fff;
text-decoration: none; text-decoration: none;