Simple Machines Community Forum

SMF Development => Bug Reports => Fixed or Bogus Bugs => Topic started by: Antechinus on August 23, 2021, 06:49:32 PM

Title: "All" link in page index lacks a class, and has hard-coded non-breaking space.
Post by: Antechinus on August 23, 2021, 06:49:32 PM
Ok, this is silly too. :P

<div class="pagelinks floatleft">
<a href="#main_content_section" class="button" id="bot">Go Up</a>
<span class="pages">Pages</span>
<a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=567270.0"><span class="main_icons previous_page"></span></a>
<a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=567270.0">1</a> <span class="current_page">2</span>
&nbsp;
<a href="https://www.simplemachines.org/community/index.php?topic=567270.0;all">All</a>
</div>

If the "All" link was classed as something sensible* it would be simpler to target via CSS (at the moment it can only be done via url attribute selector). Also, the hard-coded non-breaking space is a left from the Stone Age. Just give the anchor some side padding, or whatever.

Fix this shiz and suddenly themers will not be swearing at devs. Everyone happy. :)

*Something sensible would be a class name like .all_pages (for example).

ETA: Just checked, and noticed that the "All" link is not generated in index.template.php with the rest of the page index markup. So, locked in Sources somewhere. Hey ho.
Title: Re: "All" link in page index lacks a class, and has hard-coded non-breaking space.
Post by: Antechinus on August 24, 2021, 12:56:56 AM
Related bug: when you click the "All" link and go to Display.template.php with an "All posts" display, the markup of the page index there looks like this:

        <div class="pagelinks floatleft">
            <a href="#bot" class="button">Go Down</a>
            <span class="pages">Pages</span>
            <a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=576377.0">1</a>
            <a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=576377.20">2</a>
            <a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=576377.40">3</a>
            <a class="nav_page" href="https://www.simplemachines.org/community/index.php?topic=576377.20">
                  <span class="main_icons next_page"></span>
            </a>
            [
            <strong>All</strong>
            ]
      </div>

Which is all kinds of groovy. It would be much better if the square brackets were done as ::before and ::after pseudos inside the strong tag. At least then you could do something with the whole shebang if the default presentation was giving you the irrits.

It give me the irrits. :D
Title: Re: "All" link in page index lacks a class, and has hard-coded non-breaking space.
Post by: Diego Andrés on August 24, 2021, 07:23:52 PM
PR: https://github.com/SimpleMachines/SMF2.1/pull/7017
Title: Re: "All" link in page index lacks a class, and has hard-coded non-breaking space.
Post by: Antechinus on August 24, 2021, 07:27:23 PM
What markup does that generate?
ETA: Nevermind. I'll try it out on local. :)
Title: Re: "All" link in page index lacks a class, and has hard-coded non-breaking space.
Post by: Diego Andrés on August 24, 2021, 07:28:56 PM
Defined by theme, can you test it