You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Thanks for the pointers on javascript and React-JS. I've adapted your minimal example into an prototype for users to generate codemeta.json files (and integrated it into the Hugo styling of the site):
Main source file is added in as a shortcode, (though should probably go directly into content/create.html) . Reads a very incomplete json-schema file from static/schema.json since I thought it made sense to separate that out (technically still a js file and not a json file, guess i should fix that too).
The layout of the form does take up a lot of space, so not sure if it will ever make sense to support all possible codemeta fields. The styling is a bit subtle at the moment -- the box color bar will go from purple (the theme color) to red if you type a non-URI into url or codeRepository.
I hacked in the method to download a codemeta.json file by myself (thanks stackoverflow really, but still my first time writing javascript 🐱, so it may very well be terrible...
Also, I didn't see a way to have fields like @type and @context elements be automatically pre-populated in the output JSON but not visible in the form part. Currently it doesn't use any custom uiSchema styling, maybe there's a "hide" option?
Anyway, let me know what you think!
If I can polish this up a bit and add enough fields to actually be somewhat useful (e.g. author / contributor roles) I think this could make a nice easy entrypoint for getting started with codemeta.
thanks again for getting me rolling on this!
The text was updated successfully, but these errors were encountered:
That looks great, glad it ended up working out for you.
Currently it doesn't use any custom uiSchema styling, maybe there's a "hide" option?
I wonder. I haven't looked at that but I see why you'd want it. I can think of three or four different ways you could do this. I'll take a look some time in the next couple of weeks.
@amoeba Thanks! I did find a hidden option in the uiSchema , turned out to be super simple after all. (The FAQ confused me by mentioning that show/hide is not implemented; but apparently that's referring to toggling show/hide for fields, which might also be useful at some stage...)
I probably need to delve into how to customize the HTML look of the elements more at some stage, that looks more intimidating.
Looks like we could easily pre-populate things like programmingLanguage and License fields if necessary, though not sure how helpful that would be...
Also @mbjones isn't a fan of the purple so I may need to swap in a new bootstrap color palette...
Hey @amoeba,
Thanks for the pointers on javascript and React-JS. I've adapted your minimal example into an prototype for users to generate codemeta.json files (and integrated it into the Hugo styling of the site):
https://codemeta.github.io/create/
Main source file is added in as a shortcode, (though should probably go directly into
content/create.html
) . Reads a very incomplete json-schema file from static/schema.json since I thought it made sense to separate that out (technically still ajs
file and not ajson
file, guess i should fix that too).The layout of the form does take up a lot of space, so not sure if it will ever make sense to support all possible codemeta fields. The styling is a bit subtle at the moment -- the box color bar will go from purple (the theme color) to red if you type a non-URI into
url
orcodeRepository
.I hacked in the method to download a
codemeta.json
file by myself (thanks stackoverflow really, but still my first time writing javascript 🐱, so it may very well be terrible...Also, I didn't see a way to have fields like
@type
and@context
elements be automatically pre-populated in the output JSON but not visible in the form part. Currently it doesn't use any customuiSchema
styling, maybe there's a "hide" option?Anyway, let me know what you think!
If I can polish this up a bit and add enough fields to actually be somewhat useful (e.g. author / contributor roles) I think this could make a nice easy entrypoint for getting started with codemeta.
thanks again for getting me rolling on this!
The text was updated successfully, but these errors were encountered: