2015-02-26 20:26:39 +01:00
|
|
|
#!/usr/bin/env python2
|
|
|
|
|
|
|
|
import sys
|
|
|
|
sys.path.append('../')
|
|
|
|
|
|
|
|
from verdandi.verdandi import Verdandi
|
|
|
|
from verdandi.modules.page import Page
|
2016-01-09 02:13:08 +01:00
|
|
|
from verdandi.modules.commonassets import CommonAssets
|
2015-02-26 20:26:39 +01:00
|
|
|
|
|
|
|
class TestPage1(Page):
|
|
|
|
title = "A cool new Page"
|
2015-04-06 22:59:09 +02:00
|
|
|
menu_title = "New Page"
|
|
|
|
menu_label = "new_cool_page"
|
2016-01-09 02:13:08 +01:00
|
|
|
|
2015-02-26 20:26:39 +01:00
|
|
|
|
|
|
|
class TestPage2(Page):
|
|
|
|
title = "An other cool Page"
|
2016-01-09 02:13:08 +01:00
|
|
|
assets = [('img/foo.png', 'img/'),
|
|
|
|
('img/foo.png', 'img/bar.png'),
|
|
|
|
('img/foo.png', 'img/bar')]
|
2015-02-26 20:26:39 +01:00
|
|
|
url = "page2.html"
|
2015-04-06 22:59:09 +02:00
|
|
|
menu_title = "Other new Page"
|
|
|
|
menu_label = "cool_page1"
|
|
|
|
|
2015-02-26 20:26:39 +01:00
|
|
|
|
|
|
|
class TestPage3(Page):
|
|
|
|
title = "Yet an other cool Page"
|
2015-04-06 22:59:09 +02:00
|
|
|
menu_title = "Other new Page2"
|
|
|
|
menu_label = "cool_page2"
|
|
|
|
menu_parent = "cool_page1"
|
2015-02-26 20:26:39 +01:00
|
|
|
url = "subdir/page3.html"
|
|
|
|
|
2016-01-09 02:13:08 +01:00
|
|
|
class Assets(CommonAssets):
|
|
|
|
assets = [('img', 'img/dir'),
|
|
|
|
('img/', 'img/files')]
|
2015-02-26 20:26:39 +01:00
|
|
|
|
|
|
|
class TestBlog(Verdandi):
|
|
|
|
modules = [TestPage1(),
|
|
|
|
TestPage2(),
|
2016-01-09 02:13:08 +01:00
|
|
|
TestPage3(),
|
|
|
|
Assets()]
|
2015-02-26 20:26:39 +01:00
|
|
|
|
|
|
|
|
|
|
|
testblog = TestBlog()
|
|
|
|
testblog.run()
|