Code Monkey home page Code Monkey logo

indexmd's People

Contributors

vsharapov avatar

Watchers

 avatar  avatar

Forkers

swagatikabehera

indexmd's Issues

Set target file fia GET argument

Currently the target file is chosen by this line:

readme = 'README.md'

But I'd rather this be a default, overridden by a GET argument like ?target.md=other.md for example

Maybe this could be bundled into settings - with a note not to make it persistent, so you could navigate to a different document by typing into a text field inside the settings widget.

Readable improvements

Probably wrap the whole thing in a centered <div> and If there's some way to increase all font sizes, that would be a neat trick.

Header links

Headers should be a name="" links, maybe there's a Markdown parsing option? Maybe manually?

Links in first element

Should replace .innerHTML with .innerText when setting title, other wise you get <a href... ugliness.

Better dark theme link formatting

Currently links are inverted, dimmed to 50% and inverted again. Why not just brighten to 200% you ask? #0000FF times 2 is still #0000FF, but if you start with #0000FF -> invert -> #FFFF00 -> ×½ -> #808000 -> invert again -> #8080FF.

Anyway, I noticed this on MDN: https://developer.mozilla.org/en-US/docs/Web/CSS/filter-function/hue-rotate()
Might get better results 🤷 currently overlapping lonks and code blocks get their background brightened:

[li`code`nk][1][link][1] `code`

Background color for <code> elements

element {
    background-color: #7777;
    padding: 2px;
}

This ↑ looks good for small spans, but has clunky overlap when they're near. Adding the same to <pre> doesn't help. Gotta think of something elegant.

Links in lists after checkboxes misrender

Try something like:

- [named link 1][1]    
- [x] [named link 2][2]

First line is rendered fine, one with the "checkbox" has a weird looking citation format, which is a graceful failure, but still.

Markdown options

Currently no options are used, and that's fine, but it would be nice to += a bunch of common options, one per line, and comment it out. Enabling those common options becomes as easy as uncommenting those lines.

Print formatting

When printing from dark mode the result is grey-on-white text (and I think that's the browser offering mercy, it's probably white-on-white otherwise).

Needs to be fixed with @media print.

Raw rendering still shows images

...and possibly other HTML elements?
Wrapping everything in a <pre> doesn't stop this, adding the following line creates an image that still renders:

<img src="https://dummyimage.com/13x7/f/0.png&text=png" alt="External via inline HTML" />

I think there's a more foolproof way - google "CDATA raw html".

Persistent settings

I think settings should cascade like so:

  1. Set in current session
  2. Retrieved from GET parameter
  3. Retrieved from localStorage
  4. Defaults

Raw text option

Should easy - just adding another menuOption:
parser: {"markdown": true, "raw": false}

If you have a <pre> and you set the innerText (instead of innerHTML) ... will it automagically turn carets into &lt;&gt; ? 🤷
Worth a try.

Font-family toggle

Would be nice to have a font-family toggle [serif|sans-serif|monospace] for readability preferences

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.