diff options
-rw-r--r-- | static/website/css/main.css | 6 | ||||
-rw-r--r-- | static/website/js/cloud.js | 8 | ||||
-rw-r--r-- | static/website/templates/index.html | 6 | ||||
-rw-r--r-- | static/website/templates/node-about.html | 9 | ||||
-rw-r--r-- | static/website/templates/node-contact.html | 9 | ||||
-rw-r--r-- | static/website/templates/node-invitation.html | 8 | ||||
-rw-r--r-- | website/ajax.py | 7 |
7 files changed, 50 insertions, 3 deletions
diff --git a/static/website/css/main.css b/static/website/css/main.css index 7c545a9..aa27771 100644 --- a/static/website/css/main.css +++ b/static/website/css/main.css @@ -142,6 +142,12 @@ body, html { -o-box-shadow: 0 0 10px #ffffff; box-shadow: 0 0 10px #ffffff; } +#databox-wrapper { + max-width: 400px; +} +#databox-wrapper p { + text-align: justify; +} a.extra-link { float: right; color: #aaaaaa; diff --git a/static/website/js/cloud.js b/static/website/js/cloud.js index 162da73..6ec1ba5 100644 --- a/static/website/js/cloud.js +++ b/static/website/js/cloud.js @@ -169,4 +169,12 @@ $(document).ready(function() { }, {book_id: $("#books").val()}); e.preventDefault(); }); + + $(document).on("click", ".node", function(e){ + Dajaxice.website.node(function(data) { + Dajax.process(data); + $("#databox-wrapper").lightbox_me({centered: true}); + }, {key: $(this).data("key")}); + e.preventDefault(); + }); }); diff --git a/static/website/templates/index.html b/static/website/templates/index.html index ee58a95..cb99367 100644 --- a/static/website/templates/index.html +++ b/static/website/templates/index.html @@ -20,9 +20,9 @@ </span> <div id="navlinks"> <ul> - <li><a href="#">About</a></li> - <li><a href="#">Invitation</a></li> - <li><a href="#">Contact Us</a></li> + <li><a class="node" data-key="about" href="#">About</a></li> + <li><a class="node" data-key="invitation" href="#">Invitation</a></li> + <li><a class="node" data-key="contact" href="#">Contact Us</a></li> <img id="scilab-logo" src="{% static 'website/images/scilab-logo.png'%}" width="100px"> </ul> <div class="clearfix"></div> diff --git a/static/website/templates/node-about.html b/static/website/templates/node-about.html new file mode 100644 index 0000000..eff52c9 --- /dev/null +++ b/static/website/templates/node-about.html @@ -0,0 +1,9 @@ +<h6><u>About Scilab on GARUDA Cloud.</u></h6> +<p> + Scilab on Cloud facilitates execution of the codes for particular example(s) + online. The results can then be verified with the solved example(s) from the + textbook. It is also possible to change the values of the variables and in fact, + the code itself, and execute it. In addition to the given examples, one can also + copy and paste (or) write a new code in the input box provided and execute the + same. <a href="http://scilab.in/scilab-on-cloud" target="_blank">Read more..</a> +</p> diff --git a/static/website/templates/node-contact.html b/static/website/templates/node-contact.html new file mode 100644 index 0000000..a938b25 --- /dev/null +++ b/static/website/templates/node-contact.html @@ -0,0 +1,9 @@ +<h6><u>Send us your valuable suggestions and feedback that shall enable us to enhance our work.</u></h6> +<p> + If you wish to contribute to our activities such as <b>Lab Migration, Textbook + Companion, SciLinks, Scilab on Cloud, Scilab on Aakash,</b> please write to + <a href="mailto: contact@scilab.in">contact@scilab.in</a>. + For feedback on Lab Migration (or) Textbook Companion, + <a href="http://scilab.in/feedbacks">click here</a>. +</p> + diff --git a/static/website/templates/node-invitation.html b/static/website/templates/node-invitation.html new file mode 100644 index 0000000..65ed8f5 --- /dev/null +++ b/static/website/templates/node-invitation.html @@ -0,0 +1,8 @@ +<h6><u>Contribute to Scilab Textbook Companion Project / Scilab on GARUDA Cloud.</u></h6> +<p> + The FOSSEE team has created a submission portal that allows the code for + each example to be uploaded individually. The Textbook Companion Project aims + to port solved examples from standard textbooks using an open source software + system, such as Scilab. + <a href="http://scilab.in/Textbook_Companion_Project" target="_blank">Read more..</a> +</p> diff --git a/website/ajax.py b/website/ajax.py index 6b6f998..0e8fd9a 100644 --- a/website/ajax.py +++ b/website/ajax.py @@ -95,3 +95,10 @@ def contributor(request, book_id): contributor = render_to_string('website/templates/ajax-contributor.html', context) dajax.assign('#databox', 'innerHTML', contributor) return dajax.json() + +@dajaxice_register +def node(request, key): + dajax = Dajax() + data = render_to_string("website/templates/node-{0}.html".format(key)) + dajax.assign('#databox', 'innerHTML', data) + return dajax.json() |