Closed JazzTp closed 7 years ago
Just taking a look here at this issue you mentioned in the other thread - your approach actually looks reasonable to me, and preferable to anything fancier that requires JavaScript or such (the point of a static webpage is to be simple and responsive on even basic clients). It may be good to rename the anchor #content
for clarity.
It would still be nice to figure out a way to only use these sorts of links when actually necessary (i.e. when in the compressed mobile layout), but that would probably require heavier scripting. I believe that right now the dynamic layout is purely CSS based (e.g. https://github.com/zyro/hyde-x/blob/master/static/css/poole.css), but I don't know of a way to address this issue with just CSS. Then again, it may be possible (CSS is scarily featureful these days).
@soycode we ended up talking in the other thread, agreed anchor name "content" instead of "pagetop".
Let me add here:
It would still be nice to figure out a way to only use these sorts of links when actually necessary (i.e. when in the compressed mobile layout), but that would probably require heavier scripting.
Yes, probably, while the simple fix max-height in css + anchor in html even acts "on the fly" when resizing the browser window.
agreed anchor name "content" instead of "pagetop"
@soycode, I'm changing the anchor name to "content" but I'm leaving remarks with the word "pagetop", I checked before replacing and noticed that when wanting to locate occurrences the word "content" appears in a lot of places... well if one includes any kind of resouces when scanning... Not so if one simply takes into account that it's only html files we are interested in, when searching. Actually, I have one special partial which places the anchor, a few other partials calling that one, and only two partials actually referring to the #anchorname.
Hi,
First of all: thanks to you and to all the ones who contributed to this port of such a beautiful theme.
I have implemented a quick and dirty solution to this minor issue: when in portrait mode (typical when navigating with a smartphone), after tapping/clicking into one of the sidebar menu links, the sidebar is still visible with no apparent changes, it's not evident that loading has finished and manual scroll down is necessary.
I modified a few files to add an anchor named pagetop, the old style (I'm putting my web dev knowledge a bit up to date during this process, but I really have to postpone any deeper learning ATM, so admittedly I don't know if it should be "sanitized", and I suspect it might be deprecated or banned in html5).
(You'll notice that my header in partials is split in two, I need to add code for jQuery lightgallery inside the header only in a certain type of single rendering.)
If you want to check how this quick fix works, this is my website http://www.nicolabernardelli.com/
In landscape mode there should be no visible difference, apart the less pretty URLs.
I'm not submitting a pull request because I'm sure you would prefer a more elegant solution not making URLs less pretty, like a java powered animation showing a very fast scroll down after loading finishes. (Besides, I'm not even sure that a solution is not already there and I'm just missing it, also considering that I cloned the repo a couple of weeks ago and changes have been merged since.)
However, just to clarify, here are separate diff files for the theme folder and the resulting public folder content (NO CHANGES to the content folder and nothing at all in the main layouts folder, all layouts are inside the theme tree):
THEME
Resulting public/ folder
Cheers! JazzTp