mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Merge 1de39ebbb47a5449f2419a32c6fce7d9034d0d69 into a58f4ca346eb1d1ff8363250373c188b23ea3614
This commit is contained in:
commit
27fcf9cbfc
2
Makefile
2
Makefile
@ -10,10 +10,12 @@ build: server/bindata.go
|
|||||||
|
|
||||||
STATICFILES := $(wildcard static/*)
|
STATICFILES := $(wildcard static/*)
|
||||||
TEMPLATES := $(wildcard templates/*)
|
TEMPLATES := $(wildcard templates/*)
|
||||||
|
.PHONY: server/bindata.go
|
||||||
server/bindata.go: $(STATICFILES) $(TEMPLATES)
|
server/bindata.go: $(STATICFILES) $(TEMPLATES)
|
||||||
go-bindata -pkg server -tags '!debug' -o server/bindata.go static/... templates/...
|
go-bindata -pkg server -tags '!debug' -o server/bindata.go static/... templates/...
|
||||||
go fmt
|
go fmt
|
||||||
|
|
||||||
|
.PHONY: server/bindata-debug.go
|
||||||
server/bindata-debug.go: $(STATICFILES) $(TEMPLATES)
|
server/bindata-debug.go: $(STATICFILES) $(TEMPLATES)
|
||||||
go-bindata -pkg server -tags 'debug' -o server/bindata-debug.go -debug static/... templates/...
|
go-bindata -pkg server -tags 'debug' -o server/bindata-debug.go -debug static/... templates/...
|
||||||
go fmt
|
go fmt
|
||||||
|
1332
server/bindata.go
1332
server/bindata.go
File diff suppressed because one or more lines are too long
@ -59,15 +59,20 @@ body#pad.HasDotInName textarea {
|
|||||||
font-family: "Lucida Console", Monaco, monospace;
|
font-family: "Lucida Console", Monaco, monospace;
|
||||||
}
|
}
|
||||||
|
|
||||||
.markdown-body ul, .markdown-body ol {
|
|
||||||
|
/* .markdown-body ul, .markdown-body ol {
|
||||||
padding-left: 0em;
|
padding-left: 0em;
|
||||||
|
} */
|
||||||
|
|
||||||
|
div#menu, div#rendered, .ChildPageNames, body#pad textarea {
|
||||||
|
padding-left: 1rem;
|
||||||
|
padding-right: 1rem;
|
||||||
|
max-width: 30em;
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 5em) {
|
@media (min-width: 5em) {
|
||||||
div#menu, div#rendered, .ChildPageNames, body#pad textarea {
|
|
||||||
padding-left: 2%;
|
|
||||||
padding-right: 2%;
|
|
||||||
}
|
|
||||||
.pure-menu .pure-menu-horizontal {
|
.pure-menu .pure-menu-horizontal {
|
||||||
max-width: 300px;
|
max-width: 300px;
|
||||||
}
|
}
|
||||||
@ -80,10 +85,6 @@ body#pad.HasDotInName textarea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 50em) {
|
@media (min-width: 50em) {
|
||||||
div#menu, div#rendered, .ChildPageNames, body#pad textarea {
|
|
||||||
padding-left: 10%;
|
|
||||||
padding-right: 10%;
|
|
||||||
}
|
|
||||||
.pure-menu-disabled, .pure-menu-heading, .pure-menu-link {
|
.pure-menu-disabled, .pure-menu-heading, .pure-menu-link {
|
||||||
padding: .5em 1em;
|
padding: .5em 1em;
|
||||||
}
|
}
|
||||||
@ -92,20 +93,12 @@ body#pad.HasDotInName textarea {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
@media (min-width: 70em) {
|
@media (min-width: 70em) {
|
||||||
div#menu, div#rendered, .ChildPageNames, body#pad textarea {
|
|
||||||
padding-left: 15%;
|
|
||||||
padding-right: 15%;
|
|
||||||
}
|
|
||||||
.ChildPageNames ul {
|
.ChildPageNames ul {
|
||||||
grid-template-columns: repeat(3, 1fr);
|
grid-template-columns: repeat(3, 1fr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (min-width: 100em) {
|
@media (min-width: 100em) {
|
||||||
div#menu, div#rendered, .ChildPageNames, body#pad textarea {
|
|
||||||
padding-left: 20%;
|
|
||||||
padding-right: 20%;
|
|
||||||
}
|
|
||||||
.ChildPageNames ul {
|
.ChildPageNames ul {
|
||||||
grid-template-columns: repeat(4, 1fr);
|
grid-template-columns: repeat(4, 1fr);
|
||||||
}
|
}
|
||||||
|
@ -175,7 +175,7 @@
|
|||||||
|
|
||||||
.dropzone {
|
.dropzone {
|
||||||
min-height: 150px;
|
min-height: 150px;
|
||||||
border: 2px solid rgba(0, 0, 0, 0.3);
|
/* border: 2px solid rgba(0, 0, 0, 0.3); */
|
||||||
background: white;
|
background: white;
|
||||||
padding: 20px 20px; }
|
padding: 20px 20px; }
|
||||||
.dropzone.dz-clickable {
|
.dropzone.dz-clickable {
|
||||||
|
@ -371,9 +371,11 @@ function onUploadFinished(file) {
|
|||||||
if (file.type.startsWith("image")) {
|
if (file.type.startsWith("image")) {
|
||||||
prefix = '!';
|
prefix = '!';
|
||||||
}
|
}
|
||||||
|
|
||||||
var extraText = prefix+'['+file.xhr.getResponseHeader("Location").split('filename=')[1]+'](' +
|
var extraText = prefix+'['+file.xhr.getResponseHeader("Location").split('filename=')[1]+'](' +
|
||||||
file.xhr.getResponseHeader("Location") +
|
file.xhr.getResponseHeader("Location") +
|
||||||
')';
|
')\n\n';
|
||||||
|
|
||||||
|
|
||||||
$('#userInput').val(
|
$('#userInput').val(
|
||||||
textBefore +
|
textBefore +
|
||||||
@ -382,7 +384,7 @@ function onUploadFinished(file) {
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Select the newly-inserted link
|
// Select the newly-inserted link
|
||||||
$('#userInput').prop('selectionStart', cursorPos);
|
$('#userInput').prop('selectionStart', cursorPos + extraText.length);
|
||||||
$('#userInput').prop('selectionEnd', cursorPos + extraText.length);
|
$('#userInput').prop('selectionEnd', cursorPos + extraText.length);
|
||||||
$('#userInput').trigger('keyup'); // trigger a save
|
$('#userInput').trigger('keyup'); // trigger a save
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user