Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
1 of 4 tasks
ghost opened this issue Jan 18, 2024 · 1 comment
Open
1 of 4 tasks

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

ghost opened this issue Jan 18, 2024 · 1 comment
Labels
enhancement Feature requests

Comments

@ghost
Copy link

ghost commented Jan 18, 2024

Which part of Cosma is your request about?

  • command-line interface
  • cosmoscope (HTML file)
  • documentation
  • other

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!

@ghost ghost added the enhancement Feature requests label Jan 18, 2024
@infologie
Copy link
Contributor

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

  • First create a CSS file, you can name it however you want, e.g. styles.css.
  • In the file, add declarations where you select things you want to hide. If you want to hide the left panel (Menu) and graph controls:
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;
}
  • In your config.yml, add the path to that file:
css_custom: styles.css
  • Run cosma modelize --custom-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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Feature requests
Projects
None yet
Development

No branches or pull requests

1 participant