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

Show event description #56

Merged
merged 1 commit into from
Feb 1, 2024
Merged

Conversation

changbowen
Copy link
Contributor

@changbowen changbowen commented Jan 23, 2024

Only a suggestion..
I think the description property could be better used to display additional information in events (or even activities).
The proposed change is only a quick and possibly dirty way to render the description as html or as text in a span. It allows me abuse it a bit:

<style>
  .months {
    opacity: 0
  }

  .nt-plan-group.nt-group-0 .nt-plan-group-summary {
    opacity: 0
  }

  .nt-timeline-dot .description {
    position: absolute;
    left: 120%;
    font-size: smaller;
    filter: drop-shadow(0 1px 1px black);

    top: 50%;
    transform: translateY(-50%);
  }
</style>

::gantt:: no-years no-quarters no-days month-width=800

- title: ""
  events:
    - title: Month Begin
      time: 2024-01-01
      icon: ":material-calendar-start:"
      description: Month Begin
    - title: Patch Tuesday
      time: 2024-01-09
      icon: ":material-rocket-launch:"
      description: Patch Tuesday
    - title: Month End
      time: 2024-01-31
      icon: ":material-calendar-end:"
      description: "<span style='left: unset; right: 120%'>Month End</span>"
- title: Server Group A
  activities:
    - title: Pre-prod (SAT-TUE)
      start: 2024-01-13
      lasts: 4 days
    - title: Prod (SAT-SUN)
      start: 2024-01-20
      lasts: 2 days
- title: Server Group B
  activities:
    - title: Pre-prod (TUE)
      start: 2024-01-16
      lasts: 1 day
    - title: Prod (SAT-SUN)
      start: 2024-01-20
      lasts: 2 days

::/gantt::

which results in:

image

Make use of the description property on events render it as html or as text in a span.
@RobertoPrevato
Copy link
Member

Hi @changbowen
Thank You for your contribution, I like it and I will publish to PyPi soon. Don't mind the failing build, I only need to do some GH workflow maintenance and upgrade to latest version of Black formatter somewhere.

@RobertoPrevato RobertoPrevato merged commit 69d9ee2 into Neoteroi:main Feb 1, 2024
1 of 6 checks passed
@RobertoPrevato
Copy link
Member

Hi @changbowen
Your contribution has been published with the last release, and at https://pypi.org/project/neoteroi-mkdocs/1.0.5/

@changbowen changbowen deleted the patch-1 branch February 3, 2024 15:33
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.

2 participants