mirror of
https://github.com/rancher/rancher-docs.git
synced 2026-09-25 04:28:15 +00:00
cta inline with heading
This commit is contained in:
committed by
Catherine Luse
parent
237898bd17
commit
7011eaf29a
@@ -34,6 +34,7 @@ pre > code {
|
||||
align-items: center;
|
||||
margin-bottom: 1.5rem;
|
||||
width: auto;
|
||||
float: right;
|
||||
transition: width 200ms ease-in-out;
|
||||
|
||||
.content {
|
||||
|
||||
+10
-14
@@ -42,15 +42,13 @@
|
||||
col-12
|
||||
texts-container">
|
||||
<div class="docs-wrap">
|
||||
<div class="docs-cta-wrapper">
|
||||
<div class="docs-cta">
|
||||
<a class="icon">?</a>
|
||||
<span class="content">
|
||||
<strong>Need Help? </strong>
|
||||
<a href="https://rancher.com/training">Get free intro and advanced online training</a>
|
||||
</span>
|
||||
<a class="close">×</a>
|
||||
</div>
|
||||
<div class="docs-cta">
|
||||
<a class="icon">?</a>
|
||||
<span class="content">
|
||||
<strong>Need Help? </strong>
|
||||
<a href="https://rancher.com/training">Get free intro and advanced online training</a>
|
||||
</span>
|
||||
<a class="close">×</a>
|
||||
</div>
|
||||
|
||||
<script>
|
||||
@@ -64,12 +62,9 @@
|
||||
return decodeURIComponent(cookiePair[1]);
|
||||
}
|
||||
}
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
console.log(getCookie('ctaClosed'))
|
||||
|
||||
if (getCookie('ctaClosed') == 'true') {
|
||||
$('.docs-cta .content, .docs-cta .close').hide();
|
||||
$('.docs-cta').addClass('closed');
|
||||
@@ -78,17 +73,18 @@
|
||||
$('.docs-cta .icon').click(function (e) {
|
||||
e.preventDefault;
|
||||
$('.docs-cta .content, .docs-cta .close').show('fast');
|
||||
$('.docs-cta').remove('closed');
|
||||
$('.docs-cta').removeClass('closed');
|
||||
document.cookie = "ctaClosed=false;path=/";
|
||||
});
|
||||
|
||||
$('.docs-cta .close').click(function (e) {
|
||||
e.preventDefault;
|
||||
$('.docs-cta .content, .docs-cta .close').hide('fast');
|
||||
$('.docs-cta').toggleClass('closed');
|
||||
$('.docs-cta').addClass('closed');
|
||||
document.cookie = "ctaClosed=true;SameSite=Lax;path=/;max-age=" + 10 * 24 * 60 * 60;
|
||||
});
|
||||
</script>
|
||||
|
||||
{{ with .Params.Title }}
|
||||
<h1 class="m-t-0">{{ . }}</h1>
|
||||
<hr />
|
||||
|
||||
Reference in New Issue
Block a user