Add a disclaimer to tutorials involving Ruby code (#8525)

Merge pull request 8525
This commit is contained in:
Ashwin Maroli 2021-01-01 21:49:08 +05:30 committed by GitHub
parent 92e50227bd
commit 75a895c95d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

View File

@ -27,6 +27,13 @@ layout: default
{% endif %}
</header>
{{- content -}}
{% if page.plugin_disclaimer %}
<div class="disclaimer-ribbon">
Disclaimer: The Jekyll Core Team does not endorse the Ruby code in this tutorial and is
not liable to resolve any bugs therein or issues arising otherwise from the use of the
provided example(s) in production builds.
</div>
{% endif %}
{%- include section_nav_tutorials.html -%}
</article>
</div>

View File

@ -1318,3 +1318,30 @@ p.note {
ol div.highlighter-rouge {
margin: 8px 0 10px 0;
}
.disclaimer-ribbon {
position: relative;
width: calc(100% + 100px);
margin: 45px -50px 0;
padding: 5px 20px;
font-size: 0.725em;
font-weight: 600;
color: #efc98f;
background: #695949;
&:before, &:after {
position: absolute;
top: -9px;
content: "";
display: table;
border: 5px solid;
z-index: -1;
}
&:before {
left: 0;
border-color: transparent #b28b70 #b28b70 transparent;
}
&:after {
right: 0;
border-color: transparent transparent #b28b70 #b28b70;
}
}