Advertisement:

Author Topic: Has anyone improved /main_block.png to have transparent rounded edges?  (Read 5185 times)

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,711
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #80 on: September 10, 2019, 12:35:49 PM »
I absolutely love the banner idea!!! I think we should add a pseudo:before element, add a faint rgba black background to it, enhance it opacity, which will allow the text to popup out more. I think we should package this as a theme and let people use it as an alternative to the default theme

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #81 on: September 10, 2019, 05:40:56 PM »
Not sure what you mean with the pseudo. Maybe add it to your test copy and screenshot it. ;)
« Last Edit: September 10, 2019, 05:52:31 PM by Antechinus »

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #82 on: September 10, 2019, 07:10:43 PM »
Oh hang on, is this the sort of thing you're thinking of?

If it is, it may be a good idea for some banners, but maybe not for others, and you probably be wanting to change the background colour to match the banner and the rest of the theme anyway. You'd also not want it showing if the site was not using a full-width banner (because then it would look wrong against the default header gradients).

This is easy to do, and doesn't even require a pseudo. It's just a basic rgba background on the #siteslogan div. But it's something that IMO would be best left as a custom tweak, rather than being in the CSS by default.

Incidentally, while playing with this I got sick of looking at the default upshrink icon (too blurry, even on desktop without Retina) so whipped up a new one in PS (5 minute job). This is sized 80x80 but scaled to 22x22 in the CSS. Approximately 1.55kb as opposed to the original images' 0.65kb. Not that I'm up for doing every icon in SMF, but these two were worth doing. I've attached them too. Just be sure to scale them in your CSS:

Code: [Select]
#upshrink {
width: 22px;
/* Plus whatever other declarations you want to use. */
}
« Last Edit: September 10, 2019, 07:21:03 PM by Antechinus »

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,711
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #83 on: September 11, 2019, 12:45:49 AM »
Not sure what you mean with the pseudo. Maybe add it to your test copy and screenshot it. ;)

The pseudo element :before is placed on the class that displays the banner. It'd have an effect that's similar to this: https://codepen.io/anon/pen/avdsi

Furthermore, the slogan as it appears in the screenshot looks very nice too!

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #84 on: September 11, 2019, 01:00:14 AM »
Can't see the point of that pseudo, or at least not for this application. All it's doing is displaying a background image. If you're going to be making a custom banner anyway, presumably you will be choosing how that banner is made, yes?

So text, contrast, saturation and whatever else will be chosen so it looks right anyway. If you want a similar look to that Codepen example, you simply make a banner that looks like that. Done and dusted. :)

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,436
  • Gender: Male
    • Kindred-999 on GitHub
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #85 on: September 11, 2019, 09:56:52 AM »
you gonna drop a new zip? :P
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 71,426
    • StoryBB/StoryBB on GitHub
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #86 on: September 11, 2019, 12:26:51 PM »
:drool:
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,711
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #87 on: September 11, 2019, 01:43:32 PM »
Actually, before you do package it, noticed an issue.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #88 on: September 11, 2019, 06:39:44 PM »
Before I package it, I noticed several issues. :D But ok, tweaked that one too, which enabled me to rationalise some CSS while I was at it.

Speaking of which: the sidebar flyouts and the drop menus share the same eye candy CSS, so there's no need to declare it twice. I can amalgamate a fair whack of stuff there, which will both save code and ease customisation. I've also had a couple of other minor ideas in that department (ie: anchor sizing on hover vs focus can be made a bit easier).

The main thing at the moment though is that I've been testing the theme with that page index mod installed, because really I think that will be the sanest option for general usability. But in doing that I have, of course, had better ideas on how to code the mod itself. CSS can be reduced, and made more stable at the same time, and I think I have it looking quite a bit better on Curve.

I'm seriously thinking of making that mod a requirement for this beast, because I'm really not keen on having to figure out presentation for two different page indexes, particularly when one of them will be pretty much useless for the intended users and is a mongrel to style anyway. It seems a bit bonkers.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,711
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #89 on: September 11, 2019, 09:22:00 PM »
Looking forward to the next beta release. The awesome thing about designing a theme is that you're never really done; there's always something that can be made to look better.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #90 on: September 11, 2019, 11:15:08 PM »
Ha! That's the worst thing. :D

Anyway, have got the menu CSS rationalised. Have also put a warning for newbies:

Code: [Select]
/* Standard dropdown menus: main, admin, profile, etc. */
/* Here be dragons!! It is recommended that you do not */
/* touch most of this. Changing colours is fine though.*/
/*---------------------------------------------------- */

Which will obviously be ignored by the more determined and adventurous among us, but I thought it was worth telling those who need to know. ;)

