mirror of
https://github.com/indentlabs/notebook.git
synced 2025-10-26 11:19:22 +00:00
44 lines
3.0 KiB
Plaintext
44 lines
3.0 KiB
Plaintext
<div class="flex items-center">
|
|
<h1 class="flex-1 text-lg font-medium">
|
|
<span class="<%= content.class_text_color %>">
|
|
<%= content.name %>
|
|
</span>
|
|
<small class="ml-2 text-gray-500">
|
|
by
|
|
<span class="<%= User.text_color %>">
|
|
<%= link_to content.user.display_name, content.user %>
|
|
</span>
|
|
</small>
|
|
</h1>
|
|
<div class="mr-2">
|
|
<button type="button" data-action="dropdown#toggle click@window->dropdown#hide" class="w-full bg-notebook-blue border border-notebook-blue rounded-md shadow-sm px-4 py-2 inline-flex justify-center text-sm font-medium text-gray-200 hover:bg-blue-500 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-blue-500" id="sort-menu-button" aria-expanded="false" aria-haspopup="true">
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="mr-3 h-5 w-5" viewBox="0 0 20 20" fill="currentColor">
|
|
<path d="M13.586 3.586a2 2 0 112.828 2.828l-.793.793-2.828-2.828.793-.793zM11.379 5.793L3 14.172V17h2.828l8.38-8.379-2.83-2.828z" />
|
|
</svg>
|
|
Edit mode
|
|
</button>
|
|
</div>
|
|
<div data-controller="dropdown" class="relative">
|
|
<button type="button" data-action="dropdown#toggle click@window->dropdown#hide" class="w-full bg-white border border-gray-300 rounded-md shadow-sm px-4 py-2 inline-flex justify-center text-sm font-medium text-gray-700 hover:bg-gray-50 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" id="sort-menu-button" aria-expanded="false" aria-haspopup="true">
|
|
<!-- Heroicon name: solid/sort-descending -->
|
|
<svg xmlns="http://www.w3.org/2000/svg" class="mr-3 h-5 w-5 text-gray-400" fill="none" viewBox="0 0 24 24" stroke="currentColor" stroke-width="2">
|
|
<path stroke-linecap="round" stroke-linejoin="round" d="M3 4h13M3 8h9m-9 4h9m5-4v12m0 0l-4-4m4 4l4-4" />
|
|
</svg>
|
|
Jump to...
|
|
<!-- Heroicon name: solid/chevron-down -->
|
|
<svg class="ml-2.5 -mr-1.5 h-5 w-5 text-gray-400" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" fill="currentColor" aria-hidden="true">
|
|
<path fill-rule="evenodd" d="M5.293 7.293a1 1 0 011.414 0L10 10.586l3.293-3.293a1 1 0 111.414 1.414l-4 4a1 1 0 01-1.414 0l-4-4a1 1 0 010-1.414z" clip-rule="evenodd" />
|
|
</svg>
|
|
</button>
|
|
<!-- Dropdown menu, show/hide based on menu state. -->
|
|
<div data-dropdown-target="menu" class="origin-top-right z-10 absolute right-0 mt-2 w-56 rounded-md shadow-lg bg-white ring-1 ring-black ring-opacity-5 focus:outline-none" role="menu" aria-orientation="vertical" aria-labelledby="sort-menu-button" tabindex="-1">
|
|
<div class="py-1" role="none">
|
|
<% content.data[:categories].each do |category| %>
|
|
<%= link_to '#', class: "text-gray-700 block px-4 py-2 text-sm bg-white hover:bg-gray-100", id: category[:id], data: { action: "dropdown#toggle" } do %>
|
|
<i class="material-icons float-left <%= content.class_text_color %> mr-2"><%= category[:icon] %></i>
|
|
<%= category[:label] %>
|
|
<% end %>
|
|
<% end %>
|
|
</div>
|
|
</div>
|
|
</div> |