Repositories

grarr

(mirrored on github)

Modified src/render/analysis.rs

@@ -6,7 +6,7 @@ renderers! {
@if let Some(url) = analysis.url() {
div.block.analysis {
div.block-header {
h5 {
small {
a href={ ^url } {
"External analysis"
@if let Some(timestamp) = analysis.timestamp() {

Modified src/render/ci_status.rs

@@ -5,7 +5,7 @@ renderers! {
CIStatus(ci_status: &'a git_appraise::CIStatus) {
div.block.ci-status {
div.block-header {
h5 {
small {
@match ci_status.url() {
Some(url) => {
a href={ ^url } {

Modified src/render/comment.rs

@@ -4,10 +4,10 @@ use chrono::naive::datetime::NaiveDateTime;
renderers! {
CommentHeader(comment: &'a git_appraise::Comment) {
div.block-header.comment-header {
h4 {
^super::Avatar(comment.author().unwrap_or("unknown@example.org"), &None)
span.rest {
div.block-header.row.center {
^super::Avatar(comment.author().unwrap_or("unknown@example.org"), &None)
div.column {
div {
span.user
^comment.author().unwrap_or("<unknown author>")
" commented "

Modified src/render/commit.rs

@@ -32,7 +32,7 @@ renderers! {
^super::Avatar(email, &commit.author().name())
}
} @else {
div.column {
div.column.fixed {
@if let Some(email) = commit.author().email() {
^super::Avatar(email, &commit.author().name())
}

Modified src/render/request.rs

@@ -28,38 +28,36 @@ renderers! {
}
RequestHeader(root: &'a str, request: &'a git_appraise::Request) {
div.block-header.request-header {
h3.float-right {
a href={ ^root "/commit/" ^request.commit_id() } {
span.id
^short(request.commit_id())
}
}
h5 {
@if let Some(timestamp) = request.timestamp() {
span.timestamp
^NaiveDateTime::from_timestamp(timestamp.seconds(), 0)
}
}
h3 {
a href={ ^root "/review/" ^request.commit_id() } {
@match summary(request) {
Some(summary) => ^summary,
None => "<No summary provided>",
div.block-header {
div.row {
^super::Avatar(request.requester().unwrap_or("unknown@example.org"), &None)
div.column {
div {
a href={ ^root "/review/" ^request.commit_id() } {
span.id ^short(request.commit_id())
" "
@match summary(request) {
Some(summary) => ^summary,
None => "<No summary provided>",
}
}
}
small {
span.user
^request.requester().unwrap_or("<unknown requester>")
" wants to merge "
span.ref
^request.review_ref().unwrap_or("<unknown ref>")
" into "
span.ref
^request.target_ref().unwrap_or("<unknown ref>")
}
}
}
h4 {
^super::Avatar(request.requester().unwrap_or("unknown@example.org"), &None)
span.rest {
span.user
^request.requester().unwrap_or("<unknown requester>")
" wants to merge "
span.ref
^request.review_ref().unwrap_or("<unknown ref>")
" into "
span.ref
^request.target_ref().unwrap_or("<unknown ref>")
div.column.fixed {
@if let Some(timestamp) = request.timestamp() {
small.timestamp
^NaiveDateTime::from_timestamp(timestamp.seconds(), 0)
}
}
}
}

Modified src/static/css/layout.css

@@ -32,7 +32,7 @@ a {
}
.block-header {
padding: 0.5rem 1rem 0.3rem 1rem;
padding: 0.5rem 1rem;
}
.block-header h1, .block-header h2, .block-header h3, .block-header h4, .block-header h5 {
@@ -40,6 +40,10 @@ a {
padding: 0;
}
.block-header h1:last-child, .block-header h2:last-child, .block-header h3:last-child, .block-header h4:last-child, .block-header h5:last-child {
margin-bottom: 0;
}
.repository-header h1, .repository-header h4 {
margin: 0.4rem 1.6rem;
}
@@ -110,10 +114,18 @@ code {
.avatar {
height: 30px;
width: 30px;
margin: 0 0.8rem 0.2rem 0;
margin: 0 0.8rem 0rem 0;
flex-shrink: 0;
}
.column .avatar {
margin-bottom: 0.2rem;
}
.column .avatar:last-child {
margin-bottom: 0rem;
}
.cf:after {
content: "";
display: table;
@@ -252,5 +264,6 @@ pre.block-details {
}
.row { display: flex; flex-direction: row; }
.column { display: flex; flex-direction: column; }
.column { display: flex; flex-direction: column; flex-grow: 1; }
.column.fixed { flex-grow: 0; flex-shrink: 0; }
.center { align-items: center; }