UX: convert embedded topic list HTML structure from table to div

This commit is contained in:
Arpit Jalan
2019-08-29 22:22:38 +05:30
parent 2b3dd1b945
commit b63d476ee9
2 changed files with 20 additions and 14 deletions

View File

@ -178,16 +178,22 @@ div.lightbox-wrapper {
.topics-list { .topics-list {
width: 100%; width: 100%;
.topic-list-item {
td {
padding: 0.5rem;
}
.main-link a { .topic-list-item {
color: $primary; clear: both;
}
.main-link a:visited { .main-link {
color: $primary-medium; border-bottom: 1px solid #e9e9e9;
padding: 0.5rem;
width: 100%;
a {
color: $primary;
}
a:visited {
color: $primary-medium;
}
} }
} }
} }

View File

@ -1,11 +1,11 @@
<%- if @list && @list.topics.present? %> <%- if @list && @list.topics.present? %>
<table class='topics-list' data-embed-state='loaded' <%- if @embed_id %>data-embed-id="<%= @embed_id %>"<%- end %>> <div class='topics-list' data-embed-state='loaded' <%- if @embed_id %>data-embed-id="<%= @embed_id %>"<%- end %>>
<%- @list.topics.each do |t| %> <%- @list.topics.each do |t| %>
<tr class='topic-list-item'> <div class='topic-list-item'>
<td class='main-link'> <div class='main-link'>
<a target="_parent" href="<%= t.url %>" class="title raw-link raw-topic-link" data-topic-id="<%= t.id %>"><%= t.title %></a> <a target="_parent" href="<%= t.url %>" class="title raw-link raw-topic-link" data-topic-id="<%= t.id %>"><%= t.title %></a>
</td> </div>
</div> </div>
<%- end %> <%- end %>
</table> </div>
<%- end %> <%- end %>