Skip to content

Commit d43803e

Browse files
Will FalkowskiWill Falkowski
authored andcommitted
Version 1 of citizenM code challenge
0 parents  commit d43803e

34 files changed

Lines changed: 1121 additions & 0 deletions

.gitignore

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
# Nuxt dev/build outputs
2+
.output
3+
.data
4+
.nuxt
5+
.nitro
6+
.cache
7+
#dist
8+
9+
# Logs
10+
logs
11+
*.log
12+
13+
.netlify
14+
15+
npm-debug.log*
16+
yarn-debug.log*
17+
yarn-error.log*
18+
pnpm-debug.log*
19+
lerna-debug.log*
20+
21+
# Node dependencies
22+
node_modules
23+
24+
.DS_Store
25+
dist
26+
dist-ssr
27+
coverage
28+
*.local
29+
30+
/cypress/videos/
31+
/cypress/screenshots/
32+
33+
# Editor directories and files
34+
.vscode/*
35+
!.vscode/extensions.json
36+
.idea
37+
*.suo
38+
*.ntvs*
39+
*.njsproj
40+
*.sln
41+
*.sw?
42+
43+
*.tsbuildinfo
44+
45+
test-results/
46+
playwright-report/
47+
48+
# Local env files
49+
.env
50+
.env.*
51+
!.env.example

README.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
## Prerequisites
2+
3+
You need to install bun on your machine before you start.
4+
5+
https://bun.sh/
6+
7+
```bash
8+
curl -fsSL https://bun.sh/install | bash
9+
```
10+
11+
# Nuxt 3 Minimal Starter
12+
13+
Look at the [Nuxt 3 documentation](https://nuxt.com/docs/getting-started/introduction) to learn more.
14+
15+
## Setup
16+
17+
Make sure to install the dependencies:
18+
19+
```bash
20+
# bun
21+
bun install
22+
```
23+
24+
## Development Server
25+
26+
Start the development server on `http://localhost:3000`:
27+
28+
```bash
29+
# bun
30+
bun run dev
31+
```
32+
33+
## Production
34+
35+
Build the application for production:
36+
37+
```bash
38+
# bun
39+
bun run build
40+
```
41+
42+
Locally preview production build:
43+
44+
```bash
45+
# bun
46+
bun run preview
47+
```
48+
49+
Check out the [deployment documentation](https://nuxt.com/docs/getting-started/deployment) for more information.

app.config.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
export default defineAppConfig({
2+
availableCurrencies: ["EUR", "GBP", "DKK", "USD", "JPY"],
3+
localeCurrencyMap: {
4+
"en-US": "USD",
5+
"en-GB": "GBP",
6+
da: "DKK",
7+
"da-DK": "DKK",
8+
ja: "JPY",
9+
"ja-JP": "JPY",
10+
default: "EUR",
11+
},
12+
});

app.vue

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
<template>
2+
<NuxtLayout />
3+
</template>

assets/scss/base/base.scss

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
:root {
2+
--cm-border-radius: 4px;
3+
--cm-header-height: 80px;
4+
}
5+
6+
*,
7+
*::before,
8+
*::after {
9+
margin: 0;
10+
font-weight: normal;
11+
outline: none;
12+
}
13+
14+
#__nuxt,
15+
body,
16+
html {
17+
min-height: 100dvh;
18+
margin: 0;
19+
}
20+
21+
body {
22+
background-color: var(--cm-color-primary-white);
23+
color: var(--cm-color-primary-black);
24+
font-family: var(--cm-font-primary-regular);
25+
text-rendering: optimizeLegibility;
26+
-webkit-font-smoothing: antialiased;
27+
-moz-osx-font-smoothing: grayscale;
28+
scrollbar-width: none;
29+
}

assets/scss/base/breakpoints.scss

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
@use "sass:map";
2+
3+
$breakpoints: (
4+
mobile: 320px,
5+
mobileMedium: 375px,
6+
mobileWide: 425px,
7+
tablet: 768px,
8+
desktop: 1024px,
9+
desktopMedium: 1280px,
10+
desktopWide: 1600px,
11+
);
12+
13+
@function breakpoint($key) {
14+
@return map.get($breakpoints, $key);
15+
}

assets/scss/base/colors.scss

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
$colors-map: (
2+
color-primary-black: #000,
3+
color-primary-white: #fff,
4+
color-primary-red: #ff0038,
5+
6+
color-green: #03d386,
7+
color-light-grey-surface: #f1f1f1,
8+
9+
color-red-hover: #e60032,
10+
color-background: #fff,
11+
12+
color-border: #ddd,
13+
color-border-hover: #000,
14+
);
15+
16+
:root {
17+
@each $key, $value in $colors-map {
18+
--cm-#{$key}: #{$value};
19+
}
20+
}
21+
22+
@each $key, $value in $colors-map {
23+
.color-#{$key} {
24+
color: var(--cm-#{$key});
25+
}
26+
27+
.bg-#{$key} {
28+
background-color: var(--cm-#{$key});
29+
}
30+
}

assets/scss/base/fonts.scss

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
$fonts-map: (
2+
primary-regular: "Chalet-NewYorkNineteenSixty",
3+
);
4+
5+
:root {
6+
@each $key, $value in $fonts-map {
7+
--cm-font-#{$key}: #{$value};
8+
}
9+
}
10+
11+
@each $key, $value in $fonts-map {
12+
@font-face {
13+
font-family: #{$value};
14+
src: url("/fonts/#{$value}.woff2") format("woff2");
15+
font-style: normal;
16+
}
17+
}

assets/scss/base/reset.scss

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
*,
2+
*::before,
3+
*::after {
4+
box-sizing: border-box;
5+
}
6+
7+
body,
8+
h1,
9+
h2,
10+
h3,
11+
h4,
12+
p,
13+
figure,
14+
blockquote,
15+
dl,
16+
dd {
17+
margin-block-end: 0;
18+
}
19+
20+
ul[role="list"],
21+
ol[role="list"] {
22+
list-style: none;
23+
}
24+
25+
html:focus-within {
26+
scroll-behavior: smooth;
27+
}
28+
29+
body {
30+
min-height: 100vh;
31+
text-rendering: optimizeSpeed;
32+
line-height: 1.5;
33+
}
34+
35+
a:not([class]) {
36+
text-decoration-skip-ink: auto;
37+
}
38+
39+
img,
40+
picture {
41+
max-width: 100%;
42+
display: block;
43+
}
44+
45+
input,
46+
button,
47+
textarea,
48+
select {
49+
font: inherit;
50+
}
51+
52+
@media (prefers-reduced-motion: reduce) {
53+
html:focus-within {
54+
scroll-behavior: auto;
55+
}
56+
57+
*,
58+
*::before,
59+
*::after {
60+
animation-duration: 0.01ms !important;
61+
animation-iteration-count: 1 !important;
62+
transition-duration: 0.01ms !important;
63+
scroll-behavior: auto !important;
64+
}
65+
}

assets/scss/base/responsive.scss

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
@use "@/base/breakpoints.scss" as *;
2+
3+
:root {
4+
--cm--gutter-small: 1rem;
5+
--cm--gutter-medium: 2rem;
6+
--cm--gutter-large: 4rem;
7+
--cm--content-max-width: 1200px;
8+
}
9+
10+
.container {
11+
width: 100%;
12+
padding-left: var(--cm--gutter-small);
13+
padding-right: var(--cm--gutter-small);
14+
margin-left: auto;
15+
margin-right: auto;
16+
box-sizing: border-box;
17+
}
18+
19+
.container {
20+
max-width: var(--cm--content-max-width);
21+
}
22+
23+
@media (min-width: breakpoint(tablet)) {
24+
.container {
25+
padding-left: var(--cm--gutter-medium);
26+
padding-right: var(--cm--gutter-medium);
27+
}
28+
}
29+
30+
@media (min-width: breakpoint(desktop)) {
31+
.container {
32+
padding-left: var(--cm--gutter-large);
33+
padding-right: var(--cm--gutter-large);
34+
}
35+
}

0 commit comments

Comments
 (0)