mirror of
https://github.com/Freika/dawarich.git
synced 2026-01-10 01:01:39 -05:00
Merge pull request #1661 from Freika/feature/full-screen-map
Feature/full screen map
This commit is contained in:
commit
b8ad1a8a5c
3 changed files with 52 additions and 2 deletions
|
|
@ -2,6 +2,7 @@
|
|||
|
||||
class MapController < ApplicationController
|
||||
before_action :authenticate_user!
|
||||
layout 'map', only: :index
|
||||
|
||||
def index
|
||||
@points = filtered_points
|
||||
|
|
|
|||
49
app/views/layouts/map.html.erb
Normal file
49
app/views/layouts/map.html.erb
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
<!DOCTYPE html>
|
||||
<html data-theme="<%= app_theme %>" data-self-hosted="<%= @self_hosted %>">
|
||||
<head>
|
||||
<title><%= full_title(yield(:title)) %></title>
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<%= action_cable_meta_tag %>
|
||||
<%= csrf_meta_tags %>
|
||||
<%= csp_meta_tag %>
|
||||
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" integrity="sha256-p4NxAoJBhIIN+hmNHrzRCf9tD/miZyoHS5obTRR9BMY=" crossorigin="" />
|
||||
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/leaflet.draw/1.0.4/leaflet.draw.css"/>
|
||||
|
||||
<%= stylesheet_link_tag "tailwind", "inter-font", "data-turbo-track": "reload" %>
|
||||
<%= stylesheet_link_tag "application", "data-turbo-track": "reload" %>
|
||||
<%= javascript_importmap_tags %>
|
||||
<%= javascript_include_tag "https://unpkg.com/protomaps-leaflet@5.0.0/dist/protomaps-leaflet.js" %>
|
||||
|
||||
<%= render 'application/favicon' %>
|
||||
<%= Sentry.get_trace_propagation_meta.html_safe if Sentry.initialized? %>
|
||||
<% if !DawarichSettings.self_hosted? %>
|
||||
<script async src="https://scripts.simpleanalyticscdn.com/latest.js"></script>
|
||||
<% end %>
|
||||
</head>
|
||||
|
||||
<body class='h-screen overflow-hidden relative'>
|
||||
<!-- Fixed Navbar -->
|
||||
<div class='fixed w-full z-50 bg-base-100 shadow-md h-16'>
|
||||
<div class='container mx-auto h-full w-full flex items-center'>
|
||||
<%= render 'shared/navbar' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Flash Messages - Fixed below navbar -->
|
||||
<div class='fixed top-16 w-full z-40 h-8'>
|
||||
<div class='container mx-auto px-5'>
|
||||
<%= render 'shared/flash' %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<!-- Date Navigation - Fixed below flash messages -->
|
||||
|
||||
<!-- Full Screen Map Container -->
|
||||
<div class='absolute top-40 left-0 right-0 bottom-0 w-full z-10 overflow-auto'>
|
||||
<%= yield %>
|
||||
</div>
|
||||
|
||||
<%= render 'map/onboarding_modal' %>
|
||||
</body>
|
||||
</html>
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
<% content_for :title, 'Map' %>
|
||||
|
||||
<div class="flex flex-col lg:flex-row lg:space-x-4 my-5 w-full">
|
||||
<div class="flex flex-col lg:flex-row lg:space-x-4 w-full">
|
||||
<div class='w-full'>
|
||||
<div class="flex flex-col space-y-4 mb-4 w-full">
|
||||
<div class="flex flex-col space-y-4 mb-4 w-full" style="margin-top: 5rem;">
|
||||
<%= form_with url: map_path(import_id: params[:import_id]), method: :get do |f| %>
|
||||
<div class="flex flex-col space-y-4 sm:flex-row sm:space-y-0 sm:space-x-4 sm:items-end">
|
||||
<div class="w-full sm:w-1/12 md:w-1/12 lg:w-1/12">
|
||||
|
|
|
|||
Loading…
Reference in a new issue