From cc038157d79f4013e0e66148648f48c5a6567b41 Mon Sep 17 00:00:00 2001 From: brunosimon Date: Wed, 30 Aug 2017 22:25:58 +0200 Subject: [PATCH] :sparkles: Site > Versions > Add toggle --- site/src/components/file/script.js | 8 +++++++- site/src/components/file/template.html | 6 +++--- site/src/components/viewer/style.styl | 5 ++++- 3 files changed, 14 insertions(+), 5 deletions(-) diff --git a/site/src/components/file/script.js b/site/src/components/file/script.js index 1d4887c..cfa024a 100644 --- a/site/src/components/file/script.js +++ b/site/src/components/file/script.js @@ -14,7 +14,8 @@ export default data() { return { - differencesActive: true + differencesActive: true, + versionsActive: true } }, @@ -28,6 +29,11 @@ export default onDifferencesClick() { this.differencesActive = !this.differencesActive + }, + + onVersionsClick() + { + this.versionsActive = !this.versionsActive } } } \ No newline at end of file diff --git a/site/src/components/file/template.html b/site/src/components/file/template.html index 4361a40..8f2d14f 100644 --- a/site/src/components/file/template.html +++ b/site/src/components/file/template.html @@ -1,9 +1,9 @@ -
+
Differences (on) - File + Versions (on) {{ content.path.directory }} {{ content.name }}
- +
\ No newline at end of file diff --git a/site/src/components/viewer/style.styl b/site/src/components/viewer/style.styl index 92592f1..bd4e585 100644 --- a/site/src/components/viewer/style.styl +++ b/site/src/components/viewer/style.styl @@ -16,7 +16,7 @@ position absolute top 30px right 0 - width 75% + width 100% height 100% font-family Inconsolata, Monaco, Consolas, 'Courier New', Courier line-height 20px @@ -25,6 +25,9 @@ background #2d2d49 overflow scroll + .version-active & + width 75% + .lines position absolute top 0