Skip to content
This repository has been archived by the owner on Sep 5, 2024. It is now read-only.

Commit

Permalink
update(docs): improve md-button docs and improved doc styling.
Browse files Browse the repository at this point in the history
  • Loading branch information
ThomasBurleson committed Jun 1, 2015
1 parent 417fd1f commit b58ff47
Show file tree
Hide file tree
Showing 6 changed files with 82 additions and 28 deletions.
43 changes: 41 additions & 2 deletions docs/app/css/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ table {
border-spacing: 0;
border-radius: 2px;
overflow: hidden;
border: 1px solid #eee;
border: 1px solid rgba(238, 238, 238, 0.47);
}

/***************
Expand Down Expand Up @@ -637,21 +637,43 @@ ul.buckets li a:focus md-icon {
color: #888;
}

code.api-type {
font-weight: bold;
}

.api-params-content ul {
padding-left: 4px;
}
ul.methods > li {
ul.methods > li#id {
margin-bottom: 48px;
}

ul.methods .method-function-syntax {

color: rgb(63, 81, 181);
font-weight: normal;
font-size: 1.6rem;
margin: 0;
-webkit-margin-before: 0;
-webkit-margin-after: 0;
}

ul.methods .method-param-table, .api-param-table {
border: 1px solid rgba(238, 238, 238, 0.47);
border-radius: 9px;
overflow: hidden;
}

.api-param-table > table,
.method-param-table > table {
border-bottom: none;
margin-bottom : 0px;
}

.api-param-section {
margin-top: 40px;
}

h3 .method-function-syntax {
display: inline-block;
padding: 8px 16px;
Expand Down Expand Up @@ -729,6 +751,7 @@ ul.methods {
}
ul.methods > li {
margin: 0;
margin-bottom: 20px;
}
ul.methods > li:first-child > *:first-child {
padding-top: 0;
Expand Down Expand Up @@ -778,3 +801,19 @@ docs-demo .doc-demo-content {
color: #202020 !important;
z-index: 3;
}

header.api-profile-header {
color: rgb(63, 81, 181);
font-weight: bold;
}

.api-profile-description ol li {
padding-bottom: 8px;
}

.image_caption {
padding-left: 30%;
font-size: .7em;
margin-top: -15px;
display: block;
}
2 changes: 1 addition & 1 deletion docs/config/template/ngdoc/api/api.template.html
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

{% block header %}
<header class="api-profile-header">
<h2 class="md-display-1" style="margin: 0;">{{menu.currentPage|humanizeDoc}}</h2>
<h2 class="md-display-1" style="margin: 0;">&lt;{{menu.currentPage|humanizeDoc}} /&gt;</h2>
{% block related_components %}{% endblock %}
</header>

Expand Down
5 changes: 5 additions & 0 deletions docs/config/template/ngdoc/lib/methods.template.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{%- if doc.methods %}
<section class="api-section">
<h2>Methods</h2>
<br/>
<ul class="methods">
{%- for method in doc.methods %}
<li id="{$ method.name $}">
Expand All @@ -9,6 +10,8 @@ <h3 class="method-function-syntax">
</h3>
<div>{$ method.description | marked $}</div>

<div class="method-param-table">

{% if method.params %}
{$ paramTable(method.params) $}
{% endif %}
Expand All @@ -22,6 +25,8 @@ <h4>Method's {% code %}this{% endcode %}</h4>
{$ returnTable(method.returns) $}
{% endif %}

</div>

</li>
{% endfor -%}
</ul>
Expand Down
24 changes: 14 additions & 10 deletions docs/config/template/ngdoc/lib/params.template.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,16 @@
{%- if doc.params %}
<h2>
{% if doc.paramType %}
{$ doc.paramType $}
{% elif doc.docType == 'directive' %}
Attributes
{% else %}
Arguments
{% endif %}
</h2>
{$ paramTable(doc.params) $}
<div class="api-param-section">
<h2>
{% if doc.paramType %}
{$ doc.paramType $}
{% elif doc.docType == 'directive' %}
Attributes
{% else %}
Arguments
{% endif %}
</h2>
<div class="api-param-table">
{$ paramTable(doc.params) $}
</div>
</div>
{%- endif -%}
4 changes: 3 additions & 1 deletion docs/config/template/ngdoc/lib/returns.template.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
{% if doc.returns -%}
{$ returnTable(doc.returns) $}
<div class="api-param-table">
{$ returnTable(doc.returns) $}
</div>
{%- endif %}
32 changes: 18 additions & 14 deletions src/components/button/button.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,8 @@ angular
* `<md-button>` is a button directive with optional ink ripples (default enabled).
*
* If you supply a `href` or `ng-href` attribute, it will become an `<a>` element. Otherwise, it will
* become a `<button>` element.
*
* As per the [material design spec](http://www.google.com/design/spec/style/color.html#color-ui-color-application)
* the FAB button is in the accent color by default. The primary color palette may be used with
* become a `<button>` element. As per the [Material Design specifications](http://www.google.com/design/spec/style/color.html#color-ui-color-application)
* the FAB button background is filled with the accent color [by default]. The primary color palette may be used with
* the `md-primary` class.
*
* @param {boolean=} md-no-ink If present, disable ripple ink effects.
Expand All @@ -33,25 +31,31 @@ angular
* If no default text is found, a warning will be logged.
*
* @usage
*
* Regular buttons:
*
* <hljs lang="html">
* <md-button> Flat Button </md-button>
* <md-button href="http://google.com"> Flat link </md-button>
* <md-button class="md-raised"> Raised Button </md-button>
* <md-button ng-disabled="true"> Disabled Button </md-button>
* <md-button>
* Flat Button
* </md-button>
* <md-button href="http://google.com">
* Flat link
* </md-button>
* <md-button class="md-raised">
* Raised Button
* </md-button>
* <md-button ng-disabled="true">
* Disabled Button
* <md-icon md-svg-src="your/icon.svg"></md-icon>
* Register Now
* </md-button>
* </hljs>
*
* FAB buttons:
*
* <hljs lang="html">
* <md-button class="md-fab" aria-label="FAB">
* <md-icon md-svg-src="your/icon.svg"></md-icon>
* </md-button>
* <!-- mini-FAB -->
* <md-button class="md-fab md-mini" aria-label="Mini FAB">
* <md-icon md-svg-src="your/icon.svg"></md-icon>
* </md-button>
* <!-- Button with SVG Icon -->
* <md-button class="md-icon-button" aria-label="Custom Icon Button">
* <md-icon md-svg-icon="path/to/your.svg"></md-icon>
* </md-button>
Expand Down

0 comments on commit b58ff47

Please sign in to comment.