Pixelpost

Authentic Photoblog Flavour


Go Back   Pixelpost Forum > DEVELOPMENT > Template design and Front-End Code

Post Reply
 
Thread Tools
  #1  
Old 02-04-2008, 10:36 AM
trcharlie Offline
forum loafer
 
Join Date: Jan 2008
Posts: 14
Simplicious Modification

I did some modifications to the famous template 'simplicious' which is originally done by Jay Soto! As I wanted a few 'special things' in my blog to individualize it, I created those mods:
-display and fading of categorys and tags in browse
-display and fading of a contact form in about
-adjusting the focal length, depending on camera (with @35mm addon)
-renaming my Ricoh GRD II

So here I will show you, what I've done and how you can do it in 'your style'.

################################################## ###

first, the category and tag thing in browse:

We need two files. once the template file (browse_template.html) in your /templates/simplicious folder. In this file, we add the js-files into the head-section:
HTML Code:
<script src="templates/simplicious/scripts/prototype.js" type="text/javascript"></script>
<script src="templates/simplicious/scripts/scriptaculous.js?load=effects" type="text/javascript"></script>
<script type="text/javascript" src="templates/simplicious/js/jquery.js"></script>
<script type="text/javascript" src="templates/simplicious/js/interface.js"></script>

<script type="text/javascript" src="templates/simplicious/scripts/image_fade.js"></script>

<!--[if lt IE 7]>
 <style type="text/css">
 div, img { behavior: url(templates/simplicious/iepngfix.htc) }
 </style>
<![endif]-->
(I deleted the styleswitcher for myself, you may leave him in)

next, we create the link we need for fading:
the link wrappend around 'category' should be changed to the following
HTML Code:
<a onclick="Effect.toggle('info','BLIND'); return false;" title="View Categories and Tags" href="#">
And at least, add after <!--END main content--> the following:
HTML Code:
<div id="info" style="padding:5px;<CUST_DISPLAY>">
		CATEGORIES:<br />
		<CATEGORY_LINKS_AS_LIST>
		<br /><br />
		<div id="warchives" style=";position:relative;bottom:10px;">
		TAGS:<br />
		<TAG_LINKS_AS_LIST>
		</div>
		</div>
now we are done with this file, save it and create a new file in your addons-folder.
I named mine browse_display.php. Into this file, put the following code and save it:
PHP Code:
<?php
if($_GET['x']=='browse'){
    if(!empty(
$_GET['category']) OR !empty($_GET['tag'])){
        
$display '';
    }    else {
        
$display 'display:none;';
    }



            
$tpl str_replace("<CUST_DISPLAY>",$display,$tpl);
        
    
}


// Formal add-on information
$addon_name "Browse Display";
$addon_description "This addon decides wether to display the panel on browse or not.";
$addon_version "1.0";
?>
Upload both files, activate the addon in the adminpanel and enjoy (hopefully )

################################################## ###

second, the contact form which fades in in the about page:

We also need two files here. First, the about-template (template/simplicious/about_template.html).
Open it and add also the js-code from above into the headsection.
The link for the contact-form should look like this:
HTML Code:
<a onclick="Effect.toggle('info','BLIND'); Effect.toggle('mehh','BLIND');return false;" title="contact me" href="#">
replace the image with the following:
HTML Code:
<img src="templates/simplicious/images/me.jpg" alt="" border="0" id="mehh" style="display:<IMG_DISP_INC>;"/>
		<div id="info" style="display:<INFO_DISP_INC>;width:600px;">
	<EMAIL_FORM_INC>
		</div>
We're done with this now, save it and open another new addon-file in the addons-folder.
I named mine mail_form.php but it doesn't matter. In this file add the following php-code:
PHP Code:
<?php


