This repository has been archived by the owner on Apr 17, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 470
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
274c090
commit 9d6cc25
Showing
10 changed files
with
73 additions
and
67 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
.explore { | ||
h2 { | ||
color: $white; | ||
margin-bottom: 15px; | ||
} | ||
|
||
.result-list { | ||
list-style-type: none; | ||
padding: 0; | ||
} | ||
|
||
.result-item { | ||
background: rgba(255, 255, 255, 0.7); | ||
border-radius: 5px; | ||
margin-bottom: 10px; | ||
padding: 15px; | ||
} | ||
|
||
.result-item-name { | ||
margin-top: 0; | ||
} | ||
|
||
.result-item-stars { | ||
line-height: 23px; // 18 height + 5 diff between fonts | ||
|
||
.fa-star { | ||
color: $primary-colour; | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,7 @@ | ||
section.row-0 | ||
.center-panel | ||
.col-md-4.col-sm-2.col-xs-1 | ||
.col-md-4.col-sm-8.col-xs-10.text-center | ||
= render 'shared/notifications' | ||
= image_tag 'layout/portus-logo-login-page.png', class: 'login-picture' | ||
|
||
= form_for(:explore, method: "GET") do |f| | ||
= f.text_field :search, class: 'input form-control input-lg first', placeholder: "Repository", autofocus: true, required: true, value: @current | ||
= f.button "Search", id: "login-btn", class: 'classbutton btn btn-primary btn-block btn-lg' | ||
|
||
.text-center = link_to 'Go back to the login page', new_user_session_path, class: 'btn btn-link' | ||
|
||
- if @repositories.any? | ||
.text-left | ||
h2 | ||
| Search results | ||
ul.repository | ||
- @repositories.each do |r| | ||
= render r | ||
.center-panel.explore | ||
.col-md-4.col-sm-3.col-xs-1 | ||
.col-md-4.col-sm-6.col-xs-10.text-center | ||
= render 'explore/partials/top' | ||
= render 'explore/partials/form' | ||
= render 'explore/partials/result' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
= form_for(:explore, method: "GET") do |f| | ||
= f.text_field :search, class: 'input form-control input-lg first', placeholder: "Repository", autofocus: true, required: true, value: @current | ||
|
||
= f.button "Search", type: "submit", id: "login-btn", class: 'classbutton btn btn-primary btn-block btn-lg' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
- if @repositories.any? | ||
h2 | ||
- repo_count = @repositories.count | ||
| #{pluralize(repo_count, 'repository')} #{repo_count == 1 ? "was" : "were"} found | ||
ul.result-list | ||
- @repositories.each do |r| | ||
= render partial: 'explore/partials/result_item', locals: { repository: r } | ||
|
||
- if params[:explore] && !@repositories.any? | ||
h2 Your search did not match any repositories. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
li.result-item.text-left | ||
.clearfix | ||
h4.result-item-name.pull-left | ||
= repository.full_name | ||
|
||
.result-item-stars.pull-right | ||
= repository.stars.count | ||
| | ||
i.fa.fa-star | ||
|
||
.clearfix | ||
.tags-list.pull-left | ||
- repository.tags.each do |t| | ||
.label.label-success.tag | ||
= t.name | ||
|
||
.pull-right | ||
| Updated #{time_ago_in_words(repository.updated_at)} ago |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
= render 'shared/notifications' | ||
= image_tag 'layout/portus-logo-login-page.png', class: 'login-picture' | ||
|
||
.text-center = link_to 'Go back to the login page', new_user_session_path, class: 'btn btn-link' |
This file was deleted.
Oops, something went wrong.