[geany/www.geany.org] 8d71f6: Use "tabs" on snippet detail page to show highlighted snippet and a plain view
Enrico Tröger
git-noreply at xxxxx
Sun Jan 5 13:04:31 UTC 2014
Branch: refs/heads/master
Author: Enrico Tröger <enrico.troeger at uvena.de>
Committer: Enrico Tröger <enrico.troeger at uvena.de>
Date: Sun, 05 Jan 2014 13:04:31 UTC
Commit: 8d71f6fc798bd96f85c5a3693248ad419838ce49
https://github.com/geany/www.geany.org/commit/8d71f6fc798bd96f85c5a3693248ad419838ce49
Log Message:
-----------
Use "tabs" on snippet detail page to show highlighted snippet and a plain view
Modified Paths:
--------------
pastebin/static/css/pastebin.css
pastebin/templates/pastebin/snippet_details.html
Modified: pastebin/static/css/pastebin.css
23 files changed, 23 insertions(+), 0 deletions(-)
===================================================================
@@ -1,3 +1,19 @@
+/*
+ * Tabs
+ */
+.nav-tabs > li > a {
+ /* inactive tab */
+ background-color: rgb(220, 220, 220);
+}
+
+.nav > li > a:hover, .nav > li > a:focus {
+ background-color: rgb(225, 225, 225);
+}
+/*
+ * Tabs
+ */
+
+
.new-snippet-form textarea {
font-family: monospace;
width: 100%;
@@ -90,6 +106,13 @@ div.snippet table {
padding: 0;
border-collapse: collapse;
}
+
+.snippet-plain {
+ font-family: monospace;
+ font-size: 12px;
+ height: 300px;
+ width: 90%;
+}
/*
* Snippet
*/
Modified: pastebin/templates/pastebin/snippet_details.html
30 files changed, 21 insertions(+), 9 deletions(-)
===================================================================
@@ -32,15 +32,27 @@
{% if snippet.author %}{{ snippet.author }}{% else %}Anonymous{% endif %}
as {{ snippet.lexer|title }}</p>
-<div class="snippet">
-<ol>
- {% for line in snippet|highlight %}
- <li id="l{{ forloop.counter }}">
- <div class="line"><pre class="code">{% if line %}{{ line|safe }}{% else %} {% endif %}</pre></div>
- </li>
- {% endfor %}
-</ol>
-
+<div class="tabbable">
+ <ul class="nav nav-tabs">
+ <li class="active"><a href="#tab1" data-toggle="tab">Markup</a></li>
+ <li><a href="#tab2" data-toggle="tab">Plain</a></li>
+ </ul>
+ <div class="tab-content">
+ <div class="tab-pane active" id="tab1">
+ <div class="snippet">
+ <ol>
+ {% for line in snippet|highlight %}
+ <li id="l{{ forloop.counter }}">
+ <div class="line"><pre class="code">{% if line %}{{ line|safe }}{% else %} {% endif %}</pre></div>
+ </li>
+ {% endfor %}
+ </ol>
+ </div>
+ </div>
+ <div class="tab-pane" id="tab2">
+ <textarea class="snippet-plain">{{ snippet.content }}</textarea>
+ </div>
+ </div>
</div>
<hr/>
--------------
This E-Mail was brought to you by github_commit_mail.py (Source: https://github.com/geany/infrastructure).
More information about the Commits
mailing list