From 9ef1c4054171a764c9a799df2ab485beb938ecc8 Mon Sep 17 00:00:00 2001 From: Miguel Reboiro-Jato Date: Thu, 8 Feb 2018 22:45:33 +0100 Subject: [PATCH] Improves application appearance The application appearance has been improved applying Bootstrap formats. --- .../java/es/uvigo/esei/daa/LoginFilter.java | 2 +- src/main/webapp/css/login.css | 49 ++++++++++++++++ src/main/webapp/index.html | 39 +++++++------ src/main/webapp/js/view/people.js | 43 +++++++------- src/main/webapp/main.html | 56 ++++++++++++------- 5 files changed, 132 insertions(+), 57 deletions(-) create mode 100644 src/main/webapp/css/login.css diff --git a/src/main/java/es/uvigo/esei/daa/LoginFilter.java b/src/main/java/es/uvigo/esei/daa/LoginFilter.java index 6dd8ad2..0e5c102 100644 --- a/src/main/java/es/uvigo/esei/daa/LoginFilter.java +++ b/src/main/java/es/uvigo/esei/daa/LoginFilter.java @@ -35,7 +35,7 @@ public class LoginFilter implements Filter { private static final String LOGOUT_PATH = "/logout"; private static final String REST_PATH = "/rest"; private static final String[] PUBLIC_PATHS = new String[] { - "/index.html" // Add the paths that can be publicly accessed (e.g. /js, /css...) + "/index.html", "/js", "/css" // Add the paths that can be publicly accessed (e.g. /images...) }; @Override diff --git a/src/main/webapp/css/login.css b/src/main/webapp/css/login.css new file mode 100644 index 0000000..e336712 --- /dev/null +++ b/src/main/webapp/css/login.css @@ -0,0 +1,49 @@ +html, body { + height: 100%; +} + +body { + display: -ms-flexbox; + display: -webkit-box; + display: flex; + -ms-flex-align: center; + -ms-flex-pack: center; + -webkit-box-align: center; + align-items: center; + -webkit-box-pack: center; + justify-content: center; + padding-top: 40px; + padding-bottom: 40px; + background-color: red; +} + +.form-signin { + width: 100%; + max-width: 330px; + padding: 15px; + margin: 0 auto; +} + +.form-signin .form-control { + position: relative; + box-sizing: border-box; + height: auto; + padding: 10px; + font-size: 16px; +} + +.form-signin .form-control:focus { + z-index: 2; +} + +#login { + margin-bottom: -1px; + border-bottom-right-radius: 0; + border-bottom-left-radius: 0; +} + +#password { + margin-bottom: 10px; + border-top-left-radius: 0; + border-top-right-radius: 0; +} \ No newline at end of file diff --git a/src/main/webapp/index.html b/src/main/webapp/index.html index a688425..d372c33 100644 --- a/src/main/webapp/index.html +++ b/src/main/webapp/index.html @@ -1,20 +1,25 @@ - - -DAA Example - Login - - -
-
- Login: -
-
- Password: -
-
- -
-
- + + + + + DAA Example - Login + + + + + +
+

DAA Example

+ + + + + + + + +
+ \ No newline at end of file diff --git a/src/main/webapp/js/view/people.js b/src/main/webapp/js/view/people.js index 2c0b0e5..87e7433 100644 --- a/src/main/webapp/js/view/people.js +++ b/src/main/webapp/js/view/people.js @@ -124,12 +124,11 @@ var PeopleView = (function() { var insertPeopleList = function(parent) { parent.append( - '\ - \ - \ - \ - \ - \ + '
NombreApellido
\ + \ + \ + \ + \ \
NombreApellido 
' ); @@ -137,25 +136,31 @@ var PeopleView = (function() { var insertPeopleForm = function(parent) { parent.append( - '
\ + '\ \ - \ - \ - \ - \ +
\ +
\ + \ +
\ +
\ + \ +
\ +
\ + \ + \ +
\ +
\
' ); }; var createPersonRow = function(person) { - return '\ - ' + person.name + '\ - ' + person.surname + '\ - \ - Edit\ - \ - \ - Delete\ + return '\ + ' + person.name + '\ + ' + person.surname + '\ + \ + Editar\ + Eliminar\ \ '; }; diff --git a/src/main/webapp/main.html b/src/main/webapp/main.html index 461f6e5..d3d786f 100644 --- a/src/main/webapp/main.html +++ b/src/main/webapp/main.html @@ -1,24 +1,40 @@ - - -DAA Example - - -
-

People

- Logout -
+ + + + DAA Example + + + + +
+ +
- - - - - +
+
+

People

+
+
+ + + + + + \ No newline at end of file -- 2.18.1