Selaa lähdekoodia

Add github colorscheme alternative.

tags/v1.0^2
Benjamin Attal 10 vuotta sitten
vanhempi
commit
d9e9787924
3 muutettua tiedostoa jossa 79 lisäystä ja 25 poistoa
  1. +65
    -0
      static/css/lib/github.css
  2. +2
    -2
      static/js/index.js
  3. +12
    -23
      static/sass/index.sass

+ 65
- 0
static/css/lib/github.css Näytä tiedosto

@@ -0,0 +1,65 @@
td.linenos { background: rgba(65,131,196,0.1); padding-right: 10px; }
span.lineno { background: rgba(65,131,196,0.4); padding: 0 5px 0 5px; }
pre { line-height: 125% }
.highlighttable { background-color: #fff; width: inherit; height: inherit; }
.hll { display: block }
.c { color: #999988; font-style: italic } /* Comment */
.err { color: #a61717; background-color: #e3d2d2 } /* Error */
.k { color: #000000; font-weight: bold } /* Keyword */
.o { color: #000000; font-weight: bold } /* Operator */
.cm { color: #999988; font-style: italic } /* Comment.Multiline */
.cp { color: #999999; font-weight: bold; font-style: italic } /* Comment.Preproc */
.c1 { color: #999988; font-style: italic } /* Comment.Single */
.cs { color: #999999; font-weight: bold; font-style: italic } /* Comment.Special */
.gd { color: #000000; background-color: #ffdddd } /* Generic.Deleted */
.ge { color: #000000; font-style: italic } /* Generic.Emph */
.gr { color: #aa0000 } /* Generic.Error */
.gh { color: #999999 } /* Generic.Heading */
.gi { color: #000000; background-color: #ddffdd } /* Generic.Inserted */
.go { color: #888888 } /* Generic.Output */
.gp { color: #555555 } /* Generic.Prompt */
.gs { font-weight: bold } /* Generic.Strong */
.gu { color: #aaaaaa } /* Generic.Subheading */
.gt { color: #aa0000 } /* Generic.Traceback */
.kc { color: #000000; font-weight: bold } /* Keyword.Constant */
.kd { color: #000000; font-weight: bold } /* Keyword.Declaration */
.kn { color: #000000; font-weight: bold } /* Keyword.Namespace */
.kp { color: #000000; font-weight: bold } /* Keyword.Pseudo */
.kr { color: #000000; font-weight: bold } /* Keyword.Reserved */
.kt { color: #445588; font-weight: bold } /* Keyword.Type */
.m { color: #009999 } /* Literal.Number */
.s { color: #d01040 } /* Literal.String */
.na { color: #008080 } /* Name.Attribute */
.nb { color: #0086B3 } /* Name.Builtin */
.nc { color: #445588; font-weight: bold } /* Name.Class */
.no { color: #008080 } /* Name.Constant */
.nd { color: #3c5d5d; font-weight: bold } /* Name.Decorator */
.ni { color: #800080 } /* Name.Entity */
.ne { color: #990000; font-weight: bold } /* Name.Exception */
.nf { color: #990000; font-weight: bold } /* Name.Function */
.nl { color: #990000; font-weight: bold } /* Name.Label */
.nn { color: #555555 } /* Name.Namespace */
.nt { color: #000080 } /* Name.Tag */
.nv { color: #008080 } /* Name.Variable */
.ow { color: #000000; font-weight: bold } /* Operator.Word */
.w { color: #bbbbbb } /* Text.Whitespace */
.mf { color: #009999 } /* Literal.Number.Float */
.mh { color: #009999 } /* Literal.Number.Hex */
.mi { color: #009999 } /* Literal.Number.Integer */
.mo { color: #009999 } /* Literal.Number.Oct */
.sb { color: #d01040 } /* Literal.String.Backtick */
.sc { color: #d01040 } /* Literal.String.Char */
.sd { color: #d01040 } /* Literal.String.Doc */
.s2 { color: #d01040 } /* Literal.String.Double */
.se { color: #d01040 } /* Literal.String.Escape */
.sh { color: #d01040 } /* Literal.String.Heredoc */
.si { color: #d01040 } /* Literal.String.Interpol */
.sx { color: #d01040 } /* Literal.String.Other */
.sr { color: #009926 } /* Literal.String.Regex */
.s1 { color: #d01040 } /* Literal.String.Single */
.ss { color: #990073 } /* Literal.String.Symbol */
.bp { color: #999999 } /* Name.Builtin.Pseudo */
.vc { color: #008080 } /* Name.Variable.Class */
.vg { color: #008080 } /* Name.Variable.Global */
.vi { color: #008080 } /* Name.Variable.Instance */
.il { color: #009999 } /* Literal.Number.Integer.Long */

+ 2
- 2
static/js/index.js Näytä tiedosto

@@ -339,7 +339,7 @@ function previousSymbolMatch() {
- scrollDiv.height() / 2
+ newMatch.position().top + newMatch.height() / 2);

newMatch.effect("highlight", {}, 750)
newMatch.effect("highlight", {color: '#FFFF00'}, 750)
newMatch.addClass('current');
};

@@ -362,7 +362,7 @@ function nextSymbolMatch() {
- scrollDiv.height() / 2
+ newMatch.position().top + newMatch.height() / 2);

newMatch.effect("highlight", {}, 750);
newMatch.effect("highlight", {color: '#FFFF22'}, 750)
newMatch.addClass('current');
};



+ 12
- 23
static/sass/index.sass Näytä tiedosto

@@ -296,18 +296,14 @@ div#results
&:hover
color: orange

/* TODO:
1) Hidden info
- Add links for authors.
- Add language field.
2) Code body
- Add highlighting.
- Add scrolling hits*/
div.result
width: $resultWidth
height: 200px
margin-bottom: 100%

@include vendor(transition, opacity 0.2s ease-in-out)
@include vendor(opacity, 0.7)

table
border-collapse: collapse
height: inherit
@@ -319,6 +315,9 @@ div#results
@extend .t1
margin-bottom: 15%

&.display-all
@include vendor(opacity, 1.0)

div#display-info
font-size: 1.3em
padding: 5px 0px 5px 5px
@@ -334,12 +333,10 @@ td#code
width: $codeWidth
height: inherit
padding: 0px
border: 1px solid #bbb

@include vendor(transition, width 0.2s ease-in-out)

// .display-all &
// width: 500px

#tablecontainer
overflow: hidden
width: 100%
@@ -361,6 +358,9 @@ td#code
.code pre
margin-top: 5px

.hll
background: #FFFFD6

div#hidden-info
width: $hiddenInfoWidth
margin-left: -$hiddenInfoWidth - 10px
@@ -368,10 +368,11 @@ div#hidden-info
padding-top: 40px
font-size: 1.2em
line-height: 1.5em
@include vendor(transition, margin-left 0.2s ease-in-out)
position: relative
z-index: 0

@include vendor(transition, margin-left 0.2s ease-in-out)

.display-all &
margin-left: 0px
padding-left: 20px
@@ -387,15 +388,3 @@ div#hidden-info
#authors
a
font-family: monospace

div#cycle-matches
margin-left: 130px
margin-top: 20px

#prev-match
font-size: 1.1em
margin-left: 125px

#next-match
font-size: 1.1em
margin-left: 20px

Ladataan…
Peruuta
Tallenna