Skip to content

Commit

Permalink
Add a disclaimer to tutorials involving Ruby code (#8525)
Browse files Browse the repository at this point in the history
Merge pull request 8525
  • Loading branch information
ashmaroli committed Jan 1, 2021
1 parent 92e5022 commit 75a895c
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 0 deletions.
7 changes: 7 additions & 0 deletions docs/_layouts/tutorials.html
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ <h1 class="tutorial-title">{{ page.title }}</h1>
{% 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>
Expand Down
27 changes: 27 additions & 0 deletions docs/_sass/_style.scss
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

0 comments on commit 75a895c

Please sign in to comment.