if($_GET['x']=='about'){

        
        
        if(
$_GET['sent']==1)    {
            
$row sql_array("select email from ".$pixelpost_db_prefix."config order by id DESC limit 0,1");
        
$empf=$row[0];
            
//Form-Verarbeitung
            
$cont='';
            
$name=trim($_POST['name']);
            
$mail=trim($_POST['mail']);
            
$subj=trim($_POST['subject']);
            
$msg=trim($_POST['message']);
            if(empty(
$name) OR empty($mail) OR empty($subject) OR empty($message)){
                
header('Location: index.php?x=about&err=1');
                exit;
            }
            
$msg=nl2br($msg);
            
//Verarbeiten wir das Ding:
            
$message '<html>
    <head>
        <title>picnic.at - Eine neue Nachricht!</title>
    </head>
    <body>
    <u>Betreff:</u><br />
    '
.$subj.'<br /><br />
    <u>Nachricht:</u><br />
     '
.$msg.'<br /><br />
     <u>Name:</u><br />
     '
.$name.'</u><br />
     <u>Mail:</u><br />
     '
.$mail.'<br />
    </body>
</html>
'
;
            
$ms_copy='<html>
    <head>
        <title>picnic.at - Eine neue Nachricht!</title>
    </head>
    <body>
    Dies ist eine Kopie Ihrer Nachricht auf picnic.at an Bernhard Binder!
    <br />
    <u>Betreff:</u><br />
    '
.$subj.'<br /><br />
    <u>Nachricht:</u><br />
     '
.$msg.'<br /><br />
     <u>Name:</u><br />
     '
.$name.'</u><br />
     <u>Mail:</u><br />
     '
.$mail.'<br />
    </body>
</html>
'
;            
            
            
$headers .= 'From:' $mail "\n";
$headers .= 'Reply-To:' $mail "\n"
$headers .= 'X-Mailer: PHP/' phpversion() . "\n"
$headers .= 'X-Sender-IP: ' $REMOTE_ADDR "\n"
$headers .= "Content-type: text/html\n";
mail($empf'picnic.at - '.$subj$message$headers);        
mail($mail'picnic.at - Kopie: '.$subj$ms_copy$headers);
                
            
$img_disp='none';
            
$info_disp='visible';
            
$cont='Vielen Dank f&uuml;r Ihre Nachricht! <br />
Eine Kopie Ihrer Nachricht wurde an Ihre Email-Adresse gesendet!'
;            
        }    else {
            
$cont='';
            if(
$_GET['err']==1)    {
                
$cont.='FEHLER!<br />Es sind nicht alle Felder ausgef&uuml;ellt!';
            }
            
$cont.='<form name="contact" method="post" action="index.php?x=about&amp;sent=1">';
            
$cont.='<table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin: 5px;">
  <tr>
    <td height="19" colspan="2" valign="bottom" class="maildesc">Vor-und Zuname<span class="mailred">*</span>: </td>
    </tr>
  <tr>

    <td width="32" height="1"></td>
    <td width="297"></td>
    </tr>
  <tr>
    <td height="22" colspan="2" valign="top">
        <input tabindex="1" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="name" type="text" id="name" size="30" />
    </td>
    </tr>
  <tr>

    <td height="19" colspan="2" valign="top" class="maildesc">E-Mail<span class="mailred">*</span>:</td>
    </tr>
  <tr>
    <td height="22" colspan="2" valign="top">
      <input tabindex="2" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="mail" type="text" id="mail" size="30" />    </td>
    </tr>
  <tr>

    <td height="19" colspan="2" valign="top" class="maildesc">Betreff<span class="mailred">*</span>:</td>
    </tr>
  <tr>
    <td height="22" colspan="2" valign="top">
      <input tabindex="3" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="subject" type="text" id="subject" size="30" />    </td>
    </tr>
  <tr>
    <td height="19" colspan="2" valign="top" class="maildesc">Nachricht<span class="mailred">*</span>:</td>

    </tr>
  <tr>
    <td height="120" colspan="2" valign="top">
      <textarea tabindex="5" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="message" cols="40" rows="6" id="message"></textarea>    </td>
    </tr>
  <tr>
    <td height="2"></td>
    <td></td>
    </tr>

  <tr>
    <td height="2"></td>
    <td></td>
    </tr>
  <tr>
    <td height="7"></td>
    <td></td>
    </tr>

  <tr>
    <td height="15" colspan="2" valign="top">
        <div align="left">
<input type="submit" value=" SEND ">
                                                                              </div></td>
    </tr>
</table>'
;
            
            
$cont.='</form>';
            if(
$_GET['err']==1)    {
                
$img_disp='none';
            
$info_disp='visible';
            }    else {
            
$img_disp='visible';
            
$info_disp='none';
            }
        }

            
$tpl str_replace("<EMAIL_FORM_INC>",$cont,$tpl);
            
$tpl str_replace("<INFO_DISP_INC>",$info_disp,$tpl);
            
$tpl str_replace("<IMG_DISP_INC>",$img_disp,$tpl);
            
    }
    


