Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.0] [frontend-template] Add sticky site name #27549

Closed
ghost opened this issue Jan 16, 2020 · 17 comments
Closed

[4.0] [frontend-template] Add sticky site name #27549

ghost opened this issue Jan 16, 2020 · 17 comments

Comments

@ghost
Copy link

ghost commented Jan 16, 2020

Is your feature request related to a problem? Please describe.

Site name disapears if scrool down

Describe the solution you'd like

Add sticky site name that allows to remain in view when then scrooling down

Additional context

Joomla 4 Cassiopeia Default Frontend template

@brianteeman
Copy link
Contributor

This can easily be done by a site owner. It doesn't need to be in core

@ghost
Copy link
Author

ghost commented Jan 16, 2020

Add sticky site name can't be done easily by site owner. This can easily be removed by a site owner. It should be in core Default Frontend template

@brianteeman
Copy link
Contributor

That is your opinion and you are welcome to it. As stated to you before we are note here to build your website for you. If you want to contribute the code as a pull request then it will of course he reviewed

@ghost
Copy link
Author

ghost commented Jan 16, 2020

That is your opinion untill you define what in joomla "easily" means. Brian this is fact that this can't be done easily by joomla site owner. WordPress does it out of the box for site owner, but in joomla site owner needs to contribute the code ...

@brianteeman
Copy link
Contributor

as we said to you before. joomla is not wordpress.

@joomla-cms-bot
Copy link

Set to "closed" on behalf of @brianteeman by The JTracker Application at issues.joomla.org/joomla-cms/27549

@ghost
Copy link
Author

ghost commented Jan 16, 2020

as we said to you before joomla 4 is decades behind wordpress and joomla 4 may never reach beta version

HAHAHAHA brian if you close all issues that you dont like no one will contribute the code

@infograf768
Copy link
Member

infograf768 commented Jan 17, 2020

This css would work in Chrome, Firefox, Safari (on Macintosh)

.site-grid .container-header {
      margin-bottom: 20px;
      position: -webkit-sticky;
      position: sticky;
      top: 0; }

I have no idea if it would work or not in other browsers. Maybe we would need some js.
It's not a bad idea to add this to Cassiopea. Remains to find a volunteer to submit a PR.

I see no reason to close this issue.

[Edit] I see there is also a polyfill for sticky https://github.com/wilddeer/stickyfill which would take care of non compliant browsers. As we are here in a very simple case i.e. a simple top <div>. I guess it could be used.

@mbabker
Copy link
Contributor

mbabker commented Jan 17, 2020

Here’s the thing. Templates are opinionated in design. They don’t have to be a Swiss Army knife of tools where every imaginable thing is supported out of the box, that’s how you get bloatware template frameworks and CMS’ where the admin screen has 127 different options to configure a frontend screen. So yeah, some core templates in some CMS’ might have sticky header support because they were designed with it in mind. Cassiopeia wasn’t, and that’s perfectly OK.

@ghost
Copy link
Author

ghost commented Jan 17, 2020

Here’s the thing. Without sticky header support Cassiopeia Joomla 4 is outdated CMS template. If joomla 4 dvelopers wants joomla 4 Cassiopeia template to be decades behind, and that’s perfectly OK, then you should not use @infograf768 code.

If joomla 4 dvelopers wants joomla 4 Cassiopeia template to not lag behind other cms then you should use @infograf768 code.

@mbabker
Copy link
Contributor

mbabker commented Jan 17, 2020

We all know what they say about opinions 😉

You might think that a sticky header is such a critical thing that a CMS that doesn't force it on you out-of-the-box is "decades behind", but I personally can count on one hand the number of sites I have launched (either brand new or as a redesign) over the last decade that have included a sticky header; that would be 3 websites. You might like the option, I'm personally indifferent to it. But I don't think that one person's design tastes need to mandate that every template be designed with a certain feature available, even if the presence of said feature collides with the design decisions of the template (because let's be realistic here, you would practically have to have a secondary design of the Cassiopeia header if not the full template if you wanted to support a sticky variation of the header).

@ghost
Copy link
Author

ghost commented Jan 18, 2020

Without sticky header support Cassiopeia Joomla 4 is outdated template. Sticky header is such a critical thing out-of-the-box this decade. Mbabker let's be realistic here Brian said this can easily be done and @infograf768 provided code.

@infograf768 contributed the code here. Big thank you.

Who is responsible for Cassiopeia template? Who can contribute the code as a pull request?

@mbabker
Copy link
Contributor

mbabker commented Jan 18, 2020

Who can contribute the code as a pull request?

If you think it is such a critical thing, you or anyone else who desires such a feature can propose a pull request. It is not a single person’s responsibility to write code for a feature.

Even if said feature does not exist in core, the CSS has been given to you to add it to the template if you so decide. I wouldn’t use that though because as I hinted at the design of the header might not be suitable to just throw some sticky code at it, a properly designed sticky header may call for major design changes which may or may not be in the scope of the template, in which case you are free to use another template which suits your design tastes and implements support for such a critical feature that no website should be built without it.

@ghost
Copy link
Author

ghost commented Jan 19, 2020

mbabker I am proposing pull request, but have 0 access in this repository to make pull request, as you see brian asked for the code and he got the code.

So no one in joomla developers knows who in joomla is responsible for Cassiopeia template? Who can contribute the code as a pull request here?

@infograf768
Copy link
Member

infograf768 commented Jan 19, 2020

@mbabker

a properly designed sticky header may call for major design changes which may or may not be in the scope of the template

TBH, it looks that the way the template is designed AND as this concerns a unique element which includes header, the css works OK and has no further impact . Here I modified it a bit to cope with Chrome margins, i.e. I used

    .site-grid .container-header {
      margin: 0 0 20px 0;
      position: -webkit-sticky;
      position: sticky;
      top: 0; }

It's OK at any window size. A template parameter could modify the css when desired (and would be necessary).

I'm not saying it should be done, but just it could be done.

Cassiopea has more important problems which I discovered while testing this.
See #27565 for example.

@ReLater
Copy link
Contributor

ReLater commented Jan 19, 2020

Even if I'm not a friend of this feature:

@Milglius

I am proposing pull request, but have 0 access in this repository to make pull request

(Nearly) the whole world has access and can send pull requests to the active branches of this repository. In this case branch 4.0-dev.

@infograf768
Copy link
Member

Made PR to use if desired.
#27579

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants