Make link styling default for anchor tags

This commit is contained in:
Omar Roth 2018-03-06 22:03:45 -06:00
parent ebe51c91d7
commit 8a3056d0e3
5 changed files with 16 additions and 16 deletions

View file

@ -1,9 +1,9 @@
a.link {
a {
color: #333;
text-decoration: none;
}
a:hover.link,
a:active.link {
a:hover,
a:active {
color: #167ac6;
}

View file

@ -300,7 +300,7 @@ def template_comments(root)
content = <<-END_HTML
<p>
<a class="link" href="javascript:void(0)" onclick="toggle(this)">[ - ]</a> #{score} <b>#{author}</b>
<a href="javascript:void(0)" onclick="toggle(this)">[ - ]</a> #{score} <b>#{author}</b>
</p>
<div>
#{body_html}
@ -358,7 +358,7 @@ def add_alt_links(html)
if ["www.youtube.com", "youtu.be", "m.youtube.com"].includes?(url.host) && url.path == "/watch"
alt_link = <<-END_HTML
<a class="link" href="#{url.full_path}">
<a href="#{url.full_path}">
<i class="fa fa-link" aria-hidden="true"></i>
</a>
END_HTML

View file

@ -8,11 +8,11 @@
<% player_response = JSON.parse(video.info["player_response"]) %>
<div class="pure-u-1 pure-u-md-1-4">
<div style="margin:1em;">
<a style="width:100%;" class="link" href="/watch?v=<%= video.id %>">
<a style="width:100%;" href="/watch?v=<%= video.id %>">
<img style="width:100%;" src="<%= player_response["videoDetails"]["thumbnail"]["thumbnails"][0]["url"] %>"/>
<p><%= video.title %></p>
</a>
<p><b><a style="width:100%;" class="link" href="https://youtube.com/channel/<%= video.info["ucid"] %>"><%= video.info["author"] %></a></b></p>
<p><b><a style="width:100%;" href="https://youtube.com/channel/<%= video.info["ucid"] %>"><%= video.info["author"] %></a></b></p>
</div>
</div>
<% end %>

View file

@ -7,11 +7,11 @@
<% slice.each do |video| %>
<div class="pure-u-1 pure-u-md-1-4">
<div style="margin:1em;">
<a style="width:100%;" class="link" href="<%= video["link"] %>">
<a style="width:100%;" href="<%= video["link"] %>">
<img style="width:100%;" src="<%= video["thumbnail"] %>"/>
<%= video["title"] %>
</a>
<p><b><a style="width:100%;" class="link" href="<%= video["author_url"]%>"><%= video["author"] %></a></b></p>
<p><b><a style="width:100%;" href="<%= video["author_url"]%>"><%= video["author"] %></a></b></p>
</div>
</div>
<% end %>
@ -19,5 +19,5 @@
<% end %>
<p style="text-align:right;">
<a class="link" href="/search?q=<%= query %>&page=<%= page + 1 %>">Next page</a>
<a href="/search?q=<%= query %>&page=<%= page + 1 %>">Next page</a>
</p>

View file

@ -75,11 +75,11 @@ function toggle(target) {
<h1>
<%= video.info["title"] %>
<% if listen %>
<a class="link" href="/watch?<%= env.params.query %>">
<a href="/watch?<%= env.params.query %>">
<i class="fa fa-video" aria-hidden="true"></i>
</a>
<% else %>
<a class="link" href="/watch?<%= env.params.query %>&listen=true">
<a href="/watch?<%= env.params.query %>&listen=true">
<i class="fa fa-volume-up" aria-hidden="true"></i>
</a>
<% end %>
@ -97,7 +97,7 @@ function toggle(target) {
<div class="pure-u-1 pure-u-md-3-5">
<p>
<a class="link" href="https://youtube.com/channel/<%= video.info["ucid"] %>">
<a href="https://youtube.com/channel/<%= video.info["ucid"] %>">
<h3><%= video.info["author"] %></h3>
</a>
</p>
@ -109,7 +109,7 @@ function toggle(target) {
<div style="margin-right:1em; overflow-wrap:break-word; word-wrap:break-word;">
<h3><%= reddit_thread.data.title %></h3>
<b>
<a target="_blank" class="link" href="https://reddit.com<%= reddit_thread.data.permalink %>">View comments on Reddit</a>
<a target="_blank" href="https://reddit.com<%= reddit_thread.data.permalink %>">View comments on Reddit</a>
</b>
<%= reddit_html %>
</div>
@ -119,7 +119,7 @@ function toggle(target) {
<div class="pure-u-1 pure-u-md-1-5">
<% rvs.each do |rv| %>
<% if rv.has_key?("id") %>
<a class="link" href="/watch?v=<%= rv["id"] %>">
<a href="/watch?v=<%= rv["id"] %>">
<img style="width:100%;" alt="thumbnail" src="<%= rv["iurlmq"] %>">
<p style="width:100%"><%= rv["title"] %></p>
<p><b style="width: 100%"><%= rv["author"] %></b></p>