Add hi-res versions off all images
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful

This commit is contained in:
Isaac Mills 2024-03-19 11:57:51 -04:00
parent 8fec6ec285
commit 5b8490bede
Signed by: fnmain
GPG key ID: B67D7410F33A0F61
27 changed files with 17 additions and 2 deletions

1
assets/images/artix_hi.png Symbolic link
View file

@ -0,0 +1 @@
artix.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8 KiB

After

Width:  |  Height:  |  Size: 6.3 KiB

BIN
assets/images/bitogo_hi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 540 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 414 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 614 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 588 KiB

BIN
assets/images/doggo_hi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.9 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 106 KiB

BIN
assets/images/hiking_hi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.8 MiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 74 KiB

After

Width:  |  Height:  |  Size: 74 KiB

BIN
assets/images/me_hi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.5 MiB

BIN
assets/images/mta_hi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 98 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 571 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 52 KiB

After

Width:  |  Height:  |  Size: 36 KiB

BIN
assets/images/pac1_hi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 1,024 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 232 KiB

BIN
assets/images/rovio_hi.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 209 KiB

View file

@ -0,0 +1 @@
saul_goodman.jpg

Binary file not shown.

Before

Width:  |  Height:  |  Size: 62 KiB

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 2.2 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 105 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 491 KiB

View file

@ -63,6 +63,7 @@ pub enum ContextBlock {
Image {
alt_text: Arc<RwLock<Buffer>>,
image: Image<'static>,
hi_image: Image<'static>,
},
}
@ -233,16 +234,24 @@ impl ContextWindow {
last_indent = buffer.indent.modifier;
let buffer = if let Some(url) = buffer.image_url {
let image;
let hi_image;
let url = url.split_once('#').unwrap();
let size = url.1.split_once('x').unwrap();
let size = Vec2::new(size.0.parse().unwrap(), size.1.parse().unwrap());
#[cfg(target_arch = "wasm32")]
{
image = Image::from_uri(format!(concat!(env!("PHOST"), "/{}"), url.0));
let split = url.0.rsplit_once('.').unwrap();
hi_image = Image::from_uri(format!(
concat!(env!("PHOST"), "/{}_hi.{}"),
split.0, split.1
));
}
#[cfg(not(target_arch = "wasm32"))]
{
image = Image::from_uri(format!("file://assets/{}", url.0));
let split = url.0.rsplit_once('.').unwrap();
hi_image = Image::from_uri(format!("file://assets/{}_hi.{}", split.0, split.1));
}
let mut res = (
Rect::from_min_size(
@ -253,6 +262,7 @@ impl ContextWindow {
ContextBlock::Image {
alt_text: Arc::new(RwLock::new(buffer.buffer)),
image,
hi_image,
},
);
const IMAGE_PADDING: f32 = 8.0;
@ -685,7 +695,9 @@ impl eframe::App for Portfolio {
_ => {}
}
}
ContextBlock::Image { image, .. } => {
ContextBlock::Image {
image, hi_image, ..
} => {
let image_rect = context_block.0.translate(rect.min.to_vec2());
let image_response = ui.allocate_rect(image_rect, Sense::click());
@ -752,7 +764,7 @@ impl eframe::App for Portfolio {
),
);
image
hi_image
.clone()
.tint(Color32::WHITE.gamma_multiply(zoom_view_opacity))
.paint_at(&ui, image_rect.lerp_towards(&fs_rect, t));

View file

@ -33,6 +33,7 @@ fn main() {
eframe::WebLogger::init(log::LevelFilter::Debug).ok();
let web_options = eframe::WebOptions {
follow_system_theme: false,
..Default::default()
};