Skip to content

Commit b9ade22

Browse files
committed
📄 Add Article - 2025/03/05
1 parent a05e62b commit b9ade22

File tree

8 files changed

+110
-62
lines changed

8 files changed

+110
-62
lines changed

‎.DS_Store‎

-10 KB
Binary file not shown.

‎_includes/share.html‎

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,5 @@
1-
{% if include.pageurl != nil and include.pageurl != '' %}
2-
{% assign pageurl = include.pageurl %}
3-
{% else %}
4-
{% assign pageurl = page.url %}
5-
{% endif %}
1+
{% if include.pageurl != nil and include.pageurl != '' %} {% assign pageurl =
2+
include.pageurl %} {% else %} {% assign pageurl = page.url %} {% endif %}
63
<div id="share-buttons" class="inline-flex items-center space-x-4">
74
<!-- Reddit -->
85
<div
@@ -18,7 +15,7 @@
1815
<div
1916
class="group cursor-pointer"
2017
title="Share this on Mastodon"
21-
onclick="window.open('https://mastodon.social/share?text={{ site.url }}{{ pageurl }}');"
18+
onclick="window.open('https://tootpick.org/#text={{ site.url }}{{ pageurl }}');"
2219
>
2320
<i
2421
class="fa-brands fa-mastodon text-neutral-500 group-hover:text-[#6364ff] text-lg transition duration-200"
@@ -44,6 +41,16 @@
4441
class="fa-solid fa-envelope text-neutral-500 group-hover:text-neutral-700 text-lg transition duration-200"
4542
></i>
4643
</div>
44+
<!-- Threads -->
45+
<div
46+
class="group cursor-pointer"
47+
title="Share this on Threads"
48+
onclick="window.open('https://threads.net/intent/post?text={{ site.url }}{{ pageurl }}');"
49+
>
50+
<i
51+
class="fa-brands fa-threads text-neutral-500 group-hover:text-neutral-800 text-lg transition duration-200"
52+
></i>
53+
</div>
4754
<!-- Facebook -->
4855
<div
4956
class="group cursor-pointer"

‎_layouts/default.html‎

Lines changed: 50 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,8 @@ <h2 class="text-xl dark:text-neutral-100 font-semibold mb-4">
2020
Latest Articles
2121
</h2>
2222
<div class="pb-6">
23-
{% assign displayed_posts = "" | split: "," %}
24-
{% for post in site.posts limit:1 %}
25-
{% unless displayed_posts contains post.url %}
23+
{% assign displayed_posts = "" | split: "," %} {% for post in
24+
site.posts limit:1 %} {% unless displayed_posts contains post.url %}
2625
{% assign displayed_posts = displayed_posts | push: post.url %}
2726
<a
2827
href="{{ post.url }}"
@@ -58,21 +57,21 @@ <h3 class="text-4xl dark:text-neutral-100 font-bold">
5857
<p class="text-sm text-gray-500 dark:text-neutral-300">
5958
{{ post.date | date: "%B %d, %Y" }} &bull;
6059
<span class="read-time" title="Estimated read time">
61-
{% assign words = post.content | strip_html | number_of_words %}
62-
{{ words | divided_by: 200 | plus: 1 }} min read
60+
{% assign words = post.content | strip_html |
61+
number_of_words %} {{ words | divided_by: 200 | plus: 1 }}
62+
min read
6363
</span>
6464
</p>
6565
</div>
6666
</div>
6767
</div>
6868
</a>
69-
{% endunless %}
70-
{% endfor %}
69+
{% endunless %} {% endfor %}
7170
</div>
7271
<div class="grid grid-cols-1 md:grid-cols-2 lg:grid-cols-3 gap-6">
73-
{% for post in site.posts offset:1 limit:3 %}
74-
{% unless displayed_posts contains post.url %}
75-
{% assign displayed_posts = displayed_posts | push: post.url %}
72+
{% for post in site.posts offset:1 limit:3 %} {% unless
73+
displayed_posts contains post.url %} {% assign displayed_posts =
74+
displayed_posts | push: post.url %}
7675
<a
7776
href="{{ post.url }}"
7877
class="rounded-xl hover:bg-neutral-100 dark:hover:bg-neutral-700 p-4 flex flex-col space-y-2"
@@ -98,8 +97,7 @@ <h3 class="text-xl dark:text-neutral-100 font-bold">
9897
{{ post.excerpt | strip_html }}
9998
</p>
10099
</a>
101-
{% endunless %}
102-
{% endfor %}
100+
{% endunless %} {% endfor %}
103101
</div>
104102
</section>
105103

