Skip to content

Commit

Permalink
Add a short commit sha for display. Change the anchor link icon for p…
Browse files Browse the repository at this point in the history
…rojects. Tweak CSS.
  • Loading branch information
jimCresswell committed Aug 29, 2015
1 parent 699c5c5 commit 6e68378
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
3 changes: 2 additions & 1 deletion lib/specifications/getProjectUsingGit.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,8 @@ module.exports = function getProject(repoUrl, repoName, localName) {
repoName: repoName,
repoUrl: repoUrl,
localName: localName,
commit: sha
commit: sha,
shortCommit: sha.substring(0, 7)
};
}

Expand Down
1 change: 1 addition & 0 deletions lib/specifications/projectMetaData.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ function deriveProjectData(featureFileRoot, repoData) {
name: repoData.repoName,
url: repoData.repoUrl,
commit: repoData.commit,
shortCommit: repoData.shortCommit,
localName: repoData.localName,
featureFilePaths: []
}
Expand Down
23 changes: 16 additions & 7 deletions public/css/features.css
Original file line number Diff line number Diff line change
@@ -1,32 +1,41 @@
.project-name {
.project-title {
display: inline-block;
}

.quick-link {
text-decoration: none;
color: blue;
}

.project-name .quick-link-arrow {
.project-title .quick-link-icon {
font-size: 1.3em;
opacity: 0.4;
color: blue;
}
.project-name:hover .quick-link-arrow {
.project-title:hover .quick-link-icon {
opacity: 1;
color: green;
}
.project-name {
margin-left: 0.5em;
}

.project-commit {
margin-left: 0.3em;
}

.repo-link {
position: relative;
top: -0.1em;
font-size: 0.7em;
margin-left: 1em;
margin-left: 2em;
font-weight: bold;
text-transform: uppercase;
}
.repo-link a {
text-decoration: none;
color: blue;
}
.repo-link:hover a {
text-decoration: underline;
color: green;
}

.links-container {
Expand Down
6 changes: 3 additions & 3 deletions views/features.hbs
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,10 @@
</header>
{{#each projects}}
<section class="project">
<h2 class="project-name" id={{this.name}}>
<a class="quick-link" href="#{{this.name}}"><span class="quick-link-arrow">&Rarr;</span> {{this.name}}</a>
<h2 class="project-title" id={{this.name}}>
<a class="quick-link" href="#{{this.name}}"><span class="quick-link-icon">&elsdot;</span><span class="project-name">{{this.name}}</span></a>
</h2>
<span class="project-commit">&commat;{{this.commit}}</span>
<span class="project-commit">&commat;{{this.shortCommit}}</span>
<span class="repo-link"><a href="{{this.url}}">(visit repository)</a></span>
<div class="links-container">
{{#each this.featureFilePaths}}
Expand Down

0 comments on commit 6e68378

Please sign in to comment.