Skip to content

Commit

Permalink
improve button design
Browse files Browse the repository at this point in the history
  • Loading branch information
yuki-kimoto committed Nov 30, 2016
1 parent 12b3640 commit b51214a
Show file tree
Hide file tree
Showing 11 changed files with 21 additions and 28 deletions.
9 changes: 7 additions & 2 deletions public/css/common.css
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,7 @@ a:hover {
.labels-tag {
border-radius:5px;
display:inline-block;
padding:7px 12px;
padding:5px 10px;
font-weight:bold;
border:1px solid #dddddd;
}
Expand Down Expand Up @@ -1952,12 +1952,17 @@ button.close {
cursor: default;
}

.btn-fork {
.btn-fork, .btn-new {
font-size:13px;
padding:5px 20px;
height:28px;
}

.btn-delete {
padding:1px 10px;
height:20px;
}

.btn-primary {
color: #ffffff;
text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
Expand Down
2 changes: 1 addition & 1 deletion templates/auto/_login.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@
</div>
<div>
<div>
<button type="submit" class="btn">Login</button>
<button type="submit" class="btn btn-green btn-new">Login</button>
</div>
</div>
</div>
Expand Down
16 changes: 2 additions & 14 deletions templates/auto/_new.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -101,9 +101,6 @@
<div class="new-title">
Create a new repository
</div>
<div class="new-description">
A repository contains all the files for your project, including the revision history.
</div>
</div>
<form action="<%= url_for->query(op => 'create') %>" method="post">
<div class="new-repository">
Expand Down Expand Up @@ -143,30 +140,21 @@
<div>
<%= radio_button private => 0, checked => undef %><span>Public</span>
</div>
<div class="last-child">
Anyone can see this repository. You choose who can commit.
</div>
</li>
<li>
<div>
<%= radio_button private => 1 %><span>Private</span>
</div>
<div class="last-child">
You choose who can see and commit to this repository.
</div>
</li>
</ul>

<div class="new-readme">
<div>
<%= check_box readme => 1 %><span>Initialize this this repository with a README<span>
</div>
<div class="last-child">
This will let you immediately clone the repository to your computer. Skip this step if you’re importing an existing repository.
<%= check_box readme => 1 %><span>Initialize this repository with a README<span>
</div>
</div>

<input type="submit" class="btn btn-green" value="Create repository">
<input type="submit" class="btn btn-green btn-new" value="Create repository">
</form>
</div>
%= include '/include/footer';
2 changes: 1 addition & 1 deletion templates/auto/_start.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@
</div>
</div>
<div>
<button type="submit" class="btn btn-green" style="margin-top:20px">Create Admin User</button>
<button type="submit" class="btn btn-green btn-new" style="margin-top:20px">Create Admin User</button>
</div>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion templates/auto/reset-password.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@
</div>
</div>
<div style="margin-top:20px">
<button type="submit" class="btn btn-green">Reset Password</button>
<button type="submit" class="btn btn-green btn-new">Reset Password</button>
</div>
</div>
</form>
Expand Down
2 changes: 1 addition & 1 deletion templates/issues.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@
</div>
<div class="issues-button-container-right">
% if ($api->logined) {
<a href="<%= url_for("/$user_id/$project_id/issues/new") %>" class="btn btn-green">New issue</a>
<a href="<%= url_for("/$user_id/$project_id/issues/new") %>" class="btn btn-green btn-new">New issue</a>
% }
</div>
</div>
Expand Down
2 changes: 1 addition & 1 deletion templates/labels.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@
%= include '/include/errors', errors => $errors;
% if ($can_write_access) {
<div class="labels-new-panel">
<div class="labels-new-btn btn btn-green">
<div class="labels-new-btn btn btn-green btn-new">
New label
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/pull.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -469,7 +469,7 @@
<div class="pull-request-form-button">
<form action="<%= url_for %>" method="post">
<%= hidden_field op => 'merge' %>
<%= submit_button 'Merge pull request', class => "btn btn-green" %>
<%= submit_button 'Merge pull request', class => "btn btn-green btn-new" %>
<span style="margin-left:5px">
You can also view <a href="javascript:void(0)" onclick="$('#command-line-instructions').toggle()" >command line instructions</a>.
</span>
Expand Down Expand Up @@ -564,7 +564,7 @@ git push origin <%= $base_branch %>
% } else {
<input type="submit" value="Reopen pull request" onclick="$(this).closest('form').find('[name=op]').val('reopen-issue'); $(this).closest('form').submit();" class="btn">
% }
<input type="submit" value="Comment" onclick="$(this).closest('form').find('[name=op]').val('add-comment'); $(this).closest('form').submit();" class="btn btn-green">
<input type="submit" value="Comment" onclick="$(this).closest('form').find('[name=op]').val('add-comment'); $(this).closest('form').submit();" class="btn btn-green btn-new">
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/pulls.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@
% if ($api->logined) {
<div class="pulls-button-container">
% if ($original_project) {
<a href="<%= url_for("/$original_project->{'user.id'}/$original_project->{id}/compare/$original_project->{default_branch}...$user_id:$default_branch") %>" class="btn btn-green">New pull request</a>
<a href="<%= url_for("/$original_project->{'user.id'}/$original_project->{id}/compare/$original_project->{default_branch}...$user_id:$default_branch") %>" class="btn btn-green btn-new">New pull request</a>
% } else {
<a href="<%= url_for("/$user_id/$project_id/compare") %>" class="btn btn-green">New pull request</a>
<a href="<%= url_for("/$user_id/$project_id/compare") %>" class="btn btn-green btn-new">New pull request</a>
% }
</div>
% }
Expand Down
2 changes: 1 addition & 1 deletion templates/settings/collaboration.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@
<form action="<%= url_for->query(op => 'add') %>" method="post">
<div>
<%= text_field 'collaborator' %>
<input type="submit" value="Add"" >
<input type="submit" value="Add" class="btn" >
</div>
</form>
</div>
Expand Down
4 changes: 2 additions & 2 deletions templates/user-settings/ssh.html.ep
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@
<form action="<%= url_for->query(op => 'delete') %>" method="post">
<div>
<b><%= $key->{title} %></b>
<a class="btn btn-small btn-danger" href="javascript:void(0)" onclick="$(this).closest('form').submit()">Delete</a>
<a class="btn btn-danger btn-delete" href="javascript:void(0)" onclick="$(this).closest('form').submit()">Delete</a>
<%= hidden_field 'row-id' => $key->{row_id} %>
</div>
</form>
Expand Down Expand Up @@ -228,7 +228,7 @@
<div>
<%= text_area 'key' %>
</div>
<input type="submit" class="btn btn-green" value="Add key">
<input type="submit" class="btn btn-green btn-new" value="Add key">
</form>
</div>
</div>
Expand Down

0 comments on commit b51214a

Please sign in to comment.