Skip to content

Commit

Permalink
feat: added images to Organization pages
Browse files Browse the repository at this point in the history
  • Loading branch information
MatheaGjerde committed Mar 24, 2026
1 parent 33484e3 commit 5db4ec6
Showing 1 changed file with 15 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,17 +63,21 @@ private StackPane createImageContainer() {
imageContainer.setMaxWidth(Double.MAX_VALUE);

Organization org = mainController.getCurrentOrganization();
String imagePath = org != null ? "/browsepage/images/children_of_shambala.png" : "/browsepage/images/children_of_shambala.png";

ImageView logo = new ImageView(
new Image(getClass().getResource(imagePath).toExternalForm())
);

logo.setId("logo");
logo.setSmooth(true);
logo.setPreserveRatio(true);

imageContainer.getChildren().add(logo);
if (org != null && org.logoUrl() != null && !org.logoUrl().isBlank()) {
ImageView logo = new ImageView(new Image(org.logoUrl(), true));
logo.setId("logo");
logo.setSmooth(true);
logo.setPreserveRatio(true);
imageContainer.getChildren().add(logo);
} else {
StackPane placeholder = new StackPane();

Text text = new Text("No image");
text.setStyle("-fx-font-size: 10;");

placeholder.getChildren().add(text);
imageContainer.getChildren().add(placeholder);
}
return imageContainer;
}

Expand Down

0 comments on commit 5db4ec6

Please sign in to comment.