Files
fixin.me/app/views/layouts/application.html.erb
barbie-bot 71c22f2280 Add Plotly line charts view to Measurements page
Users can now switch to a Charts view that renders a separate
time-series line chart for each tracked quantity, using Plotly.js
loaded via CDN. Charts are sorted chronologically and styled to
match the app palette. A dedicated toggle button and matching
CSS visibility rules mirror the existing Compact/Wide view pattern.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-04-03 22:36:24 +00:00

59 lines
2.2 KiB
Plaintext

<!DOCTYPE html>
<!-- Hide content until Turbo is loaded completely. There exist (mostly
unnoticeable) delay after a page is shown and before Turbo has started to
service frame/stream requests. If user (or more probably: system test) clicks
link during this period, request will be sent outside of Turbo, resulting in
e.g. stream request sent as HTML instead of TURBO_STREAM.
Content is shown on 'turbo:load' event.
-->
<html<%= ' style="visibility: hidden;"' if Rails.env.test? -%>>
<head>
<title>fixin.me</title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= stylesheet_link_tag "spreadsheet" %>
<script src="https://cdn.plot.ly/plotly-basic-2.35.2.min.js"></script>
<%= javascript_importmap_tags %>
<%#= turbo_page_requires_reload_tag %>
<%= turbo_exempts_page_from_cache_tag %>
<%# TODO: replace with turbo_disable_prefetch_tag when available %>
<%= tag.meta(name: "turbo-prefetch", content: false) %>
</head>
<body>
<header class="flex">
<%= image_link_to t(".source_code"), "code-braces", source_code_url %>
<%= image_link_to t(".issue_tracker"), "bug-outline", issue_tracker_url,
class: "rextend" %>
<% if user_signed_in? %>
<%= image_link_to_unless_current(current_user, "account-wrench-outline",
edit_user_registration_path) %>
<% if current_user_disguised? %>
<%= image_link_to t(".revert"), "incognito-off", revert_users_path %>
<% else %>
<%= image_button_to t(".sign_out"), "logout", destroy_user_session_path,
method: :delete, data: {turbo: false} %>
<% end %>
<% else %>
<%= image_link_to_unless_current(t(:sign_in), "login", new_user_session_path) %>
<%= image_link_to_unless_current(t(:register), "account-plus-outline",
new_user_registration_path) %>
<% end %>
</header>
<div id="flashes">
<%= render_flash_messages %>
</div>
<%# Allows overwriting/clearing navigation menu for some views %>
<nav class="navigation">
<%= content_for(:navigation) || (navigation_menu if user_signed_in?) %>
</nav>
<%= yield %>
</body>
</html>