Skip to content

Commit 25ef54b

Browse files
committed
Update features page
1 parent be0e90e commit 25ef54b

File tree

10 files changed

+256
-152
lines changed

10 files changed

+256
-152
lines changed

pom.xml

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
<parent>
55
<groupId>org.springframework.boot</groupId>
66
<artifactId>spring-boot-starter-parent</artifactId>
7-
<version>2.6.1</version>
7+
<version>2.6.2</version>
88
<relativePath /> <!-- lookup parent from repository -->
99
</parent>
1010
<groupId>com.github.throyer.common.spring-boot</groupId>
@@ -18,11 +18,11 @@
1818
</properties>
1919

2020
<pluginRepositories>
21-
<pluginRepository>
22-
<id>jitpack.io</id>
23-
<url>https://jitpack.io</url>
24-
</pluginRepository>
25-
</pluginRepositories>
21+
<pluginRepository>
22+
<id>jitpack.io</id>
23+
<url>https://jitpack.io</url>
24+
</pluginRepository>
25+
</pluginRepositories>
2626

2727
<dependencies>
2828
<dependency>
@@ -85,17 +85,17 @@
8585
<groupId>org.springdoc</groupId>
8686
<artifactId>springdoc-openapi-ui</artifactId>
8787
<version>1.5.13</version>
88-
</dependency>
89-
<dependency>
88+
</dependency>
89+
<dependency>
9090
<groupId>org.springdoc</groupId>
9191
<artifactId>springdoc-openapi-webmvc-core</artifactId>
9292
<version>1.5.13</version>
93-
</dependency>
94-
<dependency>
93+
</dependency>
94+
<dependency>
9595
<groupId>org.springdoc</groupId>
9696
<artifactId>springdoc-openapi-security</artifactId>
9797
<version>1.5.13</version>
98-
</dependency>
98+
</dependency>
9999

100100
<!-- Token JWT -->
101101
<dependency>

src/main/java/com/github/throyer/common/springboot/controllers/app/AppController.java

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
package com.github.throyer.common.springboot.controllers.app;
22

3+
import com.github.throyer.common.springboot.domain.repositories.UserRepository;
4+
import com.github.throyer.common.springboot.domain.services.security.SecurityService;
5+
import org.springframework.beans.factory.annotation.Autowired;
36
import org.springframework.stereotype.Controller;
47
import org.springframework.ui.Model;
58
import org.springframework.web.bind.annotation.GetMapping;
@@ -9,8 +12,15 @@
912
@RequestMapping("/app")
1013
public class AppController {
1114

15+
@Autowired
16+
private UserRepository repository;
17+
1218
@GetMapping
1319
public String index(Model model) {
20+
SecurityService.authorized()
21+
.ifPresent(session -> repository.findById(session.getId())
22+
.ifPresent(user -> model.addAttribute("name", user.getName()))
23+
);
1424
return "app/index";
15-
}
25+
}
1626
}

src/main/java/com/github/throyer/common/springboot/utils/Constants.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import com.github.throyer.common.springboot.domain.services.security.JsonWebToken;
44

55
public class Constants {
6-
public class SECURITY {
6+
public static class SECURITY {
77
public static final JsonWebToken JWT = new JsonWebToken();
88
public static final Long HOUR_IN_SECONDS = 3600L;
99
public static final Integer DAY_MILLISECONDS = 86400;

src/main/java/db/migration/V1639098081278__UpdateTableRecovery.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ public void migrate(Context context) throws Exception {
1414
create.transaction(configuration -> {
1515
using(configuration)
1616
.alterTable("recovery")
17-
.addColumn("confirmed", BOOLEAN.nullable(true))
18-
.after("code")
19-
.execute();
17+
.addColumn("confirmed", BOOLEAN.nullable(true))
18+
.after("code")
19+
.execute();
2020

2121
using(configuration)
2222
.alterTable("recovery")
23-
.addColumn("used", BOOLEAN.nullable(true))
24-
.after("confirmed")
25-
.execute();
23+
.addColumn("used", BOOLEAN.nullable(true))
24+
.after("confirmed")
25+
.execute();
2626
});
2727
}
2828
}
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
.b-example-divider {
2+
height : 3rem;
3+
background-color: rgba(0, 0, 0, .1);
4+
border : solid rgba(0, 0, 0, .15);
5+
border-width : 1px 0;
6+
box-shadow : inset 0 .5em 1.5em rgba(0, 0, 0, .1), inset 0 .125em .5em rgba(0, 0, 0, .15);
7+
}
8+
9+
.bi {
10+
vertical-align: -.125em;
11+
fill : currentColor;
12+
}
13+
14+
.feature-icon {
15+
display : inline-flex;
16+
align-items : center;
17+
justify-content: center;
18+
width : 4rem;
19+
height : 4rem;
20+
margin-bottom : 1rem;
21+
font-size : 2rem;
22+
color : #fff;
23+
border-radius : .75rem;
24+
}
25+
26+
.icon-link {
27+
display : inline-flex;
28+
align-items: center;
29+
}
30+
31+
.icon-link>.bi {
32+
margin-top : .125rem;
33+
margin-left: .125rem;
34+
transition : transform .25s ease-in-out;
35+
fill : currentColor;
36+
}
37+
38+
.icon-link:hover>.bi {
39+
transform: translate(.25rem);
40+
}
41+
42+
.icon-square {
43+
display : inline-flex;
44+
align-items : center;
45+
justify-content: center;
46+
width : 3rem;
47+
height : 3rem;
48+
font-size : 1.5rem;
49+
border-radius : .75rem;
50+
}
51+
52+
.rounded-4 {
53+
border-radius: .5rem;
54+
}
55+
56+
.rounded-5 {
57+
border-radius: 1rem;
58+
}
59+
60+
.text-shadow-1 {
61+
text-shadow: 0 .125rem .25rem rgba(0, 0, 0, .25);
62+
}
63+
64+
.text-shadow-2 {
65+
text-shadow: 0 .25rem .5rem rgba(0, 0, 0, .25);
66+
}
67+
68+
.text-shadow-3 {
69+
text-shadow: 0 .5rem 1.5rem rgba(0, 0, 0, .25);
70+
}
71+
72+
.card-cover {
73+
background-repeat : no-repeat;
74+
background-position: center center;
75+
background-size : cover;
76+
}
Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +0,0 @@
1-
body {
2-
margin-bottom: 3.5rem;
3-
}
Lines changed: 1 addition & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1 @@
1-
<footer
2-
th:fragment="footer"
3-
class="bg-light fixed-bottom d-flex flex-wrap justify-content-between align-items-center py-3 mt-4 border-top"
4-
>
5-
<div class="mx-4 col-md-4 d-flex align-items-center">
6-
<a href="/" class="mb-3 me-2 mb-md-0 text-muted text-decoration-none lh-1">
7-
<img class="d-inline-block align-top" width="30" height="30" src="https://i.imgur.com/UJ9JMCC.png">
8-
</a>
9-
<span class="text-muted">&copy; 2021</span>
10-
</div>
11-
12-
<ul class="mx-4 nav col-md-4 justify-content-end list-unstyled d-flex icon-list">
13-
<li class="ms-3">
14-
<a class="text-muted" href="https://twitter.com/Throyer_" target="_blank">
15-
<i class="fab fa-2x fa-twitter-square"></i>
16-
</a>
17-
</li>
18-
<li class="ms-3">
19-
<a class="text-muted" href="https://github.com/Throyer" target="_blank">
20-
<i class="fab fa-2x fa-github-square"></i>
21-
</a>
22-
</li>
23-
<li class="ms-3">
24-
<a class="text-muted" href="https://www.linkedin.com/in/renato-henrique-horacio/" target="_blank">
25-
<i class="fab fa-2x fa-linkedin"></i>
26-
</a>
27-
</li>
28-
</ul>
29-
</footer>
1+
<footer th:fragment="footer"></footer>

src/main/resources/templates/app/fragments/navbar.html

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,27 +12,27 @@
1212
</li>
1313
<li class="nav-item">
1414
<a
15-
th:href="@{/documentation/swagger-ui/#/}"
15+
th:href="@{/swagger-ui/index.html?configUrl=/documentation/schemas/swagger-config}"
1616
class="nav-link link-dark px-2 active"
1717
aria-current="page"
1818
>
19-
Swagger API
19+
Swagger docs
2020
</a>
2121
</li>
2222
</ul>
2323
<ul sec:authorize="isAuthenticated()" class="nav">
2424
<li class="nav-item">
2525
<a th:href="@{/app/logout}" class="nav-link link-dark px-2">
26-
Sign out
26+
Sign out <i class="fas fa-door-open"></i>
2727
</a>
2828
</li>
2929
</ul>
3030
<ul sec:authorize="!isAuthenticated()" class="nav">
3131
<li class="nav-item">
32-
<a th:href="@{/app/login}" class="nav-link link-dark px-2">Login</a>
32+
<a th:href="@{/app/login}" class="nav-link link-dark px-2">Login <i class="fas fa-door-closed"></i></a>
3333
</li>
3434
<li class="nav-item">
35-
<a th:href="@{/app/register}" class="nav-link link-dark px-2">Sign up</a>
35+
<a th:href="@{/app/register}" class="nav-link link-dark px-2">Sign up <i class="fas fa-certificate"></i></a>
3636
</li>
3737
</ul>
3838
</div>

0 commit comments

Comments
 (0)