2015-05-09 17:42:33 +02:00
{% extends 'base.html.twig' %}
{% block css %}
2015-05-11 21:06:41 +02:00
{% if gist .cipher %}
<link type="text/css" rel="Stylesheet" href=" {{ web_path }} components/SyntaxHighlighter/styles/shCoreRDark.css" />
<link type="text/css" rel="Stylesheet" href=" {{ web_path }} components/SyntaxHighlighter/styles/shThemeRDark.css" />
{% else %}
<link rel="stylesheet" href=" {{ web_path }} app/css/geshi/vibrant-ink.css" />
{% endif %}
2015-05-09 17:42:33 +02:00
2015-05-11 21:06:41 +02:00
{{ parent ( ) }}
2015-05-09 17:42:33 +02:00
<style type="text/css">
#embed {
padding: 0;
}
#viewer {
background: #222;
}
pre {
2015-12-28 03:04:24 +01:00
font-size: 14px;
padding: 5px;
margin-bottom: 0;
background: #333;
2015-05-09 17:42:33 +02:00
}
.panel-body {
padding: 0;
}
2015-05-11 21:06:41 +02:00
.panel {
margin-bottom: 0;
}
2015-05-09 17:42:33 +02:00
pre ol {
padding-left: 0 !important;
list-style: none;
}
</style>
{% endblock %}
{% block title %} {{ gist .title ? gist .title : 'gist.untitled' | trans }} - {{ commit | slice ( 0 , 1 0 ) }} {% endblock %}
{% block nav %} {% endblock %}
{% block body %}
<div class="row">
<div class="col-md-12" id="embed">
<div class="panel panel-default">
<div class="panel-heading">
2016-09-24 14:43:15 +02:00
<div class="pull-right actions">
<a target="_blank" href=" {{ path ( 'view' , app .request .attributes .get ( '_route_params' ) ) }} " class="btn btn-default btn-sm">
<span class="btn btn-warning btn-xs">
{{ commit | slice ( 0 , 1 0 ) }}
</span>
</a>
2015-05-09 17:42:33 +02:00
2016-09-24 14:43:15 +02:00
{% if not gist .cipher %}
2015-05-09 17:42:33 +02:00
<a target="_blank" href=" {{ path ( 'raw' , app .request .attributes .get ( '_route_params' ) ) }} " class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-eye-open"></span>
{{ 'gist.action.raw' | trans }}
</a>
<a target="_blank" href=" {{ path ( 'download' , app .request .attributes .get ( '_route_params' ) ) }} " class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-save-file"></span>
{{ 'gist.action.download' | trans }}
</a>
2016-09-24 14:43:15 +02:00
{% endif %}
<a target="_blank" href=" {{ path ( 'clone' , app .request .attributes .get ( '_route_params' ) ) }} " class="btn btn-success btn-sm">
<span class="glyphicon glyphicon-copy"></span>
{{ 'gist.action.clone' | trans }}
</a>
</div>
2015-05-09 17:42:33 +02:00
{{ gist .title ? gist .title : 'gist.untitled' | trans }}
</div>
<div class="panel-body">
<div class="tab-content">
<div id="view" class="tab-pane active in">
<div id="viewer">
{% if gist .cipher %}
<pre class="brush: {{ gist .type }} ; syntaxhighlighter"> {{ raw_content | raw }} </pre>
{% else %}
{{ content | raw }}
{% endif %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block footer %} {% endblock %}
{% block js %}
{{ parent ( ) }}
<script type="text/javascript" src=" {{ web_path }} components/iframe-resizer/js/iframeResizer.contentWindow.min.js"></script>
2015-05-11 21:06:41 +02:00
{% if gist .cipher %}
<script type="text/javascript" src=" {{ web_path }} components/SyntaxHighlighter/scripts/XRegExp.js"></script> <!-- XRegExp is bundled with the final shCore.js during build -->
<script type="text/javascript" src=" {{ web_path }} components/SyntaxHighlighter/scripts/shCore.js"></script>
<script type="text/javascript" src=" {{ web_path }} components/SyntaxHighlighter/scripts/shAutoloader.js"></script>
<script type="text/javascript">
SyntaxHighlighter.autoloader(
['applescript', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushAppleScript.js' ],
['actionscript3', 'as3', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushAS3.js' ],
['bash', 'shell', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushBash.js' ],
['coldfusion', 'cf', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushColdFusion.js' ],
['cpp', 'c', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushCpp.js' ],
['c#', 'c-sharp', 'csharp', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushCSharp.js' ],
['css', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushCss.js' ],
['delphi', 'pascal', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushDelphi.js' ],
['diff', 'patch', 'pas', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushDiff.js' ],
['erl', 'erlang', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushErlang.js' ],
['groovy', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushGroovy.js' ],
['java', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushJava.js' ],
['jfx', 'javafx', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushJavaFX.js' ],
['js', 'jscript', 'javascript', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushJScript.js' ],
['perl', 'pl', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushPerl.js' ],
['php', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushPhp.js' ],
['text', 'plain', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushPlain.js' ],
['py', 'python', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushPython.js' ],
['ruby', 'rails', 'ror', 'rb', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushRuby.js' ],
['scala', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushScala.js' ],
['sql', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushSql.js' ],
['vb', 'vbnet', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushVb.js' ],
['xml', 'xhtml', 'xslt', 'html', ' {{ web_path }} components/SyntaxHighlighter/scripts/shBrushXml.js' ]
);
</script>
{% endif %}
2015-05-09 17:42:33 +02:00
{% endblock %}