Comments (9)
Hello! I would like to help with ur isssue. I am still Learning, but i want to try if i could resolve our issues. So could you tell me what fragment you had mentioned? and about no scroll down you mean like making heading a link so whenever user click it will directly land to that link?
from indexmd.
Hello! I would like to help with ur isssue. I am still Learning, but i want to try if i could resolve our issues.
My first volunteer! 🎉️ Welcome @SwagatikaBehera !
what fragment you had mentioned? and about no scroll down you mean like making heading a link so whenever user click it will directly land to that link?
I think you got it - https://vsharapov.github.io/INDEXmd/#links should take you down to the heading
I remember fragment linking didn't work at the beginning - the browser tries it once after the page is loaded, but doesn't wait for the XHR request to finish and for showdown.js
to render the markdown into HTML. I think I made it work before but just noticed it's not working (at least on Firefox) and the fragment actually gets cleared. I'm guessing it's right here where location
gets set that I messed up.
from indexmd.
Thank you!
So in browser no content which you shown in https://vsharapov.github.io/INDEXmd/#links is being rendered ?
from indexmd.
Thank you! So in browser no content which you shown in https://vsharapov.github.io/INDEXmd/#links is being rendered ?
The content is being rendered, no problem there, but the browser viewport does not get taken to the "Links" section, which is the expected behavior.
I tried re-adding #links
to the address bar after everything is loaded and rendered - that seems to be functional.
I'm still pretty sure the issue is right here where location
gets set.
from indexmd.
Okay I am looking into it.
from indexmd.
Sorry for missing few days. See you have provide an id ="links" to the link section. So in order to reach their , there should be anchor tag where we had to provide that href with same id linking both. But i can't find any.
from indexmd.
there should be anchor tag
That was the case in older HTML versions @SwagatikaBehera . Current recommendation is to use the global id
attribute instead. Anchor names still work but you can test that id
works by navigating your browser to https://vsharapov.github.io/INDEXmd/#links and once the page is finished loading, navigate to https://vsharapov.github.io/INDEXmd/#links again - the viewport will move to the element with the links
value in its id
attribute. Just checked in latest Firefox and Chrome.
from indexmd.
Okay tell me how will i reach to link section without directly writing anything in URL?
One method is just scrolling and another method is clicking on some link which will navigate you to link section, but what is that link?
Their are 3 links-
Demo,
https://vsharapov.github.io/INDEXmd/?text-width=readable,
this .html file ,
& this are not which will navigate to link section.
https://vsharapov.github.io/INDEXmd/#links is actually https://vsharapov.github.io/INDEXmd/?font-family=monospace#links.
Or I am understanding wrong?
from indexmd.
Hey @SwagatikaBehera , I had a hard time understanding your last comment, so I created a fix on branch fix-setting-location
. My estimation in this comment was correct - that code would take the old location, something like https://vsharapov.github.io/INDEXmd/?font-family=serif#horizontalrules
and, having determined the settings from localStorage
which are not reflected as GET parameters, would insert them, creating a new location from location.pathname + newGetParameters
or something like "/INDEXmd/" + "?text-width=readable"
but omitting several parts:
location.protocol: "https:"
- this is carried over if your new location is relative (e.g./something
)"//"
- this is carried over if your new location is relativehost: "vsharapov.github.io"
orhostname: "vsharapov.github.io"
- this is carried over if your new location is relativeport: ""
- this is carried over if your new location is relativesearch: "?font-family=serif"
- this will actually be omitted, but then replaced fromnewGetParameters
hash: "#horizontalrules"
- this is what the bug fix patches
However, I just realized that GET parameters which do not appear in menuOptions
will still be stripped, so even with my fix, a URL such as https://vsharapov.github.io/INDEXmd/?newParameter=newValue#horizontalrules will lose the GET parameters. Since this project is meant to serve as a boilerplate for others, it's expected that GET parameters will be used, and should not be omitted. Thus I am opening a new issue to address this, feel free to try your hand at it if you think you understand the concepts and terminology after this example.
from indexmd.
Related Issues (20)
- Links in first element
- Links in lists after checkboxes misrender HOT 1
- Background color for <code> elements HOT 1
- Stop code blocks from taking up full-width
- Favicon HOT 4
- Persistent settings
- Set target file fia GET argument
- Markdown options HOT 1
- Auto theme doesn't work after init
- Raw text option HOT 1
- Better dark theme link formatting HOT 3
- Readable improvements
- Print formatting
- Default to parse:raw when showdown fails to load.
- Export as static .html HOT 1
- Render raw if showdown fails to load HOT 1
- GET parameters are stripped HOT 1
- Raw rendering still shows images
- CSS on iOS doesn't respect light/dark
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from indexmd.