Had another (probably too clever for its own good) idea about banners too. Recoded the h1 and associated anchor to this:

Code: [Select]
<h1 id="forum_title" ', empty($context['header_logo_url_html_safe']) ? '><a href="'. $scripturl. '">' .$context['forum_name']. '</a>' :
'class="image_banner"><a href="'. $scripturl. '"><img id="forum_banner" src="' . $context['header_logo_url_html_safe'] . '" alt="' . $context['forum_name'] . '" /></a>', '
</h1>

Which, if you can't be bother deciphering it at the moment, simply appends a class to the h1 if there is an image banner being used. That then allows doing this sort of thing in the CSS:

Code: [Select]
.image_banner a::before {
display: block;
position: absolute;
top: -2px;
left: -2px;
z-index: 1;
color: #eee;
font-size: 2vw;
content: "Testing pseudo element title";
text-shadow: 0 0 1px #000c, 1px 2px 2px #000a, 2px 4px 3px #0008;
}

Which results in the effect seen in the attached screenshot. It's a way of getting custom text as part of your banner and its link, without needing to be any good at image editing. The text shrinks with the banner, because the font-size is set in vw (1vw = 1% of viewport width).

Might be useful for someone, sometime, although obviously they'd have to know at least some CSS. I wouldn't have it as part of the functioning default CSS, but can comment it out and leave it as an example.

The hold up at the moment is the page index mod. I just tried uninstalling it and it left behind a functioning "next page" link as a massive fixed bar at the right side of Display.template.php. So that's no good. :P I'll have to leave the theme alone for a bit and sort through the mod coding for a few hours. Once that's done, another beta (with associated page index mod) should appear. :)

Online shadav

  • Jr. Member
  • **
  • Posts: 141
  • Gender: Female
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #91 on: September 12, 2019, 12:02:03 PM »
*sneaks into the topic, don't mind me, I'm just following this, though slightly confused, great work*

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #92 on: September 12, 2019, 04:33:20 PM »
No worries. Feel free to ask questions if there's anything you're curious about. :)

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #93 on: September 13, 2019, 12:17:23 PM »
Meh. Bloody themes. Whose idea was this anyway? :P

I've got the board index and message index sorted the way I want them. Very simple coding, totally bulletproof, and a clean look that stays aligned and tidy at any width.

The entire tables in both case are declared as block display to break the rows and cells free of table restrictions. Board index icon cells are floated left, set to a fixed 72px on the more spacious screens. The two icon columns on the message index are (yep, you guessed it) also floated and are set to 36px each. Stats cells are absolute positioned to the right, set to 18% width.

Info/subject cells just sit between to those, with a 67px margin on the left (+5px padding that stays on all resolutions) and a 21% margin on the right (21% to give it a bit of leeway when things start scrunching). Needs hardly any media query tweaking for narrow screens. Just drop the stats cells and board descriptions, drop one icon column off the message index, tighten up the board index icon cells to 50px, set the remaining message index icon column to match that, and adjust the margins on the info/subject cells. Sorted. :)

Display template still needs a bit of tweaking for buttons arrangements and spacings. The default is too crowded with crap. :P I'm going to remove the (rarely used) next/previous topic buttons from the top of the page, and just have the page index and the "go down" link with the standard buttonlist.

At the bottom of the page do it the other way: remove the standard "go up" link (because there's a global one in the footer anyway) and have the next/previous topic buttons down here. I'll amalgamate them into one long bullet, like the page index, to save a bit more width. May also trim the width of the page index slightly. I'm also shunting the moderation buttons, jump-to and linktree down out of the way to keep the button area less cluttered. Should be better for all-round usability.

So yes, a bit more bug fixing (keep finding them :P) and then will do another zip.

Offline Kindred

  • The Mean One
  • Support Specialist
  • SMF Legend
  • *
  • Posts: 58,436
  • Gender: Male
    • Kindred-999 on GitHub
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #94 on: September 13, 2019, 12:24:08 PM »
I forget, are you packaging this as a separate theme or as a mod to apply on top of Curve, like the original one?
Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

Offline Bloc

  • Full Member
  • ***
  • Posts: 475
  • Gender: Male
    • bloc67 on GitHub
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #95 on: September 13, 2019, 03:15:00 PM »
Meh. Bloody themes. Whose idea was this anyway? :P

I've got the board index and message index sorted the way I want them. Very simple coding, totally bulletproof, and a clean look that stays aligned and tidy at any width.

The entire tables in both case are declared as block display to break the rows and cells free of table restrictions. Board index icon cells are floated left, set to a fixed 72px on the more spacious screens. The two icon columns on the message index are (yep, you guessed it) also floated and are set to 36px each. Stats cells are absolute positioned to the right, set to 18% width.

Info/subject cells just sit between to those, with a 67px margin on the left (+5px padding that stays on all resolutions) and a 21% margin on the right (21% to give it a bit of leeway when things start scrunching). Needs hardly any media query tweaking for narrow screens. Just drop the stats cells and board descriptions, drop one icon column off the message index, tighten up the board index icon cells to 50px, set the remaining message index icon column to match that, and adjust the margins on the info/subject cells. Sorted. :)