@@ -108,53 +106,51 @@ <h2 class="text-xl dark:text-neutral-100 font-semibold mb-4">
108106
Read More
109107
</h2>
110108
<div id="post-container" class="gap-6">
111-
{% assign displayed_posts = displayed_posts | uniq %}
112-
{% for post in site.posts offset:4 %}
113-
{% unless displayed_posts contains post.url %}
109+
{% assign displayed_posts = displayed_posts | uniq %} {% for post in
110+
site.posts offset:4 %} {% unless displayed_posts contains post.url %}
114111
{% assign displayed_posts = displayed_posts | push: post.url %}
115112
<a
116-
href="{{ post.url }}"
117-
class="rounded-xl hover:bg-neutral-100 dark:hover:bg-neutral-700 p-4 flex flex-col-2"
118-
>
119-
<img
120-
src="{{ post.image }}"
121-
alt="{{ post.title }}"
122-
class="w-1/3 h-1/3 mr-4 rounded-lg"
123-
/>
124-
<div class="content-center space-y-2">
125-
<h3 class="text-4xl dark:text-neutral-100 font-bold">
126-
{{ post.title }}
127-
</h3>
128-
<div class="flex flex-wrap gap-2 py-2">
129-
{% for label in post.label %}
130-
<p
131-
class="text-sm bg-amber-400 text-amber-400 bg-opacity-10 px-2 py-1 rounded-lg"
132-
>
133-
#{{ label }}
134-
</p>
135-
{% endfor %}
136-
</div>
137-
<p class="text-sm dark:text-neutral-100">
138-
{{ post.excerpt | strip_html }}
139-
</p>
140-
<div class="flex items-center dark:text-neutral-100">
141-
{% include avatar.html %}
142-
<div>
143-
<p class="text-sm dark:text-neutral-300">{{ post.author }}</p>
144-
<p class="text-sm text-gray-500 dark:text-neutral-300">
145-
{{ post.date | date: "%B %d, %Y" }} &bull;
146-
<span class="read-time" title="Estimated read time">
147-
{% assign words = post.content | strip_html |
148-
number_of_words %} {{ words | divided_by: 200 | plus: 1 }}
149-
min read
150-
</span>
113+
href="{{ post.url }}"
114+
class="rounded-xl hover:bg-neutral-100 dark:hover:bg-neutral-700 p-4 flex flex-col sm:flex-row"
115+
>
116+
<img
117+
src="{{ post.image }}"
118+
alt="{{ post.title }}"
119+
class="sm:w-1/3 sm:h-1/3 sm:mr-4 mb-4 rounded-lg"
120+
/>
121+
<div class="content-center space-y-2">
122+
<h3 class="text-4xl dark:text-neutral-100 font-bold">
123+
{{ post.title }}
124+
</h3>
125+
<div class="flex flex-wrap gap-2 py-2">
126+
{% for label in post.label %}
127+
<p
128+
class="text-sm bg-amber-400 text-amber-400 bg-opacity-10 px-2 py-1 rounded-lg"
129+
>
130+
#{{ label }}
151131
</p>
132+
{% endfor %}
133+
</div>
134+
<p class="text-sm dark:text-neutral-100">
135+
{{ post.excerpt | strip_html }}
136+
</p>
137+
<div class="flex items-center dark:text-neutral-100">
138+
{% include avatar.html %}
139+
<div>
140+
<p class="text-sm dark:text-neutral-300">{{ post.author }}</p>
141+
<p class="text-sm text-gray-500 dark:text-neutral-300">
142+
{{ post.date | date: "%B %d, %Y" }} &bull;
143+
<span class="read-time" title="Estimated read time">
144+
{% assign words = post.content | strip_html |
145+
number_of_words %} {{ words | divided_by: 200 | plus: 1 }}
146+
min read
147+
</span>
148+
</p>
149+
</div>
152150
</div>
153151
</div>
154-
</div>
155-
</a>
156-
{% endunless %}
157-
{% endfor %}
152+
</a>
153+
{% endunless %} {% endfor %}
158154
</div>
159155
</section>
160156
</main>

‎_layouts/post.html‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
{% include nav.html %}
5959
<main class="mt-8 max-w-3xl mx-auto relative px-4 lg:px-0">
6060
<article>
61-
<header class="mb-8 space-y-2">
61+
<header class="mb-4 space-y-2">
6262
<img
6363
src="{{ site.baseurl }}/{{ page.image }}"
6464
alt="{{ page.title }}"
@@ -95,7 +95,7 @@ <h1 class="text-4xl dark:text-neutral-100 font-bold">
9595
</div>
9696
</div>
9797

