mirror of
https://github.com/v1k45/pastepass.git
synced 2026-01-05 04:56:16 +00:00
Rename project to pastepass
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -26,3 +26,5 @@ go.work.sum
|
||||
|
||||
# database
|
||||
*.boltdb
|
||||
|
||||
.idea/
|
||||
|
||||
2
go.mod
2
go.mod
@@ -1,4 +1,4 @@
|
||||
module github.com/v1k45/paste
|
||||
module github.com/v1k45/pastepass
|
||||
|
||||
go 1.22.3
|
||||
|
||||
|
||||
4
main.go
4
main.go
@@ -5,8 +5,8 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/v1k45/paste/db"
|
||||
"github.com/v1k45/paste/web"
|
||||
"github.com/v1k45/pastepass/db"
|
||||
"github.com/v1k45/pastepass/web"
|
||||
)
|
||||
|
||||
func main() {
|
||||
|
||||
@@ -7,7 +7,7 @@ templ base() {
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1">
|
||||
<meta name="color-scheme" content="light dark" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css"/>
|
||||
<link rel="stylesheet" href="/static/pico.min.css"/>
|
||||
<title>Paste</title>
|
||||
</head>
|
||||
<body>
|
||||
@@ -15,7 +15,7 @@ templ base() {
|
||||
<nav>
|
||||
<ul>
|
||||
<li>
|
||||
<a href="/">Paste</a> — secure one-time paste bin.
|
||||
<a href="/">PastePass</a> — secure one-time paste bin.
|
||||
</li>
|
||||
</ul>
|
||||
</nav>
|
||||
@@ -25,7 +25,7 @@ templ base() {
|
||||
<footer>
|
||||
<small>
|
||||
<p style="color: #8891A4;">
|
||||
Paste is open-source and free to use. <a href="https://github.com/v1k45/paste">View source on github</a>.
|
||||
PastePass is open-source and free to use. <a href="https://github.com/v1k45/pastepass">View source on github</a>.
|
||||
</p>
|
||||
<p style="color: #8891A4;">
|
||||
Pasted content is encrypted and stored with an expiration time. Once the content is read, it is deleted from the server. <br/>
|
||||
@@ -33,6 +33,7 @@ templ base() {
|
||||
</small>
|
||||
</footer>
|
||||
</main>
|
||||
<script src="/static/pastepass.js"></script>
|
||||
</body>
|
||||
</html>
|
||||
}
|
||||
|
||||
@@ -23,7 +23,7 @@ func base() templ.Component {
|
||||
templ_7745c5c3_Var1 = templ.NopComponent
|
||||
}
|
||||
ctx = templ.ClearChildren(ctx)
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><meta name=\"color-scheme\" content=\"light dark\"><link rel=\"stylesheet\" href=\"https://cdn.jsdelivr.net/npm/@picocss/pico@2/css/pico.min.css\"><title>Paste</title></head><body><main class=\"container\"><nav><ul><li><a href=\"/\">Paste</a> — secure one-time paste bin.</li></ul></nav><hr>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<!doctype html><html lang=\"en\"><head><meta charset=\"utf-8\"><meta name=\"viewport\" content=\"width=device-width, initial-scale=1\"><meta name=\"color-scheme\" content=\"light dark\"><link rel=\"stylesheet\" href=\"/static/pico.min.css\"><title>Paste</title></head><body><main class=\"container\"><nav><ul><li><a href=\"/\">PastePass</a> — secure one-time paste bin.</li></ul></nav><hr>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
@@ -31,7 +31,7 @@ func base() templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<hr><footer><small><p style=\"color: #8891A4;\">Paste is open-source and free to use. <a href=\"https://github.com/v1k45/paste\">View source on github</a>.</p><p style=\"color: #8891A4;\">Pasted content is encrypted and stored with an expiration time. Once the content is read, it is deleted from the server. <br></p></small></footer></main></body></html>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("<hr><footer><small><p style=\"color: #8891A4;\">PastePass is open-source and free to use. <a href=\"https://github.com/v1k45/pastepass\">View source on github</a>.</p><p style=\"color: #8891A4;\">Pasted content is encrypted and stored with an expiration time. Once the content is read, it is deleted from the server. <br></p></small></footer></main><script src=\"/static/pastepass.js\"></script></body></html>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ templ Decrypt(text string) {
|
||||
<button onclick="copyText(this, '#pastedContent')" data-tooltip="Click to copy">Copy content</button>
|
||||
</div>
|
||||
</div>
|
||||
@copyTextScript()
|
||||
</div>
|
||||
}
|
||||
}
|
||||
|
||||
@@ -42,15 +42,7 @@ func Decrypt(text string) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</pre><div><button onclick=\"copyText(this, '#pastedContent')\" data-tooltip=\"Click to copy\">Copy content</button></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = copyTextScript().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</pre><div><button onclick=\"copyText(this, '#pastedContent')\" data-tooltip=\"Click to copy\">Copy content</button></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -18,7 +18,6 @@ templ PasteSuccess(url string) {
|
||||
<a href={ templ.SafeURL(url) } style="margin-left: 1rem;">View Paste</a>
|
||||
</div>
|
||||
</div>
|
||||
@copyTextScript()
|
||||
</div>
|
||||
}
|
||||
}
|
||||
@@ -51,15 +51,7 @@ func PasteSuccess(url string) templ.Component {
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" style=\"margin-left: 1rem;\">View Paste</a></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
templ_7745c5c3_Err = copyTextScript().Render(ctx, templ_7745c5c3_Buffer)
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("</div>")
|
||||
_, templ_7745c5c3_Err = templ_7745c5c3_Buffer.WriteString("\" style=\"margin-left: 1rem;\">View Paste</a></div></div></div>")
|
||||
if templ_7745c5c3_Err != nil {
|
||||
return templ_7745c5c3_Err
|
||||
}
|
||||
|
||||
@@ -5,8 +5,8 @@ import (
|
||||
"fmt"
|
||||
"net/http"
|
||||
|
||||
"github.com/v1k45/paste/db"
|
||||
"github.com/v1k45/paste/views"
|
||||
"github.com/v1k45/pastepass/db"
|
||||
"github.com/v1k45/pastepass/views"
|
||||
)
|
||||
|
||||
type Handler struct {
|
||||
|
||||
@@ -6,7 +6,7 @@ import (
|
||||
"net/http"
|
||||
"time"
|
||||
|
||||
"github.com/v1k45/paste/views"
|
||||
"github.com/v1k45/pastepass/views"
|
||||
)
|
||||
|
||||
var (
|
||||
|
||||
Reference in New Issue
Block a user