jekyll-bluesky 0.19.0 → 0.21.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 3c5b3f484918d660520da321ca09b220497ced696841a9e0cafe216f22725047
4
- data.tar.gz: faf7bb2fbd96b20fbba64ee28addccc2f0cc35683098e44931901ed2ff85ee65
3
+ metadata.gz: 2f87a26c51b1e9a33e070fd362b2aa4295b10a58f6b68008273d8dd307d171eb
4
+ data.tar.gz: fef8b54d1214625c01ad749533510d7749ba43f06cbd6d04f0b95689d594c576
5
5
  SHA512:
6
- metadata.gz: 83310e7a345a7b0204048ce5a368822bc3b2f682215e8307af46207b018f7883a8ae8d5b1ce2207aebdba4527ca9acb26e63e07d0855923a6fa9d8600477a57d
7
- data.tar.gz: a3e76e9f49623d7d452637e0d356095b4568313a532b48eb028c21cf317820196605ee02ff2a198ad3964ee4e10c5a8794a4979a954e933e0a8390996992f3af
6
+ metadata.gz: 2aa58193ff5a0b119df71d48d2599724a1850a7f6adb4cc6993db2006352597cee8a1ad7cb3ada2c8e3d1b8b1279692753785184bc987f934fb201c064cdf561
7
+ data.tar.gz: f6531b202ab8312566a3562135c68a7b27bcc2f519f798b5d13c257c54c1366bec9a32d4f5a965ff141935dac3d133d91ed7797dae7f6ea48b16f1b9077a1a33
@@ -1,6 +1,6 @@
1
1
  # lib/jekyll-bluesky/version.rb
2
2
  module Jekyll
3
3
  module Bluesky
4
- VERSION = '0.19.0'
4
+ VERSION = '0.21.0'
5
5
  end
6
6
  end
@@ -3,7 +3,7 @@
3
3
  require 'http'
4
4
  require 'json'
5
5
  require 'digest'
6
- require 'fileutils' # Needed for FileCache
6
+ require 'fileutils'
7
7
 
8
8
  puts 'Plugin jekyll-bluesky load successfully!'
9
9
 
@@ -64,7 +64,66 @@
64
64
 
65
65
  def self.format_post(data)
66
66
  posts = data['feed']
67
- posts.map do |post|
67
+ styles = <<~HTML
68
+ <style>
69
+ @font-face {
70
+ font-family: 'InterVariable';
71
+ src: url("https://web-cdn.bsky.app/static/media/InterVariable.c504db5c06caaf7cdfba.woff2") format('woff2');
72
+ font-weight: 300 1000;
73
+ font-style: normal;
74
+ font-display: swap;
75
+ }
76
+ .bluesky-post {
77
+ border-bottom: 1px solid #e1e8ed;
78
+ padding: 12px;
79
+ width: 500px;
80
+ font-family: 'InterVariable', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Liberation Sans', Helvetica, Arial, sans-serif;
81
+ background: #fff;
82
+ margin-bottom: 10px;
83
+ }
84
+ .bluesky-header {
85
+ display: flex;
86
+ align-items: center;
87
+ justify-content: flex-start; /* Alinha tudo à esquerda */
88
+ gap: 8px; /* Espaço entre a foto e o nome */
89
+ }
90
+ .bluesky-avatar {
91
+ width: 40px;
92
+ height: 40px;
93
+ border-radius: 50%;
94
+ }
95
+ .bluesky-author-info {
96
+ display: flex;
97
+ flex-direction: column;
98
+ }
99
+ .author-name {
100
+ font-weight: bold;
101
+ font-size: 14px;
102
+ color: #000;
103
+ }
104
+ .author-handle {
105
+ font-size: 12px;
106
+ color: #657786;
107
+ }
108
+ .bluesky-content {
109
+ font-size: 14px;
110
+ line-height: 1.5;
111
+ color: #14171A;
112
+ }
113
+ .bluesky-footer {
114
+ display: flex;
115
+ justify-content: space-between;
116
+ font-size: 12px;
117
+ color: #657786;
118
+ margin-top: 10px;
119
+ }
120
+ .icon {
121
+ cursor: pointer;
122
+ }
123
+ </style>
124
+ HTML
125
+
126
+ formatted_posts = posts.map do |post|
68
127
  post_data = post['post']
69
128
  author = post_data['author']
70
129
  record = post_data['record']
@@ -73,7 +132,7 @@
73
132
  text = record['text'].gsub("\n", "<br>")
74
133
  author_name = author['displayName']
75
134
  author_handle = author['handle']
76
- post_time = "3h" # Estático por enquanto
135
+ post_time = "3h"
77
136
 
78
137
  image_html = ''
79
138
  if embed && embed['$type'] == 'app.bsky.embed.images#view'
@@ -106,10 +165,10 @@
106
165
  </div>
107
166
  HTML
108
167
  end.join("\n")
168
+
169
+ styles + formatted_posts
109
170
  end
110
171
 
111
- end
112
-
113
172
  class FileCache
114
173
  def initialize(path)
115
174
  @cache_folder = File.expand_path path
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-bluesky
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.19.0
4
+ version: 0.21.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Felipe Dias