Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor content detail header to look more like mockups. #841

Merged
merged 1 commit into from
Jul 7, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,53 +1,64 @@
<div class="row repository-container">
<div class="col-sm-4">
<div class="title-box">
<div class="icon-container">
<span class="fa fa-5x" [ngClass]="repositoryView.iconClass" tooltip="{{ repositoryView.tooltip }}"></span>
</div>
<div class="title-container">
<div class="title">{{ repositoryView.name }}</div>
<div class="description">{{ repositoryView.description }}</div>
<a class="namespace"
[href]=""
(click)="viewAuthor()"
tooltip="View the Author's page">
<img [src]="repositoryView.avatarUrl" > {{ repositoryView.displayName }}</a>
</div>

<div class="col-lg-2">
<div class="namespace-img">
<img class="img-wrapper" tooltip="View Author's Profile" [src]="namespace.avatar_url" (click)="viewAuthor()">
<a (click)="viewAuthor()"><span class="fa fa-user"></span> {{ namespace.name }}</a>
</div>
</div>
<div class="col-sm-8">
<div class="repository-details">
<div class="repo-count">
<i class="fa fa-download fa-2x"></i>
<span class="count">{{ repositoryView.downloadCount }}</span>
<span class="count-label">Downloads</span>
</div>
<div class="repo-count">
<i class="fa fa-eye fa-2x"></i>
<span class="count">{{ repositoryView.watchersCount }}</span>
<span class="count-label">Watchers</span>
</div>
<div class="repo-count">
<i class="fa fa-star fa-2x"></i>
<span class="count">{{ repositoryView.stargazersCount }}</span>
<span class="count-label">Stars</span>
</div>
<div class="repo-count">
<i class="fa fa-copy fa-2x"></i>
<span class="count">{{ repositoryView.forksCount }}</span>
<span class="count-label">Forks</span>
</div>
<div>
<a [href]="repositoryView.issueTrackerUrl" *ngIf="repositoryView.issueTrackerUrl"
target="_blank"
tooltip="Visit the issue tracker. Opens in a new browser tab."
class="btn btn-default"><i class="fa fa-bug"></i> Issue Tracker</a>

<div class="col-lg-6">
<div class="text-overflow-pf">
<div class="repo-name">
<span class="fa" [ngClass]="repositoryView.iconClass" tooltip="{{ repositoryView.tooltip }}"></span> {{ repositoryView.name }}
</div>
<div>
<a [href]="repositoryView.scmUrl" target="_blank"
tooltip="Visit the repository. Opens in a new browser tab." class="btn btn-default">
<i [ngClass]="repositoryView.scmIconClass"></i> {{ repositoryView.scmName }} Repo</a>
{{ repositoryView.description }}
</div>
</div>
</div>
<div class="col-lg-4 repository-details">

<span class="columns">
<ul>
<li class="repo-count">
<i class="fa fa-download fa"></i>
<span class="count">{{ repositoryView.downloadCount }}</span>
<span class="count-label">Downloads</span>
</li>
<li class="repo-count">
<i class="fa fa-eye fa"></i>
<span class="count">{{ repositoryView.watchersCount }}</span>
<span class="count-label">Watchers</span>
</li>
</ul>

<a [href]="repositoryView.issueTrackerUrl" *ngIf="repositoryView.issueTrackerUrl"
target="_blank"
tooltip="Visit the issue tracker. Opens in a new browser tab."
class="btn btn-default"><i class="fa fa-bug"></i> Issue Tracker</a>
</span>

&nbsp;

<span class="columns">
<ul>
<li class="repo-count">
<i class="fa fa-star fa"></i>
<span class="count">{{ repositoryView.stargazersCount }}</span>
<span class="count-label">Stars</span>
</li>
<li class="repo-count">
<i class="fa fa-copy fa"></i>
<span class="count">{{ repositoryView.forksCount }}</span>
<span class="count-label">Forks</span>
</li>
</ul>

<a [href]="repositoryView.scmUrl" target="_blank"
tooltip="Visit the repository. Opens in a new browser tab." class="btn btn-default">
<i [ngClass]="repositoryView.scmIconClass"></i> {{ repositoryView.scmName }} Repo</a>
</span>

</div>
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -12,49 +12,46 @@
border-bottom: 1px solid #ccc;
padding-bottom: 15px;

.title-box {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-content: middle;
}
.icon-container {
margin-right: 15px;
}
.title-container {
.title, .description {
margin-bottom: 5px;
}
.title {
font-weight: 700;
font-size: 22px;
.repository-details {
height: 120px;
min-width: 270px;

.columns {
display: inline-block;
vertical-align: top;
}
.namespace {

ul {
list-style-type: none;
font-size: 14px;
img {
max-height: 64px;
margin-right: 5px;
}
}
.namespace:hover {
cursor: pointer;
padding: 0;
}
}
.repository-details {
display: flex;
flex-direction: row;
flex-wrap: nowrap;
justify-content: flex-start;
align-items: middle;

.namespace-img {
min-width: 150px;
cursor: pointer;

@media(min-width: 1260px){
border-right: 1px solid #ccc;
text-align: center;
}

.img-wrapper {
height: 120px;
@media(min-width: 1200px){
margin: auto;
}
padding: 0;
border: 0;
display: block;
}
}

.repository-details > div {
.repo-name {
font-size: 14px;
margin-right: 20px;
.count {
font-weight: 700;
padding: 0 5px;
}
color: @black;
font-weight: 700;
font-size: 18px;
}
}