From 3fb4a5eae438c423d00c90124f3d6afc99f6761e Mon Sep 17 00:00:00 2001 From: Guilhem Moulin Date: Wed, 27 Sep 2023 18:17:14 +0200 Subject: Add style.qml --- style.qml | 3209 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 3209 insertions(+) create mode 100644 style.qml (limited to 'style.qml') diff --git a/style.qml b/style.qml new file mode 100644 index 0000000..608c714 --- /dev/null +++ b/style.qml @@ -0,0 +1,3209 @@ + + + + 1 + 1 + 1 + 0 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + CASE +WHEN "ProtectedByLaw" THEN 0 +WHEN "Natura2000HabitatsDirectiveArticle2PrioritySpecie" THEN 1 +WHEN "Natura2000HabitatsDirectiveArticle2" THEN 2 +WHEN "Natura2000HabitatsDirectiveArticle4" THEN 3 +WHEN "Natura2000HabitatsDirectiveArticle5" THEN 4 +WHEN "TaxonIsRedlisted" THEN + CASE + WHEN "RedlistCategory" = 'DD' THEN 5 + WHEN "RedlistCategory" = 'RE' THEN 6 + WHEN "RedlistCategory" = 'CR' THEN 7 + WHEN "RedlistCategory" = 'EN' THEN 8 + WHEN "RedlistCategory" = 'VU' THEN 9 + WHEN "RedlistCategory" = 'NT' THEN 10 + ELSE 11 + END +WHEN "TaxonIsSignalSpecie" THEN 12 +ELSE 999 +END + "EndDate" + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + 0 + 1 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 0 + + + 0 + generatedlayout + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + "VernacularName" || if("UncertainIdentification", '(?)', '') + <style> + table { + width: 600px; + height: 100%; + font-family: Arial, Helvetica, "Liberation Sans", sans-serif; + } + td { + vertical-align: top; + } + td.header { + border-bottom: 1px solid #ddd; + font-size: 1.3rem; + line-height: 1; + } + .font-weight-bold { + font-weight: 700 !important; + } + td:first-child { + white-space: nowrap; + } + td:not(:first-child) { + padding-left: .8em; + } + tr:not(:first-child) td.header { + padding-top: .8em; + } + .ScientificTaxonName { + font-style: italic; + } + .ScientificTaxonNameAuthorship { + font-variant: small-caps; + color: #6c757d !important; + } + ul.TaxonHierachy { + padding: 0; + margin: 0; + list-style: none; + display: flex; + flex-wrap: wrap; + } + .TaxonHierachy li { + font-style: italic; + } + .TaxonHierachy li:not(:first-child) { + margin-left: 1ch; + } + .TaxonHierachy li:not(:first-child)::before { + margin-right: 1ch; + content: '›'; + color: #6c757d !important; + } + .UncertainIdentification { + color: #6c757d !important; + } + .RedListed { + color: #dc3545 !important; + } + .RedListCategory { + font-style: italic; + } + a { + color: #007bff; + text-decoration: none; + } + a:hover, a:focus { + text-decoration: underline; + } + .NatureConservation a { + color: inherit; + } + .NatureConservation a:hover, + .NatureConservation a:focus { + color: #007bff; + } +</style> + +<body> + <table> + <tr><td class="header" colspan="2">Fyndegenskaper</td></tr> + <tr><td>Artnamn</td><td><span class="font-weight-bold">[% "VernacularName" %][% if("UncertainIdentification", '<span class="UncertainIdentification">(?)</span>', '') %]</span></td></tr> + <tr><td>Antal &amp; enhet</td><td>[% if("OrganismQuantityInt" IS NOT NULL, concat(to_string("OrganismQuantityInt"), '&#8239;', "OrganismQuantityUnit"), 'noterad') %]</td></tr> + [% if("Sex" IS NOT NULL, concat('<tr><td>Kön</td><td>', "Sex", '</td></tr>'), '') %] + [% if("LifeStage" IS NOT NULL, concat('<tr><td>Ålder/stadium</td><td>', "LifeStage", '</td></tr>'), '') %] + [% if("Activity" IS NOT NULL, concat('<tr><td>Aktivitet</td><td>', "Activity", '</td></tr>'), '') %] + [% if("DiscoveryMethod" IS NOT NULL, concat('<tr><td>Metod</td><td>', "DiscoveryMethod", '</td></tr>'), '') %] + <tr><td>Rapportör[% if(strpos("ReportedBy", ',') > 0, 'er', '') %]</td><td>[% "ReportedBy" %]</td></tr> + <tr><td>Observatör[% if(strpos("RecordedBy", ',') > 0, 'er', '') %]</td><td>[% "RecordedBy" %]</td></tr> + <tr><td>Startdatum &amp; tid</td><td>[% format_date("StartDate", 'd MMMM yyyy HH:mm', 'sv') %]</td></tr> + <tr><td>Slutdatum &amp; tid</td><td>[% format_date("EndDate", 'd MMMM yyyy HH:mm', 'sv') %]</td></tr> + [% if("Projects" IS NOT NULL, concat('<tr><td>Projekt</td><td>', "Projects", '</td></tr>'), '') %] + [% if("OccurrenceRemarks" IS NOT NULL, concat('<tr><td>Kommentar</td><td>', "OccurrenceRemarks", '</td></tr>'), '') %] + [% if("DatasetName" IS NOT NULL, concat('<tr><td>Källa</td><td>', "DatasetName", '</td></tr>'), '') %] + [% if("Url" IS NOT NULL, concat('<tr><td>URL</td><td><a href="', "Url", '">', "Url", '</a></td></tr>'), '') %] + + <tr><td class="header" colspan="2">Fyndplats</td></tr> + <tr><td>Lokalnamn</td><td>[% "Locality" %]</td></tr> + <tr><td>Koordinater</td><td>N&#8239;[% format_number($y,0,'sv',true,true) %], Ö&#8239;[% format_number($x,0,'sv',true,true) %] (±[% "CoordinateUncertaintyInMeters" %]m) [% @map_crs_description %] + <tr><td>Län</td><td>[% "County" %]</td></tr> + <tr><td>Kommun</td><td>[% "Municipality" %]</td></tr> + + <tr><td class="header" colspan="2">Art</td></tr> + <tr><td colspan="2"> + <ul class="TaxonHierachy"> + <li>[% "Kingdom" %]</li> + <li>[% "Phylum" %]</li> + <li>[% "Class" %]</li> + <li>[% "Order" %]</li> + <li>[% "Family" %]</li> + <li>[% "Genus" %]</li> + </ul> + </td></tr> + <tr><td>Organism grupp</td><td>[% "OrganismGroup" %]</td></tr> + <tr><td>Vetenskapligt namn</td> + <td><span class="ScientificTaxonName">[% "ScientificName" %]</span>[% if("UncertainIdentification", '<span class="UncertainIdentification">(?)</span>', '') %] <span class="ScientificTaxonNameAuthorship">[% "ScientificNameAuthorship" %]</span></td></tr> + <tr><td>Rödlistning</td><td><spac class="RedListCategory[% if("TaxonIsRedlisted", ' RedListed', '')%]">[% + CASE + WHEN "RedlistCategory" = 'EX' THEN 'utdöd (EX)' + WHEN "RedlistCategory" = 'EW' THEN 'utdöd i vilt tillstånd (EW)' + WHEN "RedlistCategory" = 'RE' THEN 'nationellt utdöd (RE)' + WHEN "RedlistCategory" = 'CR' THEN 'akut hotad (CR)' + WHEN "RedlistCategory" = 'EN' THEN 'starkt hotad (EN)' + WHEN "RedlistCategory" = 'VU' THEN 'sårbar (VU)' + WHEN "RedlistCategory" = 'NT' THEN 'nära hotad (NT)' + WHEN "RedlistCategory" = 'LC' THEN 'livskraftig (LC)' + WHEN "RedlistCategory" = 'DD' THEN 'kunskapsbrist (DD)' + WHEN "RedlistCategory" = 'NE' THEN 'ej bedömd (NE)' + WHEN "RedlistCategory" = 'NA' THEN 'ej tillämplig (NA)' + ELSE "RedlistCategory" + END %]</span></td></tr> + <!-- https://www.artdatabanken.se/arter-och-natur/biologisk-mangfald/naturvardsarter/ --> + <tr><td>Naturvård</td><td class="NatureConservation">[% with_variable('NatureConservation', array_filter(array( + if("ProtectedByLaw", '<a href="https://www.naturvardsverket.se/amnesomraden/arter-och-artskydd/fridlysta-arter/">nationellt fridlyst</a>', NULL), + if("TaxonIsInvasiveInSweden", '<a href="https://metadata.artfakta.se/publiceringar/3">främmande i Sverige</a>', NULL), + if("TaxonIsInvasiveEuRegulation", '<a href="https://data.europa.eu/eli/reg/2014/1143/oj">invasiv enligt EU-förordning 1143/2014</a>', NULL), + if("Natura2000HabitatsDirective", 'habitatdirektivet' || + with_variable('Natura2000HabitatsDirectiveAnnexes', array_filter(array( + if("Natura2000HabitatsDirectiveArticle2", concat('<a href="https://eunis.eea.europa.eu/references/2325/species">II', if("Natura2000HabitatsDirectiveArticle2PrioritySpecie", ' (prioriterad art)', ''), '</a>'), NULL), + if("Natura2000HabitatsDirectiveArticle4", '<a href="https://eunis.eea.europa.eu/references/2326/species">IV</a>', NULL), + if("Natura2000HabitatsDirectiveArticle5", '<a href="https://eunis.eea.europa.eu/references/2327/species">V</a>', NULL) + ), @element IS NOT NULL), + if(array_length(@Natura2000HabitatsDirectiveAnnexes) = 0, '', + 's bilag' || if(array_length(@Natura2000HabitatsDirectiveAnnexes) = 1, + 'a ' || array_get(@Natura2000HabitatsDirectiveAnnexes, 0), + 'or ' || array_to_string(array_slice(@Natura2000HabitatsDirectiveAnnexes, 0, -2), ', ') || ' &amp; ' || array_last(@Natura2000HabitatsDirectiveAnnexes)))), + NULL), + if("TaxonIsSignalSpecie", '<a href="https://www.skogsstyrelsen.se/globalassets/miljo-och-klimat/nyckelbitoper/beskrivning_ett-urval-av-naturvardsarter_20201119.pdf">signalart enligt Skogsstyrelsen</a>', NULL), + if("BirdDirective", '<a href="https://eur-lex.europa.eu/legal-content/en/TXT/?uri=CELEX%3A32009L0147">fågeldirektivet' + || with_variable('BirdDirectiveAnnexes', array_filter(array( + if("BirdDirectiveArticle1", 'I', NULL), + if("BirdDirectiveArticle2", 'II', NULL) + ), @element IS NOT NULL), + if(array_length(@BirdDirectiveAnnexes) = 0, '', + 's bilag' || if(array_length(@BirdDirectiveAnnexes) = 1, + 'a ' || array_get(@BirdDirectiveAnnexes, 0), + 'or ' || array_to_string(array_slice(@BirdDirectiveAnnexes, 0, -2), ', ') || ' &amp; ' || array_last(@BirdDirectiveAnnexes)))) + || '</a>', NULL), + if("TaxonIsPriorityBird", '<a href="https://www.skogsstyrelsen.se/globalassets/lag-och-tillsyn/grundforeskrifter-samt-andringar/sksfs-2011-7/sksfs-2014-7-skogsstyrelsens-foreskrifter-och-allmanna-rad-till-skogsvardslagen.pdf">prioriterade fågelart i skogsvårdslagen</a>', NULL) + ), @element IS NOT NULL), + if(array_length(@NatureConservation) = 0, '&ndash;', array_to_string(@NatureConservation, '; '))) %]</td></tr> + <tr><td>URL</td><td><a href="https://artfakta.se/artbestamning/taxon/[% "DyntaxaTaxonId" %]">https://artfakta.se/artbestamning/taxon/[% "DyntaxaTaxonId" %]</a></i></td></tr> + + <tr><td class="header" colspan="2">Datadetaljer</td></tr> + <tr><td>Valideringsstatus</td><td>[% "VerificationStatus" %]</td></tr> + <tr><td>Ändrad</td><td>[% format_date("Modified", 'd MMMM yyyy', 'sv') %]</td></tr> + </table> +</body> + 0 + -- cgit v1.2.3