hhu-propra2-2019 / styleguide

Stylesheet für MOPS.
https://mops.style
1 stars 0 forks source link

Importing mops styleguide in subpaths tries to link css relative to subpaths #29

Closed LanPodder closed 4 years ago

LanPodder commented 4 years ago

Creating a controller in spring boot, that has a default path other than root. When adding template code, it adds css relative to sub path. For instance using "localhost:8080/my/path/to/getmapping" with

@Controller
@RequestMapping("/my/path/to")
class [...]
    @GetMapping("/getmapping")
    [...]

looks like this: Screenshot from 2020-03-13 09-16-02

And when looking at this pages source code: Screenshot from 2020-03-13 09-16-38

We can see it is trying to import/link css. But when trying to open those css links, we are redirected to localhost:8080/my/path/to/css/file.css

However those css files lie on localhost:8080/css/file.css

LanPodder commented 4 years ago

To fix this, there needs to be a leading slash in links:

Screenshot from 2020-03-13 09-23-45

n2o commented 4 years ago

Verwendest du die neueste Version vom Stylesheet?

n2o commented 4 years ago

2.2.0

n2o commented 4 years ago

Das haben wir vor ner Woche repariert: https://github.com/hhu-propra2/styleguide/blob/development/src/main/resources/templates/mopslayout.html#L7-L9

LanPodder commented 4 years ago

Used 2.0.0. using 2.2.0 works fine.