Skip to content

Commit 226520f

Browse files
Added Vuetify production options and splited base button
1 parent c8434f5 commit 226520f

File tree

13 files changed

+101
-180
lines changed

13 files changed

+101
-180
lines changed

public/index.html

Lines changed: 23 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,26 @@
11
<!DOCTYPE html>
22
<html lang="en">
3-
<head>
4-
<meta charset="utf-8">
5-
<meta http-equiv="X-UA-Compatible" content="IE=edge">
6-
<meta name="viewport" content="width=device-width,initial-scale=1.0">
7-
<link rel="icon" href="<%= BASE_URL %>favicon.ico">
8-
<title>frontend</title>
9-
<!-- Being installed in local enviroment, thus CDN sources commented -->
10-
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"> -->
11-
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"> -->
12-
</head>
13-
<body>
14-
<noscript>
15-
<strong>We're sorry but frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
16-
</noscript>
17-
<div id="app"></div>
18-
<!-- built files will be auto injected -->
19-
</body>
3+
4+
<head>
5+
<meta charset="utf-8">
6+
<meta http-equiv="X-UA-Compatible"
7+
content="IE=edge">
8+
<meta name="viewport"
9+
content="width=device-width,initial-scale=1.0">
10+
<link rel="icon"
11+
href="<%= BASE_URL %>favicon.ico">
12+
<title>frontend</title>
13+
<!-- Being installed in local enviroment, thus CDN sources commented -->
14+
<!-- <link rel="stylesheet" href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900"> -->
15+
<!-- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@mdi/font@latest/css/materialdesignicons.min.css"> -->
16+
</head>
17+
18+
<body>
19+
<noscript>
20+
<strong>We're sorry but frontend doesn't work properly without JavaScript enabled. Please enable it to continue.</strong>
21+
</noscript>
22+
<div id="app"></div>
23+
<!-- built files will be auto injected -->
24+
</body>
25+
2026
</html>

src/components/HelloWorld.vue

Lines changed: 0 additions & 108 deletions
This file was deleted.

src/components/base/button/Button.ts renamed to src/components/base/button/LargeBtn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ import { Component, Vue, Prop, Watch, Emit } from 'vue-property-decorator';
33
@Component({
44
inheritAttrs: false
55
})
6-
export default class BaseBtn extends Vue {
6+
export default class LargeBtn extends Vue {
77
@Prop() square!: boolean;
88

99
get styles() {
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
<template>
2+
<v-btn large
3+
:style="styles"
4+
v-bind="$attrs"
5+
v-on="$listeners">
6+
<slot />
7+
</v-btn>
8+
</template>
9+
<script lang="ts"
10+
src="./LargeBtn.ts" />
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import { Component, Vue, Prop, Watch, Emit } from 'vue-property-decorator';
2+
3+
@Component({
4+
inheritAttrs: false
5+
})
6+
export default class SmallBtn extends Vue {
7+
@Prop() square!: boolean;
8+
9+
get styles() {
10+
return {
11+
borderRadius: this.square ? '2px' : undefined
12+
};
13+
}
14+
}

src/components/base/button/Button.vue renamed to src/components/base/button/SmallBtn.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@
88
<slot />
99
</v-btn>
1010
</template>
11-
<script lang="ts" src="./Button.ts"/>
11+
<script lang="ts" src="./SmallBtn.ts"/>

src/components/home/feed/Feed.vue

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,13 @@
1313

1414
<v-row align="center">
1515
<v-col sm="3">
16-
<base-btn v-if="page !== 1"
17-
class="ml-0"
18-
title="Previous page"
19-
square
20-
@click="page--">
16+
<small-btn v-if="page !== 1"
17+
class="ml-0"
18+
title="Previous page"
19+
square
20+
@click="page--">
2121
<v-icon>mdi-chevron-left</v-icon>
22-
</base-btn>
22+
</small-btn>
2323
</v-col>
2424

2525
<v-col sm="6"
@@ -29,13 +29,13 @@
2929

3030
<v-col sm="3"
3131
class="text-sm-right">
32-
<base-btn v-if="pages > 1 && page < pages"
33-
class="mr-0"
34-
title="Next page"
35-
square
36-
@click="page++">
32+
<small-btn v-if="pages > 1 && page < pages"
33+
class="mr-0"
34+
title="Next page"
35+
square
36+
@click="page++">
3737
<v-icon>mdi-chevron-right</v-icon>
38-
</base-btn>
38+
</small-btn>
3939
</v-col>
4040
</v-row>
4141
</v-container>

src/pages/generic/footer/Footer.vue

Lines changed: 16 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,33 +1,27 @@
11
<template>
2-
<v-footer
3-
class="py-4"
4-
dark
5-
height="auto"
6-
>
2+
<v-footer class="py-4"
3+
dark
4+
height="auto">
75
<v-container mx-auto>
86
<v-row wrap>
97
<v-col sm="9">
10-
<base-btn
11-
v-for="(item, i) in items"
12-
:key="i"
13-
:href="item.href"
14-
class="ml-0 mr-3"
15-
color="primary"
16-
square
17-
target="_blank"
18-
>
8+
<small-btn v-for="(item, i) in items"
9+
:key="i"
10+
:href="item.href"
11+
class="ml-0 mr-3"
12+
color="primary"
13+
square
14+
target="_blank">
1915
<v-icon v-text="item.icon" />
20-
</base-btn>
16+
</small-btn>
2117
</v-col>
2218
<v-spacer />
23-
<base-btn
24-
class="mr-0"
25-
square
26-
title="Go to top"
27-
@click="$vuetify.goTo(0)"
28-
>
19+
<small-btn class="mr-0"
20+
square
21+
title="Go to top"
22+
@click="$vuetify.goTo(0)">
2923
<v-icon>mdi-chevron-up</v-icon>
30-
</base-btn>
24+
</small-btn>
3125
</v-row>
3226
</v-container>
3327
</v-footer>

src/pages/generic/nav_bar/NavBar.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { Component, Vue, Prop, Watch, Emit } from 'vue-property-decorator';
2-
import Button from '@/components/base/button/Button.vue';
32
import { IconType } from '@/utils/enums';
43

5-
@Component({ components: { Button } })
4+
@Component({})
65
export default class NavBar extends Vue {
76
iconType: typeof IconType = IconType;
87

src/pages/generic/nav_bar/NavBar.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
<v-spacer></v-spacer>
1010

1111
<router-link to="/login">
12-
<Button displayWording="LOGIN NOW!" :iconType="iconType.Person" />
12+
<samll-btn displayWording="LOGIN NOW!" :iconType="iconType.Person" />
1313
</router-link>
1414
</v-app-bar>
1515
</template>

0 commit comments

Comments
 (0)