Skip to content

Commit

Permalink
Add mobile view
Browse files Browse the repository at this point in the history
  • Loading branch information
kvestus committed Feb 6, 2024
1 parent 010c3c1 commit 906d200
Show file tree
Hide file tree
Showing 26 changed files with 542 additions and 150 deletions.
2 changes: 1 addition & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ charset = utf-8
indent_style = space
indent_size = 4

[{*.yaml,*.yml,*.json, *.scss}]
[{*.yaml,*.yml,*.json,*.scss}]
indent_size = 2
1 change: 1 addition & 0 deletions .idea/inspectionProfiles/Project_Default.xml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions .stylelintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,8 @@ module.exports = {
}],
rules: {
indentation: 2,
"selector-pseudo-class-no-unknown": [true, {
"ignorePseudoClasses": ["deep",""]
}]
},
};
18 changes: 17 additions & 1 deletion auto-imports.d.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,8 @@
// Generated by 'unplugin-auto-import'
/* eslint-disable */
/* prettier-ignore */
// @ts-nocheck
// noinspection JSUnusedGlobalSymbols
// Generated by unplugin-auto-import
export {}
declare global {
const EffectScope: typeof import('vue')['EffectScope']
Expand All @@ -20,6 +24,8 @@ declare global {
const nextTick: typeof import('vue')['nextTick']
const onActivated: typeof import('vue')['onActivated']
const onBeforeMount: typeof import('vue')['onBeforeMount']
const onBeforeRouteLeave: typeof import('vue-router')['onBeforeRouteLeave']
const onBeforeRouteUpdate: typeof import('vue-router')['onBeforeRouteUpdate']
const onBeforeUnmount: typeof import('vue')['onBeforeUnmount']
const onBeforeUpdate: typeof import('vue')['onBeforeUpdate']
const onDeactivated: typeof import('vue')['onDeactivated']
Expand All @@ -43,15 +49,25 @@ declare global {
const toRaw: typeof import('vue')['toRaw']
const toRef: typeof import('vue')['toRef']
const toRefs: typeof import('vue')['toRefs']
const toValue: typeof import('vue')['toValue']
const triggerRef: typeof import('vue')['triggerRef']
const unref: typeof import('vue')['unref']
const useAttrs: typeof import('vue')['useAttrs']
const useCssModule: typeof import('vue')['useCssModule']
const useCssVars: typeof import('vue')['useCssVars']
const useDialog: typeof import('naive-ui')['useDialog']
const useLink: typeof import('vue-router')['useLink']
const useRoute: typeof import('vue-router')['useRoute']
const useRouter: typeof import('vue-router')['useRouter']
const useSlots: typeof import('vue')['useSlots']
const watch: typeof import('vue')['watch']
const watchEffect: typeof import('vue')['watchEffect']
const watchPostEffect: typeof import('vue')['watchPostEffect']
const watchSyncEffect: typeof import('vue')['watchSyncEffect']
}
// for type re-export
declare global {
// @ts-ignore
export type { Component, ComponentPublicInstance, ComputedRef, ExtractDefaultPropTypes, ExtractPropTypes, ExtractPublicPropTypes, InjectionKey, PropType, Ref, VNode, WritableComputedRef } from 'vue'
import('vue')
}
183 changes: 183 additions & 0 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@
"stylelint-order": "^6.0.1",
"stylelint-scss": "^4.1.0",
"typescript": "~5.3.3",
"unplugin-auto-import": "^0.17.5",
"unplugin-vue-components": "^0.26.0",
"vite": "^5.0.12",
"vue-tsc": "^1.0.24"
Expand Down
2 changes: 2 additions & 0 deletions src/assets/main.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
@import "variables";

#app {
* {
box-sizing: border-box;
Expand Down
7 changes: 7 additions & 0 deletions src/assets/variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/* Screen size */
$xs: 0px;
$s: 640px;
$m: 1024px;
$l: 1280px;
$xl: 1536px;
$xxl: 1920px;
11 changes: 11 additions & 0 deletions src/composables/useAppBreakpoints.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { useBreakpoints } from '@vueuse/core'
import { defaultBreakpoints } from 'naive-ui/es/config-provider/src/config'

export const useAppBreakpoints = () => {
const breakpoints = useBreakpoints(defaultBreakpoints)
const isMobile = breakpoints.smaller('m')

return {
isMobile,
}
}
Loading

0 comments on commit 906d200

Please sign in to comment.