Skip to content
This repository was archived by the owner on Jun 7, 2023. It is now read-only.

Commit 54369f9

Browse files
committed
Add a message when not logged in
1 parent 14fc52a commit 54369f9

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

runestone/common/css/runestone-custom-sphinx-bootstrap.css

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -464,6 +464,10 @@ h2 {
464464
font-weight: normal;
465465
}
466466

467+
.navbar_message {
468+
margin-top: 15px;
469+
font-weight: bold;
470+
}
467471
/*
468472
Missing brackets
469473
================

runestone/common/js/bookfuncs.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ async function handlePageSetup() {
208208
} else {
209209
mess = "Not logged in";
210210
$(document).trigger("runestone:logout");
211+
document.getElementById("browsing_warning").innerHTML =
212+
"<p class='navbar_message'>Saving and Logging are Disabled</p>";
211213
}
212214
$(".loggedinuser").html(mess);
213215

runestone/common/project_template/_templates/plugin_layouts/sphinx_bootstrap/layout.html

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@
6666
<ul class="nav navbar-nav navbar-right" >
6767

6868
<li class="divider-vertical"></li>
69-
69+
<li><span id="browsing_warning"></span></li>
7070

7171
<!-- social media dropdown -->
7272
{% if minimal_outside_links != 'True' %}
@@ -105,7 +105,6 @@
105105
<!-- end social media dropdown -->
106106

107107
<li class="divider-vertical"></li>
108-
109108
<!-- search dropdown -->
110109
<li class="dropdown">
111110
<a class="dropdown-toggle" href="#" data-toggle="dropdown">

0 commit comments

Comments
 (0)