-
Notifications
You must be signed in to change notification settings - Fork 13
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
need to turn all print in tests to assertions
- Loading branch information
Showing
7 changed files
with
106 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<html><head><link rel="stylesheet" href="https://unpkg.com/marx-css/css/marx.min.css" /><script src="https://code.jquery.com/jquery-3.5.1.min.js"></script><script> | ||
function add(){ | ||
$('#results').html( Number($('#a').val()) + Number($('#b').val()) )}; | ||
</script></head><body><article><div><label>Add numbers:</label><input id="a" /><span>+</span><input id="b" /><button id="calculate_button" onclick="add();">Calculate</button><div>Result:<div id="results"></div></div></div></article></body></html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
# -*- coding: utf-8 -*- | ||
from domonic.javascript import Math | ||
from domonic.html import * | ||
|
||
|
||
classless_css = link(_rel="stylesheet", _href="https://unpkg.com/marx-css/css/marx.min.css") | ||
jquery = script(_src="https://code.jquery.com/jquery-3.5.1.min.js") | ||
|
||
code = script(''' | ||
function add(){ | ||
$('#results').html( Number($('#a').val()) + Number($('#b').val()) )}; | ||
''') | ||
|
||
calc = article( | ||
div( | ||
label('Add numbers:'), | ||
input(_id='a'), span('+'), input(_id='b'), | ||
button('Calculate', _id="calculate_button", _onclick="add();"), | ||
div('Result:', div(_id="results")) | ||
) | ||
) | ||
|
||
render( html(head(classless_css, jquery, code), body(calc)), 'calc.html' ) | ||
|
||
|
||
# // TODO - serve | ||
|
||
# from domonic.terminal import ls, touch | ||
# import time | ||
# ls( "| open .") | ||
# touch( "1.hi") | ||
# time.sleep(1) | ||
# touch( "2.how") | ||
# time.sleep(1) | ||
# touch( "3.are") | ||
# time.sleep(1) | ||
# touch( "4.you") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,12 +5,12 @@ | |
|
||
setup( | ||
name = 'domonic', | ||
version = '0.0.9', | ||
version = '0.1.0', | ||
author="@byteface", | ||
author_email="[email protected]", | ||
license="MIT", | ||
url = 'https://github.com/byteface/domonic', | ||
download_url = 'https://github.com/byteface/pypals/archive/0.0.9.tar.gz', | ||
download_url = 'https://github.com/byteface/pypals/archive/0.1.0.tar.gz', | ||
description = 'generate html with python 3', | ||
long_description=long_description, | ||
long_description_content_type="text/markdown", | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters