Skip to content

Commit

Permalink
Added organizationCard.fxml
Browse files Browse the repository at this point in the history
  • Loading branch information
robinsp committed Mar 11, 2026
1 parent d5c7fd5 commit bad4e34
Show file tree
Hide file tree
Showing 3 changed files with 48 additions and 70 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
package ntnu.systemutvikling.team6.controller;

public class FrontpageController {
}
75 changes: 5 additions & 70 deletions helpmehelpapplication/src/main/resources/fxml/frontPage.fxml
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,12 @@
<?import javafx.scene.control.CheckBox?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.ScrollPane?>
<?import javafx.scene.control.Separator?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.effect.Blend?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.FlowPane?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
Expand All @@ -21,7 +21,7 @@
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>

<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="900.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1">
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="900.0" prefWidth="1000.0" xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ntnu.sytemutvikling.team6.controller.FrontpageController">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
Expand Down Expand Up @@ -285,78 +285,13 @@
</CheckBox>
</children>
</VBox>
<ScrollPane fitToWidth="true" prefWidth="900.0">
<ScrollPane fitToWidth="true" prefWidth="900.0" HBox.hgrow="ALWAYS">
<content>
<GridPane hgap="20.0" vgap="20.0">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
<rowConstraints>
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
<RowConstraints minHeight="10.0" prefHeight="30.0" vgrow="SOMETIMES" />
</rowConstraints>
<FlowPane fx:id="cardsConatainer" hgap="20.0" prefHeight="200.0" prefWidth="200.0" vgap="20.0">
<padding>
<Insets bottom="20.0" left="20.0" right="20.0" top="20.0" />
</padding>
<children>
<VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1">
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" />
<Separator prefWidth="200.0" />
<Label text="Title" />
<Label text="Description" />
<HBox prefHeight="100.0" prefWidth="200.0" />
</children>
</VBox>
<VBox prefHeight="200.0" prefWidth="100.0">
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" />
<Separator prefWidth="200.0" />
<Label text="Title" />
<Label text="Description" />
<HBox prefHeight="100.0" prefWidth="200.0" />
</children>
</VBox>
<VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="1">
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" />
<Separator prefWidth="200.0" />
<Label text="Title" />
<Label text="Description" />
<HBox prefHeight="100.0" prefWidth="200.0" />
</children>
</VBox>
<VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="1">
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" />
<Separator prefWidth="200.0" />
<Label text="Title" />
<Label text="Description" />
<HBox prefHeight="100.0" prefWidth="200.0" />
</children>
</VBox>
<VBox prefHeight="200.0" prefWidth="100.0" GridPane.rowIndex="2">
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" />
<Separator prefWidth="200.0" />
<Label text="Title" />
<Label text="Description" />
<HBox prefHeight="100.0" prefWidth="200.0" />
</children>
</VBox>
<VBox prefHeight="200.0" prefWidth="100.0" GridPane.columnIndex="1" GridPane.rowIndex="2">
<children>
<ImageView fitHeight="150.0" fitWidth="200.0" pickOnBounds="true" preserveRatio="true" />
<Separator prefWidth="200.0" />
<Label text="Title" />
<Label text="Description" />
<HBox prefHeight="100.0" prefWidth="200.0" />
</children>
</VBox>
</children>
</GridPane>
</FlowPane>
</content>
</ScrollPane>
</children>
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.Region?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.text.Font?>


<VBox maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="240.0" prefWidth="380.0" spacing="12.0" style="-fx-background-color: white; -fx-background-radius: 20; -fx-border-radius: 20; -fx-border-color: #3b82f6; -fx-border-width: 2;" xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1">
<padding>
<Insets bottom="12.0" left="12.0" right="12.0" top="12.0" />
</padding>
<children>
<HBox prefHeight="100.0" prefWidth="200.0" spacing="10.0">
<children>
<ImageView fitHeight="60.0" fitWidth="60.0" pickOnBounds="true" preserveRatio="true" />
<Region prefHeight="200.0" prefWidth="200.0" HBox.hgrow="ALWAYS" />
<Label style="-fx-background-color: #cdedcf; -fx-background-radius: 12; -fx-padding: 4 10 4 10; -fx-text-fill: #2e7d32; -fx-font-size: 12;" text="Verified" />
</children>
</HBox>
<Label text="Organization name">
<font>
<Font name="System Bold" size="26.0" />
</font>
</Label>
<Label prefWidth="300.0" text="Some interesting information about the organization" wrapText="true" />
<Region prefHeight="200.0" prefWidth="200.0" VBox.vgrow="ALWAYS" />
<HBox alignment="CENTER_LEFT" prefHeight="100.0" prefWidth="200.0" spacing="12.0">
<children>
<Button mnemonicParsing="false" prefWidth="110.0" style="-fx-background-color: #2e7d32; -fx-background-radius: 16; -fx-text-fill: white; -fx-font-weight: bold;" text="Donate" />
<Button mnemonicParsing="false" prefWidth="110.0" style="-fx-background-color: #2563eb; -fx-background-radius: 16; -fx-text-fill: white; -fx-font-weight: bold;" text="View details" />
</children>
</HBox>
</children>
</VBox>

0 comments on commit bad4e34

Please sign in to comment.