Skip to content

Commit c2a4365

Browse files
HTML: add warning to page when built with build-preview
1 parent 0bc02d3 commit c2a4365

File tree

2 files changed

+13
-0
lines changed

2 files changed

+13
-0
lines changed

css/components/elements/_misc-content.scss

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,16 @@ article.theorem-like .emphasis {
151151
font-style: oblique;
152152
}
153153

154+
.preview-build-warning {
155+
background-color: rgb(249, 240, 240);
156+
border: 2px solid rgb(202, 38, 38);
157+
border-radius: 2px;
158+
color: #333;
159+
padding: 10px;
160+
margin: 10px 0;
161+
}
162+
163+
154164
/* Adapted from William Hammond (attributed to David Carlisle) */
155165
/* "mathjax-users" Google Group, 2015-12-27 */
156166

xsl/pretext-html.xsl

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11198,6 +11198,9 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
1119811198
</xsl:attribute>
1119911199
</xsl:if>
1120011200
<div id="ptx-content" class="ptx-content">
11201+
<xsl:if test="$b-build-preview">
11202+
<div class="preview-build-warning">Preview build. Links and knowls that cross pages may not function correctly.</div>
11203+
</xsl:if>
1120111204
<xsl:if test="$b-printable">
1120211205
<div class="print-preview-header">
1120311206
<xsl:apply-templates select="." mode="print-preview-header"/>

0 commit comments

Comments
 (0)