Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tweaks for easier theming (you know you want them) #2012

Closed
StealthWombat opened this issue Jul 2, 2014 · 3 comments
Closed

Tweaks for easier theming (you know you want them) #2012

StealthWombat opened this issue Jul 2, 2014 · 3 comments
Labels
Milestone

Comments

@StealthWombat
Copy link

Basic stuff, but makes a difference. At the moment the pages index, and the three jump to's (MessageIndex, Display and Search templates) have a colon forced in the markup. Examples:

        'extra_before' => '<span class="pages">' . $txt['pages'] . ': </span>',

and:

                    sJumpToTemplate: "<label class=\"smalltext\" for=\"%select_id%\">', $context['jump_to']['label'], ':<" + "/label> %dropdown_list%",

This is something inherited from God knows where (probably YaBB) and is a right PITA for theming. Say someone doesn't want a colon there.

At the moment they have to hack index.template.php to get rid of the colon from span class="pages", and they have to hack the other three templates to get rid of it from the jump to's.

If the colon is moved to the text string (where it really should be anyway) people can change the presentation just by editing the string in the admin languages editor, or by editing one languages file if they prefer doing that (handy if a themer wants to use a custom theme string to redefine the default text).

(BTW, my 2c is that the jump to's look far better with just an nbsp; between the label text and the input)

@live627 live627 added the Theme label Jul 20, 2014
@SSPMark
Copy link
Contributor

SSPMark commented Aug 27, 2014

Why not take it a step further, remove the colon from the HTML and language files and just throw it in the CSS?

.pages:after {
   content: ": ";
}

Or, to use as needed...

.separator:after {
   content: ": ";
}

Or something similar.

@Xarcell
Copy link

Xarcell commented Sep 27, 2014

I like the idea of it being in the stylesheet, rather than language files, simply because it will be easier to edit.

To get it to work with IE8+, it should be:

.pages:after, .pages::after, .separator:after, .separator::after;  {
   content: ": ";
}

Note: IE8 and Opera 4-6 only support the old, single-colon CSS2 syntax (:after). Newer versions support the standard, double-colon CSS3 syntax (::after).

Note: For :after to work in IE8, a <!DOCTYPE> must be declared.

@XinYenFon
Copy link
Contributor

oh snap I forgot to reply here bit long ago :P I'll fix them in next PR

@live627 live627 added this to the Beta 2 milestone Dec 30, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

5 participants