Display template still needs a bit of tweaking for buttons arrangements and spacings. The default is too crowded with crap. :P I'm going to remove the (rarely used) next/previous topic buttons from the top of the page, and just have the page index and the "go down" link with the standard buttonlist.

At the bottom of the page do it the other way: remove the standard "go up" link (because there's a global one in the footer anyway) and have the next/previous topic buttons down here. I'll amalgamate them into one long bullet, like the page index, to save a bit more width. May also trim the width of the page index slightly. I'm also shunting the moderation buttons, jump-to and linktree down out of the way to keep the button area less cluttered. Should be better for all-round usability.

So yes, a bit more bug fixing (keep finding them :P) and then will do another zip.

Yeah, whose idea was that heh :D

Seriously, when you dive into it, it quickly becomes apparent that current 2.0 theme codebase has quite a few obstacles for making it mobile-ready. Though you've done an excellent job in solving them, theres still that feeling that you should just rewritten the whole thing. At least thats what I feel when working through it..but I guess thats half the "fun" too, to persevere even then. :D

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #96 on: September 13, 2019, 07:38:59 PM »
I forget, are you packaging this as a separate theme or as a mod to apply on top of Curve, like the original one?

Only makes sense as a separate theme, or as a bunch of templates and css files that anyone can drop into the default folder (same result). Yes, I will make sure they are coded safely enough to do the latter. Been there before. ;)

But, I will package up that page index mod to go with it. Been thinking about that too, and have made the entirely out of character decision to do it the sensible way. I'll just code it to replace the page index function itself, with no attempt to clean up templating. This will vastly reduce the amount of code required compared to a theoretically perfect solution. Existing templates will just call the select/anchors/wrapper where they currently call the string of tiny numbers. I'll provide CSS so that little bullet looks clean within its own boundaries, and themers or admins can do whatever else they want to do (like removing "Pages: " where it bugs them, or entirely changing the surrounding markup).

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #97 on: September 13, 2019, 07:48:48 PM »
Yeah, whose idea was that heh :D

Seriously, when you dive into it, it quickly becomes apparent that current 2.0 theme codebase has quite a few obstacles for making it mobile-ready. Though you've done an excellent job in solving them, theres still that feeling that you should just rewritten the whole thing. At least thats what I feel when working through it..but I guess thats half the "fun" too, to persevere even then. :D

It becomes an interesting exercise, as I'm sure you know. But then we both also know what happens when you decide "Oh hey, I should just rewrite the entire GUI from scratch". :P I have "scope creep" branded across my brain for this one. I want to wind it up. Soon. It is, after all, only meant to be a usable basis newbies and for further theming. I figure if it's good on board index, message index, recent, display, post and PM's then the rest of it can go suck donkey balls.

I'll give some other bits minimal tweaks where practical, but I'm not rewriting all the templating. Example: Stats.template.php. I happen to know it is possible to rewrite that to drop 91 divs and about 40 lines of CSS, without changing the looks. Have done it before. Even gave the team code for it in case they wanted it for 2.1. Am not going to bother for this beast though. Nobody ever looks at Stats.template.php anyway, so who gives a rat's? I'm sure there is still a stack of CSS that could be pruned if I went through the entire GUI in great detail, but the truth is nobody is likely to care.

Offline Antechinus

  • SMF Friend
  • SMF Super Hero
  • *
  • Posts: 24,492
  • Master of BBC Abuse
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #98 on: September 14, 2019, 07:09:51 AM »
As part of getting rid of unnecessary images I ditched that stats bar png. Frankly I've hated the look of it for years anyway. :D

So this cleaned up polls a bit, and while I was at it I did the stats template too. I just made sense to save CSS, so I did it. Hey ho.

IIRC this is more like the style Bloc originally intended it to have, before the team insisted they wanted everything with gradients and round ends.

Offline Study Force

  • SMF Hero
  • ******
  • Posts: 3,711
    • StudyForcePS on Facebook
    • @studyforceps on Twitter
Re: Has anyone improved /main_block.png to have transparent rounded edges?
« Reply #99 on: September 14, 2019, 02:58:54 PM »
Looking great. Can't wait to install!

Haven't looked @ the code yet, but the empty space after "Page 2" sort of bugs me, can that be removed?