Skip to content

Commit d445bff

Browse files
committed
Add donation callouts in-app and on the site
1 parent 2dee47a commit d445bff

File tree

11 files changed

+68
-21
lines changed

11 files changed

+68
-21
lines changed

editor/src/messages/dialog/simple_dialogs/about_graphite_dialog.rs

+2-1
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,9 @@ impl DialogLayoutHolder for AboutGraphiteDialog {
2020

2121
fn layout_column_2(&self) -> Layout {
2222
let links = [
23-
("Website", "Website", "https://graphite.rs"),
23+
("Heart", "Donate", "https://graphite.rs/donate/"),
2424
("Volunteer", "Volunteer", "https://graphite.rs/volunteer/"),
25+
("GraphiteLogo", "Website", "https://graphite.rs"),
2526
("Credits", "Credits", "https://github.com/GraphiteEditor/Graphite/graphs/contributors"),
2627
];
2728
let mut widgets = links

editor/src/messages/portfolio/menu_bar/menu_bar_message_handler.rs

+22-11
Original file line numberDiff line numberDiff line change
@@ -585,18 +585,29 @@ impl LayoutHolder for MenuBarMessageHandler {
585585
action: MenuBarEntry::create_action(|_| DialogMessage::RequestAboutGraphiteDialog.into()),
586586
..MenuBarEntry::default()
587587
}],
588-
vec![MenuBarEntry {
589-
label: "User Manual".into(),
590-
icon: Some("UserManual".into()),
591-
action: MenuBarEntry::create_action(|_| {
592-
FrontendMessage::TriggerVisitLink {
593-
url: "https://graphite.rs/learn/".into(),
594-
}
595-
.into()
596-
}),
597-
..MenuBarEntry::default()
598-
}],
599588
vec![
589+
MenuBarEntry {
590+
label: "Donate to Graphite".into(),
591+
icon: Some("Heart".into()),
592+
action: MenuBarEntry::create_action(|_| {
593+
FrontendMessage::TriggerVisitLink {
594+
url: "https://graphite.rs/donate/".into(),
595+
}
596+
.into()
597+
}),
598+
..MenuBarEntry::default()
599+
},
600+
MenuBarEntry {
601+
label: "User Manual".into(),
602+
icon: Some("UserManual".into()),
603+
action: MenuBarEntry::create_action(|_| {
604+
FrontendMessage::TriggerVisitLink {
605+
url: "https://graphite.rs/learn/".into(),
606+
}
607+
.into()
608+
}),
609+
..MenuBarEntry::default()
610+
},
600611
MenuBarEntry {
601612
label: "Report a Bug".into(),
602613
icon: Some("Bug".into()),
Loading

frontend/src/components/window/workspace/Panel.svelte

+5
Original file line numberDiff line numberDiff line change
@@ -172,6 +172,11 @@
172172
<TextButton label="Open Demo Artwork" icon="Image" flush={true} action={() => editor.handle.demoArtworkDialog()} />
173173
</td>
174174
</tr>
175+
<tr>
176+
<td colspan="2">
177+
<TextButton label="Support the Development Fund" icon="Heart" flush={true} action={() => editor.handle.visitUrl("https://graphite.rs/donate/")} />
178+
</td>
179+
</tr>
175180
</table>
176181
</LayoutRow>
177182
</LayoutCol>

frontend/src/utility-functions/icons.ts

+2
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,7 @@ import GraphiteLogo from "@graphite-frontend/assets/icon-16px-solid/graphite-log
137137
import HandleVisibilityAll from "@graphite-frontend/assets/icon-16px-solid/handle-visibility-all.svg";
138138
import HandleVisibilityFrontier from "@graphite-frontend/assets/icon-16px-solid/handle-visibility-frontier.svg";
139139
import HandleVisibilitySelected from "@graphite-frontend/assets/icon-16px-solid/handle-visibility-selected.svg";
140+
import Heart from "@graphite-frontend/assets/icon-16px-solid/heart.svg";
140141
import HistoryRedo from "@graphite-frontend/assets/icon-16px-solid/history-redo.svg";
141142
import HistoryUndo from "@graphite-frontend/assets/icon-16px-solid/history-undo.svg";
142143
import IconsGrid from "@graphite-frontend/assets/icon-16px-solid/icons-grid.svg";
@@ -257,6 +258,7 @@ const SOLID_16PX = {
257258
HandleVisibilityAll: { svg: HandleVisibilityAll, size: 16 },
258259
HandleVisibilityFrontier: { svg: HandleVisibilityFrontier, size: 16 },
259260
HandleVisibilitySelected: { svg: HandleVisibilitySelected, size: 16 },
261+
Heart: { svg: Heart, size: 16 },
260262
HistoryRedo: { svg: HistoryRedo, size: 16 },
261263
HistoryUndo: { svg: HistoryUndo, size: 16 },
262264
IconsGrid: { svg: IconsGrid, size: 16 },

frontend/wasm/src/editor_api.rs

+7
Original file line numberDiff line numberDiff line change
@@ -490,6 +490,13 @@ impl EditorHandle {
490490
Ok(())
491491
}
492492

493+
/// Visit the given URL
494+
#[wasm_bindgen(js_name = visitUrl)]
495+
pub fn visit_url(&self, url: String) {
496+
let message = FrontendMessage::TriggerVisitLink { url };
497+
self.dispatch(message);
498+
}
499+
493500
/// Paste layers from a serialized json representation
494501
#[wasm_bindgen(js_name = pasteSerializedData)]
495502
pub fn paste_serialized_data(&self, data: String) {

website/content/donate.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -8,11 +8,9 @@ css = ["/page/donate.css", "/component/feature-box.css"]
88
<section>
99
<div class="block">
1010

11-
# Support Graphite
11+
# Funding creativity, not corporations
1212

13-
**Safeguard the sustainable, independent future of quality open source creative software.**
14-
15-
Graphite is 100% built and funded by the community. Your contributions directly help us level up the scope and speed of the project's development. Resources are put towards infrastructure, legal costs, swag to keep contributors happy and motivated, and outreach like exhibiting at conventions and traveling to conferences to foster industry relationships. Hiring full-time developers is the big next step as support grows.
13+
**Own your tools. Own your art.** Invest in the sustainable, independent future of high-quality creative software that's free, and always will be.
1614

1715
<p class="call-to-action">
1816

@@ -23,11 +21,13 @@ Graphite is 100% built and funded by the community. Your contributions directly
2321

2422
<span>
2523
<a href="#supporter-memberships" class="button arrow">Donate: without an account</a>
26-
<em>Be done in just a few clicks</em>
24+
<em>Start to finish in several seconds</em>
2725
</span>
2826

2927
</p>
3028

29+
Graphite is 100% built and funded by the community. Your contributions directly help us level up the scope and speed of the project's development. Resources are put towards infrastructure, operational costs, swag to keep contributors happy and motivated, and outreach like exhibiting at conventions and traveling to conferences to foster industry relationships. Hiring full-time developers is the next crucial milestone.
30+
3131
</div>
3232
</section>
3333

website/content/features.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ css = ["/page/features.css", "/component/feature-box.css", "/component/feature-i
1010

1111
# Graphite features
1212

13-
The current alpha version of Graphite is a tool for vector art and graphic design. It also supports a limited, experimental raster editing toolset. All this is built around a central node graph that stores layer data and provides a basic—but continually improving—procedural design and nondestructive editing workflow which is a unique feature among vector editing software.
13+
The current alpha version of Graphite is a tool for vector art and graphic design. It also supports a limited, experimental raster editing toolset. This tooling is built around a procedural graphics engine, letting artists build complex graphics and animations in its visual scripting language.
1414

15-
Throughout 2025, stay tuned for major performance improvements, a multiplatform desktop app with native rendering speed, and the beginnings of a full suite of raster editing tools.
15+
In 2025, stay tuned for performance improvements, native multiplatform desktop apps, and the beginnings of a full raster editing tool suite.
1616

1717
</div>
1818
</section>

website/content/volunteer/_index.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ css = ["/page/volunteer.css", "/component/feature-box.css"]
88
<section>
99
<div class="block">
1010

11-
# Volunteer
11+
# Get involved
1212

1313
**Graphite is 100% built by volunteers.** Get involved in the effort to bring great, free creative software to the world.
1414

website/sass/base.scss

+18
Original file line numberDiff line numberDiff line change
@@ -148,6 +148,24 @@ body > .page {
148148
font-size: 0;
149149
}
150150

151+
.heart.heart {
152+
// The same color is also used below in the SVG after the `%23` (URL-encoded `#`)
153+
color: #cc304f;
154+
155+
&::after {
156+
content: "";
157+
background-image: url('data:image/svg+xml;utf8,\
158+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16"><path d="M8,15C5.12471,9.753694 0.5,8.795225 0.5,4.736524 C0.5,-0.507473 7.468734,0 8,4.967381 C8.531266,0 15.5,-0.507473 15.5,4.736524 C15.5,8.795225 10.87529,9.753694 8,15z" fill="%23cc304f" /></svg>\
159+
');
160+
display: inline-block;
161+
width: 0.75em;
162+
height: 0.75em;
163+
margin-left: 0.25em;
164+
margin-bottom: -0.1em;
165+
vertical-align: baseline;
166+
}
167+
}
168+
151169
@media screen and (max-width: 1200px) {
152170
gap: 30px;
153171
--height: 50px;

website/templates/base.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@
107107
<a href="/about">About</a>
108108
<a href="/blog">Blog</a>
109109
<a href="/volunteer">Volunteer</a>
110-
<a href="/donate">Donate</a>
110+
<a href="/donate" class="heart">Donate</a>
111111
<a href="https://editor.graphite.rs" class="button arrow">Launch</a>
112112
</div>
113113
</div>

0 commit comments

Comments
 (0)