diff --git a/lms/static/sass/course/wiki/_wiki.scss b/lms/static/sass/course/wiki/_wiki.scss index d15f408e13..a58b8fa06c 100644 --- a/lms/static/sass/course/wiki/_wiki.scss +++ b/lms/static/sass/course/wiki/_wiki.scss @@ -567,11 +567,80 @@ section.wiki { background: #f00 !important; } - + .cheatsheet { + float: right; + position: relative; + top: -26px; + font-size: 12px; + } + #cheatsheetLink { + text-align: right; + display: float; + } + #cheatsheetModal { + width: 950px; + margin-left: -450px; + margin-top: -100px; + .left-column { + margin-right: 10px; + } + .left-column, + .right-column { + float: left; + width: 450px; + } + + .close-btn { + display: block; + position: absolute; + top: -8px; + right: -8px; + width: 30px; + height: 30px; + border-radius: 30px; + border: 1px solid #ccc; + @include linear-gradient(top, #eee, #d2d2d2); + font-size: 22px; + line-height: 28px; + color: #333; + text-align: center; + @include box-shadow(0 1px 0 #fff inset, 0 1px 2px rgba(0, 0, 0, .2)); + } + } + + #cheatsheet-body { + background: #fff; + text-align: left; + padding: 20px; + font-size: 14px; + @include clearfix; + + h3 { + font-weight: bold; + } + + ul { + list-style: circle; + line-height: 1.4; + color: #333; + } + } + + #cheatsheet-body section + section { + margin-top: 40px; + } + + #cheatsheet-body pre{ + color: #000; + text-align: left; + background: #eee; + padding: 10px; + font-size: 12px; + } /*----------------- diff --git a/lms/templates/wiki/base.html b/lms/templates/wiki/base.html index fc4a2d18d4..1c1bbc4a63 100644 --- a/lms/templates/wiki/base.html +++ b/lms/templates/wiki/base.html @@ -27,21 +27,32 @@ }); } - - + + {% addtoblock 'js' %} {% comment %} These scripts load at the bottom of the body {% endcomment %} - + - + {% with mathjax_mode='wiki' %} {% include "mathjax_include.html" %} {% endwith %} - + {% endaddtoblock %} - + {% endblock %} @@ -64,11 +75,14 @@ {% endfor %} {% endif %} - + {% block wiki_contents %}{% endblock %} - + {% endblock %} + + {% include "wiki/includes/cheatsheet.html" %} + {% endblock %} diff --git a/lms/templates/wiki/includes/cheatsheet.html b/lms/templates/wiki/includes/cheatsheet.html new file mode 100644 index 0000000000..429c1ea22e --- /dev/null +++ b/lms/templates/wiki/includes/cheatsheet.html @@ -0,0 +1,56 @@ +