Skip to content

Commit

Permalink
Use Balthazar and Merriweather as backup header fonts when Copperplat…
Browse files Browse the repository at this point in the history
…e is not available

Provide the ability to have a non-tiled background image, with a plain background color for where the image ends.
  • Loading branch information
charvolant committed Jan 6, 2019
1 parent 34a5e73 commit 8cc77e5
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 10 deletions.
22 changes: 18 additions & 4 deletions common/header.php
Expand Up @@ -20,14 +20,28 @@
<?php fire_plugin_hook('public_head',array('view'=>$this)); ?>
<!-- Stylesheets -->
<?php
queue_css_url('//fonts.googleapis.com/css?family=Playfair+Display:700,400|Playfair+Display+SC:400|Raleway:700,400&subset=latin');
queue_css_url('//fonts.googleapis.com/css?family=Balthazar:700,400|Raleway:700,400|Merriweather:400,700');
queue_css_file(array('iconfonts', 'style'));

echo head_css();
if ($background = get_theme_option('Background Image')) {
$background_color = get_theme_option('Background Color');
$background_image = get_theme_option('Background Image');
if ($background_image) {
$tile = get_theme_option('Background Tile') == 1;
$tile_style = $tile ? 'repeat' : 'no-repeat fixed center top';
$storage = Zend_Registry::get('storage');
$uri = $storage->getUri($storage->getPathByType($background, 'theme_uploads'));
echo '<style>body { background: url("' . $uri . '") repeat; }</style>';
$background_uri = $storage->getUri($storage->getPathByType($background_image, 'theme_uploads'));
$background_image = 'url('.$background_uri.') '.$tile_style;
}
if ($background_color || $background_image) {
echo '<style>body { background: ';
if ($background_color) {
echo $background_color;
echo ' ';
}
if ($background_image)
echo $background_image;
echo '; }</style>';
}
if ($logo_size = get_theme_option('logo_size')) {
echo '<style>#site-title { font-size: ' . $logo_size . '; line-height: 90%; }</style>';
Expand Down
14 changes: 13 additions & 1 deletion config.ini
@@ -1,12 +1,22 @@
[config]

;Appearance
background_color.type = "text"
background_color.options.label = "Background Color"
background_color.options.description = "The background colour, where there is no background image. Any CSS color can be used"
background_color.options.value = "#103c63"

background_image.type = "file"
background_image.options.label = "Background Image"
background_image.options.description = "Choose an image file to use as a background for the area outside the content. This image will repeat hoizontally and vertically. If absent, the bavkground will be a solid colour"
background_image.options.description = "Choose an image file to use as a background for the area outside the content. If absent, the background will be a solid colour"
background_image.options.validators.count.validator = "Count"
background_image.options.validators.count.options.max = "1"

background_tile.type = "checkbox"
background_tile.options.label = "Tile Background Image"
background_tile.options.description = "The background image is a tile that will repeat hoizontally and vertically. If unchecked, the background image will show horizontally centred."
single_line_item.options.value = "1"

single_line_item.type = "checkbox"
single_line_item.options.label = "Single Line Item"
single_line_item.options.description = "Check this box if you wish items to appear as a list-like single line caption with more information available on mouse-over."
Expand Down Expand Up @@ -144,7 +154,9 @@ still_image_type.options.value = "Still Image"
[groups]

head_foot.options.legend = "Page Design"
head_foot.elements[] = "background_color"
head_foot.elements[] = "background_image"
head_foot.elements[] = "background_tile"
head_foot.elements[] = "single_line_item"
head_foot.elements[] = "sortable_shortcodes"
head_foot.elements[] = "logo"
Expand Down
4 changes: 2 additions & 2 deletions css/sass/_base.scss
Expand Up @@ -3,8 +3,8 @@
$base-font-size: 12px;
$base-line-height: 18px;

$title-stack: 'Copperplate', 'Playfair Display', "Palatino Linotype", "Book Antiqua", "Times New Roman", Times, serif;
$header-stack: 'Copperplate', 'Playfair Display', "Palatino Linotype", "Book Antiqua", "Times New Roman", Times, serif;
$title-stack: 'Copperplate', 'Balthazar', "Merriweather", serif;
$header-stack: 'Copperplate', 'Balthazar', "Merriweather", serif;
$minor-header-stack: Raleway, Verdana, sans-serif;
$base-font-stack: Raleway, Verdana, sans-serif;
$monospace-stack: 'Courier New',Courier,'Lucida Sans Typewriter','Lucida Typewriter',monospace;
Expand Down
6 changes: 3 additions & 3 deletions css/style.css
Expand Up @@ -428,7 +428,7 @@ h1, h2, h3, h4, h5, h6 {

h1, h2, h3 {
color: #103cb1;
font-family: "Copperplate", "Playfair Display", "Palatino Linotype", "Book Antiqua", "Times New Roman", Times, serif;
font-family: "Copperplate", "Balthazar", "Merriweather", serif;
font-weight: 400;
}

Expand Down Expand Up @@ -611,7 +611,7 @@ header:after {
float: left;
width: 50%;
font-weight: 700;
font-family: "Copperplate", "Playfair Display", "Palatino Linotype", "Book Antiqua", "Times New Roman", Times, serif;
font-family: "Copperplate", "Balthazar", "Merriweather", serif;
font-variant: small-caps;
letter-spacing: .1ex;
color: #cccccc;
Expand Down Expand Up @@ -1146,7 +1146,7 @@ header:after {
}
}
#home #content h2 {
font-family: "Copperplate", "Playfair Display", "Palatino Linotype", "Book Antiqua", "Times New Roman", Times, serif;
font-family: "Copperplate", "Balthazar", "Merriweather", serif;
font-weight: normal;
}

Expand Down

0 comments on commit 8cc77e5

Please sign in to comment.