Fix profile website links
This commit is contained in:
parent
88c1cd50a7
commit
b718bbe15c
3 changed files with 7 additions and 2 deletions
|
@ -597,7 +597,7 @@ video {
|
||||||
float: none;
|
float: none;
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
position: relative;
|
position: relative;
|
||||||
width: auto;
|
width: 100%;
|
||||||
background-color: #0f0f0f !important;
|
background-color: #0f0f0f !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -33,7 +33,7 @@ proc renderProfileCard*(profile: Profile): VNode =
|
||||||
tdiv(class="profile-website"):
|
tdiv(class="profile-website"):
|
||||||
span:
|
span:
|
||||||
text "🔗 "
|
text "🔗 "
|
||||||
a(href=profile.website): text profile.website
|
linkText(profile.website)
|
||||||
|
|
||||||
tdiv(class="profile-joindate"):
|
tdiv(class="profile-joindate"):
|
||||||
span(title=getJoinDateFull(profile)):
|
span(title=getJoinDateFull(profile)):
|
||||||
|
|
|
@ -19,3 +19,8 @@ proc linkUser*(profile: Profile, class=""): VNode =
|
||||||
proc genImg*(url: string; class=""): VNode =
|
proc genImg*(url: string; class=""): VNode =
|
||||||
buildHtml():
|
buildHtml():
|
||||||
img(src=url.getSigUrl("pic"), class=class, alt="Image")
|
img(src=url.getSigUrl("pic"), class=class, alt="Image")
|
||||||
|
|
||||||
|
proc linkText*(text: string; class=""): VNode =
|
||||||
|
let url = if "http" notin text: "http://" & text else: text
|
||||||
|
buildHtml():
|
||||||
|
a(href=url, class=class): text text
|
||||||
|
|
Loading…
Reference in a new issue