Skapade stöd för default logo och bakgrund

This commit is contained in:
2026-04-12 14:10:50 +02:00
parent dfffc61285
commit 3088197123
4 changed files with 25 additions and 8 deletions

BIN
assets/images/logo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

View File

@@ -7,3 +7,15 @@ add_action('wp_enqueue_scripts', function() {
filemtime(get_theme_file_path('theme.css'))
);
});
add_action('after_setup_theme', function () {
add_theme_support('custom-logo', [
'height' => 250,
'width' => 250,
'flex-width' => true,
'flex-height' => true,
]);
set_theme_mod('custom_logo', attachment_url_to_postid(
get_theme_file_uri('assets/images/logo.png')
));
});

View File

@@ -3,7 +3,11 @@
"version": 3,
"settings": {
"appearanceTools": true,
"appearanceTools": true,
"custom": {
"defaultLogo": "assets/images/logo.png",
"transition": "all 0.3s ease"
},
"color": {
"palette": [
{ "slug": "background-primary", "name": "Background Primary", "color": "#0E0F12" },
@@ -102,19 +106,20 @@
"shadow": "0 0 12px rgba(0,0,0,0.6)"
}
]
},
"custom": {
"transition": "all 0.3s ease"
}
},
"styles": {
"css": "body { \
background-image: url('/wp-content/themes/wp-theme-crille2026/assets/images/background.webp'); \
background-size: cover; \
background-position: center; \
background-repeat: no-repeat; \
background-attachment: fixed; \
}",
"color": {
"background": "var(--wp--preset--color--background-primary)",
"background": "transparent",
"text": "var(--wp--preset--color--text-primary)"
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--inter)",
"fontSize": "var(--wp--preset--font-size--normal)"