initial upload

This commit is contained in:
2026-04-20 22:55:59 +02:00
commit 56a8b97875
115 changed files with 43622 additions and 0 deletions
@@ -0,0 +1,11 @@
<?php
add_action( 'wp_enqueue_scripts', 'zeitfresser_sticky_menu_background_color' );
function zeitfresser_sticky_menu_background_color() {
$bg_color = get_theme_mod( 'background_color', get_theme_support( 'custom-background', 'default-color' ) );
$dynamic_css = "body,.site-header{background:#$bg_color;}";
wp_add_inline_style( 'zeitfresser', $dynamic_css );
}
@@ -0,0 +1,25 @@
<?php
add_action( 'customize_register', 'zeitfresser_dark_color' );
function zeitfresser_dark_color( $wp_customize ) {
$wp_customize->add_setting( 'dark_color', array(
'default' => zeitfresser_get_default_dark_color(),
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'dark_color', array(
'label' => esc_html__( 'Misc Colors', 'zeitfresser' ),
'section' => 'colors',
'settings' => 'dark_color',
) ) );
}
add_action( 'customize_preview_init', 'zeitfresser_dark_color_enqueue_scripts' );
function zeitfresser_dark_color_enqueue_scripts() {
wp_enqueue_script( 'graphthemes-dark-customizer', get_template_directory_uri() . '/inc/blocks/colors/color-dark/customizer-color-dark.js', array('jquery'), '', true );
}
@@ -0,0 +1,10 @@
jQuery( function( $ ) {
wp.customize('dark_color',function ( value ) {
value.bind(function ( to ) {
document.body.style.setProperty('--dark-color', to);
}
);
} );
} );
@@ -0,0 +1,25 @@
<?php
add_action( 'customize_register', 'zeitfresser_grey_color' );
function zeitfresser_grey_color( $wp_customize ) {
$wp_customize->add_setting( 'grey_color', array(
'default' => zeitfresser_get_default_grey_color(),
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'grey_color', array(
'label' => esc_html__( 'Soft Text Color', 'zeitfresser' ),
'section' => 'colors',
'settings' => 'grey_color',
) ) );
}
add_action( 'customize_preview_init', 'zeitfresser_grey_color_enqueue_scripts' );
function zeitfresser_grey_color_enqueue_scripts() {
wp_enqueue_script( 'graphthemes-grey-customizer', get_template_directory_uri() . '/inc/blocks/colors/color-grey/customizer-color-grey.js', array('jquery'), '', true );
}
@@ -0,0 +1,10 @@
jQuery( function( $ ) {
wp.customize('grey_color',function ( value ) {
value.bind(function ( to ) {
document.body.style.setProperty('--grey-color', to);
}
);
} );
} );
@@ -0,0 +1,25 @@
<?php
add_action( 'customize_register', 'zeitfresser_light_color' );
function zeitfresser_light_color( $wp_customize ) {
$wp_customize->add_setting( 'light_color', array(
'default' => zeitfresser_get_default_light_color(),
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'light_color', array(
'label' => esc_html__( 'Header Color', 'zeitfresser' ),
'section' => 'colors',
'settings' => 'light_color',
) ) );
}
add_action( 'customize_preview_init', 'zeitfresser_light_color_enqueue_scripts' );
function zeitfresser_light_color_enqueue_scripts() {
wp_enqueue_script( 'graphthemes-light-customizer', get_template_directory_uri() . '/inc/blocks/colors/color-light/customizer-color-light.js', array('jquery'), '', true );
}
@@ -0,0 +1,10 @@
jQuery( function( $ ) {
wp.customize('light_color',function ( value ) {
value.bind(function ( to ) {
document.body.style.setProperty('--light-color', to);
}
);
} );
} );
@@ -0,0 +1,25 @@
<?php
add_action( 'customize_register', 'zeitfresser_primary_color' );
function zeitfresser_primary_color( $wp_customize ) {
$wp_customize->add_setting( 'primary_color', array(
'default' => zeitfresser_get_default_primary_color(),
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'primary_color', array(
'label' => esc_html__( 'Menu / Title / Button Color', 'zeitfresser' ),
'section' => 'colors',
'settings' => 'primary_color',
) ) );
}
add_action( 'customize_preview_init', 'zeitfresser_primary_color_enqueue_scripts' );
function zeitfresser_primary_color_enqueue_scripts() {
wp_enqueue_script( 'graphthemes-primary-color-customizer', get_template_directory_uri() . '/inc/blocks/colors/color-primary/customizer-color-primary.js', array('jquery'), '', true );
}
@@ -0,0 +1,10 @@
jQuery( function( $ ) {
wp.customize('primary_color',function ( value ) {
value.bind(function ( to ) {
document.body.style.setProperty('--primary-color', to);
}
);
} );
} );
@@ -0,0 +1,25 @@
<?php
add_action( 'customize_register', 'zeitfresser_secondary_color' );
function zeitfresser_secondary_color( $wp_customize ) {
$wp_customize->add_setting( 'secondary_color', array(
'default' => zeitfresser_get_default_secondary_color(),
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color'
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'secondary_color', array(
'label' => esc_html__( 'Highlight Color', 'zeitfresser' ),
'section' => 'colors',
'settings' => 'secondary_color',
) ) );
}
add_action( 'customize_preview_init', 'zeitfresser_secondary_color_enqueue_scripts' );
function zeitfresser_secondary_color_enqueue_scripts() {
wp_enqueue_script( 'graphthemes-secondary-customizer', get_template_directory_uri() . '/inc/blocks/colors/color-secondary/customizer-color-secondary.js', array('jquery'), '', true );
}
@@ -0,0 +1,10 @@
jQuery( function( $ ) {
wp.customize('secondary_color',function ( value ) {
value.bind(function ( to ) {
document.body.style.setProperty('--secondary-color', to);
}
);
} );
} );
@@ -0,0 +1,25 @@
<?php
add_action( 'customize_register', 'zeitfresser_site_title_color' );
function zeitfresser_site_title_color( $wp_customize ) {
$wp_customize->add_setting( 'site_title_color_option', array(
'default' => zeitfresser_get_default_site_title_color(),
'transport' => 'postMessage',
'sanitize_callback' => 'sanitize_hex_color',
) );
$wp_customize->add_control( new WP_Customize_Color_Control( $wp_customize, 'site_title_color_option', array(
'label' => esc_html__( 'Site Identity Color', 'zeitfresser' ),
'section' => 'title_tagline',
'settings' => 'site_title_color_option',
) ) );
}
add_action( 'customize_preview_init', 'zeitfresser_site_title_color_enqueue_scripts' );
function zeitfresser_site_title_color_enqueue_scripts() {
wp_enqueue_script( 'graphthemes-site-title-color-customizer', get_template_directory_uri() . '/inc/blocks/colors/color-site-title/customizer-color-site-title.js', array(), '', true );
}
@@ -0,0 +1,9 @@
jQuery( function( $ ) {
wp.customize( 'site_title_color_option', function( value ) {
value.bind( function( to ) {
$( '.site-title a' ).css( 'color', to );
} );
} );
} );
+35
View File
@@ -0,0 +1,35 @@
<?php
add_action( 'after_setup_theme', function () {
add_theme_support( 'custom-header', array( 'header-text' => false ) );
} );
add_action('customize_register', 'zeitfresser_color_section');
function zeitfresser_color_section($wp_customize)
{
$wp_customize->get_section('colors')->title = esc_html__( "Color Options", 'zeitfresser' );
$wp_customize->get_section('colors')->priority = 21;
}
/* Add Default Colors for Customizer Settings */
require dirname( __FILE__ ) . '/default-colors.php';
if( db_fs()->is__premium_only() ) {
require dirname( __FILE__ ) . '/color-site-title/color-site-title.php';
require dirname( __FILE__ ) . '/color-primary/color-primary.php';
require dirname( __FILE__ ) . '/color-secondary/color-secondary.php';
require dirname( __FILE__ ) . '/color-light/color-light.php';
require dirname( __FILE__ ) . '/color-grey/color-grey.php';
require dirname( __FILE__ ) . '/color-dark/color-dark.php';
}
require dirname( __FILE__ ) . '/color-background/color-background.php';
require dirname( __FILE__ ) . '/dynamic-colors.php';
+37
View File
@@ -0,0 +1,37 @@
<?php
/* Default Site Title Color */
function zeitfresser_get_default_site_title_color() {
return "#f7f7fa";
}
/* Default Primary Color */
function zeitfresser_get_default_primary_color() {
return "#f7f7fa";
}
/* Default Secondary Color */
function zeitfresser_get_default_secondary_color() {
return "#f7f7fa";
}
/* Default Light Color */
function zeitfresser_get_default_light_color() {
return "#1e1f29";
}
/* Default Grey Color */
function zeitfresser_get_default_grey_color() {
return "#f7f7fa";
}
/* Default Dark Color */
function zeitfresser_get_default_dark_color() {
return "#f7f7fa";
}
/* Default Background Color */
function zeitfresser_get_default_background_color() {
return "1e1f29";
}
+62
View File
@@ -0,0 +1,62 @@
<?php
add_action( 'wp_enqueue_scripts', 'zeitfresser_site_title_color_dynamic_css' );
function zeitfresser_site_title_color_dynamic_css() {
$site_title_color = esc_attr( get_theme_mod( 'site_title_color_option', zeitfresser_get_default_site_title_color() ) );
$dynamic_css = ":root { --site-title-color: $site_title_color; }";
wp_add_inline_style( 'zeitfresser', $dynamic_css );
}
add_action( 'wp_enqueue_scripts', 'zeitfresser_secondary_color_dynamic_css' );
function zeitfresser_secondary_color_dynamic_css() {
$secondary_color = esc_attr( get_theme_mod( 'secondary_color', zeitfresser_get_default_secondary_color() ) );
$dynamic_css = ":root { --secondary-color: $secondary_color; }";
wp_add_inline_style( 'zeitfresser', $dynamic_css );
}
add_action( 'wp_enqueue_scripts', 'zeitfresser_primary_color_dynamic_css' );
function zeitfresser_primary_color_dynamic_css() {
$primary_color = esc_attr( get_theme_mod( 'primary_color', zeitfresser_get_default_primary_color() ) );
$dynamic_css = ":root { --primary-color: $primary_color; }";
wp_add_inline_style( 'zeitfresser', $dynamic_css );
}
add_action( 'wp_enqueue_scripts', 'zeitfresser_light_color_dynamic_css' );
function zeitfresser_light_color_dynamic_css() {
$light_color = esc_attr( get_theme_mod( 'light_color', zeitfresser_get_default_light_color() ) );
$dynamic_css = ":root { --light-color: $light_color; }";
wp_add_inline_style( 'zeitfresser', $dynamic_css );
}
add_action( 'wp_enqueue_scripts', 'zeitfresser_grey_color_dynamic_css' );
function zeitfresser_grey_color_dynamic_css() {
$grey_color = esc_attr( get_theme_mod( 'grey_color', zeitfresser_get_default_grey_color() ) );
$dynamic_css = ":root { --grey-color: $grey_color; }";
wp_add_inline_style( 'zeitfresser', $dynamic_css );
}
add_action( 'wp_enqueue_scripts', 'zeitfresser_dark_color_dynamic_css' );
function zeitfresser_dark_color_dynamic_css() {
$dark_color = esc_attr( get_theme_mod( 'dark_color', zeitfresser_get_default_dark_color() ) );
$dynamic_css = ":root { --dark-color: $dark_color; }";
wp_add_inline_style( 'zeitfresser', $dynamic_css );
}