optimize dashboard on mobile

This commit is contained in:
Alex Turchyn
2023-07-02 00:14:26 +03:00
parent ca232e40ac
commit be196b2bcb
11 changed files with 68 additions and 54 deletions
+4 -4
View File
@@ -1,7 +1,7 @@
<div style="max-width: 1600px" class="mx-auto pl-4">
<div class="flex justify-between py-1.5 items-center pr-4">
<a href="<%= template_path(@submission.template) %>" class="flex space-x-3">
<span><%= render 'shared/logo' %></span>
<a href="<%= template_path(@submission.template) %>" class="flex space-x-3 py-1">
<span><%= render 'shared/logo', width: 40, height: 40 %></span>
<span class="text-3xl font-semibold focus:text-clip"><%= @submission.template.name %></span>
</a>
<div class="space-x-3 flex items-center">
@@ -20,7 +20,7 @@
</div>
</div>
<div class="flex" style="max-height: calc(100vh - 60px)">
<div class="overflow-y-auto overflow-x-hidden w-52 flex-none pr-3 mt-0.5 pt-0.5">
<div class="overflow-y-auto overflow-x-hidden hidden lg:block w-52 flex-none pr-3 mt-0.5 pt-0.5">
<% @submission.template.schema.each do |item| %>
<% document = @submission.template.documents.find { |a| item['attachment_uuid'] == a.uuid } %>
<a href="#<%= "page-#{document.uuid}-0" %>" onclick="[event.preventDefault(), window[event.target.closest('a').href.split('#')[1]].scrollIntoView({ behavior: 'smooth', block: 'start' })]" class="block cursor-pointer">
@@ -53,7 +53,7 @@
<% end %>
</div>
</div>
<div class="relative w-80 flex-none pt-0.5 pr-4 pl-0.5 overflow-auto space">
<div class="hidden md:block relative w-80 flex-none pt-0.5 pr-4 pl-0.5 overflow-auto space">
<% colors = %w[bg-red-500 bg-sky-500 bg-emerald-500 bg-yellow-300 bg-purple-600] %>
<% submitter_fields_index = @submission.template.fields.group_by { |f| f['submitter_uuid'] } %>
<% @submission.template.submitters.each_with_index do |item, index| %>