css tweaks

This commit is contained in:
Albert Yi
2018-10-23 18:30:35 -07:00
parent 9899199f33
commit c0ab54b889
6 changed files with 48 additions and 14 deletions

View File

@@ -56,8 +56,15 @@ div#page {
button[type=submit] {
padding: 2px 6px;
background: #EEE;
}
#search-box button[type=submit] {
border-left: none;
}
#options-box i.fa-bookmark {
margin-right: 0.25em;
}
}
aside#sidebar > section {

View File

@@ -160,9 +160,34 @@ div#c-posts {
text-align: center;
margin: 0.5em 0;
input[type=submit] {
padding: 0.2em 0.75em;
form {
display: inline-block;
}
i {
margin-right: 0.1em;
color: deeppink;
}
button.ui-button {
padding: 0.25em 0.75em;
}
}
.fav-buttons-true #add-fav-button {
display: none;
}
.fav-buttons-true #remove-fav-button {
display: inline-block;
}
.fav-buttons-false #remove-fav-button {
display: none;
}
.fav-buttons-false #add-fav-button {
display: inline-block;
}
#ugoira-controls {
@@ -303,10 +328,6 @@ div#c-posts {
margin-top: 1em;
}
#add-fav-button, #remove-fav-button {
margin-top: 1em;
}
menu#post-sections {
margin: 0;
font-size: $h3_size;

View File

@@ -29,10 +29,11 @@
}
button[type=submit] {
font-size: 1.4em;
font-size: 1.2em;
background-color: #EEE;
height: 42px;
padding: 2px 10px;
border: 1px solid rgb(197, 197, 197);
}
}

View File

@@ -2,7 +2,7 @@
<h1>Options</h1>
<ul>
<% if SavedSearch.enabled? && CurrentUser.is_member? %>
<li><%= button_tag "Save search", id: "save-search", class: "ui-button ui-widget ui-corner-all gradient sub" %></li>
<li><%= button_tag(tag.i(class: "fas fa-bookmark") + " Save search", id: "save-search", class: "ui-button ui-widget ui-corner-all gradient sub") %></li>
<% end %>
</ul>
</section>

View File

@@ -15,7 +15,7 @@
<li id="copy-all-notes-list"><%= link_to "Copy notes", "#", :id => "copy-notes" %></li>
<% end %>
<li id="add-artist-commentary-list"><%= link_to "Add commentary", "#", :id => "add-commentary" %></li>
<li><%= link_to "Add to favorite group", "#", :id => "open-favgroup-dialog-link", :"data-shortcut" => "g" %></li>
<li><%= link_to "Add to fav group", "#", :id => "open-favgroup-dialog-link", :"data-shortcut" => "g" %></li>
<li><%= link_to "Find similar", iqdb_queries_path(:post_id => post.id) %></li>
<% if post.is_status_locked? %>
@@ -53,7 +53,7 @@
<% end %>
<% if CurrentUser.is_moderator? %>
<li><%= link_to "Replace Image", new_post_replacement_path(post_id: post.id), id: "replace-image", remote: true %></li>
<li><%= link_to "Replace image", new_post_replacement_path(post_id: post.id), id: "replace-image", remote: true %></li>
<li><%= link_to "Down vote report", reports_down_voting_post_path(post_id: post.id) %></li>
<% end %>
<% end %>

View File

@@ -54,10 +54,15 @@
</section>
<% if CurrentUser.is_member? %>
<div class="fav-buttons">
<%= button_to "Favorite", favorites_path(post_id: @post.id), remote: true, method: :post, form: {id: "add-fav-button", style: ("display: none;" if @post.is_favorited?)}, class: "ui-button ui-widget ui-corner-all gradient", data: {disable_with: "Favoriting..."} %>
<%= button_to "Unfavorite", favorite_path(@post), remote: true, method: :delete, form: {id: "remove-fav-button", style: ("display: none;" if !@post.is_favorited?)}, class: "ui-button ui-widget ui-corner-all gradient", data: {disable_with: "Unfavoriting..."} %>
</div>
<%= content_tag(:div, class: "fav-buttons fav-buttons-#{@post.is_favorited?}") do %>
<%= form_tag(favorites_path(post_id: @post.id), method: "post", id: "add-fav-button", "data-remote": true) do %>
<%= button_tag tag.i(class: "far fa-heart") + " Favorite", class: "ui-button ui-widget ui-corner-all gradient", "data-disable-with": "Favoriting..." %>
<% end %>
<%= form_tag(favorite_path(@post.id), method: "delete", id: "remove-fav-button", "data-remote": true) do %>
<%= button_tag tag.i(class: "fas fa-heart") + " Unfavorite", class: "ui-button ui-widget ui-corner-all gradient", "data-disable-with": "Updating..." %>
<% end %>
<% end %>
<% end %>
<section id="mark-as-translated-section" style="display: none;">