Skip to content

Instantly share code, notes, and snippets.

@mediawrangler
mediawrangler / drawer-menu.toml
Last active May 8, 2019 18:49
here's a starting point
[drawer-menu]
[drawer-menu.metadata]
name = "Drawer Menu"
path = "ui/drawer-menu"
advanced = [
"configs"
]
[drawer-menu.jsonschema]
myactivity:
metadata:
title: 'Some Great Section'
description: '_____'
tags:
- 'something'
collection:
- 'pages.mypage'
- 'pages.mypage'
- 'pages.mypage'
@mediawrangler
mediawrangler / dr.html
Created August 1, 2019 20:31
Dangon Ronpa Dialogue Engine
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<title>Dangon Ronpa Dialogue Engine</title>
<script>
//
function keyDownHandler(e) {
if (handlekeydown) {
@mediawrangler
mediawrangler / QA-Feedback JSON Schema Example
Created March 24, 2020 18:51
QA-Feedback JSON Schema Example
{
"title": "QA Feedback",
"type": "object",
"definitions": {
"node": {
"type": "object",
"properties": {
"type": {
"description": "Supported types only",
"enum": [
@mediawrangler
mediawrangler / oneof
Created June 18, 2020 20:23
oneof example without dependency keyword
{
"definitions": {},
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"colour": {
"type": "string",
"enum": ["red", "black", "blue"]
},
@mediawrangler
mediawrangler / oneof
Created June 18, 2020 20:23
oneof example without dependency keyword
{
"definitions": {},
"$schema": "http://json-schema.org/draft-04/schema#",
"type": "object",
"properties": {
"colour": {
"type": "string",
"enum": ["red", "black", "blue"]
},
@mediawrangler
mediawrangler / schema-dependencies.json
Last active July 17, 2020 01:11
Schema Dependencies
/*
Below are three examples of jsonschema with dependencies; test them here: https://rjsf-team.github.io/react-jsonschema-form/
*/
{
"title": "Example of the basic schema dependency",
"type": "object",
"required": [],
"properties": {
@mediawrangler
mediawrangler / schema-dependencies-jaml.js
Created July 17, 2020 01:04
Schema Dependencies JAML
/*
Here are the same three examples in a proposed JAML syntax
Example 2 below should already be supported by the JAML compiler
*/
/***
* @View
*
* @name example1
@mediawrangler
mediawrangler / schema-oneof.json
Last active August 4, 2020 15:53
Schema 'oneOf' (no dependency)
{
"title": "Example of the 'oneOf' keyword as it can be applied directly to an object. This case is similar to what we encounter in the 'assessment' block.",
"type": "object",
"required": [],
"oneOf": [{
"title": "First Option Title",
"properties": {
"assessment_slug": {
"type": "string"
}
@mediawrangler
mediawrangler / schema-oneof-jaml.js
Last active August 4, 2020 15:54
Schema 'oneOf' JAML (no dependency)
/***
* @View
*
* @name example
* @type block
* @description Example of (oneOf) schema; no dependency
* @stable
* @content
* @contains @one_of with:
* @title "Option One"