Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
osp
tools.gitlabculture
Commits
5f2680a9
Commit
5f2680a9
authored
Feb 25, 2020
by
svilayphiou
Browse files
base template + add link to CSS pad
parent
5090a6c1
Changes
5
Hide whitespace changes
Inline
Side-by-side
pad.js
→
generator/output/static/js/
pad.js
View file @
5f2680a9
File moved
generator/static/js/pad.js
0 → 100644
View file @
5f2680a9
var
head
=
document
.
getElementsByTagName
(
'
head
'
)[
0
];
// GETS CSS FROM FRAMAPAD
var
xhttp
=
new
XMLHttpRequest
();
xhttp
.
onreadystatechange
=
function
()
{
if
(
this
.
readyState
==
4
&&
this
.
status
==
200
)
{
let
css
=
document
.
createElement
(
'
style
'
);
css
.
innerHTML
=
this
.
responseText
;
head
.
appendChild
(
css
);
}
};
xhttp
.
open
(
"
GET
"
,
"
https://semestriel.framapad.org/p/9f7m-osp-website-css/export/txt
"
,
true
);
xhttp
.
send
();
generator/templates/base.html
0 → 100644
View file @
5f2680a9
<!DOCTYPE HTML>
<html>
<head>
<meta
http-equiv=
"content-type"
content=
"text/html; charset=utf-8"
>
<title>
Projects
</title>
</head>
<body>
<h1>
OSP
</h1>
{% block content %}
{% endblock %}
<script
src=
"http://localhost:8000/static/js/pad.js"
type=
"text/javascript"
charset=
"utf-8"
></script>
</body>
</html>
generator/templates/project.html
View file @
5f2680a9
{{ project.name }}
{% if project.readme %}
{{ project.readme }}
{% endif %}
<ul>
{% for file in project.tree %}
<li>
{{ file.name }}
</li>
{% endfor %}
</ul>
{% extends "base.html" %}
<ul>
{% for commit in project.commits %}
<li>
{{ commit.author_name }}: {{ commit.message }}
</li>
{% endfor %}
</ul>
\ No newline at end of file
{% block content %}
<h2>
{{ project.name }}
</h2>
{% if project.readme %}
{{ project.readme }}
{% endif %}
<h3>
Tree
</h3>
<ul>
{% for file in project.tree %}
<li>
{{ file.name }}
</li>
{% endfor %}
</ul>
<h3>
Commits
</h3>
<ul>
{% for commit in project.commits %}
<li>
{{ commit.author_name }}: {{ commit.message }}
</li>
{% endfor %}
</ul>
{% endblock %}
generator/templates/projects.html
View file @
5f2680a9
<ul>
{% for project in projects %}
<li><a
href=
"{{ project.links.self }}"
>
{{ project.name }} ({{ project.commits|length }} commits)
</a></li>
{% endfor %}
</ul>
\ No newline at end of file
{% extends "base.html" %}
{% block content %}
<ul>
{% for project in projects %}
<li
class=
"{% if project.default_branch == "
archive
"
%}
archived
{%
endif
%}"
><a
href=
"{{ project.links.self }}"
>
{{ project.name }} ({{ project.commits|length }} commits)
</a></li>
{% endfor %}
</ul>
{% endblock %}
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment