more polish

This commit is contained in:
Ryan Peters 2021-07-19 23:43:01 -04:00
parent 2545798c76
commit f56e24f7ef
3 changed files with 14 additions and 15 deletions

View File

@ -13,12 +13,15 @@
</head>
<body>
<header class="container">
<nav class="navbar navbar-expand-lg navbar-light">
<nav class="navbar navbar-expand navbar-light">
<a class="navbar-brand" href="#">HTML 101</a>
<div class="collapse navbar-collapse right">
<div class="collapse navbar-collapse">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<div class="navbar-text btn font-italic" id="live-mode-status">With <strong>Live Mode</strong> enabled, anything the teacher types will show in your editor</div>
<li class="nav-item d-none d-md-block">
<div class="navbar-text font-italic" id="live-mode-status">
<div><strong>Live Mode Enabled</strong></div>
<div>Anything the teacher types will show in your editor</div>
</div>
</li>
<li class="nav-item">
<a class="nav-link btn" id="live-mode-link" href="#live">Live Mode</a>

View File

@ -16,4 +16,8 @@ textarea, .navbar-brand {
#live-mode-status {
display: none;
font-size: 13px;
text-align: right;
padding: 4px 10px 0;
line-height: 18px;
}

View File

@ -13,23 +13,17 @@
.toggleClass('btn-success text-white', isLive)
.attr('href', isLive ? '#' : '#live');
if (isLive) {
$liveModeStatus.fadeIn();
} else {
$liveModeStatus.fadeOut();
}
isLive ? $liveModeStatus.fadeIn() : $liveModeStatus.fadeOut();
};
let isTeacher = window.location.hash === '#teacher';
isLiveMode();
$(window).on('hashchange', isLiveMode);
var connection = new signalR.HubConnectionBuilder().withUrl("/codeHub").build();
let isTeacher = window.location.hash === '#4ELQcUq7UnFGghAZCVr4Chr9JmtncigfkGu5WSf9';
if (isTeacher) {
//window.location.hash = '#';
$liveModeLink.hide();
@ -71,6 +65,4 @@
}).catch(function (err) {
return console.error(err.toString());
});
});