Giter Site home page Giter Site logo

Using CSS files about jupyterlab_html HOT 6 CLOSED

manuelknott avatar manuelknott commented on August 9, 2024
Using CSS files

from jupyterlab_html.

Comments (6)

mflevine avatar mflevine commented on August 9, 2024

The current issue is relative links, in general, are not being handled. There some code in the core for handling relative links in HTML rendering but it also strips out the javascript.

from jupyterlab_html.

manuelknott avatar manuelknott commented on August 9, 2024

So if I understand you right, I can use external CSS if I do not need Javascript? If yes, can you give me a hint how to do so / where to find the said code?

from jupyterlab_html.

mflevine avatar mflevine commented on August 9, 2024

Sorry I think I misunderstood your question. You can use external CSS as long as you give the full path to the CSS file. Relative URLs are not currently supported.
You can do this:
<link rel="stylesheet" type="text/css" href='https://fonts.googleapis.com/css?family=Open+Sans'>

from jupyterlab_html.

manuelknott avatar manuelknott commented on August 9, 2024

Ok now I got it. Thanks for the explanation.

So refering to a css style which lies within my Jupyter Lab tree should look like this?

<link rel="stylesheet" type="text/css" href='http://localhost:8888/lab/tree/styles.css'>

from jupyterlab_html.

mflevine avatar mflevine commented on August 9, 2024

Jupyter hosts the file server under localhost:port/files so I think it would be:
<link rel="stylesheet" type="text/css" href='http://localhost:8888/files/styles.css'>
Although it might autoredirect.

from jupyterlab_html.

manuelknott avatar manuelknott commented on August 9, 2024

It works with the solution in your last comment. Thank you very very much 👍 ,

from jupyterlab_html.

Related Issues (9)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.