Skip to main content
Topic: Something different: recent posts at top of board index. (Read 6406 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Something different: recent posts at top of board index.

This is something I just whipped up, after grumbling at Ema about mentions stuffz. :D

So after throwing a browser override at the mentions button I had an idea: why not use browser overrides to put recent posts at the top of the page where they're easy to find? So I did. Pic attached. Code looks like this:

Code: (Firefox or Pale Moon - userContent.css) [Select]
@-moz-document domain(ElkArte.net) {
#main_content_section {
position: relative;
}

#category_1 {
padding-top: 195px;
}

#recent_posts_content {
position: absolute;
top: 0;
width: 100%;
}
}

Quite nifty. If anyone wants recent posts at the top, that's how you do it. I had to play around with it a bit because some things you'd think would work didn't, presumably because the override stuffz is a bit buggy in implementation.

Obviously this also opens up the possibility of using this layout as part of a theme variant, if anyone wanted to.

Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: Something different: recent posts at top of board index.

Reply #1

I don't like the overly big padding, but I figure it's just for taking a peek on how it would look like ;D
~ SimplePortal Support Team ~

Re: Something different: recent posts at top of board index.

Reply #2

Nope. If you want to do it just with CSS changes, without touching the markup, you need the big padding to shunt the first category down the page. Otherwise the absolute positioning on the recent posts block means it will just sit on top of the first category and hide several boards.

There are bigger paddings or margins in some areas of Elk's code already (like menu positioning with javascript disabled). It's just a padding. Don't worry about it.
Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: Something different: recent posts at top of board index.

Reply #3

But wouldn't it alter if you change resolution? After all, height changes as well, resolution-wise.
~ SimplePortal Support Team ~

Re: Something different: recent posts at top of board index.

Reply #4

Well sure, if you go to a very narrow width, but you could deal with that by adding stuff to media queries. Same way you always do responsive. I just did this for my monitor so didn't worry about extra stuff.
Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: Something different: recent posts at top of board index.

Reply #5

Come to think of it, if doing this as part of a theme variant you could use media queries, but if doing this as an in-browser override for an existing site it doesn't matter, because the userContent.css file is device-specific (or browser-installation specific if you want to call it that) anyway. So res should be constant, unless you happen to be switching from landscape to portrait all the time.
Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: Something different: recent posts at top of board index.

Reply #6

Nice! :D
Bugs creator.
Features destroyer.
Template killer.

 

Re: Something different: recent posts at top of board index.

Reply #7

Ah yeah, I figured those then :) Thanks anyway!
~ SimplePortal Support Team ~


Re: Something different: recent posts at top of board index.

Reply #9

Yeah, I know you can do it by hacking the markup. I've done that before. ;) This time it's just a CSS trick. No markup changes.

Incidentally, your one has validation errors. You shouldn't use the same ID for the two "info centres".
Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: Something different: recent posts at top of board index.

Reply #10

Damn! Any hint on fixing this? Use a different ID, not matter which? :-[

If you'll edit your CSS code so the topics are listed instead of the posts I am honoured to use it! But I don't think this is possible only with CSS, right?  :)

Re: Something different: recent posts at top of board index.

Reply #11

Yeah just use a different ID. Shouldn't matter what you call it.

Does Elk have a recent topics function at all? I haven't been keeping up with everything.
Master of Expletives: Now with improved family f@&king friendliness! :D

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

Re: Something different: recent posts at top of board index.

Reply #12

Quote from: Antechinus – Yeah just use a different ID. Shouldn't matter what you call it.

Thank you!

Quote from: Antechinus – Does Elk have a recent topics function at all? I haven't been keeping up with everything.

I use an addon:

http://www.ElkArte.net/community/index.php?topic=2631.msg18763#msg18763

Re: Something different: recent posts at top of board index.

Reply #13

Can't find any add-on on that link.
Master of Expletives: Now with improved family f@&king friendliness! :D

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