Skip to content
This repository was archived by the owner on Dec 31, 2019. It is now read-only.

Commit e9187c5

Browse files
committed
Add components/command bar closing #46
1 parent 2944d9e commit e9187c5

File tree

2 files changed

+107
-0
lines changed

2 files changed

+107
-0
lines changed

components/command-bar/index.html

Lines changed: 101 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,101 @@
1+
<!DOCTYPE html>
2+
<html>
3+
4+
<head lang="en">
5+
<title>Office UI Fabric - Components - Command Bar</title>
6+
<meta charset="UTF-8">
7+
<!-- fav icons -->
8+
<link rel="shortcut icon" href="/img/favicon/favicon.ico">
9+
<link rel="apple-touch-icon" sizes="57x57" href="/img/favicon/apple-touch-icon-57x57.png">
10+
<link rel="apple-touch-icon" sizes="114x114" href="/img/favicon/apple-touch-icon-114x114.png">
11+
<link rel="apple-touch-icon" sizes="72x72" href="/img/favicon/apple-touch-icon-72x72.png">
12+
<link rel="apple-touch-icon" sizes="144x144" href="/img/favicon/apple-touch-icon-144x144.png">
13+
<link rel="apple-touch-icon" sizes="60x60" href="/img/favicon/apple-touch-icon-60x60.png">
14+
<link rel="apple-touch-icon" sizes="120x120" href="/img/favicon/apple-touch-icon-120x120.png">
15+
<link rel="apple-touch-icon" sizes="76x76" href="/img/favicon/apple-touch-icon-76x76.png">
16+
<link rel="apple-touch-icon" sizes="152x152" href="/img/favicon/apple-touch-icon-152x152.png">
17+
<link rel="apple-touch-icon" sizes="180x180" href="/img/favicon/apple-touch-icon-180x180.png">
18+
<link rel="icon" type="image/png" href="/img/favicon/favicon-192x192.png" sizes="192x192">
19+
<link rel="icon" type="image/png" href="/img/favicon/favicon-160x160.png" sizes="160x160">
20+
<link rel="icon" type="image/png" href="/img/favicon/favicon-96x96.png" sizes="96x96">
21+
<link rel="icon" type="image/png" href="/img/favicon/favicon-16x16.png" sizes="16x16">
22+
<link rel="icon" type="image/png" href="/img/favicon/favicon-32x32.png" sizes="32x32">
23+
24+
<!-- azure application insights -->
25+
<script src="/js/azure-app-insights.js" type="text/javascript"></script>
26+
27+
<!-- codepen -->
28+
<script async src="//assets.codepen.io/assets/embed/ei.js"></script>
29+
30+
<link rel="stylesheet" href="//appsforoffice.microsoft.com/fabric/1.0/fabric.min.css" />
31+
<link rel="stylesheet" href="//appsforoffice.microsoft.com/fabric/1.0/fabric.components.min.css" />
32+
<link rel="stylesheet" href="/css/styles.min.css" />
33+
</head>
34+
35+
<body>
36+
<div class="ms-Grid">
37+
<!-- header -->
38+
<header id="page-header" class="ms-Grid-row ms-Grid-col ms-u-sm12">
39+
<div id="brand-name" class="ms-font-su ms-fontWeight-semibold ms-fontColor-white">
40+
Office Fabric UI
41+
</div>
42+
<div id="site-tagline" class="ms-font-l ms-fontColor-white ms-fontWeight-light">
43+
Demos of the front-end framework for building experiences using Office, Office 365 &amp; SharePoint.
44+
</div>
45+
</header>
46+
47+
<!-- navigation -->
48+
<nav class="ms-Grid-row ms-Grid-col ms-u-sm12">
49+
<ul id="global-nav">
50+
<li class="ms-font-l ms-fontWeight-light"><a href="/">Home</a></li>
51+
<li class="ms-font-l ms-fontWeight-light"><a href="/features">Features</a></li>
52+
<li class="ms-font-l ms-fontWeight-light"><a href="/components">Components</a></li>
53+
<li class="ms-font-l ms-fontWeight-light"><a href="/resources.html">Resources</a></li>
54+
<li class="ms-font-l ms-fontWeight-light"><a href="/status.html">Status</a></li>
55+
<li class="ms-font-l ms-fontWeight-light"><a href="/contribute.html">Contribute!</a></li>
56+
</ul>
57+
</nav>
58+
59+
<div class="ms-Grid-row">
60+
<!-- side-nav -->
61+
<aside id="local-nav" class="ms-Grid-col ms-u-sm-3 ">
62+
<ul>
63+
<li><a class="ms-font-l ms-fontColor-neutralSecondaryAlt" href="#Top">Command Bar</a></li>
64+
<li><a class="ms-font-l ms-fontColor-neutralSecondaryAlt" href="#Usage">Usage</a></li>
65+
</ul>
66+
</aside>
67+
68+
<!-- page body -->
69+
<article id="page-main" class="ms-Grid-col ms-u-sm9 ms-font-m">
70+
<a name="Top"></a>
71+
<p class="ms-font-su"><a href="/components" class="ms-Link">Components</a> <i class="ms-Icon ms-Icon--caretRight" aria-hidden="true"></i> Command Bar</p>
72+
<p class="ms-font-l">The command bar control is a very robust navigation control with lots of functionality and responsive design.</p>
73+
74+
<p class="ms-font-l"><i class="ms-Icon ms-Icon--chevronsUp"></i><a href="#Top" class="ms-Link">Back to top</a></p>
75+
76+
<a name="Usage"></a>
77+
<p class="ms-font-xxl">Usage</p>
78+
<p class="ms-font-l">Implementing the command bar stars with the <code>&lt;div&gt;</code> decorated with a <code>.ms-CommandBar</code> class. Within the top level container you can have three components. </p>
79+
<p class="ms-font-l">The first component you can include is a search control implemented with a <code>&lt;div&gt;</code> and <code>.ms-CommandBarSearch</code> control. Refer to the code below for the implementation of the other nested elements you can use within this container.</p>
80+
<p class="ms-font-l">The second component you can implement are the main navigation elements which are included in a <code>&lt;div&gt;</code> with the <code>ms-CommandBar-mainArea</code> class. Each command object is implemented as a <code>&lt;div&gt;</code> using the <code>.ms-CommandBarItem</code>. Notice you can also include one with the <code>.ms-CommandBarItem-overflow</code> class that is used when the screen can't include all the child items.</p>
81+
<p class="ms-font-l">Finally you can also include a set of controls that are pinned to the side of the command bar using a <code>&lt;div&gt;</code> with the <code>.ms-CommandBar-sideCommands</code> class. Each of the commands area implemented like the previous ones, using the <code>.ms-CommandBarItem</code> class.</p>
82+
<p class="ms-font-l">You will want to add JavaScript to clear out the placeholder when the control receives focus as shown in the following snippets. An example of this code, using jQuery, can be found in the Office UI Fabric component distribution: <a href="https://github.com/OfficeDev/Office-UI-Fabric/blob/master/src/components/CommandBar/Jquery.CommandBar.js" class="ms-Link">Jquery.CommandBar.js</a>. This also means that you must include a reference to jQuery as the <code>JQuery.CommandBar.js</code> depends on the presence of jQuery.</p>
83+
84+
<!-- codepen snippet -->
85+
<p data-height="433" data-theme-id="19054" data-slug-hash="avpoLR" data-default-tab="result" data-user="andrewconnell" class='codepen'>See the Pen <a href='http://codepen.io/andrewconnell/pen/avpoLR/'>Office UI Fabric - Panel (Small)</a> by Andrew Connell (<a href='http://codepen.io/andrewconnell'>@andrewconnell</a>) on <a href='http://codepen.io'>CodePen</a>.</p>
86+
<!-- /codepen snippet -->
87+
88+
<p class="ms-font-l"><i class="ms-Icon ms-Icon--chevronsUp"></i><a href="#Top" class="ms-Link">Back to top</a></p>
89+
</article>
90+
</div>
91+
92+
<!-- footer -->
93+
<footer id="page-footer" class="ms-Grid-row ms-Grid-col ms-u-sm12 ms-font-m ms-fontWeight-light ms-fontColor-white">
94+
<p>Microsoft, Office, Office 365 and SharePoint are registered trademarks of Microsoft Corporation.</p>
95+
<p>Current Version of the Office UI Fabric used on this site: v1.0.0</p>
96+
</footer>
97+
98+
</div>
99+
100+
</body>
101+
</html>

components/index.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -233,6 +233,12 @@
233233
<span class="ms-Button-label">Breadcrumb</span>
234234
</button>
235235
</div>
236+
<div class="ms-Grid-col ms-u-sm3 ms-font-l">
237+
<button class="ms-Button ms-Button--hero" onclick="goComponent('command-bar');">
238+
<span class="ms-Button-icon"><i class="ms-Icon ms-Icon--check"></i></span>
239+
<span class="ms-Button-label">Command Bar</span>
240+
</button>
241+
</div>
236242
<div class="ms-Grid-col ms-u-sm3 ms-font-l">
237243
<button class="ms-Button ms-Button--hero" onclick="goComponent('contextual-menu');">
238244
<span class="ms-Button-icon"><i class="ms-Icon ms-Icon--check"></i></span>

0 commit comments

Comments
 (0)