From 0602256cb497a0ab13526a6432e9fdb04796553b Mon Sep 17 00:00:00 2001 From: jlpereira Date: Wed, 12 Mar 2025 19:30:26 -0300 Subject: [PATCH 1/4] Add field occurrence point style --- src/assets/css/vars.css | 1 + src/components/Map/icons/FieldOccurrence.js | 5 +++++ src/components/Map/icons/index.js | 1 + src/components/Map/shapes/FieldOccurrence.js | 5 +++++ .../otus/components/Panel/PanelMap/constants/legend.js | 4 ++++ tailwind.config.cjs | 3 ++- 6 files changed, 18 insertions(+), 1 deletion(-) create mode 100644 src/components/Map/icons/FieldOccurrence.js create mode 100644 src/components/Map/shapes/FieldOccurrence.js diff --git a/src/assets/css/vars.css b/src/assets/css/vars.css index 6afb3eb..c59557f 100644 --- a/src/assets/css/vars.css +++ b/src/assets/css/vars.css @@ -22,6 +22,7 @@ --color-map-asserted: 249, 115, 22; --color-map-type-material: 51, 136, 255; --color-map-collection-object: 239, 68, 68; + --color-map-field-occurrence: 132, 204, 22; --color-scrollbar-thumb: 156, 163, 175; --color-scrollbar-track: 229, 231, 235; diff --git a/src/components/Map/icons/FieldOccurrence.js b/src/components/Map/icons/FieldOccurrence.js new file mode 100644 index 0000000..214d928 --- /dev/null +++ b/src/components/Map/icons/FieldOccurrence.js @@ -0,0 +1,5 @@ +export const FieldOccurrence = { + className: 'bg-map-field-occurrence rounded-full map-point-marker', + iconSize: [8, 8], + iconAnchor: [4, 4] +} diff --git a/src/components/Map/icons/index.js b/src/components/Map/icons/index.js index 2f9fb72..3889f3f 100644 --- a/src/components/Map/icons/index.js +++ b/src/components/Map/icons/index.js @@ -1,4 +1,5 @@ export * from './AssertedDistribution' export * from './CollectionObject' +export * from './FieldOccurrence' export * from './Georeference' export * from './TypeMaterial' diff --git a/src/components/Map/shapes/FieldOccurrence.js b/src/components/Map/shapes/FieldOccurrence.js new file mode 100644 index 0000000..484d4df --- /dev/null +++ b/src/components/Map/shapes/FieldOccurrence.js @@ -0,0 +1,5 @@ +export const CollectionObject = { + color: `rgb(var(--color-map-field-occurrence))`, + weight: 1, + fillOpacity: 'var(--color-map-shape-opacity)' +} diff --git a/src/modules/otus/components/Panel/PanelMap/constants/legend.js b/src/modules/otus/components/Panel/PanelMap/constants/legend.js index 9107aa8..66c3fd5 100644 --- a/src/modules/otus/components/Panel/PanelMap/constants/legend.js +++ b/src/modules/otus/components/Panel/PanelMap/constants/legend.js @@ -18,5 +18,9 @@ export const LEGEND = { TypeMaterial: { label: 'Type material', background: 'bg-map-type-material' + }, + FieldOccurrence: { + label: 'Field occurrence', + background: 'bg-map-field-occurrence' } } diff --git a/tailwind.config.cjs b/tailwind.config.cjs index dd78091..91b40eb 100644 --- a/tailwind.config.cjs +++ b/tailwind.config.cjs @@ -41,7 +41,8 @@ module.exports = { aggregate: withOpacity('--color-map-aggregate'), asserted: withOpacity('--color-map-asserted'), 'type-material': withOpacity('--color-map-type-material'), - 'collection-object': withOpacity('--color-map-collection-object') + 'collection-object': withOpacity('--color-map-collection-object'), + 'field-occurrence': withOpacity('--color-map-field-occurrence') }, primary: { From 236b371b0bc16159b3faab76979de67997642161 Mon Sep 17 00:00:00 2001 From: jlpereira Date: Sun, 16 Mar 2025 20:29:10 -0300 Subject: [PATCH 2/4] Add multi layout --- .gitignore | 1 + README.markdown | 47 ++++++++++++++++++++++++++++++++++++++++ src/App.vue | 22 +++++++++++++++++-- src/utils/index.js | 1 + src/utils/loadLayouts.js | 21 ++++++++++++++++++ tailwind.config.cjs | 1 + vite.config.js | 2 +- 7 files changed, 92 insertions(+), 3 deletions(-) create mode 100644 src/utils/loadLayouts.js diff --git a/.gitignore b/.gitignore index 30e63a6..3633253 100644 --- a/.gitignore +++ b/.gitignore @@ -6,6 +6,7 @@ dist-ssr /pages /components /panels +/layouts public README.md *.local diff --git a/README.markdown b/README.markdown index 89c4bfd..578f89b 100644 --- a/README.markdown +++ b/README.markdown @@ -209,6 +209,53 @@ export default { } ``` +### Customizing the Layout + +The application comes with a default layout that includes a header and a footer. If you'd like to replace this layout with your own, you can do so by creating a custom layout file. + +Steps to replace the default layout + +1. In the root folder of your project, create a new folder called `layouts` (if it doesn't already exist). +2. Inside this folder, create a file named default.vue. +3. Define your custom layout structure inside this file as needed. + +Example of layout/default.vue + +```vuejs + +``` + +This custom layout will replace the default one and be applied throughout the application. You can include your own elements, such as a navigation bar or footer, as needed. + +#### Using Multiple Layouts + +In addition to replacing the default layout, you can create multiple layouts by adding more .vue files inside the layout folder. You can then specify which layout to use for a specific page by setting the layout name in the meta property of the `` tag in your Single File Component (SFC). + +JSON5: + +```js + +{ + meta: { + layout: 'custom' + } +} + +``` + +YAML: + +```yaml + +meta: + layout: custom + +``` + ### External panels To add panels in Taxa pages, create a folder called `panels` in your `setup` branch, and inside it create another folder for your panel. For example: `panels/PanelTest` diff --git a/src/App.vue b/src/App.vue index bb29998..45c71d5 100644 --- a/src/App.vue +++ b/src/App.vue @@ -1,13 +1,31 @@ \ No newline at end of file + diff --git a/src/components/Card/VCardContent.global.vue b/src/components/Card/VCardContent.global.vue index a07e30b..8abe623 100644 --- a/src/components/Card/VCardContent.global.vue +++ b/src/components/Card/VCardContent.global.vue @@ -1,5 +1,5 @@ \ No newline at end of file + diff --git a/src/components/Card/VCardHeader.global.vue b/src/components/Card/VCardHeader.global.vue index 0857e92..1dcc288 100644 --- a/src/components/Card/VCardHeader.global.vue +++ b/src/components/Card/VCardHeader.global.vue @@ -1,5 +1,7 @@ \ No newline at end of file + diff --git a/src/components/Footer/FooterCitation.vue b/src/components/Footer/FooterCitation.vue new file mode 100644 index 0000000..c40fb40 --- /dev/null +++ b/src/components/Footer/FooterCitation.vue @@ -0,0 +1,45 @@ + + + diff --git a/src/components/Footer/FooterCopyright.vue b/src/components/Footer/FooterCopyright.vue new file mode 100644 index 0000000..78ffbf0 --- /dev/null +++ b/src/components/Footer/FooterCopyright.vue @@ -0,0 +1,20 @@ + + + diff --git a/src/components/Layout/LayoutFooter.vue b/src/components/Layout/LayoutFooter.vue index eb29d76..7a65f19 100644 --- a/src/components/Layout/LayoutFooter.vue +++ b/src/components/Layout/LayoutFooter.vue @@ -3,39 +3,8 @@ class="footer text-white bottom-0 border-gray-200 bg-zinc-800 pl-4 pr-4" >
-
- {{ project_authors }} - - - - {{ project_citation }}. - - Retrieved on {{ currentDate }} - - - at - - {{ currentUrl }} - - -
-
- - copyright - - {{ copyright_text }} -
+ +
@@ -86,34 +55,7 @@ diff --git a/src/components/Layout/LayoutHeader.vue b/src/components/Layout/LayoutHeader.vue index 9fdb59a..0e59203 100644 --- a/src/components/Layout/LayoutHeader.vue +++ b/src/components/Layout/LayoutHeader.vue @@ -1,6 +1,6 @@