From 615cd53e51a2ae121846771a9a1ef2ce22550be3 Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 13 Apr 2012 18:28:11 +0200 Subject: [PATCH 1/3] diabook-themes: small fixes --- view/theme/diabook-aerith/comment_item.tpl | 14 +++--- view/theme/diabook-aerith/group_side.tpl | 16 +++---- view/theme/diabook-aerith/icons/selected.png | Bin 211 -> 293 bytes .../theme/diabook-aerith/icons/unselected.png | Bin 0 -> 225 bytes view/theme/diabook-aerith/nets.tpl | 2 +- view/theme/diabook-aerith/style.css | 44 ++++++++++++++++++ view/theme/diabook-aerith/theme.php | 4 +- view/theme/diabook-blue/comment_item.tpl | 14 +++--- view/theme/diabook-blue/group_side.tpl | 16 +++---- view/theme/diabook-blue/icons/selected.png | Bin 211 -> 293 bytes view/theme/diabook-blue/icons/unselected.png | Bin 0 -> 225 bytes view/theme/diabook-blue/nets.tpl | 2 +- view/theme/diabook-blue/style.css | 44 ++++++++++++++++++ view/theme/diabook-blue/theme.php | 4 +- view/theme/diabook-red/comment_item.tpl | 14 +++--- view/theme/diabook-red/group_side.tpl | 16 +++---- view/theme/diabook-red/icons/selected.png | Bin 211 -> 293 bytes view/theme/diabook-red/icons/unselected.png | Bin 0 -> 225 bytes view/theme/diabook-red/nets.tpl | 2 +- view/theme/diabook-red/style.css | 44 ++++++++++++++++++ view/theme/diabook-red/theme.php | 4 +- view/theme/diabook/comment_item.tpl | 14 +++--- view/theme/diabook/group_side.tpl | 16 +++---- view/theme/diabook/icons/selected.png | Bin 211 -> 293 bytes view/theme/diabook/icons/unselected.png | Bin 0 -> 225 bytes view/theme/diabook/nets.tpl | 2 +- view/theme/diabook/style.css | 43 ++++++++++++++++- view/theme/diabook/theme.php | 9 ++-- 28 files changed, 249 insertions(+), 75 deletions(-) mode change 100755 => 100644 view/theme/diabook-aerith/icons/selected.png create mode 100644 view/theme/diabook-aerith/icons/unselected.png mode change 100755 => 100644 view/theme/diabook-blue/icons/selected.png create mode 100644 view/theme/diabook-blue/icons/unselected.png mode change 100755 => 100644 view/theme/diabook-red/icons/selected.png create mode 100644 view/theme/diabook-red/icons/unselected.png mode change 100755 => 100644 view/theme/diabook/icons/selected.png create mode 100644 view/theme/diabook/icons/unselected.png diff --git a/view/theme/diabook-aerith/comment_item.tpl b/view/theme/diabook-aerith/comment_item.tpl index 225a5dd5c..09fd8da3d 100644 --- a/view/theme/diabook-aerith/comment_item.tpl +++ b/view/theme/diabook-aerith/comment_item.tpl @@ -12,13 +12,13 @@
- video - img - url - u - i - b - quote + img + url + video + u + i + b + quote {{ if $qcomment }} X0|9GzO>^9ZL)NsN={UA(2ivLpE{R{pSG=_wrkWUb3-g`Ntd6FfmNZyZvl l%{zbKzyrG|CO%^ZhQE$Fm)|E9R{>qj;OXk;vd$@?2>_#*Rwe)d delta 158 zcmZ3=beU1HGr-TCmrII^fq{Y7)59eQNb>+OCkGplWZQ8zWTK*736qQfi$WK3H$PA; z*we)^MB;LCf&$+cV*`Vj^n`>73Sl4XHTL;+J^CMD#|#9`rp(NTi`dxMyu(;{p#dARO8ge_~^IBqZGA$nLy(iJYD@<);T3K F0RXGqFnRz0 diff --git a/view/theme/diabook-aerith/icons/unselected.png b/view/theme/diabook-aerith/icons/unselected.png new file mode 100644 index 0000000000000000000000000000000000000000..9e9cead4b3c753f9d8883e061c6868ec00d57ab4 GIT binary patch literal 225 zcmeAS@N?(olHy`uVBq!ia0vp^Vj#@H1|*Mc$*~4fjKx9jP7LeL$-D$|*pj^6T^Rm@ z;DWu&Cj&(|3p^r=85p>QL70(Y)*K0-AbW|YuPgf<7G6GMiwe^pzCfWwPZ!4!i_^&o z60C>$EQ}2d&ZH+K{P1TeH!v`en3VK^i;a!VR_V%1Lj!{^laoHwdtEiUsHNl1D`zSp zZ17m%dP+jVj-v+-e3;b1bLhl@0~@ABaLaa_x%635LgJ3Q_klz$desc
    -
  • $all
  • +
  • $all
  • {{ for $nets as $net }}
  • $net.name
  • {{ endfor }} diff --git a/view/theme/diabook-aerith/style.css b/view/theme/diabook-aerith/style.css index b26c76910..20e91518a 100644 --- a/view/theme/diabook-aerith/style.css +++ b/view/theme/diabook-aerith/style.css @@ -1230,6 +1230,50 @@ aside #likes a:hover{ float: left; margin-right: 20px; } +.group_selected { + background: url("../../../view/theme/diabook/icons/selected.png") no-repeat left center; + float: left; + height: 22px; + width: 22px; +} +.group_unselected { + background: url("../../../view/theme/diabook/icons/unselected.png") no-repeat left center; + float: left; + height: 22px; + width: 22px; +} +.icon.text_add { + background-image: url("../../../images/icons/16/add.png"); + float: right; + opacity: 0.1; + margin-right: 14px; + } +.icon.text_add:hover { + background-image: url("../../../images/icons/16/add.png"); + float: right; + cursor: pointer; + margin-right: 14px; + opacity: 1; +-webkit-transition: all 0.2s ease-in-out; +-moz-transition: all 0.2s ease-in-out; +-o-transition: all 0.2s ease-in-out; +-ms-transition: all 0.2s ease-in-out; +transition: all 0.2s ease-in-out; + } +.icon.text_edit { + background-image: url("../../../images/icons/10/edit.png"); + opacity: 0.1; + margin-top: 6px; + float: right; + height: 10px; +} +.icon.text_edit:hover { + background-image: url("../../../images/icons/10/edit.png"); + opacity: 1; + margin-top: 6px; + float: right; + height: 10px; +} /* widget */ .widget { margin-bottom: 2em; diff --git a/view/theme/diabook-aerith/theme.php b/view/theme/diabook-aerith/theme.php index a7d20a7ce..39ea118cf 100755 --- a/view/theme/diabook-aerith/theme.php +++ b/view/theme/diabook-aerith/theme.php @@ -462,10 +462,10 @@ function restore_boxes(){ $a->page['htmlhead'] .= ' ';} + $a->page['htmlhead'] .= ' -', $diabook_version); //change css on network and profilepages diff --git a/view/theme/diabook/theme_settings.tpl b/view/theme/diabook/theme_settings.tpl new file mode 100644 index 000000000..564ecc283 --- /dev/null +++ b/view/theme/diabook/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}} + +
    + +
    + From a300616bcbdda691682028c2fc13295dcfb43fbb Mon Sep 17 00:00:00 2001 From: tommy tomson Date: Fri, 13 Apr 2012 22:08:13 +0200 Subject: [PATCH 3/3] diabook-themes: theme-settings: users can set font-size and line-height for posts and comments --- view/theme/diabook-aerith/config.php | 71 +++++++++++ view/theme/diabook-aerith/style-network.css | 4 +- view/theme/diabook-aerith/style-profile.css | 4 +- view/theme/diabook-aerith/style.css | 8 +- view/theme/diabook-aerith/style.php | 120 +++++++++++++++++++ view/theme/diabook-aerith/theme.php | 4 +- view/theme/diabook-aerith/theme_settings.tpl | 8 ++ 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 ++ view/theme/diabook-red/config.php | 71 +++++++++++ view/theme/diabook-red/style-network.css | 4 +- view/theme/diabook-red/style-profile.css | 4 +- view/theme/diabook-red/style.css | 8 +- view/theme/diabook-red/style.php | 120 +++++++++++++++++++ view/theme/diabook-red/theme.php | 4 +- view/theme/diabook-red/theme_settings.tpl | 8 ++ view/theme/diabook/config.php | 2 +- 22 files changed, 628 insertions(+), 31 deletions(-) create mode 100644 view/theme/diabook-aerith/config.php create mode 100644 view/theme/diabook-aerith/style.php create mode 100644 view/theme/diabook-aerith/theme_settings.tpl 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 create mode 100644 view/theme/diabook-red/config.php create mode 100644 view/theme/diabook-red/style.php create mode 100644 view/theme/diabook-red/theme_settings.tpl diff --git a/view/theme/diabook-aerith/config.php b/view/theme/diabook-aerith/config.php new file mode 100644 index 000000000..afd3119f2 --- /dev/null +++ b/view/theme/diabook-aerith/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-aerith_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes), + '$line_height' => array('diabook-aerith_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights), + )); + return $o; +} diff --git a/view/theme/diabook-aerith/style-network.css b/view/theme/diabook-aerith/style-network.css index b9754ac32..17335389d 100644 --- a/view/theme/diabook-aerith/style-network.css +++ b/view/theme/diabook-aerith/style-network.css @@ -1380,10 +1380,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-aerith/style-profile.css b/view/theme/diabook-aerith/style-profile.css index 078b6d01f..3dea20697 100644 --- a/view/theme/diabook-aerith/style-profile.css +++ b/view/theme/diabook-aerith/style-profile.css @@ -1358,10 +1358,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-aerith/style.css b/view/theme/diabook-aerith/style.css index 20e91518a..a9269f21d 100644 --- a/view/theme/diabook-aerith/style.css +++ b/view/theme/diabook-aerith/style.css @@ -1454,10 +1454,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 { @@ -1599,10 +1599,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-aerith/style.php b/view/theme/diabook-aerith/style.php new file mode 100644 index 000000000..1ae62503c --- /dev/null +++ b/view/theme/diabook-aerith/style.php @@ -0,0 +1,120 @@ +page['htmlhead'] .= sprintf('', $diabook_version); diff --git a/view/theme/diabook-aerith/theme_settings.tpl b/view/theme/diabook-aerith/theme_settings.tpl new file mode 100644 index 000000000..002923a2a --- /dev/null +++ b/view/theme/diabook-aerith/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}} + +
    + +
    + 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}} + +
    + +
    + diff --git a/view/theme/diabook-red/config.php b/view/theme/diabook-red/config.php new file mode 100644 index 000000000..0b09a8751 --- /dev/null +++ b/view/theme/diabook-red/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-red_font_size', t('Set font-size for posts and comments'), $font_size, '', $font_sizes), + '$line_height' => array('diabook-red_line_height', t('Set line-height for posts and comments'), $line_height, '', $line_heights), + )); + return $o; +} diff --git a/view/theme/diabook-red/style-network.css b/view/theme/diabook-red/style-network.css index ca32be231..17b7af09b 100644 --- a/view/theme/diabook-red/style-network.css +++ b/view/theme/diabook-red/style-network.css @@ -1376,10 +1376,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-red/style-profile.css b/view/theme/diabook-red/style-profile.css index 242c08c68..74566d5c5 100644 --- a/view/theme/diabook-red/style-profile.css +++ b/view/theme/diabook-red/style-profile.css @@ -1338,10 +1338,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-red/style.css b/view/theme/diabook-red/style.css index 7c92590c1..a722dbae9 100644 --- a/view/theme/diabook-red/style.css +++ b/view/theme/diabook-red/style.css @@ -1440,10 +1440,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 { @@ -1585,10 +1585,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-red/style.php b/view/theme/diabook-red/style.php new file mode 100644 index 000000000..35b82ee96 --- /dev/null +++ b/view/theme/diabook-red/style.php @@ -0,0 +1,120 @@ +page['htmlhead'] .= sprintf('', $diabook_version); //change css on network and profilepages diff --git a/view/theme/diabook-red/theme_settings.tpl b/view/theme/diabook-red/theme_settings.tpl new file mode 100644 index 000000000..9e83ae8f2 --- /dev/null +++ b/view/theme/diabook-red/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}} + +
    + +
    + diff --git a/view/theme/diabook/config.php b/view/theme/diabook/config.php index f4eb7aae5..25b3c4b54 100644 --- a/view/theme/diabook/config.php +++ b/view/theme/diabook/config.php @@ -30,7 +30,7 @@ function theme_admin(&$a){ $font_size = get_config('diabook', 'font_size' ); $line_height = get_config('diabook', 'line_height' ); - return quattro_form($a,$font_size, $line_height); + return diabook_form($a,$font_size, $line_height); } function theme_admin_post(&$a){