Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,15 @@
"date-fns": "^1.28.1",
"flat": "^2.0.1",
"flux": "^2.1.1",
"material-ui": "^0.18.1",
"normalize.css": "^7.0.0",
"prop-types": "^15.5.10",
"query-string": "^4.3.2",
"ramda": "^0.23.0",
"react": "^15.0.1",
"react-dom": "^15.0.1",
"react-syntax-highlighter": "^5.6.0",
"react-tap-event-plugin": "^2.0.1",
"uuid": "^3.0.1"
},
"devDependencies": {
Expand Down
293 changes: 16 additions & 277 deletions src/css/app.css
Original file line number Diff line number Diff line change
@@ -1,296 +1,35 @@
* {
box-sizing: border-box;
}

html {
font-family: sans-serif;
font-size: 10px;
}

body {
margin: 0;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 14px;
color: #333;
background-color: #fff;
}

p > code {
background: #eee;
border: 1px solid #ccc;
border-radius: 3px;
padding: 0 4px;
color: darkred;
}

pre {
margin: 0 0 10px;
border: 1px solid #ccc;
border-radius: 3px;
}

.container {
padding-right: 15px;
padding-left: 15px;
margin-right: auto;
margin-left: auto;
width: 760px;
}

.header {
display: flex;
}

.header h1 {
width: 50%;
margin-bottom: 0;
}

.header h1 a {
text-decoration: none;
color: #000;
cursor: pointer;
}

.header span {
text-align: right;
width: 50%;
margin-top: 5px;
font-size: 12px;
}

a {
color: #337ab7;
text-decoration: none;
background-color: transparent;
}

a:active,
a:hover {
outline: 0;
}

a:hover {
color: #23527c;
text-decoration: underline;
}

a.site-link {
cursor: pointer;
line-height: 1.4;
}

table {
border-spacing: 0;
border-collapse: collapse;
background-color: transparent;
}

td,
th {
padding: 0;
}

th {
text-align: left;
}

.table {
width: 100%;
max-width: 100%;
margin-bottom: 20px;
}

.table > thead > tr > th,
.table > tbody > tr > th,
.table > tfoot > tr > th,
.table > thead > tr > td,
.table > tbody > tr > td,
.table > tfoot > tr > td {
padding: 8px;
line-height: 1.42857143;
vertical-align: top;
border-top: 1px solid #ddd;
}

.table > thead > tr > th {
vertical-align: bottom;
border-bottom: 2px solid #ddd;
}

.table > thead:first-child > tr:first-child > th {
border-top: 0;
}
.table-striped > tbody > tr:nth-of-type(odd) {
background-color: #f9f9f9;
p {
margin-bottom: 1em;
margin-top: 0;
}

textarea {
width: 730px;
height: 350px;
}

ul.side-options {
display: flex;
flex-direction: row;
list-style-type: none;
padding: 0;
margin: 15px 0;
}

ul.side-options.right {
justify-content: flex-end;
}

ul.side-options li {
margin-right: 15px;
}

ul.side-options li.active {
font-weight: bold;
}

ul.side-options li:last-of-type {
margin-right: 0;
font-size: 13px;
font-family: monospace, monospace;
color: #333;
background-color: #f5f5f5;
border: 1px solid #ccc;
border-radius: 4px;
}

.checkbox-label {
margin-right: 10px;
cursor: pointer;
pre {
border: 1px solid #ccc;
border-radius: 4px;
font-size: 13px;
}

/* Home */

.home-cont .drag-drop-area {
width: 730px;
.drag-drop-area {
width: 100%;
height: 200px;
border: 3px dashed #AAA;
display: flex;
justify-content: center;
align-items: center;
}

/* Filters */

.filters {
margin: 10px 0 15px 0;
}

.filters tbody tr.inactive {
background: #cccccc;
opacity: 0.6;
}

.filter-controls {
display: flex;
align-items: flex-start;
}

.filter-controls select {
width: 170px;
margin-right: 10px;
}

.filter-controls .inputs {
flex: 1;
display: flex;
flex-direction: column;
}

.filter-controls input {
width: 150px;
margin-bottom: 5px;
}

.filter-controls.number input {
width: 100px;
}

.filter-controls input:last-of-type {
margin-bottom: 0;
}

/* Controls */

.input-control {
display: flex;
align-items: flex-start;
margin-bottom: 5px;
}

.input-control label {
width: 100px;
}

.input-control .body {
flex: 1;
display: flex;
flex-direction: column;
}

.input-control .body .grouping,
.input-control .body .sorter {
line-height: 22px;
}

.input-control .body .grouping a,
.input-control .body .sorter a {
margin-left: 30px;
}

.input-control select {
min-width: 100px;
margin-right: 10px;
}

/* Results */

.results-options {
display: flex;
justify-content: space-between;
}

/* Summary */

h3.summary {
margin-bottom: 0;
}

.summary-stats {
display: flex;
flex-direction: row;
align-items: flex-start;
flex-wrap: wrap;
flex-flow: row wrap;
align-content: flex-end;
}

.summary-stats p {
width: 200px;
margin-bottom: 0;
}

/* From Url */

.from-url-cont {
height: 300px;
display: flex;
justify-content: center;
flex-direction: column;
}

.from-url-cont p {
text-align: center;
}

/* From Url */

.schema-edit-cont .rows {
display: flex;
align-items: flex-start;
}

.schema-edit-cont .rows pre {
flex-basis: 20%;
flex-grow: 1;
margin-left: 15px;
}
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
{% endif %}
</head>
<body>
<div class="container"></div>
<div class="main"/>
<script src="bundle.js"></script>
</body>
</html>
8 changes: 7 additions & 1 deletion src/js/components/code.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,18 @@ const resultsStyle = require("react-syntax-highlighter/dist/styles/github").defa
SLH.registerLanguage("json", language)

function Code(props) {
return (<SyntaxHighlighter language={props.language} style={resultsStyle}>
return (<SyntaxHighlighter
codeTagProps={{
style: props.inline ? {whiteSpace: "normal"} : undefined,
}}
language={props.language}
style={resultsStyle}>
{props.children}
</SyntaxHighlighter>)
}

Code.propTypes = {
inline: PropTypes.bool,
children: PropTypes.node.isRequired,
language: PropTypes.oneOf(["json"]),
}
Expand Down
26 changes: 26 additions & 0 deletions src/js/components/inset.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
const React = require("react")
const PropTypes = require("prop-types")

const SIZE = 16

function Inset({children, horizontal, vertical}) {
return <div style={{
paddingLeft: horizontal ? SIZE : 0,
paddingRight: horizontal ? SIZE : 0,
paddingTop: vertical ? SIZE : 0,
paddingBottom: vertical ? SIZE : 0,
}}>{children}</div>
}

Inset.defaultProps = {
horizontal: true,
vertical: true,
}

Inset.propTypes = {
children: PropTypes.node.isRequired,
horizontal: PropTypes.bool.isRequired,
vertical: PropTypes.bool.isRequired,
}

module.exports = Inset
Loading