Skip to content

Commit 01ccd3e

Browse files
Merge pull request #45 from pixie-git/feature/PIX-54_create-implementation-ui-pixel-art-editor
Feature/pix 54 create implementation UI pixel art editor
2 parents d89e7c6 + faf20c4 commit 01ccd3e

4 files changed

Lines changed: 301 additions & 61 deletions

File tree

client/src/components/editor/ColorSelector.vue

Lines changed: 39 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -26,33 +26,58 @@ const selectColor = (index: number) => {
2626

2727
<style scoped>
2828
.color-picker {
29-
display: flex;
30-
flex-wrap: wrap;
31-
gap: 4px;
32-
padding: 8px;
33-
background: #2c2c2c;
34-
border-radius: 8px;
29+
display: grid;
30+
grid-template-columns: repeat(2, 1fr); /* 2 columns like in the design */
31+
gap: 8px;
32+
padding: 12px;
33+
background: #fff; /* White background as per design */
34+
border-radius: 12px;
3535
width: fit-content;
36+
box-shadow: 0 2px 8px rgba(0,0,0,0.1);
37+
border: 1px solid #e0e0e0;
3638
}
3739
3840
.color-swatch {
39-
width: 24px;
40-
height: 24px;
41-
border: 2px solid transparent;
41+
width: 32px;
42+
height: 32px;
43+
border: 2px solid rgba(0,0,0,0.1);
4244
cursor: pointer;
43-
border-radius: 4px;
44-
transition: transform 0.1s;
45+
border-radius: 6px;
46+
transition: all 0.2s ease;
47+
flex-shrink: 0;
4548
}
4649
4750
.color-swatch:hover {
4851
transform: scale(1.1);
49-
border-color: rgba(255, 255, 255, 0.5);
52+
box-shadow: 0 2px 4px rgba(0,0,0,0.2);
5053
}
5154
5255
.color-swatch.active {
53-
border-color: white;
54-
box-shadow: 0 0 4px rgba(0,0,0,0.5);
56+
border-color: #333;
57+
box-shadow: 0 0 0 2px rgba(0,0,0,0.1);
5558
transform: scale(1.15);
5659
z-index: 1;
5760
}
61+
62+
/* Mobile Responsive */
63+
@media (max-width: 768px) {
64+
.color-picker {
65+
display: flex;
66+
flex-direction: row;
67+
width: 100%;
68+
max-width: 100%;
69+
overflow-x: auto;
70+
padding: 8px;
71+
gap: 12px;
72+
border: none;
73+
box-shadow: none;
74+
background: transparent;
75+
justify-content: center; /* Center if few colors, or start if scrolling */
76+
}
77+
78+
.color-swatch {
79+
width: 36px;
80+
height: 36px;
81+
}
82+
}
5883
</style>

client/src/components/lobbies/LobbyHeader.vue

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
<div class="logo-section">
44
<img src="@/assets/PixieLogo.png" alt="Pixie" class="mini-logo" />
55
</div>
6-
<h1>Join a Canvas</h1>
6+
<h1>{{ title }}</h1>
77

88
<div class="user-actions">
99
<button class="icon-btn" title="Notifications">
@@ -18,7 +18,12 @@
1818
</template>
1919

2020
<script setup lang="ts">
21-
// Pure presentation component
21+
defineProps({
22+
title: {
23+
type: String,
24+
default: 'Join a Canvas'
25+
}
26+
});
2227
</script>
2328

2429
<style scoped>

client/src/views/LobbiesView.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<template>
22
<div class="lobbies-container">
3-
<LobbyHeader />
3+
<LobbyHeader title="Join a Canvas" />
44

55
<main class="main-content">
66
<LobbyFilters

0 commit comments

Comments
 (0)