mirror of
https://github.com/aelve/guide.git
synced 2024-11-27 00:14:03 +03:00
Merge pull request #130 from 2016rshah/master
Adds markdown symbol and fixes #48
This commit is contained in:
commit
36b79b8d40
@ -422,12 +422,15 @@ makeItemNotesEditor =
|
|||||||
enter = $("<span>", {
|
enter = $("<span>", {
|
||||||
"class": "edit-field-instruction",
|
"class": "edit-field-instruction",
|
||||||
"text" : "or press Ctrl+Enter to save" })[0];
|
"text" : "or press Ctrl+Enter to save" })[0];
|
||||||
|
markdownSupported = $("<img>", {
|
||||||
|
"src": "/markdown.svg",
|
||||||
|
"class": " markdown-supported "
|
||||||
|
})[0];
|
||||||
markdown = $("<a>", {
|
markdown = $("<a>", {
|
||||||
"href" : "/markdown",
|
"href" : "/markdown",
|
||||||
"target" : "_blank",
|
"target" : "_blank"})[0];
|
||||||
"text" : "Markdown" })[0];
|
|
||||||
$(sectionNode).append(
|
$(sectionNode).append(
|
||||||
area, saveBtn, $(space), cancelBtn, $(space), enter, markdown);
|
area, saveBtn, $(space), cancelBtn, $(space), enter, $(markdown).append(markdownSupported));
|
||||||
|]
|
|]
|
||||||
|
|
||||||
-- | Create a new category and redirect to it (or redirect to an old category
|
-- | Create a new category and redirect to it (or redirect to an old category
|
||||||
|
@ -1173,7 +1173,8 @@ markdownEditor attr (view mdText -> s) submit cancel instr = do
|
|||||||
cancel
|
cancel
|
||||||
emptySpan "6px"
|
emptySpan "6px"
|
||||||
span_ [class_ "edit-field-instruction"] (toHtml instr)
|
span_ [class_ "edit-field-instruction"] (toHtml instr)
|
||||||
a_ [href_ "/markdown", target_ "_blank"] "Markdown"
|
a_ [href_ "/markdown", target_ "_blank"] $
|
||||||
|
img_ [src_ "/markdown.svg", alt_ "markdown supported", class_ " markdown-supported "]
|
||||||
|
|
||||||
smallMarkdownEditor
|
smallMarkdownEditor
|
||||||
:: MonadIO m
|
:: MonadIO m
|
||||||
@ -1198,7 +1199,8 @@ smallMarkdownEditor attr (view mdText -> s) submit mbCancel instr = do
|
|||||||
cancel
|
cancel
|
||||||
span_ [style_ "float:right"] $ do
|
span_ [style_ "float:right"] $ do
|
||||||
span_ [class_ "edit-field-instruction"] (toHtml instr)
|
span_ [class_ "edit-field-instruction"] (toHtml instr)
|
||||||
a_ [href_ "/markdown", target_ "_blank"] "Markdown"
|
a_ [href_ "/markdown", target_ "_blank"] $
|
||||||
|
img_ [src_ "/markdown.svg", alt_ "markdown supported", class_ " markdown-supported "]
|
||||||
|
|
||||||
thisNode :: MonadIO m => HtmlT m JQuerySelector
|
thisNode :: MonadIO m => HtmlT m JQuerySelector
|
||||||
thisNode = do
|
thisNode = do
|
||||||
|
1
static/markdown.svg
Normal file
1
static/markdown.svg
Normal file
@ -0,0 +1 @@
|
|||||||
|
<svg xmlns="http://www.w3.org/2000/svg" width="208" height="128" viewBox="0 0 208 128"><mask id="a"><rect width="100%" height="100%" fill="#fff"/><path d="M30 98v-68h20l20 25 20-25h20v68h-20v-39l-20 25-20-25v39zM155 98l-30-33h20v-35h20v35h20z"/></mask><rect width="100%" height="100%" ry="15" mask="url(#a)"/></svg>
|
After Width: | Height: | Size: 315 B |
@ -267,3 +267,7 @@ textarea.fullwidth {
|
|||||||
margin: 5px 0px;
|
margin: 5px 0px;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.markdown-supported {
|
||||||
|
height: 1em;
|
||||||
|
}
|
@ -150,7 +150,7 @@ function makeTraitEditor(itemUid, traitUid, content) {
|
|||||||
<span class="edit-field-instruction"> \
|
<span class="edit-field-instruction"> \
|
||||||
press Ctrl+Enter or Enter to save \
|
press Ctrl+Enter or Enter to save \
|
||||||
</span> \
|
</span> \
|
||||||
<a href="/markdown" target="_blank">Markdown</a> \
|
<a href="/markdown" target="_blank"><img class="markdown-supported" src="/markdown.svg" /></a> \
|
||||||
</span>';
|
</span>';
|
||||||
|
|
||||||
$(sectionNode).html(template);
|
$(sectionNode).html(template);
|
||||||
|
Loading…
Reference in New Issue
Block a user