Skip to content

Commit

Permalink
Tree counter widget
Browse files Browse the repository at this point in the history
  • Loading branch information
Harsh Vitra authored and Harsh Vitra committed Jan 28, 2021
1 parent 72e7988 commit f7a343a
Show file tree
Hide file tree
Showing 9 changed files with 604 additions and 11 deletions.
26 changes: 26 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
},
"devDependencies": {
"@rollup/plugin-commonjs": "^16.0.0",
"@rollup/plugin-multi-entry": "^4.0.0",
"@rollup/plugin-node-resolve": "^10.0.0",
"@rollup/plugin-replace": "^2.3.4",
"dotenv": "^8.2.0",
Expand Down
5 changes: 4 additions & 1 deletion public/data/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"target":"Ziel",
"plantTrees":"Bäume pflanzen",
"viewProfile":"Profil anzeigen",
"poweredBy":"Powered by Plant-for-the-Planet"
"poweredBy":"Powered by Plant-for-the-Planet",
"treesPlantedBy":"trees planted by",
"and":"und",
"treesPlantedByComm":"trees planted by community."
}
5 changes: 4 additions & 1 deletion public/data/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,8 @@
"target":"Target",
"plantTrees":"Plant Trees",
"viewProfile":"View Profile",
"poweredBy":"Powered by Plant-for-the-Planet"
"poweredBy":"Powered by Plant-for-the-Planet",
"treesPlantedBy":"trees planted by",
"and":"and",
"treesPlantedByComm":"trees planted by community."
}
15 changes: 13 additions & 2 deletions public/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,19 @@ <h2> TreeMap for Partners</h2>

<h2> TreeMap Variant 3</h2>
<p> Partner, theme="dark", community="false", locale="de" </p>
<tree-map user='prf_h6smcMDN23Qet1CP7BEplM60' theme="dark" community="false" locale="de"></tree-map>

<tree-map user='prf_h6smcMDN23Qet1CP7BEplM60' theme="dark" community=true locale="de"></tree-map>

<h2> TreeMap Variant 4</h2>
<p> User override - community </p>
<tree-map user='prf_h6smcMDN23Qet1CP7BEplM60' locale="de"></tree-map>

<h2> Tree Counter Variant 1</h2>
<p> Default </p>
<tree-counter user='prf_h6smcMDN23Qet1CP7BEplM60'></tree-counter>

<h2> Tree Counter Variant 2</h2>
<p> Dark mode </p>
<tree-counter user='prf_h6smcMDN23Qet1CP7BEplM60' theme="dark"></tree-counter>
</body>

</html>
5 changes: 3 additions & 2 deletions rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ import commonjs from "@rollup/plugin-commonjs";
import resolve from "@rollup/plugin-node-resolve";
import livereload from "rollup-plugin-livereload";
import { terser } from "rollup-plugin-terser";
import css from "rollup-plugin-css-only";
import json from "@rollup/plugin-json";
import {config} from 'dotenv';
import replace from '@rollup/plugin-replace';
import gzipPlugin from 'rollup-plugin-gzip'
import multi from '@rollup/plugin-multi-entry';

const production = !process.env.ROLLUP_WATCH;

Expand Down Expand Up @@ -37,14 +37,15 @@ function serve() {
}

export default {
input: "src/TreeMap/treemap.js",
input: ["src/TreeMap/treemap.js","src/TreeCounter/treecounter.js"],
output: {
sourcemap: true,
format: "iife",
name: "app",
file: "public/build/treemap.js",
},
plugins: [
multi(),
gzipPlugin(),
replace({
// stringify the object
Expand Down
Loading

0 comments on commit f7a343a

Please sign in to comment.