Slide 1

Slide 1 text

Making a Plone Theme 10 MOST WANTED TIPS 5

Slide 2

Slide 2 text

not about PYTHON

Slide 3

Slide 3 text

not about ZOPE

Slide 4

Slide 4 text

CSS

Slide 5

Slide 5 text

PLONE 3

Slide 6

Slide 6 text

FUN

Slide 7

Slide 7 text

5

Slide 8

Slide 8 text

CENTERING THE DESIGN

Slide 9

Slide 9 text

Fixed-width design

Slide 10

Slide 10 text

Examples

Slide 11

Slide 11 text

www.stopdesign.com

Slide 12

Slide 12 text

www.zeldman.com

Slide 13

Slide 13 text

www.happycog.com

Slide 14

Slide 14 text

CSS

Slide 15

Slide 15 text

#visual-portal-wrapper { width: 980px; margin-left: auto; margin-right: auto; } width: 980px; margin-left: auto; margin-right: auto;

Slide 16

Slide 16 text

Liquid design

Slide 17

Slide 17 text

#visual-portal-wrapper { margin-left: 10%;gin-right: 10%; } margin-left: 20%; margin-right: 20%;

Slide 18

Slide 18 text

4

Slide 19

Slide 19 text

STYLES FOR DIFFERENT INTERNET EXPLORERs

Slide 20

Slide 20 text

IE = BUG

Slide 21

Slide 21 text

BUGS !=FUN

Slide 22

Slide 22 text

•IEFixes6.css •IEFixes7.css •IEFixes8.css •IEFixes8.css

Slide 23

Slide 23 text

IEFixes.css

Slide 24

Slide 24 text

in XHTML...

Slide 25

Slide 25 text

Slide 26

Slide 26 text

IEFixes.css

Slide 27

Slide 27 text

Notes

Slide 28

Slide 28 text

IE7 is cool!

Slide 29

Slide 29 text

(at least better than IE6)

Slide 30

Slide 30 text

1. Write styles for IE7 at first

Slide 31

Slide 31 text

2. Hack for others

Slide 32

Slide 32 text

How to hack?

Slide 33

Slide 33 text

for IE6 and lower

Slide 34

Slide 34 text

* html

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

#portal-top

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

Internet Explorer 7

Slide 39

Slide 39 text

Internet Explorer 6

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

Internet Explorer 7

Slide 42

Slide 42 text

Internet Explorer 6

Slide 43

Slide 43 text

No content

Slide 44

Slide 44 text

* html

Slide 45

Slide 45 text

• Valid CSS • Easy to use • Almost no chance your styles will be broken

Slide 46

Slide 46 text

3

Slide 47

Slide 47 text

STYLES ALTERATION STYLES STYLES

Slide 48

Slide 48 text

Different sections

Slide 49

Slide 49 text

Site root News Products About us Contact

Slide 50

Slide 50 text

in XHTML...

Slide 51

Slide 51 text

BODY class: string:${here/getSectionFromURL}

Slide 52

Slide 52 text

NEWS section class=“section-news”

Slide 53

Slide 53 text

PRODUCTS section class=“section-products”

Slide 54

Slide 54 text

CONTACT section class=“section-contact”

Slide 55

Slide 55 text

ABOUT US section class=“section-about-us”

Slide 56

Slide 56 text

in CSS...

Slide 57

Slide 57 text

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

Slide 58

Slide 58 text

Particular template

Slide 59

Slide 59 text

in XHTML...

Slide 60

Slide 60 text

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

Slide 61

Slide 61 text

any_cutom_view.pt

Slide 62

Slide 62 text

in CSS...

Slide 63

Slide 63 text

