Textpattern CMS support forum
You are not logged in. Register | Login | Help
- Topics: Active | Unanswered
#1 2008-06-02 14:23:51
- alex9142
- Member
- Registered: 2008-03-17
- Posts: 45
adding a small calendar beside the title
Hi TXP-Family!
Today I was reading some blogs and when I saw this blog: …
http://www.pigeontheory.com/blog/
… I really loved the little calendars beside the post titles.
Its is WP blog, so I came here to know if someone has this feature too in a TXP blog.
Offline
Re: adding a small calendar beside the title
I should think it’d be a little HTML/CSS trick. For example . I think TXPer ‘zero’ has done it before, among others (probably ‘thebombsite’) and from memory I think there was a post about it late last year/early this year. Can’t find it right now, but have a quick search through the forums (or via google) for calendar html/css and you’ll probably stumble upon how it was done in TXP.
Hope that helps.
The smd plugin menagerie — for when you need one more gribble of power from Textpattern. Bleeding-edge code available on GitHub.
Txp Builders – finely-crafted code, design and Txp
Offline
Re: adding a small calendar beside the title
here you go:)
In your form add something like:
<div class="clear"><div class="calendar">
<div class="year"><txp:posted format="%B" /></div>
<div style="day"><txp:posted format="%d" /></div>
<div style="month"><txp:posted format="%Y" /></div>
</div>
<h3><txp:permlink><txp:title /></txp:permlink></h3>
<txp:excerpt /></div>
and the css
.clear{clear:both}
.calendar {width:50px;float:left;}
.day, .year, .month {text-align:center}
.year {font-size: 11px;color:white;background-color:blue;}
.day {font-size: 20px}
.month {font-size:11px;}
Or adjust to your liking.
>Edited to add the title.
Last edited by colak (2008-06-02 15:31:36)
Yiannis
——————————
NeMe | hblack.art | EMAP | A Sea change | Toolkit of Care
I do my best editing after I click on the submit button.
Offline
Re: adding a small calendar beside the title
Looking at the site, they are using a background-image which in Yiannis’ CSS code above would be applied to the .calendar div which I think would then need width and maybe height attributes unless you “pad out” the text. You wouldn’t need the blue background-color then.
The only problem with doing it this way is getting the vertical alignment of the text over the background image to work properly with different browsers.
Last edited by thebombsite (2008-06-02 17:36:22)
Stuart
In a Time of Universal Deceit
Telling the Truth is Revolutionary.
Offline
#5 2008-06-02 17:48:28
- alex9142
- Member
- Registered: 2008-03-17
- Posts: 45
Re: adding a small calendar beside the title
Hi everybody!
Bloke, the link you’ve sent is great, I will read it later and try to do it… by the way, I went to see your website and tried to send you a message, but the form always return a message to ask me to pick up another fruit (very funny!!!).
Hi Colak, thank you for your replay, I will try your code too.
STUART !!!
Your website “está bombando!!!”
Offline