Seperated test inputs from cms

This commit is contained in:
Sebastian 2016-04-19 21:57:58 +02:00
commit 43f7a5a328
20 changed files with 164 additions and 0 deletions

4
.gitignore vendored Normal file
View File

@ -0,0 +1,4 @@
/rendered_root
/virtenv
*.pyc
*.swp

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "verdandi"]
path = verdandi
url = git@github.com:LongHairedHacker/verdandi.git

27
content/content.md Normal file
View File

@ -0,0 +1,27 @@
12.2.2014 13:37
12.2.2014 23:42
Test
----
Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum.
Foo | Rofl | Lol
----|------|-----
A | B | C
D | E | F
Stet clita
==========
kasd gubergren, no sea takimata sanctus est Lorem ipsum dolor sit amet. Lorem ipsum dolor sit amet, consetetur sadipscing elitr, sed diam nonumy eirmod tempor invidunt ut labore et dolore magna aliquyam erat, sed diam voluptua. At vero eos et accusam et justo duo dolores et ea rebum. Stet clita kasd gubergren, no sea takimata sanctus
* est
* Lorem
* ipsum
* <strike>dolor</strike>
* *sit*
* **amet**.
1. Lol
2. No
3. Nope

BIN
content/img/bar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.1 KiB

BIN
content/img/foo.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 910 B

7
content/news/test.md Normal file
View File

@ -0,0 +1,7 @@
1.1.2016 12:00
22.1.2016 17:00
First test
This is a first test newsitem

7
content/news/test1.md Normal file
View File

@ -0,0 +1,7 @@
15.1.2016 12:00
22.1.2016 17:00
Second test
This is an other test newsitem

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 MiB

View File

@ -0,0 +1,5 @@
28.1.2016
14.2.2016
This is a test gallery description.
Awesome shit an stuff !

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.3 MiB

16
templates/base.html Normal file
View File

@ -0,0 +1,16 @@
<html>
<head>
<title>{{page_title}}</title>
</head>
<body>
{{menu}}
<br/>
{% block content %}
<h1 class="mainheading">{{page_title}}</h1>
{{content}}
<br/>
Created: {{content_creation_time.strftime('%d.%m.%Y %H:%M:%S')}}</br>
Edit: {{content_edit_time.strftime('%d.%m.%Y %H:%M:%S')}}</br>
{% endblock %}
</body>
</html>

10
templates/gallery.html Normal file
View File

@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block content %}
<h1>{{page_title}}</h1>
{% for image in images %}
<a href="{{image.image}}"><img src="{{image.thumb}}" /></a>
{% endfor %}
{% endblock %}

12
templates/newsfeed.html Normal file
View File

@ -0,0 +1,12 @@
{% extends "base.html" %}
{% block content %}
{% for item in items %}
<div>
<h2>{{item.title}}</h2>
{{item.content}}
</div>
{% endfor %}
{% endblock %}

13
templates/newsfeed.rss Normal file
View File

@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8" ?>
<rss version="2.0">
<channel>
{% for item in items %}
<item>
<title>{{item.title}}</title>
<url>{{item.url}}</url>
<description>{{item.content}}</description>
<pubDate>{{item.creation_time.strftime('%d.%m.%Y %H:%M:%S')}}</pubDate>
</item>
{% endfor %}
</channel>
</rss>

59
testblog.py Normal file
View File

@ -0,0 +1,59 @@
#!/usr/bin/env python2
from verdandi.verdandi import Verdandi
from verdandi.modules.page import Page
from verdandi.modules.commonassets import CommonAssets
from verdandi.modules.newsfeed import NewsFeed
from verdandi.modules.gallery import Gallery
class TestPage1(Page):
title = "A cool new Page"
menu_title = "New Page"
menu_label = "new_cool_page"
class TestPage2(Page):
title = "An other cool Page"
assets = [('img/foo.png', 'img/'),
('img/foo.png', 'img/bar.png'),
('img/foo.png', 'img/bar')]
url = "page2.html"
menu_title = "Other new Page"
menu_label = "cool_page1"
class TestPage3(Page):
title = "Yet an other cool Page"
menu_title = "Other new Page2"
menu_label = "cool_page2"
menu_parent = "cool_page1"
url = "subdir/page3.html"
class Assets(CommonAssets):
assets = [('img', 'img/dir'),
('img/', 'img/files')]
class News(NewsFeed):
title = "New News"
url = "news.html"
menu_title = "News"
menu_label = "news"
class TestGallery(Gallery):
title = "A Test Gallery"
url = "testgallery.html"
gallery_directory = "test_gallery"
gallery_images_url = "img/test_gallery"
class TestBlog(Verdandi):
modules = [TestPage1(),
TestPage2(),
TestPage3(),
Assets(),
News(),
TestGallery()]
testblog = TestBlog()
testblog.run()

1
verdandi Submodule

@ -0,0 +1 @@
Subproject commit d0e3b784d9974117152f5dea99023697fb35c644