Skip to content

Commit

Permalink
merge from upstream
Browse files Browse the repository at this point in the history
  • Loading branch information
wbbaker committed Nov 14, 2024
1 parent 7a6b139 commit 786b746
Show file tree
Hide file tree
Showing 27 changed files with 371 additions and 97 deletions.
42 changes: 28 additions & 14 deletions .github/workflows/gh-pages.yml → .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
name: public-build
name: Deploy to GitHub Pages

on:
push:
branches: [main, setup]
branches:
- main
- setup
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: 'main'
fetch-depth: 0

- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
ref: 'setup'
fetch-depth: 0
Expand All @@ -25,31 +26,44 @@ jobs:
run: cp -r _setup/* .

- name: Setup Node.js
uses: actions/setup-node@v1
uses: actions/setup-node@v4
with:
node-version: '16'
node-version: '20'

- name: Cache dependencies
uses: actions/cache@v2
uses: actions/cache@v4
id: npm-cache
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install dependencies
run: npm ci

- name: Build public view
run: npm run build

- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
target_branch: gh-pages
build_dir: dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
path: ./dist

deploy:
needs: build
permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

permissions:
contents: write
7 changes: 4 additions & 3 deletions README.markdown
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,10 @@ TaxonPages software is in active development and changes are expected that will

1. Click on "Fork" button to create your own repository from this.
2. Uncheck `Copy the setup branch only` and press `Save`
3. After create your repo, go to `Settings > Pages`, on "Branch" select `gh-pages` and `/(root)`. Then press save
4. Open `router.yml` file and change `base_url` to the name of your repository.
5. After a couple of minutes, your public page should be available at `https://<your_user_name>.github.io/<your_repo_name>`
3. After create your repo, go to `Settings > Pages`, on "Build and deployment - Source" select `GitHub Actions`.
4. Go to `Actions` tab and press `I understand my workflows, go ahead and enable them` button
5. Open `router.yml` file and change `base_url` to the name of your repository.
6. After a couple of minutes, your public page should be available at `https://<your_user_name>.github.io/<your_repo_name>`

### Setup

Expand Down
41 changes: 21 additions & 20 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,34 +17,35 @@
"dependencies": {
"@geoman-io/leaflet-geoman-free": "^2.17.0",
"@nuxt/devalue": "^2.0.2",
"@unhead/ssr": "^1.9.13",
"axios": "^1.7.2",
"glob": "^10.4.2",
"@sfgrp/distinguish": "^0.4.0",
"@unhead/ssr": "^1.11.10",
"axios": "^1.7.7",
"glob": "^11.0.0",
"js-yaml": "^4.1.0",
"leaflet": "^1.9.4",
"leaflet.markercluster": "^1.5.3",
"markdown-it-anchor": "^9.0.1",
"pinia": "^2.1.7",
"unhead": "^1.9.13",
"markdown-it-anchor": "^9.2.0",
"pinia": "^2.2.4",
"unhead": "^1.11.10",
"unplugin-vue-markdown": "^0.26.2",
"vue": "^3.4.29",
"vue-router": "^4.3.3"
"vue": "^3.5.12",
"vue-router": "^4.4.5"
},
"devDependencies": {
"@tailwindcss/typography": "^0.5.13",
"@unhead/ssr": "^1.9.13",
"@vitejs/plugin-vue": "^5.0.5",
"autoprefixer": "^10.4.19",
"@tailwindcss/typography": "^0.5.15",
"@unhead/ssr": "^1.11.10",
"@vitejs/plugin-vue": "^5.1.4",
"autoprefixer": "^10.4.20",
"compression": "^1.7.4",
"eslint": "^9.5.0",
"eslint-plugin-vue": "^9.26.0",
"express": "^4.19.2",
"eslint": "^9.13.0",
"eslint-plugin-vue": "^9.29.1",
"express": "^4.21.1",
"minimist": "^1.2.8",
"postcss": "^8.4.38",
"sass": "^1.77.6",
"tailwindcss": "^3.4.4",
"vite": "^5.3.1",
"vite-plugin-pages": "^0.32.2",
"postcss": "^8.4.47",
"sass": "^1.80.4",
"tailwindcss": "^3.4.14",
"vite": "^5.4.10",
"vite-plugin-pages": "^0.32.3",
"vite-plugin-radar": "^0.9.6"
}
}
8 changes: 4 additions & 4 deletions src/components/Pagination/VPagination.global.vue
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
<li>
<button
type="button"
:disabled="currentPage < 2"
:disabled="currentPage < 2 || !pages"
aria-label="Go to first page"
class="border border-base-border rounded-l-md px-2 py-1.5"
@click="currentPage = 1"
Expand All @@ -21,7 +21,7 @@
>
<button
type="button"
:disabled="currentPage < 2"
:disabled="currentPage < 2 || !pages"
aria-label="Go to previous page"
class="border border-base-border px-2 py-1.5"
@click="currentPage--"
Expand Down Expand Up @@ -77,7 +77,7 @@
type="button"
aria-label="Go to next page"
class="border border-base-border px-2 py-1.5"
:disabled="currentPage === pages"
:disabled="currentPage === pages || !pages"
@click="() => currentPage++"
>
Expand All @@ -86,7 +86,7 @@
<li role="presentation">
<button
type="button"
:disabled="currentPage === pages"
:disabled="currentPage === pages || !pages"
aria-label="Go to last page"
class="border border-base-border rounded-r-md px-2 py-1.5"
@click="() => (currentPage = pages)"
Expand Down
1 change: 1 addition & 0 deletions src/constants/objectTypes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ export const COLLECTION_OBJECT = 'CollectionObject'
export const ASSERTED_DISTRIBUTION = 'AssertedDistribution'
export const GEOREFERENCE = 'Georeference'
export const AGGREGATE = 'Aggregate'
export const OTU = 'Otu'
9 changes: 9 additions & 0 deletions src/modules/interactiveKeys/router/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import InteractiveKey from '../views/InteractiveKey.vue'

export default [
{
name: 'interactive-keys-id',
path: '/interactive_keys/:id',
component: InteractiveKey
}
]
108 changes: 108 additions & 0 deletions src/modules/interactiveKeys/views/InteractiveKey.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
<template>
<div
class="flex flex-col h-full overflow-y-hidden container mx-auto interactive-key-container"
>
<ClientOnly>
<VueInteractiveKey v-bind="options">
<template #remaining-item="{ item }">
<RouterLink
v-if="item.observationObjectType === OTU"
:to="{ name: 'otus-id', params: { id: item.observationObjectId } }"
v-html="item.objectTag"
/>
<span
v-else
v-html="item.objectTag"
/>
</template>
<template #eliminated-item="{ item }">
<RouterLink
v-if="item.observationObjectType === OTU"
:to="{ name: 'otus-id', params: { id: item.observationObjectId } }"
v-html="item.objectTag"
/>
<span
v-else
v-html="item.objectTag"
/>
</template>
</VueInteractiveKey>
</ClientOnly>
</div>
</template>

<script setup>
import { useRoute } from 'vue-router'
import { ref } from 'vue'
import { OTU } from '@/constants/objectTypes.js'
import { VueInteractiveKey } from '@sfgrp/distinguish'
import '@sfgrp/distinguish/dist/style.css'
const route = useRoute()
const options = ref({
observationMatrixId: route.params.id,
apiConfig: {
baseURL: __APP_ENV__.url,
projectToken: __APP_ENV__.project_token
}
})
</script>

<style>
:root {
--distinguish-primary-content-color: rgb(var(--color-primary-content));
--distinguish-bg-color: rgb(var(--color-base-foreground));
--distinguish-bg-panel-color: rgb(var(--color-base-foreground));
--distinguish-bg-modal-color: rgb(var(--color-base-foreground));
--distinguish-bg-disabled-color: #e5e5e5;
--distinguish-disabled-color: #999;
--distinguish-error-color: rgb(var(--color-danger));
--distinguish-primary-color: rgb(var(--color-primary));
--distinguish-border-color: #cccccc;
--distinguish-link-color: rgb(var(--color-secondary));
--distinguish-btn-medium-size: 20px;
}
.interactive-key-container {
max-height: calc(100vh - 12rem);
hr {
@apply my-4;
}
}
.distinguish-grid {
@apply shadow-md rounded border-base-muted;
}
.distinguish-header-bar {
@apply rounded-t-md;
}
.distinguish-app-container {
h2 {
@apply text-lg my-2;
}
}
.distinguish-app-container {
color: rgb(var(--color-base-content));
}
.distinguish-modal-header h3 {
@apply text-lg;
}
.distinguish-btn {
@apply px-4 py-1 rounded-none text-sm;
}
.distinguish-title {
@apply text-xl my-4;
}
.distinguish-row-filter-buttons {
@apply my-4;
}
</style>
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,14 @@
@click="isModalVisible = true"
>
<IconJson class="w-4 h-4" />
Sitemap
Datamap
</VButton>
<VModal
v-if="isModalVisible"
@close="isModalVisible = false"
>
<template #header>
<h3 class="font-medium">Sitemap</h3>
<h3 class="font-medium">Datamap</h3>
</template>
<div class="p-4 pt-0">
<p class="text-sm mb-2">
Expand All @@ -31,7 +31,7 @@
</VTableHeader>
<VTableBody>
<VTableBodyRow
v-for="(item, key) in store.sitemap"
v-for="(item, key) in store.datamap"
:key="key"
>
<VTableBodyCell class="capitalize">{{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@
<VCardHeader class="border-t border-base-muted first:border-t-0">
{{ title }}
</VCardHeader>
<VCardContent>
<ul
<VCardContent class="panel-content-list">
<div
v-for="(text, index) in textList"
:key="index"
class="pt-1 text-sm "
>
<li v-html="text" />
</ul>
class="pt-1 text-sm"
v-html="text"
></div>
</VCardContent>
</template>

Expand All @@ -25,4 +24,19 @@ defineProps({
required: true
}
})
</script>
</script>

<style>
.panel-content-list {
ul {
margin: 1rem 0;
list-style: disc;
margin-left: 1rem;
}
ol {
list-style-type: decimal;
margin-left: 1rem;
}
}
</style>
Loading

0 comments on commit 786b746

Please sign in to comment.