98-
<div class="flex justify-end">{% include share.html %}</div>
98+
<div class="flex sm:justify-end justify-center pt-4">{% include share.html %}</div>
9999
</div>
100100
</header>
101101

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
---
2+
layout: post
3+
title: "Spring Forward"
4+
date: 2025-03-05
5+
author: "Daniele Rolli"
6+
github: Daniele-rolli
7+
label:
8+
- Community
9+
image: assets/img/2025/2025-03-05.png
10+
excerpt_separator: <!--more-->
11+
---
12+
13+
It's finally March, and that means a new *monthly* report on the state of Beaver.<!--more--> This past month, we’ve been working on a lot, from Beaver Notes 3.9.0 to getting Beaver Pocket ready for release. It’s been a busy month, and the coming one will be even busier. So, let's dive straight in.
14+
15+
# There's a new drawing block in town
16+
17+
Since the [last article]({% post_url 2025-02-15-The final puzzle piece %}), we have been working on a new drawing component that replaces [*d3.js*](https://github.com/d3/d3) with [perfect-freehand](https://github.com/steveruizok/perfect-freehand), so now we’re not using a hammer to screw in a screw anymore.
18+
19+
Perfect-freehand is the underlying technology behind projects like [TLDRAW](https://github.com/tldraw/tldraw), which showcases just how powerful and flexible this library is. *Why not TLDRAW, then?* We initially considered using it, but since it's a React component, it wouldn’t integrate well with the desktop app, which is built in Vue. Additionally, Perfect-freehand allows for more flexibility on both the UI and logic sides.
20+
21+
That said, we did take inspiration from TLDRAW to improve our own component. For example, each stroke is now rendered as its own SVG. This improves performance and allows for direct manipulation, which brings us to the *lasso tool*, which lets you resize and move items.
22+
23+
The component is obviously not complete, as it’s still missing features like zooming in and pasting images. Nor is it perfect, but it lays the foundation to start porting it to the desktop version of *Beaver*. The old *d3.js*-based drawing component will remain for existing notes but won’t be available for new ones.
24+
25+
# Snapshots aren't always the answer
26+
27+
I've been testing sync on both the mobile app and desktop versions more frequently as we approach the stable release of Pocket. Come to think of it, our current snapshot-based sync model may not be ideal in terms of space and speed.
28+
29+
So, I started tinkering with Beaver Notes' sync method and implemented a `trackChange` function that increments the local version, stores changes with a unique ID, updates metadata, and schedules a sync if one is not already in progress. This means that only the files that have changed or are new are uploaded or downloaded, rather than the entire directory being re-uploaded every time.
30+
31+
Frankly, now I'm happier with how Beaver handles sync. Now comes the hard part, though, we need to implement the same thing in Pocket, which means porting `trackChange`, making sure it invokes the selected cloud provider, and then rewriting each cloud implementation to compare the `metadata.json` and upload/download only the files that have changed.
32+
33+
# The phone-shaped elephant in the room
34+
35+
*...so when is Pocket coming?* Well, great question. As things stand, Pocket will start its last release candidate on both the Play Store and TestFlight as soon as the new sync method is ported to it and the new drawing component is ported to the desktop app. This means it's a matter of weeks, not days, unfortunately. But as I've always stated before, it's better to not release anything rather than release a half-baked product. This doesn’t mean bugs won’t be there, but it does mean key features will work and users will be able to use the app without any major issues.
36+
37+
# Ending on a positive note
38+
39+
The road ahead is bumpy, and the finish line is far, but we will get there. The important thing is, Beaver is not going anywhere, and although some days it might seem like nothing is being done backstage, there's always someone coding away, even if their work is not showing on GitHub.
40+
41+
*...you might be asking what you can do to help?* Well, there’s a lot, actually! Of course, donations are welcome, but if you are able to code, contributions, feedback, translations, and even help with the docs and blog are always needed. Check out our [Get Involved](https://docs.beavernotes.com/beaver%20notes%20(dev)/2025/01/03/How-to-contribute.html) page to learn more.
42+
43+
# Thank You 💖
44+
45+
As always, my thanks go to all our users, contributors, and donors for making Beaver possible, and thanks for being part of this amazing community. Hope you enjoyed the article!

‎assets/.DS_Store‎

-6 KB
Binary file not shown.

‎assets/img/.DS_Store‎

-6 KB
Binary file not shown.
84.1 KB
Loading

0 commit comments

Comments
 (0)