Skip to content
Snippets Groups Projects
Commit 8a69ecac authored by HSoreide's avatar HSoreide
Browse files

Create RecipeTile to represent suggested recipes with custom css styling

parent e45bdeca
No related branches found
No related tags found
2 merge requests!42Hs frontend recipes,!41Hs frontend recipes
package no.ntnu.idatt1002.demo.controller;
public class RecipeTileController {
}
.recipe-tile {
-fx-background-color: rgba(151, 175, 151, 0.8);
-fx-background-radius: 30;
}
\ No newline at end of file
<?xml version="1.0" encoding="UTF-8"?>
<?import javafx.geometry.*?>
<?import javafx.scene.control.*?>
<?import javafx.scene.layout.*?>
<?import javafx.scene.text.*?>
<AnchorPane id="recipe-tile" prefHeight="300.0" prefWidth="400.0" styleClass="recipe-tile" stylesheets="@../style.css" xmlns="http://javafx.com/javafx/17.0.2-ea" xmlns:fx="http://javafx.com/fxml/1" fx:controller="no.ntnu.idatt1002.demo.controller.RecipeTileController">
<children>
<VBox prefHeight="350.0" prefWidth="500.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
<children>
<Pane prefHeight="262.0" prefWidth="500.0">
<children>
<Label id="recipeTitle" fx:id="nameTag" alignment="CENTER" contentDisplay="CENTER" layoutY="3.0" prefHeight="237.0" prefWidth="400.0" text="Name of Recipe">
<font>
<Font name="System Bold" size="36.0" />
</font>
</Label>
</children></Pane>
<HBox prefHeight="88.0" prefWidth="500.0">
<children>
<Label alignment="CENTER" prefHeight="63.0" prefWidth="292.0" text="Ingredients missing:">
<font>
<Font size="24.0" />
</font>
<opaqueInsets>
<Insets left="20.0" right="20.0" />
</opaqueInsets>
</Label>
<Label id="noMissingIngredients" fx:id="missingTag" alignment="CENTER" contentDisplay="CENTER" prefHeight="69.0" prefWidth="127.0" text="# missing">
<font>
<Font size="24.0" />
</font>
</Label>
</children>
<opaqueInsets>
<Insets left="20.0" right="20.0" />
</opaqueInsets>
</HBox>
</children>
</VBox>
</children>
</AnchorPane>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment