Closed JK-de closed 6 years ago
Excellent!, I'will merge your patch and add in help text as soon as. :)
2018-02-17 7:47 GMT+01:00 Jochen Krapf notifications@github.com:
In most web pages parts like header, navigation bar and scripts are repeated in all html files. Wirh the command {{ include
}} you can include/insert the content of the given file at the position of the command. So, the repeated content must only present once in the includes file name. A pyhtml file can look like:
{{ include head.thtml }} {{ include navbar.thtml }}Unique content of this html page
{{ include script.thtml }}And the corresponding 'head.thtml' can be:
Page de test MicroWebSrv Note: the file extention 'thtml' is just a suggestion
You can view, comment on, or merge this pull request online at:
https://github.com/jczic/MicroWebSrv/pull/17 Commit Summary
- Added template include command
File Changes
- M microWebSrv.py https://github.com/jczic/MicroWebSrv/pull/17/files#diff-0 (2)
- M microWebTemplate.py https://github.com/jczic/MicroWebSrv/pull/17/files#diff-1 (22)
Patch Links:
- https://github.com/jczic/MicroWebSrv/pull/17.patch
- https://github.com/jczic/MicroWebSrv/pull/17.diff
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/jczic/MicroWebSrv/pull/17, or mute the thread https://github.com/notifications/unsubscribe-auth/AAegLF3bS3nh0xtZZ5c8Bu7_cPd6k3u4ks5tVnYegaJpZM4SJN39 .
--
Sincèrement,
In most web pages parts like header, navigation bar and scripts are repeated in all html files. Wirh the command
{{ include <filename> }}
you can include/insert the content of the given file at the position of the command. So, the repeated content must only present once in the includes file.The include file is opened in the same dir as the pyhtml file. The file can also content {{}}-commands.
A pyhtml file can look like:
And the corresponding 'head.thtml' can be:
Note: the file extention 'thtml' is just a suggestion