Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
project
socialblue
Commits
77bf63e2
Commit
77bf63e2
authored
Jan 12, 2017
by
jochemvn
Browse files
DS-1816
by jochemvn: Fix config
parent
2981e9d2
Changes
2
Hide whitespace changes
Inline
Side-by-side
config/install/socialblue.settings.yml
View file @
77bf63e2
font
:
font_primary
:
'
Montserrat'
font_fallback
:
'
sans-serif'
colors
:
color_primary
:
'
#29abe2'
color_secondary
:
'
#1f80aa'
color_accents
:
'
#ffc142'
border_radius
:
'
10'
font_primary
:
'
Montserrat'
font_fallback
:
'
sans-serif'
color_primary
:
'
#29abe2'
color_secondary
:
'
#1f80aa'
color_accents
:
'
#ffc142'
border_radius
:
'
10'
theme-settings.php
View file @
77bf63e2
...
...
@@ -6,6 +6,8 @@ function socialblue_form_system_theme_settings_alter(&$form, \Drupal\Core\Form\F
return
;
}
$config
=
\
Drupal
::
config
(
'socialblue.settings'
);
$form
[
'open_social_settings'
]
=
array
(
'#type'
=>
'vertical_tabs'
,
'#title'
=>
t
(
'Opensocial settings'
),
...
...
@@ -36,29 +38,29 @@ function socialblue_form_system_theme_settings_alter(&$form, \Drupal\Core\Form\F
$form
[
'os_color_settings'
][
'color_primary'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Primary color'
),
'#default_value'
=>
theme_get_setting
(
'colors.
color_primary'
),
'#default_value'
=>
$config
->
get
(
'
color_primary'
),
);
$form
[
'os_color_settings'
][
'color_secondary'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Secondary color'
),
'#default_value'
=>
theme_get_setting
(
'colors.
color_secondary'
),
'#default_value'
=>
$config
->
get
(
'
color_secondary'
),
);
$form
[
'os_color_settings'
][
'color_accents'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Accents color'
),
'#default_value'
=>
theme_get_setting
(
'colors.
color_accents'
),
'#default_value'
=>
$config
->
get
(
'
color_accents'
),
);
$form
[
'os_color_settings'
][
'border_radius'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Border radius (px)'
),
'#default_value'
=>
theme_get_setting
(
'colors.
border_radius'
),
'#default_value'
=>
$config
->
get
(
'
border_radius'
),
);
// Font tab.
$form
[
'os_font_settings'
][
'font_p
a
rimary'
]
=
array
(
$form
[
'os_font_settings'
][
'font_primary'
]
=
array
(
'#type'
=>
'textfield'
,
'#title'
=>
t
(
'Primary font'
),
'#default_value'
=>
theme_get_setting
(
'font.
font_primary'
),
'#default_value'
=>
$config
->
get
(
'
font_primary'
),
'#description'
=>
t
(
"The primary font used in this theme."
),
);
$form
[
'os_font_settings'
][
'font_fallback'
]
=
array
(
...
...
@@ -68,7 +70,7 @@ function socialblue_form_system_theme_settings_alter(&$form, \Drupal\Core\Form\F
'serif'
=>
'serif'
,
'sans-serif'
=>
'sans-serif'
),
'#default_value'
=>
theme_get_setting
(
'font.
font_fallback'
),
'#default_value'
=>
$config
->
get
(
'
font_fallback'
),
'#description'
=>
t
(
"The fallback family."
),
);
}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment