Commit 1cb202d5 authored by Julien Palard's avatar Julien Palard
Browse files

Simplify templates (mostly index).

parent dbdcf557
{% extends "hkis/layout.html" %}
{% load hkis_extra %}
{% load i18n static bootstrap4 %}
{% block body %}
{% block container %}
<div class="container">
<h1>About Hackinscience</h1>
<h2>The team</h2>
<div class="row">
<div class="col">
<h4>Antoine Angot</h4>
<img src="{% static "img/antoine-angot.jpg" %}">
<p> Former CS teacher at FdV Licence, <a href="https://lean.fr">lean.fr</a>.</p>
</div>
<div class="col">
<h4>Antoine Mazières</h4>
<img src="{% static "img/antoine-mazieres.jpg" %}">
<p>
Postdoctoral Researcher at Centre Marc Bloch, <a href="https://antonomase.fr/">antonomase.fr</a>.
</p>
</div>
<div class="col">
<h4>Julien Palard</h4>
<img src="{% static "img/julien-palard.jpg" %}">
<p>
CPython core developer, independent Python trainer, <a href="https://mdk.fr">mdk.fr</a>.
</p>
</div>
<div class="col">
<h4>Jérôme Schneider</h4>
<img src="{% static "img/jerome-schneider.jpg" %}">
<p>Profesionnal Python programmer with 10+ years of experience.</p>
</div>
<h1>About Hackinscience</h1>
<h2>The team</h2>
<div class="row">
<div class="col">
<h4>Antoine Angot</h4>
<img src="{% static "img/antoine-angot.jpg" %}">
<p> Former CS teacher at FdV Licence, <a href="https://lean.fr">lean.fr</a>.</p>
</div>
<div class="col">
<h4>Antoine Mazières</h4>
<img src="{% static "img/antoine-mazieres.jpg" %}">
<p>
Postdoctoral Researcher at Centre Marc Bloch, <a href="https://antonomase.fr/">antonomase.fr</a>.
</p>
</div>
<div class="col">
<h4>Julien Palard</h4>
<img src="{% static "img/julien-palard.jpg" %}">
<p>
CPython core developer, independent Python trainer, <a href="https://mdk.fr">mdk.fr</a>.
</p>
</div>
<div class="col">
<h4>Jérôme Schneider</h4>
<img src="{% static "img/jerome-schneider.jpg" %}">
<p>Profesionnal Python programmer with 10+ years of experience.</p>
</div>
<h2>Hackinscience, the online platform</h2>
<p>
The Hackinscience platform is
an <a href="http://framagit.org/hackinscience/">open-source</a>
exercise repository we created for the physical yearly course at
the CRI. It remains opened the whole year, and everyone can use it
to help in teaching or learning Python.
</p>
<h2>Hackinscience, the Python course at CRI</h2>
<p>
The Hackinscience week at <a href="https://cri-paris.org">le
CRI</a> is one-week intensive Python course. Check the cri-events
platform for the next session. We choose Python as this language
is appreciated and ubiquitous when speaking of datascience or
machine learning, and also a well appreciated language to start in
programming.
</p>
<p>
Hackinscience is intense: It spans over seven days (monday to
sunday) and 12h per day (9 AM to 9 PM), our goal is to make you
autonomous in Python so you can continue learning and start using
it right after this week.
</p>
</div>
<h2>Hackinscience, the online platform</h2>
<p>
The Hackinscience platform is
an <a href="http://framagit.org/hackinscience/">open-source</a>
exercise repository we created for the physical yearly course at
the CRI. It remains opened the whole year, and everyone can use it
to help in teaching or learning Python.
</p>
<h2>Hackinscience, the Python course at CRI</h2>
<p>
The Hackinscience week at <a href="https://cri-paris.org">le
CRI</a> is one-week intensive Python course. Check the cri-events
platform for the next session. We choose Python as this language
is appreciated and ubiquitous when speaking of datascience or
machine learning, and also a well appreciated language to start in
programming.
</p>
<p>
Hackinscience is intense: It spans over seven days (monday to
sunday) and 12h per day (9 AM to 9 PM), our goal is to make you
autonomous in Python so you can continue learning and start using
it right after this week.
</p>
{% endblock %}
......@@ -49,14 +49,12 @@
</script>
</head>
<body class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
<body id="page-top" class="{% if is_popup %}popup {% endif %}{% block bodyclass %}{% endblock %}">
{% block nav %}{% endblock %}
{% block body %}
{% endblock %}
<div class="container" style="margin-top: 25px;">
{% block container %}{% endblock container %}
</div>
{% block form_row %}{% endblock %}
{% endblock %}
</body>
</html>
{% extends "hkis/layout.html" %}
{% block body %}
<div class="container">
<h1 class="bd-title">Categories</h1>
<div class="row">
<div class="col-md-4">
<h2>Python</h2>
<p>Python is a widely used general-purpose, high-level programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java...</p>
<p>
<a class="btn btn-primary" href="{% url 'exercises' %}" role="button">Exercices »</a>
<a class="btn btn-secondary" href="#" role="button">Courses »</a>
</p>
</div>
<div class="col-md-4">
<h2>C</h2>
<p>C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations.</p>
<p>
<a class="btn btn-secondary disabled" href="#" role="button" aria-disabled="true">View details »</a>
</p>
</div>
<div class="col-md-4">
<h2>Shell script</h2>
<p>Default Command-line interpreter, for Unix operating systems.</p>
<p>
<a class="btn btn-secondary disabled" href="#" role="button" aria-disabled="true">View details »</a>
</p>
</div>
{% block container %}
<h1 class="bd-title">Categories</h1>
<div class="row">
<div class="col-md-4">
<h2>Python</h2>
<p>Python is a widely used general-purpose, high-level programming language. Its design philosophy emphasizes code readability, and its syntax allows programmers to express concepts in fewer lines of code than would be possible in languages such as C++ or Java...</p>
<p>
<a class="btn btn-primary" href="{% url 'exercises' %}" role="button">Exercices »</a>
<a class="btn btn-secondary" href="#" role="button">Courses »</a>
</p>
</div>
<div class="row">
<div class="col-md-4">
<h2>Matlab</h2>
<p>MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment and fourth-generation programming language.</p>
<p>
<a class="btn btn-secondary disabled" href="#" role="button" aria-disabled="true">View details »</a>
</p>
</div>
<div class="col-md-4">
<h2>C</h2>
<p>C is a general-purpose, imperative computer programming language, supporting structured programming, lexical variable scope and recursion, while a static type system prevents many unintended operations.</p>
<p>
<a class="btn btn-secondary disabled" href="#" role="button" aria-disabled="true">View details »</a>
</p>
</div>
<div class="col-md-4">
<h2>Shell script</h2>
<p>Default Command-line interpreter, for Unix operating systems.</p>
<p>
<a class="btn btn-secondary disabled" href="#" role="button" aria-disabled="true">View details »</a>
</p>
</div>
</div>
<div class="row">
<div class="col-md-4">
<h2>Matlab</h2>
<p>MATLAB (matrix laboratory) is a multi-paradigm numerical computing environment and fourth-generation programming language.</p>
<p>
<a class="btn btn-secondary disabled" href="#" role="button" aria-disabled="true">View details »</a>
</p>
</div>
</div>
{% endblock %}
{% extends "hkis/layout.html" %}
{% load hkis_extra %}
{% load i18n static md2 bootstrap4 %}
{% block body %}
{{ answer_form.media }}
{% block stylesheet %}
<link href="{% static "css/pygments/default.css" %}" rel="stylesheet" type="text/css" />
<div class="container">
{% if next %}
<div class="float-right">
<a class="btn btn-primary" href="{% url "exercise" next %}">
Next →
</a>
</div>
{% endif %}
<div style="margin-bottom: 25px;">
{{ object.wording|markdown:"fenced-code-blocks"|trash_fix_code_in_a|i18n_doc_links:LANGUAGE_CODE }}
</div>
{% endblock %}
{% block container %}
{{ answer_form.media }}
{% if next %}
<div class="float-right">
<a class="btn btn-primary" href="{% url "exercise" next %}">
Next →
</a>
</div>
{% endif %}
<div style="margin-bottom: 25px;">
{{ object.wording|markdown:"fenced-code-blocks"|trash_fix_code_in_a|i18n_doc_links:LANGUAGE_CODE }}
</div>
<div class="row">
<div class="col-md-8">
<h2>Your Code</h2>
<form id="answer_form" action="/api/answers/" method="post" onsubmit="document.getElementById('submit_answer').setAttribute('disabled', true); AJAXSubmit(this); return false;">{% csrf_token %}
{% for field in answer_form %}
<div class="fieldWrapper">
{{ field }}
</div>
{% endfor %}
<button id="submit_snippet" class="btn btn-primary" onclick="AJAXSubmit(document.getElementById('answer_form'), '/api/snippets/'); this.setAttribute('disabled', true); return false;">Test your code</button>
<button id="submit_answer" class="btn btn-primary" type="submit">Save and submit your code</button>
</form>
</div>
<div class="col-md-4">
<h2>Results</h2>
<div id="answers-result" class="result">
<table id="answer-table" class="table">
{% for answer in answers %}
<tr><td id="td-{{ answer.id }}">
{% if not answer.is_corrected %}
<img src="{% static "img/loading_anim.gif" %}" height=30> Waiting for correction
{% else %}
<pre>{{ answer.correction_message }}</pre>
{% endif %}
</td></tr>
{% endfor %}
</table>
</div>
<div class="row">
<div class="col-md-8">
<h2>Your Code</h2>
<form id="answer_form" action="/api/answers/" method="post" onsubmit="document.getElementById('submit_answer').setAttribute('disabled', true); AJAXSubmit(this); return false;">{% csrf_token %}
{% for field in answer_form %}
<div class="fieldWrapper">
{{ field }}
</div>
{% endfor %}
<button id="submit_snippet" class="btn btn-primary" onclick="AJAXSubmit(document.getElementById('answer_form'), '/api/snippets/'); this.setAttribute('disabled', true); return false;">Test your code</button>
<button id="submit_answer" class="btn btn-primary" type="submit">Save and submit your code</button>
</form>
</div>
<div class="col-md-4">
<h2>Results</h2>
<div id="answers-result" class="result">
<table id="answer-table" class="table">
{% for answer in answers %}
<tr><td id="td-{{ answer.id }}">
{% if not answer.is_corrected %}
<img src="{% static "img/loading_anim.gif" %}" height=30> Waiting for correction
{% else %}
<pre>{{ answer.correction_message }}</pre>
{% endif %}
</td></tr>
{% endfor %}
</table>
</div>
</div>
</div>
......
......@@ -3,35 +3,32 @@
{% load static %}
{% load bootstrap4 %}
{% block body %}
{% block container %}
<div class="container">
<h1>Python exercises</h1>
<h1>Python exercises</h1>
<table class="table table-sm table-hover records_list">
<tbody>
{% for exercise in exercises %}
<tr onclick="if (!event.ctrlKey){location.href='{% url "exercise" exercise.slug %}';}">
<td>
<a href="{% url "exercise" exercise.slug %}">
<h5>{{ exercise.number }}. {{ exercise.title }}</h5>
</a>
{{ exercise.lead }}
</td>
<td scope="row">
{% if exercise.tried %}
{% if exercise.done %}
<span class="good h3"></span>
{% else %}
<span class="bad h3"></span>
{% endif %}
<table class="table table-sm table-hover records_list">
<tbody>
{% for exercise in exercises %}
<tr onclick="if (!event.ctrlKey){location.href='{% url "exercise" exercise.slug %}';}">
<td>
<a href="{% url "exercise" exercise.slug %}">
<h5>{{ exercise.number }}. {{ exercise.title }}</h5>
</a>
{{ exercise.lead }}
</td>
<td scope="row">
{% if exercise.tried %}
{% if exercise.done %}
<span class="good h3"></span>
{% else %}
<span class="bad h3"></span>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
</div>
{% endif %}
</td>
</tr>
{% endfor %}
</tbody>
</table>
{% endblock %}
{% load i18n %}{% load static %}{% load bootstrap4 %}
{% block body %}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
<meta name="description" content="">
<meta name="author" content="">
<title>HackInScience - Python course</title>
{% extends 'hkis/layout.html' %}
{% load i18n static bootstrap4 %}
<!-- Bootstrap core -->
{% bootstrap_css %}
{% bootstrap_javascript %}
{% bootstrap_jquery %}
{% block title %}Python course{% endblock %}
{% block stylesheets %}
<!-- Custom fonts for this template -->
<link href="{% static "font-awesome/css/font-awesome.min.css" %}" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Lora:400,700,400italic,700italic" rel="stylesheet" type="text/css">
......@@ -26,47 +13,9 @@
<link href="{% static "css/grayscale.css" %}" rel="stylesheet">
<link href="{% static "css/hkis.css" %}" rel="stylesheet">
{% endblock %}
</head>
<body id="page-top">
<!-- Navigation -->
<nav class="navbar navbar-expand-lg navbar-light fixed-top" id="mainNav">
<div class="container">
<a class="navbar-brand js-scroll-trigger" href="#page-top">
<img src="{% static "img/logo_hackinscience.png" %}" width="20" height="20" alt="logo">
HackInScience</a>
<button class="navbar-toggler navbar-toggler-right" type="button" data-toggle="collapse" data-target="#navbarResponsive" aria-controls="navbarResponsive" aria-expanded="false" aria-label="Toggle navigation">
Menu
<i class="fa fa-bars"></i>
</button>
<div class="collapse navbar-collapse" id="navbarResponsive">
<ul class="navbar-nav ml-auto">
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="/">Home</a>
</li>
{% if user.is_authenticated %}
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="{% url 'dashboard' %}">Dashboard</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="{% url 'auth_logout' %}">Logout</a>
</li>
{% else %}
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="{% url 'auth_login' %}">Login</a>
</li>
<li class="nav-item">
<a class="nav-link js-scroll-trigger" href="{% url 'registration_register' %}">Register</a>
</li>
{% endif %}
</ul>
</div>
</div>
</nav>
{% block body %}
<!-- Intro Header -->
<header class="masthead">
<div class="intro-body">
......@@ -89,29 +38,7 @@
</div>
</div>
</header>
<!--
<section id="download" class="download-section content-section text-center">
<div class="container">
<div class="col-lg-8 mx-auto">
<h2>Registration Closed</h2>
<p>Registration period is now closed for the 2018 session. Feel free to contact us if needed.</p>
<a href="mailto:team@hackinscience.org" class="btn btn-default btn-lg">Contact Us</a>
</div>
</div>
</section>
-->
<!-- Footer -->
<footer>
<div class="container text-center">
<p>Copyright &copy; HackInScience 2018</p>
</div>
</footer>
<!-- Custom scripts for this template -->
<script src="{% static "js/grayscale.min.js" %}"></script>
</body>
</html>
{% endblock %}
......@@ -3,7 +3,7 @@
{% block nav %}
<nav class="navbar navbar-expand-lg navbar-dark" style="margin-bottom:25px; background: #1e2933; text-transform:uppercase; font-family:Cabin,'Helvetica Neue',Helvetica,Arial,sans-serif;">
<nav class="navbar navbar-expand-lg navbar-dark" style="background: #1e2933; text-transform:uppercase; font-family:Cabin,'Helvetica Neue',Helvetica,Arial,sans-serif;">
<a class="navbar-brand" href="/">
<div style="float:left;">
<img src="{% static "img/logo_hackinscience.png" %}" width="20" height="20" alt="logo"/>
......@@ -55,6 +55,3 @@
{% endif %}
</nav>
{% endblock %}
{% block body %}
{% endblock %}
{% extends "hkis/layout.html" %}
{% block body %}
<div class="container">
{% block container %}
<h2>{{ object.name }}</h2>
<table>
{% for username, answers in stats.items %}
......@@ -25,5 +24,4 @@
</tr>
{% endfor %}
</table>
<div class="container">
{% endblock %}
{% extends "hkis/layout.html" %}
{% block body %}
<div class="container">
{% block container %}
<h2>Groups</h2>
<ul>
{% for group in object_list %}
<li><a href="{% url "stats" group.pk %}">{{ group.name }}</a></li>
{% endfor %}
</ul>
</div>
{% endblock %}
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment