Go to main content

Textpattern CMS support forum

You are not logged in. Register | Login | Help

#1 2011-03-21 11:26:24

Bloke
Developer
From: Leeds, UK
Registered: 2006-01-29
Posts: 11,271
Website GitHub

External site indicator in translations

To highlight external links over internal links on a site, I’m using this piece of CSS:

a[href^="http://"] {
    background: url(/images/external.png) center right no-repeat;
    padding-right: 13px;
}
a[href^="http://site.com"] {
    background: none;
    padding-right:0;
}

Works fine, removing any external indicators on local links. Probably not the most efficient way to do it, but it (mostly) works. The problem is that it falls apart if someone views the page from translate.google.com or similar because every link is deemed external and the page drowns in a sea of little ‘offsite’ indicators, throwing the design into disarray.

Has anybody addressed this or can offer my beleaguered non-designer brain some ideas on a method to supply the external indicator reliably on both native and third-party translated versions of the site? Thanks in advance for your thoughts.


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

#2 2011-03-21 18:33:22

maruchan
Member
From: Ukiah, California
Registered: 2010-06-12
Posts: 590
Website

Re: External site indicator in translations

What about adding an additional rule for http://translate.googleusercontent.com?

Offline

Board footer

Powered by FluxBB