Skip to content

Commit

Permalink
DRAFT: online edit link
Browse files Browse the repository at this point in the history
  • Loading branch information
edrex committed Oct 14, 2021
1 parent 069dcc7 commit 4981da2
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 1 deletion.
12 changes: 11 additions & 1 deletion default/templates/components/footer.tpl
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<footer class="flex items-center justify-center mt-2 mb-8 space-x-4 text-center text-gray-800">
<footer class="flex justify-center items-center mt-2 mb-8 space-x-4 text-center text-gray-800">
<div>
<a href="">
<svg xmlns="http://www.w3.org/2000/svg" class="${iconSize} inline" fill="none"
Expand Down Expand Up @@ -27,6 +27,16 @@
</path>
</svg>
</a>
</div>
<div>
<a href="${ema:note:editUrl}" title="Edit this page" rel="edit">
<svg style="width: 1rem;" class="hover:text-${theme}-700" fill="none" stroke="currentColor"
viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd"
d="M7.293 14.707a1 1 0 010-1.414L10.586 10 7.293 6.707a1 1 0 011.414-1.414l4 4a1 1 0 010 1.414l-4 4a1 1 0 01-1.414 0z"
clip-rule="evenodd"></path>
</svg>
</a>

</div>
</footer>
3 changes: 3 additions & 0 deletions docs/index.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ page:
headHtml: |
<snippet var="js.prism" />
site:
editBaseUrl: https://github.com/srid/emanote/edit/master/docs/

pandoc:
rewriteClass:
# For use in notes with Prism.JS disabled
Expand Down
2 changes: 2 additions & 0 deletions src/Emanote/View/Template.hs
Original file line number Diff line number Diff line change
Expand Up @@ -164,6 +164,8 @@ renderLmlHtml model note = do
"tree:open" ## Heist.ifElseISplice (not . null $ children)
"ema:note:uptree:nonempty" ## Heist.ifElseISplice (not . null $ folgeAnc)
"ema:note:uptreeStr" ## HI.textSplice (toText . Shower.shower $ folgeAnc)
"ema:note:editUrl"
## HI.textSplice (MN.lookupAeson @Text "edit/" ("site" :| ["editBaseUrl"]) meta <> toText (R.encodeRoute $ R.lmlRouteCase r))
"ema:note:pandoc"
## withBlockCtx
$ \ctx ->
Expand Down

0 comments on commit 4981da2

Please sign in to comment.