From 88b593a63ff3d607d6f98553654c46bc7cfc0b7b Mon Sep 17 00:00:00 2001 From: Thibaut Girka Date: Tue, 31 Jul 2018 11:44:12 +0200 Subject: Drop glitch-style account bio fields Upstream's implementation has been merged a while ago and is the preferred way to set fields, as it is the only one compatible with upstream and is more user-friendly. This commit deletes the legacy glitch-soc FrontMatter functionality in order to clean up the code and make it easier to maintain. --- app/views/accounts/_header.html.haml | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) (limited to 'app/views') diff --git a/app/views/accounts/_header.html.haml b/app/views/accounts/_header.html.haml index b5653f161..4098d6778 100644 --- a/app/views/accounts/_header.html.haml +++ b/app/views/accounts/_header.html.haml @@ -1,4 +1,3 @@ -- 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 @@ -24,21 +23,16 @@ .roles .account-role.moderator = t 'accounts.roles.moderator' + .bio - .account__header__content.p-note.emojify!=processed_bio[:text] + .account__header__content.p-note.emojify= Formatter.instance.simplified_format(account, custom_emojify: true) - - if !account.fields.empty? + - unless 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)) } -- cgit