Language-Research-Technology / ro-crate-html-lite

A tool to create a complete, completely static to-crate-preview.html file which with the same functionality as ro-crate-html-js but without any dependence on online resources or Javascript (except for some small helpers)
https://language-research-technology.github.io/ro-crate-html-lite/
GNU General Public License v3.0
0 stars 0 forks source link

Blank page on generated HTML from s11 ro-crate #4

Open stain opened 2 weeks ago

stain commented 2 weeks ago

Using this file https://github.com/stain/s11.no/blob/main/content/2023/phd/ro-crate-metadata.json as input in Chromium I do get a generated HTML, but it renders as a blank page both in Chromium and Firefox.

It seems all elements are hidden by .entity { display: none; position: static; top: 0; width: 100%; min-height: 100%; z-index: 1000; padding: 0px; }

and the root entity is not recognised.. because it's a detached crate or RO-Crate 1.2?

  {
      "@id": "https://w3id.org/ro/doi/10.5281/zenodo.8113625",
      "@type": [
        "Dataset",
        "Thesis"
      ],
      "encoding": {
        "@id": "thesis.pdf"
      },
      "inSupportOf": "graad van doctor",
      "sourceOrganization": {
        "@id": "https://ror.org/04dkp9463"
      },
      "author": {
        "@id": "https://orcid.org/0000-0001-9842-9718"
      },
      "datePublished": "2024-07-30",
      "dateModified": "2024-09-15",
      "description": "RO-Crate of PhD thesis submitted to the University of Amsterdam",
      "hasPart": [
        {
          "@id": "https://s11.no/2022/phd/introduction/"
        },
        {
          "@id": "https://s11.no/2023/phd/background/"
        },
        {
          "@id": "https://s11.no/2023/phd/fdo-and-linked-data/"
        },
        {
          "@id": "https://s11.no/2023/phd/ro-crate/"
        },
        {
          "@id": "https://s11.no/2023/phd/workflows/"
        },
        {
          "@id": "https://s11.no/2022/phd/conclusions/"
        },
        {
          "@id": "https://s11.no/2022/phd/acknowledgements/"
        },
        {
          "@id": "https://s11.no/2022/phd/contributions/"
                                                                      },
        {
          "@id": "#supplements"
        },
        {
          "@id": "thesis.pdf"
        }
      ],
      "identifier": {
        "@id": "https://doi.org/10.5281/zenodo.8113625"
      },
      "license": {
        "@id": "https://creativecommons.org/licenses/by/4.0/"
      },
      "name": "FAIR Research Objects and Computational Workflows – A Linked Data Approach",
      "publisher": {
        "@id": "https://s11.no/"
      },
      "temporalCoverage": "2019-06/2024-05",
      "url": "https://s11.no/2023/phd/",
      "cite-as": "https://doi.org/10.5281/zenodo.8113625"
    },

    {
      "@id": "ro-crate-metadata.json",
      "@type": "CreativeWork",
      "conformsTo": "https://w3id.org/ro/crate/1.2-DRAFT",
      "about": {
        "@id": "https://w3id.org/ro/doi/10.5281/zenodo.8113625"
      }
    }
ptsefton commented 1 week ago

Looking into this - the issue is not with finding the root dataset - it works for me - it is making sure the root dataset shows when the page first loads.

ptsefton commented 1 week ago

@stain I was unable to reproduce this but I have changed the code so the Root entity always shows so you should not get any more blank docs - please retest (also changed the form so you can paste in ro-crate JSON but I can't do an upload button as such as this is serverless).

Please try again here: https://language-research-technology.github.io/ro-crate-html-lite/

ptsefton commented 1 week ago

We think we have fixed all the main issues with the thesis crate now @stain -- can you please try again.

ptsefton commented 1 day ago

(The elements are meant to be hidden - that is so that it works with large crates - they show up when they are in focus, ie when you click a link)