[update] Improve scrolls + Add stylus file support

This commit is contained in:
brunosimon
2016-08-31 22:46:54 +02:00
parent a74df14a8c
commit fadb7df799
6 changed files with 103 additions and 53 deletions
@@ -16,6 +16,12 @@ application.factory(
_version.date_formated = _version.moment_date.format( 'LTS' );
_version.time_from_now = _version.moment_date.fromNow();
// Lines
_version.lines = [];
var length = _version.content.split(/\r\n|\r|\n/).length;
for( var i = 1; i < length + 1; i++ )
_version.lines.push( i );
// Differences
var count = 0,
modified = 0;
@@ -65,6 +71,7 @@ application.factory(
'html' : [ 'html', 'htm' ],
'sass' : [ 'sass', 'scss' ],
'less' : [ 'less' ],
'stylus' : [ 'stylus', 'styl' ],
'css' : [ 'css' ],
'php' : [ 'php' ],
'json' : [ 'json' ],
File diff suppressed because one or more lines are too long
+52 -34
View File
@@ -68,7 +68,7 @@ body.project
padding 12px 20px 0 20px
border-top 1px solid #515771
border-bottom 1px solid #515771
background rgba(0,0,0,0.2)
background #2c2f42
.name
position absolute
@@ -90,9 +90,10 @@ body.project
position absolute
top 115px
left 0
width 100%
bottom 110px
bottom 95px
width calc(100% + 15px)
overflow-y scroll
overflow-x scroll
nav.files-tree-nav
position absolute
@@ -104,6 +105,7 @@ body.project
line-height 24px
font-size 12px
cursor pointer
white-space nowrap
.name
position relative
@@ -132,24 +134,25 @@ body.project
line-height 13px
> span
display block
padding-left 16px * 1
display inline-block
padding-right 20px
padding-left 15px * 1
li > span
padding-left 16px * 2
padding-left 15px * 2
li li > span
padding-left 16px * 3
padding-left 15px * 3
li li li > span
padding-left 16px * 4
padding-left 15px * 4
li li li li > span
padding-left 16px * 5
padding-left 15px * 5
li li li li li > span
padding-left 16px * 6
padding-left 15px * 6
li li li li li li > span
padding-left 16px * 7
padding-left 15px * 7
li li li li li li li > span
padding-left 16px * 8
padding-left 15px * 8
li li li li li li li li > span
padding-left 16px * 9
padding-left 15px * 9
&.active
background #4d5b8d
@@ -175,6 +178,8 @@ body.project
background-image url('../svg/sass.svg')
&.less
background-image url('../svg/less.svg')
&.stylus
background-image url('../svg/stylus.svg')
&.css
background-image url('../svg/css.svg')
&.php
@@ -224,12 +229,12 @@ body.project
left 0
width 100%
height 110px
padding 15px 20px 0 20px
padding 10px 20px 0 20px
border-top 1px solid #515771
background rgba(0,0,0,0.2)
background #2c2f42
.button-container
margin-bottom 5px
.button
&.switch
display inline-block
@@ -277,6 +282,7 @@ body.project
&.default
display inline-block
margin 10px 0
padding 5px 10px
background rgba(128,147,232,0.2)
text-decoration none
@@ -292,6 +298,7 @@ body.project
left 240px
right 0
bottom 0
background #31344a
section.no-file
position absolute
@@ -346,10 +353,12 @@ body.project
position absolute
top 0
left 0
width 200px
bottom 0
width 215px
padding-bottom 5px
background #4d5b8d
overflow-y scroll
overflow-x hidden
a.version
display block
@@ -436,37 +445,46 @@ body.project
section.code
position absolute
top 30px
right 0
bottom 0
right -15px
bottom -15px
left 200px
background #31344a
overflow-y scroll
overflow-x scroll
pre
position relative
overflow hidden
code
line-height 20px
font-family monospace
&.lines
position absolute
top 0
left 0
width 38px
padding 0.5em
opacity 0.2
.lines
position absolute
top 0
left 0
width 38px
padding 0.5em
opacity 0.2
&.hljs
.current
pre
code
display inline-block
margin-right 15px
margin-bottom 15px
margin-left 38px
background none
&.differences
position absolute
top 0
left 38px
padding 0.5em
pointer-events none
.differences
position absolute
top 0
left 38px
padding 0.5em
pointer-events none
pre
code
.value
visibility hidden
+21
View File
@@ -0,0 +1,21 @@
<svg version="1.1" id="Calque_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="38.8 33.4 138.5 141.4" enable-background="new 38.8 33.4 138.5 141.4" xml:space="preserve">
<g>
<path fill="#B3D107" d="M170.8,33.4c1.6,0,3,0.4,4,1.2c1,0.8,1.7,1.9,2.1,3.3c0.4,1.4,0.4,2.9,0.2,4.7c-0.3,1.8-0.9,3.5-1.9,5.2
c-0.2,0.2-0.5,0.2-0.8,0c-0.3-0.2-0.5-0.5-0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