Skip to content

Commit

Permalink
feat: charityPage scene builder
Browse files Browse the repository at this point in the history
  • Loading branch information
cathrkri committed Mar 11, 2026
1 parent c8f7157 commit 0801337
Show file tree
Hide file tree
Showing 2 changed files with 308 additions and 23 deletions.
304 changes: 298 additions & 6 deletions helpmehelpapplication/src/main/resources/fxml/charityPage.fxml
Original file line number Diff line number Diff line change
@@ -1,10 +1,302 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.scene.layout.*?>
<?import javafx.geometry.Insets?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.control.Button?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>

<GridPane hgap="0.0"
prefHeight="900.0"
prefWidth="1200.0"
vgap="0.0"
xmlns="http://javafx.com/javafx/17.0.12"
xmlns:fx="http://javafx.com/fxml/1"
fx:controller="ntnu.systemutvikling.team6.controller.CharityPageController">

<BorderPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="1509.0" prefWidth="1440.0" xmlns="http://javafx.com/javafx/17.0.12" xmlns:fx="http://javafx.com/fxml/1">
<top>
<HBox prefHeight="80.0" prefWidth="586.0" style="-fx-background-color: #2F8F8B;" BorderPane.alignment="CENTER" />
</top>
</BorderPane>
<columnConstraints>
<ColumnConstraints percentWidth="100.0" />
</columnConstraints>

<rowConstraints>
<RowConstraints prefHeight="92.0" />
<RowConstraints vgrow="ALWAYS" />
<RowConstraints prefHeight="180.0" />
</rowConstraints>

<children>

<!-- NAVBAR -->
<GridPane prefHeight="92.0"
prefWidth="1200.0"
style="-fx-background-color: #5F9895;"
GridPane.columnIndex="0"
GridPane.rowIndex="0">

<padding>
<Insets top="10.0" right="20.0" bottom="10.0" left="20.0" />
</padding>

<columnConstraints>
<ColumnConstraints percentWidth="8.0" />
<ColumnConstraints percentWidth="24.0" />
<ColumnConstraints percentWidth="43.0" />
<ColumnConstraints percentWidth="25.0" />
</columnConstraints>

<rowConstraints>
<RowConstraints prefHeight="72.0" />
</rowConstraints>

<children>

<ImageView fitHeight="58.0"
fitWidth="58.0"
pickOnBounds="true"
preserveRatio="true"
GridPane.columnIndex="0"
GridPane.rowIndex="0">
<image>
<Image url="@../images/Logo.png" />
</image>
<cursor>
<Cursor fx:constant="HAND" />
</cursor>
</ImageView>

<HBox alignment="CENTER_LEFT"
spacing="0.0"
GridPane.columnIndex="1"
GridPane.rowIndex="0">
<children>
<Label text="Help" textFill="WHITE">
<font>
<Font name="System Bold" size="28.0" />
</font>
</Label>

<Label text="Me" textFill="#C8E6C9">
<font>
<Font name="System Bold" size="28.0" />
</font>
</Label>

<Label text="Help" textFill="WHITE">
<font>
<Font name="System Bold" size="28.0" />
</font>
</Label>
</children>
</HBox>

<HBox alignment="CENTER"
GridPane.columnIndex="2"
GridPane.rowIndex="0">
<children>
<TextField promptText="Search"
prefHeight="48.0"
prefWidth="430.0"
maxWidth="430.0"
style="-fx-background-radius: 24; -fx-border-radius: 24; -fx-font-size: 16px; -fx-padding: 0 0 0 16;" />
</children>
</HBox>

<HBox alignment="CENTER_RIGHT"
GridPane.columnIndex="3"
GridPane.rowIndex="0">
<children>
<Button text="Login"
prefHeight="48.0"
prefWidth="180.0"
style="-fx-background-color: #4453D9; -fx-background-radius: 24; -fx-text-fill: white; -fx-font-size: 16px; -fx-font-weight: bold;">
<cursor>
<Cursor fx:constant="HAND" />
</cursor>
</Button>
</children>
</HBox>

</children>
</GridPane>

<!-- MAIN CONTENT -->
<GridPane prefHeight="628.0"
prefWidth="1200.0"
style="-fx-background-color: white;"
GridPane.columnIndex="0"
GridPane.rowIndex="1">

<columnConstraints>
<ColumnConstraints percentWidth="25.0" />
<ColumnConstraints percentWidth="75.0" />
</columnConstraints>

<rowConstraints>
<RowConstraints vgrow="ALWAYS" />
</rowConstraints>

<children>

<GridPane prefWidth="300.0"
style="-fx-background-color: #F5F5F5;"
GridPane.columnIndex="0"
GridPane.rowIndex="0" />

<GridPane prefWidth="900.0"
style="-fx-background-color: #FFFFFF;"
GridPane.columnIndex="1"
GridPane.rowIndex="0" />

</children>
</GridPane>

<!-- FOOTER -->
<HBox alignment="BOTTOM_CENTER"
prefHeight="180.0"
prefWidth="1200.0"
style="-fx-background-color: #5F9895;"
GridPane.columnIndex="0"
GridPane.rowIndex="2">

<children>
<GridPane HBox.hgrow="ALWAYS"
prefHeight="180.0"
prefWidth="1200.0">

<columnConstraints>
<ColumnConstraints percentWidth="60.0" />
<ColumnConstraints percentWidth="40.0" />
</columnConstraints>

<rowConstraints>
<RowConstraints prefHeight="180.0" />
</rowConstraints>

<children>

<!-- LEFT FOOTER SIDE -->
<StackPane prefHeight="180.0"
prefWidth="720.0"
GridPane.columnIndex="0"
GridPane.rowIndex="0">

<children>

<HBox alignment="CENTER_LEFT"
spacing="0.0"
translateX="60.0">
<children>
<Label text="Help" textFill="WHITE">
<font>
<Font name="System Bold" size="36.0" />
</font>
</Label>

<Label text="Me" textFill="#C8E6C9">
<font>
<Font name="System Bold" size="36.0" />
</font>
</Label>

<Label text="Help" textFill="WHITE">
<font>
<Font name="System Bold" size="36.0" />
</font>
</Label>
</children>
</HBox>

<Rectangle fill="WHITE"
height="90.0"
width="2.0"
translateX="-20.0" />

<VBox alignment="CENTER"
spacing="5.0"
translateX="120.0">
<children>
<Label text="About us" textFill="WHITE">
<font>
<Font name="System Bold" size="18.0" />
</font>
<cursor>
<Cursor fx:constant="HAND" />
</cursor>
</Label>

<Label text="Something else" textFill="WHITE">
<font>
<Font name="System Bold" size="18.0" />
</font>
<cursor>
<Cursor fx:constant="HAND" />
</cursor>
</Label>

<Label text="Third Link" textFill="WHITE">
<font>
<Font name="System Bold" size="18.0" />
</font>
<cursor>
<Cursor fx:constant="HAND" />
</cursor>
</Label>
</children>
</VBox>

</children>
</StackPane>

<!-- RIGHT FOOTER SIDE -->
<StackPane alignment="CENTER"
prefHeight="180.0"
prefWidth="480.0"
GridPane.columnIndex="1"
GridPane.rowIndex="0">

<children>

<VBox alignment="CENTER"
spacing="10.0">
<children>
<ImageView fitHeight="80.0"
fitWidth="150.0"
pickOnBounds="true"
preserveRatio="true">
<image>
<Image url="@../images/img.png" />
</image>
</ImageView>

<Label maxWidth="250.0"
text="All data is consistently updated and reverified"
textAlignment="CENTER"
textFill="WHITE"
wrapText="true">
<font>
<Font name="System Bold" size="17.0" />
</font>
</Label>
</children>
</VBox>

</children>
</StackPane>

</children>
</GridPane>
</children>
</HBox>

</children>
</GridPane>
27 changes: 10 additions & 17 deletions helpmehelpapplication/src/main/resources/fxml/donationPage.fxml
Original file line number Diff line number Diff line change
@@ -1,23 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>

<?import javafx.geometry.Insets?>
<?import javafx.scene.Cursor?>
<?import javafx.scene.control.Label?>
<?import javafx.scene.control.TextField?>
<?import javafx.scene.effect.DropShadow?>
<?import javafx.scene.image.Image?>
<?import javafx.scene.image.ImageView?>
<?import javafx.scene.layout.ColumnConstraints?>
<?import javafx.scene.layout.GridPane?>
<?import javafx.scene.layout.HBox?>
<?import javafx.scene.layout.RowConstraints?>
<?import javafx.scene.layout.StackPane?>
<?import javafx.scene.layout.VBox?>
<?import javafx.scene.paint.Color?>
<?import javafx.scene.shape.Rectangle?>
<?import javafx.scene.text.Font?>
<?import javafx.geometry.*?>
<?import javafx.scene.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.effect.*?>
<?import javafx.scene.image.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.paint.*?>
<?import javafx.scene.shape.*?>
<?import javafx.scene.text.*?>

<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1">
<GridPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="600.0" prefWidth="800.0" xmlns="http://javafx.com/javafx/17.0.12" xmlns:fx="http://javafx.com/fxml/1">
<columnConstraints>
<ColumnConstraints hgrow="SOMETIMES" minWidth="10.0" prefWidth="100.0" />
</columnConstraints>
Expand Down

0 comments on commit 0801337

Please sign in to comment.