More CS fixes

This commit is contained in:
Klaus Silveira
2013-03-28 23:53:25 -03:00
parent 132ba42616
commit 90a854bf06
8 changed files with 24 additions and 24 deletions

View File

@@ -2,7 +2,7 @@
<li><a href="{{ path('repository', {repo: repo}) }}">{{ repo }}</a></li>
{% for breadcrumb in breadcrumbs %}
<span class="divider">/</span>
<li{% if loop.last %} class="active"{% endif %}>{% if not loop.last %}<a href="{{ path('tree', {repo: repo, commitish_path: branch ~ '/' ~ breadcrumb.path}) }}">{{ breadcrumb.dir }}</a>{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %}</li>
<li{% if loop.last %} class="active"{% endif %}>{% if not loop.last %}<a href="{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ breadcrumb.path}) }}">{{ breadcrumb.dir }}</a>{% endif %}{% if loop.last %}{{ breadcrumb.dir }}{% endif %}</li>
{% endfor %}
{% block extra %}{% endblock %}

View File

@@ -30,8 +30,8 @@
<div class="meta"><a name="{{ loop.index }}">{{ diff.file }}</div>
<div class="btn-group pull-right">
<a href="{{ path('commits', {repo: repo, commitish_path: commit.hash ~ '/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
<a href="{{ path('blob', {repo: repo, commitish_path: commit.hash ~'/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-file"></i> View file @ {{ commit.shortHash }}</a>
<a href="{{ path('commits', {repo: repo, commitishPath: commit.hash ~ '/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
<a href="{{ path('blob', {repo: repo, commitishPath: commit.hash ~'/' ~ diff.file}) }}" class="btn btn-small"><i class="icon-file"></i> View file @ {{ commit.shortHash }}</a>
</div>
</div>

View File

@@ -12,16 +12,16 @@
<div class="meta"></div>
<div class="btn-group pull-right">
<a href="{{ path('blob_raw', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-file"></i> Raw</a>
<a href="{{ path('blame', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-bullhorn"></i> Blame</a>
<a href="{{ path('commits', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
<a href="{{ path('blob_raw', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-file"></i> Raw</a>
<a href="{{ path('blame', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-bullhorn"></i> Blame</a>
<a href="{{ path('commits', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" class="btn btn-small"><i class="icon-list-alt"></i> History</a>
</div>
</div>
{% if fileType == 'image' %}
<center><img src="{{ path('blob_raw', {repo: repo, commitish_path: branch ~ '/' ~ file}) }}" alt="{{ file }}" class="image-blob" /></center>
<center><img src="{{ path('blob_raw', {repo: repo, commitishPath: branch ~ '/' ~ file}) }}" alt="{{ file }}" class="image-blob" /></center>
{% elseif fileType == 'markdown' %}
<div class="readme-view"><div id="readme-content">{{ blob }}</div></div>
<div class="md-view"><div id="md-content">{{ blob }}</div></div>
{% else %}
<pre id="sourcecode" language="{{ fileType }}">{{ blob|htmlentities|raw }}</pre>

View File

@@ -1,5 +1,5 @@
<ul class="nav nav-tabs">
<li{% if page == 'files' %} class="active"{% endif %}><a href="{{ path('branch', {repo: repo, branch: branch}) }}">Files</a></li>
<li{% if page in ['commits', 'searchcommits'] %} class="active"{% endif %}><a href="{{ path('commits', {repo: repo, commitish_path: branch}) }}">Commits</a></li>
<li{% if page in ['commits', 'searchcommits'] %} class="active"{% endif %}><a href="{{ path('commits', {repo: repo, commitishPath: branch}) }}">Commits</a></li>
<li{% if page == 'stats' %} class="active"{% endif %}><a href="{{ path('stats', {repo: repo, branch: branch}) }}">Stats</a></li>
</ul>

View File

