add basic lektor project
This commit is contained in:
parent
b38c49022a
commit
0e9bdc0a6f
12 changed files with 171 additions and 21 deletions
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
|
@ -0,0 +1 @@
|
|||
ucloud-docs-build/
|
17
Makefile
Normal file
17
Makefile
Normal file
|
@ -0,0 +1,17 @@
|
|||
BUILDDIR=ucloud-docs-build
|
||||
DESTINATION=ungleichstatic@staticweb.ungleich.ch:/home/services/www/ungleichstatic/staticcms.ungleich.ch/www/ucloud/
|
||||
|
||||
all: publish
|
||||
|
||||
pull:
|
||||
git pull
|
||||
|
||||
publish: pull build permissions
|
||||
rsync -av --exclude .lektor/ $(BUILDDIR)/ $(DESTINATION)
|
||||
|
||||
permissions: build
|
||||
find $(BUILDDIR) -type f -exec chmod 0644 {} \;
|
||||
find $(BUILDDIR) -type d -exec chmod 0755 {} \;
|
||||
|
||||
build:
|
||||
cd lektor && lektor build -O ../$(BUILDDIR)
|
|
@ -1,3 +1,9 @@
|
|||
## ucloud docs
|
||||
|
||||
Are stored in lektor/ and use
|
||||
[lektor](https://www.getlektor.com/).
|
||||
|
||||
|
||||
## ucloud flows
|
||||
|
||||
Stuff that we want to do with ucloud
|
||||
|
|
42
lektor/assets/static/style.css
Normal file
42
lektor/assets/static/style.css
Normal file
|
@ -0,0 +1,42 @@
|
|||
body {
|
||||
font-family: 'Verdana', sans-serif;
|
||||
margin: 50px 25px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: #2a99b6;
|
||||
}
|
||||
|
||||
a:hover {
|
||||
color: #33bbdf;
|
||||
}
|
||||
|
||||
header, footer, div.page {
|
||||
width: 760px;
|
||||
margin: 0 auto;
|
||||
background: #daeef3;
|
||||
padding: 20px 30px;
|
||||
}
|
||||
|
||||
header h1 {
|
||||
color: #169bbd;
|
||||
margin: 0;
|
||||
font-weight: normal;
|
||||
font-size: 42px;
|
||||
}
|
||||
|
||||
header nav ul {
|
||||
list-style: none;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
header nav ul li {
|
||||
display: inline;
|
||||
margin: 0 8px 0 0;
|
||||
padding: 0;
|
||||
}
|
||||
|
||||
div.page {
|
||||
background: #f1fbfe;
|
||||
}
|
7
lektor/content/about/contents.lr
Normal file
7
lektor/content/about/contents.lr
Normal file
|
@ -0,0 +1,7 @@
|
|||
title: About this Website
|
||||
---
|
||||
body:
|
||||
|
||||
This is a website that was made with the Lektor quickstart.
|
||||
|
||||
And it does not contain a lot of information.
|
6
lektor/content/contents.lr
Normal file
6
lektor/content/contents.lr
Normal file
|
@ -0,0 +1,6 @@
|
|||
title: Welcome to ucloud!
|
||||
---
|
||||
body:
|
||||
|
||||
This is a basic demo website that shows how to use Lektor for a basic
|
||||
website with some pages.
|
9
lektor/content/projects/contents.lr
Normal file
9
lektor/content/projects/contents.lr
Normal file
|
@ -0,0 +1,9 @@
|
|||
title: Projects
|
||||
---
|
||||
body:
|
||||
|
||||
This is a list of the projects:
|
||||
|
||||
* Project 1
|
||||
* Project 2
|
||||
* Project 3
|
11
lektor/models/page.ini
Normal file
11
lektor/models/page.ini
Normal file
|
@ -0,0 +1,11 @@
|
|||
[model]
|
||||
name = Page
|
||||
label = {{ this.title }}
|
||||
|
||||
[fields.title]
|
||||
label = Title
|
||||
type = string
|
||||
|
||||
[fields.body]
|
||||
label = Body
|
||||
type = markdown
|
28
lektor/templates/layout.html
Normal file
28
lektor/templates/layout.html
Normal file
|
@ -0,0 +1,28 @@
|
|||
<!doctype html>
|
||||
<meta charset="utf-8">
|
||||
<link rel="stylesheet" href="{{ '/static/style.css'|url }}">
|
||||
<title>{% block title %}Welcome{% endblock %} — ucloud</title>
|
||||
<body>
|
||||
<header>
|
||||
<h1>ucloud</h1>
|
||||
<nav>
|
||||
<ul class="nav navbar-nav">
|
||||
<li{% if this._path == '/' %} class="active"{% endif
|
||||
%}><a href="{{ '/'|url }}">Welcome</a></li>
|
||||
{% for href, title in [
|
||||
['/projects', 'Projects'],
|
||||
['/about', 'About']
|
||||
] %}
|
||||
<li{% if this.is_child_of(href) %} class="active"{% endif
|
||||
%}><a href="{{ href|url }}">{{ title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
<div class="page">
|
||||
{% block body %}{% endblock %}
|
||||
</div>
|
||||
<footer>
|
||||
© Copyright 2019 by ungleich.
|
||||
</footer>
|
||||
</body>
|
15
lektor/templates/macros/pagination.html
Normal file
15
lektor/templates/macros/pagination.html
Normal file
|
@ -0,0 +1,15 @@
|
|||
{% macro render_pagination(pagination) %}
|
||||
<div class="pagination">
|
||||
{% if pagination.has_prev %}
|
||||
<a href="{{ pagination.prev|url }}">« Previous</a>
|
||||
{% else %}
|
||||
<span class="disabled">« Previous</span>
|
||||
{% endif %}
|
||||
| {{ pagination.page }} |
|
||||
{% if pagination.has_next %}
|
||||
<a href="{{ pagination.next|url }}">Next »</a>
|
||||
{% else %}
|
||||
<span class="disabled">Next »</span>
|
||||
{% endif %}
|
||||
</div>
|
||||
{% endmacro %}
|
6
lektor/templates/page.html
Normal file
6
lektor/templates/page.html
Normal file
|
@ -0,0 +1,6 @@
|
|||
{% extends "layout.html" %}
|
||||
{% block title %}{{ this.title }}{% endblock %}
|
||||
{% block body %}
|
||||
<h2>{{ this.title }}</h2>
|
||||
{{ this.body }}
|
||||
{% endblock %}
|
2
lektor/ucloud.lektorproject
Normal file
2
lektor/ucloud.lektorproject
Normal file
|
@ -0,0 +1,2 @@
|
|||
[project]
|
||||
name = ucloud
|
Loading…
Reference in a new issue