Mail.vue 1.16 KB
Newer Older
1
<template>
2
  <BlockTemplate heading="Post">
3
4
    <ul>
      <li v-for="(mail, index) in mails" :key="index">
Kent Nielsen's avatar
Kent Nielsen committed
5
        <span style="width: 50%;">{{ mail.sender }}</span>
6
7
8
9
10
11
        <span class="send-date">{{ mail.date.toLocaleDateString('da-dk').replace(/\./g, '/') }}</span>
        <br/>
        <a class="subject" href="/about">{{ mail.subject }}</a>
        <hr/>
      </li>
    </ul>
12
  </BlockTemplate>
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
</template>

<script>
export default {
  name: 'Mail',
  data() {
    return {
      mails: [
        {
          sender: 'henrikb@post.au.dk',
          subject: 'TDD Break',
          date: new Date(),
        },
        {
          sender: '202201010@post.au.dk',
          subject: 'I\'m from the future',
          date: new Date(),
30
31
32
33
34
        },
        {
          sender: 'example@example.com',
          subject: 'Hello',
          date: new Date(),
35
36
37
38
39
40
41
42
        }
      ]
    }
  }
}
</script>

<style scoped lang="scss">
Kent Nielsen's avatar
Kent Nielsen committed
43
44
45
46
47
  .block{
    min-width: 250px;
  }


48
49
  ul {
    margin-top: 8px;
Kent Nielsen's avatar
Kent Nielsen committed
50
    //display: inline-block;
51
52
  }

53
  li:nth-child(even) {
54
    background-color: $lighter-green-theme-color;
55
56
  }

57
58
59
60
61
62
63
64
  .send-date {
    float: right;
  }

  .subject {
    font-size: 1.1em;
  }
</style>