-
Notifications
You must be signed in to change notification settings - Fork 2
chore(viewer): adjust for langString #73
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
0c44085
chore(viewer): adjust for langString
jeff-zucker 9e74c0c
chore(viewer): local2pod script
jeff-zucker 580afd7
chore(viewer): remove hard-coded URL
jeff-zucker e2c14c1
chore(viewer): remove console log
jeff-zucker bc55bb3
chore(viewer): cleanup
jeff-zucker 66d4104
chore(viewer): cleanup unused folders
jeff-zucker 7703512
chore(viewer): repoint v2
jeff-zucker File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,76 @@ | ||
| <!DOCTYPE html> | ||
| <html lang="en"> | ||
| <head> | ||
| <meta charset="UTF-8"> | ||
| <meta name="viewport" content="width=device-width, initial-scale=1.0"> | ||
| <title>Solid Resources Catalog</title> | ||
| <script type="module" src='https://cdn.jsdelivr.net/npm/mashlib@latest/dist/mashlib.min.js'></script> | ||
| <!-- <script type="module" src='./node_modules/mashlib/dist/mashlib.min.js'></script> --> | ||
| <link rel="stylesheet" type="text/css" href="./viewer/viewer.css"> | ||
| <link rel="stylesheet" type="text/css" href="./viewer/forms.css"> | ||
| <link rel="icon" href="https://solidproject.org/assets/img/solid-emblem.svg" type="image/svg+xml"> | ||
| <meta name="thumbnail" content="https://solidproject.org/assets/img/solid-emblem.svg"> | ||
| </head> | ||
| <body> | ||
| <div id="main-content"> | ||
| <div class="sol-header"> | ||
| <img src="./assets/logo.svg" class="logo"> | ||
| <span class="sol-header-content"> | ||
| <b style="display:inline-block;padding-left:1rem;padding-right:1rem;"> Solid Resources Catalog </b> | ||
| <sol-catalog-search class="search-input"><input type="text"> | ||
| <button class="search-button">search</button></sol-catalog-search> | ||
| <button class="keyword-index-button">keyword index</button> | ||
| <button class="new-record-button">new record</button> | ||
| <button class="about-button" source="./catalog-about.html">about</button> | ||
| </span> | ||
| </div> | ||
|
|
||
| <div id="main"> | ||
| <div id="left-column"> </div> | ||
| <div id="right-column"> | ||
| <div id="right-top"></div> | ||
| <div id="right-bottom"></div> | ||
| </div> | ||
| </div> | ||
| </div> | ||
|
|
||
| <div id="forms-area" style="display:none"> | ||
| <div id="menubar"></div> | ||
| <form id="forms-record" class="record"></form> | ||
| </div> | ||
|
|
||
| <div id="help" style="display:none"> | ||
| <button style="text-align:right" onclick="document.body.classList.remove('showHelp')"><<</button> | ||
| <h1 style="font-size:1.4em !important">Solid Resources Catalog</h1> | ||
|
|
||
| <p>This catalog is a work in progress and not all data has been recently updated. Please help by updataing records for yourself, your organization, and your projects.</p> | ||
|
|
||
| <p>There are three main ways to navigate the catalog:</p> | ||
|
|
||
| <ul> | ||
| <li> Use the list of resource types at the left of the screenb | ||
| <li> Use the full text searchbar at the top of the screen | ||
| <li> Use the keyword index at the top of the screen | ||
| <li> Navigate to a record and jump to related records | ||
| </ul> | ||
|
|
||
| <p>If you do not find a record for yourself or your projects, use the *new record* button at the top of the screen to create one.</p> | ||
|
|
||
| <p>To read more about the catalog and other viewers for it, see <a href="https://github.com/solid/catalog">the gitihub repository</a> and/or catch me (@jeff-zucker) on matrix.</p> | ||
| </div> | ||
|
|
||
| <script> | ||
| var sh; | ||
| </script> | ||
| <script type="module"> | ||
| import {viewer,showSubtypes} from './viewer/viewer.js'; | ||
| document.addEventListener('DOMContentLoaded', async () => { | ||
| sh = showSubtypes; | ||
| await viewer(); | ||
| }); | ||
| </script> | ||
|
|
||
| </body> | ||
| </html> | ||
|
|
||
|
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| import { SolidNodeClient } from "solid-node-client"; | ||
| const client = new SolidNodeClient; | ||
|
|
||
| async function local2pod(){ | ||
| try { | ||
| await client.login(); | ||
| } | ||
| catch(e){ console.log(e); } | ||
| for(let file of files){ | ||
| const from = `file:///`+process.cwd()+ '/' + file; | ||
| const to = `https://solidproject.solidcommunity.net/catalog/${file}`; | ||
elf-pavlik marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| try { | ||
| const getResponse = await client.fetch(from); | ||
| const content = await getResponse.text(); | ||
| const contentType = getResponse.headers.get('Content-type'); | ||
| const putResponse = await client.fetch( to, { | ||
| method:"PUT", | ||
| body:content, | ||
| headers:{"content-type":contentType} | ||
| }); | ||
| console.log(putResponse.status,to) | ||
| } | ||
| catch(e){ console.log(e); } | ||
| } | ||
| } | ||
|
|
||
| const files = [ | ||
| 'index.html', | ||
| 'catalog-data.ttl', | ||
| 'catalog-skos.ttl', | ||
| 'catalog-shacl.ttl', | ||
| 'assets/logo.svg', | ||
| 'viewer/form.js', | ||
| 'viewer/forms.css', | ||
| 'viewer/makeTOC.js', | ||
| 'viewer/page-content.js', | ||
| 'viewer/pages.js', | ||
| 'viewer/showRecord.js', | ||
| 'viewer/utils.js', | ||
| 'viewer/viewer.css', | ||
| 'viewer/viewer.html', | ||
| 'viewer/viewer.js', | ||
| ]; | ||
|
|
||
| local2pod(); | ||
|
|
||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.