From a300616bcbdda691682028c2fc13295dcfb43fbb Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 13 Apr 2012 22:08:13 +0200 Subject: diabook-themes: theme-settings: users can set font-size and line-height for posts and comments --- view/theme/diabook-blue/config.php | 71 +++++++++++++++++ view/theme/diabook-blue/style-network.css | 4 +- view/theme/diabook-blue/style-profile.css | 4 +- view/theme/diabook-blue/style.css | 8 +- view/theme/diabook-blue/style.php | 120 +++++++++++++++++++++++++++++ view/theme/diabook-blue/theme.php | 4 +- view/theme/diabook-blue/theme_settings.tpl | 8 ++ 7 files changed, 209 insertions(+), 10 deletions(-) create mode 100644 view/theme/diabook-blue/config.php create mode 100644 view/theme/diabook-blue/style.php create mode 100644 view/theme/diabook-blue/theme_settings.tpl (limited to 'view/theme/diabook-blue') diff --git a/view/theme/diabook-blue/config.php b/view/theme/diabook-blue/config.php new file mode 100644 index 000000000..3ad88b5bb --- /dev/null +++ b/view/theme/diabook-blue/config.php @@ -0,0 +1,71 @@ +"1.4", + "1.3"=>"1.3", + "1.2"=>"1.2", + "1.1"=>"1.1", + ); + + $font_sizes = array( + '14'=>'14', + '13.5'=>'13.5', + '13'=>'13', + '12.5'=>'12.5', + '12'=>'12', + ); + + + + $t = file_get_contents( dirname(__file__). "/theme_settings.tpl" ); + $o .= replace_macros($t, array( + '$submit' => t('Submit'), + '$baseurl' => $a->get_baseurl(), + '$title' => t("Theme settings"), + '$font_size' => array('diabook-blue_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes), + '$line_height' => array('diabook-blue_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights), + )); + return $o; +} diff --git a/view/theme/diabook-blue/style-network.css b/view/theme/diabook-blue/style-network.css index 021edc45e..2f25372a9 100644 --- a/view/theme/diabook-blue/style-network.css +++ b/view/theme/diabook-blue/style-network.css @@ -1342,10 +1342,10 @@ transition: all 0.2s ease-in-out; } .wall-item-container .wall-item-content { - font-size: 12.5px; + max-width: 420px; word-wrap: break-word; - line-height: 1.2; + margin-bottom: 14px; } diff --git a/view/theme/diabook-blue/style-profile.css b/view/theme/diabook-blue/style-profile.css index ae7fa8d14..f0b4fbd02 100644 --- a/view/theme/diabook-blue/style-profile.css +++ b/view/theme/diabook-blue/style-profile.css @@ -1325,10 +1325,10 @@ transition: all 0.2s ease-in-out; } .wall-item-container .wall-item-content { - font-size: 12.5px; + max-width: 420px; word-wrap: break-word; - line-height: 1.2; + margin-bottom: 14px; } diff --git a/view/theme/diabook-blue/style.css b/view/theme/diabook-blue/style.css index 5d0833931..923e63e3e 100644 --- a/view/theme/diabook-blue/style.css +++ b/view/theme/diabook-blue/style.css @@ -1411,10 +1411,10 @@ body .pageheader{ color: #999; } .wall-item-photo-container .wall-item-content { - font-size: 12.5px; + max-width: 720px; word-wrap: break-word; - line-height: 1.2; + margin-bottom: 14px; } .wall-item-photo-container .wall-item-content img { @@ -1557,10 +1557,10 @@ body .pageheader{ } .wall-item-container .wall-item-content { - font-size: 12.5px; + max-width: 720px; word-wrap: break-word; - line-height: 1.2; + margin-bottom: 14px; } diff --git a/view/theme/diabook-blue/style.php b/view/theme/diabook-blue/style.php new file mode 100644 index 000000000..330911b77 --- /dev/null +++ b/view/theme/diabook-blue/style.php @@ -0,0 +1,120 @@ +page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages diff --git a/view/theme/diabook-blue/theme_settings.tpl b/view/theme/diabook-blue/theme_settings.tpl new file mode 100644 index 000000000..a40e0e298 --- /dev/null +++ b/view/theme/diabook-blue/theme_settings.tpl @@ -0,0 +1,8 @@ +{{inc field_select.tpl with $field=$font_size}}{{endinc}} + +{{inc field_select.tpl with $field=$line_height}}{{endinc}} + +
+ +
+ -- cgit v1.2.3