* 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
55 lines
2.2 KiB
Text
55 lines
2.2 KiB
Text
<h1 class="crayons-title mb-1">
|
|
Posts
|
|
<% if params[:state] && params[:state].include?("top-") && params[:state] != "top-3" && params[:state] != "top-6" %>
|
|
<%= params[:state] %>-months
|
|
<% end %>
|
|
</h1>
|
|
|
|
<nav class="mb-2 flex justify-between items-center" aria-label="Posts">
|
|
<ul class="crayons-navigation crayons-navigation--horizontal">
|
|
<li>
|
|
<a href="<%= admin_articles_path %>" class="crayons-navigation__item <%= "crayons-navigation__item--current" if params[:state].blank? %>">Hot</a>
|
|
</li>
|
|
<li>
|
|
<a
|
|
href="<%= admin_articles_path(state: :chronological) %>"
|
|
class="crayons-navigation__item <%= "crayons-navigation__item--current" if params[:state] == "chronological" %>">Chronological</a>
|
|
</li>
|
|
</ul>
|
|
</nav>
|
|
|
|
<%= paginate @articles %>
|
|
|
|
<div id="member-index-content"
|
|
class="flex flex-col gap-4"
|
|
data-controller="article-pinned-modal"
|
|
data-article-pinned-modal-root-selector-value="#article-pin-modal-root"
|
|
data-article-pinned-modal-content-selector-value="#article-pin-modal"
|
|
data-article-pinned-modal-title-value="There's another article pinned..."
|
|
data-article-pinned-modal-size-value="m"
|
|
data-article-pinned-modal-cancel-button-id-value="article-pin-modal-cancel"
|
|
data-article-pinned-modal-ok-button-id-value="article-pin-modal-ok"
|
|
data-action="article-pinned-modal:open@document->article-pinned-modal#openModal">
|
|
|
|
<% if @pinned_article.present? %>
|
|
<div class="crayons-card crayons-card--elevated p-2">
|
|
<h2 class="crayons-subtitle-1 flex gap-2 items-center mb-2 p-2"><%= crayons_icon_tag("pin.svg") %> Pinned Article</h2>
|
|
<%= render partial: "article_item", locals: { article: @pinned_article } %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<% if @featured_articles.present? %>
|
|
<div class="crayons-card p-3">
|
|
<h2 class="crayons-subtitle-1 flex gap-2 items-center mb-2">Manually Featured Articles</h2>
|
|
<%= render partial: "article_item", collection: @featured_articles, as: :article %>
|
|
</div>
|
|
<% end %>
|
|
|
|
<%= render partial: "article_item", collection: @articles, as: :article %>
|
|
<%= paginate @articles %>
|
|
|
|
<%= render partial: "pinned_article_modal" %>
|
|
</div>
|
|
|
|
<%= render partial: "image_upload_script" %>
|
|
<%= javascript_include_tag "admin/convertUserIdsToUsernameInputs" %>
|