diff --git a/public/style.css b/public/style.css index e6125b3..900fbb4 100644 --- a/public/style.css +++ b/public/style.css @@ -597,7 +597,7 @@ video { float: none; border-radius: 0; position: relative; - width: auto; + width: 100%; background-color: #0f0f0f !important; } diff --git a/src/views/profile.nim b/src/views/profile.nim index deecd22..1f55f79 100644 --- a/src/views/profile.nim +++ b/src/views/profile.nim @@ -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)): diff --git a/src/views/renderutils.nim b/src/views/renderutils.nim index 2f501f0..eab66cf 100644 --- a/src/views/renderutils.nim +++ b/src/views/renderutils.nim @@ -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