You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<!-- Fallback call to PyScript script to trigger 'py:ready' event, in case there are no PyScript scripts in the page. -->
34
-
<scripttype="py" defer></script>
34
+
<!-- <script type="py" defer></script> -->
35
35
</head>
36
36
<body>
37
37
<!-- Main dialog (as 'modal', defined in js module '_app-loading_splashscreen.js'), what appears 1st as soon as web page is loaded. -->
@@ -64,11 +64,29 @@ <h1>PyScript Exercises.</h1>
64
64
<br>
65
65
<p>This is a list of exercises to study <code>PyScript</code>. These exercises come from the <b><ahref="https://docs.pyscript.net/2024.5.2/examples/" target="_blank">official PyScript documentation</a></b>, where several examples are listed, starting with basics such as '<ahref="https://pyscript.com/@examples/hello-world/latest" target="_blank">Hello World</a>', and digging into <ahref="https://pyscript.com/@examples/altair/latest" target="_blank">plotting data</a>.</p>
66
66
<br>
67
-
<ul>
68
-
<li><aclass="main-content-list_link" href="./../02/hello_world.html">Hello World</a>: start learing how to use <code>PyScript</code> to run <code>Python</code> in a browser.</li>
69
-
<li><aclass="main-content-list_link" href="./../03/antigravity.html">Antigravity</a>: import files, using <code>PyScript</code><ahref="https://docs.pyscript.net/2024.5.2/user-guide/configuration/#files" target="_blank"> configuration file (TOML or JSON)</a>.</li>
70
-
<li><aclass="main-content-list_link" href="./../04/pandas.html">Pandas</a>: load a <code>.csv</code> table, from a URL, using <code>Pandas</code>.</li>
<p>Import files, using <code>PyScript</code><ahref="https://docs.pyscript.net/2024.5.2/user-guide/configuration/#files" target="_blank"> configuration file (TOML or JSON)</a>.</p>
<h2>Using 'pyscript.display': default (i.e. 'append=True') vs. 'append=False'.</h2>
71
71
<ul>
72
-
<li><b>Default</b>: encapsulates the result from 'pyscript.display' between a 'div' tag. Then the 'div' gets ADDED to the inner content of the target DOM element.</li>
73
-
<li><b>'append=False'</b>: the result from 'pyscript.display' RE-WRITES WHATEVER previous inner content of the target DOM.</li>
72
+
<li><p><b>Default</b>: encapsulates the result from 'pyscript.display' between a 'div' tag. Then the 'div' gets ADDED to the inner content of the target DOM element.</p></li>
73
+
<li><p><b>'append=False'</b>: the result from 'pyscript.display' RE-WRITES WHATEVER previous inner content of the target DOM.</p></li>
74
74
</ul>
75
75
<br>
76
76
<p><b>IMPORTANT</b>: whenever as possible, create an html element (and include an id) to populate with the result of 'pyscript.display' by using the 'target=' parameter / property. Otherwise, <b>un-expected behaviours</b> can happen, as the one described <i>in the comments of this html</i>.</p>
Copy file name to clipboardExpand all lines: rsrcs/io_inputs/app/config/web_pages/03/antigravity.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -68,7 +68,7 @@ <h1>'Antigravity' Example.</h1>
68
68
<p>It also shows you how you can import a file and use it in your Pyscript application - have a look at <code>pyscript.toml</code> to see how it's done.</p>
69
69
<br>
70
70
<hr>
71
-
<p><b>Validation of 'pyscript.config' parameters.</b></p>
71
+
<h2>Validation of 'pyscript.config' parameters.</h2>
Copy file name to clipboardExpand all lines: rsrcs/io_inputs/app/config/web_pages/04/pandas.html
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ <h1>'Pandas' Example.</h1>
66
66
<p>This application uses <code>Pandas</code> to load a CSV file and display the data in a table on the page. It also includes an input field and a button which allows you to change the data to be loaded in the table.</p>
67
67
<br>
68
68
<hr>
69
-
<p><b>Validation of 'pyscript.config' parameters.</b></p>
69
+
<h2>Validation of 'pyscript.config' parameters.</h2>
Copy file name to clipboardExpand all lines: rsrcs/io_inputs/app/config/web_pages/style.css
+53-1Lines changed: 53 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -35,6 +35,20 @@ VARIABLES DECLARATION.
35
35
--line_height_default:1.5;
36
36
--fonts_main:"Montserrat",var(--fonts_fallback);
37
37
--fonts_minor:"Krona One",var(--fonts_fallback);
38
+
/* From midudev video for JSCamp in Twitch d251001. */
39
+
--colors_primary:#1173D4;
40
+
--colors_primary_dark:#0A3D66;
41
+
--colors_primary_hover:#0D5BA8;
42
+
--colors_primary_light:#0099FF;
43
+
--colors_background_alternative:#101922;
44
+
--colors_fonts_primary:#FFFFFF;
45
+
--colors_fonts_secondary:#CBD5E1;
46
+
--colors_fonts_muted:#94A3B8;
47
+
--colors_border:rgba(255,255,255,0.1);
48
+
--colors_card_background:#1E293B;
49
+
--colors_shadow:rgba(0,0,0,0.3);
50
+
--colors_input_background:#1E293B;
51
+
--colors_hsla_example:hsla(210,100%,56%,1);
38
52
}
39
53
40
54
/* Universal changes for all tags / elements / classes */
@@ -71,6 +85,14 @@ ul {
71
85
padding:10px0px0px20px!important; /* IMPORTANT: lists REQUIRE PADDING; therefore, need manual adjustment, if padding set GLOBALLY to 0; i.e. '* { padding: 0; }'. Ref.: 'https://stackoverflow.com/questions/72279264/unordered-list-not-showing-bullets/72281511#72281511', 'https://www.w3schools.com/css/css_important.asp'.*/
72
86
}
73
87
88
+
p {
89
+
color:var(--colors_fonts_muted);
90
+
}
91
+
92
+
footerp {
93
+
color:var(--colors_03);
94
+
}
95
+
74
96
/* Use of 'media queries' to define layouts according to specific screen resolutions: 'https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_media_queries/Using_media_queries#targeting_media_features'. */
75
97
@media (width > 0px) { /* Base design, as starting point: e.g. for desktop, although recommended to start with mobile, 1st: 'https://stackoverflow.com/questions/6370690/media-queries-how-to-target-desktop-tablet-and-mobile/20350990#20350990'. */
0 commit comments