1
0
mirror of https://gitnet.fr/deblan/gist.git synced 2021-08-14 08:30:49 +02:00
This commit is contained in:
Simon Vieille 2015-05-06 20:39:51 +02:00
parent 3c17f8027a
commit bf04b74d02
5 changed files with 106 additions and 275 deletions

View File

@ -30,10 +30,6 @@ class ViewController
protected function notFoundResponse(Application $app)
{
return $app['twig']->render(
'View/notFound.html.twig',
array(
)
);
return $app['twig']->render('View/notFound.html.twig');
}
}

View File

@ -85,11 +85,11 @@
{% endblock %}
{% block js %}
{{ parent() }}
{{ parent() }}
{% if gist is not null %}
<script type="text/javascript">
document.location.href = '{{ path("view", {gist: gist.file}) }}'{% if gist.cipher %} + '#' + (document.location.href).split('#')[1]{% endif %};
</script>
{% endif %}
{% if gist is not null %}
<script type="text/javascript">
document.location.href = '{{ path("view", {gist: gist.file}) }}'{% if gist.cipher %} + '#' + (document.location.href).split('#')[1]{% endif %};
</script>
{% endif %}
{% endblock %}

View File

@ -1,16 +1,16 @@
{% extends 'base.html.twig' %}
{% block body %}
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
{{ 'gist.404.title'|trans }}
</div>
<div class="panel-body">
<p>{{ 'gist.404.message'|trans }}</p>
</div>
</div>
</div>
</div>
<div class="row">
<div class="col-md-12">
<div class="panel panel-default">
<div class="panel-heading">
{{ 'gist.404.title'|trans }}
</div>
<div class="panel-body">
<p>{{ 'gist.404.message'|trans }}</p>
</div>
</div>
</div>
</div>
{% endblock %}

View File

