Pure css skinning with menu box and menu

60
1. European Day of DotNetNuke @ Paris - Session Pure CSS skinning with Menu Box and Menu Factory Mikita Mikado Serge Barysiuk 6

description

The presentation we gave together with Mikita Mikado at The First European Day of DotNetNuke in Paris. It show how you can create a nice navigation menu for DotNetNuke.

Transcript of Pure css skinning with menu box and menu

Page 1: Pure css skinning with menu box and menu

1. European Day of DotNetNuke @ Paris - Session

Pure CSS skinning with Menu Box and Menu Factory

Mikita MikadoSerge Barysiuk

6

Page 2: Pure css skinning with menu box and menu

2

Coding Staff Inc.

Mikita MikadoCEO, Coding Staff Inc.

Expertise: DNN Skinning UI Design Online Marketing

Serge BarysiukCTO, Coding Staff Inc.

Expertise: JavaScript (jQuery,

qooxdoo, …) RIA Development Application Architecture

Page 3: Pure css skinning with menu box and menu

3

Agenda

• A new menu platform concept• Menu Box how it is• A menu theme under the hood and how to

create your own

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 4: Pure css skinning with menu box and menu

4

DotNetNuke design concept

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

• Ability to install a new design with no coding• Separation between CMS and site design• Design is page-specific• Control design of every element of the site

with skins and containers

Page 5: Pure css skinning with menu box and menu

5

What are the parts of the skin?

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Containers

Navigation

Layout

Page 6: Pure css skinning with menu box and menu

6

DotNetNuke skin parts

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Skins Containers

+ +Navigation

Page 7: Pure css skinning with menu box and menu

7

DotNetNuke skin parts

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Skins & Containers are reusable.

Navigation is a part of the skin.

Page 8: Pure css skinning with menu box and menu

8

What if we would have…

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Skins Containers

+ +Navigation

Page 9: Pure css skinning with menu box and menu

9

… it would be handy.

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

… and we decided to go custom. Why?!

Page 10: Pure css skinning with menu box and menu

10

Problems with existing solutions

• DNN navigation is time consuming to skin;• DNN Navigation is not SEO friendly, not

optimized and not flexible;• Third party modules are too developer-centric

and not-easy to integrate and create a theme.

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 11: Pure css skinning with menu box and menu

11

5 ideas behind the platform

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

5

5 the most important ideas behind the platform.

Page 12: Pure css skinning with menu box and menu

12

5 ideas behind the platform

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

1

Menu is a separate part of the skin.

Page 13: Pure css skinning with menu box and menu

13

5 ideas behind the platform

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

2

Menu theme could be shared and easily installed without a need to

be a programmer.

Page 14: Pure css skinning with menu box and menu

14

5 ideas behind the platform

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

3

High extensibility in terms of structure, presentation and behavior.

Page 15: Pure css skinning with menu box and menu

15

5 ideas behind the platform

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

4

Easy themes creation reusing thousands of scripts and menus

across the web.

Page 16: Pure css skinning with menu box and menu

16

5 ideas behind the platform

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

5

… and finally an open platform to build state of the art menus.

Page 17: Pure css skinning with menu box and menu

17

Meet Menu Box

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 18: Pure css skinning with menu box and menu

18

Menu Box Motto

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

There are no limitations but your own imagination.

Page 19: Pure css skinning with menu box and menu

19

Menu Box Concept

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

ThemesBox

Put themes into the box.

Page 20: Pure css skinning with menu box and menu

20

Using the module as…

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

DNN Module Skins Object

Page 21: Pure css skinning with menu box and menu

21

Installing a theme

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 22: Pure css skinning with menu box and menu

22

Using the module for…

• … main DNN navigation.• … sub navigation for inner pages.• … site map.• … page index.

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 23: Pure css skinning with menu box and menu

23

Menu Theme

Menu theme under the hood

Page 24: Pure css skinning with menu box and menu

24

What is a theme?

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

+ +=Menu Theme Structure

(HTML)Presentation

(CSS)Behavior

(JS)

Page 25: Pure css skinning with menu box and menu

25

What is a theme?

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Structure(HTML)

Presentation(CSS)

Behavior(JS)

How theme is rendered.

How theme looks like.

How theme acts.

Page 26: Pure css skinning with menu box and menu

26

What is a theme?

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

css

html

images

js

skin.xml

CSS files used for the theme

HTML templates to render structure

Images used in the theme

JavaScript libraries used in the theme

Theme manifest file

Page 27: Pure css skinning with menu box and menu

27

Menu theme manifest

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Manifest file connects all them together.

Structure(HTML)

Presentation(CSS)

Behavior(JS)

Theme Manifest(skin.xml)

Page 28: Pure css skinning with menu box and menu

28

Menu theme manifest (skin.xml)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Theme name and additional information

HTML templates declaration

JavaScript files and inline scripts declaration

CSS files declaration

Theme Manifest(skin.xml)

=

Page 29: Pure css skinning with menu box and menu

29Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

0 Theme meta info

Page 30: Pure css skinning with menu box and menu

30

Menu theme manifest (skin.xml)

<?xml version="1.0" encoding="utf-8"?>

<skin>

<skin_id>AnimatedDropdownMenu</skin_id>

<skin_image>skin_preview.png</skin_image>

<template_name>Animated Dropdown Menu</template_name>

<description>Drop down menus are a really convient way to fit a large menu into a really small initial space. This menu based on tutorial by www.clarklab.net. Note: This menu shows only top-level menu items.</description>

<default>false</default>

<version>1.0</version>

 

...

 </skin>

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

General information about the theme

