mirror of
https://gitlab.com/CodeSolutionsProject/CodeShare.git
synced 2026-02-15 09:31:33 +01:00
Migrating to Silex
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
{% extends "base.twig" %}
|
||||
{% extends app.fronthtml~"/base.twig" %}
|
||||
{% block content %}
|
||||
<div class="container">
|
||||
<div class="row" style="text-align: center">
|
||||
|
||||
@@ -52,9 +52,7 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-12 col-sm-12">
|
||||
<button type="submit" class="btn btn-success g-recaptcha btn-block"
|
||||
data-sitekey="6Lc7gXAUAAAAAJRaFo99vIkOUWckuGW8IOLtUxwZ"
|
||||
data-callback="YourOnSubmitFn">Submit</button>
|
||||
<button type="submit" class="btn btn-success btn-block">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
@@ -2,35 +2,35 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ page.title }}</title>
|
||||
<link type="text/css" rel="stylesheet" href="{{ path.css }}/bootstrap-paper.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="{{ app.frontcss }}/bootstrap-paper.css"/>
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
|
||||
<link type="text/css" rel="stylesheet" href="{{ path.css }}/main.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="{{ path.css }}/codeStyles/vs.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="{{ app.frontcss }}/main.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="{{ app.frontcss }}/codeStyles/vs.css"/>
|
||||
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
|
||||
{#<link rel="shortcut icon" href="{{ path.img }}favicon.ico" type="image/x-icon"/>#}
|
||||
{% block css %}{% endblock %}
|
||||
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content="{{ page.description }}"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<script src="{{ path.js }}/highlight.pack.js"></script>
|
||||
<script src="{{ path.js }}/jquery-3.2.1.min.js"></script>
|
||||
<script src="{{ path.js }}/bootstrap.min.js"></script>
|
||||
<script src="{{ app.frontjs }}/highlight.pack.js"></script>
|
||||
<script src="{{ app.frontjs }}/jquery-3.2.1.min.js"></script>
|
||||
<script src="{{ app.frontjs }}/bootstrap.min.js"></script>
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
<script src="{{ path.js }}/functions.js"></script>
|
||||
<script src="{{ app.frontjs }}/functions.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
{% include 'nav.twig' %}
|
||||
{% include 'header.twig' %}
|
||||
{% include app.fronthtml~'/nav.twig' %}
|
||||
{% include app.fronthtml~'/header.twig' %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
{% include "footer.twig" %}
|
||||
{% include app.fronthtml~"/footer.twig" %}
|
||||
|
||||
{% block js %}
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
{% endblock %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
|
||||
<script>
|
||||
window.addEventListener("load", function(){
|
||||
|
||||
56
Source/assets/html/baseOld.twig
Normal file
56
Source/assets/html/baseOld.twig
Normal file
@@ -0,0 +1,56 @@
|
||||
<!DOCTYPE html>
|
||||
<html>
|
||||
<head>
|
||||
<title>{{ page.title }}</title>
|
||||
<link type="text/css" rel="stylesheet" href="{{ path.css }}/bootstrap-paper.css"/>
|
||||
<link href="https://fonts.googleapis.com/css?family=Lato" rel="stylesheet">
|
||||
<link type="text/css" rel="stylesheet" href="{{ path.css }}/main.css"/>
|
||||
<link type="text/css" rel="stylesheet" href="{{ path.css }}/codeStyles/vs.css"/>
|
||||
{#<link rel="shortcut icon" href="{{ path.img }}favicon.ico" type="image/x-icon"/>#}
|
||||
{% block css %}{% endblock %}
|
||||
|
||||
<meta charset="utf-8"/>
|
||||
<meta name="description" content="{{ page.description }}"/>
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
<script src="{{ path.js }}/highlight.pack.js"></script>
|
||||
<script src="{{ path.js }}/jquery-3.2.1.min.js"></script>
|
||||
<script src="{{ path.js }}/bootstrap.min.js"></script>
|
||||
<script src='https://www.google.com/recaptcha/api.js'></script>
|
||||
<script src="{{ path.js }}/functions.js"></script>
|
||||
</head>
|
||||
<body>
|
||||
{% include 'nav.twig' %}
|
||||
{% include 'header.twig' %}
|
||||
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
{% include "footer.twig" %}
|
||||
|
||||
{% block js %}
|
||||
<script>hljs.initHighlightingOnLoad();</script>
|
||||
{% endblock %}
|
||||
|
||||
<link rel="stylesheet" type="text/css" href="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.css" />
|
||||
<script src="//cdnjs.cloudflare.com/ajax/libs/cookieconsent2/3.0.3/cookieconsent.min.js"></script>
|
||||
<script>
|
||||
window.addEventListener("load", function(){
|
||||
window.cookieconsent.initialise({
|
||||
"palette": {
|
||||
"popup": {
|
||||
"background": "#2196f3",
|
||||
"text": "#b2dbfb"
|
||||
},
|
||||
"button": {
|
||||
"background": "transparent",
|
||||
"text": "#b2dbfb",
|
||||
"border": "#b2dbfb"
|
||||
}
|
||||
},
|
||||
"content": {
|
||||
"href": "?page=tos#cookiePolicy",
|
||||
"message": "This website uses cookies to ensure you get the best experience on on our website. If you don't accept any cookie won't be install on your browser.",
|
||||
"dismiss": "I accept it"
|
||||
}
|
||||
})});
|
||||
</script>
|
||||
</body>
|
||||
@@ -1,9 +1,9 @@
|
||||
{% extends "base.twig" %}
|
||||
{% extends app.fronthtml~"/base.twig" %}
|
||||
{% block content %}
|
||||
<div id="ajaxPut">
|
||||
<div class="codebox">
|
||||
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12">
|
||||
{% include "codebox.twig" %}
|
||||
{% include app.fronthtml~"/codebox.twig" %}
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
@@ -81,6 +81,14 @@
|
||||
{% endfor %}
|
||||
</select>
|
||||
</div>
|
||||
<div class="col_full" id="lib">
|
||||
<label for="extlib">External Library:</label>
|
||||
<input type="text" name="extlib" id="extlib" {% if code.extlib != "" %}value="{{ code.extlib }}"{% endif %} placeholder="Name of library">
|
||||
</div>
|
||||
<div class="col_full" id="libVer">
|
||||
<label for="extlibver">Library version:</label>
|
||||
<input type="text" name="extlibver" id="extlibver" {% if code.extlib != "" %}value="{{ code.extlibver }}" required="required" {% endif %} placeholder="Library version">
|
||||
</div>
|
||||
<div class="col_full">
|
||||
<label for="code">Code:</label>
|
||||
<textarea style="width: 100%" rows="{{ code.rows }}" required="required" name="code" id="code"></textarea>
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<table style="width: 100%; text-align:center">
|
||||
<tr>
|
||||
<th>
|
||||
<a href="?page=code&id={{ code.idc }}&lang={{ code.lang }}&version={{ code.version }}">{{ code.name }}</a>
|
||||
<a href="{{ path('code',{'idc': code.idc,'lang': code.lang,'version': code.version}) }}">{{ code.name }}</a>
|
||||
</th>
|
||||
</tr>
|
||||
<tr>
|
||||
<td><strong>Author:</strong> {{ code.nick }} <strong> Version: </strong>{{ code.version }} <strong>
|
||||
Lang: </strong>{{ code.lLang }}</td>
|
||||
</tr>
|
||||
{% if code.extlib is not null %}
|
||||
{% if code.extlib is defined %}
|
||||
<tr>
|
||||
<td>
|
||||
<strong>External library:</strong> {{ code.extlib }}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{% extends "base.twig" %}
|
||||
{% extends app.fronthtml~"/base.twig" %}
|
||||
{% block content %}
|
||||
<div class="container justified" style="font-size: 12pt;">
|
||||
<h4 style="text-align: center">Documentation</h4>
|
||||
@@ -9,9 +9,9 @@
|
||||
<h4 class="docheader top10" id="how">How can I submit my own solution?</h4>
|
||||
<ol>
|
||||
<li><p>First, you need to <strong>sign up</strong> in CodeShare <a href="?page=register">(link)</a>, and then go to <a href="?page=add">submit page</a> to start.</p>
|
||||
<img src="{{ path.img }}/doc/submit.png" alt="submit"/></li>
|
||||
<img src="{{ app.frontimg }}/doc/submit.png" alt="submit"/></li>
|
||||
<li><p>Write the <strong>solution's name and description.</strong> Notice that in this input boxes you shouldn't type any reference of language they can be uploaded in multiple languages in the future, and there are a box for language.</p>
|
||||
<img src="{{ path.img }}/doc/name_des.png"/></li>
|
||||
<img src="{{ app.frontimg }}/doc/name_des.png"/></li>
|
||||
<li><p>Now select <strong>language</strong> to help other users to find it easily.</p></li>
|
||||
<li><p>If your solution use a <strong>external library</strong> you can add its name and its version in their own input boxes.</p></li>
|
||||
<li><p>After that, introduce the <strong>Input</strong> and <strong>Output</strong> examples with the following criteria:</p></li>
|
||||
|
||||
@@ -7,7 +7,7 @@
|
||||
{% endif %}
|
||||
<div class="col-lg-6 col-md-6 col-sm-12 col-xs-12">
|
||||
<div class="codebox">
|
||||
{% include "codebox.twig" %}
|
||||
{% include app.fronthtml~"/codebox.twig" %}
|
||||
</div>
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
{% extends "base.twig" %}
|
||||
{% extends app.fronthtml~"/base.twig" %}
|
||||
{% block content %}
|
||||
<h5 style="text-align:center">Last codes</h5>
|
||||
{% include "filter.twig" %}
|
||||
{% include app.fronthtml~"/filter.twig" %}
|
||||
<div id="ajaxPut">
|
||||
{% include "firstCodes.twig" %}
|
||||
{% include app.fronthtml~"/firstCodes.twig" %}
|
||||
</div>
|
||||
{% endblock %}
|
||||
@@ -32,7 +32,8 @@
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<div class="col-sm-offset-2 col-sm-10">
|
||||
<button type="submit" class="btn btn-success">Submit</button>
|
||||
<button type="submit" class="btn btn-success g-recaptcha" data-sitekey="6Lc7gXAUAAAAAJRaFo99vIkOUWckuGW8IOLtUxwZ"
|
||||
data-callback="YourOnSubmitFn">Submit</button>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-sm-offset-1 col-sm-12">
|
||||
|
||||
@@ -11,16 +11,16 @@
|
||||
<div class="navbar-collapse collapse" id="nav" aria-expanded="false" style="height: 1px">
|
||||
<ul class="nav navbar-nav navbar-left">
|
||||
<li {% if page.page == "home" %}class="active"{% endif %}>
|
||||
<a href="index.php">Home</a>
|
||||
<a href="{{ path('home') }}">Home</a>
|
||||
</li>
|
||||
<li {% if page.page == "add" %}class="active"{% endif %}>
|
||||
<a href="?page=add">Submit code</a>
|
||||
</li>
|
||||
<li {% if page.page == "doc" %}class="active"{% endif %}>
|
||||
<a href="?page=doc">Documentation</a>
|
||||
<a href="{{ path('doc') }}">Documentation</a>
|
||||
</li>
|
||||
<li {% if page.page == "about" %}class="active"{% endif %}>
|
||||
<a href="?page=about">About</a>
|
||||
<a href="{{ path('about') }}">About</a>
|
||||
</li>
|
||||
</ul>
|
||||
<ul class="nav navbar-nav navbar-right">
|
||||
|
||||
Reference in New Issue
Block a user