@@ -32,7 +32,7 @@
{% if not parent %}
<a href="{{ path('branch', {repo: repo, branch: branch}) }}">..</a>
{% else %}
<a href="{{ path('tree', {repo: repo, commitish_path: branch ~ '/' ~ parent}) }}">..</a>
<a href="{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ parent}) }}">..</a>
{% endif %}
</td>
<td></td>
@@ -43,9 +43,9 @@
<tr>
<td><i class="{{ file.type == "folder" or file.type == "symlink" ? "icon-folder-open" : "icon-file" }} icon-spaced"></i> <a href="
{%- if file.type == "folder" or file.type == "symlink" -%}
{{ path('tree', {repo: repo, commitish_path: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
{{ path('tree', {repo: repo, commitishPath: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
{%- else -%}
{{ path('blob', {repo: repo, commitish_path: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
{{ path('blob', {repo: repo, commitishPath: branch ~ '/' ~ path ~ (file.type == "symlink" ? file.path : file.name)}) }}
{%- endif -%}
">{{ file.name }}</a></td>
<td>{{ file.mode }}</td>
@@ -55,11 +55,11 @@
</tbody>
</table>
{% if readme is defined and readme is not empty %}
<div class="readme-view">
<div class="readme-header">
<div class="md-view">
<div class="md-header">
<div class="meta">{{ readme.filename }}</div>
</div>
<div id="readme-content">{{ readme.content }}</div>
<div id="md-content">{{ readme.content }}</div>
</div>
{% endif %}

View File

@@ -274,8 +274,8 @@ table .span24{float:none;width:1884px;margin-left:0;}
.commit-list li:last-child{border-bottom:0;margin-bottom:25px;}
.repository{margin-bottom:18px;border:1px solid #d7d7d7;-webkit-border-radius:4px;-moz-border-radius:4px;border-radius:4px;}.repository .repository-header{border-bottom:1px solid #d7d7d7;text-shadow:1px 1px 1px #ffffff;padding:8px;font-weight:700;font-size:14px;}
.repository .repository-body{padding:8px;background-color:#f7f7f7;}.repository .repository-body p{margin:0;}
.readme-view{width:100%;margin-bottom:18px;border:1px solid #cacaca;}.readme-view .readme-header{padding:8px;line-height:18px;text-align:left;vertical-align:bottom;background-color:#f4f4f4;background-image:-moz-linear-gradient(top, #fafafa, #eaeaea);background-image:-ms-linear-gradient(top, #fafafa, #eaeaea);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#eaeaea));background-image:-webkit-linear-gradient(top, #fafafa, #eaeaea);background-image:-o-linear-gradient(top, #fafafa, #eaeaea);background-image:linear-gradient(top, #fafafa, #eaeaea);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#eaeaea', GradientType=0);border-bottom:1px solid #d7d7d7;font-weight:bold;color:#555555;text-shadow:1px 1px 1px #ffffff;height:28px;}.readme-view .readme-header .meta{float:left;padding:4px 0;font-size:14px;}
.readme-view #readme-content{padding:30px;color:#000000;}
.md-view{width:100%;margin-bottom:18px;border:1px solid #cacaca;}.md-view .md-header{padding:8px;line-height:18px;text-align:left;vertical-align:bottom;background-color:#f4f4f4;background-image:-moz-linear-gradient(top, #fafafa, #eaeaea);background-image:-ms-linear-gradient(top, #fafafa, #eaeaea);background-image:-webkit-gradient(linear, 0 0, 0 100%, from(#fafafa), to(#eaeaea));background-image:-webkit-linear-gradient(top, #fafafa, #eaeaea);background-image:-o-linear-gradient(top, #fafafa, #eaeaea);background-image:linear-gradient(top, #fafafa, #eaeaea);background-repeat:repeat-x;filter:progid:DXImageTransform.Microsoft.gradient(startColorstr='#fafafa', endColorstr='#eaeaea', GradientType=0);border-bottom:1px solid #d7d7d7;font-weight:bold;color:#555555;text-shadow:1px 1px 1px #ffffff;height:28px;}.md-view .md-header .meta{float:left;padding:4px 0;font-size:14px;}
.md-view #md-content{padding:30px;color:#000000;}
.rss{display:inline-block;width:16px;height:16px;*margin-right:.3em;line-height:16px;vertical-align:text-top;background-image:url("../img/feed.png");background-position:0 0;background-repeat:no-repeat;}.rss:last-child{*margin-left:0;}
[class^="icon-"],[class*=" icon-"]{display:inline-block;width:14px;height:14px;*margin-right:.3em;line-height:14px;vertical-align:text-top;background-image:url("../img/glyphicons-halflings.png");background-position:14px 14px;background-repeat:no-repeat;}[class^="icon-"]:last-child,[class*=" icon-"]:last-child{*margin-left:0;}
.icon-white{background-image:url("../img/glyphicons-halflings-white.png");}
@@ -760,13 +760,13 @@ a.label:hover,a.badge:hover{color:#ffffff;text-decoration:none;cursor:pointer;}
.CodeMirror-gutter-text{color:#aaa;text-align:right;padding:.4em .2em .4em .4em;white-space:pre !important;}
.CodeMirror-lines{padding:.4em;white-space:pre;cursor:text;margin-left:5px;}
.CodeMirror-lines *{pointer-events:none;}
.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;margin:0;padding:0;background:transparent;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;}
.CodeMirror pre{-moz-border-radius:0;-webkit-border-radius:0;-o-border-radius:0;border-radius:0;border-width:0;background:transparent;font-family:inherit;font-size:inherit;padding:0;margin:0;white-space:pre;word-wrap:normal;line-height:inherit;color:inherit;}
.CodeMirror-wrap pre{word-wrap:break-word;white-space:pre-wrap;word-break:normal;}
.CodeMirror-wrap .CodeMirror-scroll{overflow-x:hidden;}
.CodeMirror textarea{outline:none !important;}
.CodeMirror pre.CodeMirror-cursor{z-index:10;position:absolute;visibility:hidden;border-left:1px solid black;border-right:none;width:0;}
.cm-keymap-fat-cursor pre.CodeMirror-cursor{width:auto;border:0;background:transparent;background:rgba(0, 200, 0, 0.4);}
.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id){filter:progid:dximagetransform.microsoft.gradient(enabled=false);}
.cm-keymap-fat-cursor pre.CodeMirror-cursor:not(#nonsense_id){filter:progid:DXImageTransform.Microsoft.gradient(enabled=false);}
.CodeMirror-focused pre.CodeMirror-cursor{visibility:visible;}
div.CodeMirror-selected{background:#d9d9d9;}
.CodeMirror-focused div.CodeMirror-selected{background:#d7d4f0;}

View File

@@ -20,9 +20,9 @@ $(function () {
});
}
if ($('#readme-content').length) {
if ($('#md-content').length) {
var converter = new Showdown.converter();
$('#readme-content').html(converter.makeHtml($('#readme-content').text()));
$('#md-content').html(converter.makeHtml($('#md-content').text()));
}
function paginate() {

View File

@@ -160,12 +160,12 @@
}
}
.readme-view {
.md-view {
width: 100%;
margin-bottom: @baseLineHeight;
border: 1px solid @treeHeaderBorder;
.readme-header {
.md-header {
padding: 8px;
line-height: @baseLineHeight;
text-align: left;
@@ -183,7 +183,7 @@
}
}
#readme-content {
#md-content {
padding: 30px;
color: @black;
}