Ajout article programmatique [ok] + modeles articles, tags [ok] + lien entre les 2 [ok] + [todo] rounded corners
This commit is contained in:
parent
7de525b0c7
commit
fee05db7f4
|
@ -0,0 +1,17 @@
|
|||
package Classes;
|
||||
|
||||
public enum TagType {
|
||||
science("science", "#f14405"),
|
||||
nature("nature", "#16c668"),
|
||||
economics("economics", "#d1991b"),
|
||||
politics("politics", "#6825f4"),
|
||||
technology("technology", "#1e7ebe");
|
||||
|
||||
protected String color;
|
||||
protected String label;
|
||||
TagType(String label, String color){ this.label = label; this.color = color; }
|
||||
|
||||
public String getLabel(){ return this.label; }
|
||||
public String getColor(){ return this.color; }
|
||||
|
||||
}
|
|
@ -0,0 +1,142 @@
|
|||
package Classes.css.user;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
import Classes.css.core.Context;
|
||||
import Classes.css.core.Ruleset;
|
||||
import javafx.scene.Node;
|
||||
import javafx.scene.image.ImageView;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.text.Text;
|
||||
|
||||
public class ArticleStylesheet{
|
||||
|
||||
/* Builds all necessary CSS/layout rules */
|
||||
public ArticleStylesheet(Node target) throws Exception{
|
||||
|
||||
/* (1) Useful cast */
|
||||
AnchorPane _target = (AnchorPane) target;
|
||||
HBox _hc = (HBox) _target.getChildren().get(3);
|
||||
|
||||
/* (2) Set rules for parent */
|
||||
Ruleset.load(_target)
|
||||
|
||||
.add("min-width", Context.getInt("article-width"))
|
||||
.add("max-width", Context.getInt("article-width"))
|
||||
|
||||
.add("min-height", Context.getInt("article-height"))
|
||||
.add("max-height", Context.getInt("article-height"))
|
||||
|
||||
.add("pref-width", Context.getString("article-width"))
|
||||
.add("pref-height", Context.getString("article-height"))
|
||||
|
||||
// border
|
||||
.add("border-insets", "10")
|
||||
.add("border-radius", "3")
|
||||
.add("border-color", "#ddd")
|
||||
|
||||
// bg
|
||||
.add("background-insets", "10")
|
||||
.add("background-radius", "3")
|
||||
.add("background-color", "#fff")
|
||||
.apply();
|
||||
|
||||
/* (2) Get children ruleset: picture, content, date, header_container */
|
||||
this.Picture( (ImageView) _target.getChildren().get(0) ).apply();
|
||||
this.Content( (Text) _target.getChildren().get(1) ).apply();
|
||||
this.RelativeDate( (Text) _target.getChildren().get(2) ).apply();
|
||||
this.HeaderContainer( (HBox) _target.getChildren().get(3) ).apply();
|
||||
|
||||
/* (3) Header container children: title, tag1, tag2, ... */
|
||||
this.HeaderTitle( (Text) _hc.getChildren().get(0) ).apply();
|
||||
|
||||
for( int i = 0 ; i < _hc.getChildren().size()-1 ; i++ ){
|
||||
|
||||
Pane _tmp = (Pane) _hc.getChildren().get(i+1);
|
||||
this.HeaderTag(_tmp).apply();
|
||||
this.HeaderTextTag( (Text) _tmp.getChildren().get(0) ).apply();
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Picture of article */
|
||||
private Ruleset Picture(ImageView target) throws Exception{
|
||||
|
||||
return Ruleset.load(target)
|
||||
.add("top", 20)
|
||||
.add("left", 20)
|
||||
.add("bottom", 20);
|
||||
|
||||
}
|
||||
|
||||
/* Article content */
|
||||
private Ruleset Content(Text target) throws Exception{
|
||||
|
||||
return Ruleset.load(target)
|
||||
.add("top", 50)
|
||||
.add("left", 96)
|
||||
.add("fill", "#808080")
|
||||
.add("font-family", "Lato Regular")
|
||||
.add("font-size", "12");
|
||||
|
||||
}
|
||||
|
||||
/* Header Container */
|
||||
private Ruleset HeaderContainer(HBox target) throws Exception{
|
||||
|
||||
return Ruleset.load(target)
|
||||
.add("top", 20)
|
||||
.add("left", 96)
|
||||
.add("pref-height", "21")
|
||||
.add("pref-width", "200");
|
||||
|
||||
}
|
||||
|
||||
/* Relative date of article */
|
||||
private Ruleset RelativeDate(Text target) throws Exception{
|
||||
|
||||
return Ruleset.load(target)
|
||||
.add("top", 20)
|
||||
.add("right", 20)
|
||||
.add("fill", "#757575")
|
||||
.add("font-family", "Lato Bold")
|
||||
.add("font-size", "12");
|
||||
}
|
||||
|
||||
/* Header Title */
|
||||
private Ruleset HeaderTitle(Text target) throws Exception{
|
||||
|
||||
return Ruleset.load(target)
|
||||
.add("font-family", "Lato Bold")
|
||||
.add("font-size", "17");
|
||||
|
||||
}
|
||||
|
||||
/* Header Tag */
|
||||
private Ruleset HeaderTag(Pane target) throws Exception{
|
||||
|
||||
return Ruleset.load(target)
|
||||
.add("pref-width", 55)
|
||||
.add("pref-height", 20)
|
||||
.add("background-color", "#f8b02c")
|
||||
.add("background-radius", "3");
|
||||
|
||||
}
|
||||
|
||||
/* Header Tag Text */
|
||||
private Ruleset HeaderTextTag(Text target) throws Exception{
|
||||
|
||||
return Ruleset.load(target)
|
||||
.add("fill", "#fff")
|
||||
.add("font-family", "Lato Regular")
|
||||
.add("font-size", "14");
|
||||
|
||||
}
|
||||
|
||||
}
|
|
@ -14,6 +14,8 @@ public class ContextBuilder{
|
|||
Context.bind("header-height", 50);
|
||||
Context.bind("menu-width", 237);
|
||||
Context.bind("submenu-width", 200);
|
||||
Context.bind("article-width", 800);
|
||||
Context.bind("article-height", 96);
|
||||
|
||||
/* (3) Colors */
|
||||
Context.bind("main-color", 63, 81, 181);
|
||||
|
|
|
@ -0,0 +1,134 @@
|
|||
package controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
import Classes.TagType;
|
||||
import Interfaces.EventObserver;
|
||||
import javafx.event.EventHandler;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.geometry.Insets;
|
||||
import javafx.scene.input.MouseEvent;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.Background;
|
||||
import javafx.scene.layout.BackgroundFill;
|
||||
import javafx.scene.layout.CornerRadii;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
import javafx.scene.layout.HBox;
|
||||
import javafx.scene.layout.Pane;
|
||||
import javafx.scene.paint.Paint;
|
||||
import javafx.scene.text.Text;
|
||||
|
||||
public class Article{
|
||||
|
||||
/* Data */
|
||||
private ArrayList<AnchorPane> items;
|
||||
private FlowPane parent;
|
||||
private EventObserver observer;
|
||||
|
||||
|
||||
/* Constructor */
|
||||
public Article(FlowPane p_parent, EventObserver observer){
|
||||
this.parent = p_parent;
|
||||
this.items = new ArrayList<AnchorPane>();
|
||||
this.observer = observer;
|
||||
}
|
||||
|
||||
public void addItem(String p_title, String p_content, Date p_publ, ArrayList<TagType> p_tags) throws IOException {
|
||||
|
||||
/* (1) Load the article_disp.fxml */
|
||||
FXMLLoader loader = new FXMLLoader();
|
||||
loader.setLocation(getClass().getResource("/fxml/article_disp.fxml"));
|
||||
|
||||
/* (2) Get the loaded item*/
|
||||
AnchorPane item = (AnchorPane) loader.load();
|
||||
|
||||
/* (3) Set content */
|
||||
this.gsetContent( p_content, item );
|
||||
|
||||
/* (4) Set date */
|
||||
this.gsetDate( p_publ.toString(), item );
|
||||
|
||||
/* (5) Set title */
|
||||
HBox headerContainer = (HBox) item.getChildren().get(3);
|
||||
this.gsetTitle( p_title, headerContainer );
|
||||
|
||||
/* (6) Set tags */
|
||||
this.gsetTags( p_tags, headerContainer );
|
||||
|
||||
/* (7) Bind event */
|
||||
item.setOnMousePressed(new EventHandler<MouseEvent>() {
|
||||
@Override
|
||||
public void handle(MouseEvent event) {
|
||||
Article.this.observer.handleEvent(new Classes.Event(item.getId(),"changeMainLayout"));
|
||||
}
|
||||
});
|
||||
|
||||
/* (8) Add to the controller local */
|
||||
this.items.add(item);
|
||||
|
||||
/* (9) On bind au width du parent */
|
||||
item.prefWidthProperty().bind(this.parent.widthProperty());
|
||||
item.maxWidthProperty().bind(this.parent.widthProperty());
|
||||
|
||||
/* (10) Add to parent (graphics) */
|
||||
this.parent.getChildren().add(item);
|
||||
}
|
||||
|
||||
|
||||
|
||||
public void gsetContent(String p_content, AnchorPane p_parent){
|
||||
/* (1) Get node */
|
||||
Text g_content = (Text) p_parent.getChildren().get(1);
|
||||
|
||||
/* (2) Update content */
|
||||
g_content.setText(p_content);
|
||||
}
|
||||
|
||||
|
||||
public void gsetDate(String p_date, AnchorPane p_parent){
|
||||
/* (1) Get node */
|
||||
Text g_date = (Text) p_parent.getChildren().get(2);
|
||||
|
||||
/* (2) Update content */
|
||||
g_date.setText(p_date);
|
||||
|
||||
}
|
||||
|
||||
|
||||
public void gsetTitle(String p_title, HBox p_parent){
|
||||
/* (1) Get node */
|
||||
Text g_title = (Text) p_parent.getChildren().get(0);
|
||||
|
||||
/* (2) Update title */
|
||||
g_title.setText(p_title);
|
||||
}
|
||||
|
||||
|
||||
public void gsetTags(ArrayList<TagType> p_tags, HBox p_parent) throws IOException{
|
||||
|
||||
/* (1) For each tag -> load a new one */
|
||||
for( TagType tag : p_tags ){
|
||||
|
||||
/* (1.1) Create the container */
|
||||
FXMLLoader loader = new FXMLLoader();
|
||||
loader.setLocation(getClass().getResource("/fxml/article_tag_disp.fxml"));
|
||||
|
||||
/* (1.2) Load the tag elements */
|
||||
Pane g_tag = (Pane) loader.load();
|
||||
Text g_tagText = (Text) g_tag.getChildren().get(0);
|
||||
|
||||
/* (1.3) Update the tag name */
|
||||
g_tagText.setText(tag.getLabel());
|
||||
|
||||
/* (1.4) Set the custom color */
|
||||
g_tag.setStyle("-fx-background-color: "+tag.getColor());
|
||||
|
||||
/* (1.5) Ajout au parent*/
|
||||
p_parent.getChildren().add(g_tag);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
|
@ -1,30 +1,25 @@
|
|||
package controller;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.util.HashMap;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
|
||||
import org.json.JSONObject;
|
||||
|
||||
import Classes.ApiCall;
|
||||
import Classes.Category;
|
||||
import Classes.Languages;
|
||||
import Classes.SortTypes;
|
||||
import Classes.TagType;
|
||||
import Classes.css.user.ContextBuilder;
|
||||
import Classes.css.user.HeaderStyleSheet;
|
||||
import Classes.css.user.HeaderIconStyleSheet;
|
||||
import Classes.css.user.HeaderStyleSheet;
|
||||
import Classes.css.user.MenuStyleSheet;
|
||||
import Classes.css.user.SubMenuStyleSheet;
|
||||
import Interfaces.Callback;
|
||||
import Interfaces.Event;
|
||||
import Interfaces.EventObserver;
|
||||
import javafx.application.Application;
|
||||
import javafx.fxml.FXMLLoader;
|
||||
import javafx.scene.Scene;
|
||||
import javafx.scene.control.MenuBar;
|
||||
import javafx.scene.layout.AnchorPane;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
import javafx.stage.Stage;
|
||||
import model.LangModel;
|
||||
import model.NewsListModel;
|
||||
|
||||
public class RootLayout extends Application implements EventObserver {
|
||||
|
@ -32,6 +27,7 @@ public class RootLayout extends Application implements EventObserver {
|
|||
private Stage root_stage;
|
||||
private Scene root_scene;
|
||||
private AnchorPane root_layout;
|
||||
private FlowPane main_container;
|
||||
|
||||
|
||||
|
||||
|
@ -48,9 +44,12 @@ public class RootLayout extends Application implements EventObserver {
|
|||
/* (3) Load the CSS CONTEXT */
|
||||
ContextBuilder.createContext();
|
||||
|
||||
/* (3) Store container */
|
||||
this.main_container = (FlowPane) this.root_scene.lookup("#container");
|
||||
|
||||
|
||||
/* (1) HEADER
|
||||
|
||||
/* (1) Create controllers' views
|
||||
-------------------------------------*/
|
||||
/* (1) Create header menu */
|
||||
HeaderMenu hm = new HeaderMenu((FlowPane) this.root_scene.lookup("#header_menu"),this);
|
||||
|
@ -61,6 +60,15 @@ public class RootLayout extends Application implements EventObserver {
|
|||
hm.addItem("menu", "/src/header-menu.png");
|
||||
|
||||
|
||||
/* (2) Create container */
|
||||
Article artCtl = new Article(this.main_container, this);
|
||||
ArrayList<TagType> tags = new ArrayList<TagType>();
|
||||
tags.add(TagType.science); tags.add(TagType.economics);
|
||||
|
||||
artCtl.addItem("Article 1", "blabla bloblo blibli", new Date(12), tags);
|
||||
|
||||
|
||||
|
||||
/* (2) CSS
|
||||
-------------------------------------*/
|
||||
|
||||
|
|
|
@ -0,0 +1,62 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.FlowPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
|
||||
<AnchorPane layoutX="65.0" layoutY="146.0" prefHeight="96.0" prefWidth="800.0" style="-fx-border-insets: 30; -fx-background-insets: 30; -fx-background-color: #fff; -fx-background-radius: 3; -fx-border-radius: 3; -fx-border-color: #ddd;">
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
<children>
|
||||
<ImageView fitHeight="56.0" fitWidth="56.0" layoutX="-28.0" layoutY="38.0" pickOnBounds="true" preserveRatio="true" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="20.0">
|
||||
<image>
|
||||
<Image url="@../src/menu_profile_1.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Text fill="#808080" fontSmoothingType="LCD" layoutX="118.0" layoutY="78.8439998626709" strokeType="OUTSIDE" strokeWidth="0.0" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam posuere odio ut sem vestibulum, at tempus neque luctus. Curabitur quis tortor bibendum" wrappingWidth="653.0" AnchorPane.leftAnchor="96.0" AnchorPane.topAnchor="50.0">
|
||||
<font>
|
||||
<Font name="Lato Regular" size="12.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Text fill="#757575" layoutX="611.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="10 days ago" textAlignment="RIGHT" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="20.0">
|
||||
<font>
|
||||
<Font name="Lato Bold" size="12.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<HBox layoutX="118.0" layoutY="39.0" prefHeight="21.0" prefWidth="200.0" AnchorPane.leftAnchor="96.0" AnchorPane.topAnchor="20.0">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Some Article Title">
|
||||
<font>
|
||||
<Font name="Lato Bold" size="17.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<!-- <FlowPane alignment="CENTER" columnHalignment="CENTER" prefHeight="20.0" prefWidth="0.0" style="-fx-background-color: red; -fx-background-radius: 3;">
|
||||
<children>
|
||||
<Text fill="WHITE" fontSmoothingType="LCD" strokeType="OUTSIDE" strokeWidth="0.0" text="nature">
|
||||
<font>
|
||||
<Font name="Lato Regular" size="14.0" />
|
||||
</font>
|
||||
<FlowPane.margin>
|
||||
<Insets />
|
||||
</FlowPane.margin>
|
||||
</Text>
|
||||
</children>
|
||||
<HBox.margin>
|
||||
<Insets left="10.0" />
|
||||
</HBox.margin>
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" />
|
||||
</padding>
|
||||
</FlowPane> -->
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
|
|
@ -0,0 +1,26 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.FlowPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.text.Text?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
<?import javafx.geometry.Insets?>
|
||||
|
||||
<FlowPane alignment="CENTER" columnHalignment="CENTER" prefHeight="20.0" prefWidth="0.0" style="-fx-background-color: red; -fx-background-radius: 3;">
|
||||
<children>
|
||||
<Text fill="WHITE" fontSmoothingType="LCD" strokeType="OUTSIDE" strokeWidth="0.0" text="nature">
|
||||
<font>
|
||||
<Font name="Lato Regular" size="14.0" />
|
||||
</font>
|
||||
<FlowPane.margin>
|
||||
<Insets />
|
||||
</FlowPane.margin>
|
||||
</Text>
|
||||
</children>
|
||||
<HBox.margin>
|
||||
<Insets left="10.0" />
|
||||
</HBox.margin>
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" />
|
||||
</padding>
|
||||
</FlowPane>
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.scene.layout.FlowPane?>
|
||||
|
||||
<FlowPane alignment="CENTER_RIGHT" columnHalignment="RIGHT" layoutX="273.0" layoutY="-86.0" maxHeight="40.0" maxWidth="1240.0" orientation="VERTICAL" prefHeight="40.0" prefWrapLength="1240.0" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<Pane prefHeight="40.0" prefWidth="40.0" style="-fx-background-color: red; -fx-background-size: auto;">
|
||||
<FlowPane.margin>
|
||||
<Insets right="1.0" />
|
||||
</FlowPane.margin>
|
||||
</Pane>
|
||||
<Pane layoutX="10.0" layoutY="10.0" prefHeight="40.0" prefWidth="40.0" style="-fx-background-color: green;" />
|
||||
<Pane layoutX="10.0" layoutY="10.0" prefHeight="40.0" prefWidth="40.0" style="-fx-background-color: red; -fx-background-size: auto;" />
|
||||
</children>
|
||||
</FlowPane>
|
||||
|
128
fxml/model.fxml
128
fxml/model.fxml
|
@ -1,10 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.Cursor?>
|
||||
<?import javafx.scene.image.Image?>
|
||||
<?import javafx.scene.image.ImageView?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.FlowPane?>
|
||||
<?import javafx.scene.layout.HBox?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
<?import javafx.scene.layout.VBox?>
|
||||
<?import javafx.scene.text.Font?>
|
||||
|
@ -52,80 +54,60 @@
|
|||
</children>
|
||||
</AnchorPane>
|
||||
<VBox id="submenu" fx:id="submenu" layoutX="234.0" layoutY="50.0" prefHeight="650.0" prefWidth="194.0" style="-fx-background-color: white;" AnchorPane.bottomAnchor="0.0" AnchorPane.topAnchor="50.0" />
|
||||
<FlowPane id="container" fx:id="container" alignment="TOP_CENTER" columnHalignment="CENTER" layoutX="421.0" layoutY="50.0" prefHeight="650.0" prefWidth="851.0" rowValignment="TOP" AnchorPane.bottomAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="50.0">
|
||||
<FlowPane id="container" fx:id="container" alignment="TOP_CENTER" columnHalignment="CENTER" layoutX="421.0" layoutY="50.0" prefWrapLength="1000.0" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="429.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="50.0">
|
||||
<children>
|
||||
<AnchorPane prefHeight="98.0" prefWidth="717.0" style="-fx-border-insets: 10; -fx-background-insets: 10; -fx-background-color: #fff; -fx-background-radius: 3; -fx-border-radius: 3; -fx-border-color: #ddd; -fx-padding: 10;">
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
<children>
|
||||
<ImageView fitHeight="57.0" fitWidth="56.0" layoutX="31.0" layoutY="38.0" pickOnBounds="true" preserveRatio="true" AnchorPane.leftAnchor="20.0">
|
||||
<image>
|
||||
<Image url="@../src/menu_profile_1.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Text layoutX="100.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Some Article Title" AnchorPane.leftAnchor="100.0" AnchorPane.topAnchor="20.0">
|
||||
<font>
|
||||
<Font name="Lato Bold" size="17.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Text fill="#808080" fontSmoothingType="LCD" layoutX="99.0" layoutY="61.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam posuere odio ut sem vestibulum, at tempus neque luctus. Curabitur quis tortor bibendum" wrappingWidth="600.0" AnchorPane.leftAnchor="100.0" AnchorPane.topAnchor="45.0">
|
||||
<font>
|
||||
<Font name="Lato Regular" size="12.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Text fill="#757575" layoutX="611.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="10 days ago" textAlignment="RIGHT" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="20.0">
|
||||
<font>
|
||||
<Font name="Lato Bold" size="12.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Pane layoutX="247.0" layoutY="23.0" prefHeight="16.0" prefWidth="64.0" style="-fx-background-color: #d84430; -fx-background-radius: 3;" AnchorPane.leftAnchor="247.0" AnchorPane.topAnchor="22.0">
|
||||
<children>
|
||||
<Text fill="WHITE" fontSmoothingType="LCD" layoutX="8.0" layoutY="12.0" strokeType="OUTSIDE" strokeWidth="0.0" text="science">
|
||||
<font>
|
||||
<Font name="Lato Regular" size="14.0" />
|
||||
</font>
|
||||
</Text>
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane layoutX="77.0" layoutY="10.0" prefHeight="98.0" prefWidth="717.0" style="-fx-border-insets: 10; -fx-background-insets: 10; -fx-background-color: #fff; -fx-background-radius: 3; -fx-border-radius: 3; -fx-border-color: #ddd; -fx-padding: 10;">
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
<children>
|
||||
<ImageView fitHeight="57.0" fitWidth="56.0" layoutX="-28.0" layoutY="38.0" pickOnBounds="true" preserveRatio="true" AnchorPane.leftAnchor="20.0">
|
||||
<image>
|
||||
<Image url="@../src/menu_profile_1.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Text layoutX="100.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Some Article Title" AnchorPane.leftAnchor="100.0" AnchorPane.topAnchor="20.0">
|
||||
<font>
|
||||
<Font name="Lato Bold" size="17.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Text fill="#808080" fontSmoothingType="LCD" layoutX="142.0" layoutY="61.0" strokeType="OUTSIDE" strokeWidth="0.0" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam posuere odio ut sem vestibulum, at tempus neque luctus. Curabitur quis tortor bibendum" wrappingWidth="600.0" AnchorPane.leftAnchor="100.0" AnchorPane.topAnchor="45.0">
|
||||
<font>
|
||||
<Font name="Lato Regular" size="12.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Text fill="#757575" layoutX="611.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="10 days ago" textAlignment="RIGHT" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="20.0">
|
||||
<font>
|
||||
<Font name="Lato Bold" size="12.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Pane layoutX="289.0" layoutY="64.0" prefHeight="16.0" prefWidth="56.0" style="-fx-background-color: #f8b02c; -fx-background-radius: 3;" AnchorPane.leftAnchor="247.0" AnchorPane.topAnchor="22.0">
|
||||
<children>
|
||||
<Text fill="WHITE" fontSmoothingType="LCD" layoutX="8.0" layoutY="12.0" strokeType="OUTSIDE" strokeWidth="0.0" text="nature">
|
||||
<font>
|
||||
<Font name="Lato Regular" size="14.0" />
|
||||
</font>
|
||||
</Text>
|
||||
</children>
|
||||
</Pane>
|
||||
</children>
|
||||
</AnchorPane>
|
||||
<AnchorPane fx:id="card1" prefHeight="118.0" style="-fx-border-insets: 10; -fx-background-insets: 10; -fx-background-color: #fff; -fx-background-radius: 3; -fx-border-radius: 3; -fx-border-color: #ddd;">
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
</opaqueInsets>
|
||||
<children>
|
||||
<ImageView fitHeight="56.0" fitWidth="56.0" layoutX="-28.0" layoutY="38.0" pickOnBounds="true" preserveRatio="true" AnchorPane.bottomAnchor="20.0" AnchorPane.leftAnchor="20.0" AnchorPane.topAnchor="20.0">
|
||||
<image>
|
||||
<Image url="@../src/menu_profile_1.png" />
|
||||
</image>
|
||||
</ImageView>
|
||||
<Text fill="#808080" fontSmoothingType="LCD" layoutX="118.0" layoutY="78.8439998626709" strokeType="OUTSIDE" strokeWidth="0.0" text="Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliquam posuere odio ut sem vestibulum, at tempus neque luctus. Curabitur quis tortor bibendum" wrappingWidth="653.0" AnchorPane.leftAnchor="96.0" AnchorPane.topAnchor="50.0">
|
||||
<font>
|
||||
<Font name="Lato Regular" size="12.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<Text fill="#757575" layoutX="611.0" layoutY="37.0" strokeType="OUTSIDE" strokeWidth="0.0" text="10 days ago" textAlignment="RIGHT" AnchorPane.rightAnchor="20.0" AnchorPane.topAnchor="20.0">
|
||||
<font>
|
||||
<Font name="Lato Bold" size="12.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<HBox layoutX="118.0" layoutY="39.0" prefHeight="21.0" prefWidth="200.0" AnchorPane.leftAnchor="96.0" AnchorPane.topAnchor="20.0">
|
||||
<children>
|
||||
<Text strokeType="OUTSIDE" strokeWidth="0.0" text="Some Article Title">
|
||||
<font>
|
||||
<Font name="Lato Bold" size="17.0" />
|
||||
</font>
|
||||
</Text>
|
||||
<FlowPane alignment="CENTER" columnHalignment="CENTER" prefHeight="20.0" style="-fx-background-color: red; -fx-background-radius: 3;">
|
||||
<children>
|
||||
<Text fill="WHITE" fontSmoothingType="LCD" strokeType="OUTSIDE" strokeWidth="0.0" text="nature">
|
||||
<font>
|
||||
<Font name="Lato Regular" size="14.0" />
|
||||
</font>
|
||||
<FlowPane.margin>
|
||||
<Insets />
|
||||
</FlowPane.margin>
|
||||
</Text>
|
||||
</children>
|
||||
<HBox.margin>
|
||||
<Insets left="10.0" />
|
||||
</HBox.margin>
|
||||
<padding>
|
||||
<Insets left="5.0" right="5.0" />
|
||||
</padding>
|
||||
</FlowPane>
|
||||
</children>
|
||||
</HBox>
|
||||
</children>
|
||||
<cursor>
|
||||
<Cursor fx:constant="HAND" />
|
||||
</cursor>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
<opaqueInsets>
|
||||
<Insets />
|
||||
|
|
|
@ -1,16 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<?import javafx.geometry.Insets?>
|
||||
<?import javafx.scene.layout.AnchorPane?>
|
||||
<?import javafx.scene.layout.FlowPane?>
|
||||
<?import javafx.scene.layout.Pane?>
|
||||
|
||||
<AnchorPane maxHeight="-Infinity" maxWidth="-Infinity" minHeight="-Infinity" minWidth="-Infinity" prefHeight="700.0" prefWidth="1280.0" xmlns="http://javafx.com/javafx/8.0.141" xmlns:fx="http://javafx.com/fxml/1">
|
||||
<children>
|
||||
<AnchorPane maxHeight="40.0" maxWidth="1280.0" prefHeight="40.0" prefWidth="1280.0" style="-fx-background-color: #3f51b5;" AnchorPane.leftAnchor="0.0" AnchorPane.rightAnchor="0.0" AnchorPane.topAnchor="0.0">
|
||||
<children>
|
||||
<Pane layoutX="100.0" layoutY="-27.0" maxHeight="40.0" maxWidth="40.0" prefHeight="40.0" prefWidth="40.0" style="-fx-background-color: #3240a3;" AnchorPane.bottomAnchor="0.0" AnchorPane.leftAnchor="0.0" AnchorPane.topAnchor="0.0" />
|
||||
</children>
|
||||
</AnchorPane>
|
||||
</children>
|
||||
</AnchorPane>
|
Loading…
Reference in New Issue