Commit 4b8a2ad4 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge changes I9ceb927b,Ib0ff0070

* changes:
  Bug 1847005: More skin font options for new header pt2
  Bug 1847005: More skin font options for new header
parents 7cf09839 e43675db
......@@ -109,8 +109,8 @@ $string['bodybgcolor1'] = 'Background colour';
$string['viewbgcolor'] = 'Page background colour';
$string['textcolor'] = 'Text colour';
$string['textcolordescription'] = 'This is the colour of normal text.';
$string['headingcolor'] = 'Heading text colour';
$string['headingcolordescription'] = 'This is the colour of a page heading.';
$string['headingcolor1'] = 'Header text colour';
$string['headingcolordescription2'] = 'This is the colour for text in the header area.';
$string['emphasizedcolor'] = 'Emphasized text colour';
$string['emphasizedcolordescription'] = 'This is the colour of page sub-headings and emphasized text.';
$string['bodybgimage1'] = 'Background image';
......@@ -152,7 +152,7 @@ $string['headerlogoimagelight1'] = 'White Mahara logo and text (suitable for dar
$string['headerlogoimagedark1'] = 'Dark Mahara logo and text (suitable for lighter header backgrounds)';
$string['normallinkcolor'] = 'Normal link colour';
$string['hoverlinkcolor'] = 'Highlighted link colour';
$string['hoverlinkcolor1'] = 'Focussed link colour';
$string['linkunderlined'] = 'Underline link';
$string['tableborder'] = 'Table border colour';
......
......@@ -74,7 +74,6 @@ class Skin {
'view_text_font_size' => 'small',
'view_text_font_color' => '#000000',
'view_text_heading_color' => '#000000',
'view_text_emphasized_color' => '#666666',
'view_link_normal_color' => '#0000EE',
'view_link_normal_underline' => true,
......@@ -1050,7 +1049,7 @@ class Skin {
// Add the sample heading title - the font size does not affect the text within page header
imagettftext($img2, $heading_size, 0, 10, $header_font_size+10, $heading_text_color, $heading_font, $heading_text);
list($r, $g, $b) = self::get_rgb_from_hex($skin['view_text_emphasized_color']);
list($r, $g, $b) = self::get_rgb_from_hex($skin['view_text_font_color']);
$emphasized_color = imagecolorallocate($img, $r, $g, $b);
list($r, $g, $b) = self::get_rgb_from_hex('#CCCCCC');
$line_color = imagecolorallocate($img, $r, $g, $b);
......
......@@ -274,9 +274,8 @@ if (!isset($themelinkcolor)) {
$themelinkcolor = isset($THEME->themelinkcolor) ? $THEME->themelinkcolor : '#556d32'; // $view_link_normal_color
}
$themetextcolor = isset($THEME->themetextcolor) ? $THEME->themetextcolor : '#333333'; // $view_text_font_color
$themeemphasizedtextcolor = isset($THEME->themeemphasizedtextcolor) ? $THEME->themeemphasizedtextcolor : '#333333'; // $view_text_emphasized_color
$themefocusedlinkcolor = isset($THEME->themefocusedlinkcolor) ? $THEME->themefocusedlinkcolor : '#475c2a'; // $view_link_hover_color
$themeblockheadingfontcolor = '#FFFFFF'; // $theme-block-header-color
$themeblockheadingfontcolor = isset($THEME->themeblockheadingfontcolor) ? $THEME->themeblockheadingfontcolor : '#333333'; // $theme-block-header-color
// Text
$elements['viewcontent'] = array(
......@@ -298,8 +297,8 @@ $elements['viewcontent'] = array(
),
'view_text_heading_color' => array(
'type' => 'color',
'title' => get_string('headingcolor', 'skin'),
'description' => get_string('headingcolordescription', 'skin'),
'title' => get_string('headingcolor1', 'skin'),
'description' => get_string('headingcolordescription2', 'skin'),
'defaultvalue' => (!empty($viewskin['view_text_heading_color']) ? $viewskin['view_text_heading_color'] : $themeheadingcolor),
'size' => 7,
'options' => array(
......@@ -365,16 +364,6 @@ $elements['viewcontent'] = array(
'themedefault' => $themetextcolor,
),
),
'view_text_emphasized_color' => array(
'type' => 'color',
'title' => get_string('emphasizedcolor', 'skin'),
'description' => get_string('emphasizedcolordescription', 'skin'),
'defaultvalue' => (!empty($viewskin['view_text_emphasized_color']) ? $viewskin['view_text_emphasized_color'] : $themeemphasizedtextcolor),
'size' => 7,
'options' => array(
'themedefault' => $themeemphasizedtextcolor,
),
),
'view_link_normal_color' => array(
'type' => 'color',
'title' => get_string('normallinkcolor', 'skin'),
......@@ -391,7 +380,7 @@ $elements['viewcontent'] = array(
),
'view_link_hover_color' => array(
'type' => 'color',
'title' => get_string('hoverlinkcolor', 'skin'),
'title' => get_string('hoverlinkcolor1', 'skin'),
'defaultvalue' => (!empty($viewskin['view_link_hover_color']) ? $viewskin['view_link_hover_color'] : $themefocusedlinkcolor),
'size' => 7,
'options' => array(
......@@ -538,7 +527,6 @@ function designskinform_submit(Pieform $form, $values) {
$skin['view_text_heading_color'] = $values['view_text_heading_color'];
$skin['header_background_color'] = $values['header_background_color'];
$skin['header_background_image'] = $values['header_background_image'];
$skin['view_text_emphasized_color'] = $values['view_text_emphasized_color'];
$skin['view_link_normal_color'] = $values['view_link_normal_color'];
$skin['view_link_normal_underline'] = $values['view_link_normal_underline'];
$skin['view_link_hover_color'] = $values['view_link_hover_color'];
......
......@@ -86,7 +86,8 @@ if (!empty($exportskins)) {
$itemnode->setAttribute('font-size', $viewskin['view_text_font_size']);
$itemnode->setAttribute('font-color', $viewskin['view_text_font_color']);
$itemnode->setAttribute('heading-color', $viewskin['view_text_heading_color']);
$itemnode->setAttribute('emphasized-color', $viewskin['view_text_emphasized_color']);
$itemnode->setAttribute('block-heading-font', $viewskin['view_block_header_font']);
$itemnode->setAttribute('block-heading-color', $viewskin['view_block_header_font_color']);
// Link element...
$childelement = $xmldoc->createElement('link');
......
......@@ -140,7 +140,8 @@ function importskinform_submit(Pieform $form, $values) {
$skin = array_merge($skin, array('view_text_font_size' => $item->getAttribute('font-size')));
$skin = array_merge($skin, array('view_text_font_color' => $item->getAttribute('font-color')));
$skin = array_merge($skin, array('view_text_heading_color' => $item->getAttribute('heading-color')));
$skin = array_merge($skin, array('view_text_emphasized_color' => $item->getAttribute('emphasized-color')));
$skin = array_merge($skin, array('view_block_header_font' => $item->getAttribute('block-heading-font')));
$skin = array_merge($skin, array('view_block_header_font_color' => $item->getAttribute('block-heading-color')));
}
// Link element...
......
......@@ -84,7 +84,6 @@ $smarty->assign('view_block_header_font_color', $skin->viewskin['view_block_head
$smarty->assign('view_text_font_size', $skin->viewskin['view_text_font_size']);
$smarty->assign('view_text_font_color', $skin->viewskin['view_text_font_color']);
$smarty->assign('view_text_heading_color', $skin->viewskin['view_text_heading_color']);
$smarty->assign('view_text_emphasized_color', $skin->viewskin['view_text_emphasized_color']);
// LINK
$smarty->assign('view_link_normal_color', $skin->viewskin['view_link_normal_color']);
......
......@@ -22,7 +22,6 @@ $theme->overrideparentcss = true;
$theme->themeheadingcolor = '#545B5D'; // $view_text_heading_color
$theme->themetextcolor = '#545B5D'; // $view_text_font_color
$theme->themelinkcolor = '#1f6c88;'; // $view_link_normal_color
$theme->themeemphasizedtextcolor = '#545B5D'; // $view_text_emphasized_color
$theme->themefocusedlinkcolor = '#1d6781'; // $view_link_hover_color
/**
......
......@@ -20,7 +20,7 @@ $theme->overrideparentcss = true;
$theme->themelinkcolor = '#0162a7'; // $view_link_normal_color
$theme->themefocusedlinkcolor = '#01528c'; // $view_link_hover_color
$theme->themeblockheadingfontcolor = '#FFFFFF'; // $theme-block-header-color
/**
* The following themeconfig options are available. If you make new themeconfig
......
......@@ -37,6 +37,16 @@ body > .main-content > .row {
background-size: 100%;
}
.collection-nav h2 {
color: {$view_text_heading_color};
}
/* Used to style author, tag links in page headers */
.pageheader-content .text-small a {
color: {$view_text_heading_color};
text-decoration: underline;
}
/* All other custom settings should be scoped to be within .user-page-content */
/* with the exception of the page title and page description */
......@@ -92,23 +102,16 @@ body > .main-content > .row {
/* blocks */
.user-page-content .block-header a {
color: {$view_block_header_font_color};
font-family: {$view_block_header_font|safe};
color: #FFFFFF;
}
.user-page-content .card .title:not(.feedtitle) {
font-weight: bold;
color: {$view_text_emphasized_color};
font-family: {$view_heading_font_family|safe};
border-color: {$view_text_emphasized_color};
}
.user-page-content .card .title a,
.user-page-content .card .title a:link,
.user-page-content .card .title a:visited,
.user-page-content .card .title a:active {
color: {$view_text_emphasized_color};
text-decoration: none;
color: {$view_block_header_font_color};
font-family: {$view_block_header_font|safe};
border-color: {$view_block_header_font_color};
}
.user-page-content .card .title a:hover {
color: {$view_link_hover_color};
text-decoration: none;
......@@ -126,9 +129,6 @@ body > .main-content > .row {
.user-page-content .list-group-item {
background-color: transparent;
}
.user-page-content .card > .block .list-group .list-group-item {
border-color: {$view_text_emphasized_color};
}
/* pagination */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment