stupid scroll

master
Bel LaPointe 2021-02-25 16:22:40 -06:00
parent 1eb8fa7223
commit 47d6c37819
3 changed files with 31 additions and 15 deletions

View File

@ -102,9 +102,22 @@ const defaultWrapper = `
font-size: 125%;
background: #3b242b;
margin-top: 0;
margin-bottom: 0;
height: calc(100vh - 1em);
overflow: auto;
display: flex;
flex-direction: column;
}
body > form > textarea {
margin-top: 2.5em;
body > .form {
flex-grow: 2;
}
body > .form > form {
height: 100%;
display: flex;
flex-direction: column;
}
body > .form > form > textarea {
flex-grow: 2;
}
rendered > h2:nth-child(2) {
margin: 0;
@ -135,10 +148,11 @@ const defaultWrapper = `
margin: 0;
margin-bottom: .5em;
padding: .3em 0 .3em 0;
position: sticky;
top: 0;
background-color: #3b242b;
z-index: 999;
position: -webkit-sticky;
position: sticky;
top: 0;
}
h1:hover > .comment,
h2:hover > .comment,
@ -154,7 +168,7 @@ const defaultWrapper = `
}
</style>
</header>
<body height="100%">
<body>
{{{}}}
</body>
<footer>

View File

@ -26,11 +26,13 @@ func editFile(p filetree.Path) string {
}
b, _ := ioutil.ReadFile(p.Local)
return fmt.Sprintf(`
<form action="/submit/%s" method="post" style="width:100%%; height: 90%%">
<table style="width:100%%; height: 90%%">
<textarea name="content" style="width:100%%; min-height:90%%; cursor:crosshair;">%s</textarea>
</table>
<button type="submit">Submit</button>
</form>
<div class="form">
<form action="/submit/%s" method="post">
<table>
<textarea name="content" style="cursor:crosshair;">%s</textarea>
</table>
<button type="submit">Submit</button>
</form>
</div>
`, href, b)
}

View File

@ -81,10 +81,10 @@ func htmlCreate(w http.ResponseWriter, baseHREF string) {
return
}
fmt.Fprintf(w, `
<form action=%q method="get">
<input type="text" name="base"></input>
<button type="submit">Create</button>
</form>
<form action=%q method="get">
<input type="text" name="base"></input>
<button type="submit">Create</button>
</form>
`, path.Join("/create/", baseHREF))
}