Skip to content

Instantly share code, notes, and snippets.

@megane9988
Last active May 11, 2024 16:18
Show Gist options
  • Save megane9988/b074e2e45e79bbda2cd5c2e05ea6380e to your computer and use it in GitHub Desktop.
Save megane9988/b074e2e45e79bbda2cd5c2e05ea6380e to your computer and use it in GitHub Desktop.
mytheme.json
<?php
/**
* Megane functions and definitions
*
* @package megane
*/
/**
* スクリプトとスタイルの読み込み
*/
function megane_loading_script_and_css() {
// スタイルの読み込み.
wp_enqueue_style( 'megane-style', get_theme_file_uri() . '/assets/css/style.min.css', array(), '1.0' );
// フッター付近にcommon scriptを読み込み.
wp_enqueue_script( 'megane-common', get_theme_file_uri() . '/assets/js/common.min.js', array(), '1.0', true );
// ヘッダー付近にAdobe Fonts.
wp_enqueue_script( 'adobefonts', get_theme_file_uri() . '/assets/js/adobefonts.js', array(), '1.0', false );
}
add_action( 'enqueue_block_assets', 'megane_loading_script_and_css' );
{
"settings": {
"appearanceTools": true,
"color": {
"defaultDuotone": false,
"defaultGradients": false,
"defaultPalette": false,
"palette": [
{
"color": "#222",
"name": "Brack",
"slug": "brack"
}
]
},
"custom": [],
"layout": {
"contentSize": "800px",
"wideSize": "1200px"
},
"spacing": {
"spacingScale": {
"steps": 0
},
"spacingSizes": [
{
"name": "1",
"size": "1rem",
"slug": "10"
},
{
"name": "2",
"size": "min(1.5rem, 2vw)",
"slug": "20"
},
{
"name": "3",
"size": "min(2.5rem, 3vw)",
"slug": "30"
},
{
"name": "4",
"size": "min(4rem, 5vw)",
"slug": "40"
},
{
"name": "5",
"size": "min(6.5rem, 8vw)",
"slug": "50"
},
{
"name": "6",
"size": "min(10.5rem, 13vw)",
"slug": "60"
}
],
"units": [
"%",
"px",
"em",
"rem",
"vh",
"vw"
]
},
"typography": {
"fluid": {
"maxViewportWidth": "1000px",
"minViewportWidth": "320px"
},
"fontFamilies": [
{
"fontFamily": "-apple-system, BlinkMacSystemFont, avenir next, avenir, segoe ui, helvetica neue, helvetica, Cantarell, Ubuntu, roboto, noto, arial, sans-serif",
"name": "System Sans-serif",
"slug": "system-sans-serif"
},
{
"fontFamily": "toppan-bunkyu-gothic-pr6n, serif",
"name": "凸版文久ゴシック Pr6N R",
"slug": "toppan"
}
],
"fontSizes": [
{
"fluid": {
"max": "2.25rem",
"min": "1.5rem"
},
"name": "H1",
"size": "1.5rem",
"slug": "h-1"
},
{
"fluid": {
"max": "2rem",
"min": "1.5rem"
},
"name": "H2",
"size": "1.5rem",
"slug": "h-2"
},
{
"fluid": {
"max": "1.75rem",
"min": "1.375rem"
},
"name": "H3",
"size": "1.375rem",
"slug": "h-3"
},
{
"fluid": {
"max": "1.5rem",
"min": "1.25rem"
},
"name": "H4",
"size": "1.25rem",
"slug": "h-4"
},
{
"fluid": {
"max": "1.25rem",
"min": "1.125rem"
},
"name": "H5",
"size": "1.125rem",
"slug": "h-5"
},
{
"fluid": {
"max": "1.25rem",
"min": "1.125rem"
},
"name": "H6",
"size": "1.125rem",
"slug": "h-6"
},
{
"fluid": {
"max": "1rem",
"min": "0.875rem"
},
"name": "text",
"size": "0.875rem",
"slug": "text"
},
{
"fluid": false,
"name": "caption",
"size": "0.875rem",
"slug": "caption"
}
]
},
"useRootPaddingAwareAlignments": true
},
"styles": {
"color": {
"background": "#f7f7f7"
},
"elements": {
"caption": {
"typography": {
"fontSize": "var(--wp--preset--font-size-caption)"
}
},
"h1": {
"typography": {
"fontSize": "var(--wp--preset--font-size--h-1)"
}
},
"h2": {
"typography": {
"fontSize": "var(--wp--preset--font-size--h-2)"
}
},
"h3": {
"typography": {
"fontSize": "var(--wp--preset--font-size--h-3)"
}
},
"h4": {
"typography": {
"fontSize": "var(--wp--preset--font-size--h-4)"
}
},
"h5": {
"typography": {
"fontSize": "var(--wp--preset--font-size--h-5)"
}
},
"h6": {
"typography": {
"fontSize": "var(--wp--preset--font-size--h-6)"
}
},
"link": {
":hover": {
"color": {
"text": "#000000"
}
},
"color": {
"text": "#212e70"
}
}
},
"spacing": {
"blockGap": "1.2rem",
"padding": {
"left": "var(--wp--preset--spacing--40)",
"right": "var(--wp--preset--spacing--40)"
}
},
"typography": {
"fontFamily": "var(--wp--preset--font-family--toppan)",
"fontSize": "var(--wp--preset--font-size--text)",
"lineHeight": "var(--wp--custom--typography--line-height--normal)"
}
},
"title": "megane",
"version": 2,
"$schema": "https://schemas.wp.org/wp/6.5/theme.json"
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment