denis mishunov making plone theme 10 most wanted tips

150
INTRODUCTION

Upload: wooda

Post on 23-Jan-2015

986 views

Category:

Technology


0 download

DESCRIPTION

It will be a chart of 10 small (some are not that small), but I hope useful tips for making new Plone theme. Among those might occur (the exact list might be slightly changed): 1. Center the logo 2. Makin rounded corners 3. Making dropdown shadows 4. *Under-water stones* of testing Plone theme. Places you might want to check before deployment and so on This session is supposed to cover the most wanted tips in Plone skinning process, based on questions on #plone, mailing lists and personal communications with people, making Plone themes. Target group for this session - Plone skinning beginners with basic knowledge of how Plone themes are produced and Plone skinning intermediaries. I hope this session will give people some cool ideas on how to improve their themes and work more productive in the future.

TRANSCRIPT

Page 1: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

INTRODUCTION

Page 2: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Denis MishunovPlone integrator

from Ukraine

Page 3: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

•Blue Dynamics (Austria)

•Enfold Systems (USA)

•Plone Solutions (Norway)

Page 4: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 5: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

THANK YOU

Page 6: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• My wife

• My mother

• Plone community

• Vincenzo Barone

Page 7: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 8: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

the end of introduction

Page 9: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Making a Plone Theme

Page 10: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

10 Most Wanted Tips

Page 11: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

not about PYTHON

Page 12: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

not about ZOPE

Page 13: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

CSS

Page 14: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

PLONE 3

Page 15: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

FUN

Page 16: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Start

Page 17: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

5

Page 18: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

CENTERING THE DESIGN

Page 19: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Fixed-width design

Page 20: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Examples

Page 21: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

www.stopdesign.com

Page 22: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

www.zeldman.com

Page 23: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

www.happycog.com

Page 24: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

CSS

Page 25: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

#visual-portal-wrapper {

width: 980px;

margin-left: auto;

margin-right: auto;

}

width: 980px;

margin-left: auto;

margin-right: auto;

Page 26: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Liquid design

Page 27: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

#visual-portal-wrapper {

margin-left: 10%;gin-right: 10%;

}

margin-left: 20%;

margin-right: 20%;

Page 28: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

4

Page 29: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

STYLES FOR DIFFERENT

INTERNET EXPLORERs

Page 30: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

IE = BUG

Page 31: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

BUGS !=FUN

Page 32: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Introduction

Page 33: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

•IEFixes5.css

•IEFixes6.css

•IEFixes7.css

•IEFixes8.css•IEFixes8.css

Page 34: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

IEFixes.css

Page 35: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

main_template.pt

Page 36: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

<tal:iefixstart replace="structure string:&lt;!--[if IE]&gt;" />

<style type="text/css" media="all" tal:condition="exists: portal/IEFixes.css" tal:content="string:@import url($portal_url/IEFixes.css);"> </style>

<tal:iefixend replace="structure string:&lt;![endif]--&gt;" />

<tal:iefixstart replace="structure string:&lt;!--[if IE]&gt;" />

<tal:iefixend replace="structure string:&lt;![endif]--&gt;" />

Page 37: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

[if IE]

Page 38: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

IEFixes.css

Page 39: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Notes

Page 40: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

IE7 is cool!

Page 41: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

(at least better than IE6)

Page 42: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Advises

Page 43: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

1. Write styles for IE7 at first

Page 44: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

2. Hack for others

Page 45: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

How to hack?

Page 46: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

for IE6 and lower

Page 47: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

* html

Page 48: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

How to use?

Page 49: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

#portal-top { background: #007AC5;}* html #portal-top { background: #FF8700;}

IEFixes.css

Page 50: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

#portal-top

Page 51: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

#portal-top { background: #007AC5;}* html #portal-top { background: #FF8700;}

IEFixes.css

background: #007AC5;

Page 52: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Internet Explorer 7

Page 53: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Internet Explorer 6

Page 54: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

#portal-top { background: #007AC5;}* html #portal-top { background: #FF8700;}

IEFixes.css

* html #portal-top { background: #FF8700;}

Page 55: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Internet Explorer 7

Page 56: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Internet Explorer 6

Page 57: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 58: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

#portal-top { background: #007AC5;}* html #portal-top { background: #FF8700;}

IEFixes.css

* html #portal-top { background: #FF8700;}

Page 59: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

* html

Page 60: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• Valid CSS

• Easy to use

• Almost no chance your styles will be broken

Page 61: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

3

Page 62: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

STYLESALTERATION

STYLES

Page 63: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Different sections

Page 64: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Site root

News Products

About us Contact

