lunduniversity / schoolprog

Programming exercises for primary and secondary education, in Swedish.
https://lunduniversity.github.io/schoolprog/
15 stars 6 forks source link

Improve design of website #20

Closed ErikBjare closed 6 years ago

ErikBjare commented 6 years ago

We might want to make some changes to the design of the website, I'll just drop some ideas here.

Features

Some themes

gorelhedin commented 6 years ago

A couple of more things to do:

gorelhedin commented 6 years ago

The http://kojojs.kogics.net online IDE for Scala is now a lot improved, and I think most of our examples could be run there as well now.

This brings up the question of if it would be possible to write conditional markdown - to let the user switch between viewing scala and python examples. Any ideas on that? This would save a lot of work in trying to keep separate files in sync.

ahnlabb commented 6 years ago

@gorelhedin It is possible with our current jekyll setup. Please have a look at the multilang branch in my fork, specifically: afe53ba634b46d21482de2c655564d7e8fe7c831

This is based purely on the liquid markup used by jekyll, by writing or finding a plugin specialized for this maybe we could make it cleaner but it is already fairly simple. Basically:

In my README.md I've used different approaches to demonstrate what can be achieved:

gorelhedin commented 6 years ago

@ahnlabb That sounds great! Thanks for the examples. I'll try it out.

ErikBjare commented 6 years ago

Just found this neat resource on how to style <details>, I'd recommend skimming it for a more fruitful discussion about how we want it: http://html5doctor.com/the-details-and-summary-elements/

ErikBjare commented 6 years ago

@gorelhedin <ul><li>Test</li></ul> seems to work inside <details> (the closing </li> tag is required for some XHTML-parsing reason).

Edit: <ul><li/>Test</ul> also works.

ErikBjare commented 6 years ago

Added some very basic styling of <details> in https://github.com/lunduniversity/schoolprog/commit/76bb4ebcfbe8922a829e8c8743aa81b041620601

gorelhedin commented 6 years ago

@ErikBjare Thanks, nice resource! I'd like a little more space after each </details>. Would that be possible?

ErikBjare commented 6 years ago

@gorelhedin Fixed in https://github.com/lunduniversity/schoolprog/commit/8266db10c8dadfda2a365acae3810b1f8076d03f

gorelhedin commented 6 years ago

@ErikBjare Looks great! Thanks!

gorelhedin commented 6 years ago

@ErikBjare Help! I did some changes to the turtle exercise, and now the web site does not build! I have tried to read the error message, but I don't understand what is wrong. Can you help?

gorelhedin commented 6 years ago

@ErikBjare In investigating a bit more, it seems that the only difference from the last build is that Travis fails in the last step with the message "Couldn't push the build to github.com/lunduniversity/schoolprog.git:gh-pages". In googling this, it is suggested that this kind of error occurs when the branch is protected: https://github.com/travis-ci/travis-ci/issues/8548. However, as far as I can see, we don't have any protected branches. Any more ideas?

remexre commented 6 years ago

@gorelhedin https://github.com/travis-ci/travis-ci/issues/9312

gorelhedin commented 6 years ago

@remexre Thanks a lot - the workaround solved our problem!

gorelhedin commented 6 years ago

Good enough for now.