diff options
Diffstat (limited to 'examples/webenginewidgets/recipebrowser/assets/pages/soup.html')
-rw-r--r-- | examples/webenginewidgets/recipebrowser/assets/pages/soup.html | 63 |
1 files changed, 63 insertions, 0 deletions
diff --git a/examples/webenginewidgets/recipebrowser/assets/pages/soup.html b/examples/webenginewidgets/recipebrowser/assets/pages/soup.html new file mode 100644 index 000000000..ea51fc8a5 --- /dev/null +++ b/examples/webenginewidgets/recipebrowser/assets/pages/soup.html @@ -0,0 +1,63 @@ +<!doctype html> +<html lang="en"> +<head> + <meta charset="utf-8"> + <title>Soup</title> + <link rel="stylesheet" type="text/css" href="../3rdparty/markdown.css"> + <link rel="stylesheet" type="text/css" href="../custom.css"> + <script src="../3rdparty/marked.js"></script> + <script src="../custom.js"></script> + <script src="qrc:/qtwebchannel/qwebchannel.js"></script> +</head> +<body> + <div id="placeholder"></div> + <div id="content"> + +<img src="images/soup.jpg" alt="Soup" title="Soup" /> + +Soup +============= + +### Ingredients + +* 2 potatoes +* 2 onions +* 2 cloves of garlic +* olive oil +* 400 ml organic stock +* 3 bunches of watercress + +### Instructions +* Peel and roughly chop the potatoes, onions and garlic. +* In a large saucepan, heat a little olive oil, then sauté the potato, onion and garlic until the onions are translucent. +* Add the stock and simmer until the potato is soft. Chop and add the watercress and simmer for a further 3 to 4 minutes. +* Using a hand blender, liquidise the soup until smooth. +* Serve with a swirl of crème fraîche and some Fortt’s Bath Oliver biscuits, if you like. + +**Enjoy!** + + </div><!--End of content--> + + <script> + 'use strict'; + + var jsContent = document.getElementById('content'); + var placeholder = document.getElementById('placeholder'); + + var updateText = function(text) { + placeholder.innerHTML = marked.parse(text); + } + + new QWebChannel(qt.webChannelTransport, + function(channel) { + var content = channel.objects.content; + content.setInitialText(jsContent.innerHTML); + content.textChanged.connect(updateText); + } + ); + </script> +</body> +</html> + + + |