Skip to content

Commit

Permalink
deploy: 354357d
Browse files Browse the repository at this point in the history
  • Loading branch information
rexxars committed May 23, 2024
1 parent fb2321d commit 7ea3235
Show file tree
Hide file tree
Showing 8 changed files with 444 additions and 62 deletions.
49 changes: 0 additions & 49 deletions assets/index-57trt-YO.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/index-DTthlpk8.css

This file was deleted.

78 changes: 78 additions & 0 deletions css/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
* {
box-sizing: border-box;
}

html,
body,
#root {
width: 100%;
height: 100%;
margin: 0;
padding: 0;
}

#root {
padding: 10px;
}

.container {
display: flex;
height: 100%;
}

h2 {
margin: 0;
margin-bottom: 10px;
font-family: sans-serif;
}

pre {
margin: 0;
}

select {
font-size: 16px;
margin-left: 1em;
}

.input,
.output {
display: flex;
flex-direction: column;
flex: 1;
padding: 5px;
}

.input textarea {
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
font-size: 16px;
line-height: 1.5;
}

.input textarea,
.output .out {
border: 1px solid #000;
width: 100%;
flex: 1;
}

.output .out {
background: #f5f2f0;
}

.refractor-marker {
background: hsla(24, 20%, 50%, 0.08);
background: linear-gradient(to right, hsla(24, 20%, 50%, 0.1) 70%, hsla(24, 20%, 50%, 0));
}

.bitwise {
background: hsla(51, 82%, 58%, 0.5);
background: linear-gradient(to right, hsla(51, 83%, 58%, 0.5) 70%, hsla(51, 83%, 58%, 0));
position: relative;
}

.bitwise:hover:before {
content: 'Eyyh, bitwise!';
position: absolute;
right: 0;
}
194 changes: 194 additions & 0 deletions css/prism.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,194 @@
/* PrismJS 1.14.0
http://prismjs.com/download.html#themes=prism&languages=markup+css+clike+javascript+jsx&plugins=line-highlight */
/**
* prism.js default theme for JavaScript, CSS and HTML
* Based on dabblet (http://dabblet.com)
* @author Lea Verou
*/

code[class*='language-'],
pre[class*='language-'] {
color: black;
background: none;
text-shadow: 0 1px white;
font-family: Consolas, Monaco, 'Andale Mono', 'Ubuntu Mono', monospace;
text-align: left;
white-space: pre;
word-spacing: normal;
word-break: normal;
word-wrap: normal;
line-height: 1.5;

-moz-tab-size: 4;
-o-tab-size: 4;
tab-size: 4;

-webkit-hyphens: none;
-moz-hyphens: none;
-ms-hyphens: none;
hyphens: none;
}

pre[class*='language-']::-moz-selection,
pre[class*='language-'] ::-moz-selection,
code[class*='language-']::-moz-selection,
code[class*='language-'] ::-moz-selection {
text-shadow: none;
background: #b3d4fc;
}

pre[class*='language-']::selection,
pre[class*='language-'] ::selection,
code[class*='language-']::selection,
code[class*='language-'] ::selection {
text-shadow: none;
background: #b3d4fc;
}

@media print {
code[class*='language-'],
pre[class*='language-'] {
text-shadow: none;
}
}

/* Code blocks */
pre[class*='language-'] {
padding: 1em;
margin: 0.5em 0;
overflow: auto;
}

:not(pre) > code[class*='language-'],
pre[class*='language-'] {
background: #f5f2f0;
}

/* Inline code */
:not(pre) > code[class*='language-'] {
padding: 0.1em;
border-radius: 0.3em;
white-space: normal;
}

.token.comment,
.token.prolog,
.token.doctype,
.token.cdata {
color: slategray;
}

.token.punctuation {
color: #999;
}

.namespace {
opacity: 0.7;
}

.token.property,
.token.tag,
.token.boolean,
.token.number,
.token.constant,
.token.symbol,
.token.deleted {
color: #905;
}

.token.selector,
.token.attr-name,
.token.string,
.token.char,
.token.builtin,
.token.inserted {
color: #690;
}

.token.operator,
.token.entity,
.token.url,
.language-css .token.string,
.style .token.string {
color: #9a6e3a;
background: hsla(0, 0%, 100%, 0.5);
}

.token.atrule,
.token.attr-value,
.token.keyword {
color: #07a;
}

.token.function,
.token.class-name {
color: #dd4a68;
}

.token.regex,
.token.important,
.token.variable {
color: #e90;
}

.token.important,
.token.bold {
font-weight: bold;
}
.token.italic {
font-style: italic;
}

.token.entity {
cursor: help;
}

pre[data-line] {
position: relative;
padding: 1em 0 1em 3em;
}

.line-highlight {
position: absolute;
left: 0;
right: 0;
padding: inherit 0;
margin-top: 1em; /* Same as .prism’s padding-top */

background: hsla(24, 20%, 50%, 0.08);
background: linear-gradient(to right, hsla(24, 20%, 50%, 0.1) 70%, hsla(24, 20%, 50%, 0));

pointer-events: none;

line-height: inherit;
white-space: pre;
}

.line-highlight:before,
.line-highlight[data-end]:after {
content: attr(data-start);
position: absolute;
top: 0.4em;
left: 0.6em;
min-width: 1em;
padding: 0 0.5em;
background-color: hsla(24, 20%, 50%, 0.4);
color: hsl(24, 20%, 95%);
font: bold 65%/1.5 sans-serif;
text-align: center;
vertical-align: 0.3em;
border-radius: 999px;
text-shadow: none;
box-shadow: 0 1px white;
}

.line-highlight[data-end]:after {
content: attr(data-end);
top: auto;
bottom: 0.4em;
}

.line-numbers .line-highlight:before,
.line-numbers .line-highlight:after {
content: none;
}
34 changes: 22 additions & 12 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,24 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<title>react-refractor demo</title>
<script type="module" crossorigin src="/react-refractor/assets/index-57trt-YO.js"></script>
<link rel="stylesheet" crossorigin href="/react-refractor/assets/index-DTthlpk8.css">
</head>

<body>
<div id="root"></div>

</body>
<html>

<head>
<meta charset="utf-8">
<title>react-refractor demo</title>
<link rel="stylesheet" href="css/demo.css">
<link rel="stylesheet" href="css/prism.css">
</head>

<body>

<a href="https://github.com/rexxars/react-refractor" class="fork-ribbon">
<img style="z-index: 5; position: absolute; top: 0; right: 0; border: 0;" src="https://camo.githubusercontent.com/365986a132ccd6a44c23a9169022c0b5c890c387/68747470733a2f2f73332e616d617a6f6e6177732e636f6d2f6769746875622f726962626f6e732f666f726b6d655f72696768745f7265645f6161303030302e706e67"
alt="Fork me on GitHub" data-canonical-src="https://s3.amazonaws.com/github/ribbons/forkme_right_red_aa0000.png">
</a>

<div id="root"></div>

<script src="js/demo.min.js"></script>

</body>

</html>
Loading

0 comments on commit 7ea3235

Please sign in to comment.