today_ai_weather/app/views/layouts/application.html.erb
songtianlun d570f43f95 feat: add font styling and enhance city views
- Import Playfair Display and Raleway fonts for better typography
- Add a method to `City` model for fetching the latest weather art
- Revamp city index and show pages for improved layout and usability
- Update styles in the layout and main pages to enhance user experience

These changes promote visual consistency and enhance user interaction within the platform, providing a more engaging experience.
2025-01-20 18:02:28 +08:00

53 lines
1.8 KiB
Plaintext

<!DOCTYPE html>
<html>
<head>
<title><%= content_for(:title) || "Today Ai Weather" %></title>
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="mobile-web-app-capable" content="yes">
<%= csrf_meta_tags %>
<%= csp_meta_tag %>
<%= yield :head %>
<%# Enable PWA manifest for installable apps (make sure to enable in config/routes.rb too!) %>
<%#= tag.link rel: "manifest", href: pwa_manifest_path(format: :json) %>
<link rel="icon" href="/icon.png" type="image/png">
<link rel="icon" href="/icon.svg" type="image/svg+xml">
<link rel="apple-touch-icon" href="/icon.png">
<%# Includes all stylesheet files in app/assets/stylesheets %>
<%= javascript_include_tag "application", "data-turbo-track": "reload", type: "module" %>
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
</head>
<body class="min-h-screen bg-base-100 font-sans">
<!-- 导航栏 -->
<div class="navbar bg-base-100/80 backdrop-blur-sm fixed top-0 z-50">
<div class="container mx-auto">
<div class="flex-1">
<%= link_to root_path, class: "text-2xl font-display font-bold hover:text-primary transition-colors" do %>
AI Weather Art
<% end %>
</div>
<div class="flex-none">
<%= link_to "Cities", cities_path, class: "btn btn-ghost font-sans" %>
</div>
</div>
</div>
<!-- 主要内容 -->
<main class="pt-16">
<%= yield %>
</main>
<!-- 页脚 -->
<footer class="footer footer-center p-8 bg-base-200 text-base-content mt-16">
<div>
<p class="font-display">Copyright © 2024 - All rights reserved by AI Weather Art</p>
</div>
</footer>
</body>
</html>