// Formal add-on information
$addon_name "adds an emailForm to PP";
$addon_description "Adds an simple Email-Form";
$addon_version "1.0";
?>
customize the text which you get displayed in the sent mail-messages.
Well that's it, upload both files, activate the addon and try. BTW, the addon takes the mail-adressed saved in your PP-adminpanel.

################################################## ###
Reply With Quote
  #2  
Old 02-04-2008, 10:37 AM
trcharlie Offline
forum loafer
 
Join Date: Jan 2008
Posts: 14
third, the tag-customize:
I had some trooubles with my Ricoh GRD II and Canon 5D. If I display the exif-tag of the camera model, I see 'Canon EOS 5D' and 'GR Digital 2'. But I want to display the Brand of the GRD2 also. So I made this little snippet:
PHP Code:
<?php

if(!isset($_GET['x']) OR (isset($_GET['showimage']) AND !isset($_GET['x']))) {
    
// Get Current Image.
    
if($_GET['showimage'] == "") {
        
$row sql_array("select exif_info from ".$pixelpost_db_prefix."pixelpost order by datetime DESC limit 0,1");
    } else {
         
$row sql_array("select exif_info from ".$pixelpost_db_prefix."pixelpost where (id='".$_GET['showimage']."')");
    }
    
    
// The addon is only applicable if EXIF-info exists on the image
    
if(isset($row['exif_info'])) {
        
$exif_info $row['exif_info'];

        
// Just in case the exif_functions aren't loaded, we include them here (thanks to Oxidizer for pointing out the problem and suggesting a fix)
        
if(!function_exists("unserialize_exif")){
            include(
"../includes/functions_exif.php");
        }
        
// Decoding the EXIF
        
$exif_result=unserialize_exif($exif_info); // Using the function from functions_exif.php.

        
$camera trim($exif_result['ModelIFD0']);
    if(
$camera=="GR DIGITAL 2"){
        
$camera "Ricoh GRD II";
    }

        
// Replacement of the tag takes place

            
$tpl str_replace("<EXIF_CAMERA_MODEL_RICOH>",$camera,$tpl);
        
    }
}


// Formal add-on information
$addon_name "Ricoh GRD II Name";
$addon_description "This addon enables the tag &lt;EXIF_CAMERA_MODEL_RICOH&gt;, which shows the correct name for a ricoh GRD II<br /><br />Version 1.1 and above is made for Pixelpost v. 1.6 and will only work with this version or later.";
$addon_version "1.0";
?>
It's based on the exif-code from the 35mm addon by Xerxes. In your image_template.html you have to change the normal EXIF_CAMERA_MODEL to the
HTML Code:
<EXIF_CAMERA_MODEL_RICOH>
.

And at least I wanted the 35mm addon to display the crop and, if i've done the shot with my 5D, to display that there is no crop (fullframe)
I realized that in this way, basically it's the 35mm addon by xerxes (http://www.pixelpost.org/extend/addons/35-mm/)
PHP Code:
<?php
/*
35mm.php - Pixelpost Add-on

This addon enables the tag <EXIF_FOCAL_LENGTH_35MM>, which shows the focal length as is would be, if the image were taken with a 35mm film camera. In order for this to work, you must specify the focal length multiplier for each of your cameras in the top of the file 35mm.php in your addon directory.

Version 1.1 and above is updated for Pixelpost v. 1.6 and will only work with this version or later.

--- Changelog ---
v. 1.5
- Made sure the exif_functions are included. Thanks to Oxidizer.
- Added a bunch of new cameras, also thanks to Oxidizer.

v. 1.4
- Bug disabling the add-on in future posts fixed
- Canon EOS Digital Rebel XTi added

v. 1.3
- Fixed bug which broke the View on map-link when working with the GoogleMap addon (http://www.schonhose.nl/pixelpost-addons/)
- Added additional documentation/comments

v. 1.2
- Fixed critical bug in archive and browse-pages

v. 1.1
- Upgraded to support Pixelpost v. 1.6

v. 1.0
- Added support for multiple cameras
- Started changelog


--- Configuration ---
Use this to configure the multiplier used to convert to 35 mm equivalent scale.
Add a line for each of the cameras that will be used on your site.
Make sure the name of the camera exactly matches the name in the exif-data.
*/