body.section-news { background-color: #007AC5; } body.template-any_custom_view { background-color: #fff; } ... background-color: #34BD0D;

Slide 64

Slide 64 text

Real-life example

Slide 65

Slide 65 text

Web Couturier www.webcouturier.com

Slide 66

Slide 66 text

body.section-...

Slide 67

Slide 67 text

body.template-frontpage_view

Slide 68

Slide 68 text

• it is NOT about “Changing a Theme” • slight modifications only

Slide 69

Slide 69 text

2

Slide 70

Slide 70 text

DROPDOWN MENUS MENUS ➚

Slide 71

Slide 71 text

Examples

Slide 72

Slide 72 text

www.traust.is

Slide 73

Slide 73 text

www.htmldog.com

Slide 74

Slide 74 text

Son of Suckerfish Dropdowns Suckerfish Son of the

Slide 75

Slide 75 text

Patrick Griffiths and Dan Webb

Slide 76

Slide 76 text

• Accessible • valid CSS • obvious and clean XHTML

Slide 77

Slide 77 text

Dropdowns PLONE

Slide 78

Slide 78 text

No content

Slide 79

Slide 79 text

by Paulo Lopez

Slide 80

Slide 80 text

• Plone 2.5.x, Plone 2.1.x • manual work • need to read the how-to

Slide 81

Slide 81 text

PLONE 3

Slide 82

Slide 82 text

FUN

Slide 83

Slide 83 text

• Plone 2.5.x, Plone 2.1.x • manual work • need to read the how-to

Slide 84

Slide 84 text

• Plone 3.0.x • NO manual work • NO need to read the how-to

Slide 85

Slide 85 text

New Product

Slide 86

Slide 86 text

webcouturier.dropdownmenu

Slide 87

Slide 87 text

Site’s structure

Slide 88

Slide 88 text

No content

Slide 89

Slide 89 text

No content

Slide 90

Slide 90 text

• uses INavtreeStrategy • uses SitemapQueryBuilder() • uses ‘sitemapDepth’ (default == 3) in portal_properties/navtree_properties • works in all modern browsers, incl. Safari, IE6, IE7

Slide 91

Slide 91 text

1

Slide 92

Slide 92 text

ROUNDED CORNERS

Slide 93

Slide 93 text

“Rounded corners in CSS has become sort of a holy grail”

Slide 94

Slide 94 text

About 20 different techniques

Slide 95

Slide 95 text

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

Slide 96

Slide 96 text

Pure CSS solution

Slide 97

Slide 97 text

Example Techniques

Slide 98

Slide 98 text

Initial Nifty Corners

Slide 99

Slide 99 text

• The more radius the more complex CSS • Too ugly XHTML • No hooks in Plone • People don’t like dealing with CSS if they can change images

Slide 100

Slide 100 text

Images-based solutions

Slide 101

Slide 101 text

Example Techniques

Slide 102

Slide 102 text

Sliding Doors

Slide 103

Slide 103 text

Adam Kalsey technique

Slide 104

Slide 104 text

http://tutorials.alsacreations.com

Slide 105

Slide 105 text

And so on...

Slide 106

Slide 106 text

• Plone has XHTML hooks in portlets for this • Pretty simple (but not trivial) CSS • Most of the cases use nested HTML elements • Fixed set of images for the corners • Inflexible for changes

Slide 107

Slide 107 text

JS+CSS solution

Slide 108

Slide 108 text

• The most flexible • Does not require nested elements in HTML to be put manually • Does not require additional CSS

Slide 109

Slide 109 text

Examples

Slide 110

Slide 110 text

Nifty Corners Cube

Slide 111

Slide 111 text

JQuery corners

Slide 112

Slide 112 text

• First seems not to work with borders and background images • The second one doesn’t work nice with Safari and requires JQuery

Slide 113

Slide 113 text

CurvyCorners library

Slide 114

Slide 114 text

by Cameron Cooke and Tim Hutchison

Slide 115

Slide 115 text

Pros

Slide 116

Slide 116 text

• Supports most of the modern browsers • Works with borders • Works with background images • Supports antialiased corners

Slide 117

Slide 117 text

No content

Slide 118

Slide 118 text

Cons

Slide 119

Slide 119 text

• 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

Slide 120

Slide 120 text

No content

Slide 121

Slide 121 text

Improvement of JS

Slide 122

Slide 122 text

No content

Slide 123

Slide 123 text

How it works?

Slide 124

Slide 124 text

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