Skip to content

Self-hosted project management for devs and their clients: tickets, time tracking, docs and meetings, with an AI assistant that cites its sources. AGPL-3.0.

3.3 KB
Raw Blame
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title><%= @organisation&.name || 'Notification' %></title>
  <style>
    /* Email-safe CSS */
    body {
      font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
      line-height: 1.6;
      color: #333333;
      background-color: #f8fafc;
      margin: 0;
      padding: 0;
    }
    
    .email-container {
      max-width: 600px;
      margin: 0 auto;
      background-color: #ffffff;
      border-radius: 8px;
      overflow: hidden;
      box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    }
    
    .header {
      background-color: #1f2937;
      color: #ffffff;
      padding: 24px;
      text-align: center;
    }
    
    .header h1 {
      margin: 0;
      font-size: 24px;
      font-weight: 600;
    }
    
    .content {
      padding: 32px 24px;
    }
    
    .notification-badge {
      display: inline-block;
      padding: 4px 12px;
      background-color: #3b82f6;
      color: #ffffff;
      font-size: 12px;
      font-weight: 600;
      text-transform: uppercase;
      border-radius: 12px;
      margin-bottom: 16px;
    }
    
    .actor-info {
      margin-bottom: 16px;
      padding: 12px;
      background-color: #f3f4f6;
      border-radius: 6px;
      border-left: 4px solid #3b82f6;
    }
    
    .actor-name {
      font-weight: 600;
      color: #1f2937;
    }
    
    .action-button {
      display: inline-block;
      padding: 12px 24px;
      background-color: #3b82f6;
      color: #ffffff;
      text-decoration: none;
      border-radius: 6px;
      font-weight: 600;
      margin: 16px 0;
    }
    
    .action-button:hover {
      background-color: #2563eb;
    }
    
    .footer {
      background-color: #f9fafb;
      padding: 24px;
      border-top: 1px solid #e5e7eb;
      font-size: 14px;
      color: #6b7280;
    }
    
    .footer a {
      color: #3b82f6;
      text-decoration: none;
    }
    
    .unsubscribe-links {
      margin-top: 16px;
      text-align: center;
      font-size: 12px;
    }
    
    .unsubscribe-links a {
      color: #9ca3af;
      text-decoration: none;
      margin: 0 8px;
    }
    
    /* Responsive */
    @media (max-width: 600px) {
      .email-container {
        margin: 0;
        border-radius: 0;
      }
      
      .header, .content, .footer {
        padding: 16px;
      }
    }
  </style>
</head>
<body>
  <div class="email-container">
    <div class="header">
      <h1>
        Lalabase<% if @notification&.project.present? %>: <%= @notification.project.name %><% elsif @notification&.notifiable.respond_to?(:project) && @notification.notifiable.project.present? %>: <%= @notification.notifiable.project.name %><% end %>
      </h1>
    </div>
    
    <div class="content">
      <%= yield %>
    </div>
    
    <div class="footer">
      <p>
        This notification was sent to you because you have notifications enabled for this type of activity.
        You can <a href="<%= @preferences_url %>">manage your notification preferences</a> at any time.
      </p>
      
      <div class="unsubscribe-links">
        <a href="<%= @unsubscribe_url %>">Unsubscribe from this type</a>
        |
        <a href="<%= @preferences_url %>">All preferences</a>
      </div>
    </div>
  </div>
</body>
</html>