$focal_multiplier['C8080WZ'] = 3.94366197;
$focal_multiplier['u720SW,S720SW'] = 5.67164179;
$focal_multiplier['NIKON D200'] = 1.5;
$focal_multiplier['NIKON D50'] = 1.5;
$focal_multiplier['Canon EOS DIGITAL REBEL XTi'] = 1.6;
$focal_multiplier['Canon EOS DIGITAL REBEL'] = 1.6;
$focal_multiplier['Canon EOS 400D DIGITAL'] = 1.6;
$focal_multiplier['Canon EOS Kiss Digital X'] = 1.6;
$focal_multiplier['Canon EOS 10D'] = 1.6;
$focal_multiplier['Canon EOS 20D'] = 1.6;
$focal_multiplier['Canon EOS 30D'] = 1.6;
$focal_multiplier['Canon EOS-1D'] = 1.3;
$focal_multiplier['Canon EOS-1D Mark II'] = 1.3;
$focal_multiplier['Canon EOS-1D Mark III'] = 1.3;
$focal_multiplier['Canon EOS-1DS'] = 1;
$focal_multiplier['Canon EOS 5D'] = 1;
$focal_multiplier['Canon EOS 300D DIGITAL'] = 1.6;
$focal_multiplier['GR DIGITAL 2'] = 4.74;
$focal_multiplier['Ricoh GRD II'] = 4.74;

/*
--- End of configuration-section. Do not edit below this line (unless you know what you're doing ;-)) ---
*/

// The add-on will only run on pages showing an image
if(!isset($_GET['x']) OR (isset($_GET['showimage']) AND !isset($_GET['x']))) {
    
// Get Current Image.
    
if($_GET['showimage'] == "") {
        
$row sql_array("select exif_info from ".$pixelpost_db_prefix."pixelpost order by datetime DESC limit 0,1");
    } else {
         
$row sql_array("select exif_info from ".$pixelpost_db_prefix."pixelpost where (id='".$_GET['showimage']."')");
    }
    
    
// The addon is only applicable if EXIF-info exists on the image
    
if(isset($row['exif_info'])) {
        
$exif_info $row['exif_info'];

        
// Just in case the exif_functions aren't loaded, we include them here (thanks to Oxidizer for pointing out the problem and suggesting a fix)
        
if(!function_exists("unserialize_exif")){
            include(
"../includes/functions_exif.php");
        }
        
// Decoding the EXIF
        
$exif_result=unserialize_exif($exif_info); // Using the function from functions_exif.php.

        
$focal $exif_result['FocalLengthSubIFD'];

        
$wismm pos($focal ,'mm');

        
$camera trim($exif_result['ModelIFD0']);

        if(
$focal_multiplier[$camera] != '') { // If the camera model is not existing in top of this file, a ? will be shown.
            
$focal35 round(substr($focal,0,$wismm-1)*$focal_multiplier[$camera]);
        } else {
            
$focal35 "?";
        }

        
$focal35 .= " mm";

        
// Replacement of the tag takes place
        
if($focal != "") {
            if(
$focal_multiplier[$camera]>1)    {
                
$repl $focal.' ('.$focal35.' @ 35 mm / Crop: '.$focal_multiplier[$camera].')';
            }    elseif(
$focal_multiplier[$camera]==1)    {
                
$repl $focal.' (fullframe)';
            }    else {
                
$repl '-';
            }
            
$tpl str_replace("<EXIF_FOCAL_LENGTH_35MM>",$repl,$tpl);
        }
    }
}


