Skip to content

Commit d5f1d91

Browse files
authored
Merge pull request #111 from Kocal/refactor/ux-css
refactor(css): remplacer Tailwind CSS par Symfony UX CSS
2 parents b3d8f8e + d5538df commit d5f1d91

44 files changed

Lines changed: 4152 additions & 613 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎Dockerfile‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,9 +121,6 @@ RUN pnpm install --frozen-lockfile
121121
# copy sources
122122
COPY --link --exclude=frankenphp/ . ./
123123

124-
# build the front-end assets into public/build (Vite via @symfony/reprise)
125-
RUN pnpm run build
126-
127124
RUN <<-EOF
128125
mkdir -p var/cache var/log var/share
129126
composer dump-autoload --classmap-authoritative --no-dev
@@ -135,6 +132,10 @@ RUN <<-EOF
135132
sync
136133
EOF
137134

135+
# build the front-end assets into public/build (Vite via @symfony/reprise)
136+
# after post-install-cmd, whose cache:warmup writes var/ux_css/styles.css
137+
RUN pnpm run build
138+
138139
# Collect shared libraries needed by FrankenPHP and PHP extensions
139140
# hadolint ignore=DL3008,SC3054,DL4006
140141
RUN <<-'EOF'

‎README.md‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ My website, built with:
44

55
- [Symfony 7](https://symfony.com/7)
66
- [Asset Mapper](https://symfony.com/doc/current/frontend/asset_mapper.html)
7-
- [Tailwind CSS](https://tailwindcss.com/)
7+
- [Symfony UX CSS](https://github.com/symfony/ux-css)
88
- [PostgreSQL](https://www.postgresql.org/)
99
- [EasyAdminBundle](https://symfony.com/bundles/EasyAdminBundle/current/index.html)
1010
- [Docker](https://www.docker.com/) and [Docker Compose](https://docs.docker.com/compose/)

‎assets/controllers/places_controller.js‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import "leaflet.markercluster/dist/MarkerCluster.css";
66
/* stimulusFetch: 'lazy' */
77
export default class extends Controller {
88
static targets = ["map", "country"];
9+
static classes = ["cluster"];
910
static values = { countries: Object };
1011

1112
connect() {
@@ -63,7 +64,7 @@ export default class extends Controller {
6364
showCoverageOnHover: false,
6465
iconCreateFunction: (cluster) =>
6566
L.divIcon({
66-
html: `<div class="flex size-full items-center justify-center rounded-full border-2 border-white bg-[#126FC6] text-sm font-semibold text-white shadow-md">${cluster.getChildCount()}</div>`,
67+
html: `<div class="${this.clusterClasses.join(" ")}">${cluster.getChildCount()}</div>`,
6768
iconSize: [36, 36],
6869
className: "",
6970
}),
@@ -97,7 +98,7 @@ export default class extends Controller {
9798
definition.bridgeOptions = {
9899
icon: L.divIcon({
99100
html: `
100-
<div class="relative">
101+
<div style="position: relative">
101102
<svg xmlns="http://www.w3.org/2000/svg" xml:space="preserve" fill-rule="evenodd" stroke-linecap="round" clip-rule="evenodd" viewBox="0 0 500 820">
102103
<defs>
103104
<linearGradient id="__sf_ux_map_gradient_marker_fill" x1="0" x2="1" y1="0" y2="0" gradientTransform="matrix(0 -37.57 37.57 0 416.45 541)" gradientUnits="userSpaceOnUse">
@@ -112,7 +113,7 @@ export default class extends Controller {
112113
<path fill="url(#__sf_ux_map_gradient_marker_fill)" stroke="url(#__sf_ux_map_gradient_marker_border)" stroke-width="1.1" d="M416.54 503.61c-6.57 0-12.04 5.7-12.04 11.87 0 2.78 1.56 6.3 2.7 8.74l9.3 17.88 9.26-17.88c1.13-2.43 2.74-5.79 2.74-8.74 0-6.18-5.38-11.87-11.96-11.87Z" transform="translate(-7889.1 -9807.44) scale(19.54)"/>
113114
</svg>
114115
115-
<img src="${definition.extra.icon_mask_uri}" alt="" class="absolute" style="width: 12px; top: 8px; transform: translate3d(50%, 0, 0); filter: invert(1)" />
116+
<img src="${definition.extra.icon_mask_uri}" alt="" style="position: absolute; width: 12px; top: 8px; transform: translate3d(50%, 0, 0); filter: invert(1)" />
116117
</div>
117118
`,
118119
iconSize: [25, 41],

0 commit comments

Comments
 (0)