Repositories

grarr

(mirrored on github)

Wim Looman <wim@nemo157.com>
4b166c Split layout and theme up
Wim Looman committed at 2016-02-17 23:58:50

Modified src/main.rs

@@ -70,7 +70,8 @@ fn main() {
prefix: "./static/";
"./static/js/highlight.js",
"./static/css/highlight-solarized-light.css",
"./static/css/style.css",
"./static/css/layout.css",
"./static/css/theme-solarized-dark.css",
"./static/css/font-awesome.min.css",
"./static/fonts/FontAwesome.otf",
"./static/fonts/fontawesome-webfont.eot",

Modified src/render/style.rs

@@ -1,6 +1,7 @@
renderers! {
Style {
link rel="stylesheet" href="/-/static/css/font-awesome.min.css" { }
link rel="stylesheet" href="/-/static/css/style.css" { }
link rel="stylesheet" href="/-/static/css/layout.css" { }
link rel="stylesheet" href="/-/static/css/theme-solarized-dark.css" { }
}
}

Added src/static/css/color.css

@@ -0,0 +1,178 @@
html * {
color-profile: sRGB;
}
body {
background-color: #002b36;
color: #839496;
}
h1, h2, h3, h4, h5, h6 {
color: #93a1a1;
border-color: #839496;
}
a {
color: #268bd2;
}
a:hover {
color: #3797db
}
.block-header {
background-color: #073642;
}
.block-details {
border: 0px solid #073642;
}
.email, .user {
color: #d33682;
}
.agent {
color: #6c71c4;
}
.ref {
color: #2aa198;
}
.id {
color: #cb4b16;
}
.ref, .id {
font-family: monospace;
background-color: #073642;
}
.block-header .ref, .block-header .id {
background-color: #002b36;
}
.timestamp {
color: #b58900;
}
.filename {
color: #6c71c4;
font-family: monospace;
}
.ci-status a {
color: #839496;
}
pre, pre code {
color: #657b83;
background-color: #fdf6e3;
overflow-x: auto;
overflow-y: hidden;
}
code {
color: #93a1a1;
background-color: #073642;
}
.status {
background-color: #002b36;
}
.status.success {
color: #859900;
}
.status.failure {
color: #dc322f;
}
.status.running {
color: #268bd2;
}
blockquote {
border-left: 1px dotted #839496;
}
.repository-header {
background-color: #073642;
}
.tabs {
background-color: #002b36;
}
.tabs > * {
border-top: 1px solid #073642;
border-bottom: 2px solid #073642;
border-right: 1px solid #073642;
}
.tabs > :first-child {
border-left: 2px solid #073642;
}
.tabs > :last-child {
border-right: 2px solid #073642;
}
.tabs .selected {
background-color: #073642;
}
.expander + label {
border-right: 1px dotted #002b36;
background-color: #073642;
}
.expander + label:hover {
border-color: #268bd2;
color: #268bd2;
}
.expander[disabled] + label:hover {
border-color: #002b36;
color: #839496;
}
pre .line:before {
border-right: 1px dotted #586e75;
font-size: 0.6rem;
}
.diff .addition .text:before {
color: #859900;
}
.diff .deletion .text:before {
color: #dc322f;
}
.diff .addition {
background-color: rgba(133, 153, 0, 0.2);
}
.diff .deletion {
background-color: rgba(220, 50, 47, 0.2);
}
.diff .hunk-header {
color: #93a1a1;
background-color: #eee8d5;
}
.diff .hunk-header * {
color: #93a1a1;
}
pre.block-details {
border: none;
}
.center { align-items: center; }

Added src/static/css/layout.css

@@ -0,0 +1,254 @@
html * {
rendering-intent: auto;
}
h1, h2, h3, h4, h5, h6 {
margin: 0;
}
body {
font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: 1rem auto;
max-width: 50rem;
line-height: 1.2;
padding: 0;
}
a {
text-decoration: none;
cursor: pointer;
}
.block {
margin-bottom: 10px;
display: flex;
flex-direction: column;
}
.block-header {
padding: 0.5rem 1rem 0.3rem 1rem;
}
.block-header h1, .block-header h2, .block-header h3, .block-header h4, .block-header h5 {
margin: 0 0 0.2rem 0;
padding: 0;
}
.repository-header h1, .repository-header h4 {
margin: 0.4rem 1.6rem;
}
.rest {
flex-grow: 1;
}
.block-details {
padding: 0.8rem 1.6rem;
border-width: 0px;
border-bottom-width: 1px;
border-style: solid;
}
@media (min-width: 50rem) {
.block-details {
border-width: 1px;
}
}
.email:before {
content: "<";
}
.email:after {
content: ">";
}
.ref, .id {
font-family: monospace;
padding: 0.1rem 0.3rem;
}
.filename {
font-family: monospace;
}
pre {
padding: 0.4rem 0.8rem;
}
pre, pre code {
overflow-x: auto;
overflow-y: hidden;
}
code {
padding: 0 0.1rem;
}
.status {
padding: 0.1rem 0.3rem;
}
.review-stub {
margin: 0.4rem;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
.avatar {
height: 30px;
width: 30px;
margin: 0 0.8rem 0.2rem 0;
flex-shrink: 0;
}
.cf:after {
content: "";
display: table;
clear: both;
}
blockquote {
border-left-width: 1px;
border-left-style: dotted;
padding-left: 1rem;
}
.repository-header {
margin-bottom: 0.8rem;
}
.tabs {
display: flex;
flex-direction: row;
}
.tabs > * {
display: flex;
border-top-width: 1px;
border-bottom-width: 2px;
border-right-width: 1px;
border-style: solid;
flex-grow: 1;
justify-content: center;
}
.tabs > :first-child {
border-left-width: 2px;
border-style: solid;
}
.tabs > :last-child {
border-right-width: 2px;
border-style: solid;
}
.content {
padding: 0 0.8rem;
}
.path {
font-family: monospace;
}
.commits {
flex-grow: 1;
}
.subtree {
display: flex;
}
.expander {
display: none;
}
.expander + label {
flex-shrink: 0;
margin: 0 0.5em 10px 0;
border-right-width: 1px;
border-right-style: dotted;
min-width: 1em;
min-height: 2em;
cursor: pointer;
flex-direction: column;
display: flex;
justify-content: center;
}
.expander[disabled] + label {
cursor: default;
}
.expander ~ .commits > * { display: none; }
.expander ~ .commits > *:first-child { display: flex; }
.expander:checked ~ .commits > * { display: flex; }
.expander + label > .chevron:before { content: "\f142"; }
.expander:checked + label > .chevron:before { content: " "; }
pre .line {
margin: 0;
padding: 0.0625rem 0 0 0;
}
pre .line .text:before {
content: " ";
}
pre .line:before {
content: " ";
padding: 0.2rem 0;
border-right-width: 1px;
border-right-style: dotted;
font-size: 0.6rem;
}
pre .line[data-line-num]:before {
content: " " attr(data-line-num) " " ;
}
.diff .text:before {
content: " ";
}
.diff .addition .text:before {
content: " + ";
}
.diff .deletion .text:before {
content: " - ";
}
.diff .hunk-header .text:before {
content: " ";
}
.diff .line:before {
content: " ";
}
.diff .line[data-old-line-num][data-new-line-num]:before {
content: " " attr(data-old-line-num) " " attr(data-new-line-num) " " ;
}
.diff pre.block-details code {
padding: 0;
margin: 0;
}
pre.block-details {
padding: 0;
margin: 0;
border: none;
}
.row { display: flex; flex-direction: row; }
.column { display: flex; flex-direction: column; }
.center { align-items: center; }

Deleted src/static/css/style.css

@@ -1,347 +0,0 @@
html * {
color-profile: sRGB;
rendering-intent: auto;
}
body {
background-color: #002b36;
color: #839496;
}
h1, h2, h3, h4, h5, h6 {
color: #93a1a1;
border-color: #839496;
margin: 0;
}
body {
font-family: "Raleway", "HelveticaNeue", "Helvetica Neue", Helvetica, Arial, sans-serif;
margin: 1rem auto;
max-width: 50rem;
line-height: 1.2;
padding: 0;
}
a {
color: #268bd2;
text-decoration: none;
cursor: pointer;
}
a:hover {
color: #3797db
}
.block {
margin-bottom: 10px;
display: flex;
flex-direction: column;
}
.block-header {
padding: 0.5rem 1rem 0.3rem 1rem;
background-color: #073642;
}
.block-header h1, .block-header h2, .block-header h3, .block-header h4, .block-header h5 {
margin: 0 0 0.2rem 0;
padding: 0;
}
.repository-header h1, .repository-header h4 {
margin: 0.4rem 1.6rem;
}
.rest {
flex-grow: 1;
}
.block-details {
padding: 0.8rem 1.6rem;
border: 0px solid #073642;
border-bottom-width: 1px;
}
@media (min-width: 50rem) {
.block-details {
border-width: 1px;
}
}
.email, .user {
color: #d33682;
}
.email:before {
content: "<";
}
.email:after {
content: ">";
}
.agent {
color: #6c71c4;
}
.ref {
color: #2aa198;
}
.id {
color: #cb4b16;
}
.ref, .id {
font-family: monospace;
padding: 0.1rem 0.3rem;
background-color: #073642;
}
.block-header .ref, .block-header .id {
background-color: #002b36;
}
.timestamp {
color: #b58900;
}
.filename {
color: #6c71c4;
font-family: monospace;
}
.ci-status a {
color: #839496;
}
pre {
padding: 0.4rem 0.8rem;
}
pre, pre code {
color: #657b83;
background-color: #fdf6e3;
overflow-x: auto;
overflow-y: hidden;
}
code {
padding: 0 0.1rem;
color: #93a1a1;
background-color: #073642;
}
.status {
padding: 0.1rem 0.3rem;
background-color: #002b36;
}
.status.success {
color: #859900;
}
.status.failure {
color: #dc322f;
}
.status.running {
color: #268bd2;
}
.review-stub {
margin: 0.4rem;
}
.float-left {
float: left;
}
.float-right {
float: right;
}
.avatar {
height: 30px;
width: 30px;
margin: 0 0.8rem 0.2rem 0;
flex-shrink: 0;
}
.cf:after {
content: "";
display: table;
clear: both;
}
blockquote {
border-left: 1px dotted #839496;
padding-left: 1rem;
}
.repository-header {
background-color: #073642;
margin-bottom: 0.8rem;
}
.tabs {
display: flex;
flex-direction: row;
background-color: #002b36;
}
.tabs > * {
display: flex;
border-top: 1px solid #073642;
border-bottom: 2px solid #073642;
border-right: 1px solid #073642;
flex-grow: 1;
justify-content: center;
}
.tabs > :first-child {
border-left: 2px solid #073642;
}
.tabs > :last-child {
border-right: 2px solid #073642;
}
.tabs .selected {
background-color: #073642;
}
.content {
padding: 0 0.8rem;
}
.path {
font-family: monospace;
}
.commits {
flex-grow: 1;
}
.subtree {
display: flex;
}
.expander {
display: none;
}
.expander + label {
flex-shrink: 0;
margin: 0 0.5em 10px 0;
border-right: 1px dotted #002b36;
min-width: 1em;
min-height: 2em;
cursor: pointer;
flex-direction: column;
display: flex;
justify-content: center;
background-color: #073642;
}
.expander[disabled] + label {
cursor: default;
}
.expander + label:hover {
border-color: #268bd2;
color: #268bd2;
}
.expander[disabled] + label:hover {
border-color: #002b36;
color: #839496;
}
.expander ~ .commits > * { display: none; }
.expander ~ .commits > *:first-child { display: flex; }
.expander:checked ~ .commits > * { display: flex; }
.expander + label > .chevron:before { content: "\f142"; }
.expander:checked + label > .chevron:before { content: " "; }
pre .line {
margin: 0;
padding: 0.0625rem 0 0 0;
}
pre .line .text:before {
content: " ";
}
pre .line:before {
content: " ";
padding: 0.2rem 0;
border-right: 1px dotted #586e75;
font-size: 0.6rem;
}
pre .line[data-line-num]:before {
content: " " attr(data-line-num) " " ;
}
.diff .text:before {
content: " ";
}
.diff .addition .text:before {
color: #859900;
content: " + ";
}
.diff .deletion .text:before {
color: #dc322f;
content: " - ";
}
.diff .hunk-header .text:before {
content: " ";
}
.diff .line:before {
content: " ";
}
.diff .line[data-old-line-num][data-new-line-num]:before {
content: " " attr(data-old-line-num) " " attr(data-new-line-num) " " ;
}
.diff .hunk-header {
}
.diff .addition {
background-color: rgba(133, 153, 0, 0.2);
}
.diff .deletion {
background-color: rgba(220, 50, 47, 0.2);
}
.diff .hunk-header {
color: #93a1a1;
background-color: #eee8d5;
}
.diff .hunk-header * {
color: #93a1a1;
}
.diff pre.block-details code {
padding: 0;
margin: 0;
}
pre.block-details {
padding: 0;
margin: 0;
border: none;
}
.row { display: flex; flex-direction: row; }
.column { display: flex; flex-direction: column; }
.center { align-items: center; }

Added src/static/css/theme-solarized-dark.css

@@ -0,0 +1,50 @@
html * { color-profile: sRGB; }
body { color: #839496; }
.ci-status a { color: #839496; }
.expander[disabled] + label:hover { color: #839496; }
h1, h2, h3, h4, h5, h6 { color: #93a1a1; }
code { color: #93a1a1; }
.diff .hunk-header { color: #93a1a1; }
.diff .hunk-header * { color: #93a1a1; }
a { color: #268bd2; }
a:hover { color: #3797db }
.status.running { color: #268bd2; }
.expander + label:hover { color: #268bd2; }
.email, .user { color: #d33682; }
.agent, .filename { color: #6c71c4; }
.ref { color: #2aa198; }
.id { color: #cb4b16; }
.timestamp { color: #b58900; }
pre, pre code { color: #657b83; }
.status.success, .diff .addition .text:before { color: #859900; }
.status.failure, .diff .deletion .text:before { color: #dc322f; }
body { background-color: #002b36; }
.block-header .ref, .block-header .id { background-color: #002b36; }
.status { background-color: #002b36; }
.tabs { background-color: #002b36; }
pre, pre code { background-color: #fdf6e3; }
code { background-color: #073642; }
.repository-header { background-color: #073642; }
.tabs .selected { background-color: #073642; }
.expander + label { background-color: #073642; }
.block-header { background-color: #073642; }
.ref, .id { background-color: #073642; }
.diff .hunk-header { background-color: #eee8d5; }
.diff .addition { background-color: rgba(133, 153, 0, 0.2); }
.diff .deletion { background-color: rgba(220, 50, 47, 0.2); }
.block-details { border-color: #073642; }
.tabs > * { border-color: #073642; }
blockquote { border-color: #839496; }
.expander + label { border-color: #002b36; }
.expander + label:hover { border-color: #268bd2; }
.expander[disabled] + label:hover { border-color: #002b36; }
pre .line:before { border-color: #586e75; }