// Formal add-on information
$addon_name "35mm equivalent focal-info";
$addon_description "This addon enables the tag &lt;EXIF_FOCAL_LENGTH_35MM&gt;, which shows the focal length as is would be, if the image were taken with a 35mm film camera. In order for this to work, you must specify the focal length mulitplier for each of your cameras in the top of the file 35mm.php in your addon directory.<br /><br />Version 1.1 and above is made for Pixelpost v. 1.6 and will only work with this version or later.";
$addon_version "1.5";
?>
Last thing to do is to change the EXIF_FOCAL_LENGTH to EXIF_FOCAL_LENGTH_35MM.
################################################## ###
Reply With Quote
  #3  
Old 02-04-2008, 10:50 AM
byrt Offline
pp veteran
 
Join Date: Oct 2006
Posts: 51
Hi
Let me be the first to say thank you, amazing work.

Christian
Reply With Quote
  #4  
Old 02-04-2008, 09:34 PM
kulayphoto Offline
pp regular
 
Join Date: Apr 2006
Location: San Francisco
Posts: 24
Nice...but

Great addon, one request though...

I don't know any German so I tried to translate into English, I hope I got it right!

I always get the error message when I submit the form, even when all fields are complete...any ideas why?

Thanks!
__________________
Paul
www.kulayphotography.com
Reply With Quote
  #5  
Old 02-05-2008, 05:09 AM
trcharlie Offline
forum loafer
 
Join Date: Jan 2008
Posts: 14
hm,, maybe you changed something in the php-file? if so, please tell me what you changed.
Reply With Quote
  #6  
Old 02-05-2008, 04:16 PM
kulayphoto Offline
pp regular
 
Join Date: Apr 2006
Location: San Francisco
Posts: 24
Hi

No, I don't think I changed anything.

here's my exact PHP file...

<?php


