7 Commits

Author SHA1 Message Date
707a0a5ab6 The navmenu section - first version working. TODO: email, phone and language picker 2020-02-15 00:04:40 +01:00
Quentin Schulz
f4888f6831 themes: fix URI matching used for deciding if URI's local in menu
We want to distinguish between URI references ("local" pages), such as
path/to/another/page/of/my/website, from the other ones, such as
https://example.com in the menu to know how to build the URL.

The issue is that we did the distinction between the two by checking if
the string starts with "http".
Unfortunately, it does not match other valid URI schemes. One example is
mailto:address@example.com to open a mail client with the recipient
being address@example.com.
There are many other valid URI schemes (tel, ftp, irc, ...).
Under the current code, we think anything that isn't started by "http"
is local, i.e. we need to append the string to the parent path of the
current page.
This means that we have
https://mywebsite.example.com/mailto:address@example.com linked in the
menu instead of the expected mailto:address@example.com.

Let's fix that with a very simple test. A URI reference is commonly
detected as anything that does not contain a scheme (which has to be
suffixed by ':') or if it does, that the given path starts with './'.

This is most likely not handling all the cases but at least most of the
common ones.

Please refer to the RFC for further information:
https://www.rfc-editor.org/rfc/rfc3986.txt

Signed-off-by: Quentin Schulz <foss@0leil.net>
2019-03-20 20:56:16 +00:00
Adrien Beudin
16536149cb fix menu 2018-03-22 10:47:14 +01:00
Adrien Beudin
a465fdfe69 add support of Open Graph 2016-11-04 12:55:02 +01:00
Adrien Beudin
3f7d5866b6 move default theme in themes folder 2016-02-22 16:36:00 +01:00
Adrien Beudin
d3eea46393 Revert "move default theme in themes folder"
This reverts commit bf986ded7da83d4183a57c09e3c603abdaa94d62.
2016-02-22 16:32:44 +01:00
Adrien Beudin
bf986ded7d move default theme in themes folder 2016-02-22 16:29:36 +01:00