diff --git a/.gitignore b/.gitignore index 1f38c47..a611590 100644 --- a/.gitignore +++ b/.gitignore @@ -1,12 +1,2 @@ - -# lib -node_modules - -# dev -.env.local -.idea - -# output -dist -Landing-Page.zip -stats.html \ No newline at end of file +build_temp +Landing-Page.zip \ No newline at end of file diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..1191a41 --- /dev/null +++ b/Makefile @@ -0,0 +1,16 @@ +build: + rm -rf build_temp + mkdir build_temp + cp -r meta/* build_temp + + cd dashboard && npm run build + cp -r dashboard/dist/* build_temp + + cd dhis-header-bar && npm run build + cp dhis-header-bar/dist/dhis-header-bar.js build_temp + + rm -f Landing-Page.zip + cd build_temp && zip ../Landing-Page.zip -r . + +test: + cd build_temp && npx http-server -p 3000 --proxy https://dev.datim.org --proxu-options.auth YmFvLWFkbWluOktpZXYxOC1XYWdlcy0yNA== diff --git a/README.md b/README.md deleted file mode 100644 index 94144f0..0000000 --- a/README.md +++ /dev/null @@ -1,40 +0,0 @@ -**Repo Owner:** Ben Guaraldi [@benguaraldi](https://github.com/benguaraldi) - -# Landing Page app - -The Landing Page app is a DHIS2 app for displaying a single dashboard as the landing page for all users of a given DHIS2 instance. This dashboard can allow users to more easily get to where they want to go in DHIS2. - -## Installation - -[Install the app via the App Hub](https://apps.dhis2.org/app/30a4b86f-882c-490a-b6e1-0d730bfa53ad) or by uploading into the DHIS2 App Management app the zip either from [our releases](https://github.com/pepfar-datim/landing-page-app/releases) or from `npm run build`. - -## Adding content to the Landing Page app - -By default, the Landing Page app will be blank. To add content, follow these steps: - -1. Go to the `Landing Page` app—this will add the Landing Page app's dashboard to your system -2. Go to the `Dashboards` app and find the `Landing Page` dashboard -3. Edit it just as you would a regular dashboard - -Note that the Landing Page app does not support any widgets except for the [Rich Text and Video Dashboard Widget](https://github.com/pepfar-datim/dashboard-information-widget/), which allows you to create rich text with links, videos, and other advanced content. - -## Defaulting to the Landing Page app - -After installation, you may wish to make the Landing Page app the default app whenever a user logs into your DHIS2 instance. To do this, follow these steps: - -1. Go to the `System Settings` app -2. Choose `Appearance` in the left menu -3. Find the `Start page` dropdown -4. Choose `Landing Page` from the dropdown - -## Menu setup - -Our initial use case with this app was to combine it with the [Rich Text and Video Dashboard Widget](https://github.com/pepfar-datim/dashboard-information-widget/), which allows the creation of a nested menu to navigate a DHIS2 site. - -[More information about nested menus can be found here.](https://github.com/pepfar-datim/dashboard-information-widget/blob/main/docs/NestedMenu.md) - -## What the app doesn't do - -As mentioned above, the Landing Page app currently only shows the [Rich Text and Video Dashboard Widget](https://github.com/pepfar-datim/dashboard-information-widget/), - -Also, all users see the same dashboard when they login. There is no way to show different dashboards depending on the user's roles and permissions. diff --git a/dashboard/.gitignore b/dashboard/.gitignore new file mode 100644 index 0000000..e0ed597 --- /dev/null +++ b/dashboard/.gitignore @@ -0,0 +1,5 @@ +.env.local +node_modules +dist +.idea + diff --git a/index.html b/dashboard/index.html similarity index 87% rename from index.html rename to dashboard/index.html index ea7c481..9c5e6ca 100644 --- a/index.html +++ b/dashboard/index.html @@ -1,9 +1,9 @@
-