if($_GET['x']=='about'){



if($_GET['sent']==1) {
$row = sql_array("select email from ".$pixelpost_db_prefix."config order by id DESC limit 0,1");
$empf=$row[0];
//Form-Verarbeitung
$cont='';
$name=trim($_POST['name']);
$mail=trim($_POST['mail']);
$subj=trim($_POST['subject']);
$msg=trim($_POST['message']);
if(empty($name) OR empty($mail) OR empty($subject) OR empty($message)){
header('Location: index.php?x=about&err=1');
exit;
}
$msg=nl2br($msg);
//Verarbeiten wir das Ding:
$message = '<html>
<head>
<title>Kulay Photography</title>
</head>
<body>
<u>Website:</u><br />
'.$subj.'<br /><br />
<u>Comments:</u><br />
'.$msg.'<br /><br />
<u>Name:</u><br />
'.$name.'</u><br />
<u>Mail:</u><br />
'.$mail.'<br />
</body>
</html>
';

$ms_copy='<html>
<head>
<title>Kulay Photography</title>
</head>
<body>
This is a copy of the message you sent to Kulay Photography!
<br />
<u>Website:</u><br />
'.$subj.'<br /><br />
<u>Comments:</u><br />
'.$msg.'<br /><br />
<u>Name:</u><br />
'.$name.'</u><br />
<u>Mail:</u><br />
'.$mail.'<br />
</body>
</html>
';


$headers .= 'From:' . $mail . "\n";
$headers .= 'Reply-To:' . $mail . "\n";
$headers .= 'X-Mailer: PHP/' . phpversion() . "\n";
$headers .= 'X-Sender-IP: ' . $REMOTE_ADDR . "\n";
$headers .= "Content-type: text/html\n";
mail($empf, 'kulayphotography.com - '.$subj, $message, $headers);
mail($mail, 'Kulayphotography.com - Copy: '.$subj, $ms_copy, $headers);

$img_disp='none';
$info_disp='visible';

$cont='Thanks for your comment! <br />
A copy has been sent to the E-Mail address you provided!';
} else {
$cont='';
if($_GET['err']==1) {
$cont.='Ooops!<br />Please complete all fields.';
}
$cont.='<form name="contact" method="post" action="index.php?x=about&amp;sent=1">';
$cont.='<table width="100%" border="0" cellpadding="0" cellspacing="0" style="margin: 5px;">
<tr>
<td height="19" colspan="2" valign="bottom" class="maildesc">Name<span class="mailred">*</span>: </td>
</tr>
<tr>

<td width="32" height="1"></td>
<td width="297"></td>
</tr>
<tr>
<td height="22" colspan="2" valign="top">
<input tabindex="1" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="name" type="text" id="name" size="30" />
</td>
</tr>
<tr>

<td height="19" colspan="2" valign="top" class="maildesc">E-Mail<span class="mailred">*</span>:</td>
</tr>
<tr>
<td height="22" colspan="2" valign="top">
<input tabindex="2" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="mail" type="text" id="mail" size="30" /> </td>
</tr>
<tr>

<td height="19" colspan="2" valign="top" class="maildesc">Website<span class="mailred">*</span>:</td>
</tr>
<tr>
<td height="22" colspan="2" valign="top">
<input tabindex="3" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="subject" type="text" id="subject" size="30" /> </td>
</tr>
<tr>
<td height="19" colspan="2" valign="top" class="maildesc">Comments<span class="mailred">*</span>:</td>

</tr>
<tr>
<td height="120" colspan="2" valign="top">
<textarea tabindex="5" onfocus="this.style.background=\'#CECECE\'" onblur="this.style.background=\'#EAEAEA\'" class="mailblackborder" name="message" cols="40" rows="6" id="message"></textarea> </td>
</tr>
<tr>
<td height="2"></td>
<td></td>
</tr>

<tr>
<td height="2"></td>
<td></td>
</tr>
<tr>
<td height="7"></td>
<td></td>
</tr>

<tr>
<td height="15" colspan="2" valign="top">
<div align="left">
<input type="submit" value=" SEND ">
</div></td>
</tr>
</table>';

$cont.='</form>';
if($_GET['err']==1) {
$img_disp='none';
$info_disp='visible';
} else {
$img_disp='visible';
$info_disp='none';
}
}

$tpl = str_replace("<EMAIL_FORM_INC>",$cont,$tpl);
$tpl = str_replace("<INFO_DISP_INC>",$info_disp,$tpl);
$tpl = str_replace("<IMG_DISP_INC>",$img_disp,$tpl);

}



// Formal add-on information
$addon_name = "adds an emailForm to PP";
$addon_description = "Adds an simple Email-Form";
$addon_version = "1.0";
?>
__________________
Paul
www.kulayphotography.com
Reply With Quote
  #7  
Old 02-06-2008, 01:55 AM
byrt Offline
pp veteran
 
Join Date: Oct 2006
Posts: 51
Hi
I also do not get the mail form? not sure where is the message going to? I have not change anything in it.
Reply With Quote
  #8  
Old 02-07-2008, 02:29 PM
trcharlie Offline
forum loafer
 
Join Date: Jan 2008
Posts: 14
@kulay: the error have to be here:
PHP Code:
if(empty($name) OR empty($mail) OR empty($subject) OR empty($message)){
header('Location: index.php?x=about&err=1');
exit;

if you delete them, and get the mails, the form itself is working, just the errordetection isn't. If you get no mails, we have a problem. I tried your php-code on my server, and it's ok.

Maybe both of you want to contact me over skyoe or icq for errordiagnostics

regards, bernhard
Reply With Quote
  #9  
Old 02-07-2008, 10:37 PM
kulayphoto Offline
pp regular
 
Join Date: Apr 2006
Location: San Francisco
Posts: 24
Hi Bernhard

That worked for me, thank you!

Regards

Paul
__________________
Paul
www.kulayphotography.com
Reply With Quote
  #10  
Old 02-08-2008, 11:10 AM
byrt Offline
pp veteran
 
Join Date: Oct 2006
Posts: 51
hi

Thanks Bernhard, got it working. Much appreciated.
Regards
Christian
Reply With Quote
Post Reply


Thread Tools




All times are GMT. The time now is 03:33 PM.

Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd. | Style Design: d3 designs