diabook-themes: theme-settings: "wide"-option and new screenshots
This commit is contained in:
parent
97c50a0924
commit
5b407b5ee7
28 changed files with 25069 additions and 32 deletions
view/theme
diabook-aerith
config.phpscreenshot.pngstyle-network-wide.cssstyle-profile-wide.cssstyle-wide.cssstyle.phptheme.phptheme_settings.tpl
diabook-blue
config.phpscreenshot.pngstyle-network-wide.cssstyle-profile-wide.cssstyle-wide.cssstyle.phptheme.phptheme_settings.tpl
diabook-red
config.phpscreenshot.pngstyle-network-wide.cssstyle-profile-wide.cssstyle-wide.cssstyle.phptheme.phptheme_settings.tpl
diabook
|
@ -11,8 +11,9 @@ function theme_content(&$a){
|
|||
|
||||
$font_size = get_pconfig(local_user(), 'diabook-aerith', 'font_size' );
|
||||
$line_height = get_pconfig(local_user(), 'diabook-aerith', 'line_height' );
|
||||
$resolution = get_pconfig(local_user(), 'diabook-aerith', 'resolution' );
|
||||
|
||||
return diabook_form($a,$font_size, $line_height);
|
||||
return diabook_form($a,$font_size, $line_height,$resolution);
|
||||
}
|
||||
|
||||
function theme_post(&$a){
|
||||
|
@ -22,6 +23,7 @@ function theme_post(&$a){
|
|||
if (isset($_POST['diabook-aerith-settings-submit'])){
|
||||
set_pconfig(local_user(), 'diabook-aerith', 'font_size', $_POST['diabook-aerith_font_size']);
|
||||
set_pconfig(local_user(), 'diabook-aerith', 'line_height', $_POST['diabook-aerith_line_height']);
|
||||
set_pconfig(local_user(), 'diabook-aerith', 'resolution', $_POST['diabook-aerith_resolution']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,33 +31,43 @@ function theme_post(&$a){
|
|||
function theme_admin(&$a){
|
||||
$font_size = get_config('diabook-aerith', 'font_size' );
|
||||
$line_height = get_config('diabook-aerith', 'line_height' );
|
||||
$resolution = get_config('diabook-aerith', 'resolution' );
|
||||
|
||||
return diabook_form($a,$font_size, $line_height);
|
||||
return diabook_form($a,$font_size, $line_height,$resolution);
|
||||
}
|
||||
|
||||
function theme_admin_post(&$a){
|
||||
if (isset($_POST['diabook-aerith-settings-submit'])){
|
||||
set_config('diabook-aerith', 'font_size', $_POST['diabook-aerith_font_size']);
|
||||
set_config('diabook-aerith', 'line_height', $_POST['diabook-aerith_line_height']);
|
||||
set_config('diabook-aerith', 'resolution', $_POST['diabook-aerith_resolution']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function diabook_form(&$a, $font_size, $line_height){
|
||||
function diabook_form(&$a, $font_size, $line_height, $resolution){
|
||||
$line_heights = array(
|
||||
"1.4"=>"1.4",
|
||||
"1.3"=>"1.3",
|
||||
"---"=>"---",
|
||||
"1.5"=>"1.5",
|
||||
"1.4"=>"1.4",
|
||||
"1.2"=>"1.2",
|
||||
"1.1"=>"1.1",
|
||||
);
|
||||
|
||||
$font_sizes = array(
|
||||
'13'=>'13',
|
||||
"---"=>"---",
|
||||
"15"=>"15",
|
||||
'14'=>'14',
|
||||
'13.5'=>'13.5',
|
||||
'13'=>'13',
|
||||
'12.5'=>'12.5',
|
||||
'12'=>'12',
|
||||
);
|
||||
$resolutions = array(
|
||||
'normal'=>'normal',
|
||||
'wide'=>'wide',
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
@ -66,6 +78,7 @@ function diabook_form(&$a, $font_size, $line_height){
|
|||
'$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),
|
||||
'$resolution' => array('diabook-aerith_resolution', t('Set resolution for middle column'), $resolution, '', $resolutions),
|
||||
));
|
||||
return $o;
|
||||
}
|
||||
|
|
Binary file not shown.
Before (image error) Size: 254 KiB After (image error) Size: 212 KiB |
2668
view/theme/diabook-aerith/style-network-wide.css
Normal file
2668
view/theme/diabook-aerith/style-network-wide.css
Normal file
File diff suppressed because it is too large
Load diff
2639
view/theme/diabook-aerith/style-profile-wide.css
Normal file
2639
view/theme/diabook-aerith/style-profile-wide.css
Normal file
File diff suppressed because it is too large
Load diff
2914
view/theme/diabook-aerith/style-wide.css
Normal file
2914
view/theme/diabook-aerith/style-wide.css
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,24 +1,42 @@
|
|||
<?php
|
||||
$line_height=false;
|
||||
$diabook_font_size=false;
|
||||
$resolution=false;
|
||||
$site_line_height = get_config("diabook-aerith","line_height");
|
||||
$site_diabook_font_size = get_config("diabook-aerith", "font_size" );
|
||||
$site_resolution = get_config("diabook-aerith", "resolution" );
|
||||
|
||||
|
||||
if (local_user()) {
|
||||
$line_height = get_pconfig(local_user(), "diabook-aerith","line_height");
|
||||
$diabook_font_size = get_pconfig(local_user(), "diabook-aerith", "font_size");
|
||||
$resolution = get_pconfig(local_user(), "diabook-aerith", "resolution");
|
||||
}
|
||||
|
||||
if ($line_height===false) $line_height=$site_line_height;
|
||||
if ($line_height===false) $line_height="1.3";
|
||||
if ($diabook_font_size===false) $diabook_font_size=$site_diabook_font_size;
|
||||
if ($diabook_font_size===false) $diabook_font_size="13";
|
||||
if ($resolution===false) $resolution=$site_resolution;
|
||||
if ($resolution===false) $resolution="normal";
|
||||
|
||||
|
||||
if($resolution == "normal") {
|
||||
if (file_exists("$THEMEPATH/style.css")){
|
||||
echo file_get_contents("$THEMEPATH/style.css");
|
||||
}
|
||||
|
||||
if($diabook_font_size == "15"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "14"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
|
@ -74,6 +92,17 @@
|
|||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.4"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
|
@ -118,3 +147,131 @@
|
|||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
if($resolution == "wide") {
|
||||
if (file_exists("$THEMEPATH/style-wide.css")){
|
||||
echo file_get_contents("$THEMEPATH/style-wide.css");
|
||||
}
|
||||
if($diabook_font_size == "15"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "14"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 14px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "13.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 13.5px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 13.5px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "13"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 13px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "12.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "12"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 12px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.4"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.4;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.3"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.3;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.2"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.2;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.1"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.1;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
|
@ -15,7 +15,9 @@ $a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
|
|||
|
||||
//change css on network and profilepages
|
||||
$cssFile = null;
|
||||
|
||||
$resolution=false;
|
||||
$resolution = get_pconfig(local_user(), "diabook-aerith", "resolution");
|
||||
if ($resolution===false) $resolution="normal";
|
||||
|
||||
/**
|
||||
* prints last community activity
|
||||
|
@ -249,7 +251,8 @@ if ($a->argv[0] === "network" && local_user()){
|
|||
diabook_aerith_community_info();
|
||||
|
||||
// CUSTOM CSS
|
||||
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-aerith/style-network.css";
|
||||
if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-aerith/style-network.css";}
|
||||
if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-aerith/style-network-wide.css";}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -262,7 +265,8 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
|
|||
diabook_aerith_community_info();
|
||||
|
||||
// CUSTOM CSS
|
||||
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-aerith/style-profile.css";
|
||||
if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-aerith/style-profile.css";}
|
||||
if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-aerith/style-profile-wide.css";}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
{{inc field_select.tpl with $field=$line_height}}{{endinc}}
|
||||
|
||||
{{inc field_select.tpl with $field=$resolution}}{{endinc}}
|
||||
|
||||
<div class="settings-submit-wrapper">
|
||||
<input type="submit" value="$submit" class="settings-submit" name="diabook-aerith-settings-submit" />
|
||||
</div>
|
||||
|
|
|
@ -11,8 +11,9 @@ function theme_content(&$a){
|
|||
|
||||
$font_size = get_pconfig(local_user(), 'diabook-blue', 'font_size' );
|
||||
$line_height = get_pconfig(local_user(), 'diabook-blue', 'line_height' );
|
||||
$resolution = get_pconfig(local_user(), 'diabook-blue', 'resolution' );
|
||||
|
||||
return diabook_form($a,$font_size, $line_height);
|
||||
return diabook_form($a,$font_size, $line_height,$resolution);
|
||||
}
|
||||
|
||||
function theme_post(&$a){
|
||||
|
@ -22,6 +23,7 @@ function theme_post(&$a){
|
|||
if (isset($_POST['diabook-blue-settings-submit'])){
|
||||
set_pconfig(local_user(), 'diabook-blue', 'font_size', $_POST['diabook-blue_font_size']);
|
||||
set_pconfig(local_user(), 'diabook-blue', 'line_height', $_POST['diabook-blue_line_height']);
|
||||
set_pconfig(local_user(), 'diabook-blue', 'resolution', $_POST['diabook-blue_resolution']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,33 +31,43 @@ function theme_post(&$a){
|
|||
function theme_admin(&$a){
|
||||
$font_size = get_config('diabook-blue', 'font_size' );
|
||||
$line_height = get_config('diabook-blue', 'line_height' );
|
||||
$resolution = get_config('diabook-blue', 'resolution' );
|
||||
|
||||
return diabook_form($a,$font_size, $line_height);
|
||||
return diabook_form($a,$font_size, $line_height,$resolution);
|
||||
}
|
||||
|
||||
function theme_admin_post(&$a){
|
||||
if (isset($_POST['diabook-blue-settings-submit'])){
|
||||
set_config('diabook-blue', 'font_size', $_POST['diabook-blue_font_size']);
|
||||
set_config('diabook-blue', 'line_height', $_POST['diabook-blue_line_height']);
|
||||
set_config('diabook-blue', 'resolution', $_POST['diabook-blue_resolution']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function diabook_form(&$a, $font_size, $line_height){
|
||||
function diabook_form(&$a, $font_size, $line_height, $resolution){
|
||||
$line_heights = array(
|
||||
"1.4"=>"1.4",
|
||||
"1.3"=>"1.3",
|
||||
"---"=>"---",
|
||||
"1.5"=>"1.5",
|
||||
"1.4"=>"1.4",
|
||||
"1.2"=>"1.2",
|
||||
"1.1"=>"1.1",
|
||||
);
|
||||
|
||||
$font_sizes = array(
|
||||
'13'=>'13',
|
||||
"---"=>"---",
|
||||
"15"=>"15",
|
||||
'14'=>'14',
|
||||
'13.5'=>'13.5',
|
||||
'13'=>'13',
|
||||
'12.5'=>'12.5',
|
||||
'12'=>'12',
|
||||
);
|
||||
$resolutions = array(
|
||||
'normal'=>'normal',
|
||||
'wide'=>'wide',
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
@ -66,6 +78,7 @@ function diabook_form(&$a, $font_size, $line_height){
|
|||
'$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),
|
||||
'$resolution' => array('diabook-blue_resolution', t('Set resolution for middle column'), $resolution, '', $resolutions),
|
||||
));
|
||||
return $o;
|
||||
}
|
||||
|
|
Binary file not shown.
Before (image error) Size: 272 KiB After (image error) Size: 211 KiB |
2629
view/theme/diabook-blue/style-network-wide.css
Normal file
2629
view/theme/diabook-blue/style-network-wide.css
Normal file
File diff suppressed because it is too large
Load diff
2606
view/theme/diabook-blue/style-profile-wide.css
Normal file
2606
view/theme/diabook-blue/style-profile-wide.css
Normal file
File diff suppressed because it is too large
Load diff
2870
view/theme/diabook-blue/style-wide.css
Normal file
2870
view/theme/diabook-blue/style-wide.css
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,24 +1,42 @@
|
|||
<?php
|
||||
$line_height=false;
|
||||
$diabook_font_size=false;
|
||||
$resolution=false;
|
||||
$site_line_height = get_config("diabook-blue","line_height");
|
||||
$site_diabook_font_size = get_config("diabook-blue", "font_size" );
|
||||
$site_resolution = get_config("diabook-blue", "resolution" );
|
||||
|
||||
|
||||
if (local_user()) {
|
||||
$line_height = get_pconfig(local_user(), "diabook-blue","line_height");
|
||||
$diabook_font_size = get_pconfig(local_user(), "diabook-blue", "font_size");
|
||||
$resolution = get_pconfig(local_user(), "diabook-blue", "resolution");
|
||||
}
|
||||
|
||||
if ($line_height===false) $line_height=$site_line_height;
|
||||
if ($line_height===false) $line_height="1.3";
|
||||
if ($diabook_font_size===false) $diabook_font_size=$site_diabook_font_size;
|
||||
if ($diabook_font_size===false) $diabook_font_size="13";
|
||||
if ($resolution===false) $resolution=$site_resolution;
|
||||
if ($resolution===false) $resolution="normal";
|
||||
|
||||
|
||||
if($resolution == "normal") {
|
||||
if (file_exists("$THEMEPATH/style.css")){
|
||||
echo file_get_contents("$THEMEPATH/style.css");
|
||||
}
|
||||
|
||||
if($diabook_font_size == "15"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "14"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
|
@ -74,6 +92,17 @@
|
|||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.4"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
|
@ -118,3 +147,131 @@
|
|||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
if($resolution == "wide") {
|
||||
if (file_exists("$THEMEPATH/style-wide.css")){
|
||||
echo file_get_contents("$THEMEPATH/style-wide.css");
|
||||
}
|
||||
if($diabook_font_size == "15"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "14"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 14px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "13.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 13.5px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 13.5px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "13"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 13px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "12.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "12"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 12px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.4"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.4;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.3"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.3;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.2"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.2;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.1"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.1;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
|
@ -14,7 +14,9 @@ $a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
|
|||
|
||||
//change css on network and profilepages
|
||||
$cssFile = null;
|
||||
|
||||
$resolution=false;
|
||||
$resolution = get_pconfig(local_user(), "diabook-blue", "resolution");
|
||||
if ($resolution===false) $resolution="normal";
|
||||
|
||||
/**
|
||||
* prints last community activity
|
||||
|
@ -247,7 +249,8 @@ if ($a->argv[0] === "network" && local_user()){
|
|||
diabook_blue_community_info();
|
||||
|
||||
// CUSTOM CSS
|
||||
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network.css";
|
||||
if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network.css";}
|
||||
if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-network-wide.css";}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -260,7 +263,8 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
|
|||
diabook_blue_community_info();
|
||||
|
||||
// CUSTOM CSS
|
||||
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile.css";
|
||||
if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile.css";}
|
||||
if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-blue/style-profile-wide.css";}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
{{inc field_select.tpl with $field=$line_height}}{{endinc}}
|
||||
|
||||
{{inc field_select.tpl with $field=$resolution}}{{endinc}}
|
||||
|
||||
<div class="settings-submit-wrapper">
|
||||
<input type="submit" value="$submit" class="settings-submit" name="diabook-blue-settings-submit" />
|
||||
</div>
|
||||
|
|
|
@ -11,8 +11,9 @@ function theme_content(&$a){
|
|||
|
||||
$font_size = get_pconfig(local_user(), 'diabook-red', 'font_size' );
|
||||
$line_height = get_pconfig(local_user(), 'diabook-red', 'line_height' );
|
||||
$resolution = get_pconfig(local_user(), 'diabook-red', 'resolution' );
|
||||
|
||||
return diabook_form($a,$font_size, $line_height);
|
||||
return diabook_form($a,$font_size, $line_height,$resolution);
|
||||
}
|
||||
|
||||
function theme_post(&$a){
|
||||
|
@ -22,6 +23,7 @@ function theme_post(&$a){
|
|||
if (isset($_POST['diabook-blue-settings-submit'])){
|
||||
set_pconfig(local_user(), 'diabook-red', 'font_size', $_POST['diabook-red_font_size']);
|
||||
set_pconfig(local_user(), 'diabook-red', 'line_height', $_POST['diabook-red_line_height']);
|
||||
set_pconfig(local_user(), 'diabook-red', 'resolution', $_POST['diabook-red_resolution']);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -29,33 +31,43 @@ function theme_post(&$a){
|
|||
function theme_admin(&$a){
|
||||
$font_size = get_config('diabook-red', 'font_size' );
|
||||
$line_height = get_config('diabook-red', 'line_height' );
|
||||
$resolution = get_config('diabook-red', 'resolution' );
|
||||
|
||||
return diabook_form($a,$font_size, $line_height);
|
||||
return diabook_form($a,$font_size, $line_height,$resolution);
|
||||
}
|
||||
|
||||
function theme_admin_post(&$a){
|
||||
if (isset($_POST['diabook-red-settings-submit'])){
|
||||
set_config('diabook-red', 'font_size', $_POST['diabook-red_font_size']);
|
||||
set_config('diabook-red', 'line_height', $_POST['diabook-red_line_height']);
|
||||
set_config('diabook-red', 'resolution', $_POST['diabook-red_resolution']);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
function diabook_form(&$a, $font_size, $line_height){
|
||||
function diabook_form(&$a, $font_size, $line_height, $resolution){
|
||||
$line_heights = array(
|
||||
"1.4"=>"1.4",
|
||||
"1.3"=>"1.3",
|
||||
"---"=>"---",
|
||||
"1.5"=>"1.5",
|
||||
"1.4"=>"1.4",
|
||||
"1.2"=>"1.2",
|
||||
"1.1"=>"1.1",
|
||||
);
|
||||
|
||||
$font_sizes = array(
|
||||
'13'=>'13',
|
||||
"---"=>"---",
|
||||
"15"=>"15",
|
||||
'14'=>'14',
|
||||
'13.5'=>'13.5',
|
||||
'13'=>'13',
|
||||
'12.5'=>'12.5',
|
||||
'12'=>'12',
|
||||
);
|
||||
$resolutions = array(
|
||||
'normal'=>'normal',
|
||||
'wide'=>'wide',
|
||||
);
|
||||
|
||||
|
||||
|
||||
|
@ -66,6 +78,7 @@ function diabook_form(&$a, $font_size, $line_height){
|
|||
'$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),
|
||||
'$resolution' => array('diabook-red_resolution', t('Set resolution for middle column'), $resolution, '', $resolutions),
|
||||
));
|
||||
return $o;
|
||||
}
|
||||
|
|
Binary file not shown.
Before (image error) Size: 260 KiB After (image error) Size: 212 KiB |
2665
view/theme/diabook-red/style-network-wide.css
Normal file
2665
view/theme/diabook-red/style-network-wide.css
Normal file
File diff suppressed because it is too large
Load diff
2620
view/theme/diabook-red/style-profile-wide.css
Normal file
2620
view/theme/diabook-red/style-profile-wide.css
Normal file
File diff suppressed because it is too large
Load diff
2898
view/theme/diabook-red/style-wide.css
Normal file
2898
view/theme/diabook-red/style-wide.css
Normal file
File diff suppressed because it is too large
Load diff
|
@ -1,24 +1,42 @@
|
|||
<?php
|
||||
$line_height=false;
|
||||
$diabook_font_size=false;
|
||||
$resolution=false;
|
||||
$site_line_height = get_config("diabook-red","line_height");
|
||||
$site_diabook_font_size = get_config("diabook-red", "font_size" );
|
||||
$site_resolution = get_config("diabook-red", "resolution" );
|
||||
|
||||
|
||||
if (local_user()) {
|
||||
$line_height = get_pconfig(local_user(), "diabook-red","line_height");
|
||||
$diabook_font_size = get_pconfig(local_user(), "diabook-red", "font_size");
|
||||
$resolution = get_pconfig(local_user(), "diabook-red", "resolution");
|
||||
}
|
||||
|
||||
if ($line_height===false) $line_height=$site_line_height;
|
||||
if ($line_height===false) $line_height="1.3";
|
||||
if ($diabook_font_size===false) $diabook_font_size=$site_diabook_font_size;
|
||||
if ($diabook_font_size===false) $diabook_font_size="13";
|
||||
if ($resolution===false) $resolution=$site_resolution;
|
||||
if ($resolution===false) $resolution="normal";
|
||||
|
||||
|
||||
if($resolution == "normal") {
|
||||
if (file_exists("$THEMEPATH/style.css")){
|
||||
echo file_get_contents("$THEMEPATH/style.css");
|
||||
}
|
||||
|
||||
if($diabook_font_size == "15"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "14"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
|
@ -74,6 +92,17 @@
|
|||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.4"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
|
@ -118,3 +147,131 @@
|
|||
}
|
||||
";
|
||||
}
|
||||
}
|
||||
|
||||
if($resolution == "wide") {
|
||||
if (file_exists("$THEMEPATH/style-wide.css")){
|
||||
echo file_get_contents("$THEMEPATH/style-wide.css");
|
||||
}
|
||||
if($diabook_font_size == "15"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 15px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "14"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 14px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "13.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 13.5px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 13.5px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "13"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 13px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 13px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "12.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 12.5px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($diabook_font_size == "12"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
font-size: 12px;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.5"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.5;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.4"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.4;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.4;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.3"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.3;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.2"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.2;
|
||||
}
|
||||
";
|
||||
}
|
||||
if($line_height == "1.1"){
|
||||
echo "
|
||||
.wall-item-container .wall-item-content {
|
||||
line-height: 1.1;
|
||||
}
|
||||
|
||||
.wall-item-photo-container .wall-item-content {
|
||||
line-height: 1.1;
|
||||
}
|
||||
";
|
||||
}
|
||||
}
|
|
@ -14,7 +14,9 @@ $a->page['htmlhead'] .= sprintf('<script "%s" ></script>', $diabook_version);
|
|||
|
||||
//change css on network and profilepages
|
||||
$cssFile = null;
|
||||
|
||||
$resolution=false;
|
||||
$resolution = get_pconfig(local_user(), "diabook-red", "resolution");
|
||||
if ($resolution===false) $resolution="normal";
|
||||
|
||||
/**
|
||||
* prints last community activity
|
||||
|
@ -247,7 +249,8 @@ if ($a->argv[0] === "network" && local_user()){
|
|||
diabook_red_community_info();
|
||||
|
||||
// CUSTOM CSS
|
||||
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-red/style-network.css";
|
||||
if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-red/style-network.css";}
|
||||
if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-red/style-network-wide.css";}
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -260,7 +263,8 @@ if ($a->argv[0].$a->argv[1] === "profile".$a->user['nickname']){
|
|||
diabook_red_community_info();
|
||||
|
||||
// CUSTOM CSS
|
||||
$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-red/style-profile.css";
|
||||
if($resolution == "normal") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-red/style-profile.css";}
|
||||
if($resolution == "wide") {$cssFile = $a->get_baseurl($ssl_state)."/view/theme/diabook-red/style-profile-wide.css";}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -2,6 +2,8 @@
|
|||
|
||||
{{inc field_select.tpl with $field=$line_height}}{{endinc}}
|
||||
|
||||
{{inc field_select.tpl with $field=$resolution}}{{endinc}}
|
||||
|
||||
<div class="settings-submit-wrapper">
|
||||
<input type="submit" value="$submit" class="settings-submit" name="diabook-red-settings-submit" />
|
||||
</div>
|
||||
|
|
Binary file not shown.
Before (image error) Size: 270 KiB After (image error) Size: 208 KiB |
|
@ -386,7 +386,7 @@
|
|||
.hide-comments-outer {
|
||||
margin-left: 80px;
|
||||
margin-bottom: 5px;
|
||||
width: 484px;
|
||||
width: 675px;
|
||||
border-bottom: 1px solid #BDCDD4;
|
||||
border-top: 1px solid #BDCDD4;
|
||||
|
||||
|
|
|
@ -385,7 +385,7 @@
|
|||
.hide-comments-outer {
|
||||
margin-left: 80px;
|
||||
margin-bottom: 5px;
|
||||
width: 484px;
|
||||
width: 675px;
|
||||
border-bottom: 1px solid #BDCDD4;
|
||||
border-top: 1px solid #BDCDD4;
|
||||
|
||||
|
|
|
@ -417,7 +417,7 @@
|
|||
.hide-comments-outer {
|
||||
margin-left: 80px;
|
||||
margin-bottom: 5px;
|
||||
width: 684px;
|
||||
width: 675px;
|
||||
border-bottom: 1px solid #BDCDD4;
|
||||
border-top: 1px solid #BDCDD4;
|
||||
|
||||
|
@ -1360,7 +1360,7 @@ body .pageheader{
|
|||
margin-bottom: 10px;
|
||||
}
|
||||
/* wall item */
|
||||
/*marker*/
|
||||
|
||||
.tread-wrapper {
|
||||
border-bottom: 1px solid #D2D2D2;
|
||||
position: relative;
|
||||
|
@ -1369,7 +1369,7 @@ body .pageheader{
|
|||
width: 775px;
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
/*marker*/
|
||||
.wall-item-decor {
|
||||
position: absolute;
|
||||
left: 780px;
|
||||
|
|
Loading…
Reference in a new issue