From 47a3ce2d35a511035ff666bba032bdbb3e239d55 Mon Sep 17 00:00:00 2001 From: brockwhittaker Date: Mon, 9 Jan 2017 16:15:18 -0800 Subject: [PATCH] Seperate information overlay CSS into own file. This takes the information overlay CSS and moves it from zulip.css to informational-overlays.css to help separate out isolated components. --- static/styles/informational-overlays.css | 85 ++++++++++++++++++++++++ static/styles/zulip.css | 67 ------------------- templates/zerver/index.html | 2 +- zproject/settings.py | 2 + 4 files changed, 88 insertions(+), 68 deletions(-) create mode 100644 static/styles/informational-overlays.css diff --git a/static/styles/informational-overlays.css b/static/styles/informational-overlays.css new file mode 100644 index 0000000000..a592889a1d --- /dev/null +++ b/static/styles/informational-overlays.css @@ -0,0 +1,85 @@ +.informational-overlays { + position: fixed; + top: 0; + left: 0; + width: 100vw; + height: 100vh; + z-index: 102; + + opacity: 0; + pointer-events: none; + + background-color: rgba(0,0,0,0.8); + transition: all 0.3s ease; +} + +.informational-overlays.show { + visibility: visible; + opacity: 1; + pointer-events: auto; +} + +.informational-overlays .overlay-content { + /* because zoom breaks at 525px perhaps due to rounding errors, so add a + trivial amount of width so it doesn't break. */ + width: 525.03px; + margin: 0 auto; + position: relative; + top: calc((30vh - 50px) / 2); + border-radius: 4px; + overflow: hidden; + + background-color: #fff; +} + +.informational-overlays .overlay-content h1 { + padding: 0px 0px 7px 10px; + + font-weight: 300; + font-size: 1.8em; + + border-bottom: 1px solid #eee; +} + +.informational-overlays .overlay-tabs { + border-bottom: 1px solid #eee; + background-color: #888; +} + +.informational-overlays .overlay-tabs .tab { + float: left; + width: calc(33.33% - 1.1px); + + text-align: center; + padding: 12px 0px; + border-right: 1px solid #eee; + background-color: #fff; + + cursor: pointer; +} + +.informational-overlays .overlay-tabs .tab:last-of-type { + border-right: none; +} + +.informational-overlays .overlay-tabs .tab.active { + background-color: #888; + color: #fff; + border-color: transparent; +} + +.informational-overlays .overlay-modal .modal-body { + height: 70vh; +} + +.informational-overlays .overlay-modal .modal-header h3 { + font-weight: 300; +} + +.informational-overlays .overlay-modal .modal-body th { + font-weight: 400; +} + +.informational-overlays td.operator { + font-size: 0.9em; +} diff --git a/static/styles/zulip.css b/static/styles/zulip.css index e608d75833..827289d651 100644 --- a/static/styles/zulip.css +++ b/static/styles/zulip.css @@ -1593,73 +1593,6 @@ blockquote p { z-index: 5; } -.informational-overlays { - position: fixed; - top: 0; - left: 0; - width: 100vw; - height: 100vh; - z-index: 102; - - opacity: 0; - pointer-events: none; - - background-color: rgba(0,0,0,0.8); - transition: all 0.3s ease; -} - -.informational-overlays.show { - visibility: visible; - opacity: 1; - pointer-events: auto; -} - -.informational-overlays .overlay-content { - width: 525px; - margin: 0 auto; - position: relative; - top: calc(50vh - 30vh - 90px); - border-radius: 4px; - overflow: hidden; - - background-color: #fff; -} - -.informational-overlays .overlay-tabs { - border-bottom: 1px solid #eee; -} - -.informational-overlays .overlay-tabs .tab { - float: left; - width: calc(33.33% - 1px); - - text-align: center; - padding: 15px 0px; - border-right: 1px solid #eee; - - cursor: pointer; -} - -.informational-overlays .overlay-tabs .tab.active { - background-color: #eee; -} - -.informational-overlays .overlay-tabs .tab:last-of-type { - border-right: none; -} - -.informational-overlays .overlay-modal .modal-header h3 { - font-weight: 300; -} - -.informational-overlays .overlay-modal .modal-body th { - font-weight: 400; -} - -.informational-overlays td.operator { - font-size: 0.9em; -} - nav .column-left { text-align: center; diff --git a/templates/zerver/index.html b/templates/zerver/index.html index fd9e9885e2..bf8f4c0818 100644 --- a/templates/zerver/index.html +++ b/templates/zerver/index.html @@ -129,7 +129,7 @@ var page_params = {{ page_params }};
Keyboard Shortcuts
Search Help
-
Markdown Formatting
+
Markdown Formatting
diff --git a/zproject/settings.py b/zproject/settings.py index 34dd7c3c05..152cc0b014 100644 --- a/zproject/settings.py +++ b/zproject/settings.py @@ -691,6 +691,7 @@ PIPELINE = { 'styles/zulip.css', 'styles/settings.css', 'styles/subscriptions.css', + 'styles/informational-overlays.css', 'styles/compose.css', 'styles/reactions.css', 'styles/left-sidebar.css', @@ -712,6 +713,7 @@ PIPELINE = { 'styles/zulip.css', 'styles/settings.css', 'styles/subscriptions.css', + 'styles/informational-overlays.css', 'styles/compose.css', 'styles/reactions.css', 'styles/left-sidebar.css',