Page 65: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Site root

News Products

About us Contact

Page 66: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

in XHTML...

Page 67: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

BODY class:string:${here/getSectionFromURL}

Page 68: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

NEWS sectionclass=“section-news”

Page 69: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

PRODUCTS sectionclass=“section-products”

Page 70: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

CONTACT sectionclass=“section-contact”

Page 71: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

ABOUT US sectionclass=“section-about-us”

Page 72: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

in CSS...

Page 73: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

body.section-news {background-color: #007AC5;

}body.section-products {

background-color: #FF8700;}...

background-color: #007AC5;

background-color: #FF8700;

Page 74: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Particular template

Page 75: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

in XHTML...

Page 76: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

BODY class:... template-${template/id}

Page 77: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

in CSS...

Page 78: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

body.section-news {background-color: #007AC5;

}body.template-any_custom_view {

background-color: #fff;}...

background-color: #34BD0D;

Page 79: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Real-life example

Page 80: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Web Couturierwww.webcouturier.com

Page 81: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

body.section-...

Page 82: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

body.template-frontpage_view

Page 83: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• it is NOT about “Changing a Theme”

• slight modifications only

Page 84: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

2

Page 85: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

DROPDOWN MENUSMENUS➚

Page 86: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Examples

Page 87: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

www.traust.is

Page 88: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

www.htmldog.com

Page 89: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Son of Suckerfish Dropdowns Suckerfish

Page 90: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Son of Suckerfish Dropdowns

SuckerfishSon of

Page 91: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Patrick Griffiths and

Dan Webb

Page 92: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• Accessible

• valid CSS

• obvious and clean XHTML

Page 93: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Suckerfish Dropdowns

PLONE

Page 94: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Dropdowns PLONE

Page 95: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 96: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

by Paulo Lopez

Page 97: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• Plone 2.5.x, Plone 2.1.x

• manual work

• need to read the how-to

Page 98: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• Plone 3.0.x

• NO manual work

• NO need to read the how-to

Page 99: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

New Product

Page 100: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

webcouturier.dropdownmenu

Page 101: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Requires

Page 102: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

plone.browserlayer

Page 103: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

New Plone site

Page 104: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 105: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Existing Plone site

Page 106: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 107: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 108: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Site’s structure

Page 109: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 110: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 111: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• uses INavtreeStrategy

• uses SitemapQueryBuilder()

• uses ‘sitemapDepth’ (default == 3) in portal_properties/navtree_properties

• works in all modern browsers, incl. Safari, IE6, IE7

Page 112: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

1

Page 113: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

ROUNDED CORNERS

Page 114: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

“Rounded corners in CSS has become

sort of a holy grail”

Page 115: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Cornerstone of designers’ minds

Page 116: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

About 20 different techniques

Page 117: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

http://css-discuss.incutio.com/?page=RoundedCorners

Page 118: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Images-based solutions

Page 119: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Example Techniques

Page 120: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Sliding Doors

Page 121: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Adam Kalsey technique

Page 122: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

http://tutorials.alsacreations.com

Page 123: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

And so on...

Page 124: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• Plone has XHTML hooks in portlets for this

• Pretty simple CSS

• Most of the cases use nested HTML elements

• Fixed set of images for the corners

• Inflexible for changes

Page 125: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Inflexible

Page 126: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Pure CSS solution

Page 127: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Example Techniques

Page 128: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Initial Nifty Corners

Page 129: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• Not too complex CSS

• Too ugly XHTML

• No hooks in Plone

• People don’t like dealing with CSS if they can change images

Page 130: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

JS+CSS solution

Page 131: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• The most flexible

• Does not require nested elements in HTML

• Does not require additional CSS

Page 132: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Examples

Page 133: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Nifty Corners Cube

Page 134: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

JQuery corners

Page 135: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• First seems not to work with borders and background images

• The second one doesn’t work nice with Safari and requires JQuery

Page 136: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

CurvyCorners library

Page 137: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

by Cameron Cooke

and Tim Hutchison

Page 138: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Pros

Page 139: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• Supports most of the modern browsers

• Works with borders

• Works with background images

• Supports antialiased corners

Page 140: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 141: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 142: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Cons

Page 143: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

• Some obvious problems when background images are used and box has different radiuses

• Other small issues when used with other rounded boxes - box shifts to the top or bottom

Page 144: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 145: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

Improvement of JS

Page 146: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips
Page 147: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

How it works?

Page 148: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

http://www.curvycorners.net/usage.php

Page 149: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

New Product

Page 150: Denis Mishunov   Making Plone Theme   10 Most Wanted Tips

webcouturier.roundedcorners