ServParam2ClientModelEngine/CodeShowWeb/Index.aspx
2018-10-18 23:06:30 +08:00

78 lines
4.1 KiB
Plaintext
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Index.aspx.cs" Inherits="CodeShowWeb.Index" %>
<!DOCTYPE html>
<html>
<head>
<title>highlight</title>
<meta http-equiv="content-type" content="text/html;charset=utf-8">
<link rel="stylesheet" href="styles/default.css">
<script src="highlight.pack.js"></script>
<script>hljs.initHighlightingOnLoad();</script>
</head>
<body style="background-color:black">
<h2>服务端参数跨语言代码转换引擎 Ver 0.1.0 -- 皓月</h2>
<h4>是一个C#服务端API参数实体类、转换成于各类语言客户端解析参数代码减少客户端开发人员重复工作量</h4>
<h4>请选择目前支持转换到的目标语言:</h4>
<h3><a href="/Index.aspx?lang=Java">Java/Android</a>、<a href="/Index.aspx?lang=swift">Swift/iOS</a>、<a href="/Index.aspx?lang=JavaScript">Ajax/Javascript</a>、<a href="/Index.aspx?lang=PHP">PHP</a>、<a href="/Index.aspx?lang=Golang">Golang</a>、...</h3>
<h4>选择你喜欢的代码配色方案<div id="changeStyleSelect"></div></h4>
<h2>已转换为目标语种为"<%=GetLang() %>"代码结果:</h2>
<div ><pre>
<code class="<%=GetLang() %>"">
<%=GetCode() %>
</code>
</pre>
</div>
<style>
@font-face
{
font-family: myFirstFont;
src: url('KawkabMono-Regular.ttf'),
url('KawkabMono-Regular.ttf'); /* IE9+,可以是具体的实际链接 */
}
body
{
font-family:myFirstFont;
color:#ffffff;
}
a{color:#52cbf8}
.div-inline{ display:inline;}
</style>
<script>
styleArr = ["<%=GetCodeStyle() %>",//第一个放自己喜欢的23333
"agate.css", "androidstudio.css", "arduino-light.css", "arta.css", "ascetic.css", "atelier-cave-dark.css", "atelier-cave-light.css", "atelier-dune-dark.css", "atelier-dune-light.css", "atelier-estuary-dark.css", "atelier-estuary-light.css", "atelier-forest-dark.css", "atelier-forest-light.css", "atelier-heath-dark.css", "atelier-heath-light.css", "atelier-lakeside-dark.css", "atelier-lakeside-light.css", "atelier-plateau-dark.css", "atelier-plateau-light.css", "atelier-savanna-dark.css", "atelier-savanna-light.css", "atelier-seaside-dark.css", "atelier-seaside-light.css", "atelier-sulphurpool-dark.css", "atelier-sulphurpool-light.css", "brown-paper.css", "codepen-embed.css", "color-brewer.css", "dark.css", "darkula.css", "default.css", "docco.css", "dracula.css", "far.css", "foundation.css", "github.css", "github-gist.css", "googlecode.css", "grayscale.css", "gruvbox-dark.css", "gruvbox-light.css", "hopscotch.css", "hybrid.css", "idea.css", "ir-black.css", "kimbie.dark.css", "kimbie.light.css", "magula.css", "mono-blue.css", "monokai.css", "monokai-sublime.css", "obsidian.css", "paraiso-dark.css", "paraiso-light.css", "pojoaque.css", "purebasic.css", "qtcreator_dark.css", "qtcreator_light.css", "railscasts.css", "rainbow.css", "school-book.css", "solarized-dark.css", "solarized-light.css", "sunburst.css", "tomorrow.css", "tomorrow-night.css", "tomorrow-night-blue.css", "tomorrow-night-bright.css", "tomorrow-night-eighties.css", "vs.css", "xcode.css", "xt256.css", "zenburn.css"];
selectHtml = [];
selectHtml.push('<select id="changeStyle">');
for (i in styleArr) {
OptionValue = styleArr[i];
selectHtml.push('<option value="' + OptionValue + '" >' + OptionValue + '</option>');
}
selectHtml.push('</select>');
selectHtmlString = selectHtml.join("");
document.getElementById('changeStyleSelect').innerHTML = selectHtmlString;
obj = document.getElementById('changeStyle');
obj.addEventListener("change", function (event) {
var value = this.options[this.options.selectedIndex].value;
l = document.createElement('link');
l.setAttribute('href', 'styles/' + value);
l.setAttribute('rel', 'stylesheet');
document.head.appendChild(l);
});
//首先载入自己喜欢的
l = document.createElement('link');
l.setAttribute('href', 'styles/' +"<%=GetCodeStyle() %>");
l.setAttribute('rel', 'stylesheet');
document.head.appendChild(l);
</script>
</body>
</html>