lukaszklis / pjatk-edux-lectures-user-styles

📖 🛠 User styles for lectures available on the Edux platform at PJATK.
1 stars 0 forks source link

Some of the lectures do not get user styles #2

Open kpietkaa opened 6 years ago

kpietkaa commented 6 years ago

Hi,

I used your solution. I installed User JavaScript and CSS extension. After adding user-styles.css to my browser it's working for this lecture (I don't understand why text is aligned to left 😄). For this lecture it doesn't work at all 😛

lukaszklis commented 6 years ago

Hey, I will look into this, however at the first glance it is related to the way they generate the lectures (some of the lectures have a different file structure). I will try to find a nicer way to match to which HTML from PJATK the user styles should be applied to. Thanks!

lukaszklis commented 6 years ago

Sorry for getting back to you so late. I looked into both cases which you mentioned.

After adding user-styles.css to my browser it's working for this lecture (I don't understand why text is aligned to left 😄).

This is caused by styles being applied to the body of the HTML with lectures content (see the CSS template I have). Unfortunately PJATK does not offer their materials in a unified way, hence it is possible my CSS template is not going to work with some of the lectures offered by the platform. In order to support all of the cases, I might have to special cases (like the two of the lectures you listed) and hope other people would submit more problems in case they find any.

Another idea would be create two templates:

  1. a minimalistic one unifying typography and some basic spacing,
  2. an extended one which changes more things (i.e. what we do with the current CSS template).

For this lecture it doesn't work at all 😛

As mentioned earlier, I might have to apply some additional mapping for specific IDs, so they would use a different URL pattern for a user style extension.


I will try to come up with a tangible solution which would not require from users too many configuration options other than specifying IDs of the lectures they want to have the user styles applied to.