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

feature: Navigation icon for the coverage page #10

Open
NikosAlexandris opened this issue Jan 30, 2024 · 2 comments
Open

feature: Navigation icon for the coverage page #10

NikosAlexandris opened this issue Jan 30, 2024 · 2 comments
Assignees
Labels
feature New feature or request fund Issue priority can be boosted

Comments

@NikosAlexandris
Copy link

NikosAlexandris commented Jan 30, 2024

Problem

I can't seem to add an icon to the title of the coverage.md page. Specifically, I want to add the following, as I'd do in any other Markdown page :

---
icon: simple/pytest
---

Solution ?

Perhaps an icon option to the coverage plugin ?

Alternatives considered

Not really.

Boost priority

  • Boost priority in our backlog through Polar.sh. Higher pledge, higher priority.
  • Minimum pledge by user/organization is $5, minimum amount for boost is $30.
  • View all issues with pledges.
  • We receive the funds once the issue is completed and confirmed by you.
  • Features with the insiders label are released to sponsors first, and tied to a funding goal.
Fund with Polar
@pawamoy
Copy link
Owner

pawamoy commented Jan 30, 2024

I suppose this icon feature comes from Material for MkDocs? I'll try to look into it.

@NikosAlexandris
Copy link
Author

I tried something like :

        yaml_header = textwrap.dedent(
            """
            ---
            icon: simple/pytest
            ---
            """,
        )
        style = textwrap.dedent(
            """
            <style>
            article h1, article > a, .md-sidebar--secondary {
                display: none !important;
            }
            </style>
            """,
        )

        iframe = textwrap.dedent(
            f"""
            <iframe
                id="coviframe"
                src="{covindex}"
                frameborder="0"
                scrolling="no"
                onload="resizeIframe();"
                width="100%">
            </iframe>
            """,
        )

        script = textwrap.dedent(
            """
            <script>
            var coviframe = document.getElementById("coviframe");

            function resizeIframe() {
                coviframe.style.height = coviframe.contentWindow.document.documentElement.offsetHeight + 'px';
            }

            coviframe.contentWindow.document.body.onclick = function() {
                coviframe.contentWindow.location.reload();
            }
            </script>

            """,
        )
        page_contents = yaml_header + style + iframe + script

but no luck yet.

@pawamoy pawamoy added feature New feature or request fund Issue priority can be boosted labels Oct 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature New feature or request fund Issue priority can be boosted
Projects
None yet
Development

No branches or pull requests

2 participants