Character wiki items links

weasel0
weasel0
edited February 2016 in Campaign Portal Building
PreReforging (:p) we were able to do things like:

bq. a.character:visited,
a.character:link
{color:darkRed;}

bq. a.item:visited,
a.item:link
{color:green;}

and separate in a post the various things by color. I've tried a number of different ways to do it:

bq. .main-content a.wiki-content-link:visited,
.main-content a.wiki-content-link:link
{color:blue;}

and "a.wiki-page-link", ".wiki-page-link" and other variations but can't get color changes to function. ".main-content a" ".a" and variations do work but I'm trying to get the old separations not generic site wide changes. Any ideas? I've looked at others campaigns and didn't see anyone else doing it but I may not have just happened upon the right campaign. I did a search and came up with nothing for this. Am I the first to notice? Could I just not find the existing help? Should I open a ticket under suggestions?


a.wiki-content-link seems to be for characters and for items
a.wiki-page-link is wiki pages
a.create-wiki-page-link DOES have a different color

Comments

  • twiggyleaf
    twiggyleaf
    Posts: 2,011
    Weasel0

    I have very limited understanding of CSS but for colour changes by paragraph I use this method (take out spaces to get the actual code)

    e.g. % { color:red } RED %

    No Spaces: %{color:red}RED% (In your wiki, the word RED should be coloured red if you do this)

    twigs

    "I met a traveller from an antique land....."

    CotM May 2016: Mysteria: set in Wolfgang Baur’s MIDGARD.

    Previous CotM Aug 2012: Shimring: High Level Multiplanar Campaign

    Inner Council Member

  • weasel0
    weasel0
    Posts: 435
    yea, I've used textile formatting in the campaign forums while trying to use it as a PbP area. Helped to differentiate between IC, %{color:green}OOC%, and various actions that were on going.

    I'm definitely looking at a CSS solution here instead of having to hard code each link a particular color. Especially with hyperlinks normal ability to color change for unused link, visited, hover, and other things one ought to be able to control.
  • ChainsawXIV
    ChainsawXIV
    Posts: 530
    If I understand what you're trying for here, you want to give a different color (or whatever) to links depending on if they point to an item, a wiki page, or a character? That used to be dead simple, because links got tagged with a class depending on what kind of page they pointed to, but that changed in the reforge. It's still simple though, if a little less intuitive:

    bc. /* Colors all links to an address with /characters/ in the address red */
    a[href*=\/characters\/]{
    color:red;
    }

    You can swap out the word "characters" for "items" as desired, of course.

    Note that you can get false positives if you have links to outside sites that happen to have that in their address somewhere, but that's kind of an obscure edge case.
  • Basileus
    Basileus
    Posts: 585
    _- points dramatically at weasel0, finger shaking with barely contained righteous indignation -_

    *Blasphemy, in this very thread! Let them be anathema!*
  • weasel0
    weasel0
    Posts: 435
    ChainsawXIV to the rescue again. You're awesome.

    Basileus....don't you have some 502s to go stare at? :-P
  • UselessTriviaMan
    UselessTriviaMan
    Posts: 546
    Holy CRAP that's handy. Thank you!!

    Ptolus, City by the Spire - 2016 Campaign of the Year

    "Please pay attention very carefully, because this is the truest thing a stranger will ever say to you: In the face of such hopelessness as our eventual, unavoidable death, there is little sense in not at least TRYING to accomplish all your wildest dreams in life."  - - Kevin Smith

  • Basileus
    Basileus
    Posts: 585
    LOL, sadly I don't use the site itself much anymore. Mostly I just dwell in the forums these days... festering in the shadows...
  • GamingMegaverse
    GamingMegaverse
    Posts: 2,999 edited February 2016
    This is what I use, and it works fine.
    a.character:link {color:darkRed;}
    a.item:link {color:green;}
    a.place:link {color:blue;}

    Then each link we just add class="character" or place or item
    It is located in our "CSS":https://a-god-rebuilt.obsidianportal.com/wikis/css
    Post edited by GamingMegaverse on

    Just trying to help out.

  • weasel0
    weasel0
    Posts: 435
    heh heh. I'm pretty sure where I "found" my code Killervp.

    I've not used classes before so I'll have a look/see at your on page coding but ChainsawXIV's fix fits more of what the wiki used to do Pre-reforging.
  • Maesenko
    Maesenko
    Posts: 325
    Well B, you should get Outremer up and running again so you _can_ use the site more!
    ...And so I can use it more as well. I'm really in need of a game again.

    P.S. - I'm still waiting on the results of that Mechanics roll!

    ~Mae

    CotM Selection Committee

  • Basileus
    Basileus
    Posts: 585
    Mae, I'm drawing out the dramatic tension. Anything could happen!

    You know though, a month or two ago I wouldn't have been in a position to do it, but my health has been improving by leaps and bounds (the right medication will do that!), and work is relatively quiet (as work goes). Maybe now is a good time. I need to make a checklist of whats needed to get things rolling again.
  • Maesenko
    Maesenko
    Posts: 325
    Well, I remember I was rolling to cut the power...I didn't realize my roll of 7 was successful enough to cut power to the game itself!

    ~Mae

    CotM Selection Committee

  • SkidAce
    SkidAce
    Posts: 830
    Tumbrel will be willing to pilot the company out of there, as long as we didnt smash our original transportation.

    He thinks its fine, not so much the bad guys we broadslided over.
  • GamingMegaverse
    GamingMegaverse
    Posts: 2,999
    I would love to see a revival of Outremer as an outsider- enjoyed some of those logs...
    killervp
    "A God...Rebuilt":https://a-god-rebuilt.obsidianportal.com
    "OP's COTM April 2012":http://blog.obsidianportal.com/a-god-rebuilt-aprils-cotm/
    Over 350 Fans, and Looking for More!

    Just trying to help out.

Sign In or Register to comment.

April 2024
Season of Strife

Read the feature post on the blog
Return to Obsidian Portal

Howdy, Stranger!

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

Discussions