this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

chore: Remove trailing whitespace on files

+31 -31
+16 -16
internal/assets/css/screen.css
··· 3 3 --bg-body: white; 4 4 --text-main: #222; /* Default text color */ 5 5 --text-muted: #aaa; 6 - 6 + 7 7 /* Masthead */ 8 8 --masthead-text: #000; 9 9 --masthead-border: #000; ··· 20 20 --link-color: #2c6e2f; 21 21 --quote-color: #d65a00; 22 22 --header-color: #aaa; 23 - 23 + 24 24 /* OG Preview (Cards) */ 25 25 --og-border: #e1e8ed; 26 26 --og-bg: #fff; 27 27 --og-title: #14171a; 28 28 --og-desc: #657786; 29 - 29 + 30 30 /* Slack-like OG */ 31 31 --slack-border: #e0e0e0; 32 32 --slack-site-info: #696969; ··· 39 39 --footer-border: #eee; 40 40 --footer-text: #666; 41 41 --footer-link: #444; 42 - 42 + 43 43 /* Icon Fill */ 44 44 --icon-fill: #000000; 45 45 } ··· 49 49 --bg-body: #121212; 50 50 --text-main: #e0e0e0; 51 51 --text-muted: #888; 52 - 52 + 53 53 /* Masthead */ 54 54 --masthead-text: #fff; 55 55 --masthead-border: #fff; ··· 66 66 --link-color: #66bb6a; 67 67 --quote-color: #ffb74d; 68 68 --header-color: #888; 69 - 69 + 70 70 /* OG Preview (Cards) */ 71 71 --og-border: #333; 72 72 --og-bg: #1e1e1e; 73 73 --og-title: #e0e0e0; 74 74 --og-desc: #aaa; 75 - 75 + 76 76 /* Slack-like OG */ 77 77 --slack-border: #444; 78 78 --slack-site-info: #888; ··· 112 112 margin: 0 auto; 113 113 flex: 1; 114 114 box-sizing: border-box; /* Include padding in width calculation */ 115 - 115 + 116 116 /* CSS Grid Layout */ 117 117 display: grid; 118 118 grid-template-columns: 1fr 250px; ··· 128 128 #masthead { 129 129 /* Span full width of the grid */ 130 130 grid-column: 1 / -1; 131 - 131 + 132 132 font-size: 72px; 133 133 font-weight: bold; 134 134 line-height: 68px; ··· 139 139 display: flex; 140 140 justify-content: space-between; 141 141 align-items: center; 142 - 143 - /* Reset previous negative margins/padding if they interfere, 144 - but keeping some padding might be desired for the text look. 142 + 143 + /* Reset previous negative margins/padding if they interfere, 144 + but keeping some padding might be desired for the text look. 145 145 Let's simplify for the grid context. */ 146 146 margin: 0 0 20px 0; 147 147 padding: 0; ··· 158 158 /* Grid placement */ 159 159 grid-column: 2; 160 160 grid-row: 2; /* Starts after masthead */ 161 - 161 + 162 162 width: 100%; /* Take full width of the column */ 163 163 } 164 164 165 165 #content { 166 166 /* Grid placement */ 167 167 grid-column: 1; 168 - 168 + 169 169 width: 100%; /* Take full width of the column */ 170 170 } 171 171 ··· 412 412 #navigation { 413 413 /* Grid placement */ 414 414 grid-column: 1; 415 - 415 + 416 416 width: 100%; 417 417 text-align: left; 418 418 padding-bottom: 20px; ··· 496 496 .og-image img { 497 497 max-width: 100%; 498 498 border-radius: 8px; /* Slack likes rounder corners on media */ 499 - border: 1px solid var(--slack-img-border); 499 + border: 1px solid var(--slack-img-border); 500 500 display: block; 501 501 /* Reset styles from .item img */ 502 502 padding: 0 !important;
+1 -1
internal/assets/roast/database_setup.md
··· 36 36 ```bash 37 37 mysql -u root -p < sql/sql_setup 38 38 ``` 39 - 39 + 40 40 Or let the setup script create the database automatically. 41 41 42 42 3. Run the setup script:
+3 -3
internal/data/gorm_store.go
··· 264 264 var results []TimelineItem 265 265 266 266 query := ` 267 - SELECT 267 + SELECT 268 268 'link' as type, ircLinkID as id, timestamp, title, url, '' as content, user as author, '' as md5sum 269 269 FROM ircLink 270 270 UNION ALL 271 - SELECT 271 + SELECT 272 272 'quote' as type, quoteID as id, timestamp, '' as title, '' as url, quote as content, author as author, '' as md5sum 273 273 FROM quote 274 274 UNION ALL 275 - SELECT 275 + SELECT 276 276 'image' as type, imageID as id, timestamp, title, url, '' as content, '' as author, md5sum 277 277 FROM image 278 278 ORDER BY timestamp DESC
+1 -1
tests/fixtures_hot.sql
··· 1 1 -- Insert items from 8 days ago (Hot Links window is 6-12 days) 2 - INSERT INTO ircLink (user, title, url, clicks, content_type, timestamp) VALUES 2 + INSERT INTO ircLink (user, title, url, clicks, content_type, timestamp) VALUES 3 3 ('history_buff', 'Ancient Link 1', 'http://old.example.com/1', 10, 'text', datetime('now', '-8 days')), 4 4 ('history_buff', 'Ancient Link 2', 'http://old.example.com/2', 5, 'text', datetime('now', '-8 days')), 5 5 ('history_buff', 'Ancient Link 3', 'http://old.example.com/3', 20, 'text', datetime('now', '-9 days'));
+1 -1
tests/fixtures_hot_mysql.sql
··· 1 1 -- Insert items from 8 days ago (Hot Links window is 6-12 days) 2 - INSERT INTO ircLink (user, title, url, clicks, content_type, timestamp) VALUES 2 + INSERT INTO ircLink (user, title, url, clicks, content_type, timestamp) VALUES 3 3 ('history_buff', 'Ancient Link 1', 'http://old.example.com/1', 10, 'text', DATE_SUB(NOW(), INTERVAL 8 DAY)), 4 4 ('history_buff', 'Ancient Link 2', 'http://old.example.com/2', 5, 'text', DATE_SUB(NOW(), INTERVAL 8 DAY)), 5 5 ('history_buff', 'Ancient Link 3', 'http://old.example.com/3', 20, 'text', DATE_SUB(NOW(), INTERVAL 9 DAY));
+9 -9
tests/preview_test.sh
··· 16 16 17 17 # URL Encode 18 18 ENCODED_URL=$(jq -nr --arg v "$URL" '$v|@uri') 19 - 19 + 20 20 echo -n " Test: $NAME... " 21 - 21 + 22 22 RESPONSE=$(curl -s "$ENDPOINT?url=$ENCODED_URL") 23 - 23 + 24 24 # Check if curl failed 25 25 if [ $? -ne 0 ]; then 26 26 echo "FAIL (curl error)" 27 27 FAILURES=$((FAILURES + 1)) 28 28 return 29 29 fi 30 - 30 + 31 31 # Check assertion 32 32 MATCH=$(echo "$RESPONSE" | jq -e "$JQ_FILTER" 2>/dev/null) 33 - 33 + 34 34 if [ "$MATCH" = "true" ]; then 35 35 echo "PASS" 36 36 else ··· 48 48 "https://www.reddit.com/r/valheim/comments/leqdj6/our_first_encounter_with_the_troll/" \ 49 49 '.provider_name == "Reddit" or .title != null' 50 50 51 - # Invalid: specific non-existent post. 52 - # Note: Reddit might redirect 404s to search pages or return 200 with "Not Found" content, 51 + # Invalid: specific non-existent post. 52 + # Note: Reddit might redirect 404s to search pages or return 200 with "Not Found" content, 53 53 # so exact behavior is tricky. But tryOEmbed likely fails 404, scraper might find garbage or nothing. 54 54 # We expect "error" or empty-ish response if strictly handled, but scraper might find "Reddit - Dive into..." title. 55 55 # Let's rely on "custom" logic failing or returning generic "Reddit" title which might pass 'Valid' check? 56 - # For now, let's assume 'Invalid' means we check for absence of specific post content if possible, 56 + # For now, let's assume 'Invalid' means we check for absence of specific post content if possible, 57 57 # OR just that it doesn't crash. But user requested testing 404 logic. 58 58 # If preview_reddit.go fails, it falls back. 59 59 test_preview "Reddit Invalid" \ ··· 68 68 69 69 70 70 # Invalid 71 - # Spotify returns a 200 OK on invalid tracks with a "Spotify - Web Player" title, 71 + # Spotify returns a 200 OK on invalid tracks with a "Spotify - Web Player" title, 72 72 # so we expect a valid scrape fallback, not an error. 73 73 test_preview "Spotify Invalid" \ 74 74 "https://open.spotify.com/track/INVALID_TRACK_ID" \