mirror of https://github.com/docker/docs.git
Add upgrade CTA mixin
This commit is contained in:
parent
c12de0a87a
commit
c84baca51c
|
|
@ -0,0 +1,9 @@
|
||||||
|
<div class="docker-upgrade-cta" role="alert">
|
||||||
|
<div class="docker-upgrade-cta__heading">This feature requires a Pro or Team plan.</div>
|
||||||
|
|
||||||
|
{{ include.body | markdownify }}
|
||||||
|
|
||||||
|
<a class="btn btn-primary" role="button" href="{{include.target-url}}">
|
||||||
|
Upgrade my plan
|
||||||
|
</a>
|
||||||
|
</div>
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
.docker-upgrade-cta {
|
||||||
|
background-color: $orange-10;
|
||||||
|
|
||||||
|
padding: 16px 25px;
|
||||||
|
margin: 0 0 20px;
|
||||||
|
|
||||||
|
border-radius: 4px;
|
||||||
|
border: 1px solid $orange-20;
|
||||||
|
|
||||||
|
.docker-upgrade-cta__heading {
|
||||||
|
font-weight: bold;
|
||||||
|
font-size: 16px;
|
||||||
|
|
||||||
|
font-family: $headings;
|
||||||
|
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -18,3 +18,4 @@
|
||||||
@import "overrides";
|
@import "overrides";
|
||||||
@import "mobile";
|
@import "mobile";
|
||||||
@import "notes";
|
@import "notes";
|
||||||
|
@import "upgrade-cta";
|
||||||
|
|
|
||||||
11
test.md
11
test.md
|
|
@ -659,6 +659,17 @@ It will render like this with a colored sidebar and icon:
|
||||||
|
|
||||||

|

|
||||||
|
|
||||||
|
## Upgrade CTA
|
||||||
|
|
||||||
|
Use the `upgrade-cta.html` include to render a CTA asking the user to upgrade their plan. There are two parameters:
|
||||||
|
|
||||||
|
- `target-url`: This will typically be something like https://www.docker.com/pricing, possibly with a utm code.
|
||||||
|
- `body`: This forms the body of the CTA. It accepts Markdown. To use multi-line bodies, use named captures as explained in [the Jekyll docs](https://jekyllrb.com/docs/includes/#passing-parameter-variables-to-includes).
|
||||||
|
|
||||||
|
```
|
||||||
|
{% include upgrade-cta.html body="Upgrade to gain access to this feature" target-url="https://www.example.com/" %}
|
||||||
|
```
|
||||||
|
|
||||||
## Code blocks
|
## Code blocks
|
||||||
|
|
||||||
Rouge provides lots of different code block "hints". If you leave off the hint,
|
Rouge provides lots of different code block "hints". If you leave off the hint,
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue