Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

CSS problem without CDN #24

Open
noraj opened this issue Sep 25, 2017 · 1 comment
Open

CSS problem without CDN #24

noraj opened this issue Sep 25, 2017 · 1 comment

Comments

@noraj
Copy link
Contributor

noraj commented Sep 25, 2017

In config.py if I change cdn = True to cdn = False there is no more CSS.

In fact:

  • /static/materialize.min.css
  • /static/icons.css
  • /static/vis.min.css

are not found.

CSS should be loaded but is not in the repository with other static contents.

$ grep -r materialize ./
./templates/admin/ticket_detail.html:        <textarea id="comment" name="comment" class="materialize-textarea"></textarea>
./templates/admin/base.html:        <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css" />
./templates/admin/base.html:        <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='materialize.min.css') }}" />
./templates/admin/base.html:        <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
./templates/admin/base.html:        <script src="{{ url_for('static', filename='materialize.min.js') }}"></script>
./templates/tickets/ticket_detail.html:        <textarea id="comment" name="comment" class="materialize-textarea"></textarea>
./templates/tickets/open_ticket.html:        <textarea required id="description" name="description" class="materialize-textarea"></textarea>
./templates/base.html:        <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css" />
./templates/base.html:        <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='materialize.min.css') }}" />
./templates/base.html:        <script src="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/js/materialize.min.js"></script>
./templates/base.html:        <script src="{{ url_for('static', filename='materialize.min.js') }}"></script>

$ grep -r vis.min.css ./
./templates/admin/base.html:        <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.9.0/vis.min.css" />
./templates/admin/base.html:        <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='vis.min.css') }}" />
./templates/base.html:        <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.9.0/vis.min.css" />
./templates/base.html:        <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='vis.min.css') }}" />

So you may add them in static/css.

Also I find weird the difference between CDN mode:

        <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/materialize/0.97.1/css/materialize.min.css" />
        <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/vis/4.9.0/vis.min.css" />
        <link href="https://fonts.googleapis.com/icon?family=Material+Icons" rel="stylesheet" />
        

        <link rel="stylesheet" type="text/css" href="/static/css/main.css" />

and without CDN:

        <link rel="stylesheet" type="text/css" href="/static/materialize.min.css" />
        <link rel="stylesheet" type="text/css" href="/static/icons.css" />
        <link rel="stylesheet" type="text/css" href="/static/css/flag-icon.min.css" />
        <link rel="stylesheet" type="text/css" href="/static/vis.min.css" />
        

        <link rel="stylesheet" type="text/css" href="/static/css/main.css" />

There should be icons.css and flag-icon.min.css in CDN mode and the Material Icons familly when without CDN. Why are they not the same ?

@jamiees2
Copy link
Member

I think this is an artifact from the old tjc platform, we customized it a lot, and only used CDN while doing so. You're right, it is pretty weird

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants