-
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.
- Loading branch information
Alex Muravya
committed
Jan 18, 2021
1 parent
97c2563
commit cd150c6
Showing
23 changed files
with
314 additions
and
14 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 was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
package io.kyberorg.whoami; | ||
|
||
public class Emoji { | ||
public static final String LOVE = "❤️"; | ||
public static final String CROSS = "❌"; | ||
public static final String FOREST = "\uD83C\uDF32"; | ||
public static final String ESTONIA = "\uD83C\uDDEA\uD83C\uDDEA"; | ||
} |
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,11 @@ | ||
package io.kyberorg.whoami.elements; | ||
|
||
import com.vaadin.flow.component.html.Hr; | ||
|
||
public class Divider extends Hr { | ||
public Divider() { | ||
getStyle().set("background-image", "#f5f9ff"); | ||
getStyle().set("flex", "0 0 2px"); | ||
getStyle().set("align-self", "stretch"); | ||
} | ||
} |
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,59 @@ | ||
package io.kyberorg.whoami.elements; | ||
|
||
import com.vaadin.flow.component.Tag; | ||
import com.vaadin.flow.component.UI; | ||
import com.vaadin.flow.component.html.Image; | ||
import org.apache.commons.lang3.StringUtils; | ||
|
||
@Tag("img") | ||
public class Logo extends Image { | ||
public static Builder create() { | ||
return new Builder(); | ||
} | ||
|
||
private Logo(String source, String alt, String url) { | ||
getStyle().set("margin", "0.5rem"); | ||
if(StringUtils.isNotBlank(source)) { | ||
setSrc(source); | ||
} | ||
|
||
if (StringUtils.isNotBlank(alt)) { | ||
setAlt(alt); | ||
} | ||
|
||
if(StringUtils.isNotBlank(url)) { | ||
addClickListener(event -> UI.getCurrent().getPage().setLocation(url)); | ||
getStyle().set("cursor","pointer"); | ||
} | ||
} | ||
|
||
public Logo roundLogo() { | ||
getStyle().set("borderRadius", "25%"); | ||
return this; | ||
} | ||
|
||
public static class Builder { | ||
private String source; | ||
private String altText; | ||
private String url; | ||
|
||
public Builder withSource(String imageSource) { | ||
this.source = imageSource; | ||
return this; | ||
} | ||
|
||
public Builder withAltText(String alternativeText) { | ||
this.altText = alternativeText; | ||
return this; | ||
} | ||
|
||
public Builder withUrl(String url) { | ||
this.url = url; | ||
return this; | ||
} | ||
|
||
public Logo build() { | ||
return new Logo(source, altText, url); | ||
} | ||
} | ||
} |
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
19 changes: 19 additions & 0 deletions
19
src/main/java/io/kyberorg/whoami/ui/sections/AboutSection.java
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,19 @@ | ||
package io.kyberorg.whoami.ui.sections; | ||
|
||
import com.vaadin.flow.component.orderedlayout.VerticalLayout; | ||
|
||
public class AboutSection extends VerticalLayout { | ||
|
||
public AboutSection() { | ||
String sectionText = """ | ||
Software craftsman and DevOps engineer. \ | ||
Mainly dealing with Docker, Docker Swarm and Kubernetes.\ | ||
Developing in Java (Spring and Vaadin). \ | ||
Hobbies are: traveling, 4x4, aviation. | ||
"""; | ||
|
||
add(sectionText); | ||
} | ||
} |
13 changes: 13 additions & 0 deletions
13
src/main/java/io/kyberorg/whoami/ui/sections/HomeSection.java
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,13 @@ | ||
package io.kyberorg.whoami.ui.sections; | ||
|
||
import com.vaadin.flow.component.orderedlayout.VerticalLayout; | ||
import com.vdurmont.emoji.EmojiParser; | ||
import io.kyberorg.whoami.Emoji; | ||
|
||
public class HomeSection extends VerticalLayout { | ||
|
||
public HomeSection() { | ||
add(EmojiParser.parseToUnicode("I live in Pirita "+ Emoji.FOREST | ||
+" district of Tallinn, capital of "+Emoji.ESTONIA)); | ||
} | ||
} |
22 changes: 22 additions & 0 deletions
22
src/main/java/io/kyberorg/whoami/ui/sections/ProjectsSection.java
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,22 @@ | ||
package io.kyberorg.whoami.ui.sections; | ||
|
||
import com.vaadin.flow.component.orderedlayout.FlexLayout; | ||
import io.kyberorg.whoami.elements.Logo; | ||
|
||
public class ProjectsSection extends FlexLayout { | ||
|
||
public ProjectsSection() { | ||
|
||
Logo yalseeLogo = Logo.create() | ||
.withSource("images/yalsee.png").withAltText("yals.ee") | ||
.withUrl("https://yals.ee") | ||
.build(); | ||
|
||
yalseeLogo.setWidth("4rem"); | ||
yalseeLogo.setHeight("4rem"); | ||
|
||
yalseeLogo.setTitle("Yalsee - the link shortener"); | ||
|
||
add(yalseeLogo); | ||
} | ||
} |
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,42 @@ | ||
package io.kyberorg.whoami.ui.sections; | ||
|
||
import com.vaadin.flow.component.Component; | ||
import com.vaadin.flow.component.Tag; | ||
import com.vaadin.flow.component.html.Div; | ||
import com.vaadin.flow.component.html.H3; | ||
import io.kyberorg.whoami.elements.Divider; | ||
|
||
@Tag("section") | ||
public class Section extends Div { | ||
|
||
public static Builder create() { | ||
return new Builder(); | ||
} | ||
|
||
private Section(String title, Component content) { | ||
H3 titleElement = new H3(title); | ||
Divider divider = new Divider(); | ||
|
||
add(titleElement, divider, content); | ||
} | ||
|
||
public static class Builder { | ||
private String title; | ||
private Component content; | ||
|
||
public Builder withTitle(String title) { | ||
this.title = title; | ||
return this; | ||
} | ||
|
||
public Builder andContent(Component content) { | ||
this.content = content; | ||
return this; | ||
} | ||
|
||
public Section build() { | ||
return new Section(title, content); | ||
} | ||
} | ||
|
||
} |
31 changes: 31 additions & 0 deletions
31
src/main/java/io/kyberorg/whoami/ui/sections/SocialSection.java
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,31 @@ | ||
package io.kyberorg.whoami.ui.sections; | ||
|
||
import com.vaadin.flow.component.orderedlayout.FlexLayout; | ||
import io.kyberorg.whoami.elements.Logo; | ||
|
||
public class SocialSection extends FlexLayout { | ||
|
||
public SocialSection() { | ||
Logo gitHubLogo = Logo.create() | ||
.withSource("images/gh.png").withAltText("GitHub") | ||
.withUrl("https://github.com/kyberorg") | ||
.build(); | ||
|
||
Logo linkedInLogo = Logo.create() | ||
.withSource("images/linked.png").withAltText("LinkedIn") | ||
.withUrl("https://www.linkedin.com/in/kyberorg/") | ||
.build(); | ||
|
||
Logo facebookLogo = Logo.create() | ||
.withSource("images/fb.png").withAltText("Facebook") | ||
.withUrl("https://www.facebook.com/kyberorg") | ||
.build(); | ||
|
||
Logo twitterLogo = Logo.create() | ||
.withSource("images/twitter.png").withAltText("Twitter") | ||
.withUrl("https://twitter.com/kyberorg") | ||
.build(); | ||
|
||
add(gitHubLogo, linkedInLogo, facebookLogo, twitterLogo); | ||
} | ||
} |
34 changes: 34 additions & 0 deletions
34
src/main/java/io/kyberorg/whoami/ui/sections/TitleSection.java
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,34 @@ | ||
package io.kyberorg.whoami.ui.sections; | ||
|
||
import com.vaadin.flow.component.html.H2; | ||
import com.vaadin.flow.component.html.Image; | ||
import com.vaadin.flow.component.orderedlayout.FlexComponent; | ||
import com.vaadin.flow.component.orderedlayout.FlexLayout; | ||
|
||
public class TitleSection extends FlexLayout { | ||
|
||
public static TitleSection getInstance() { | ||
return new TitleSection(); | ||
} | ||
|
||
private TitleSection() { | ||
H2 title = new H2("Hello, I am kyberorg"); | ||
Image myPhoto = new Image("images/logo.png", "myPhoto"); | ||
|
||
title.getStyle().set("marginTop", "initial"); | ||
title.getStyle().set("marginRight", "2rem"); | ||
title.getStyle().set("marginBottom", "initial"); | ||
title.getStyle().set("marginLeft", "initial"); | ||
|
||
myPhoto.setWidth("4rem"); | ||
myPhoto.setWidth("4rem"); | ||
myPhoto.getStyle().set("borderRadius","100%"); | ||
|
||
setJustifyContentMode(FlexComponent.JustifyContentMode.CENTER); | ||
setAlignItems(FlexComponent.Alignment.CENTER); | ||
setWidthFull(); | ||
|
||
add(title, myPhoto); | ||
} | ||
|
||
} |
30 changes: 30 additions & 0 deletions
30
src/main/java/io/kyberorg/whoami/ui/sections/WorkSection.java
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,30 @@ | ||
package io.kyberorg.whoami.ui.sections; | ||
|
||
import com.vaadin.flow.component.Text; | ||
import com.vaadin.flow.component.orderedlayout.FlexLayout; | ||
import com.vaadin.flow.component.orderedlayout.VerticalLayout; | ||
import com.vdurmont.emoji.EmojiParser; | ||
import io.kyberorg.whoami.Emoji; | ||
import io.kyberorg.whoami.elements.Logo; | ||
|
||
public class WorkSection extends VerticalLayout { | ||
|
||
public WorkSection() { | ||
FlexLayout firstLine = new FlexLayout(); | ||
Text first = new Text("I work at "); | ||
Logo knLogo = Logo.create() | ||
.withSource("images/kn.png").withAltText("Kühne+Nagel") | ||
.build().roundLogo(); | ||
|
||
Text second = new Text(EmojiParser.parseToUnicode("and I "+ Emoji.LOVE +" it")); | ||
firstLine.setAlignItems(Alignment.CENTER); | ||
firstLine.add(first, knLogo, second); | ||
|
||
FlexLayout secondLine = new FlexLayout(); | ||
Text availableForHireText = new Text("Am I available to hire: "); | ||
Text availableForHireStatus = new Text(EmojiParser.parseToUnicode(Emoji.CROSS)); | ||
|
||
secondLine.add(availableForHireText, availableForHireStatus); | ||
add(firstLine, secondLine); | ||
} | ||
} |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file not shown.
File renamed without changes
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Oops, something went wrong.