Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Formatting links to external pages in Harlowe

edited September 2015 in Help! with 2.0
I'd like to be able to give links that go to external pages a different formatting from ones that stay within the story. However looking at the HTML in firefox's web inspector it seems that the following produce the same code.
(link: "text")[(goto: "page")]
(link: "more text")[(gotoURL: "url")]

Is there any CSS selector that will affect external links, but not internal ones?

Comments

  • The issue is that the link itself is neither internal or external, it is just something that accepts click / mouse events. It is the contents of the hook which is determining if the user is going to an internal or external destination and as you saw when you looked at the generated HTML it is very basic.

    You could wrap your external links in a classed span/div element and base your CSS selector on that instead.
    <span class="external">(link: "more text")[(gotoURL: "url")]</span>
    
    .external tw-hook tw-link {
    	color: green;
    }
    
  • Thanks for the answer. fortunately I don't have many external links, so wrapping them in spans won't be too much trouble.
Sign In or Register to comment.