Skip to main content
Topic: It's pink, therefore it's Span. Why for span in linktree? (Read 4841 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

It's pink, therefore it's Span. Why for span in linktree?

Just wondering why your linktree markup these days is:

Code: [Select]
<li>
   <span>
        <a> little picture of house </a>
    </span>
</li>
What's the span in aid of? Reason I ask is because it has no CSS set and doesn't appear to be doing anything.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #1

They are all like that ... just another leftover I'd say.  I'll kill them in 1.1 and see what happens, if we are lucky some cats will die.

ETA: Lucky day, dead cats resulted
Last Edit: September 13, 2015, 05:25:00 pm by Spuds

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #2

Sounds good. Feral cats are a real problem in Australia. Now if you can figure out how to massacre cane toads by editing forum markup that'd be really good.

(actually I could probably think of cleaner css for the linktree)
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #3

Same here, they are a real problem, don't have cane toads but armadillos can tear up your yard in a night, and the vultures don't find them tasty so you have to do your own cleanup, unless you can tag it while its in your neighbors yard.

The problem is at the end of the linktree, where the extra before or extra after can be added (post preview is an example, and probably the only one)  Without the span this nesting misses.
Code: [Select]
.linktree:last-child > span > a {
display: inline;
}

.linktree:last-child > span {
display: block;
overflow: hidden;
max-width: 25em;
text-overflow: ellipsis;
}

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #4

Ah, ok. There's probably a way around that. I'm also thinking it should be possible to get rid of some of the excessive padding on the li's, so that the anchors can fill more of the space (fewer missed clicks, especially on the home icon). Will give it some thought.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #5

Cool ... the existing markup was a result of this discussion.

http://www.elkarte.net/community/index.php?topic=2046.msg13207#msg13207

less padding would help a bit on mobile as well, right now there is about enough room for 3 or 4 characters in the preceding

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #6

Which file holds the sources stuff for the linktree?
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #7

index.template in the function theme_linktree

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #8

Oh nvm. I'll download the whole thing to local and run a search. :)

ETA: index.template.php has the basic markup but doesn't include the extra before and after stuff. That used to be in Display.php and MessageIndex.php in 2.0.x, but like I said I'll just run a search on local.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #9

Be warned it's a pain. I recoded that garbage entirely on smf 2.0.10 and it took me days to figure it out, to make it look decent both on mobile and desktop - they stack vertically on mobile, which is rather fancy and doesn't annoy google mobile results, while they work normally on desktop :D
~ SimplePortal Support Team ~

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #10

extra_blabla is in post.controller as

Code: [Select]
				'extra_before' => '<span><strong class="nav">' . $context['page_title'] . ' ( </strong></span>',
'extra_after' => '<span><strong class="nav"> )</strong></span>'

I don't think there is any other instances, but search would know best

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #11

Quote from: Flavio93Zena – Be warned it's a pain. I recoded that garbage entirely on smf 2.0.10 and it took me days to figure it out, to make it look decent both on mobile and desktop - they stack vertically on mobile, which is rather fancy and doesn't annoy google mobile results, while they work normally on desktop :D
Oh hey, I already know it's a pain. :D First thing I do on custom themes is eliminate that stuff to make life much easier while not sacrificing any significant (IMO) functionality. :D
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #12

Quote from: Spuds – extra_blabla is in post.controller as

Code: [Select]
				'extra_before' => '<span><strong class="nav">' . $context['page_title'] . ' ( </strong></span>',
'extra_after' => '<span><strong class="nav"> )</strong></span>'

I don't think there is any other instances, but search would know best
Cool. I'll frig around with it and see what happens.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #13

Nice touch having a new topic link at the end of the linktree for empty boards. Hadn't thought of that, but it kinda makes sense. :)

ETA: Is there any documentation on where the before and after content is being generated? Page title is the default tree name anyway AFAICT, so I'm not sure what the extra markup is trying to do. I assume board moderators is one thing, but haven't got a clue where it's all coming from.
Last Edit: September 13, 2015, 07:02:01 pm by Antechinus
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P

Re: It's pink, therefore it's Span. Why for span in linktree?

Reply #14

Aha. Got it. Reason I couldn't find any extra_before is because it isn't used anywhere. Possible candidate for deprecation?

There's only one instance of extra_after, and that's in Memberlist.controller.php. No other files appear to use it anywhere, AFAICT.

ETA: Here's a thought. If these aren't being used except for the added memberlist shiz, is it even worth keeping them? Much less hassle on mobile if they aren't there. The stuff on the memberlist could just be generated as part of the standard anchor, if you think it's necessary to have it at all.
Master of Expletives: Now with improved family f@&king friendliness! :D

Sources code: making easy front end changes difficult since 1873. :P