-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feat: Tried to split navbar into a component with dedicated controlle…
…r, also other compontens fall under compoennts
- Loading branch information
AdrianBalunan
committed
Apr 15, 2026
1 parent
303b852
commit a365f81
Showing
4 changed files
with
94 additions
and
164 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
89 changes: 89 additions & 0 deletions
89
helpmehelpapplication/src/main/resources/fxml/components/navbar.fxml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,89 @@ | ||
| <!-- NAVBAR --> | ||
| <?import javafx.scene.layout.GridPane?> | ||
| <?import javafx.scene.layout.ColumnConstraints?> | ||
| <?import javafx.scene.layout.HBox?> | ||
| <?import javafx.scene.control.Button?> | ||
| <?import javafx.geometry.Insets?> | ||
| <?import javafx.scene.image.ImageView?> | ||
| <?import javafx.scene.image.Image?> | ||
| <?import javafx.scene.control.Label?> | ||
| <?import javafx.scene.text.Font?> | ||
| <?import javafx.scene.layout.StackPane?> | ||
| <?import javafx.scene.control.TextField?> | ||
| <?import javafx.scene.layout.RowConstraints?> | ||
|
|
||
| <GridPane style="-fx-background-color: #2f8f8b;" xmlns="http://javafx.com/javafx/25" xmlns:fx="http://javafx.com/fxml/1" fx:controller="ntnu.systemutvikling.team6.controller.components.NavbarFooterController"> | ||
| <columnConstraints> | ||
| <ColumnConstraints hgrow="ALWAYS" percentWidth="33.3333" /> | ||
| <ColumnConstraints hgrow="ALWAYS" percentWidth="33.3333" /> | ||
| <ColumnConstraints hgrow="ALWAYS" percentWidth="33.3333" /> | ||
| </columnConstraints> | ||
|
|
||
| <children> | ||
| <!-- Venstre: logo + navn --> | ||
| <HBox alignment="CENTER_LEFT" spacing="12.0"> | ||
| <padding> | ||
| <Insets left="14.0" /> | ||
| </padding> | ||
| <children> | ||
| <Button mnemonicParsing="false" onAction="#switchToFrontPage" style="-fx-background-color: transparent; -fx-padding: 0;"> | ||
| <graphic> | ||
| <ImageView fitHeight="42.0" fitWidth="56.0" preserveRatio="true"> | ||
| <image> | ||
| <Image url="@../../images/Logo.png" /> | ||
| </image> | ||
| </ImageView> | ||
| </graphic> | ||
| </Button> | ||
|
|
||
| <HBox alignment="CENTER_LEFT" spacing="0.0"> | ||
| <children> | ||
| <Label style="-fx-text-fill: #FFFFFF;" text="Help" textFill="WHITE"> | ||
| <font> | ||
| <Font name="System Bold" size="19.0" /> | ||
| </font> | ||
| </Label> | ||
| <Label style="-fx-text-fill: #C8E6C9;" text="Me" textFill="#c8e6c9"> | ||
| <font> | ||
| <Font name="System Bold" size="19.0" /> | ||
| </font> | ||
| </Label> | ||
| <Label style="-fx-text-fill: #FFFFFF;" text="Help" textFill="WHITE"> | ||
| <font> | ||
| <Font name="System Bold" size="19.0" /> | ||
| </font> | ||
| </Label> | ||
| </children> | ||
| </HBox> | ||
| </children> | ||
| </HBox> | ||
|
|
||
| <!-- Midten: search --> | ||
| <StackPane alignment="CENTER" GridPane.columnIndex="1"> | ||
| <children> | ||
| <TextField fx:id="donationSearchField" onAction="#handleSearch" prefHeight="34.0" prefWidth="360.0" promptText="Search" style="-fx-background-color: white; -fx-background-radius: 17; -fx-border-radius: 17; -fx-padding: 0 12 0 12;" /> | ||
| </children> | ||
| </StackPane> | ||
|
|
||
| <!-- Høyre: login --> | ||
| <HBox alignment="CENTER_RIGHT" GridPane.columnIndex="2"> | ||
| <padding> | ||
| <Insets right="20.0" /> | ||
| </padding> | ||
| <children> | ||
| <Button fx:id="loginButton" text="Login" | ||
| onAction="#switchToLoginPage" | ||
| prefHeight="34.0" prefWidth="120.0" | ||
| style="-fx-background-color: #1F4FD8; -fx-text-fill: white; -fx-background-radius: 17; -fx-font-weight: bold;" /> | ||
| <Button fx:id="profileButton" onAction="#switchToProfilePage" | ||
| visible="false" managed="false" | ||
| style="-fx-background-color: white;"> | ||
| </Button> | ||
| </children> | ||
| </HBox> | ||
|
|
||
| </children> | ||
| <rowConstraints> | ||
| <RowConstraints /> | ||
| </rowConstraints> | ||
| </GridPane> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters