Skip to content

Commit

Permalink
adjust views for basic 2-column layout
Browse files Browse the repository at this point in the history
  • Loading branch information
halamix2 committed Aug 5, 2024
1 parent 3c3c9bb commit 6d81eb6
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 114 deletions.
2 changes: 1 addition & 1 deletion src/App.vue
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ const appVersion = import.meta.env.PACKAGE_VERSION
<RouterView />
</v-main>

<v-footer class="d-flex flex-column">
<v-footer class="d-flex flex-column bg-surface-variant">
By Halamix2 &#9874; 2024 - {{ new Date().getFullYear() }}, wersja {{ appVersion }}. Halamix
nie potrafi we frontend, a jednak to zrobił; what's your excuse?
</v-footer>
Expand Down
2 changes: 1 addition & 1 deletion src/components/CanvasItem.vue
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ onMounted(() => {
<template>
<div>
<canvas
:class="`cursor-grab`"
:class="`cursor-grab h-100 w-100`"
@drop.prevent="canvasDrop"
@wheel.prevent="canvasWheel"
@mousedown.prevent="canvasMouseDown"
Expand Down
84 changes: 47 additions & 37 deletions src/views/PhotoView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -219,43 +219,53 @@ onMounted(() => {
</script>

<template>
<div class="main">
<h1>Miniaturka runnera na Twittera</h1>
<CanvasItem
:canvasWidth="canvasWidth"
:canvasHeight="canvasHeight"
@canvasContext="(can) => (mainCanvas = can)"
@updateBackground="(b) => (photo = b)"
@updateScale="
(s) => {
photoScale += s
photoScale = Math.max(photoScale, 0.01)
}
"
@updatePos="
(l, t) => {
photoLeft += l
photoTop += t
}
"
@updateRotation="(r) => (photoRotation = (photoRotation + r) % 360)"
/>
<InputItem
@updateBackground="(b: string) => (photo = b)"
@updateRunner="(r: string) => (runner = r)"
@updateTitle="(t: string) => (title = t)"
@updateSubtitle="(s: string) => (subtitle = s)"
@updateCategory="(c: string) => (category = c)"
@updateMoney="(m: number) => (money = m)"
:runner="initialRunner"
:title="initialTitle"
:subtitle="initialSubtitle"
:category="initialCategory"
:enable-money="true"
:money="initialMoney"
:canvasModel="mainCanvas"
/>
</div>
<v-container fluid class="main bg-surface">
<v-row>
<v-col>
<h1>Miniaturka runnera na Twittera</h1>
</v-col>
</v-row>
<v-row>
<v-col>
<CanvasItem
:canvasWidth="canvasWidth"
:canvasHeight="canvasHeight"
@canvasContext="(can) => (mainCanvas = can)"
@updateBackground="(b) => (photo = b)"
@updateScale="
(s) => {
photoScale += s
photoScale = Math.max(photoScale, 0.01)
}
"
@updatePos="
(l, t) => {
photoLeft += l
photoTop += t
}
"
@updateRotation="(r) => (photoRotation = (photoRotation + r) % 360)"
/>
</v-col>
<v-col cols="12" md="4">
<InputItem
@updateBackground="(b: string) => (photo = b)"
@updateRunner="(r: string) => (runner = r)"
@updateTitle="(t: string) => (title = t)"
@updateSubtitle="(s: string) => (subtitle = s)"
@updateCategory="(c: string) => (category = c)"
@updateMoney="(m: number) => (money = m)"
:runner="initialRunner"
:title="initialTitle"
:subtitle="initialSubtitle"
:category="initialCategory"
:enable-money="true"
:money="initialMoney"
:canvasModel="mainCanvas"
/>
</v-col>
</v-row>
</v-container>
</template>

<!-- <style>
Expand Down
81 changes: 43 additions & 38 deletions src/views/RunnerView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -203,47 +203,52 @@ onMounted(() => {
</script>

<template>
<v-container class="main">
<v-container fluid class="main bg-surface">
<v-row>
<h1>Miniaturka runnera na Twittera</h1>
<v-col>
<h1>Miniaturka runnera na Twittera</h1>
</v-col>
</v-row>
<v-row>
<CanvasItem
:canvasWidth="canvasWidth"
:canvasHeight="canvasHeight"
@canvasContext="(can) => (mainCanvas = can)"
@updateBackground="(b) => (photo = b)"
@updateScale="
(s) => {
photoScale += s
photoScale = Math.max(photoScale, 0.01)
}
"
@updatePos="
(l, t) => {
photoLeft += l
photoTop += t
}
"
@updateRotation="(r) => (photoRotation = (photoRotation + r) % 360)"
/>
</v-row>
<v-row>
<InputItem
@updateBackground="(b: string) => (photo = b)"
@updateRunner="(r: string) => (runner = r)"
@updateTitle="(t: string) => (title = t)"
@updateSubtitle="(s: string) => (subtitle = s)"
@updateCategory="(c: string) => (category = c)"
@updateMoney="(m: number) => (money = m)"
:runner="initialRunner"
:title="initialTitle"
:subtitle="initialSubtitle"
:category="initialCategory"
:enable-money="true"
:money="initialMoney"
:canvasModel="mainCanvas"
/>
<v-col>
<CanvasItem
:class="`h-auto w-auto`"
:canvasWidth="canvasWidth"
:canvasHeight="canvasHeight"
@canvasContext="(can) => (mainCanvas = can)"
@updateBackground="(b) => (photo = b)"
@updateScale="
(s) => {
photoScale += s
photoScale = Math.max(photoScale, 0.01)
}
"
@updatePos="
(l, t) => {
photoLeft += l
photoTop += t
}
"
@updateRotation="(r) => (photoRotation = (photoRotation + r) % 360)"
/>
</v-col>
<v-col cols="12" md="4">
<InputItem
@updateBackground="(b: string) => (photo = b)"
@updateRunner="(r: string) => (runner = r)"
@updateTitle="(t: string) => (title = t)"
@updateSubtitle="(s: string) => (subtitle = s)"
@updateCategory="(c: string) => (category = c)"
@updateMoney="(m: number) => (money = m)"
:runner="initialRunner"
:title="initialTitle"
:subtitle="initialSubtitle"
:category="initialCategory"
:enable-money="true"
:money="initialMoney"
:canvasModel="mainCanvas"
/>
</v-col>
</v-row>
</v-container>
</template>
Expand Down
84 changes: 47 additions & 37 deletions src/views/YoutubeView.vue
Original file line number Diff line number Diff line change
Expand Up @@ -177,43 +177,53 @@ onMounted(() => {
</script>

<template>
<div class="main">
<h1>Miniaturka runnera na Twittera</h1>
<CanvasItem
:canvasWidth="canvasWidth"
:canvasHeight="canvasHeight"
@canvasContext="(can) => (mainCanvas = can)"
@updateBackground="(b) => (photo = b)"
@updateScale="
(s) => {
photoScale += s
photoScale = Math.max(photoScale, 0.01)
}
"
@updatePos="
(l, t) => {
photoLeft += l
photoTop += t
}
"
@updateRotation="(r) => (photoRotation = (photoRotation + r) % 360)"
/>
<InputItem
@updateBackground="(b: string) => (photo = b)"
@updateRunner="(r: string) => (runner = r)"
@updateTitle="(t: string) => (title = t)"
@updateSubtitle="(s: string) => (subtitle = s)"
@updateCategory="(c: string) => (category = c)"
@updateTime="(t: string) => (time = t)"
:runner="initialRunner"
:title="initialTitle"
:subtitle="initialSubtitle"
:category="initialCategory"
:enable-time="true"
:time="initialTime"
:canvasModel="mainCanvas"
/>
</div>
<v-container fluid class="main bg-surface">
<v-row>
<v-col>
<h1>Miniaturka runnera na Twittera</h1>
</v-col>
</v-row>
<v-row>
<v-col>
<CanvasItem
:canvasWidth="canvasWidth"
:canvasHeight="canvasHeight"
@canvasContext="(can) => (mainCanvas = can)"
@updateBackground="(b) => (photo = b)"
@updateScale="
(s) => {
photoScale += s
photoScale = Math.max(photoScale, 0.01)
}
"
@updatePos="
(l, t) => {
photoLeft += l
photoTop += t
}
"
@updateRotation="(r) => (photoRotation = (photoRotation + r) % 360)"
/>
</v-col>
<v-col cols="12" md="4">
<InputItem
@updateBackground="(b: string) => (photo = b)"
@updateRunner="(r: string) => (runner = r)"
@updateTitle="(t: string) => (title = t)"
@updateSubtitle="(s: string) => (subtitle = s)"
@updateCategory="(c: string) => (category = c)"
@updateTime="(t: string) => (time = t)"
:runner="initialRunner"
:title="initialTitle"
:subtitle="initialSubtitle"
:category="initialCategory"
:enable-time="true"
:time="initialTime"
:canvasModel="mainCanvas"
/>
</v-col>
</v-row>
</v-container>
</template>

<!-- <style>
Expand Down

0 comments on commit 6d81eb6

Please sign in to comment.