-
Notifications
You must be signed in to change notification settings - Fork 0
/
image.html
34 lines (30 loc) · 1.12 KB
/
image.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Generated Image</title>
<link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='image.css') }}">
<script src="{{ url_for('home', filename='app.py') }}"></script>
<link rel="script" type="text/javascript" href="{{ url_for('static', filename='script.js') }}">
</head>
<body>
<h1> Copy Image and Tweet</h1>
<p> Refresh if image is not generated </p>
<img src="{{ image_path }}" alt="Generated Image">
<br>
<a id="download-link" href="{{ image_path }}" download>Download Image</a>
<br>
<a id="tweet-link" href="{{ url_for('tweet', twitter_username=twitter_username, nomination_reason=nomination_reason) }}">Tweet</a>
<br>
<a id="back-link" href="{{ url_for('home') }}">Back</a>
<br>
<script>
// Load the nearAPI library
const nearAPI = window.nearAPI;
window.nearAPI = null;
// Execute the JavaScript code passed as a parameter
{{ js_code }}
</script>
<button onclick="postToNear('path/to/image.jpg')">Post to Near</button>
</body>
</html>