diff --git a/site/src/components/alert/script.js b/site/src/components/alert/script.js index f2bab88..60231b3 100644 --- a/site/src/components/alert/script.js +++ b/site/src/components/alert/script.js @@ -1,7 +1,14 @@ +import Tooltip from '@/components/tooltip' + export default { name: 'alert', + components: + { + Tooltip + }, + methods: { onAlertClick() diff --git a/site/src/components/alert/template.html b/site/src/components/alert/template.html index 77a49a0..77ddfe0 100644 --- a/site/src/components/alert/template.html +++ b/site/src/components/alert/template.html @@ -2,4 +2,5 @@ + It's going too fast? Send an alert to
the presenter (use wisely)
\ No newline at end of file diff --git a/site/src/components/chat/script.js b/site/src/components/chat/script.js index 8225bc5..1eea926 100644 --- a/site/src/components/chat/script.js +++ b/site/src/components/chat/script.js @@ -1,7 +1,14 @@ +import Tooltip from '@/components/tooltip' + export default { name: 'chat', + components: + { + Tooltip + }, + data() { return { diff --git a/site/src/components/chat/template.html b/site/src/components/chat/template.html index caa8258..92ee653 100644 --- a/site/src/components/chat/template.html +++ b/site/src/components/chat/template.html @@ -5,6 +5,7 @@ {{ unreadCount > 99 ? '99+' : unreadCount }} + Chat with other person on the project
diff --git a/site/src/components/file/script.js b/site/src/components/file/script.js index 0e95bcb..44e6064 100644 --- a/site/src/components/file/script.js +++ b/site/src/components/file/script.js @@ -1,5 +1,6 @@ import Versions from '@/components/versions' import Viewer from '@/components/viewer' +import Tooltip from '@/components/tooltip' import copyToClipboard from 'copy-to-clipboard' export default @@ -9,7 +10,8 @@ export default components: { Versions, - Viewer + Viewer, + Tooltip }, computed: diff --git a/site/src/components/file/template.html b/site/src/components/file/template.html index 984a37b..69ba95d 100644 --- a/site/src/components/file/template.html +++ b/site/src/components/file/template.html @@ -1,32 +1,5 @@
- -
- -
{{ content.path.directory }}/{{ content.name }}
- -
- - - - - - - - - - - - - - - - - - - -
- @@ -45,4 +18,36 @@
Sorry, I can't read this file.
But you can download it
+ + +
+ +
{{ content.path.directory }}/{{ content.name }}
+ + + + + Toggle the revision history + + + + + + Toggle the line-by-line differences + + + + + + Copy to clipboard + + + + + + Download the latest version of the file + + +
+
\ No newline at end of file diff --git a/site/src/components/projects-hub/script.js b/site/src/components/projects-hub/script.js index 09dbfcf..4f371be 100644 --- a/site/src/components/projects-hub/script.js +++ b/site/src/components/projects-hub/script.js @@ -1,7 +1,14 @@ +import Tooltip from '@/components/tooltip' + export default { name: 'projects-hub', + components: + { + Tooltip + }, + computed: { projects() diff --git a/site/src/components/projects-hub/template.html b/site/src/components/projects-hub/template.html index b7dd915..2ff38dc 100644 --- a/site/src/components/projects-hub/template.html +++ b/site/src/components/projects-hub/template.html @@ -21,6 +21,7 @@ + Download the whole project \ No newline at end of file diff --git a/site/src/components/tooltip/index.vue b/site/src/components/tooltip/index.vue new file mode 100644 index 0000000..246515d --- /dev/null +++ b/site/src/components/tooltip/index.vue @@ -0,0 +1,3 @@ + + + \ No newline at end of file diff --git a/site/src/components/tooltip/script.js b/site/src/components/tooltip/script.js new file mode 100644 index 0000000..426efa5 --- /dev/null +++ b/site/src/components/tooltip/script.js @@ -0,0 +1,16 @@ +export default +{ + name: 'tooltip', + + props: + { + position: { + type: String, + default: 'top', + validator(value) + { + return ['top', 'top-right', 'right', 'bottom-right', 'bottom', 'bottom-left', 'left', 'top-left'].indexOf(value) !== -1 + } + } + } +} \ No newline at end of file diff --git a/site/src/components/tooltip/style.styl b/site/src/components/tooltip/style.styl new file mode 100644 index 0000000..4051344 --- /dev/null +++ b/site/src/components/tooltip/style.styl @@ -0,0 +1,96 @@ +.tooltip + position absolute + top 0 + right 0 + bottom 0 + left 0 + + .content + position absolute + padding-top 6px + padding-right 8px + padding-bottom 7px + padding-left 8px + background #1E202F + border 1px solid #586ca2 + white-space nowrap + font-size 12px + line-height 1em + pointer-events none + opacity 0 + transition opacity 0.15s + will-change opacity + color #fff + + .arrow + position absolute + width 10px + height 10px + overflow hidden + + .inner + position absolute + top 0 + left 6px + width 10px + height 10px + background #1E202F + border 1px solid #586ca2 + transform rotate(45deg) + + &.top-left + .content + right 8px + bottom calc(100% + 5px) + + .arrow + right 8px + top 100% + transform rotate(-90deg) + + &.right + .content + transform translateY(-50%) + top 50% + left calc(100% + 5px) + + .arrow + margin-top -5px + top 50% + right 100% + + &.bottom-right + .content + left 8px + top calc(100% + 5px) + + .arrow + left 8px + bottom 100% + transform rotate(90deg) + + &.bottom + .content + transform translateX(-50%) + left 50% + top calc(100% + 5px) + + .arrow + margin-left -5px + left 50% + bottom 100% + transform rotate(90deg) + + &.bottom-left + .content + right 8px + top calc(100% + 5px) + + .arrow + right 8px + bottom 100% + transform rotate(90deg) + + &:hover + .content + opacity 1 \ No newline at end of file diff --git a/site/src/components/tooltip/template.html b/site/src/components/tooltip/template.html new file mode 100644 index 0000000..13bce02 --- /dev/null +++ b/site/src/components/tooltip/template.html @@ -0,0 +1,6 @@ +
+
+
+ +
+
\ No newline at end of file