Finally a video plugin!
usage:
[[
plugin: video,
name: /videos/test.mp4,
preview: /videos/test.png
]]
The engine will use mediaplayer to display a video in /videos/test.mp4 using /videos/test.png as a cover.
Finally a video plugin!
usage:
[[
plugin: video,
name: /videos/test.mp4,
preview: /videos/test.png
]]
The engine will use mediaplayer to display a video in /videos/test.mp4 using /videos/test.png as a cover.
Put
[[
plugin: photo,
name: 08-12-14 Album Plugin,
prefix: ,
show_description: no
]]
in your post ( a newline is required before and after "[[ ... ]]" ):
The engine will look for a folder inside public/images/album named "08-12-14 Album Plugin". For each image inside that folder, a thumbnail is generated automatically inside public/images/album/"08-12-14 Album Plugin"/thumb if there isn't one already. The result will be an album showed in thumbnails with pointers to the original photos.
New install of Panda will have this ability automatically. To upgrade from previous Panda, cabal update; cabal upgrade then:
jquery.innerfade in js field inside blueprint.txtjquery.innerfade.js inside public/theme/blueprint/jsadd
$('.fade-album').innerfade(
{ speed: "slow", timeout: 4000, type: 'sequence',
containerheight: '400px' }
);
inside $(document).ready() in public/theme/blueprint/js/custom.js
style your css, for example
.article .content img{
padding: 20px 20px;
}
.article .content .center img{
text-align: center;
}
.container .content .photo {
text-align: center;
}
.container .content .photo img, .container .content ul.fade-album img{
width: 400px;
border: 1px solid #aaaaaa;
padding: 5px;
margin: 20px;
}
.container .content ul.fade-album{
list-style-type: none;
margin-left: 0;
padding-left: 0;
}
.container .content ul.fade-album li{
background: none;
}
.container .content ul.fade-album p, .container .content .photo p {
padding-left: 24px;
width: 404px;
font-size: 0.9em;
font-weight: bold;
}
I used Panda's core to build another website: http://dzqxh.com. Since there are requirements not possible using Panda alone, the view layer had to be rewritten entirely. Luckily, a few good features have been ported back to Panda, like the image plugin system and more properly structured models.
I've been using the code base of Panda to build another website. It's more then a blog, so I had to figure out a way to extend Panda's features.
Though I have not yet merge the code into Panda's code base, a photo-album plugin has just been done with a, imho, extensible plugin structure.
To insert a photo album in a post or a page, just place the following code inline:
[[
plugin: photo,
name: 08-06-10 电钢琴第一期师资培训班隆重结业
]]
It only works with markdown or html posts, as it's a simple regular expression substitution.
A prefix parameter can be used to strip the prefix of the names of the pictures, the default value is %d+-. So a picture could be named as 1-my-cat.jpg.
In this example, the engine looks for a folder named "08-06-10 电钢琴第一期师资培训班隆重结业" inside "public/images/album". The parent path is hard coded in Config.Global, but could be exposed to site.txt as usually.
All the images inside the album folder are used to generate an image album, specified in View.Atom.Album.
That's it.
BTW, I experimented with the XSLT idea, and it turned out to be not flexible enough. I'm giving up the idea of easy configurable theming for now, since I like generating HTML in Haskell and that's not something every user should do.
I was reluctant to say it, but I'm not satisfied with Panda's code size. Currently it has 1013 sloc, it should not have been as a simple blog.
I could think of one solution, i.e., the HAppS's approach:
Haskell Datatype -> XML -> XSLT -> CSS -> Javascript
Everything after XML is theme specific, hence outside the scope of Panda. This way I can bring down the amount of code involved.
Unfortunately I might have less time to spend on Panda, so I'll just stfu and code.
A tiny UTF8 wrapper around basic IOs and REs for Panda:
1 | |
Beats Python 3.0, yeah :)
Yes, this blog is now running on GHC 6.10.1, kaka :)