aboutsummaryrefslogtreecommitdiffstats
path: root/components/header/SiteHeader.vue
blob: 22ee20905638a87a52aab1e15fde4588f38578d4 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
<script setup land="ts">
const session = useSessionStore();

const navigateHome = () => {
  navigateTo('/');
}

const sessionType = computed(() => session.getSessionType());
</script>

<template>
  <header>
    <div id="nav">
      <span id="logo" @click="navigateHome">
        <img src="@/assets/quests-logo.png" alt="Quests logo" />
        <h1>Quests Web Editor</h1>
      </span>
      <code>Preview</code>
    </div>

    <div id="controls" v-if="sessionType === 'none'">
      <LoaderImportButton :isPrimaryAction="true" />
    </div>
    <div id="controls" v-if="sessionType !== 'none'">
      <LoaderImportButton />
      <ExportButton />
    </div>
  </header>
</template>

<style lang="scss" scoped>
#nav {
  padding: 1rem 1rem 0.5rem 1rem;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  max-height: 72px;
  gap: 1rem;
  color: var(--color-header-text);

  img {
    max-width: 3rem;
    height: auto;
  }

  h1 {
    font-size: 1.5rem;
    margin: -5px 0 0 0;
    font-weight: 700;
  }

  code {
    font-size: 0.8rem;
    color: var(--color-header-text-mute);
  }

}

#logo {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 1rem;
  color: var(--color-header-text);
}

#controls {
  padding: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
}

header {
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-header);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
  position: relative;
  z-index: 1;
  display: flex;
  justify-content: space-between;
}
</style>