-
Notifications
You must be signed in to change notification settings - Fork 171
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Co-authored-by: Bartek Szopka <[email protected]>
- Loading branch information
Showing
8 changed files
with
79 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "vanilla-framework", | ||
"version": "4.14.1", | ||
"version": "4.15.0", | ||
"author": { | ||
"email": "[email protected]", | ||
"name": "Canonical Webteam" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
/* | ||
@classreference | ||
cta-block: | ||
CTA Block: | ||
.p-cta-block: | ||
Main element of the CTA block. | ||
*/ | ||
|
||
@import 'settings'; | ||
|
||
@mixin vf-p-cta-block { | ||
.p-cta-block { | ||
align-items: baseline; | ||
border-top: 1px solid $colors--theme--border-low-contrast; | ||
display: flex; | ||
flex-wrap: wrap; | ||
padding-bottom: $spv--x-large; | ||
padding-top: $spv--small; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
@import '../vanilla'; | ||
@include vf-base; | ||
|
||
@include vf-p-cta-block; | ||
@include vf-p-buttons; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
{% extends "_layouts/examples.html" %} | ||
{% block title %}CTA Block{% endblock %} | ||
|
||
{% block standalone_css %}patterns_cta{% endblock %} | ||
|
||
{% block content %} | ||
<div class="p-cta-block"> | ||
<button class="p-button--positive">Learn more</button> | ||
<a href="#">Contact us ›</a> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
--- | ||
collection: patterns | ||
wrapper_template: '_layouts/docs.html' | ||
context: | ||
title: CTA Block | Patterns | ||
--- | ||
|
||
A CTA (call to action) block is a pattern that is used to encourage users to take a specific action. This could be to learn more details about a product, contact someone, or to download a file. | ||
|
||
<div class="embedded-example"><a href="/docs/examples/patterns/cta-block/default" class="js-example"> | ||
View example of the CTA block pattern | ||
</a></div> | ||
|
||
## Class reference | ||
|
||
{{ class_reference("cta-block") }} | ||
|
||
## Import | ||
|
||
To import just this component into your project, copy the snippet below and include it in your main Sass file. | ||
|
||
```scss | ||
// import Vanilla and include base mixins | ||
// this only needs to happen once in a given project | ||
@import 'vanilla-framework'; | ||
@include vf-base; | ||
|
||
@include vf-p-cta-block; | ||
@include vf-p-buttons; | ||
``` | ||
|
||
For more information see [Customising Vanilla](/docs/customising-vanilla/) in your projects, which includes overrides and importing instructions. |