|
525
|
1 |
<!DOCTYPE html> |
|
|
2 |
<html lang="en"> |
|
|
3 |
<head> |
|
|
4 |
<meta charset="utf-8"> |
|
|
5 |
<title>Example: Skinning Menus Created Using the MenuNav Node Plugin</title> |
|
|
6 |
<link rel="stylesheet" href="http://fonts.googleapis.com/css?family=PT+Sans:400,700,400italic,700italic"> |
|
|
7 |
<link rel="stylesheet" href="../../build/cssgrids/cssgrids-min.css"> |
|
|
8 |
<link rel="stylesheet" href="../assets/css/main.css"> |
|
|
9 |
<link rel="stylesheet" href="../assets/vendor/prettify/prettify-min.css"> |
|
|
10 |
<link rel="shortcut icon" type="image/png" href="../assets/favicon.png"> |
|
|
11 |
<script src="../../build/yui/yui-min.js"></script> |
|
|
12 |
|
|
|
13 |
</head> |
|
|
14 |
<body> |
|
|
15 |
<!-- |
|
|
16 |
<a href="https://github.com/yui/yui3"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a> |
|
|
17 |
--> |
|
|
18 |
<div id="doc"> |
|
|
19 |
<div id="hd"> |
|
|
20 |
<h1><img src="http://yuilibrary.com/img/yui-logo.png"></h1> |
|
|
21 |
</div> |
|
|
22 |
|
|
|
23 |
|
|
|
24 |
<h1>Example: Skinning Menus Created Using the MenuNav Node Plugin</h1> |
|
|
25 |
<div class="yui3-g"> |
|
|
26 |
<div class="yui3-u-3-4"> |
|
|
27 |
<div id="main"> |
|
|
28 |
<div class="content"><div class="intro"> |
|
|
29 |
<p> |
|
|
30 |
This example demonstrates how to skin a menu built using the MenuNav Node Plugin to look like the |
|
|
31 |
menus on <a href="http://www.flickr.com">Flickr</a> |
|
|
32 |
</p> |
|
|
33 |
</div> |
|
|
34 |
|
|
|
35 |
<div class="example newwindow"> |
|
|
36 |
<a href="node-menunav-7-example.html" target="_blank" class="button"> |
|
|
37 |
View Example in New Window |
|
|
38 |
</a> |
|
|
39 |
</div> |
|
|
40 |
|
|
|
41 |
<h2>Creating A Custom Skin</h2> |
|
|
42 |
<p> |
|
|
43 |
<strong>Note:</strong> be sure to add the <code>yui3-skin-sam</code> classname to the |
|
|
44 |
page's <code><body></code> element or to a parent element of the widget in order to apply |
|
|
45 |
the default CSS skin. See <a href="http://yuilibrary.com/yui/docs/tutorials/skins/">Understanding Skinning</a>. |
|
|
46 |
</p> |
|
|
47 |
<pre class="code prettyprint"><body class="yui3-skin-sam"> <!-- You need this skin class --></pre> |
|
|
48 |
|
|
|
49 |
<p> |
|
|
50 |
Skinning the menus created using the MenuNav Node Plugin is done using CSS. The stylesheet used |
|
|
51 |
for other MenuNav Node Plugin examples is a minified version of the node-menunav-core.css and |
|
|
52 |
node-menunav-skin.css files. The node-menunav-core.css file includes foundational styling that |
|
|
53 |
controls basic layout and positioning, whereas the node-menunav-skin.css file is used to apply |
|
|
54 |
colors, borders, padding, etc. |
|
|
55 |
</p> |
|
|
56 |
|
|
|
57 |
<p> |
|
|
58 |
Skinning can be accomplished by either overriding the styles defined in the node-menunav-skin.css |
|
|
59 |
file, or by creating an entirely new skin file. In either case, place custom styles in a separate |
|
|
60 |
file to simplify integrating with YUI updates. |
|
|
61 |
</p> |
|
|
62 |
|
|
|
63 |
<p> |
|
|
64 |
When creating a custom skin, use the node-menunav-core.css and node-menunav-skin.css files as a |
|
|
65 |
reference. Also consult the <a href="index.html#css-reference">CSS reference</a> |
|
|
66 |
section of the MenuNav Node Plugin landing page, as it provides a complete list of all of the class |
|
|
67 |
names used by the MenuNav Node Plugin along with when and to what element(s) they are applied. |
|
|
68 |
</p> |
|
|
69 |
</div> |
|
|
70 |
</div> |
|
|
71 |
</div> |
|
|
72 |
|
|
|
73 |
<div class="yui3-u-1-4"> |
|
|
74 |
<div class="sidebar"> |
|
|
75 |
|
|
|
76 |
|
|
|
77 |
|
|
|
78 |
<div class="sidebox"> |
|
|
79 |
<div class="hd"> |
|
|
80 |
<h2 class="no-toc">Examples</h2> |
|
|
81 |
</div> |
|
|
82 |
|
|
|
83 |
<div class="bd"> |
|
|
84 |
<ul class="examples"> |
|
|
85 |
|
|
|
86 |
|
|
|
87 |
<li data-description="Creating left navigation using the MenuNav Node Plugin."> |
|
|
88 |
<a href="menunav-leftnav.html">Basic Left Nav</a> |
|
|
89 |
</li> |
|
|
90 |
|
|
|
91 |
|
|
|
92 |
|
|
|
93 |
<li data-description="Creating top navigation using the MenuNav Node Plugin"> |
|
|
94 |
<a href="node-menunav-2.html">Basic Top Nav</a> |
|
|
95 |
</li> |
|
|
96 |
|
|
|
97 |
|
|
|
98 |
|
|
|
99 |
<li data-description="Creating menu button navigation using the MenuNav Node Plugin"> |
|
|
100 |
<a href="node-menunav-3.html">Menu Button Top Nav</a> |
|
|
101 |
</li> |
|
|
102 |
|
|
|
103 |
|
|
|
104 |
|
|
|
105 |
<li data-description="Creating split button navigation using the MenuNav Node Plugin"> |
|
|
106 |
<a href="node-menunav-4.html">Split Button Top Nav</a> |
|
|
107 |
</li> |
|
|
108 |
|
|
|
109 |
|
|
|
110 |
|
|
|
111 |
<li data-description="Adding shadows to submenus of a left nav using the MenuNav Node Plugin"> |
|
|
112 |
<a href="node-menunav-5.html">Left Nav with Submenus with Shadows</a> |
|
|
113 |
</li> |
|
|
114 |
|
|
|
115 |
|
|
|
116 |
|
|
|
117 |
<li data-description="Adding rounded corners to submenus of a left nav using the MenuNav Node Plugin"> |
|
|
118 |
<a href="node-menunav-6.html">Left Nav With Submenus With Rounded Corners</a> |
|
|
119 |
</li> |
|
|
120 |
|
|
|
121 |
|
|
|
122 |
|
|
|
123 |
<li data-description="Skining a menu built using the MenuNav Node Plugin to look like the menus on Flickr"> |
|
|
124 |
<a href="node-menunav-7.html">Skinning Menus Created Using the MenuNav Node Plugin</a> |
|
|
125 |
</li> |
|
|
126 |
|
|
|
127 |
|
|
|
128 |
</ul> |
|
|
129 |
</div> |
|
|
130 |
</div> |
|
|
131 |
|
|
|
132 |
|
|
|
133 |
|
|
|
134 |
</div> |
|
|
135 |
</div> |
|
|
136 |
</div> |
|
|
137 |
</div> |
|
|
138 |
|
|
|
139 |
<script src="../assets/vendor/prettify/prettify-min.js"></script> |
|
|
140 |
<script>prettyPrint();</script> |
|
|
141 |
|
|
|
142 |
<script> |
|
|
143 |
YUI.Env.Tests = { |
|
|
144 |
examples: [], |
|
|
145 |
project: '../assets', |
|
|
146 |
assets: '../assets/node-menunav', |
|
|
147 |
name: 'node-menunav-7', |
|
|
148 |
title: 'Skinning Menus Created Using the MenuNav Node Plugin', |
|
|
149 |
newWindow: 'true', |
|
|
150 |
auto: false |
|
|
151 |
}; |
|
|
152 |
YUI.Env.Tests.examples.push('menunav-leftnav'); |
|
|
153 |
YUI.Env.Tests.examples.push('node-menunav-2'); |
|
|
154 |
YUI.Env.Tests.examples.push('node-menunav-3'); |
|
|
155 |
YUI.Env.Tests.examples.push('node-menunav-4'); |
|
|
156 |
YUI.Env.Tests.examples.push('node-menunav-5'); |
|
|
157 |
YUI.Env.Tests.examples.push('node-menunav-6'); |
|
|
158 |
YUI.Env.Tests.examples.push('node-menunav-7'); |
|
|
159 |
|
|
|
160 |
</script> |
|
|
161 |
<script src="../assets/yui/test-runner.js"></script> |
|
|
162 |
|
|
|
163 |
|
|
|
164 |
|
|
|
165 |
</body> |
|
|
166 |
</html> |