mirror of
https://github.com/Hopiu/vue-material.git
synced 2026-04-22 07:34:48 +00:00
add support for theming on Cards (#173)
* #148 - Support for theming on Card Component * #148 - Updating the docs * #148 - Removing theming for card's internal components * #148 - Updating the docs
This commit is contained in:
parent
33af65eb45
commit
3e5f930fa7
2 changed files with 170 additions and 0 deletions
|
|
@ -6,6 +6,11 @@
|
|||
<p>The card components are very granular. Every single part of a card is a component. You can combine them in any order that you want, following the same logic of the examples.</p>
|
||||
<p>You can also use other Material components inside the card, like the "Complete Example".</p>
|
||||
<p>The following classes can be applied to change the color palette:</p>
|
||||
<ul class="md-body-2">
|
||||
<li><code>md-primary</code></li>
|
||||
<li><code>md-accent</code></li>
|
||||
<li><code>md-warn</code></li>
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div slot="api">
|
||||
|
|
@ -818,6 +823,156 @@
|
|||
</div>
|
||||
</example-box>
|
||||
|
||||
<example-box card-title="Themed Cards">
|
||||
<div class="card-holder" slot="demo">
|
||||
<md-card class="md-primary">
|
||||
<md-card-media>
|
||||
<img src="assets/card-image-1.jpg" alt="People">
|
||||
</md-card-media>
|
||||
|
||||
<md-card-header>
|
||||
<div class="md-title">Title goes here</div>
|
||||
<div class="md-subhead">Subtitle here</div>
|
||||
</md-card-header>
|
||||
|
||||
<md-card-actions>
|
||||
<md-button>Action</md-button>
|
||||
<md-button>Action</md-button>
|
||||
</md-card-actions>
|
||||
|
||||
<md-card-content>
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio itaque ea, nostrum odio. Dolores, sed accusantium quasi non, voluptas eius illo quas, saepe voluptate pariatur in deleniti minus sint. Excepturi.
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
|
||||
<md-card class="md-accent">
|
||||
<md-card-header>
|
||||
<md-card-header-text>
|
||||
<div class="md-title">Title goes here</div>
|
||||
<div class="md-subhead">Subtitle here</div>
|
||||
</md-card-header-text>
|
||||
|
||||
<md-menu md-size="4" md-direction="bottom left">
|
||||
<md-button class="md-icon-button" md-menu-trigger>
|
||||
<md-icon>more_vert</md-icon>
|
||||
</md-button>
|
||||
|
||||
<md-menu-content>
|
||||
<md-menu-item>
|
||||
<span>Call</span>
|
||||
<md-icon>phone</md-icon>
|
||||
</md-menu-item>
|
||||
|
||||
<md-menu-item>
|
||||
<span>Send a message</span>
|
||||
<md-icon>message</md-icon>
|
||||
</md-menu-item>
|
||||
</md-menu-content>
|
||||
</md-menu>
|
||||
</md-card-header>
|
||||
|
||||
<md-card-media>
|
||||
<img src="assets/card-image-1.jpg" alt="People">
|
||||
</md-card-media>
|
||||
|
||||
<md-card-content>
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio itaque ea, nostrum odio. Dolores, sed accusantium quasi non, voluptas eius illo quas, saepe voluptate pariatur in deleniti minus sint. Excepturi.
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
|
||||
<md-card class="md-warn">
|
||||
<md-card-media>
|
||||
<img src="assets/card-image-2.jpg" alt="People">
|
||||
</md-card-media>
|
||||
|
||||
<md-card-header>
|
||||
<div class="md-title">Title goes here</div>
|
||||
<div class="md-subhead">Subtitle here</div>
|
||||
</md-card-header>
|
||||
|
||||
<md-card-actions>
|
||||
<md-button>Action</md-button>
|
||||
<md-button>Action</md-button>
|
||||
</md-card-actions>
|
||||
</md-card>
|
||||
</div>
|
||||
|
||||
<div slot="code">
|
||||
<code-block lang="xml">
|
||||
<md-card class="md-primary">
|
||||
<md-card-media>
|
||||
<img src="assets/card-image-1.jpg" alt="People">
|
||||
</md-card-media>
|
||||
|
||||
<md-card-header>
|
||||
<div class="md-title">Title goes here</div>
|
||||
<div class="md-subhead">Subtitle here</div>
|
||||
</md-card-header>
|
||||
|
||||
<md-card-actions>
|
||||
<md-button>Action</md-button>
|
||||
<md-button>Action</md-button>
|
||||
</md-card-actions>
|
||||
|
||||
<md-card-content>
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio itaque ea, nostrum odio. Dolores, sed accusantium quasi non, voluptas eius illo quas, saepe voluptate pariatur in deleniti minus sint. Excepturi.
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
|
||||
<md-card class="md-accent">
|
||||
<md-card-header>
|
||||
<md-card-header-text>
|
||||
<div class="md-title">Title goes here</div>
|
||||
<div class="md-subhead">Subtitle here</div>
|
||||
</md-card-header-text>
|
||||
|
||||
<md-menu md-size="4" md-direction="bottom left">
|
||||
<md-button class="md-icon-button" md-menu-trigger>
|
||||
<md-icon>more_vert</md-icon>
|
||||
</md-button>
|
||||
|
||||
<md-menu-content>
|
||||
<md-menu-item>
|
||||
<span>Call</span>
|
||||
<md-icon>phone</md-icon>
|
||||
</md-menu-item>
|
||||
|
||||
<md-menu-item>
|
||||
<span>Send a message</span>
|
||||
<md-icon>message</md-icon>
|
||||
</md-menu-item>
|
||||
</md-menu-content>
|
||||
</md-menu>
|
||||
</md-card-header>
|
||||
|
||||
<md-card-media>
|
||||
<img src="assets/card-image-1.jpg" alt="People">
|
||||
</md-card-media>
|
||||
|
||||
<md-card-content>
|
||||
Lorem ipsum dolor sit amet, consectetur adipisicing elit. Optio itaque ea, nostrum odio. Dolores, sed accusantium quasi non, voluptas eius illo quas, saepe voluptate pariatur in deleniti minus sint. Excepturi.
|
||||
</md-card-content>
|
||||
</md-card>
|
||||
|
||||
<md-card class="md-warn">
|
||||
<md-card-media>
|
||||
<img src="assets/card-image-2.jpg" alt="People">
|
||||
</md-card-media>
|
||||
|
||||
<md-card-header>
|
||||
<div class="md-title">Title goes here</div>
|
||||
<div class="md-subhead">Subtitle here</div>
|
||||
</md-card-header>
|
||||
|
||||
<md-card-actions >
|
||||
<md-button>Action</md-button>
|
||||
<md-button>Action</md-button>
|
||||
</md-card-actions>
|
||||
</md-card>
|
||||
</code-block>
|
||||
</div>
|
||||
</example-box>
|
||||
|
||||
<example-box card-title="Complete Example">
|
||||
<div class="card-holder" slot="demo">
|
||||
<md-card class="card-example" v-md-theme="'blue'">
|
||||
|
|
|
|||
|
|
@ -37,5 +37,20 @@
|
|||
background-color: #{'BACKGROUND-COLOR-A100'};
|
||||
}
|
||||
}
|
||||
|
||||
&.md-primary {
|
||||
background-color: #{'PRIMARY-COLOR'};
|
||||
color: #{'PRIMARY-CONTRAST'};
|
||||
}
|
||||
|
||||
&.md-accent {
|
||||
background-color: #{'ACCENT-COLOR'};
|
||||
color: #{'ACCENT-CONTRAST'};
|
||||
}
|
||||
|
||||
&.md-warn {
|
||||
background-color: #{'WARN-COLOR'};
|
||||
color: #{'WARN-CONTRAST'};
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue