Merge commit '9790ef4dacdf729d8825dbe745379bd6c669b9dd' as 'components/rfs'
This commit is contained in:
57
components/rfs/fl-server/templates/base.html
Normal file
57
components/rfs/fl-server/templates/base.html
Normal file
@@ -0,0 +1,57 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<title>{% block title %}{{ title }}{% endblock %}</title>
|
||||
|
||||
<style>
|
||||
a {
|
||||
text-decoration: none;
|
||||
color: #4c7883;
|
||||
cursor: pointer;
|
||||
}
|
||||
a:hover, a:hover .directory, a:hover .file {
|
||||
color: #6ea90c;
|
||||
}
|
||||
|
||||
.directory {
|
||||
color:#6ea90c;
|
||||
}
|
||||
|
||||
.file {
|
||||
color: #585a56;
|
||||
}
|
||||
|
||||
#main {
|
||||
width: 60%;
|
||||
max-width: 1600px;
|
||||
margin: 1em auto;
|
||||
}
|
||||
|
||||
footer {
|
||||
display: block;
|
||||
padding: 40px;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
}
|
||||
</style>
|
||||
{% block head %}{% endblock %}
|
||||
</head>
|
||||
<body>
|
||||
|
||||
<div id="main">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
|
||||
<footer>
|
||||
Served with <a href="https://github.com/threefoldtech/rfs">flist-server</a>
|
||||
</footer>
|
||||
|
||||
{% block foot %}{% endblock %}
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
|
||||
|
||||
|
||||
16
components/rfs/fl-server/templates/error.html
Normal file
16
components/rfs/fl-server/templates/error.html
Normal file
@@ -0,0 +1,16 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Error Occured when listing directory for {{ cur_path }}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>Error</h1>
|
||||
|
||||
<hr>
|
||||
|
||||
<dl>
|
||||
<dt> Request Path: </dt> <dd> <span class="directory">{{ cur_path }}</span> </dd>
|
||||
<dt> Error Message: </dt> <dd> <span class="error">{{ message }} </span> </dd>
|
||||
</dl>
|
||||
|
||||
<hr />
|
||||
{% endblock %}
|
||||
41
components/rfs/fl-server/templates/index.html
Normal file
41
components/rfs/fl-server/templates/index.html
Normal file
@@ -0,0 +1,41 @@
|
||||
{% extends "base.html" %}
|
||||
|
||||
{% block title %}Directory listing for /{{ cur_path }}{% endblock %}
|
||||
|
||||
{% block head %}
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
<h1>Directory listing for <span class="directory">/{{ cur_path }}</span></h1>
|
||||
<hr>
|
||||
|
||||
<ol>
|
||||
{% for file in lister.files %}
|
||||
|
||||
{% if file.is_file %}
|
||||
<li class="item">
|
||||
<a class="file"
|
||||
href="/{{ file.path_uri|urlencode }}"
|
||||
data-src="{{ file.path_uri|urlencode }}"
|
||||
title="{{file.name}} {{ file.last_modified|datetime }}">
|
||||
|
||||
<span class="fa fa-file"></span> {{file.name}}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
{% else %}
|
||||
<li>
|
||||
<a href="/{{ file.path_uri|urlencode }}/" title="{{ file.last_modified|datetime }}">
|
||||
<span class="fa fa-folder"></span> {{file.name}}/
|
||||
</a>
|
||||
</li>
|
||||
{% endif %}
|
||||
|
||||
{% endfor %}
|
||||
</ol>
|
||||
|
||||
<hr>
|
||||
|
||||
{% endblock %}
|
||||
Reference in New Issue
Block a user