{% import "path/filepath" %} {% import "strings" %} {% import "github.com/bouncepaw/mycorrhiza/cfg" %} {% import "github.com/bouncepaw/mycorrhiza/hyphae" %} {% import "github.com/bouncepaw/mycorrhiza/user" %} {% import "github.com/bouncepaw/mycorrhiza/util" %} {% func beautifulLink(hyphaName string) %} {%s util.BeautifulName(hyphaName) %}{% endfunc %} {% func nonExistentHyphaNotice(h *hyphae.Hypha, u *user.User) %}

This hypha does not exist

{% if cfg.UseAuth && u.Group == "anon" %}

You are not authorized to create new hyphae. Here is what you can do:

{% else %}

📝 Write a text

Write a note, a diary, an article, a story or anything textual using Mycomarkup. Full history of edits to the document will be saved.

Make sure to follow this wiki's writing conventions if there are any.

Create

🖼 Upload a media

Upload a picture, a video or an audio. Most common formats can be accessed from the browser, others can be only downloaded afterwards. You can write a description for the media later.

{% endif %}
{% endfunc %} {% func NaviTitleHTML(h *hyphae.Hypha) %} {% code var ( prevAcc = "/hypha/" parts = strings.Split(h.Name, "/") ) %}

{% stripspace %} {%-s= cfg.NaviTitleIcon -%} {% for i, part := range parts %} {% if i > 0 %} {% endif %} {%s= util.BeautifulName(part) %} {% code prevAcc += part + "/" %} {% endfor %} {% endstripspace %}

{% endfunc %} {% func AttachmentHTML(h *hyphae.Hypha) %} {% switch filepath.Ext(h.BinaryPath) %} {% case ".jpg", ".gif", ".png", ".webp", ".svg", ".ico" %}
{% case ".ogg", ".webm", ".mp4" %}
{% case ".mp3" %}
{% default %}

Download media

{% endswitch %} {% endfunc %}