andrewducker: (Made of Love)
[personal profile] andrewducker
After much faffing around with Javascript and the like, the templating is now in.

It's not for people that don't understand code at all, but I can't see much of a way to make it simpler.

The current default template looks like this:
<ul class="links">
#foreach($link in $links)
<li class="link"><A href="$link.URL">$link.Title</A>
#if($link.Description)<BR><span class="link-description">$link.Description</span>#end
<BR><span class="link-tags">(tags:#foreach($tag in $link.Tags) <A href="$tag.TagURL">$tag.Tag</A>#end )</span>
</li>
<BR><BR>
#end
</ul>

which basically says:
  • Start a list
  • For each link in the collection of links:
    • Create a new list item and put the link title in it, and make that title a hyperlink to the URL of the link.
    • If the link has a description, then put it in, on a new line.
    • Add a new line, and then put in each tag, turning it into a hyperlink back to the site that the links came from (i.e. delicious or pinboard)
    • end the list item
  • end the list


If you're going to play around with it then use the "Test" input and output settings, so that you're not constantly scraping the source links/posting to your journal. If you completely mess it up then hit the "Reset Templates" button to restore the original template.

Next up - a template for the subject line/title.

Date: 2011-11-10 12:04 am (UTC)
From: [identity profile] recycled-sales.livejournal.com
More of a visual than usability question, but have you considered using @font-face to do some inline font replacement? Times can look a bit blergh.

Date: 2011-11-10 05:15 am (UTC)
From: [identity profile] khbrown.livejournal.com
What happens if there are no links? Do you get an empty set of
    tags issued? Should there maybe be an if ($links) before, or will there always be at least one $link? [Been bitten by this before in doing web stuff]

Date: 2011-11-10 07:09 am (UTC)
From: [identity profile] momentsmusicaux.livejournal.com
You don't need the BRs after each LI -- I was noticing the other day your link lists have gone a bit gappy!

Date: 2011-11-10 10:41 am (UTC)
From: [identity profile] khbrown.livejournal.com
Could you do this with CSS :after ?

Date: 2011-11-10 11:24 am (UTC)
From: [identity profile] momentsmusicaux.livejournal.com
Grumble grumble. Gaps between links is what CSS is for!

Date: 2011-11-10 11:58 am (UTC)
From: [identity profile] momentsmusicaux.livejournal.com
I didn't notice a question.

But anyway, my answer to what I assume the question is, is 'BRs between LIs bad!'

Date: 2011-11-10 12:22 pm (UTC)
From: [identity profile] momentsmusicaux.livejournal.com
li.link {
padding-bottom: 2em;
}

or something along those lines.

'Wrong. Crack' is a perfectly valid programming answer!

Date: 2011-11-10 12:31 pm (UTC)
From: [identity profile] momentsmusicaux.livejournal.com
Yes, CSS will appear in the post. But BRs are even worse, as there's nothing I can do with them at all.

The best way would be to accept that LIs are the way they are, and if you want spacing on them, put CSS into your own LJ's output, ie in your LJ theme.

And really? That sort of thing gets bandied about all the time in issue queues.

Date: 2011-11-10 12:58 pm (UTC)
From: [identity profile] momentsmusicaux.livejournal.com
Oh. Sorry.

For the record, I never say that sort of thing 'because I don't like the look of it'. I say these things based on experience and knowledge.

I don't see Sven's answer -- what was it?

October 2025

S M T W T F S
    1 2 3 4
5 67891011
12131415161718
19202122232425
262728293031 

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Oct. 7th, 2025 04:08 am
Powered by Dreamwidth Studios