CellText.vue 1.12 KB
Newer Older
Anton's avatar
Intial  
Anton committed
1
<template lang="pug">
Anton Koch's avatar
Anton Koch committed
2
  // text
Anton's avatar
Intial  
Anton committed
3
4
  div(:class="{'display-preview': preview, 'display-full': display}")
    template(v-if="display")
Anton's avatar
Anton committed
5
      markdown-display(:content="textContent")
Anton's avatar
Intial  
Anton committed
6
7

    template(v-else)
Anton's avatar
Anton committed
8
      cell-info(:cell="cell", type="Text Cell")
Anton's avatar
Intial  
Anton committed
9
10
11
12

</template>

<script>
Anton's avatar
Anton committed
13
import CellInfo from '../CellInfo'
Anton's avatar
Anton committed
14
import MarkdownDisplay from '../../../shared/elements/MarkdownDisplay'
Anton's avatar
Intial  
Anton committed
15
export default {
Anton's avatar
Anton committed
16
  components: {
Anton's avatar
Anton committed
17
    CellInfo,
Anton's avatar
Anton committed
18
19
    MarkdownDisplay
  },
Anton's avatar
Intial  
Anton committed
20
21
22
23
24
25
  props: ['cell', 'display', 'preview'],
  data () {
    return {}
  },
  computed: {
    textContent () {
Anton's avatar
Anton committed
26
      if (this.cell) return this.cell.data.content
Anton's avatar
Intial  
Anton committed
27
28
29
30
31
32
33
34
    }
  }
}
</script>

<style scoped lang="stylus">

  div
Anton Koch's avatar
Anton Koch committed
35
36
37
38
    -webkit-hyphens: auto
    -ms-hyphens: auto
    hyphens: auto
    padding 18px 23px
Anton's avatar
Intial  
Anton committed
39
40
    width 100%
    height 100%
Anton Koch's avatar
Anton Koch committed
41
    color: #ddd
Anton's avatar
Intial  
Anton committed
42
43

  div.display-full
44
    background-color #252525
Anton Koch's avatar
Anton Koch committed
45
    /*color #111*/
Anton's avatar
Intial  
Anton committed
46
47
48

    div.display-full > div
      padding 0
Mathias Bär's avatar
Mathias Bär committed
49
50
      margin-top -.08em
      font-size 1.8vh
Anton Koch's avatar
Anton Koch committed
51
52
      line-height 1.45em
      overflow-y scroll
Anton's avatar
Intial  
Anton committed
53
54
55
56

  div.display-preview
    color #666

Anton Koch's avatar
Anton Koch committed
57
58
59
60
61
62
  h1
    font-weight normal

  /*div.display-full*/
    /*background-color #6f6f6f*/

Anton's avatar
Intial  
Anton committed
63
</style>