-
Notifications
You must be signed in to change notification settings - Fork 513
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95c7d38
commit 5c5c44e
Showing
11 changed files
with
871 additions
and
639 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,45 +1,55 @@ | ||
body {font-family:arial,verdana; | ||
font-size:14px; | ||
} | ||
ul | ||
{ | ||
list-style-type:none; | ||
margin:0; | ||
padding:0; | ||
overflow:hidden; | ||
} | ||
li | ||
{ | ||
float:left; | ||
} | ||
a.banner:link,a.banner:visited | ||
{ | ||
display:block; | ||
font-size:14px; | ||
font-weight:bold; | ||
color:#FFFFFF; | ||
line-height:35px; /*hauteur de l'image de fond*/ | ||
background:black url(doc/images/noir-1.png) repeat-x; | ||
padding:8px; | ||
text-align:center; | ||
text-decoration:none; | ||
} | ||
a.banner:hover,a.banner:active | ||
{ | ||
background:black url(doc/images/noir-2.png) repeat-x; | ||
color:white; | ||
} | ||
#banner{ | ||
width:85%; | ||
padding-bottom:15px; | ||
} | ||
#console{ | ||
color:#FFF; | ||
background-color:#000; | ||
font-weight:bold; | ||
} | ||
a.glink{ | ||
text-decoration:underline; | ||
background-color: #FFF; | ||
color: #000; | ||
} | ||
@charset 'utf-8'; | ||
@-ms-viewport{width:device-width}; | ||
@-o-viewport{width:device-width}; | ||
@viewport{width:device-width}; | ||
|
||
|
||
#banner { | ||
padding-bottom:15px; | ||
width:85% | ||
} | ||
|
||
#console { | ||
background-color:#000; | ||
color:#FFF; | ||
font-weight:700 | ||
} | ||
|
||
a.banner:hover,a.banner:active { | ||
background:#000 url(doc/images/noir-2.png) repeat-x; | ||
color:#FFF | ||
} | ||
|
||
a.banner:link,a.banner:visited { | ||
background:#000 url(doc/images/noir-1.png) repeat-x; | ||
color:#FFF; | ||
display:block; | ||
font-size:14px; | ||
font-weight:700; | ||
line-height:35px; | ||
padding:8px; | ||
text-align:center; | ||
text-decoration:none | ||
} | ||
|
||
a.glink { | ||
background-color:#FFF; | ||
color:#000; | ||
text-decoration:underline | ||
} | ||
|
||
body { | ||
font-family:Oxygen,arial; | ||
font-size:14px | ||
} | ||
|
||
li { | ||
float:left | ||
} | ||
|
||
ul { | ||
list-style-type:none; | ||
margin:0; | ||
overflow:hidden; | ||
padding:0 | ||
} |
Oops, something went wrong.
5c5c44e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Juan Carlo,
I just realised that this commit changed the place where the brython() function is called : instead of the standard you put it in
It didn't break anything at the time so I didn't notice, but it broke another change I am working on. So I restored the standard code in changeset e770f9e, and in the same time the quoted attributes
- Pierre
5c5c44e
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Brython needs to know the URL matching the directory of the standard distribution, to be able to search modules eg in Lib/site-packages by Ajax calls
For the moment this is done in the function brython() of py2js.js, by looking at the files inserted in the script (<script src="brython.js">) and looking if one of them has its src attribute in ["py2js.js", "brython.js", "brython_dist.js"]
I am trying to make this more flexible because I would like to allow customised distributions : JS files that hold the Brython engine and only a part of the standard distribution (eg the browser package). The distribution could have any name, so the current mechanism that relies on the script name doesn't work
The approach I am working on is to include a piece of code in brython_builtins.js that would detect its own name, just by searching the last item in document.getElementsByTagName("scripts")
Just for testing, introduce these 2 lines at the beginning of the function in brython_builtins.js (line 6) :
and generate a brython.js with make_dist.py
With your version of gallery_en.html, I get a blank value in the alert box, so my code to get the URL wouldn't work. I had not tested removing the "async" attribute, in this case I get the expected value, but in the meantime restoring onload = "brython(1)" solved the problem
On the other hand, the idea of having just one line to include Brython in the page is interesting. Either by adding the onload attribute to the script tag as you did, or even more simple, by putting something like
in the code ; but in this case we would have to change the mechanism to set options such as the debug level