mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2025-02-17 00:40:56 -05:00
Add back to top buttons.
This commit is contained in:
parent
b550aae76a
commit
5c6fb20d7f
2 changed files with 11 additions and 1 deletions
|
@ -14,6 +14,11 @@
|
|||
color: #fff
|
||||
text-decoration: none
|
||||
|
||||
.back-to-top
|
||||
text-transform: none
|
||||
@media print
|
||||
display: none
|
||||
|
||||
.lesson-plans
|
||||
max-width: 900px
|
||||
background-color: #f8f8f8
|
||||
|
|
|
@ -8,6 +8,11 @@ module.exports = class MarkdownResourceView extends RootView
|
|||
@content = ''
|
||||
$.get '/markdown/' + @name + '.md', (data) =>
|
||||
if data.indexOf('<!doctype html>') is -1
|
||||
@content = marked(data, sanitize: false)
|
||||
i = 0
|
||||
@content = marked(data, sanitize: false).replace /<\/h5/g, () ->
|
||||
if i++ == 0
|
||||
'</h5'
|
||||
else
|
||||
'<a class="pull-right btn btn-md btn-navy back-to-top" href="#logo-img">Back to top</a></h5'
|
||||
|
||||
@render()
|
||||
|
|
Loading…
Reference in a new issue