Skip to content

Commit

Permalink
Merge pull request #3 from elsevierlabs-os/dev
Browse files Browse the repository at this point in the history
Stability improvements
  • Loading branch information
RinkeHoekstra committed Jun 21, 2023
2 parents dcf3e1d + 3fac178 commit acaeba8
Show file tree
Hide file tree
Showing 7 changed files with 269 additions and 221 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,6 @@ Set this to `true` if you want the viewer to allow loading local CSS into the HT
### Always Dereference IRIs
When set to `true`, every time an IRI resource is clicked in the UI, the extension will attempt to dereference the IRI and populate the internal store with the retrieved triples.

### Has Part IRI
The viewer uses a "has part" relation to determine what the relevant parts of the document are that need to be used to show associated triples. The default is `https://schema.org/hasPart`. If your data does not show up in the viewer, make sure the "has part" relation in the setting matches the one in your data.

### Load Local Contexts
Standard JSON-LD libraries will only load files through dereferencing, or assume that the JSON-LD file is hosted on an HTTP server. Setting this option to `true` will make the extension attempt to load JSON-LD context files from a local path. This means that a JSON-LD file can refer to its context using an abbreviated IRI.

Expand Down
3 changes: 2 additions & 1 deletion media/js/cpldviewer.js

Large diffs are not rendered by default.

19 changes: 12 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"license": "SEE LICENSE IN LICENSE.md",
"repository": "https://github.com/elsevierlabs-os/cpld-viewer.git",
"icon": "media/img/cpld-icon.png",
"version": "1.0.2",
"version": "1.0.3",
"engines": {
"vscode": "^1.61.0"
},
Expand All @@ -21,11 +21,21 @@
"commands": [
{
"command": "cpld.show",
"title": "CPLD Viewer"
"title": "CPLD Viewer",
"when": "editorLangId == html"
}
],
"configuration": {
"title": "CPLD Viewer",
"keybindings": [
{
"command": "cpld.show",
"key": "ctrl+alt+p",
"mac": "ctrl+alt+p",
"when": "editorTextFocus"
}

],
"properties": {
"cpld.allowLocalStyles": {
"type": "boolean",
Expand Down Expand Up @@ -56,11 +66,6 @@
"type": "string",
"default": "https://your.linked.data.proxy/example.browse?uri=",
"description": "Proxy URL prefix to use when dereferencing Linked Data. Needs to be CORS enabled."
},
"cpld.hasPartIRI": {
"type": "string",
"default": "https://schema.org/hasPart",
"description": "IRI of the hasPart property to use."
}
}
}
Expand Down
8 changes: 7 additions & 1 deletion src/cpldviewer.css
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,16 @@ body {
}

.cpld-box {
background: rgba(170, 170, 170, 0.2);
background: rgba(170, 170, 170, 0.4);
cursor: pointer;
}

.cpld-box::before {
content: "◊ ";
font-weight: bold;
color: #FA6900 !important;
}

.cpld-decorated:hover {
background: rgba(170, 170, 170, 0.2);
cursor: pointer;
Expand Down
Loading

0 comments on commit acaeba8

Please sign in to comment.