./docs has use-cases for the web browser, if you're looking for examples to run in nodejs please look at the ./samples folder; if you're looking for the documentation of the PhytoJS service component please look at the project ./README.md
Super simple examples to learn how to import PhytoJS as a JS Module on Codepen; Start here and have fun creating your application with PhytoJS
This collection ha only two pens which differ from one another only by the vernacular name sought
Introductory tutorial showing how easy it is to build powerful browser based applications with preact and phytojs
You can see step by step adding features to the page and have fun playing with styles or creating your first web application with PhytoJS
-
Search plants by vernacular name
please check the pen for basic scaffolding.
return h("li", null, `${plant.scientificName} - [${plant.taxonRankLabel}]`);
// instead of ..>
return h("li", null, plant.scientificName);
return
h("li",
{id: `${plant.wdEntityId}`, class: "plantTitle"},
`${plant.scientificName}`,
h("span",{class: "taxonRank"},` [${plant.taxonRankLabel}]`),
h("img",{src: plant.image}));
return
h("li",
{id: plant.wdEntityId, class: "plantTitle"},
h("a",
{href: plant.specieArticle, target:"_blank"},
`${plant.scientificName}`),
h("span",{class: "taxonRank"},` [${plant.taxonRankLabel}]`),
h("img",{src: plant.image}));
Follow the link to search newest PhytoJS pens
Will work in your browser in these cases:
- Safari 10.1.
- Chrome 61.
- Firefox 54 – behind the
dom.moduleScripts.enabled
setting inabout:config
. - Edge 15 – behind the Experimental JavaScript Features setting in
about:flags
.
# this demo require http-server; if you haven't it then install it: `npm i http-server -g`
npm start
# then navigate to http:https://localhost:8080
In any case this is a Single-Page Application (SPA) of static pages with browser friendly ES Modules therefore you can choose to serve it the way you like; for example:
git clone https://github.com/rondinif/phytojs.git
cd ./phytojs/docs/mvc
python -m SimpleHTTPServer
# Serving HTTP on 0.0.0.0 port 8000 ...
# then navigate to http:https://localhost:8000
This example was created by rondinif importing the PhytoJs library into a a Single-Page Application (SPA) inspired by the following works