Skip to content

Commit

Permalink
feat: Improve visual cues
Browse files Browse the repository at this point in the history
  • Loading branch information
WilcoFiers committed Mar 2, 2022
1 parent 552686b commit 97aafec
Show file tree
Hide file tree
Showing 6 changed files with 75 additions and 15 deletions.
1 change: 1 addition & 0 deletions src/assets/forms.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
:root {
--control-width-max: 40rem;
accent-color: var(--primary-start);
}

input,
Expand Down
3 changes: 1 addition & 2 deletions src/assets/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ h1 {
}

h2 {
font-size: 1.3rem;
font-size: 1.2rem;
}

[hidden] {
Expand All @@ -60,7 +60,6 @@ nav a[href] {
}

.icon {
font-size: 0.7em;
display: inline-block;
padding: 0.2em 0.25rem;
}
19 changes: 19 additions & 0 deletions src/components/Icon.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
<script setup lang="ts">
import { ref } from "vue";
const props = defineProps<{
type: string;
small?: boolean;
}>();
const size = ref(1);
if (props.small) {
size.value = 0.75;
}
</script>

<template>
<i
:class="['icon', `bi-${$props.type}`]"
:style="{ fontSize: `${size}em` }"
></i>
</template>
46 changes: 39 additions & 7 deletions src/components/NavBar.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,38 @@
<script setup lang="ts">
import Icon from "./Icon.vue";
</script>

<template>
<ul>
<li><router-link to="/">Home</router-link></li>
<li><router-link to="/how-to-use">How to use</router-link></li>
<li><router-link to="/start">Start</router-link></li>
<li><router-link to="/implementation">Implementation</router-link></li>
<li><router-link to="/rules">Rules</router-link></li>
<li><router-link to="/export">Export</router-link></li>
<li>
<router-link to="/"> <Icon type="house" />Home </router-link>
</li>
<li>
<router-link to="/how-to-use">
<Icon type="question-circle" />How to use
</router-link>
</li>
<li>
<router-link to="/start"> <Icon type="cloud-upload" />Start </router-link>
</li>
<li>
<router-link to="/implementation">
<Icon type="card-heading" />Implementation
</router-link>
</li>
<li>
<router-link
to="/rules/"
:class="{ active: $route.fullPath.includes('/rules/') }"
>
<Icon type="card-list" />Rules
</router-link>
</li>
<li>
<router-link to="/export">
<Icon type="cloud-download" />Export
</router-link>
</li>
</ul>
</template>

Expand All @@ -20,11 +47,16 @@ li {
}
a {
text-decoration: none;
padding: 0.5em 1em;
border-top: 3px solid transparent;
padding: 0.25em 1em;
display: inline-block;
}
a:hover,
a:focus {
text-decoration: underline;
}
a.router-link-active,
a.active {
border-top-color: var(--primary-start);
}
</style>
9 changes: 7 additions & 2 deletions src/views/Export.vue
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
<script setup lang="ts">
import Icon from "../components/Icon.vue";
import { ref } from "vue";
import { useMainStore } from "../stores/useMain";
Expand Down Expand Up @@ -50,7 +51,11 @@ function downloadFile() {
v-text="reportText"
/>
</label>
<button @click="copyTextarea">Copy to clipboard</button>
<button @click="downloadFile">Download file</button>
<button @click="copyTextarea">
<Icon type="clipboard-plus" /> Copy to clipboard
</button>
<button @click="downloadFile">
<Icon type="file-earmark-arrow-down" /> Download file
</button>
</template>
</template>
12 changes: 8 additions & 4 deletions src/views/HowToUse.vue
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
<script setup lang="ts">
import Icon from "../components/Icon.vue";
</script>

<template>
<h1>How to use</h1>
<p>
Expand Down Expand Up @@ -69,31 +73,31 @@
href="https://www.w3.org/WAI/standards-guidelines/act/rules/about/"
target="_blank"
>
About ACT Rules<i class="bi-box-arrow-up-right icon"></i>
About ACT Rules<Icon type="box-arrow-up-right" small />
</a>
</li>
<li>
<a
href="https://act-rules.github.io/pages/implementations/overview/"
target="_blank"
>
ACT Rule implementations<i class="bi-box-arrow-up-right icon"></i>
ACT Rule implementations<Icon type="box-arrow-up-right" small />
</a>
</li>
<li>
<a
href="https://act-rules.github.io/pages/implementations/mapping/"
target="_blank"
>
Mapping to ACT rules<i class="bi-box-arrow-up-right icon"></i>
Mapping to ACT rules<Icon type="box-arrow-up-right" small />
</a>
</li>
<li>
<a
href="https://act-rules.github.io/pages/implementations/reporting/"
target="_blank"
>
Submit an implementation<i class="bi-box-arrow-up-right icon"></i>
Submit an implementation<Icon type="box-arrow-up-right" small />
</a>
</li>
</ul>
Expand Down

0 comments on commit 97aafec

Please sign in to comment.