Add a microblog template that is useful for inlining microblogging posts.
parent
a25d8f992b
commit
b6eccfd3d3
|
@ -12,6 +12,7 @@ ikiwiki (3.10) UNRELEASED; urgency=low
|
||||||
* Add missing permalink support to archivepage and titlepage templates.
|
* Add missing permalink support to archivepage and titlepage templates.
|
||||||
* debian/control: Wrap fields.
|
* debian/control: Wrap fields.
|
||||||
* inline: Add author info to archive display.
|
* inline: Add author info to archive display.
|
||||||
|
* Add a microblog template that is useful for inlining microblogging posts.
|
||||||
|
|
||||||
-- Joey Hess <joeyh@debian.org> Sat, 04 Apr 2009 17:47:36 -0400
|
-- Joey Hess <joeyh@debian.org> Sat, 04 Apr 2009 17:47:36 -0400
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,8 @@ Here are some less often needed parameters:
|
||||||
page. By default the `inlinepage` template is used, while
|
page. By default the `inlinepage` template is used, while
|
||||||
the `archivepage` template is used for archives. Set this parameter to
|
the `archivepage` template is used for archives. Set this parameter to
|
||||||
use some other, custom template, such as the `titlepage` template that
|
use some other, custom template, such as the `titlepage` template that
|
||||||
only shows post titles. Note that you should still set `archive=yes` if
|
only shows post titles or the `microblog` template, optimised for
|
||||||
|
microblogging. Note that you should still set `archive=yes` if
|
||||||
your custom template does not include the page content.
|
your custom template does not include the page content.
|
||||||
* `raw` - Rather than the default behavior of creating a blog,
|
* `raw` - Rather than the default behavior of creating a blog,
|
||||||
if raw is set to "yes", the page will be included raw, without additional
|
if raw is set to "yes", the page will be included raw, without additional
|
||||||
|
|
|
@ -373,11 +373,13 @@ span.color {
|
||||||
padding: 2px;
|
padding: 2px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.comment-header {
|
.comment-header,
|
||||||
|
.microblog-header {
|
||||||
font-style: italic;
|
font-style: italic;
|
||||||
margin-top: .3em;
|
margin-top: .3em;
|
||||||
}
|
}
|
||||||
.comment .author {
|
.comment .author,
|
||||||
|
.microblog .author {
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
}
|
}
|
||||||
.comment-subject {
|
.comment-subject {
|
||||||
|
|
|
@ -11,10 +11,8 @@ from there, like I have on [my blog](http://kitenet.net/~joey/blog/)
|
||||||
\[[!template id=note text="""
|
\[[!template id=note text="""
|
||||||
\[[!aggregate expirecount=5 name="dents" url="http://identi.ca/joeyh"
|
\[[!aggregate expirecount=5 name="dents" url="http://identi.ca/joeyh"
|
||||||
feedurl="http://identi.ca/api/statuses/user_timeline/joeyh.atom"]]
|
feedurl="http://identi.ca/api/statuses/user_timeline/joeyh.atom"]]
|
||||||
\[[!inline pages="internal(dents/*)" archive=yes show=5 feeds=no]]
|
\[[!inline pages="internal(dents/*)" template=microblog
|
||||||
|
show=5 feeds=no]]
|
||||||
"""]]
|
"""]]
|
||||||
|
|
||||||
For a cleaner look without the post dates, add `template=titlepage`
|
|
||||||
to the `inline` directive.
|
|
||||||
|
|
||||||
Note: Works best with ikiwiki 3.10 or better.
|
Note: Works best with ikiwiki 3.10 or better.
|
||||||
|
|
|
@ -21,6 +21,7 @@ located in /usr/share/ikiwiki/templates by default.
|
||||||
* `inlinepage.tmpl` - Used for adding a page inline in a blog
|
* `inlinepage.tmpl` - Used for adding a page inline in a blog
|
||||||
page.
|
page.
|
||||||
* `archivepage.tmpl` - Used for listing a page in a blog archive page.
|
* `archivepage.tmpl` - Used for listing a page in a blog archive page.
|
||||||
|
* `microblog.tmpl` - Used for showing a microblogging post inline.
|
||||||
* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links)
|
* `blogpost.tmpl` - Used for a form to add a post to a blog (and a rss/atom links)
|
||||||
* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used.
|
* `feedlink.tmpl` - Used to add rss/atom links if blogpost.tmpl is not used.
|
||||||
* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create
|
* `aggregatepost.tmpl` - Used by the [[plugins/aggregate]] plugin to create
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
<div class="microblog">
|
||||||
|
|
||||||
|
<div class="inlinecontent">
|
||||||
|
<TMPL_VAR CONTENT>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="microblog-header">
|
||||||
|
|
||||||
|
<TMPL_IF NAME="AUTHOR">
|
||||||
|
<span class="author">
|
||||||
|
<TMPL_IF NAME="AUTHORURL">
|
||||||
|
<a href="<TMPL_VAR AUTHORURL>"><TMPL_VAR AUTHOR></a>
|
||||||
|
<TMPL_ELSE>
|
||||||
|
<TMPL_VAR AUTHOR>
|
||||||
|
</TMPL_IF>
|
||||||
|
</span>
|
||||||
|
</TMPL_IF>
|
||||||
|
|
||||||
|
— <TMPL_VAR CTIME>
|
||||||
|
|
||||||
|
</div> <!--.microblog-header-->
|
||||||
|
</div> <!--.microblog-->
|
Loading…
Reference in New Issue