Coder Social home page Coder Social logo

jpadfield / simple-site Goto Github PK

View Code? Open in Web Editor NEW
29.0 4.0 29.0 10.91 MB

Automated process for creating a set of html web pages for github projects

Home Page: https://jpadfield.github.io/simple-site/

License: GNU General Public License v3.0

PHP 100.00%
github-pages github-actions automation iiif mermaid digital-humanities json-files heritage-science vre virtual-research-environment

simple-site's People

Contributors

jpadfield avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

simple-site's Issues

Referencing an external version of Mirador

When possible it will be good to update the build.php process to call the Mirador files from https://unpkg.com/ to stay consistent with the other external files. They are currently pulled from https://github.com/tanc-ahrc/mirador

simple-site/build/build.php

Lines 643 to 662 in 4e50108

// The mirador files could also be pulled from https://unpkg.com
// But version 2.7.2 did not seem to work, will try again once V3 is
// fully released. - jpadfield 30/03/20
$pd["extra_css_scripts"][] =
"https://tanc-ahrc.github.io/mirador/mirador/css/mirador-combined.css";
$pd["extra_js_scripts"][] =
"https://tanc-ahrc.github.io/mirador/mirador/mirador.min.js";
$pd["extra_js"] .= '
$(function() {
myMiradorInstance = Mirador({
id: "viewer",
layout: "1x1",
buildPath: "https://tanc-ahrc.github.io/mirador/mirador/",
data: '.$mans.',
"windowObjects": '.$wo.',
annotationEndpoint: {
name:"Local Storage",
module: "LocalStorageEndpoint" }
});
});';

Improving navigation options

What improvements could be made to the navigation options, dropdowns, links to sub-pages with parent pages, breadcrumbs etc?

Develop the list extension to present details from Zotero

Zotero's API allows the details of public collections to be extracted and re-used.

It could be useful for these details to be pull, formatted and presented as part of a simple-site page.

Public collection URLs are in the form: https://www.zotero.org/USERNAME/collections/COLLECTIONCODE

API calls are in the form: https://api.zotero.org/users/USERID/collections/COLLECTIONCODE/items

The USERID is not easy to get from the USERNAME via the API but it can be scraped from any public URL is a section of javascript:

		<script type="application/json" id="zotero-web-library-config">
			{
    "apiConfig": {
        "apiAuthorityPart": "api.zotero.org"
    },
    "streamingApiUrl": "wss:\/\/stream.zotero.org",
    "translateUrl": "https:\/\/t0guvf0w17.execute-api.us-east-1.amazonaws.com\/Prod\/",
    "libraries": {
        "include": [
            {
                "key": "uUSERID",
                "isGroupLibrary": false,
                "name": "USER DISPLAY NAME's Library",
                "slug": "USERNAME"
            }
        ],
        "includeMyLibrary": false,
        "includeUserGroups": false
    }
}		</script>

So given a public URL an extension would need to:

  1. Scrape the USERID
  2. Create the API URL
  3. Pull in the JSON details
  4. Extract what is needed
  5. Format an html based list

Some thought swill need to be given to exactly what data is used and how it should be displayed

Mirador 3 - need to use catalog variable in config

With the shift from M2 to M3 extra manifests need to be added within a "catalog" variable rather than the old "Manifests" varibale

"catalog": [
  {"manifestId": "https://data.ng-london.org.uk/0FNR-0001-0000-0000.iiif "}, 
  {"manifestId": "https://manifests.britishart.yale.edu/manifest/34"}, 
  {"manifestId": "https://iiif.harvardartmuseums.org/manifests/object/299843"}, 
  {"manifestId": "https://media.nga.gov/public/manifests/nga_highlights.json"}],

Instead of

manifests: {
"https:\/\/data.ng-london.org.uk\/0FNR-0001-0000-0000.iiif ":{"provider":"Undefined"},
"https:\/\/manifests.britishart.yale.edu\/manifest\/34":{"provider":"Undefined"},
"https:\/\/iiif.harvardartmuseums.org\/manifests\/object\/299843":{"provider":"Undefined"},
"https:\/\/media.nga.gov\/public\/manifests\/nga_highlights.json":{"provider":"Undefined"},},

The simple text example now works, but the full Mirador extension needs to be cleaned up

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.