🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: rocksolid.nodes.announce
Article #515

Re: RSLight - Thread layout for Overboard

#515
From: Retro Guy
Date: Sat, 27 Apr 2024 08:55
53 lines
5893 bytes
SugarBug wrote:

> On Fri, 26 Apr 2024 14:52:13 +0000
> Retro Guy <retroguy@novabbs.com> wrote:

>> SugarBug wrote:
>> 
>> > On Fri, 26 Apr 2024 12:18:08 +0000
>> > Retro Guy <retroguy@novabbs.com> wrote:
>> 
>> >> Retro Guy wrote:
>> >> 
>> >> > Retro Guy wrote:
>> >> 
>> >> >> I've been experimenting with an option in overboard to display recent articles by thread.
>> >> 
>> >> >> I did this in the past, but it wasn't so great, so trying again. I'm still testing, but if you want to take a look, it's running on www.novabbs.org now:
>> >> >> https://news.novabbs.org/computers/overboard.php?thisgroup=news.software.nntp
>> >> 
>> >> >> The thread vs. flat display will be a toggle in overrides.inc.php (with a default, of course)
>> >> 
>> >> >> I'm still testing, so no commit yet.
>> >> 
>> >> > I've improved the sorting, removed duplicate display of article that starts a thread, and added a toggle to display 'Thread' or 'Article' view. The toggle will remain with your session, and if you are logged in, will become your default view.
>> >> 
>> >> > Hopefully, I can add a commit later today or tomorrow. I'm still trying to find bugs, but I'm sure once I commit I'll start to find them all :)
>> >> 
>> >> Well, I got sorting sorted. HAHHAHAHA! (Yes, I'm all alone in a room and may have lost my mind)
>> >> 
>> >> Anyway, I have pushed a commit for the new overboard. If you don't create a default in overrides,inc.php, it will default to the original flat articles view. There is a toggle (radio buttons) on the overboard for a user to change that, and it will remain changed for that user.
>> >> 
<snip>

> When playing with theme ideas I noticed duplicate class names for elements in the same table row.

> In each table row, the class names of table elements repeat for the username and datebox elements. It would be much better for styling if the class names for each element were unique. For example, class='datebox_left', class='datebox_right', class='article_title', class=author_left', class='author_right', class='total_replies', etc. You can even leave the current class names in place as is, and add extra unique class names to the html output, so that they can be styled individually or as a unit. Keeping the old classes and adding new uniques alongside them would prevent breaking backward compatibility of themes.

I completely agree with this. Please understand that RSLight is the first time I had ever used css, so I was learning as I went. Both css and databases were new to me, so you can see that in the code. It does need to be cleaned up.

> Also I notice that when building the tables that each table row has alternating class names, 'np_thread_line1', 'np_thread_line2' and each of these class names is re-used in its same row. Something like 'np_thread_line_left_1', 'np_thread_line_center_1', 'np_thread_line_right_1' would make styling with CSS much easier. I think I need to separate header.inc and body html generation files then run search and replace on them and probably avoid 90% of the hand editing.

Yes, I agree with you.

> Basically the idea so that every element in a table row will have at least one class name that is unique or repeated in that row--and so that no class names used in the header and footer appear in the document body, or also the header and footer elements each have a unique class name so elements can be targeted individually there without much fuss. This allows a lot of cool CSS tricks for themes and responsive layout magic without having to resort to endless :nth-child() and selector strangeness. It would also make it much easier to use multiple web fonts with CSS to change fonts on selected elements in a theme. In my new theme I actually want to use two different fonts for table data elements that have the same class names.

I believe it is best to add the classes to css, then it can be modified in the code, if desired. We would leave all the existing classes alone for backward compat.

> Since I am working on a theme maybe I should send a patch for the php files showing what I mean regarding class names. I'm still wrapping my head around it so I'll check back in when I get time to dig in and finish the theme and test the changes before making a patch.

I think I get it, but feel free to demonstrate. It can't hurt :)

-- 
Retro Guy
Technical Details
Message-ID: <d7968ae3ed95e957c37be162d5af22e6@www.rocksolidbbs.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!news.usenet.farm!..!..!not-for-mail
References: <4db039a6015e6a7fece7506639cb5fb9@www.rocksolidbbs.com> <1b8c35def60c1b062c71e1f8ff6072c0@www.rocksolidbbs.com> <22a05f3902ca813be81d25e681a96bfa@www.rocksolidbbs.com> <1a68fb81d32ab6c32d324ba597a197e6$1@sybershock.com> <1b943eaa1aefaa6b658fcc0b500c94f4@www.rocksolidbbs.com> <e0eff98ac18b6a9abc7d218f6e66e6a6$1@sybershock.com>

Show Full Headers
Complete Article Headers
Message-ID: <d7968ae3ed95e957c37be162d5af22e6@www.rocksolidbbs.com>
Subject: Re: RSLight - Thread layout for Overboard
Date: Sat, 27 Apr 2024 08:55:21 +0000
From: Retro Guy <retroguy@novabbs.com>
References: <4db039a6015e6a7fece7506639cb5fb9@www.rocksolidbbs.com> <1b8c35def60c1b062c71e1f8ff6072c0@www.rocksolidbbs.com> <22a05f3902ca813be81d25e681a96bfa@www.rocksolidbbs.com> <1a68fb81d32ab6c32d324ba597a197e6$1@sybershock.com> <1b943eaa1aefaa6b658fcc0b500c94f4@www.rocksolidbbs.com> <e0eff98ac18b6a9abc7d218f6e66e6a6$1@sybershock.com>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!i2pn2.pugleaf.net!archive.newsdeef.eu!archive!apf2.newsdeef.eu!news.usenet.farm!..!..!not-for-mail
Newsgroups: rocksolid.nodes.announce
Organization: RetroBBS
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Info: i2pn2.org;
 logging-data="2508327"; mail-complaints-to="usenet@i2pn2.org";
 posting-account="fYz127kbt+aT6hju4qlokPsE7yMfXI8TzBbT9UvcPrk";
User-Agent: Rocksolid Light
X-Rslight-Site: $2y$10$DdUtFQOJvLkBf./e6A9xD.P96m8VzhWm/CtuXOSFHjNXeptKZglGa
X-Rslight-Posting-User: 470b25edab282a455f83b37c76e8728963cc19ae
X-Face: .&YR-G(w(DZ$$,}%k=]*5*!p'=(anr"IT`wZG'2VWdfl\r)l[42u7JH`n(JUQ*e5*A|XCDf
 ?&\X&uwkl38"CYX3O8m}C8E4p'%N$2#kSTVzx{Ly|DjLT\Vk7NE}NQ(VC$Yq]i:7|z[.9iv^g>*8_B
 H0=hZt'[%)4kG|
X-Spam-Checker-Version: SpamAssassin 4.0.0