docbrown/app/views/listings/new.html.erb
Mac Siri afa73e06e3
Replace Webpacker with Esbuild (#20470)
* Migrate to esbuild WIP

* Add exclude

* Remove redundant file

* Move file

* Move to javascript_include_tag

* Lint fix

* WIP

* WIP

* Add watch mode to esbuild WIP

* Get jest working

* Remove babel

* Revert "Remove babel"

This reverts commit 6da35260aa19d6f97f586deb66c0ecaf48433b73.

* More WIP

* Got image to load

* WIP

* Resolve audit

* Lint fix

* WIP

* Fix jest spec

* [CI] Remove asset-restore for test build stage

* Production compliant

* Temp disable sourcemap

* Update glob

* Add esbuild helper to stimulus

* Import fragment

* Temp disable coverage to see failing tests

* Fix broken spec

* Address lint

* Set proper es6 target

* Use esbuild for everything

* wait what

* Revert "Set proper es6 target"

This reverts commit 98f5278093421baa8ffe2ca580845b01c1a1eadf.

* Revert "Use esbuild for everything"

This reverts commit 0ac46738f07ffcb6af095ccb1ffa5e439b7fefa3.

* Replace uglifier with terser

* New compiled assets version

* Remvoe honeybadger-io/webpack

* Remove cypress coverage checks for now

* Update jsconfig.json

* Update docker-compose

* Remove public/packs-test from ci cache
2024-01-25 20:29:21 +00:00

44 lines
2.6 KiB
Text

<% title t("views.listings.new.meta.title") %>
<header class="crayons-layout crayons-layout--limited-l flex items-center justify-between p-2 l:p-4 l:pb-0">
<h1 class="crayons-title"><%= t("views.listings.new.heading") %></h1>
</header>
<main class="crayons-layout crayons-layout--2-cols crayons-layout--2-cols--inverted crayons-layout--limited-l">
<div class="crayons-layout__content">
<%= render "form", listing: @listing %>
</div>
<aside class="crayons-layout__sidebar-right px-3 m:px-0">
<div class="crayons-card crayons-card--secondary p-3 m:p-6 mb-2 m:mb-4">
<span class="color-base-60"><%= t("views.listings.new.personal") %></span>
<div class="flex m:flex-col items-center m:items-start justify-between">
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90 m:mb-4 block" id="test-credits-size"><%= @credits.size %></strong>
<a target="_blank" rel="noopener noreferrer" class="crayons-btn crayons-btn--secondary m:w-100" href="/credits/purchase" data-no-instant><%= t("views.listings.new.buy") %></a>
</div>
</div>
<% if @organizations.present? %>
<div class="crayons-card crayons-card--secondary p-3 m:p-6 mb-4">
<span class="color-base-60"><%= t("views.listings.new.organization") %></label>
<% if @organizations.size > 1 %>
<select id="org-credits-select" class="org-credits-select crayons-select my-2">
<% @organizations.each do |org| %>
<option value="<%= org.id %>" data-credits="<%= org.credits.unspent.size %>"><%= org.name %></option>
<% end %>
</select>
<% end %>
<div class="flex m:flex-col items-center m:items-start justify-between">
<strong class="fs-2xl m:fs-3xl lh-tight color-base-90 m:mb-4 block" id="org-credits-number"><%= @organizations.first.credits.unspent.size %></strong>
<a id="org-credits-purchase-link" target="_blank" rel="noopener noreferrer" class="crayons-btn crayons-btn--secondary m:w-100" href="/credits/purchase?organization_id=<%= @organizations.first.id %>" data-no-instant><%= t("views.listings.new.buy") %></a>
</div>
<%= javascript_include_tag "listingForm", "orgCreditsSelector", defer: true %>
</div>
<% end %>
<div class="fs-s color-base-60 mb-4">
<h3 class="fs-base fw-bold color-base-70 mb-2"><%= t("views.listings.new.disclaimer.subtitle") %></h3>
<p class="mb-2"><%= t("views.listings.new.disclaimer.description1", community: community_name) %></p>
<p><%= t("views.listings.new.disclaimer.description2") %></p>
</div>
</aside>
</main>