Skip to content

Commit

Permalink
Merge pull request #20 from appsembler/esther/final-prism-settings
Browse files Browse the repository at this point in the history
finalize prism settings
  • Loading branch information
estherjsuh authored Jul 20, 2021
2 parents 552f8ea + 705bdff commit 072a16c
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 94 deletions.
9 changes: 7 additions & 2 deletions prism/prism.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,15 +33,20 @@ class PrismXBlock(XBlock):
)

LANGUAGE_CHOICES = [
{'display_name': 'Bash', 'value': 'bash'},
{'display_name': 'C-like', 'value': 'clike'},
{'display_name': 'CSS', 'value': 'css'},
{'display_name': 'Go', 'value': 'go'},
{'display_name': 'Markup', 'value': 'markup'},
{'display_name': 'Java', 'value': 'java'},
{'display_name': 'Javascript', 'value': 'javascript'},
{'display_name': 'JSON', 'value': 'json'},
{'display_name': 'Lua', 'value': 'lua'},
{'display_name': 'Markup', 'value': 'markup'},
{'display_name': 'Python', 'value': 'python'},
{'display_name': 'Ruby', 'value': 'ruby'},
{'display_name': 'Shell-Session', 'value': 'shell-session'}
{'display_name': 'Shell-Session', 'value': 'shell-session'},
{'display_name': 'SQL', 'value': 'sql'},
{'display_name': 'YAML', 'value': 'yaml'},
]

LANGUAGE_HELP = "Select a programming language"
Expand Down
36 changes: 1 addition & 35 deletions prism/static/css/dark.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* PrismJS 1.24.1
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+bash+go+java+python+ruby+shell-session+sql&plugins=command-line */
https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+clike+javascript+bash+go+java+json+lua+python+ruby+shell-session+sql+yaml */
/**
* prism.js tomorrow night eighties for JavaScript, CoffeeScript, CSS and HTML
* Based on https://github.com/chriskempson/tomorrow-theme
Expand Down Expand Up @@ -123,38 +123,4 @@ https://prismjs.com/download.html#themes=prism-tomorrow&languages=markup+css+cli
color: green;
}

.command-line-prompt {
border-right: 1px solid #999;
display: block;
float: left;
font-size: 100%;
letter-spacing: -1px;
margin-right: 1em;
pointer-events: none;

-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

.command-line-prompt > span:before {
color: #999;
content: ' ';
display: block;
padding-right: 0.8em;
}

.command-line-prompt > span[data-user]:before {
content: "[" attr(data-user) "@" attr(data-host) "] $";
}

.command-line-prompt > span[data-user="root"]:before {
content: "[" attr(data-user) "@" attr(data-host) "] #";
}

.command-line-prompt > span[data-prompt]:before {
content: attr(data-prompt);
}


36 changes: 1 addition & 35 deletions prism/static/css/light.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* PrismJS 1.24.1
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+go+java+python+ruby+shell-session+sql&plugins=command-line */
https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+bash+go+java+json+lua+python+ruby+shell-session+sql+yaml */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
Expand Down Expand Up @@ -141,38 +141,4 @@ https://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javasc
cursor: help;
}

.command-line-prompt {
border-right: 1px solid #999;
display: block;
float: left;
font-size: 100%;
letter-spacing: -1px;
margin-right: 1em;
pointer-events: none;

-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
}

.command-line-prompt > span:before {
color: #999;
content: ' ';
display: block;
padding-right: 0.8em;
}

.command-line-prompt > span[data-user]:before {
content: "[" attr(data-user) "@" attr(data-host) "] $";
}

.command-line-prompt > span[data-user="root"]:before {
content: "[" attr(data-user) "@" attr(data-host) "] #";
}

.command-line-prompt > span[data-prompt]:before {
content: attr(data-prompt);
}


8 changes: 1 addition & 7 deletions prism/static/html/lms.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,8 @@
<div class="editor" id="editor">

<div>
<!-- <pre class='command-line'><code class="language-shell-session">{{self.code_data}}</code></pre> -->
{% if self.language == "shell-session" %}
<pre class='command-line' style="max-height:{{self.maxheight}}px"><code class="language-shell-session">{{self.code_data}}</code></pre>
{% else %}
<pre style="max-height:{{self.maxheight}}px"><code class="language-{{self.language}}" >{{self.code_data}}</code></pre>
{% endif %}
</div>

</div>
</div>
<!-- class="language-{{self.language}}" -->
</div>
Loading

0 comments on commit 072a16c

Please sign in to comment.