Skip to content

Commit

Permalink
webpage update
Browse files Browse the repository at this point in the history
  • Loading branch information
steve02081504 committed Mar 26, 2024
1 parent e470d29 commit c10a973
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 10 deletions.
24 changes: 19 additions & 5 deletions .github/pages/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,34 @@
<head>
<title>ps12exe Online</title>
<link rel="icon" type="image/x-icon" href="https://raw.githubusercontent.com/steve02081504/ps12exe/master/img/icon.ico">
<script type='text/javascript' src='https://www.midijs.net/lib/midi.js'></script>
<script type="module">
<script src='https://www.midijs.net/lib/midi.js'></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/darkreader.min.js"></script>
<script>
DarkReader.enable()
var HighlightCode;
function SetDarkMode(Set) {
if (Set) DarkReader.enable()
else DarkReader.disable()
HighlightCode.useTheme(Set ? 'github-dark' : 'github')
}
(async ({ chrome, netscape }) => {
if (!chrome && !netscape) await import('https://unpkg.com/@ungap/custom-elements')
const { default: HighlightedCode } = await import('https://unpkg.com/highlighted-code')
HighlightedCode.useTheme('github-dark')
HighlightCode = await import('https://unpkg.com/highlighted-code').then(x => x.default)
var dark = window.matchMedia('(prefers-color-scheme: dark)');
SetDarkMode(dark.matches)
dark.addEventListener('change', event => {
SetDarkMode(event.matches)
})
})(self)
</script>
</head>

<body>
<textarea style="width: 98%; height:95vh;" is="highlighted-code" language="powershell" tabSize="4" placeholder="#_pragma noConsole
'Hello World!'
" id="inputText"></textarea>
" id="inputText">#_pragma noConsole
'Hello World!'
</textarea>
<br>
<button id="compileButton" onclick="compileCode()">cum out</button>
<script type="text/javascript">
Expand Down
24 changes: 19 additions & 5 deletions src/WebServer/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -12,20 +12,34 @@
<head>
<title>ps12exe Online</title>
<link rel="icon" type="image/x-icon" href="favicon.ico">
<script type='text/javascript' src='https://www.midijs.net/lib/midi.js'></script>
<script type="module">
<script src='https://www.midijs.net/lib/midi.js'></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/darkreader.min.js"></script>
<script>
DarkReader.enable()
var HighlightCode;
function SetDarkMode(Set) {
if (Set) DarkReader.enable()
else DarkReader.disable()
HighlightCode.useTheme(Set ? 'github-dark' : 'github')
}
(async ({ chrome, netscape }) => {
if (!chrome && !netscape) await import('https://unpkg.com/@ungap/custom-elements')
const { default: HighlightedCode } = await import('https://unpkg.com/highlighted-code')
HighlightedCode.useTheme('github-dark')
HighlightCode = await import('https://unpkg.com/highlighted-code').then(x => x.default)
var dark = window.matchMedia('(prefers-color-scheme: dark)');
SetDarkMode(dark.matches)
dark.addEventListener('change', event => {
SetDarkMode(event.matches)
})
})(self)
</script>
</head>

<body>
<textarea style="width: 98%; height:95vh;" is="highlighted-code" language="powershell" tabSize="4" placeholder="#_pragma noConsole
'Hello World!'
" id="inputText"></textarea>
" id="inputText">#_pragma noConsole
'Hello World!'
</textarea>
<br>
<button id="compileButton" onclick="compileCode()">cum out</button>
<a id="downloadLink" download="a.exe"></a>
Expand Down

0 comments on commit c10a973

Please sign in to comment.