Skip to content

Commit 43102cf

Browse files
HTML: add warning to page when built with build-preview
1 parent c68f9ef commit 43102cf

2 files changed

Lines changed: 13 additions & 0 deletions

File tree

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
@@ -11368,6 +11368,9 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
1136811368
</xsl:attribute>
1136911369
</xsl:if>
1137011370
<div id="ptx-content" class="ptx-content">
11371+
<xsl:if test="$b-build-preview">
11372+
<div class="preview-build-warning">Preview build. Links and knowls that cross pages may not function correctly.</div>
11373+
</xsl:if>
1137111374
<xsl:if test="$b-has-printout">
1137211375
<xsl:apply-templates select="." mode="print-preview-header"/>
1137311376
</xsl:if>

0 commit comments

Comments
 (0)