diff --git a/app/views/layouts/base.html.haml b/app/views/layouts/base.html.haml index 6791f897..8b05a3b8 100644 --- a/app/views/layouts/base.html.haml +++ b/app/views/layouts/base.html.haml @@ -30,6 +30,7 @@ = render 'navigation/guest' = render 'shared/announcements' = yield + = render "shared/formatting" - if Rails.env.development? #debug %hr diff --git a/app/views/shared/_format_link.html.haml b/app/views/shared/_format_link.html.haml new file mode 100644 index 00000000..023cbfe5 --- /dev/null +++ b/app/views/shared/_format_link.html.haml @@ -0,0 +1,3 @@ +%a.text-muted.text-decoration-none.fs-7{ href: "#", data: { controller: "format-popup" }, tabindex: "0" } + %i.fab.fa-markdown + = t("voc.format_markdown") diff --git a/app/views/shared/_formatting.html.haml b/app/views/shared/_formatting.html.haml new file mode 100644 index 00000000..d185fc17 --- /dev/null +++ b/app/views/shared/_formatting.html.haml @@ -0,0 +1,4 @@ +#formatting-options.d-none{ aria: { hidden: true } } + = t(".body_html", app_name: APP_CONFIG["site_name"]) + + diff --git a/config/locales/views.en.yml b/config/locales/views.en.yml index efe4373a..72e526a3 100644 --- a/config/locales/views.en.yml +++ b/config/locales/views.en.yml @@ -550,6 +550,13 @@ en: unsubscribe_all: "Disable on all devices" description: "Here you can set up or disable push notifications for new questions in your inbox." shared: + formatting: + body_html: | +
%{app_name} uses Markdown for formatting
+Add two new lines for a new paragraph to start
+*italic text*
for italic text
**bold text**
for bold text
[link](https://example.com)
for link