Page 31: Pure css skinning with menu box and menu

31

Menu themes management

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 32: Pure css skinning with menu box and menu

32

Structure (HTML)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

1 Structure (HTML)

Page 33: Pure css skinning with menu box and menu

33

Structure (HTML)

Main points:- Easy customizable- Easy understandable

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 34: Pure css skinning with menu box and menu

34

Structure (HTML)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

WrapperNode (Level 1)

Node (Level 2)

Node (Level 2)

Node (Level 2)

Node (Level 2)

Node (Level 1)

……

Node (Level 1)

WrapperTemplate.ascx

NodeTemplate.ascx

Page 35: Pure css skinning with menu box and menu

35

Structure (HTML)

<div class="<%= CssClass%>" id="<%= ClientContainerID %>">

<ul class="topnav">

<asp:repeater runat="server" id="Menu">

<ItemTemplate>

<uc:NodeItem runat="server" Node="<%# Container.DataItem %>“/>

</ItemTemplate>

</asp:repeater>

</ul>

</div>

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

WrapperTemplate.ascx

Page 36: Pure css skinning with menu box and menu

36

<li class='<%=(IsActive ? "current" : "") %>'>

<a href="<%= Node.NavigateURL %>"><%= Node.Text %></a>

<% if (HasChildren)

{%>

<ul class="subnav">

<asp:PlaceHolder runat="server" ID="phChildNodes"></asp:PlaceHolder>

</ul>

<%} %></li>

Structure (HTML)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

NodeTemplate.ascx

Additional properties: IsLast, IsFirst, Level, Node.*

Page 37: Pure css skinning with menu box and menu

37

Registering renderer in manifest

<?xml version="1.0" encoding="utf-8"?>

<skin>

...

<html>

<renderer>html/WrapperTemplate.ascx</renderer>

</html>

...

</skin>

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 38: Pure css skinning with menu box and menu

38

Structure (HTML)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Done!

Page 39: Pure css skinning with menu box and menu

39

Presentation (CSS)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

2 Presentation (CSS)

Page 40: Pure css skinning with menu box and menu

40

Presentation (CSS)

Main points:- No predefined CSS classes names- No any specific about the module, just CSS

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 41: Pure css skinning with menu box and menu

41

Presentation (CSS)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

css CSS files used for the theme

styles.css

theme.css

Page 42: Pure css skinning with menu box and menu

42

Presentation (CSS)

<?xml version="1.0" encoding="utf-8"?>

<skin>

...

<css>

<files>

<file>

<path>css/styles.css</path>

</file>

<file>

<path>css/theme.css</path>

</file>

</files>

</css>

...

</skin>

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 43: Pure css skinning with menu box and menu

43

Presentation (CSS)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Done!

Page 44: Pure css skinning with menu box and menu

44

Behavior (JS)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

3 Behavior (JS)

Page 45: Pure css skinning with menu box and menu

45

Behavior (JS)

Main points:- No limits to particular JS library- Inline scripts support

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 46: Pure css skinning with menu box and menu

46

Behavior (JS)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

js JS scripts used for the theme

jquery.myplugin.js

jquery.hoverIntent.js

Page 47: Pure css skinning with menu box and menu

47

Behavior (JS)

<?xml version="1.0" encoding="utf-8"?>

<skin>

...

<js>

...

<files>

<file>

<path>js/jquery.myplugin.js</path>

</file>

<file>

<path>js/jquery.hoverIntetn.js</path>

</file>

</files>

</js>

...

</skin>

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 48: Pure css skinning with menu box and menu

48

Behavior (JS)

<?xml version="1.0" encoding="utf-8"?>

<skin>

...

<js>

<startup_scripts>

<script>

<data><![CDATA[

$(function(){

$("#{container_id}").myplugin();

});

]]></data>

</script>

</startup_scripts>

<files>...</files>

</js>

...

</skin>

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Startup scripts is a general way to initialize your menu

Page 49: Pure css skinning with menu box and menu

49

Behavior (JS)

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Done!

Page 50: Pure css skinning with menu box and menu

50

What we got so far…

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Structure(HTML)

Presentation(CSS)

Behavior(JS)

Theme Manifest(skin.xml)

Page 51: Pure css skinning with menu box and menu

51

Let’s pack them together

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

css

html

images

js

skin.xml

MyTheme

MyTheme.zip

Page 52: Pure css skinning with menu box and menu

52

Custom Menu Theme

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Finish!

Page 53: Pure css skinning with menu box and menu

53

Developers only?

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

But… what if I’m a designer, not a developer?

Can I still use it?

Page 54: Pure css skinning with menu box and menu

54

Good news for you!

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Menu Factory - Online menu theme builder.

Page 55: Pure css skinning with menu box and menu

55

Menu Factory service

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 56: Pure css skinning with menu box and menu

56

Menu Factory service

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

http://factory.codingstaff.com

Page 57: Pure css skinning with menu box and menu

57

More sugar

• Localization support– Apollo Localization– Ealo Localization components– Adequation Localization Extensions– Locopon DSLocalizator

• Conditional comments (for scripts, styles)• Side navigation mode• A set of built themes• Good documentation to get started

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 58: Pure css skinning with menu box and menu

58

… and even more

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

It’s free and it’s going to be open sourced!

Page 59: Pure css skinning with menu box and menu

59

More information

• http://www.codingstaff.com• http://www.codingstaff.com/blog• http://factory.codingstaff.com• http://twitter.com/codingstaff

Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Page 60: Pure css skinning with menu box and menu

60Mikita Mikado and Serge Barysiuk: Pure CSS skinning with Menu Box and Menu Factory

Thank you!