Skip to content

Commit

Permalink
Merge pull request #10 from charvolant/bigstuff-3
Browse files Browse the repository at this point in the history
Configuration options and style info for the site title.
  • Loading branch information
charvolant committed Jan 8, 2017
2 parents f3c48d9 + 5f951f1 commit 62c4527
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 2 deletions.
6 changes: 6 additions & 0 deletions common/header.php
Expand Up @@ -29,6 +29,12 @@
$uri = $storage->getUri($storage->getPathByType($background, 'theme_uploads'));
echo '<style>body { background: url("' . $uri . '") repeat; }</style>';
}
if ($logo_size = get_theme_option('logo_size')) {
echo '<style>#site-title { font-size: ' . $logo_size . '; line-height: 90%; }</style>';
}
if ($logo_color = get_theme_option('logo_color')) {
echo '<style>#site-title { color: ' . $logo_color . '; }</style>';
}
?>
<!-- JavaScripts -->
<?php queue_js_file('vendor/selectivizr', 'javascripts', array('conditional' => '(gte IE 6)&(lte IE 8)')); ?>
Expand Down
14 changes: 14 additions & 0 deletions config.ini
Expand Up @@ -24,13 +24,25 @@ logo.options.description = "Choose a logo file. This will replace the site title
logo.options.validators.count.validator = "Count"
logo.options.validators.count.options.max = "1"

logo_size.type = "text"
logo_size.options.label = "Site Title Size"
logo_size.options.description = "The text size of a site title if a logo file is not used. Any CSS size can be used"
logo_size.options.value = "60px"

logo_color.type = "text"
logo_color.options.label = "Site Title Color"
logo_color.options.description = "The color of a site title if a logo file is not used. Any CSS color can be used"
logo_color.options.value = "#cccccc"

; Header Background Image
header_image.type = "file"
header_image.options.label = "Header Image"
header_image.options.description = "Choose an image file to display below your header. Recommended max height is 100px."
header_image.options.validators.count.validator = "Count"
header_image.options.validators.count.options.max = "1"

; Site title size and colour

display_featured_item.type = "checkbox"
display_featured_item.options.label = "Display Featured Item"
display_featured_item.options.description = "Check this box if you wish to show the featured item on the homepage."
Expand Down Expand Up @@ -136,6 +148,8 @@ head_foot.elements[] = "background_image"
head_foot.elements[] = "single_line_item"
head_foot.elements[] = "sortable_shortcodes"
head_foot.elements[] = "logo"
head_foot.elements[] = "logo_size"
head_foot.elements[] = "logo_color"
head_foot.elements[] = "header_image"
head_foot.elements[] = "footer_text"
head_foot.elements[] = "display_footer_copyright"
Expand Down
2 changes: 1 addition & 1 deletion css/sass/_screen.scss
Expand Up @@ -177,7 +177,7 @@ header {
color: $light-border;
text-transform: uppercase;
font-size: 5 * $base-font-size;
line-height: 3 * $base-line-height;
line-height: 90%;
position: relative;

a:link, a:visited {
Expand Down
2 changes: 1 addition & 1 deletion css/style.css
Expand Up @@ -616,7 +616,7 @@ header:after {
color: #cccccc;
text-transform: uppercase;
font-size: 60px;
line-height: 54px;
line-height: 90%;
position: relative;
}
#site-title a:link, #site-title a:visited {
Expand Down

0 comments on commit 62c4527

Please sign in to comment.