]> git.mxchange.org Git - friendica.git/commitdiff
[frio] Add punctuation wrap on several profile fields
authorHypolite Petovan <hypolite@mrpetovan.com>
Tue, 19 Mar 2019 01:02:58 +0000 (21:02 -0400)
committerHypolite Petovan <hypolite@mrpetovan.com>
Tue, 19 Mar 2019 01:02:58 +0000 (21:02 -0400)
- Add sub/punct_wrap.tpl template

view/theme/frio/templates/profile_vcard.tpl
view/theme/frio/templates/sub/punct_wrap.tpl [new file with mode: 0644]

index 02aa89fcccc3eb3f53954d923446d0106f593719..b00e8232179ba1953981e5a4055db7b9996a8e5d 100644 (file)
@@ -39,7 +39,7 @@
                <div class="profile-header">
                        <h3 class="fn p-name">{{$profile.name}}</h3>
 
-                       {{if $profile.addr}}<div class="p-addr">{{$profile.addr}}</div>{{/if}}
+                       {{if $profile.addr}}<div class="p-addr">{{include file="sub/punct_wrap.tpl" text=$profile.addr}}</div>{{/if}}
 
                        {{if $profile.pdesc}}<div class="title">{{$profile.pdesc}}</div>{{/if}}
 
@@ -92,7 +92,7 @@
                {{if $profile.xmpp}}
                <div class="xmpp">
                        <span class="xmpp-label icon"><i class="fa fa-comments"></i></span>
-                       <span class="xmpp-data">{{$profile.xmpp}}</span>
+                       <span class="xmpp-data"><a href="xmpp:{{$profile.xmpp}}" rel="me" target="_blank">{{include file="sub/punct_wrap.tpl" text=$profile.xmpp}}</a></span>
                </div>
                {{/if}}
 
                {{if $homepage}}
                <div class="homepage detail">
                        <span class="homepage-label icon"><i class="fa fa-external-link-square"></i></span>
-                       <span class="homepage-url u-url"><a href="{{$profile.homepage}}" rel="me" target="_blank">{{$profile.homepage}}</a></span>
+                       <span class="homepage-url u-url"><a href="{{$profile.homepage}}" rel="me" target="_blank">{{include file="sub/punct_wrap.tpl" text=$profile.homepage}}</a></span>
                </div>
                {{/if}}
 
diff --git a/view/theme/frio/templates/sub/punct_wrap.tpl b/view/theme/frio/templates/sub/punct_wrap.tpl
new file mode 100644 (file)
index 0000000..31382e7
--- /dev/null
@@ -0,0 +1 @@
+{{$text|regex_replace:"/([@\.])/":"<wbr>$1" nofilter}}\r