Merge pull request #30068 from sftim/20211013_use_docsy_alerts

Use Docsy alert classes
This commit is contained in:
Kubernetes Prow Robot
2021-10-26 18:01:41 -07:00
committed by GitHub
5 changed files with 32 additions and 24 deletions
+21 -14
View File
@@ -313,33 +313,40 @@ main {
// blockquotes and callouts // blockquotes and callouts
.td-content, body { body {
blockquote.callout { .alert {
// Override Docsy styles
padding: 0.4rem 0.4rem 0.4rem 1rem; padding: 0.4rem 0.4rem 0.4rem 1rem;
border: 1px solid #eee; border-top: 1px solid #eee;
border-left-width: 0.5em; border-bottom: 1px solid #eee;
border-right: 1px solid #eee;
border-radius: 0.25em;
border-left-width: 0.5em; // fallback in case calc() is missing
background: #fff; background: #fff;
color: #000; color: #000;
margin-top: 0.5em; margin-top: 0.5em;
margin-bottom: 0.5em; margin-bottom: 0.5em;
} }
blockquote.callout { // Set minimum width and radius for alert color
border-radius: calc(1em/3); .alert {
border-left-width: calc(max(0.5em, 4px));
border-top-left-radius: calc(max(0.5em, 4px));
border-bottom-left-radius: calc(max(0.5em, 4px));
} }
.callout.caution { .alert.callout.caution {
border-left-color: #f0ad4e; border-left-color: #f0ad4e;
} }
.alert.callout.note {
.callout.note {
border-left-color: #428bca; border-left-color: #428bca;
} }
.alert.callout.warning {
.callout.warning {
border-left-color: #d9534f; border-left-color: #d9534f;
} }
.alert.third-party-content {
border-left-color: #444;
}
h1:first-of-type + .alert.callout {
h1:first-of-type + blockquote.callout {
margin-top: 1.5em; margin-top: 1.5em;
} }
} }
@@ -367,7 +374,7 @@ main {
background: #f8f9cb; background: #f8f9cb;
} }
.deprecation-warning { .deprecation-warning, .pageinfo.deprecation-warning {
padding: 20px; padding: 20px;
margin: 20px 0; margin: 20px 0;
background-color: #faf5b6; background-color: #faf5b6;
+1 -1
View File
@@ -1,6 +1,6 @@
{{ if (.Site.Param "deprecated") }} {{ if (.Site.Param "deprecated") }}
<section id="deprecation-warning"> <section id="deprecation-warning">
<div class="content deprecation-warning"> <div class="content deprecation-warning pageinfo">
<h3> <h3>
{{ T "deprecation_title" }} {{ .Param "version" }} {{ T "deprecation_title" }} {{ .Param "version" }}
</h3> </h3>
+3 -3
View File
@@ -1,3 +1,3 @@
<blockquote class="caution callout"> <div class="alert alert-warning caution callout" role="alert">
<div><strong>{{ T "caution" }}</strong> {{ trim .Inner " \n" | markdownify }}</div> <strong>{{ T "caution" }}</strong> {{ trim .Inner " \n" | markdownify }}
</blockquote> </div>
+3 -3
View File
@@ -1,3 +1,3 @@
<blockquote class="note callout"> <div class="alert alert-info note callout" role="alert">
<div><strong>{{ T "note" }}</strong> {{ trim .Inner " \n" | markdownify }}</div> <strong>{{ T "note" }}</strong> {{ trim .Inner " \n" | markdownify }}
</blockquote> </div>
+4 -3
View File
@@ -1,3 +1,4 @@
<blockquote class="warning callout"> <div class="alert alert-danger warning callout" role="alert">
<div><strong>{{ T "warning" }}</strong> {{ trim .Inner " \n" | markdownify }}</div> <strong>{{ T "warning" }}</strong> {{ trim .Inner " \n" | markdownify }}
</blockquote> </div>