-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[WIP] Advanced options for kotti_blog #5
base: master
Are you sure you want to change the base?
Changes from all commits
4713d5c
f1ea4d4
c24e1fb
3bcff2e
059aee9
3e9db68
ef9cdb4
89e970e
bad297c
f87c2c9
4fa3dd6
8b552d6
1b786ad
6e9ccea
d7c9293
fa4f486
7e8adfd
24bb50a
1b7de69
61e6230
bea99f8
1eafd0b
943d7a2
15e3b4d
c245e3a
d31a764
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,19 @@ | ||
.blog-view .blogentry { | ||
margin-top: 2em; | ||
} | ||
.blogentry-view h1, | ||
.blog-view .blogentry h2 { | ||
border-top: 1px solid black; | ||
margin-top: 0.75em; | ||
padding-top: 0.5em; | ||
} | ||
.blogentry-view h1 { | ||
margin-top: 0.5em; | ||
} | ||
.blog-view .description, | ||
.blogentry-view .description { | ||
font-style: italic; | ||
} | ||
.blog-metadata { | ||
margin-bottom: 20px; | ||
border-bottom: 1px solid #EEE; | ||
} |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" | ||
xml:lang="en" | ||
i18n:domain="kotti_blog" | ||
xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
metal:use-macro="api.macro('kotti:templates/view/master.pt')"> | ||
|
||
<article metal:fill-slot="content" class="blog-archives content"> | ||
|
||
<h1><a href="${api.url(context)}">${context.title}</a> <tal:block i18n:translate="">archives</tal:block></h1> | ||
<p class="description"> | ||
${context.description} | ||
</p> | ||
<p class="body"> | ||
${structure: context.body} | ||
</p> | ||
|
||
<div tal:condition="items" class="archives"> | ||
<ul tal:repeat="archive items" class="blogentry"> | ||
<li> | ||
<a href="${api.url(context)}archives/${archive[0].year}_${archive[0].month}">${api.format_date(archive[0], 'MMMM yyyy')}</a> <span class="badge">${archive[1]}</span> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
</article> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
<!DOCTYPE html> | ||
<html xmlns="http://www.w3.org/1999/xhtml" | ||
xml:lang="en" | ||
i18n:domain="kotti_blog" | ||
xmlns:tal="http://xml.zope.org/namespaces/tal" | ||
metal:use-macro="api.macro('kotti:templates/view/master.pt')"> | ||
|
||
<article metal:fill-slot="content" class="blog-categories content"> | ||
|
||
<h1><a href="${api.url(context)}">${context.title}</a> <tal:block i18n:translate="">categories</tal:block></h1> | ||
<p class="description"> | ||
${context.description} | ||
</p> | ||
<p class="body"> | ||
${structure: context.body} | ||
</p> | ||
|
||
<div tal:condition="items" class="categories"> | ||
<ul tal:repeat="tag items" class="blogentry"> | ||
<li> | ||
<a href="${api.url(context)}categories/{tag[0]}">${tag[0]}</a> <span class="badge">${tag[1]}</span> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
</article> | ||
</html> |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
<div class="blog-sidebar"> | ||
<div class="categories" tal:condition="use_categories"> | ||
<h5><tal:block i18n:translate="">Categories</tal:block>:</h5> | ||
|
||
<ul> | ||
<li tal:repeat="tag unique_tags"> | ||
<a href="${blog_url}categories/${tag[0]}">${tag[0]}</a> <span class="badge">${tag[1]}</span> | ||
</li> | ||
</ul> | ||
</div> | ||
|
||
<div class="archive" tal:condition="use_archives"> | ||
<h5><tal:block i18n:translate="">Archives</tal:block>:</h5> | ||
|
||
<ul> | ||
<li tal:repeat="archive archives"> | ||
<a href="${blog_url}archives/${archive[0].year}_${archive[0].month}">${api.format_date(archive[0], 'MMMM yyyy')}</a> <span class="badge">${archive[1]}</span> | ||
</li> | ||
</ul> | ||
</div> | ||
</div> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,7 @@ | |
|
||
<article metal:fill-slot="content" class="blog-view content"> | ||
|
||
<h1>${api.context.title}</h1> | ||
<h1><a href="${api.url(api.context)}">${api.context.title}</a></h1> | ||
<p class="description"> | ||
${api.context.description} | ||
</p> | ||
|
@@ -17,12 +17,19 @@ | |
|
||
<div tal:condition="items" class="blogentries"> | ||
<div tal:repeat="item items" class="blogentry" data-uri="${api.url(item)}"> | ||
<span class="date" tal:content="api.format_date(item.date)" /> | ||
<h2> | ||
<a href="${api.url(item)}" title="${item.description}" tal:omit-tag="not: link_headline"> | ||
${item.title} | ||
</a> | ||
</h2> | ||
<div class="blog-metadata"> | ||
<span class="date" tal:content="api.format_datetime(item.date, 'MMM dd, yyyy \'at\' HH:mm')" /> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Frankly I just didn't like the default format and wanted to get rid of the seconds - didn't really think about locale awareness, which is probably more important then how it looks to me :P I'll see if I can keep the locale awareness while still getting rid of the seconds (I think they are unnecessary data in this case) and if not I guess we can keep the seconds too. |
||
| <tal:block i18n:translate="">categories</tal:block>: | ||
<span class="categories"> | ||
<tal:block tal:repeat="tag item.tags"> | ||
<a href="${api.url(context)}categories/${tag}">${tag}</a><tal:block tal:condition="not: repeat.tag.end">,</tal:block> | ||
</tal:block></span> | ||
</div> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The categories should only be shown if there are tags for the blog entry. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, will add a check here |
||
<p>${structure: item.body}</p> | ||
</div> | ||
</div> | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why children_with_permission is reimplemented? Should be used directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought I'd need to use some extras here but it turned out I didn't - will fix this :)