Skip to content

Commit

Permalink
Fix profile website links
Browse files Browse the repository at this point in the history
  • Loading branch information
zedeus committed Aug 12, 2019
1 parent 88c1cd5 commit b718bbe
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 2 deletions.
2 changes: 1 addition & 1 deletion public/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -597,7 +597,7 @@ video {
float: none;
border-radius: 0;
position: relative;
width: auto;
width: 100%;
background-color: #0f0f0f !important;
}

Expand Down
2 changes: 1 addition & 1 deletion src/views/profile.nim
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ proc renderProfileCard*(profile: Profile): VNode =
tdiv(class="profile-website"):
span:
text "🔗 "
a(href=profile.website): text profile.website
linkText(profile.website)

tdiv(class="profile-joindate"):
span(title=getJoinDateFull(profile)):
Expand Down
5 changes: 5 additions & 0 deletions src/views/renderutils.nim
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,8 @@ proc linkUser*(profile: Profile, class=""): VNode =
proc genImg*(url: string; class=""): VNode =
buildHtml():
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

0 comments on commit b718bbe

Please sign in to comment.