Skip to content

Commit eacabce

Browse files
committed
feat: implement homepage (web design is my passion)
1 parent 0bb8175 commit eacabce

7 files changed

Lines changed: 69 additions & 3 deletions

File tree

static/bluesky.png

86.9 KB
Loading

static/favicon.ico

184 KB
Binary file not shown.

static/favicon.png

25.2 KB
Loading

static/index.html

Lines changed: 63 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,63 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Twitter API Bridge</title>
7+
<style type="text/css">
8+
body {
9+
font-family: Arial, sans-serif;
10+
margin: 0;
11+
padding: 0;
12+
background-color: #f4f4f4;
13+
}
14+
h1 {
15+
text-align: center;
16+
}
17+
h2 {
18+
text-align: center;
19+
}
20+
p {
21+
text-align: center;
22+
}
23+
.bar {
24+
background: linear-gradient(#1da1f2, #1d56f2);;
25+
box-shadow: 0 1px 3px rgba(0,0,0,0.25),0 -1px 0 rgba(0,0,0,0.1) inset;
26+
height: 5px;
27+
width: 100%;
28+
}
29+
.dev-warning {
30+
text-align: center;
31+
margin: 0 auto;
32+
width: 80%;
33+
display: table;
34+
}
35+
.dev-warning b {
36+
display: table-cell;
37+
vertical-align: middle;
38+
}
39+
.dev-warning img {
40+
vertical-align: middle;
41+
}
42+
</style>
43+
</head>
44+
<body>
45+
<h1>A Twitter API Translator</h1>
46+
<h2>Specifically Bluesky -> Twitter API V1</h2>
47+
<div class="bar"></div>
48+
<br>
49+
<!-- Developer Mode Warning -->
50+
<!-- <div class="dev-warning">
51+
<img src="data:image/png;base64,R0lGODlhGAAYAPMAAP////vzBf9kA90JB/IIhEcApQAA0wKr6h+3FABkElYsBZBxOr+/v4CAgEBAQAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/h1HaWZCdWlsZGVyIDAuMiBieSBZdmVzIFBpZ3VldAAh+QQNZAAMACwAAAAAGAAYAEMEZ5DJSRkANWcwOngP52lWN1xoipoYWZqjK4nnBa7xDO9832q0k2zDov1cxk/ISEralhcWxYm6qaSvnhaLzA2nvOMwyZVRy8CiFQ32PHFCYlEJj0+CqmsZprLWMXh5gnxBW1stgokqEhEAIfkEDWQADAAsAAAAABgAGABDBGCQyUkZADVnMPq93YBpnPedZzhqVqiyVCmioBe7eK6vm8vDE1lNBJQIUS+SivZJGpdMpK2lq/qKpV/xidPCjk7gcei9mVJT5VlK7EHZ7aAvKosz5vQ6Rp9vLq2ASX10EhEAOw==">
52+
<b>
53+
This server has developer mode enabled. This means the owner of this instance can view plaintext credentials and tokens.
54+
</b>
55+
<img src="data:image/png;base64,R0lGODlhGAAYAPMAAP////vzBf9kA90JB/IIhEcApQAA0wKr6h+3FABkElYsBZBxOr+/v4CAgEBAQAAAACH/C05FVFNDQVBFMi4wAwEAAAAh/h1HaWZCdWlsZGVyIDAuMiBieSBZdmVzIFBpZ3VldAAh+QQNZAAMACwAAAAAGAAYAEMEZ5DJSRkANWcwOngP52lWN1xoipoYWZqjK4nnBa7xDO9832q0k2zDov1cxk/ISEralhcWxYm6qaSvnhaLzA2nvOMwyZVRy8CiFQ32PHFCYlEJj0+CqmsZprLWMXh5gnxBW1stgokqEhEAIfkEDWQADAAsAAAAABgAGABDBGCQyUkZADVnMPq93YBpnPedZzhqVqiyVCmioBe7eK6vm8vDE1lNBJQIUS+SivZJGpdMpK2lq/qKpV/xidPCjk7gcei9mVJT5VlK7EHZ7aAvKosz5vQ6Rp9vLq2ASX10EhEAOw==">
56+
</div> -->
57+
<p>If you find this useful, please add a <a href=https://github.com/Preloading/TwitterAPIBridge><img src="./static/star.png" alt="star" height="15"></a>!</p>
58+
<!--
59+
<img src="./static/old_twitter.png" alt="Twitter">
60+
<img src="./static/bluesky.png" alt="Bluesky" height="75"> -->
61+
62+
</body>
63+
</html>

static/old_twitter.png

5.5 KB
Loading

static/star.png

5.34 KB
Loading

twitterv1/twitterv1.go

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -29,9 +29,12 @@ func InitServer(config *config.Config) {
2929
return c.Next()
3030
})
3131

32-
app.Get("/", func(c *fiber.Ctx) error {
33-
return c.SendString("Hello, World!")
34-
})
32+
// app.Get("/", func(c *fiber.Ctx) error {
33+
// return c.SendString("Hello, World!")
34+
// Serve static files from the "static" folder
35+
app.Static("/", "./static")
36+
app.Static("/favicon.ico", "./static/favicon.ico")
37+
app.Static("/static", "./static")
3538

3639
// Auth
3740
app.Post("/oauth/access_token", access_token)

0 commit comments

Comments
 (0)