xoops forums

ghia

Community Support Member
Posted on: 2018/2/10 8:06
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#1

xSimplegrid

I'm using xSimpleGrid for a website and I have a problem with anchors (local or page links eg. https://xoops.org/modules/newbb/viewtopic.php?post_id=363459#363459 ).
Just like the theme here on xoops.org it contains a fixed header on top of the page with logo, menu, etc.
The content scrolls under and you can see it in low intensity passing under.

My problem with these page links as in the above example, is that the browser aligns the anchor on the top of the window and as such the first part get hidden under this fixed header.
Users don't see the relevant content at all or must scroll up to read it.

You see it here also when you click on a local link of a post from the forum.

Is there a way to get the content aligned to under the bottom of the header?

Mamba

Moderator
Posted on: 2018/2/10 10:19
Mamba
Mamba (Show more)
Moderator
Posts: 10797
Since: 2004/4/23
#2

Re: xSimplegrid

I don't know how the menu header in xSimpleGrid works, but if I remember correctly, in xBootstrap, we manipulated it with "offset" in the headhesive.js

Check out xBootstrap, or the original Headhesive: https://github.com/markgoodyear/headhesive.js/tree/master

and see if it can help...
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

ghia

Community Support Member
Posted on: 2018/2/10 13:01
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#3

Re: xSimplegrid

No, xBootstrap is not used in xSimple.

(But here on xoops.org, the offset seems also not set.)

Mamba

Moderator
Posted on: 2018/2/10 14:24
Mamba
Mamba (Show more)
Moderator
Posts: 10797
Since: 2004/4/23
#4

Re: xSimplegrid

I know that it's not used, I was only suggesting that maybe you could use a similar approach as in xBootstrap.

Sorry, I couldn't be of more help...

Maybe Bleekk can help....
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

Mamba

Moderator
Posted on: 2018/2/10 15:35
Mamba
Mamba (Show more)
Moderator
Posts: 10797
Since: 2004/4/23
#5

Re: xSimplegrid

FYI - I've tried to replicate that but I couldn't . In my case it went directly to the first post in the thread.
But I was using the upcoming NewBB 5.0 Alpha on XOOPS 2.5.9 and PHP 7.2.2, so maybe this was the reason.
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

ghia

Community Support Member
Posted on: 2018/2/10 16:32
ghia
ghia (Show more)
Community Support Member
Posts: 4954
Since: 2008/7/3 1
#6

Re: xSimplegrid

To replicate, click here in this thread in second post on #2

goffy

Quite a regular
Posted on: 2018/2/10 17:54
goffy
goffy (Show more)
Quite a regular
Posts: 376
Since: 2010/12/27
#7

Re: xSimplegrid

Hi

you have 2 possibilities:
1) add a margin before each posting with the same height as your menu. This is not beautiful, but simple
2) add a js for scrolling. search for a code where you can set scroll speed, offset,...
e.g.
$('html, body').animate({scrollTop: $('#contact').offset().top -100 }, 'slow');

brutalicuss

Not too shy to talk
Posted on: 2018/2/11 8:39
brutalicuss
brutalicuss (Show more)
Not too shy to talk
Posts: 128
Since: 2012/6/9 1
#8

Re: xSimplegrid

Hi ghia, I dont understand very well your question (my pretty eng haha), but I guess that you mean that header height is too big and hidding the content. If Im right, you can see how I did "fix" it in one of my production site with xsimplegrid theme

If you want, send me (u can PM also) your site, poin me hte problems and Ill surely help you :)
Also, you sould use for 2.5.8/2.5.9 right theme, look at www.eunion.info/xoops/xsimplegrid/

Regards!

Mamba

Moderator
Posted on: 2018/2/11 10:30
Mamba
Mamba (Show more)
Moderator
Posts: 10797
Since: 2004/4/23
#9

Re: xSimplegrid

Brutalicuss, you'll need to submit your changes to the themes via a Pull Request on GitHub

I have updated the xSimpleGrid with your version 1.2:
https://github.com/xoopsthemes/xsimplegrid

and the xSimpleBlocks to 1.1.4
https://github.com/XoopsThemes/xsimpleblocks
Support XOOPS => DONATE
Use 2.5.10 | Docs | Modules | Bugs

brutalicuss

Not too shy to talk
Posted on: 2018/2/11 16:11
brutalicuss
brutalicuss (Show more)
Not too shy to talk
Posts: 128
Since: 2012/6/9 1
#10

Re: xSimplegrid

Yes I will. But first I must to make changes in xsimplegrid version with "hidding" header and footer and will upload these days :)