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

AddGallery #114

Merged
merged 17 commits into from
Nov 14, 2024
Merged

AddGallery #114

merged 17 commits into from
Nov 14, 2024

Conversation

DavidAKopriva
Copy link
Collaborator

Add a Gallery page with plots.

Add a Gallery page with plots.
Copy link

codecov bot commented Nov 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 75.05%. Comparing base (a5f36e0) to head (4190342).
Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #114   +/-   ##
=======================================
  Coverage   75.05%   75.05%           
=======================================
  Files          68       68           
  Lines       10519    10519           
  Branches        2        2           
=======================================
  Hits         7895     7895           
  Misses       2624     2624           
Flag Coverage Δ
unittests 75.05% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Member

@ranocha ranocha left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe the cylinder flow with curved boundaries from https://www.youtube.com/watch?v=w0A9X38cSe4 and the acoustic wave scattering mesh from https://www.youtube.com/watch?v=2v5KYdK7VLA could be added as well? CC @andrewwinters5000

@DavidAKopriva
Copy link
Collaborator Author

DavidAKopriva commented Nov 8, 2024

Ah, I hadn't thought about including videos of using the meshes. Though I'm seeing that if I try to go to either of those sites I have to sign in to "prove that I am not a robot". So if that is a requirement now, then I'm not sure that I like the idea as much.

Add references to the gallery in the README and to the menu that shows up on the left. I also rearranged the menu to have the authors and license at the end.
@ranocha
Copy link
Member

ranocha commented Nov 10, 2024

I was more thinking about showing the pictures of the meshes Andrew used for the videos. But we could also consider embedding the YouTube videos in the docs. Shall I try to do this?

@DavidAKopriva
Copy link
Collaborator Author

To be honest, I think linking the videos is a great idea. I tried again just now and the videos played without requiring a sign in. I don't know what was up with that, maybe the virtual vpn or something. A section with video links in the gallery would show that the meshes can be used.

@ranocha
Copy link
Member

ranocha commented Nov 11, 2024

I copied the images to an external examples repository. We can delete them from this branch to keep this repository smaller.

@ranocha
Copy link
Member

ranocha commented Nov 11, 2024

We should consider adding smaller versions of the images to the example repo - some are quite large and take quite a while to load.

@ranocha
Copy link
Member

ranocha commented Nov 11, 2024

This is how the local docs version looks on my system. This is not exactly what is intended, is it?

Screenshot 2024-11-11 at 13 06 03

@ranocha
Copy link
Member

ranocha commented Nov 11, 2024

I have reduced the image sizes to decrease latency when loading the website. I have also added alternative formatting at the very end with a headline stating the title and contributor, followed by the picture of the mesh and, optionally a video. We could also consider adding more links there, e.g., to the control files etc.

Screenshot 2024-11-11 at 13 48 23

@DavidAKopriva
Copy link
Collaborator Author

My markdown editor is showing what I expect, so I am at a loss on why you are getting a single column and the comments are visible.
grab0

@DavidAKopriva
Copy link
Collaborator Author

DavidAKopriva commented Nov 12, 2024

I also just checked and exported the gallery from my markdown editor to html, which, when displayed by safari, reproduces the picture above. It seems that the markdown that GitHub uses doesn't accept html commands? Or it ignores "div" since the two columns are not produced? Interesting... putting "div" in brackets <> here doesn't print.

@DavidAKopriva
Copy link
Collaborator Author

Looking at Google's docs, https://github.github.com/gfm/#html-blocks, the html should be recognized and two columns should be produced.

Fix multiple the column issue by including html comment markers in for the comments in the div's.
@DavidAKopriva
Copy link
Collaborator Author

DavidAKopriva commented Nov 12, 2024

OK, I fixed that formatting issue. Still would like to know how to add captions. I guess I would know how to do that if I knew how to incorporate css into the markdown file.

@ranocha
Copy link
Member

ranocha commented Nov 13, 2024

The markdown files are not served directly but are processed by mkdocs, see https://trixi-framework.github.io/HOHQMesh/building-the-documentation/. That's why it can look different from what you get from a markdown editor. In particular, the output does not necessarily look like what you get with GitHub formatted markdown.

Comment on lines +61 to +62
extra_css:
- css/video.css
Copy link
Member

@ranocha ranocha Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you want to use new css, you can add a file here...

Copy link
Member

@ranocha ranocha Nov 13, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

... and add the file to this folder similar to this one. This should work and give you access to CSS in the generated html output.

@sloede
Copy link
Member

sloede commented Nov 13, 2024

I added a CSS-based approach for the captions in 1d82a2e. This is what it looks like for me:

Exterior domains
image

Coastlines
image

If you like it, you can throw out the original code and use the div/figure/figcaption based approach also for the rest of the gallery.

@DavidAKopriva
Copy link
Collaborator Author

Thanks Michael, this is what I had in mind. I just didn't know how to hook up the css. I'm thinking of changing the format of the captions now that I see them. I think description (contributor) will look better.

@andrewwinters5000 andrewwinters5000 mentioned this pull request Nov 13, 2024
2 tasks
@andrewwinters5000
Copy link
Member

Maybe the cylinder flow with curved boundaries from https://www.youtube.com/watch?v=w0A9X38cSe4 and the acoustic wave scattering mesh from https://www.youtube.com/watch?v=2v5KYdK7VLA could be added as well? CC @andrewwinters5000

I like the idea of adding video links as well. It shows the meshes "in action" and offers possibility for immediate additions to the gallery, e.g., the Malpasset test once we get the Shallow water package released.

Change all the div's to be the css versions for two column display plus captions. Change the captions to be of the form `caption (contributor)'. Change the video section name to "Applications".
Fix a reference/caption
@DavidAKopriva
Copy link
Collaborator Author

DavidAKopriva commented Nov 13, 2024

I think we have a good starting point for the gallery. I've edited the gallery page file to use the new div classes and edited the captions. Looks pretty good, imo. I edited the comments at the top of the file for the formats. Before merging the hohqmesh-gallery directory needs to be removed. Those file appear to be in the new GitHub repo with the examples. Thanks to everyone for their contributions.

@ranocha
Copy link
Member

ranocha commented Nov 14, 2024

I removed the hohqmesh-gallery directory and added more links to videos.

@sloede
Copy link
Member

sloede commented Nov 14, 2024

Thanks Michael, this is what I had in mind. I just didn't know how to hook up the css.

No worries. And to be honest, I don't either - I actually had ChatGPT draw up all the required CSS for me (it seems to be quite HTML savvy... 😉)

@DavidAKopriva
Copy link
Collaborator Author

I just took a look at the new gallery page and it looks good to me. Thanks, Hendrik for the additional video links. Are we ready to merge?

@ranocha
Copy link
Member

ranocha commented Nov 14, 2024

This PR is ready to be merged from my point of view 👍

Copy link
Member

@andrewwinters5000 andrewwinters5000 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Everything looks good from my end. Thanks so much for your help @ranocha !

@andrewwinters5000 andrewwinters5000 merged commit d4a68d9 into main Nov 14, 2024
21 checks passed
@andrewwinters5000 andrewwinters5000 deleted the Gallery branch November 14, 2024 18:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants