diff --git a/app/javascript/styles/mastodon-material-dark/theme/_mixins.scss b/app/javascript/styles/mastodon-material-dark/theme/_mixins.scss index d506b8148..bdfef2e2f 100644 --- a/app/javascript/styles/mastodon-material-dark/theme/_mixins.scss +++ b/app/javascript/styles/mastodon-material-dark/theme/_mixins.scss @@ -61,6 +61,13 @@ $shadow-color-3: rgba(0,0,0,.12); } } +// check background-image value +@mixin bg-image { + @if $bg-image == none { + } @else { background-image: url($bg-image) } +} + + @mixin icon-font-style { @if $icon-font-style == filled { font-family: "Material Icons" } @if $icon-font-style == outlined { font-family: "Material Icons Outlined" } @@ -151,35 +158,35 @@ $shadow-color-3: rgba(0,0,0,.12); @font-face { font-family: "Material Icons"; src: local("Material Icons"), - url("../fonts/MaterialIcons-Regular.ttf") format('truetype'); + url(".../fonts/MaterialIcons-Regular.ttf") format('truetype'); } } @if $icon-font-style == outlined { @font-face { font-family: "Material Icons Outlined"; src: local("Material Icons Outlined"), - url("../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); } } @if $icon-font-style == round { @font-face { font-family: "Material Icons Round"; src: local("Material Icons"), - url("../fonts/MaterialIconsRound-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsRound-Regular.otf") format('opentype'); } } @if $icon-font-style == sharp { @font-face { font-family: "Material Icons Sharp"; src: local("Material Icons Sharp"), - url("../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); } } @if $icon-font-style == two-tone { @font-face { font-family: "Material Icons Two Tone"; src: local("Material Icons Two Tone"), - url("../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); } } } diff --git a/app/javascript/styles/mastodon-material-dark/theme/base_config.scss b/app/javascript/styles/mastodon-material-dark/theme/base_config.scss index 13fb4ad75..f36a139ba 100644 --- a/app/javascript/styles/mastodon-material-dark/theme/base_config.scss +++ b/app/javascript/styles/mastodon-material-dark/theme/base_config.scss @@ -1,7 +1,7 @@ @charset "UTF-8"; -// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../config.scss". +// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../custom_config.scss". // Color scheme @@ -32,7 +32,7 @@ $name-font-size: 15px; // mastodon default // Background image -// If you want to use the local image, please put it in /mastodon-material +// If you want to use the local image, please put it in "../" $bg-image: none; //$bg-image: "./image.png"; //$bg-image: "https://example.com/img/image.png"; diff --git a/app/javascript/styles/mastodon-material-dark/theme/columns.scss b/app/javascript/styles/mastodon-material-dark/theme/columns.scss index af7776a0c..3f57ea958 100644 --- a/app/javascript/styles/mastodon-material-dark/theme/columns.scss +++ b/app/javascript/styles/mastodon-material-dark/theme/columns.scss @@ -202,7 +202,7 @@ } .columns-area { - background-image: url($bg-image); + @include bg-image; background-size: contain; } diff --git a/app/javascript/styles/mastodon-material-light/theme/_mixins.scss b/app/javascript/styles/mastodon-material-light/theme/_mixins.scss index d506b8148..bdfef2e2f 100644 --- a/app/javascript/styles/mastodon-material-light/theme/_mixins.scss +++ b/app/javascript/styles/mastodon-material-light/theme/_mixins.scss @@ -61,6 +61,13 @@ $shadow-color-3: rgba(0,0,0,.12); } } +// check background-image value +@mixin bg-image { + @if $bg-image == none { + } @else { background-image: url($bg-image) } +} + + @mixin icon-font-style { @if $icon-font-style == filled { font-family: "Material Icons" } @if $icon-font-style == outlined { font-family: "Material Icons Outlined" } @@ -151,35 +158,35 @@ $shadow-color-3: rgba(0,0,0,.12); @font-face { font-family: "Material Icons"; src: local("Material Icons"), - url("../fonts/MaterialIcons-Regular.ttf") format('truetype'); + url(".../fonts/MaterialIcons-Regular.ttf") format('truetype'); } } @if $icon-font-style == outlined { @font-face { font-family: "Material Icons Outlined"; src: local("Material Icons Outlined"), - url("../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); } } @if $icon-font-style == round { @font-face { font-family: "Material Icons Round"; src: local("Material Icons"), - url("../fonts/MaterialIconsRound-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsRound-Regular.otf") format('opentype'); } } @if $icon-font-style == sharp { @font-face { font-family: "Material Icons Sharp"; src: local("Material Icons Sharp"), - url("../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); } } @if $icon-font-style == two-tone { @font-face { font-family: "Material Icons Two Tone"; src: local("Material Icons Two Tone"), - url("../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); } } } diff --git a/app/javascript/styles/mastodon-material-light/theme/base_config.scss b/app/javascript/styles/mastodon-material-light/theme/base_config.scss index 13fb4ad75..f36a139ba 100644 --- a/app/javascript/styles/mastodon-material-light/theme/base_config.scss +++ b/app/javascript/styles/mastodon-material-light/theme/base_config.scss @@ -1,7 +1,7 @@ @charset "UTF-8"; -// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../config.scss". +// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../custom_config.scss". // Color scheme @@ -32,7 +32,7 @@ $name-font-size: 15px; // mastodon default // Background image -// If you want to use the local image, please put it in /mastodon-material +// If you want to use the local image, please put it in "../" $bg-image: none; //$bg-image: "./image.png"; //$bg-image: "https://example.com/img/image.png"; diff --git a/app/javascript/styles/mastodon-material-light/theme/columns.scss b/app/javascript/styles/mastodon-material-light/theme/columns.scss index af7776a0c..3f57ea958 100644 --- a/app/javascript/styles/mastodon-material-light/theme/columns.scss +++ b/app/javascript/styles/mastodon-material-light/theme/columns.scss @@ -202,7 +202,7 @@ } .columns-area { - background-image: url($bg-image); + @include bg-image; background-size: contain; } diff --git a/app/javascript/styles/material-black/theme/_mixins.scss b/app/javascript/styles/material-black/theme/_mixins.scss index d506b8148..bdfef2e2f 100644 --- a/app/javascript/styles/material-black/theme/_mixins.scss +++ b/app/javascript/styles/material-black/theme/_mixins.scss @@ -61,6 +61,13 @@ $shadow-color-3: rgba(0,0,0,.12); } } +// check background-image value +@mixin bg-image { + @if $bg-image == none { + } @else { background-image: url($bg-image) } +} + + @mixin icon-font-style { @if $icon-font-style == filled { font-family: "Material Icons" } @if $icon-font-style == outlined { font-family: "Material Icons Outlined" } @@ -151,35 +158,35 @@ $shadow-color-3: rgba(0,0,0,.12); @font-face { font-family: "Material Icons"; src: local("Material Icons"), - url("../fonts/MaterialIcons-Regular.ttf") format('truetype'); + url(".../fonts/MaterialIcons-Regular.ttf") format('truetype'); } } @if $icon-font-style == outlined { @font-face { font-family: "Material Icons Outlined"; src: local("Material Icons Outlined"), - url("../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); } } @if $icon-font-style == round { @font-face { font-family: "Material Icons Round"; src: local("Material Icons"), - url("../fonts/MaterialIconsRound-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsRound-Regular.otf") format('opentype'); } } @if $icon-font-style == sharp { @font-face { font-family: "Material Icons Sharp"; src: local("Material Icons Sharp"), - url("../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); } } @if $icon-font-style == two-tone { @font-face { font-family: "Material Icons Two Tone"; src: local("Material Icons Two Tone"), - url("../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); } } } diff --git a/app/javascript/styles/material-black/theme/base_config.scss b/app/javascript/styles/material-black/theme/base_config.scss index 13fb4ad75..f36a139ba 100644 --- a/app/javascript/styles/material-black/theme/base_config.scss +++ b/app/javascript/styles/material-black/theme/base_config.scss @@ -1,7 +1,7 @@ @charset "UTF-8"; -// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../config.scss". +// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../custom_config.scss". // Color scheme @@ -32,7 +32,7 @@ $name-font-size: 15px; // mastodon default // Background image -// If you want to use the local image, please put it in /mastodon-material +// If you want to use the local image, please put it in "../" $bg-image: none; //$bg-image: "./image.png"; //$bg-image: "https://example.com/img/image.png"; diff --git a/app/javascript/styles/material-black/theme/columns.scss b/app/javascript/styles/material-black/theme/columns.scss index af7776a0c..3f57ea958 100644 --- a/app/javascript/styles/material-black/theme/columns.scss +++ b/app/javascript/styles/material-black/theme/columns.scss @@ -202,7 +202,7 @@ } .columns-area { - background-image: url($bg-image); + @include bg-image; background-size: contain; } diff --git a/app/javascript/styles/material-dark/theme/_mixins.scss b/app/javascript/styles/material-dark/theme/_mixins.scss index d506b8148..bdfef2e2f 100644 --- a/app/javascript/styles/material-dark/theme/_mixins.scss +++ b/app/javascript/styles/material-dark/theme/_mixins.scss @@ -61,6 +61,13 @@ $shadow-color-3: rgba(0,0,0,.12); } } +// check background-image value +@mixin bg-image { + @if $bg-image == none { + } @else { background-image: url($bg-image) } +} + + @mixin icon-font-style { @if $icon-font-style == filled { font-family: "Material Icons" } @if $icon-font-style == outlined { font-family: "Material Icons Outlined" } @@ -151,35 +158,35 @@ $shadow-color-3: rgba(0,0,0,.12); @font-face { font-family: "Material Icons"; src: local("Material Icons"), - url("../fonts/MaterialIcons-Regular.ttf") format('truetype'); + url(".../fonts/MaterialIcons-Regular.ttf") format('truetype'); } } @if $icon-font-style == outlined { @font-face { font-family: "Material Icons Outlined"; src: local("Material Icons Outlined"), - url("../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); } } @if $icon-font-style == round { @font-face { font-family: "Material Icons Round"; src: local("Material Icons"), - url("../fonts/MaterialIconsRound-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsRound-Regular.otf") format('opentype'); } } @if $icon-font-style == sharp { @font-face { font-family: "Material Icons Sharp"; src: local("Material Icons Sharp"), - url("../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); } } @if $icon-font-style == two-tone { @font-face { font-family: "Material Icons Two Tone"; src: local("Material Icons Two Tone"), - url("../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); } } } diff --git a/app/javascript/styles/material-dark/theme/base_config.scss b/app/javascript/styles/material-dark/theme/base_config.scss index 13fb4ad75..f36a139ba 100644 --- a/app/javascript/styles/material-dark/theme/base_config.scss +++ b/app/javascript/styles/material-dark/theme/base_config.scss @@ -1,7 +1,7 @@ @charset "UTF-8"; -// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../config.scss". +// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../custom_config.scss". // Color scheme @@ -32,7 +32,7 @@ $name-font-size: 15px; // mastodon default // Background image -// If you want to use the local image, please put it in /mastodon-material +// If you want to use the local image, please put it in "../" $bg-image: none; //$bg-image: "./image.png"; //$bg-image: "https://example.com/img/image.png"; diff --git a/app/javascript/styles/material-dark/theme/columns.scss b/app/javascript/styles/material-dark/theme/columns.scss index af7776a0c..3f57ea958 100644 --- a/app/javascript/styles/material-dark/theme/columns.scss +++ b/app/javascript/styles/material-dark/theme/columns.scss @@ -202,7 +202,7 @@ } .columns-area { - background-image: url($bg-image); + @include bg-image; background-size: contain; } diff --git a/app/javascript/styles/material-light/theme/_mixins.scss b/app/javascript/styles/material-light/theme/_mixins.scss index d506b8148..bdfef2e2f 100644 --- a/app/javascript/styles/material-light/theme/_mixins.scss +++ b/app/javascript/styles/material-light/theme/_mixins.scss @@ -61,6 +61,13 @@ $shadow-color-3: rgba(0,0,0,.12); } } +// check background-image value +@mixin bg-image { + @if $bg-image == none { + } @else { background-image: url($bg-image) } +} + + @mixin icon-font-style { @if $icon-font-style == filled { font-family: "Material Icons" } @if $icon-font-style == outlined { font-family: "Material Icons Outlined" } @@ -151,35 +158,35 @@ $shadow-color-3: rgba(0,0,0,.12); @font-face { font-family: "Material Icons"; src: local("Material Icons"), - url("../fonts/MaterialIcons-Regular.ttf") format('truetype'); + url(".../fonts/MaterialIcons-Regular.ttf") format('truetype'); } } @if $icon-font-style == outlined { @font-face { font-family: "Material Icons Outlined"; src: local("Material Icons Outlined"), - url("../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); } } @if $icon-font-style == round { @font-face { font-family: "Material Icons Round"; src: local("Material Icons"), - url("../fonts/MaterialIconsRound-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsRound-Regular.otf") format('opentype'); } } @if $icon-font-style == sharp { @font-face { font-family: "Material Icons Sharp"; src: local("Material Icons Sharp"), - url("../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); } } @if $icon-font-style == two-tone { @font-face { font-family: "Material Icons Two Tone"; src: local("Material Icons Two Tone"), - url("../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); } } } diff --git a/app/javascript/styles/material-light/theme/base_config.scss b/app/javascript/styles/material-light/theme/base_config.scss index 13fb4ad75..f36a139ba 100644 --- a/app/javascript/styles/material-light/theme/base_config.scss +++ b/app/javascript/styles/material-light/theme/base_config.scss @@ -1,7 +1,7 @@ @charset "UTF-8"; -// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../config.scss". +// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../custom_config.scss". // Color scheme @@ -32,7 +32,7 @@ $name-font-size: 15px; // mastodon default // Background image -// If you want to use the local image, please put it in /mastodon-material +// If you want to use the local image, please put it in "../" $bg-image: none; //$bg-image: "./image.png"; //$bg-image: "https://example.com/img/image.png"; diff --git a/app/javascript/styles/material-light/theme/columns.scss b/app/javascript/styles/material-light/theme/columns.scss index af7776a0c..3f57ea958 100644 --- a/app/javascript/styles/material-light/theme/columns.scss +++ b/app/javascript/styles/material-light/theme/columns.scss @@ -202,7 +202,7 @@ } .columns-area { - background-image: url($bg-image); + @include bg-image; background-size: contain; } diff --git a/app/javascript/styles/plus/theme/_mixins.scss b/app/javascript/styles/plus/theme/_mixins.scss index d506b8148..bdfef2e2f 100644 --- a/app/javascript/styles/plus/theme/_mixins.scss +++ b/app/javascript/styles/plus/theme/_mixins.scss @@ -61,6 +61,13 @@ $shadow-color-3: rgba(0,0,0,.12); } } +// check background-image value +@mixin bg-image { + @if $bg-image == none { + } @else { background-image: url($bg-image) } +} + + @mixin icon-font-style { @if $icon-font-style == filled { font-family: "Material Icons" } @if $icon-font-style == outlined { font-family: "Material Icons Outlined" } @@ -151,35 +158,35 @@ $shadow-color-3: rgba(0,0,0,.12); @font-face { font-family: "Material Icons"; src: local("Material Icons"), - url("../fonts/MaterialIcons-Regular.ttf") format('truetype'); + url(".../fonts/MaterialIcons-Regular.ttf") format('truetype'); } } @if $icon-font-style == outlined { @font-face { font-family: "Material Icons Outlined"; src: local("Material Icons Outlined"), - url("../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsOutlined-Regular.otf") format('opentype'); } } @if $icon-font-style == round { @font-face { font-family: "Material Icons Round"; src: local("Material Icons"), - url("../fonts/MaterialIconsRound-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsRound-Regular.otf") format('opentype'); } } @if $icon-font-style == sharp { @font-face { font-family: "Material Icons Sharp"; src: local("Material Icons Sharp"), - url("../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsSharp-Regular.otf") format('opentype'); } } @if $icon-font-style == two-tone { @font-face { font-family: "Material Icons Two Tone"; src: local("Material Icons Two Tone"), - url("../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); + url(".../fonts/MaterialIconsTwoTone-Regular.otf") format('opentype'); } } } diff --git a/app/javascript/styles/plus/theme/base_config.scss b/app/javascript/styles/plus/theme/base_config.scss index 13fb4ad75..f36a139ba 100644 --- a/app/javascript/styles/plus/theme/base_config.scss +++ b/app/javascript/styles/plus/theme/base_config.scss @@ -1,7 +1,7 @@ @charset "UTF-8"; -// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../config.scss". +// [important] This file is base file. DO NOT edit this file. If you want to change this file, you should edit "../custom_config.scss". // Color scheme @@ -32,7 +32,7 @@ $name-font-size: 15px; // mastodon default // Background image -// If you want to use the local image, please put it in /mastodon-material +// If you want to use the local image, please put it in "../" $bg-image: none; //$bg-image: "./image.png"; //$bg-image: "https://example.com/img/image.png"; diff --git a/app/javascript/styles/plus/theme/columns.scss b/app/javascript/styles/plus/theme/columns.scss index af7776a0c..3f57ea958 100644 --- a/app/javascript/styles/plus/theme/columns.scss +++ b/app/javascript/styles/plus/theme/columns.scss @@ -202,7 +202,7 @@ } .columns-area { - background-image: url($bg-image); + @include bg-image; background-size: contain; }