Skip to content

Commit

Permalink
Documentation updates for Get Started page and DatePicker (OfficeDev#288
Browse files Browse the repository at this point in the history
)

* Change Get Started page so CDN links are pulled from package json.  Fix DatePicker methods to show picker.set method from PickADate API

* Update sidebar active link to semibold
  • Loading branch information
leddie24 authored Feb 8, 2017
1 parent ddfd0fc commit a49587a
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
6 changes: 6 additions & 0 deletions gulp/modules/Config.js
Original file line number Diff line number Diff line change
Expand Up @@ -188,6 +188,12 @@ var Config = function() {
return code;
},

cdnLinks: function(version) {
return `<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/${version}/css/fabric.min.css" />
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/${version}/css/fabric.components.min.css" />
<script src="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/${version}/js/fabric.min.js"></script>`;
},

// Output code from a string
codeBlock: function(code, language, theme) {
var hbs = Plugins.handlebars.Handlebars;
Expand Down
14 changes: 12 additions & 2 deletions src/documentation/pages/Components/DatePicker/DatePicker.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,24 @@ var data = {
],
methods: [
{
name: "changeHighlightedDate(dateArr)",
name: "picker.set('select', dateArr);",
parameters: [
{
name: "dateArr",
type: "{Array} The new date in [YEAR, MONTH, DATE] format",
}
],
description: "Highlights a new date in the component"
description: "Selects a new date in the component. Must be used on component's picker property (DatePicker.picker)."
},
{
name: "picker.set('highlight', dateArr);",
parameters: [
{
name: "dateArr",
type: "{Array} The new date in [YEAR, MONTH, DATE] format",
}
],
description: "Highlights a new date in the component. Must be used on component's picker property (DatePicker.picker)."
}
],
jsFile: "DatePickerExampleJS",
Expand Down
4 changes: 1 addition & 3 deletions src/documentation/pages/GetStarted/GetStarted.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,7 @@
<li>
<p>The easiest way to get Fabric is by referencing the CDN. Include the following in the &lt;head&gt; of your page:</p>
{{codeBlock
'<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.2.0/css/fabric.min.css" />
<link rel="stylesheet" href="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.2.0/css/fabric.components.min.css" />
<script src="https://static2.sharepointonline.com/files/fabric/office-ui-fabric-js/1.2.0/js/fabric.min.js"></script>' 'html' 'isLightTheme'}}
(cdnLinks packageData.version) 'html' 'isLightTheme'}}
<p>To reference the latest version, just change the version number in the URL to your desired version. All versions of Fabric are on the CDN, and the latest version is {{packageData.version}}.</p>
</li>
<li>
Expand Down
1 change: 1 addition & 0 deletions src/documentation/sass/SideBar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@ $nav-group-header-height: 40px;
&:hover {
> a:first-child {
color: $ms-color-neutralPrimary;
font-weight: $ms-font-weight-semibold;
}

// Hide the line indicators on submenus
Expand Down

0 comments on commit a49587a

Please sign in to comment.