54 lines
1.3 KiB
Plaintext
54 lines
1.3 KiB
Plaintext
package routes
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"extrovert/layouts"
|
|
"extrovert/components"
|
|
"extrovert/internals"
|
|
)
|
|
|
|
func IndexHandler(w http.ResponseWriter, r *http.Request) {
|
|
_ = internals.GetCookie("twitter-data", w, r)
|
|
|
|
IndexPage().Render(context.TODO(), w)
|
|
}
|
|
|
|
templ IndexPage() {
|
|
@layouts.Page("Project Extrovert") {
|
|
<div style="max-width:50rem;">
|
|
<div style="display:flex;flex-direction:column;gap:1rem;">
|
|
<main
|
|
style="height:15rem"
|
|
>
|
|
<form
|
|
style="height:100%;display:flex;gap:2rem;"
|
|
>
|
|
<fieldset style="display:flex;flex-direction:column;gap:1rem;width:15rem;">
|
|
@components.LoginTwitter()
|
|
<button>Login on Mastodon</button>
|
|
</fieldset>
|
|
<fieldset>
|
|
<textarea
|
|
style="height:100%;resize:none;"
|
|
name="post"
|
|
placeholder="Write a post..."
|
|
aria-label="Post input"
|
|
></textarea>
|
|
</fieldset>
|
|
</form>
|
|
</main>
|
|
<footer>
|
|
@components.Warning("In Development") {
|
|
<strong>
|
|
This application is in active development and should not be used in production.
|
|
</strong>
|
|
Expect bugs, lost data, logouts, etc. Use it at your own risk.
|
|
This software is provided "as is", without any warranty of any kind.
|
|
}
|
|
</footer>
|
|
</div>
|
|
</div>
|
|
}
|
|
}
|