Skip to content

Instantly share code, notes, and snippets.

@ashx3s
Last active December 12, 2021 23:32
Show Gist options
  • Select an option

  • Save ashx3s/acb04259bff393ae2a6c21cdcf7084c2 to your computer and use it in GitHub Desktop.

Select an option

Save ashx3s/acb04259bff393ae2a6c21cdcf7084c2 to your computer and use it in GitHub Desktop.
xhtml notes fedora websites

XHTML Notes for Fedora Websites

When upgrading the frontend for these webpages to flask, it will be important for everyone to know what's going on with these xhtml files.

html tag

  • xmlns="http://www.w3.org/1999/xhtml: declares it as xhtml file, this is only required for html4.
  • xmlns:py="http://genshi.edgewall.org/: this is used to parse xml with python read this article for more info (this link has a bunch of syntax examples for python in xml).
  • this gives access to python directives bound with py
    • for example:
    <div py:if="foo">
      <p>bar</p>
    </div>
    
    • this will parse truthiness of foo and then render the paragraph that reads 'bar'

Includes

  • xi:include href="../templates/master.html/" /> works similar to "{% extends layout.html %} syntax in flask/jinja
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment