19

The current package image system on links is very manual. Too manual. You have to remember or look up a URL, insert an image, blah blah blah. Not to forget we're currently having to go through a messy database search-replace to change the images. Nasty.

Could we instead just add some javascript to the page that detected the package links and added a CSS class to them. Something as simple as this would work:

$('a[href^="http://apt.ubuntu.com/p/"]').addClass('packageLink');

And then some CSS to display the image:

a.packageLink {
    background:url(...) center right no-repeat;
    padding-right: 20px
}
h1 a.packageLink, h2 a.packageLink, h3 a.packageLink {
    /* bigger version for headers */
    background-image:url(...);
    padding-right: 25px
}

I'm guessing on all those padding values, but the idea is solid.

Then somebody only needs link to the package url, and an image pops up.

  • 4
    Sounds clever... but what about all of the existing links that already have the image? – Nathan Osman Nov 23 '11 at 3:14
  • May I post a more general feature request on MSO that supersedes this? – hexafraction Oct 25 '12 at 0:20
  • @GeorgeEdison Somebody could write up a quick script for The Bot to run, that would edit those images out. It wouldn't take too long, I think. – JamesTheAwesomeDude Dec 6 '12 at 6:36

You must log in to answer this question.

Browse other questions tagged .