Skip to content

Commit 2e7a4fa

Browse files
HTML: add warning to page when built with build-preview
1 parent 219857d commit 2e7a4fa

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
@@ -11298,6 +11298,9 @@ along with MathBook XML. If not, see <http://www.gnu.org/licenses/>.
1129811298
</xsl:attribute>
1129911299
</xsl:if>
1130011300
<div id="ptx-content" class="ptx-content">
11301+
<xsl:if test="$b-build-preview">
11302+
<div class="preview-build-warning">Preview build. Links and knowls that cross pages may not function correctly.</div>
11303+
</xsl:if>
1130111304
<xsl:if test="$b-has-printout">
1130211305
<xsl:apply-templates select="." mode="print-preview-header"/>
1130311306
</xsl:if>

0 commit comments

Comments
 (0)