]> gitweb.mndrdr.org Git - arelpe.git/commitdiff
Mail changes, stylesheet updates for forms, bug fixes mostly
authorAidan Cornelius-Bell <[email protected]>
Mon, 13 Jan 2025 03:16:00 +0000 (13:46 +1030)
committerAidan Cornelius-Bell <[email protected]>
Mon, 13 Jan 2025 03:16:00 +0000 (13:46 +1030)
app/assets/stylesheets/application.css
app/jobs/weekly_bookmarks_digest_job.rb
app/mailers/digest_mailer.rb
app/views/digest_mailer/weekly_bookmarks_digest.html.erb

index 16b3c760e7ebfd9eb73a0c4b999836d0d6e3e036..36f14c2696e4570bb6f11474f11bb91f8aabfc5e 100644 (file)
 
     --standout-bg: #191724;
     --standout-text: #fff;
-    --standout-form-bg: #fdf9eb;
-    --standout-form-text: #fff;
-    --standout-form-button-text: #191724;
+    --standout-form-bg: #333333;
+    --standout-form-text: #ffffff;
+    --standout-form-button-text: #ffffff;
 }
 
 /* Light mode */
         --standout-bg: #ffeee2;
         --standout-form-text: #333333;
         --standout-text: #333333;
-        --standout-form-bg: #fff;
-        --standout-form-button-text: #fff;
+        --standout-form-bg: #ffffff;
+        --standout-form-text: #333333;
+        --standout-form-button-text: #ffffff;
     }
 }
 
@@ -231,6 +232,8 @@ select {
     border-radius: 4px;
     box-sizing: border-box;
     font-size: 16px;
+    background-color: var(--standout-form-bg);
+    color: var(--standout-form-text);
 }
 
 input[type="text"]:focus,
@@ -269,6 +272,9 @@ label {
 .reg-form input {
     background-color: var(--standout-form-bg) !important;
     color: var(--standout-form-button-text) !important;
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    appearance: none;
 }
 
 .reg-form .help-text {
@@ -276,6 +282,17 @@ label {
     color: var(--standout-form-text);
 }
 
+.reg-form select {
+    background-color: var(--standout-form-bg) !important;
+    color: var(--standout-form-text) !important;
+    border: 1px solid var(--accent-a);
+}
+
+select option {
+    background-color: var(--standout-form-bg);
+    color: var(--standout-form-text);
+}
+
 .reg-form h1,
 .reg-form h2,
 .reg-form h3,
@@ -287,6 +304,49 @@ label {
     margin: 1em 0;
 }
 
+input[type="checkbox"] {
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    appearance: none;
+    width: 16px;
+    height: 16px;
+    border: 1px solid var(--accent-a);
+    border-radius: 3px;
+    background-color: var(--standout-form-bg);
+    cursor: pointer;
+    position: relative;
+    vertical-align: middle;
+    margin-right: 8px;
+}
+
+input[type="checkbox"]:checked {
+    background-color: var(--filter-button-active);
+    border-color: var(--filter-button-active);
+}
+
+input[type="checkbox"]:checked::after {
+    content: "";
+    position: absolute;
+    left: 4px;
+    top: 1px;
+    width: 5px;
+    height: 10px;
+    border: solid var(--standout-form-button-text);
+    border-width: 0 2px 2px 0;
+    transform: rotate(45deg);
+}
+
+/* Specific styles for checkboxes in .reg-form */
+.reg-form input[type="checkbox"] {
+    background-color: var(--standout-form-bg) !important;
+    border-color: var(--accent-a) !important;
+}
+
+.reg-form input[type="checkbox"]:checked {
+    background-color: var(--filter-button-active) !important;
+    border-color: var(--filter-button-active) !important;
+}
+
 .subheading {
     margin-top: -25px;
 }
@@ -330,6 +390,11 @@ input[type="reset"] {
     outline: none;
     font: inherit;
     color: inherit;
+    -webkit-appearance: none;
+    -moz-appearance: none;
+    appearance: none;
+    background-color: var(--filter-button);
+    color: var(--filter-button-text);
 }
 
 hr {
index ea72a663174ff995801eb574239278d0f47949d8..76c818f21a84670ee58f0fc6165dbc8706d63ce7 100644 (file)
@@ -1,6 +1,6 @@
 class WeeklyBookmarksDigestJob < ApplicationJob
   queue_as :default
-  retry_on StandardError, attempts: 3, wait: 5.minutes
+  retry_on StandardError, attempts: 2, wait: 5.minutes
 
   def perform(user = nil)
     end_date = Time.current.end_of_day
index b37f889b308b6dedb8932f8fe1a1fc463bb4e2b1..4df1cfa1e7de065e7504c0267f8733af7c113608 100644 (file)
@@ -6,7 +6,7 @@ class DigestMailer < ApplicationMailer
   #
   def weekly_bookmarks_digest(user, bookmark_ids)
     @user = user
-    @bookmarks = Post.where(id: bookmark_ids).order(created_at: :desc)
+    @bookmarks = Post.where(id: bookmark_ids).order(created_at: :asc)
 
     mail(to: @user.email, subject: 'mind reader :: weekly digest')
   end
index 748692560cf63dc518f28e44ef45b1f0705cf82c..9d4143ac8a01203e37a5861d278e0f8b8f0b465f 100644 (file)
 <body>
   <div class="container">
     <h1 class="header">mind reader</h1>
-    <p class="subheading">Your weekly dispatch and bookmark digest.</p>
+    <p class="subheading">Your weekly dispatch and bookmark digest is below:</p>
 
     <ul>
       <% @bookmarks.group_by { |bookmark| bookmark.created_at.to_date }.each do |date, items| %>
         <li class="date-heading">
-          From <%= date.strftime('%B %e, %Y') %>:
+          <br>From <%= date.strftime('%B %e, %Y') %>:
         </li>
         <% items.each do |item| %>
           <li>