about summary refs log tree commit diff
path: root/app/views/accounts
diff options
context:
space:
mode:
Diffstat (limited to 'app/views/accounts')
-rw-r--r--app/views/accounts/_header.html.haml12
1 files changed, 9 insertions, 3 deletions
diff --git a/app/views/accounts/_header.html.haml b/app/views/accounts/_header.html.haml
index 4098d6778..b5653f161 100644
--- a/app/views/accounts/_header.html.haml
+++ b/app/views/accounts/_header.html.haml
@@ -1,3 +1,4 @@
+- processed_bio = FrontmatterHandler.instance.process_bio Formatter.instance.simplified_format(account, custom_emojify: true)
 .card.h-card.p-author{ style: "background-image: url(#{account.header.url(:original)})" }
   .card__illustration
     = render 'accounts/follow_button', account: account
@@ -23,16 +24,21 @@
         .roles
           .account-role.moderator
             = t 'accounts.roles.moderator'
-
     .bio
-      .account__header__content.p-note.emojify= Formatter.instance.simplified_format(account, custom_emojify: true)
+      .account__header__content.p-note.emojify!=processed_bio[:text]
 
-      - unless account.fields.empty?
+      - if !account.fields.empty?
         .account__header__fields
           - account.fields.each do |field|
             %dl
               %dt.emojify{ title: field.name }= field.name
               %dd.emojify{ title: field.value }= Formatter.instance.format_field(account, field.value, custom_emojify: true)
+      - elsif processed_bio[:metadata].length > 0
+        .account__header__fields
+          - processed_bio[:metadata].each do |i|
+            %dl
+              %dt.emojify{ title: i[0] }!= i[0]
+              %dd.emojify{ title: i[1] }!= i[1]
 
     .details-counters
       .counter{ class: active_nav_class(short_account_url(account)) }