@ -1,98 +1,98 @@
{% extends 'base.html.twig' %}
{% block body %}
<div class="row">
<div class="col-md-12">
{% if not gist.cipher %}
<ul class="nav nav-tabs">
<li class="active">
<a href="#view" data-toggle="tab">View</a>
</li>
<li>
<a href="#revisions" data-toggle="tab">
Révisions
<span class="badge">4</span>
</a>
</li>
</ul>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
{% if not gist.cipher %}
<div class="pull-right actions">
<a class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-eye-open"></span>
RAW
</a>
<a class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-save-file"></span>
Download
</a>
<a class="btn btn-success btn-sm">
<span class="glyphicon glyphicon-copy"></span>
Fork
</a>
</div>
{% endif %}
<div class="row">
<div class="col-md-12">
{% if not gist.cipher %}
<ul class="nav nav-tabs">
<li class="active">
<a href="#view" data-toggle="tab">View</a>
</li>
<li>
<a href="#revisions" data-toggle="tab">
Révisions
<span class="badge">4</span>
</a>
</li>
</ul>
{% endif %}
<div class="panel panel-default">
<div class="panel-heading">
{% if not gist.cipher %}
<div class="pull-right actions">
<a class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-eye-open"></span>
RAW
</a>
<a class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-save-file"></span>
Download
</a>
<a class="btn btn-success btn-sm">
<span class="glyphicon glyphicon-copy"></span>
Fork
</a>
</div>
{% endif %}
{{ 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 class="btn-toolbar">
<div class="btn-group" id="languages">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
Language XML
<span class="caret"></span>
</button>
</div>
</div>
</div>
{{ 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 class="btn-toolbar">
<div class="btn-group" id="languages">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
Language XML
<span class="caret"></span>
</button>
</div>
</div>
</div>
<div id="viewer">
{% if gist.cipher %}
<pre>
{{ 'foo' }}
</pre>
{% endif %}
</div>
</div>
{% if not gist.cipher %}
<div id="revisions" class="tab-pane out">
<div class="commit">
<p>
Commit <strong class="text-warning">82110bbb53fbc5bf010ea4a50d999ab7cb22ae4f</strong>
<br/>
Date: Mon May 4 23:09:44 2015 +0200
</p>
<div id="viewer">
{% if gist.cipher %}
<pre>
{{ 'foo' }}
</pre>
{% endif %}
</div>
</div>
{% if not gist.cipher %}
<div id="revisions" class="tab-pane out">
<div class="commit">
<p>
Commit <strong class="text-warning">82110bbb53fbc5bf010ea4a50d999ab7cb22ae4f</strong>
<br/>
Date: Mon May 4 23:09:44 2015 +0200
</p>
<p>
<a class="btn btn-primary">
Afficher
</a>
<a class="btn btn-default">
DIFF
</a>
</p>
</div>
<hr>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
<p>
<a class="btn btn-primary">
Afficher
</a>
<a class="btn btn-default">
DIFF
</a>
</p>
</div>
<hr>
</div>
{% endif %}
</div>
</div>
</div>
</div>
</div>
{% endblock %}
{% block js %}
{{ parent() }}
{{ parent() }}
{% if gist is not null %}
<script type="text/javascript">
document.location.href = '{{ path("view", {gist: gist.file}) }}'{% if gist.cipher %} + '#' + (document.location.href).split('#')[1]{% endif %};
</script>
{% endif %}
{% if gist is not null %}
<script type="text/javascript">
document.location.href = '{{ path("view", {gist: gist.file}) }}'{% if gist.cipher %} + '#' + (document.location.href).split('#')[1]{% endif %};
</script>
{% endif %}
{% endblock %}

View File

@ -45,171 +45,6 @@ $geshi->enable_line_numbers(GESHI_NORMAL_LINE_NUMBERS);
</div>
</nav>
<div class="container-fluid" id="container">
<div class="row">
<div class="col-md-12">
<ul class="nav nav-tabs">
<li class="active">
<a href="#view" data-toggle="tab">View</a>
</li>
<li>
<a href="#revisions" data-toggle="tab">
Révisions
<span class="badge">4</span>
</a>
</li>
</ul>
<div class="panel panel-default">
<div class="panel-heading">
<div class="pull-right actions">
<a class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-eye-open"></span>
RAW
</a>
<a class="btn btn-default btn-sm">
<span class="glyphicon glyphicon-save-file"></span>
Download
</a>
<a class="btn btn-success btn-sm">
<span class="glyphicon glyphicon-copy"></span>
Fork
</a>
</div>
Untitled
</div>
<div class="panel-body">
<div class="tab-content">
<div id="view" class="tab-pane active in">
<div class="btn-toolbar">
<div class="btn-group" id="languages">
<div class="btn-group">
<button type="button" class="btn btn-default dropdown-toggle" data-toggle="dropdown" aria-expanded="false">
Language XML
<span class="caret"></span>
</button>
<ul class="dropdown-menu" role="menu">
<li>
<a href="html">HTML/XML</a>
</li>
<li>
<a href="css">CSS</a>
</li>
<li>
<a href="javascript">JAVASCRIPT</a>
</li>
<li>
<a href="php">PHP</a>
</li>
<li>
<a href="sql">SQL</a>
</li>
<li>
<a href="yaml">YAML</a>
</li>
<li>
<a href="perl">PERL</a>
</li>
<li>
<a href="c">C/C++</a>
</li>
<li>
<a href="asp">ASP</a>
</li>
<li>
<a href="python">PYTHON</a>
</li>
<li>
<a href="bash">BASH</a>
</li>
<li>
<a href="actionscript">ACTION SCRIPT</a>
</li>
<li>
<a href="texte">TEXT</a>
</li>
</ul>
</div>
</div>
</div>
<div id="render">
<?php
echo $geshi->parse_code();
?>
</div>
</div>
<div id="revisions" class="tab-pane out">
<div class="commit">
<p>
Commit <strong class="text-warning">82110bbb53fbc5bf010ea4a50d999ab7cb22ae4f</strong>
<br/>
Date: Mon May 4 23:09:44 2015 +0200
</p>
<p>
<a class="btn btn-primary">
Afficher
</a>
<a class="btn btn-default">
DIFF
</a>
</p>
</div>
<hr>
<div class="commit">
<p>
Commit <strong class="text-warning">82110bbb53fbc5bf010ea4a50d999ab7cb22ae4f</strong>
<br/>
Date: Mon May 4 23:09:44 2015 +0200
</p>
<p>
<a class="btn btn-primary">
Afficher
</a>
<a class="btn btn-default">
DIFF
</a>
</p>
</div>
<hr>
<div class="commit">
<p>
Commit <strong class="text-warning">82110bbb53fbc5bf010ea4a50d999ab7cb22ae4f</strong>
<br/>
Date: Mon May 4 23:09:44 2015 +0200
</p>
<p>
<a class="btn btn-primary">
Afficher
</a>
<a class="btn btn-default">
DIFF
</a>
</p>
</div>
<hr>
<div class="commit">
<p>
Commit <strong class="text-warning">82110bbb53fbc5bf010ea4a50d999ab7cb22ae4f</strong>
<br/>
Date: Mon May 4 23:09:44 2015 +0200
</p>
<p>
<a class="btn btn-primary">
Afficher
</a>
<a class="btn btn-default">
DIFF
</a>
</p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>