Some improvements, bugfixes, and updates

This commit is contained in:
Lewis Dale 2023-01-18 08:27:39 +00:00
parent bf20024ff9
commit d8af8feb43
8 changed files with 59 additions and 26 deletions

View File

@ -203,9 +203,17 @@
font-size: var(--text-size-base);
position: fixed;
max-width: calc(var(--wrapper-width, var(--screen-lg)) - (2 * var(--space-size-0)));
top: 92%;
bottom: 2%;
color: white;
text-align: left;
text-shadow: -2px -2px 0 #000,
0 -2px 0 #000,
2px -2px 0 #000,
2px 0 0 #000,
2px 2px 0 #000,
0 2px 0 #000,
-2px 2px 0 #000,
-2px 0 0 #000;
padding: 0 var(--space-size-0);
background-image: linear-gradient(135deg, transparent 30%, red 30%, red 40%, yellow 40%, yellow 50%, #44ff00 50%, #44ff00 60%, #00fff7 60%, #00fff7 70%, transparent 70%);
background-size: 10rem 100%;
@ -223,8 +231,12 @@
padding-right: var(--space-size-0);
}
.blogpost:not(:has(#mono:checked)) .e-content {
font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
.blogpost .e-content {
font-family: var(--font-family-mono-base);
}
.blogpost:has(#mono:checked) .e-content {
font-family: var(--font-family-mono);
}
.post-title a:not(:hover) {
@ -584,4 +596,8 @@ pre .comment {
.filter {
filter: var(--tw-blur) var(--tw-brightness) var(--tw-contrast) var(--tw-grayscale) var(--tw-hue-rotate) var(--tw-invert) var(--tw-saturate) var(--tw-sepia) var(--tw-drop-shadow);
}
.w-content {
width: fit-content;
}

View File

@ -4,9 +4,10 @@ add_theme_support( 'title-tag' );
function zxs_add_themes() {
wp_enqueue_style('zxs_globals', get_stylesheet_directory_uri() . "/style.css", array(), wp_get_theme()->get( 'Version' ), 'all');
wp_enqueue_style('zxs_cubeCSS', get_stylesheet_directory_uri() . "/assets/css/cube.css", array(), wp_get_theme()->get( 'Version' ), 'all');
wp_enqueue_style('zxs_cube', get_stylesheet_directory_uri() . "/assets/css/cube.css", array(), wp_get_theme()->get( 'Version' ), 'all');
}
add_action('wp_enqueue_scripts', 'zxs_add_themes');
function zxs_add_class( $classes ) {
@ -25,10 +26,10 @@ add_action('after_setup_theme', function() {
// remove SVG and global styles
remove_action('wp_enqueue_scripts', 'wp_enqueue_global_styles');
// remove wp_footer actions which add's global inline styles
// remove wp_footer actions which adds global inline styles
remove_action('wp_footer', 'wp_enqueue_global_styles', 1);
// remove render_block filters which adding unnecessary stuff
// remove render_block filters which add unnecessary stuff
remove_filter('render_block', 'wp_render_duotone_support');
remove_filter('render_block', 'wp_restore_group_inner_container');
remove_filter('render_block', 'wp_render_layout_support_flag');
@ -40,7 +41,20 @@ add_action('after_setup_theme', function() {
wp_dequeue_style( 'wp-block-library' );
wp_dequeue_style( 'wp-block-library-theme' );
wp_dequeue_style( 'wc-blocks-style' ); // Remove WooCommerce block CSS
// wp_dequeue_style( 'classic-theme-styles' );
wp_dequeue_style( 'hcb-style' );
wp_dequeue_style( 'hcb-style-inline' );
wp_dequeue_style( 'hcb-coloring' );
wp_dequeue_style( 'semantic-linkbacks' );
}
add_action( 'wp_enqueue_scripts', 'zxs_remove_block_library_css', 100 );
function zxs_register_menus() {
register_nav_menus(
array(
'home' => __( 'Home Menu' ),
)
);
}
add_action( 'init', 'zxs_register_menus' );

View File

@ -1,5 +1,5 @@
<!DOCTYPE html>
<html>
<html lang="en">
<head>
<?php wp_head(); ?>
<link type="application/rss+xml" rel="alternate" href="<?php bloginfo('rss2_url'); ?>" title="Lewis Dale's Blog" />

View File

@ -6,11 +6,8 @@ if ( is_front_page() ) {
get_template_part( 'parts/home' );
} else if ( is_home() ) {
get_template_part( 'parts/blog' );
} else if ( false ) {
// This is a bad idea
echo 'Microblog';
} else {
get_template_part( 'parts/page' );
}
?>
<?php
get_footer();
?>

View File

@ -3,11 +3,11 @@
<h1>LewisDale.dev</h1>
<nav class="basic-select w-full">
<ul>
<li><a href="/">Home</a></li>
<li><a href="/blog">Blog</a></li>
<li><a href="/micro">Microblog</a></li>
</ul>
<?php wp_nav_menu(
array(
'zx_spectrum' => 'home',
)
); ?>
</nav>
<footer class="pt-size-2">

10
parts/page.php Normal file
View File

@ -0,0 +1,10 @@
<main class="bg-white max-w-screen max-h-[90vh] max-h-[90dvh] overflow-y-scroll">
<div class="blogpost wrapper-lg flow mx-auto h-entry py-size-0">
<a class="" href="/">Home</a>
<h1 class="headerbar"><?= the_title() ?></h1>
<div class="flow-1l">
<?= the_content() ?>
</div>
</div>
</main>

View File

@ -2,13 +2,7 @@
<main class="bg-white max-w-screen max-h-[90vh] max-h-[90dvh] overflow-y-scroll">
<article class="blogpost wrapper-lg flow mx-auto h-entry py-size-0">
<a class="" href="/blog">Back to blog</a>
<div class="row w-content">
<input type="checkbox" id="mono" />
<label for="mono">
Use ZX Spectrum font
</label>
</div>
<h1 class="headerbar"><?= the_title() ?></h1>
<h1 class="headerbar p-name"><?= the_title() ?></h1>
<div class="flow-1l">
<?= the_content() ?>

View File

@ -292,8 +292,9 @@ Tags: one-column, accessibility-ready, custom-colors, custom-menu, custom-logo,
BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans",
sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol",
"Noto Color Emoji";
--font-family-mono: "Zx Spectrum", ui-monospace, SFMono-Regular, Menlo, Monaco,
--font-family-mono-base: ui-monospace, SFMono-Regular, Menlo, Monaco,
Consolas, "Liberation Mono", "Courier New", monospace;
--font-family-mono: "ZX Spectrum", var(--font-family-mono-base);
--font-family-spooky: "Creepy Pumkin", ui-monospace, SFMono-Regular, Menlo,
Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--font-family-christmas: "Christmas", ui-sans-serif, system-ui, -apple-system,
@ -558,4 +559,5 @@ input, textarea {
color: var(--color-secondary);
padding: 2px 10px;
border-radius: 5px;
font-family: var(--font-family-mono-base);
}