-
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.
Start implementing admin panel. Refactored security configuration. BUG FIXED: app is now not throwing errors on client console(css/js file not found).
- Loading branch information
Showing
33 changed files
with
744 additions
and
429 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
24 changes: 24 additions & 0 deletions
24
PizzaNationApp/src/main/java/pizzaNation/config/PizzaNationConfiguration.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,24 @@ | ||
package pizzaNation.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import pizzaNation.util.DirectoryScanner; | ||
import pizzaNation.util.StaticFilesContainer; | ||
|
||
import static pizzaNation.util.WebConstants.CSS_PAGE_FILES; | ||
import static pizzaNation.util.WebConstants.JS_PAGE_FILES; | ||
|
||
/** | ||
* Created by George-Lenovo on 25/03/2018. | ||
*/ | ||
@Configuration | ||
public class PizzaNationConfiguration { | ||
|
||
@Bean | ||
public StaticFilesContainer getStaticFilesContainer() { | ||
return new StaticFilesContainer( | ||
DirectoryScanner.getDirectoryFilesNames(CSS_PAGE_FILES), | ||
DirectoryScanner.getDirectoryFilesNames(JS_PAGE_FILES) | ||
); | ||
} | ||
} |
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 |
---|---|---|
@@ -1,12 +1,10 @@ | ||
package pizzaNation.config; | ||
|
||
import org.springframework.context.annotation.Bean; | ||
import org.springframework.context.annotation.Configuration; | ||
import org.springframework.security.config.annotation.method.configuration.EnableGlobalMethodSecurity; | ||
import org.springframework.security.config.annotation.web.builders.HttpSecurity; | ||
import org.springframework.security.config.annotation.web.configuration.EnableWebSecurity; | ||
import org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter; | ||
import pizzaNation.model.PeshoModel; | ||
|
||
@Configuration | ||
@EnableWebSecurity | ||
|
@@ -33,20 +31,4 @@ protected void configure(HttpSecurity http) throws Exception { | |
.csrf() | ||
.disable();*/ | ||
} | ||
|
||
// @Bean | ||
// public StaticFilesContainer getStaticFilesContainer() { | ||
// StaticFilesContainer filesContainer = new StaticFilesContainer(); | ||
// filesContainer.setCssFiles(DirectoryScanner.getDirectoryFilesNames(CSS_PAGE_FILES)); | ||
// filesContainer.setJsFiles(DirectoryScanner.getDirectoryFilesNames(JS_PAGE_FILES)); | ||
// return filesContainer; | ||
// } | ||
|
||
//ako stane,nov config file i tam | ||
@Bean | ||
public PeshoModel getPeshoModel() { | ||
PeshoModel peshoModel = new PeshoModel(); | ||
peshoModel.setEmail("[email protected]"); | ||
return peshoModel; | ||
} | ||
} |
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: 0 additions & 19 deletions
19
PizzaNationApp/src/main/java/pizzaNation/model/PeshoModel.java
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
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
88 changes: 88 additions & 0 deletions
88
PizzaNationApp/src/main/resources/static/css/page/admin.css
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,88 @@ | ||
/*Menu Style*/ | ||
.menu_item_secondary { | ||
background-image: url('../../img/menu/secondary.jpg'); | ||
} | ||
|
||
div#menu_page { | ||
padding: 20px 0 20px 0; | ||
} | ||
|
||
div.menu_item { | ||
float: left; | ||
} | ||
|
||
div.menu_item_third { | ||
width: 33.3%; | ||
} | ||
|
||
div.menu_item_pad { | ||
padding: 8px; | ||
padding: 12px; | ||
} | ||
|
||
div.menu_inner { | ||
background: #FFFFFF; | ||
position: relative; | ||
|
||
background-color: #FFFFFF; | ||
background-repeat: no-repeat; | ||
background-position: top center; | ||
background-size: cover; | ||
-moz-background-size: cover; | ||
-webkit-background-size: cover; | ||
-o-background-size: cover; | ||
} | ||
|
||
div.menu_item_third div.menu_inner, | ||
div.menu_item_third div.menu_inner_quick, | ||
div.menu_item_third div.menu_inner a { | ||
height: 200px; | ||
} | ||
|
||
div.menu_title { | ||
position: absolute; | ||
z-index: 100; | ||
width: 90%; | ||
left: 5%; | ||
height: 46px; | ||
|
||
background: #FFFFFF; | ||
background: rgba(255, 255, 255, 0.8); | ||
|
||
background: #E0121A; | ||
background: rgba(224, 18, 26, 0.8); | ||
|
||
background: #0054A5; | ||
background: rgba(0, 84, 165, 0.8); | ||
|
||
background: #333333; | ||
background: rgba(51, 51, 51, 0.6); | ||
|
||
-webkit-transition: 0.15s; | ||
transition: 0.25s; | ||
|
||
text-align: center; | ||
} | ||
|
||
div.menu_hover:hover div.menu_title { | ||
background: rgba(51, 51, 51, 1); | ||
background: #e0121a; | ||
} | ||
|
||
div.menu_item_third div.menu_title { | ||
top: 135px; | ||
} | ||
|
||
div.menu_title_pad { | ||
padding: 10px; | ||
} | ||
|
||
div.menu_title h2, | ||
div.menu_title h3 { | ||
font-size: 26px; | ||
margin: 0; | ||
line-height: 1em; | ||
|
||
color: #ec0d0d; | ||
color: #FFFFFF; | ||
} |
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,18 @@ | ||
// When the user scrolls down 20px from the top of the document, show the button | ||
window.onscroll = function () { | ||
scrollFunction() | ||
}; | ||
|
||
function scrollFunction() { | ||
if (document.body.scrollTop > 20 || document.documentElement.scrollTop > 20) { | ||
document.getElementById("gotoTopBtn").style.display = "block"; | ||
} else { | ||
document.getElementById("gotoTopBtn").style.display = "none"; | ||
} | ||
} | ||
|
||
// When the user clicks on the button, scroll to the top of the document | ||
function topFunction() { | ||
document.body.scrollTop = 0; | ||
document.documentElement.scrollTop = 0; | ||
} |
24 changes: 23 additions & 1 deletion
24
PizzaNationApp/src/main/resources/templates/admin/admin.html
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 |
---|---|---|
@@ -1,3 +1,25 @@ | ||
<main> | ||
admin panel in process | ||
<div class="page_bckgrnd_img"> | ||
<div class="wrapper"> | ||
<div id="menu_page"> | ||
|
||
<th:block th:each="i: ${#numbers.sequence(0, 8)}"> | ||
<div class="menu_item menu_item_third"> | ||
<div class="menu_item_pad"> | ||
<div class="menu_inner menu_hover shadow_element menu_item_secondary"> | ||
<div class="menu_title"> | ||
<div class="menu_title_pad"> | ||
<h3>Desserts</h3> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
</th:block> | ||
|
||
<div class="clear"><!-- clear --></div> | ||
|
||
</div> | ||
</div> | ||
</div> | ||
</main> |
Oops, something went wrong.