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

Live Reload is not loading custom style in header #507

Open
4 tasks
johnkflam opened this issue Oct 9, 2024 · 0 comments
Open
4 tasks

Live Reload is not loading custom style in header #507

johnkflam opened this issue Oct 9, 2024 · 0 comments
Labels
bug Something isn't working

Comments

@johnkflam
Copy link

Important Notice
We do not provide support through GitHub issues. For community-based help, please use either:

If you're reporting a bug, please continue with this template.

Describe the bug
A clear and concise description of what the bug is.

Minimal Reproducible Example
Provide a minimal code snippet that reproduces the issue. This is crucial for us to understand and fix the bug quickly.

# Your code here

Expected behavior
this line, kwargs["hdrs"] = [*(kwargs.get("hdrs") or []), self.LIVE_RELOAD_HEADER], in live_reload.py is not putting the custom style defined with fast_app() in the header section.

For example:
css = Style('h2 {color: red;}')
app, rt = fast_app(pico=True,hdrs=(css), live=True)

is putting the CSS as well as the injected reload codes in the body of the page.

Environment Information
Please provide the following version information:

  • fastlite version:
  • fastcore version:
  • fasthtml version: version = "0.6.9"
    from .core import *

Confirmation
Please confirm the following:

  • I have read the FAQ (https://docs.fastht.ml/explains/faq.html)
  • I have provided a minimal reproducible example
  • I have included the versions of fastlite, fastcore, and fasthtml
  • I understand that this is a volunteer open source project with no commercial support.

Additional context
Add any other context about the problem here.

Screenshots
If applicable, add screenshots to help explain your problem.

@johnkflam johnkflam added the bug Something isn't working label Oct 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant