diff --git a/_locales/en/messages.json b/_locales/en/messages.json index d8bb7f1..5f01939 100644 --- a/_locales/en/messages.json +++ b/_locales/en/messages.json @@ -56,6 +56,12 @@ "better_sidebar": { "message": "Better Sidebar" }, + "quiz_safe_mode": { + "message": "Quiz Safe Mode" + }, + "quiz_safe_mode_desc": { + "message": "Turns off most Canvas Refined features on quiz pages so you get the default Canvas quiz experience." + }, "opacity_options": { "message": "Opacity & Blur" }, diff --git a/css/content.css b/css/content.css index 9936391..b6464c4 100644 --- a/css/content.css +++ b/css/content.css @@ -217,4 +217,52 @@ .canvasrefined-notes-editor::placeholder {color:var(--bctext-2,#9aa3ab);} .canvasrefined-dashboard-notes:not(.is-editing) .canvasrefined-notes-toolbar {display:none;} .canvasrefined-dashboard-notes.is-editing .canvasrefined-notes-rendered {display:none;} -.canvasrefined-dashboard-notes:not(.is-editing) .canvasrefined-notes-editor {display:none;} \ No newline at end of file +.canvasrefined-dashboard-notes:not(.is-editing) .canvasrefined-notes-editor {display:none;} +/* Quiz safe mode banner (pre-quiz pages) */ +.canvasrefined-quiz-safe-banner { + box-sizing: border-box; + margin: 16px 0; + padding: 14px 16px; + border: 1px solid #d4a017; + border-left: 4px solid #d4a017; + border-radius: 6px; + background: #fff8e1; + color: #333; + font-family: inherit; + font-size: 14px; + line-height: 1.45; + max-width: 760px; +} +.canvasrefined-quiz-safe-title { + font-weight: 700; + font-size: 15px; + margin-bottom: 6px; + color: #7a5a00; +} +.canvasrefined-quiz-safe-info { margin: 0 0 10px; } +.canvasrefined-quiz-safe-row { + display: flex; + flex-wrap: wrap; + align-items: center; + gap: 12px; +} +.canvasrefined-quiz-safe-toggle { + display: inline-flex; + align-items: center; + gap: 8px; + cursor: pointer; + user-select: none; +} +.canvasrefined-quiz-safe-toggle input { width: 16px; height: 16px; cursor: pointer; } +.canvasrefined-quiz-safe-toggle-label { font-weight: 600; } +.canvasrefined-quiz-safe-dismiss { + margin-left: auto; + background: #f5f5f5; + border: 1px solid #c7cdd1; + border-radius: 6px; + padding: 4px 10px; + cursor: pointer; + font-size: 13px; + color: #000 !important; +} +.canvasrefined-quiz-safe-dismiss:hover { background: #ececec; } diff --git a/css/popup.css b/css/popup.css index d0f7644..95ad7d7 100644 --- a/css/popup.css +++ b/css/popup.css @@ -287,4 +287,44 @@ input[type="checkbox"]:checked {background: #8dd28d;} .search-result.empty { text-align: center; color: #8d8d8d; font-size: 12px; cursor: default; padding: 12px; } .search-result.empty:hover { background: none; } .search-highlight { outline: 2px solid #56Caf0; outline-offset: 2px; border-radius: 8px; animation: search-pulse 1.8s ease-out; } -@keyframes search-pulse { 0% { box-shadow: 0 0 0 0 #56Caf099; } 40% { box-shadow: 0 0 0 6px #56Caf000; } 100% { box-shadow: 0 0 0 0 #56Caf000; } } \ No newline at end of file +@keyframes search-pulse { 0% { box-shadow: 0 0 0 0 #56Caf099; } 40% { box-shadow: 0 0 0 6px #56Caf000; } 100% { box-shadow: 0 0 0 0 #56Caf000; } } +/* ===== Quiz Safe Mode info bubble ===== */ +.cr-info-bubble { + display: inline-flex; + align-items: center; + justify-content: center; + margin-left: 6px; + width: 16px; + height: 16px; + color: #8d8d8d; + cursor: help; + position: relative; + vertical-align: middle; +} +.cr-info-bubble:hover, +.cr-info-bubble:focus { color: #56Caf0; } +.cr-info-bubble-text { + visibility: hidden; + opacity: 0; + pointer-events: none; + position: absolute; + bottom: calc(100% + 8px); + left: 50%; + transform: translateX(-50%); + width: max-content; + max-width: 220px; + background: #0e0e0ef0; + color: #e2e2e2; + border: 1px solid #ffffff1a; + border-radius: 8px; + padding: 8px 11px; + font-size: 12px; + font-weight: 500; + line-height: 1.4; + box-shadow: 0 8px 24px rgba(0,0,0,.45); + transition: opacity .15s ease, visibility .15s ease; + z-index: 1000; + text-align: left; +} +.cr-info-bubble:hover .cr-info-bubble-text, +.cr-info-bubble:focus .cr-info-bubble-text { visibility: visible; opacity: 1; } diff --git a/html/popup.html b/html/popup.html index c59ee22..10ac9e2 100644 --- a/html/popup.html +++ b/html/popup.html @@ -190,6 +190,20 @@ Todo Reminders +