Skip to content

Commit 1b600eb

Browse files
committed
Content-matching using colored borders and better syntax highlight colors
1 parent b660d56 commit 1b600eb

File tree

4 files changed

+36
-45
lines changed

4 files changed

+36
-45
lines changed

src/Pages/Home/JwtDecoder/JwtDecoder.cshtml

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
@page "~/jwt-decoder"
1+
@page "~/jwt-decoder"
22
@model IdentityServerHost.Pages.Home.JwtDecoder
33

44
<div class="jwt-decoder-page">
@@ -59,13 +59,11 @@
5959
<h3>Decoded JWT</h3>
6060
<div class="jwt-decoded-output">
6161
<h4 class="pt-1">Header</h4>
62-
<div id="jwt-header" class="jwt-decoded jwt-header bg-dark p-2">&nbsp;</div>
62+
<div id="jwt-header" class="jwt-decoded jwt-header bg-dark text-light p-2">&nbsp;</div>
6363
<h4 class="pt-1">Payload</h4>
64-
<div id="jwt-payload" class="jwt-decoded jwt-payload bg-dark p-2">&nbsp;</div>
64+
<div id="jwt-payload" class="jwt-decoded jwt-payload bg-dark text-light p-2">&nbsp;</div>
6565
<h4 class="pt-1">Signature</h4>
66-
<div class="jwt-decoded bg-dark p-2">
67-
<pre id="jwt-signature" class="jwt-signature">&nbsp;</pre>
68-
</div>
66+
<pre id="jwt-signature" class="jwt-decoded jwt-signature bg-dark text-light p-2">&nbsp;</pre>
6967
<div class="jwt-signature-validation-result alert alert-success align-items-center d-none">
7068
<i class="glyphicon glyphicon-ok-sign" style="font-size: 3em" title="Valid signature"></i>
7169
<div class="result-message mx-3">This JWT has a valid signature.</div>

src/wwwroot/css/site.css

Lines changed: 15 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -113,34 +113,27 @@ a.navbar-brand .icon-banner {
113113
}
114114
.jwt-decoder-container .jwt-decoded {
115115
text-wrap: auto;
116-
background-color: #000000;
117-
color: #eee !important;
118116
}
119-
.jwt-decoder-container .jwt-decoded.jwt-header .json-content {
120-
background-color: rgba(252, 57, 57, 0.1882352941) !important;
117+
.jwt-decoder-container .jwt-decoded.jwt-header {
118+
border: 4px solid #fc3939;
121119
}
122-
.jwt-decoder-container .jwt-decoded.jwt-payload .json-content {
123-
background-color: rgba(19, 185, 85, 0.1882352941) !important;
120+
.jwt-decoder-container .jwt-decoded.jwt-payload {
121+
border: 4px solid #13b955;
124122
}
125-
.jwt-decoder-container .jwt-decoded .jwt-signature {
126-
color: #eee !important;
127-
background-color: rgba(239, 163, 29, 0.1882352941);
128-
margin: 0;
123+
.jwt-decoder-container .jwt-decoded.jwt-signature {
124+
border: 4px solid #efa31d;
129125
}
130126
.jwt-decoder-container .jwt-input-editable {
131127
word-wrap: anywhere;
132128
}
133129
.jwt-decoder-container .jwt-input-editable .text-danger {
134-
color: #eee !important;
135-
background-color: rgba(252, 57, 57, 0.1882352941);
130+
color: #fc3939 !important;
136131
}
137132
.jwt-decoder-container .jwt-input-editable .text-success {
138-
color: #eee !important;
139-
background-color: rgba(19, 185, 85, 0.1882352941);
133+
color: #13b955 !important;
140134
}
141135
.jwt-decoder-container .jwt-input-editable .text-warning {
142-
color: #eee !important;
143-
background-color: rgba(239, 163, 29, 0.1882352941);
136+
color: #efa31d !important;
144137
}
145138
.jwt-decoder-container .json-content, .jwt-decoder-container .jwt-input-editable {
146139
font-family: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
@@ -150,18 +143,21 @@ a.navbar-brand .icon-banner {
150143
color: #eee !important;
151144
}
152145
.jwt-decoder-container .json-content .json-key {
153-
color: goldenrod !important;
146+
color: gold !important;
154147
}
155148
.jwt-decoder-container .json-content .json-boolean, .jwt-decoder-container .json-content .json-number {
156-
color: chocolate !important;
149+
color: cyan !important;
157150
}
158151
.jwt-decoder-container .json-content .json-string {
159-
color: darkcyan !important;
152+
color: coral !important;
160153
}
161154
.jwt-decoder-container .json-content .json-explanation {
162155
color: springgreen !important;
163156
font-style: italic;
164157
}
158+
.jwt-decoder-container .json-content .json-structure {
159+
color: #eee !important;
160+
}
165161
.jwt-decoder-container .jwt-signature {
166162
font-size: 1em;
167163
}

src/wwwroot/css/site.min.css

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/wwwroot/css/site.scss

Lines changed: 16 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -127,40 +127,33 @@ a.navbar-brand {
127127

128128
.jwt-decoded {
129129
text-wrap: auto;
130-
background-color: #000000;
131-
color: #eee !important;
132130

133-
&.jwt-header .json-content {
134-
background-color: #fc393930 !important;
131+
&.jwt-header {
132+
border: 4px solid #fc3939;
135133
}
136134

137-
&.jwt-payload .json-content {
138-
background-color: #13b95530 !important;
135+
&.jwt-payload {
136+
border: 4px solid #13b955;
139137
}
140138

141-
.jwt-signature {
142-
color: #eee !important;
143-
background-color: #efa31d30;
144-
margin: 0;
139+
&.jwt-signature {
140+
border: 4px solid #efa31d;
145141
}
146142
}
147143

148144
.jwt-input-editable {
149145
word-wrap: anywhere;
150146

151147
.text-danger {
152-
color: #eee !important;
153-
background-color: #fc393930;
148+
color: #fc3939 !important;
154149
}
155150

156151
.text-success {
157-
color: #eee !important;
158-
background-color: #13b95530;
152+
color: #13b955 !important;
159153
}
160154

161155
.text-warning {
162-
color: #eee !important;
163-
background-color: #efa31d30;
156+
color: #efa31d !important;
164157
}
165158
}
166159

@@ -173,21 +166,25 @@ a.navbar-brand {
173166
color: #eee !important;
174167

175168
.json-key {
176-
color: goldenrod !important;
169+
color: gold !important;
177170
}
178171

179172
.json-boolean, .json-number {
180-
color: chocolate !important;
173+
color: cyan !important;
181174
}
182175

183176
.json-string {
184-
color: darkcyan !important;
177+
color: coral !important;
185178
}
186179

187180
.json-explanation {
188181
color: springgreen !important;
189182
font-style: italic;
190183
}
184+
185+
.json-structure {
186+
color: #eee !important;
187+
}
191188
}
192189

193190
.jwt-signature {

0 commit comments

Comments
 (0)