-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
105 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,25 +9,25 @@ | |
</head> | ||
<body> | ||
<pre> | ||
<code class="language-cpp" id="code">#include <iostream> | ||
using namespace std; | ||
int main() { | ||
int n; | ||
cin >> n; | ||
cout << n << endl; | ||
return 0; | ||
<code class="language-java" id="code"> | ||
package com.mewhz.paste; | ||
|
||
public class Main{ | ||
public static void main(String[] args) { | ||
System.out.println("Hello World"); | ||
} | ||
} | ||
</code> | ||
</pre> | ||
<button id="button" class="btn btn-success" onclick="copy()" data-clipboard-target="#code" data-clipboard-action="copy">一键复制</button> | ||
<!-- <button id="button" class="btn btn-success" onclick="copy()" data-clipboard-target="#code" data-clipboard-action="copy">一键复制</button>--> | ||
<script src="js/prism.js"></script> | ||
<script src="js/prism-c.min.js"></script> | ||
<script src="js/prism-cpp.min.js"></script> | ||
<script src="js/jquery-3.6.0.min.js"></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js"></script> | ||
<script src="js/code.js"></script> | ||
<script src="https://cdn.bootcdn.net/ajax/libs/toastr.js/latest/js/toastr.min.js"></script> | ||
<!-- <script src="js/prism-java.min.js"></script>--> | ||
<!-- <script src="js/prism-c.min.js"></script>--> | ||
<!-- <script src="js/prism-cpp.min.js"></script>--> | ||
<!--<script src="js/jquery-3.6.0.min.js"></script>--> | ||
<!-- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js"></script>--> | ||
<!--<script src="js/code.js"></script>--> | ||
<!--<script src="https://cdn.bootcdn.net/ajax/libs/toastr.js/latest/js/toastr.min.js"></script>--> | ||
<script src="js/prism-java.min.js"></script> | ||
<!-- <script src="js/prism-python.min.js"></script>--> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
<!DOCTYPE html> | ||
<html lang="en"> | ||
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
<link href="css/prism.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="css/bootstrap.min.css"/> | ||
<link href="https://cdn.bootcdn.net/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet"> | ||
</head> | ||
<body> | ||
<pre> | ||
<code class="language-java" id="code"> | ||
package com.mewhz.paste; | ||
|
||
public class Main { | ||
public static void main(String[] args) { | ||
System.out.println("Hello World"); | ||
} | ||
} | ||
</code> | ||
</pre> | ||
<script src="js/prism.js"></script> | ||
<script src="js/prism-java.min.js"></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,11 +3,25 @@ | |
<head> | ||
<meta charset="UTF-8"> | ||
<title>Title</title> | ||
<link href="css/prism.css" rel="stylesheet"> | ||
<link rel="stylesheet" href="css/bootstrap.min.css"/> | ||
<link href="https://cdn.bootcdn.net/ajax/libs/toastr.js/latest/css/toastr.min.css" rel="stylesheet"> | ||
<script src="js/jquery-3.6.0.min.js"></script> | ||
<script src="js/head.js"></script> | ||
</head> | ||
<body> | ||
<h1></h1> | ||
<pre> | ||
<code id="code"> | ||
|
||
</code> | ||
</pre> | ||
<button id="button" class="btn btn-success" onclick="copy()" data-clipboard-target="#code" data-clipboard-action="copy"> | ||
一键复制 | ||
</button> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/clipboard.min.js"></script> | ||
<script src="js/code.js"></script> | ||
<script src="https://cdn.bootcdn.net/ajax/libs/toastr.js/latest/js/toastr.min.js"></script> | ||
<script src="js/prism.js"></script> | ||
<script src="js/prism-java.min.js"></script> | ||
</body> | ||
</html> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,12 @@ | ||
|
||
|
||
$(document).ready(()=>{ | ||
$.getJSON("/head", (result)=>{ | ||
$.getJSON("/codes?id=1637767613075", (result)=>{ | ||
console.log(result); | ||
$.each(result, (i, temp)=>{ | ||
$("h1").append(temp + " "); | ||
}); | ||
console.log(result.type); | ||
$("#code").attr("class","language-java"); | ||
$("#code").text(result.text); | ||
$("title").text(result.remark); | ||
Prism.highlightAll(); | ||
}) | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
package com.mewhz.paste; | ||
|
||
public class Main { | ||
public static void main(String[] args) { | ||
System.out.println("Hello World"); | ||
} | ||
} |