|
18 | 18 | padding: 0 10px;
|
19 | 19 | }
|
20 | 20 |
|
| 21 | + .header { |
| 22 | + min-height: 149px; |
| 23 | + display: flex; |
| 24 | + align-items: center; |
| 25 | + overflow: hidden; |
| 26 | + width: 100%; |
| 27 | + } |
| 28 | + |
| 29 | + .title { |
| 30 | + margin: 0; |
| 31 | + font-size: 2.6rem; |
| 32 | + padding-right: 149px; |
| 33 | + } |
| 34 | + |
| 35 | + @media only screen and (min-width : 800px) { |
| 36 | + .header { |
| 37 | + min-height: auto; |
| 38 | + } |
| 39 | + .title { |
| 40 | + padding: 1.6rem .8rem; |
| 41 | + } |
| 42 | + } |
21 | 43 |
|
22 | 44 | /* TABS */
|
23 | 45 |
|
24 | 46 | .anchor-tab {
|
25 | 47 | display: inline-block;
|
26 |
| - margin: 0 0 -1px; |
27 |
| - padding: 15px 25px; |
28 |
| - font-weight: 600; |
| 48 | + margin: 0 0 -.08rem; |
| 49 | + padding: 2vw 2.4vw; |
| 50 | + text-decoration: none; |
29 | 51 | text-align: center;
|
30 | 52 | color: #bbb;
|
31 |
| - border: 1px solid transparent; |
| 53 | + border: .08rem solid transparent; |
| 54 | + font-size: 4.5vw; |
| 55 | + } |
| 56 | + |
| 57 | + @media only screen and (min-width : 480px) { |
| 58 | + .anchor-tab { |
| 59 | + padding: .5rem .8rem; |
| 60 | + font-size: 1.2rem; |
| 61 | + } |
32 | 62 | }
|
33 | 63 |
|
34 | 64 | .anchor-tab:hover {
|
|
39 | 69 | main > a:nth-last-of-type(1),
|
40 | 70 | .anchor-tab:target {
|
41 | 71 | color: #555;
|
42 |
| - border: 1px solid #ddd; |
43 |
| - border-top: 2px solid orange; |
44 |
| - border-bottom: 1px solid #fff; |
| 72 | + border: .08rem solid #ddd; |
| 73 | + border-top: .2rem solid orange; |
| 74 | + border-bottom: .08rem solid #fff; |
| 75 | + background: white; |
45 | 76 | }
|
46 | 77 |
|
47 | 78 | .anchor-tab:target ~a:nth-last-of-type(1) {
|
48 | 79 | color: #bbb;
|
49 |
| - border: 1px solid transparent; |
| 80 | + border: .08rem solid transparent; |
| 81 | + background: transparent; |
50 | 82 | }
|
51 | 83 |
|
52 | 84 | .tab-section {
|
53 | 85 | display: none;
|
54 |
| - padding: 20px 0 0; |
55 |
| - border-top: 1px solid #ddd; |
| 86 | + padding: 20px 0 40px; |
| 87 | + border-top: .08rem solid #ddd; |
56 | 88 | }
|
57 | 89 |
|
58 | 90 | main > section:nth-last-of-type(1),
|
|
69 | 101 |
|
70 | 102 | /* END TABS */
|
71 | 103 |
|
72 |
| - .title { |
73 |
| - margin-top: 0; |
74 |
| - padding-top: 0.67em; |
75 |
| - } |
| 104 | + /* CODE PAGE */ |
76 | 105 |
|
77 | 106 | #code-example-1,
|
78 | 107 | #code-example-2 {
|
79 | 108 | display: block;
|
80 | 109 | width: 100%;
|
81 | 110 | height: 8rem;
|
82 | 111 | }
|
83 |
| - |
| 112 | + |
| 113 | + /* END CODE PAGE */ |
| 114 | + |
| 115 | + /* TRY ONLINE PAGE */ |
84 | 116 | #input {
|
85 | 117 | display: block;
|
86 | 118 | width: 100%;
|
|
93 | 125 | height: 8rem;
|
94 | 126 | }
|
95 | 127 |
|
96 |
| - #analyze { |
97 |
| - margin: .375rem; |
| 128 | + /* END TRY ONLINE PAGE */ |
| 129 | + |
| 130 | + /* COMMON */ |
| 131 | + |
| 132 | + .terminal { |
| 133 | + background: #202020; |
| 134 | + color: white; |
| 135 | + padding: .4rem; |
| 136 | + } |
| 137 | + |
| 138 | + .terminal:before { |
| 139 | + content: "$ "; |
| 140 | + color: #f932b8; |
| 141 | + } |
| 142 | + |
| 143 | + .button { |
| 144 | + margin: 5px 0; |
98 | 145 | padding: .84rem 2.14rem;
|
99 | 146 | font-size: .81rem;
|
100 | 147 | background: #2194fa;
|
|
115 | 162 | transition: color .15s ease-in-out,background-color .15s ease-in-out,border-color .15s ease-in-out,box-shadow .15s ease-in-out,-webkit-box-shadow .15s ease-in-out;
|
116 | 163 | }
|
117 | 164 |
|
118 |
| - #analyze:hover { |
| 165 | + .button:hover { |
119 | 166 | background: #4abde8;
|
120 | 167 | }
|
121 | 168 |
|
122 |
| - #analyze:active, #analyze:focus, #analyze:hover { |
| 169 | + .button:active, .button:focus, .button:hover { |
123 | 170 | -webkit-box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15);
|
124 | 171 | box-shadow: 0 5px 11px 0 rgba(0,0,0,.18), 0 4px 15px 0 rgba(0,0,0,.15);
|
125 | 172 | outline: 0;
|
|
132 | 179 | }
|
133 | 180 |
|
134 | 181 | .controls__options {
|
135 |
| - margin-right: 10px; |
| 182 | + display: block; |
| 183 | + margin-bottom: 10px; |
136 | 184 | }
|
137 | 185 |
|
138 | 186 | .controls__input {
|
139 |
| - margin-right: 5px; |
| 187 | + margin-right: 5px; |
| 188 | + vertical-align: middle; |
140 | 189 | }
|
141 | 190 |
|
142 |
| - .terminal { |
143 |
| - background: #202020; |
144 |
| - color: white; |
| 191 | + .text-input { |
145 | 192 | padding: .4rem;
|
| 193 | + width: 70%; |
| 194 | + border: none; |
| 195 | + border-bottom: .08rem solid #aaa; |
| 196 | + background: #eee; |
146 | 197 | }
|
147 | 198 |
|
148 |
| - .terminal:before { |
149 |
| - content: "$ "; |
150 |
| - color: #f932b8; |
| 199 | + @media only screen and (min-width : 800px) { |
| 200 | + .controls__options { |
| 201 | + margin-right: 10px; |
| 202 | + display: inline; |
| 203 | + } |
| 204 | + |
| 205 | + .text-input { |
| 206 | + width: 30%; |
| 207 | + } |
151 | 208 | }
|
| 209 | + |
| 210 | + /* END COMMON */ |
152 | 211 | </style>
|
153 | 212 | </head>
|
154 | 213 | <body>
|
155 |
| - <h1 class="title">JSON-ANALYZER</h1> |
156 |
| - <a href="https://github.com/fetz/json-analyzer"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a> |
157 |
| - |
| 214 | + <header class="header"> |
| 215 | + <h1 class="title">JSON ANALYZER</h1> |
| 216 | + <a href="https://github.com/fetz/json-analyzer"><img style="position: absolute; top: 0; right: 0; border: 0;" src="https://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub"></a> |
| 217 | + </header> |
158 | 218 | <main>
|
159 | 219 | <a href="#details" id="details" class="anchor-tab">Details</a>
|
160 |
| - <a href="#cli-example" id="cli-example" class="anchor-tab">Use it on the terminal</a> |
161 |
| - <a href="#code-example" id="code-example" class="anchor-tab">Use it on your code</a> |
| 220 | + <a href="#cli-example" id="cli-example" class="anchor-tab">Terminal</a> |
| 221 | + <a href="#code-example" id="code-example" class="anchor-tab">Code</a> |
162 | 222 | <a href="#try-online" id="try-online" class="anchor-tab">Try it online</a>
|
163 | 223 |
|
164 | 224 | <section id="details-section" class="tab-section">
|
@@ -196,20 +256,20 @@ <h3>With npm:</h3>
|
196 | 256 | <div class="terminal">npm install -g json-analyzer</div>
|
197 | 257 | </article>
|
198 | 258 | <article>
|
199 |
| - <h2>Execute it:</h2> |
| 259 | + <h2>how to use it:</h2> |
200 | 260 | <div id="terminal" class="terminal">json-analyzer path/to/file.json</div>
|
201 | 261 | <fieldset class="controls">
|
202 | 262 | <label class="controls__options">
|
203 |
| - <input class="controls__input" type="checkbox" name="terminal-pipe" id="terminal-pipe"/>pipe example |
| 263 | + <input class="controls__input" type="checkbox" name="terminal-pipe" id="terminal-pipe"/>with pipe |
204 | 264 | </label>
|
205 | 265 | <label class="controls__options">
|
206 | 266 | <input class="controls__input" type="checkbox" name="terminal-verbose" id="terminal-verbose"/>verbose
|
207 | 267 | </label>
|
208 | 268 | <label class="controls__options">
|
209 |
| - <input class="controls__input" type="number" name="terminal-maxDepth" id="terminal-maxDepth"/>a number of how many levels depth |
| 269 | + <input class="controls__input text-input" type="number" name="terminal-maxDepth" id="terminal-maxDepth" placeholder="max depth > 0"/> |
210 | 270 | </label>
|
211 | 271 | <label class="controls__options">
|
212 |
| - <input class="controls__input" type="text" name="terminal-target" id="terminal-target" placeholder="node[pos].node"/>where to start the analyze |
| 272 | + <input class="controls__input text-input" type="text" name="terminal-target" id="terminal-target" placeholder="target node example: node[pos].node"/> |
213 | 273 | </label>
|
214 | 274 | </fieldset>
|
215 | 275 | </article>
|
@@ -252,14 +312,14 @@ <h3>Paste json below:</h3>
|
252 | 312 | <input class="controls__input" type="checkbox" name="verbose" id="verbose"/>verbose
|
253 | 313 | </label>
|
254 | 314 | <label class="controls__options">
|
255 |
| - <input class="controls__input" type="number" name="maxDepth" id="maxDepth"/>a number of how many levels depth |
| 315 | + <input class="controls__input text-input" type="number" name="maxDepth" id="maxDepth" placeholder="max depth > 0"/> |
256 | 316 | </label>
|
257 | 317 | <label class="controls__options">
|
258 |
| - <input class="controls__input" type="text" name="target" id="target" placeholder="node[pos].node"/>where to start the analyze |
| 318 | + <input class="controls__input text-input" type="text" name="target" id="target" placeholder="target node example: node[pos].node"/> |
259 | 319 | </label>
|
260 | 320 | </fieldset>
|
261 | 321 | </div>
|
262 |
| - <button id="analyze">analyze</button> |
| 322 | + <button id="analyze" class="button">analyze</button> |
263 | 323 | <div id="input-wrapper">
|
264 | 324 | <h3>Result:</h3>
|
265 | 325 | <div id="output"></div>
|
|
0 commit comments