graphlab-fr / cosma

Cosma is a document graph visualization tool. It modelizes interlinked Markdown files and renders them as an interactive network in a web interface.
https://cosma.arthurperret.fr
GNU General Public License v3.0
121 stars 5 forks source link

Is there a good way to embed a cosmoscope? #105

Open ghost opened 8 months ago

ghost commented 8 months ago

Which part of Cosma is your request about?

Describe your request:

I tried displaying it in an iframe, and that works, but the layout is ill suited for it. I wish I could just embed the main graph part and hide the controls. Is there a way to do that? Or something similar (like deleting parts of the cosmoscope.html file)?

This is a SUPER cool tool. Way to go Cosma team.

Thanks!

infologie commented 8 months ago

@certainlyNotHeisenberg An immediate, easy solution: you can use custom CSS to permanently hide things.

aside#menu-container,
button#close-left-side,
div.graph-controls {
  display: none;
}

or the left panel and its button but keep the graph controls:

aside#menu-container,
button#close-left-side {
  display: none;
}
div.graph-controls {
  left: 4rem;
}
css_custom: styles.css

But this gets me thinking: we could add an option to have the Menu panel hidden by default, something like this:

hide_menu_by_default: true

This would allow you to embed a cosmoscope with the Menu hidden but still have the option to quickly toggle it if needed.

Anyway, tell me if this helps!