diff --git a/build.gradle b/build.gradle index 4fb0185..04bdf8c 100644 --- a/build.gradle +++ b/build.gradle @@ -117,11 +117,12 @@ dependencies { compile group: 'org.apache.commons', name: 'commons-lang3', version: '3.7' - compile group: 'org.webjars', name: 'bootstrap', version: '4.1.0' - compile group: 'org.webjars', name: 'bootstrap-select', version: '1.13.3' - compile group: 'org.webjars', name: 'jquery', version: '3.3.1-1' - compile group: 'org.webjars.npm', name: 'jquery.easing', version: '1.4.1' - compile group: 'org.webjars', name: 'font-awesome', version: '4.7.0' + //primefaces + compile group: 'org.primefaces', name: 'primefaces', version: '7.0' + compile group: 'net.bootsfaces', name: 'bootsfaces', version: '1.4.2' + compile group: 'org.joinfaces', name: 'jsf-spring-boot-starter', version: '4.0.8' + compile group: 'org.javassist', name: 'javassist', version: '3.25.0-GA' + compile group: 'org.primefaces.themes', name: 'all-themes', version: '1.0.10' compile group: 'io.springfox', name: 'springfox-swagger2', version: '2.6.0' compile group: 'io.springfox', name: 'springfox-swagger-ui', version: '2.6.0' @@ -132,4 +133,4 @@ dependencies { testCompile group: 'org.seleniumhq.selenium', name: 'selenium-support', version: '3.3.1' //testCompile group: 'com.google.guava', name: 'guava', version: '21.0' testCompile group: 'org.mockito', name: 'mockito-all', version: '1.10.19' -} \ No newline at end of file +} diff --git a/src/main/java/ru/ulstu/configuration/MvcConfiguration.java b/src/main/java/ru/ulstu/configuration/MvcConfiguration.java index 35e9ad2..b1c5806 100644 --- a/src/main/java/ru/ulstu/configuration/MvcConfiguration.java +++ b/src/main/java/ru/ulstu/configuration/MvcConfiguration.java @@ -1,7 +1,6 @@ package ru.ulstu.configuration; import org.springframework.context.annotation.Configuration; -import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.ViewControllerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; @@ -9,20 +8,8 @@ import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; public class MvcConfiguration implements WebMvcConfigurer { @Override public void addViewControllers(ViewControllerRegistry registry) { - registry.addViewController("/{articlename:\\w+}"); - registry.addViewController("/admin/{articlename:\\w+}"); - registry.addViewController("/papers/{articlename:\\w+}"); - registry.addViewController("/grants/{articlename:\\w+}"); - registry.addViewController("/conferences/{articlename:\\w+}"); - registry.addViewController("/students/{articlename:\\w+}"); - registry.addRedirectViewController("/", "/index"); - registry.addRedirectViewController("/default", "/index"); - } + registry.addRedirectViewController("/", "/index.xhtml"); + registry.addRedirectViewController("/default", "/index.xhtml"); - @Override - public void addResourceHandlers(ResourceHandlerRegistry registry) { - registry - .addResourceHandler("/webjars/**") - .addResourceLocations("/webjars/"); } } diff --git a/src/main/java/ru/ulstu/index/controller/IndexView.java b/src/main/java/ru/ulstu/index/controller/IndexView.java new file mode 100644 index 0000000..c87daf6 --- /dev/null +++ b/src/main/java/ru/ulstu/index/controller/IndexView.java @@ -0,0 +1,27 @@ +package ru.ulstu.index.controller; + +import ru.ulstu.index.model.Section; + +import javax.annotation.PostConstruct; +import javax.faces.view.ViewScoped; +import javax.inject.Named; +import java.util.ArrayList; +import java.util.List; + +@Named +@ViewScoped +public class IndexView { + private List
sections = new ArrayList<>(); + + @PostConstruct + public void init() { + sections.add(new Section("Статьи", "papers.jpg")); + sections.add(new Section("Гранты", "grants.jpg")); + sections.add(new Section("Проекты", "projects.jpg")); + sections.add(new Section("Проекты", "projects.jpg")); + } + + public List
getSections() { + return sections; + } +} diff --git a/src/main/java/ru/ulstu/index/model/Section.java b/src/main/java/ru/ulstu/index/model/Section.java new file mode 100644 index 0000000..d11a4c9 --- /dev/null +++ b/src/main/java/ru/ulstu/index/model/Section.java @@ -0,0 +1,27 @@ +package ru.ulstu.index.model; + +public class Section { + private String title; + private String image; + + public Section(String title, String image) { + this.title = title; + this.image = image; + } + + public String getTitle() { + return title; + } + + public void setTitle(String title) { + this.title = title; + } + + public String getImage() { + return image; + } + + public void setImage(String image) { + this.image = image; + } +} diff --git a/src/main/resources/META-INF/resources/basicTemplate.xhtml b/src/main/resources/META-INF/resources/basicTemplate.xhtml new file mode 100644 index 0000000..6c4a8f2 --- /dev/null +++ b/src/main/resources/META-INF/resources/basicTemplate.xhtml @@ -0,0 +1,24 @@ + + + + + + Fuzzy logic + + + + + +
+
+
+
+ Content +
+
+
+
+ diff --git a/src/main/resources/META-INF/resources/css/style.css b/src/main/resources/META-INF/resources/css/style.css new file mode 100644 index 0000000..8020cf6 --- /dev/null +++ b/src/main/resources/META-INF/resources/css/style.css @@ -0,0 +1,7 @@ +.ui-picklist-list-wrapper { + width: 50% !important; +} + +.ui-picklist-list { + width: 100% !important; +} diff --git a/src/main/resources/META-INF/resources/img/conference/back.png b/src/main/resources/META-INF/resources/img/conference/back.png new file mode 100644 index 0000000..7667350 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/conference/back.png differ diff --git a/src/main/resources/META-INF/resources/img/conference/delete.png b/src/main/resources/META-INF/resources/img/conference/delete.png new file mode 100644 index 0000000..595bf63 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/conference/delete.png differ diff --git a/src/main/resources/META-INF/resources/img/conference/edit.png b/src/main/resources/META-INF/resources/img/conference/edit.png new file mode 100644 index 0000000..832bef3 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/conference/edit.png differ diff --git a/src/main/resources/META-INF/resources/img/conference/paper.png b/src/main/resources/META-INF/resources/img/conference/paper.png new file mode 100644 index 0000000..78a0dfc Binary files /dev/null and b/src/main/resources/META-INF/resources/img/conference/paper.png differ diff --git a/src/main/resources/META-INF/resources/img/header-bg.jpg b/src/main/resources/META-INF/resources/img/header-bg.jpg new file mode 100644 index 0000000..6ac14cf Binary files /dev/null and b/src/main/resources/META-INF/resources/img/header-bg.jpg differ diff --git a/src/main/resources/META-INF/resources/img/main/ajax-loader.gif b/src/main/resources/META-INF/resources/img/main/ajax-loader.gif new file mode 100644 index 0000000..f2a1bc0 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/ajax-loader.gif differ diff --git a/src/main/resources/META-INF/resources/img/main/career.jpg b/src/main/resources/META-INF/resources/img/main/career.jpg new file mode 100644 index 0000000..71615c2 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/career.jpg differ diff --git a/src/main/resources/META-INF/resources/img/main/conf.jpg b/src/main/resources/META-INF/resources/img/main/conf.jpg new file mode 100644 index 0000000..bf10948 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/conf.jpg differ diff --git a/src/main/resources/META-INF/resources/img/main/grants.jpg b/src/main/resources/META-INF/resources/img/main/grants.jpg new file mode 100644 index 0000000..d7de0e0 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/grants.jpg differ diff --git a/src/main/resources/META-INF/resources/img/main/papers.jpg b/src/main/resources/META-INF/resources/img/main/papers.jpg new file mode 100644 index 0000000..055f864 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/papers.jpg differ diff --git a/src/main/resources/META-INF/resources/img/main/projects.jpg b/src/main/resources/META-INF/resources/img/main/projects.jpg new file mode 100644 index 0000000..d3085b7 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/projects.jpg differ diff --git a/src/main/resources/META-INF/resources/img/main/students.jpg b/src/main/resources/META-INF/resources/img/main/students.jpg new file mode 100644 index 0000000..25ea94a Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/students.jpg differ diff --git a/src/main/resources/META-INF/resources/img/main/tasks.jpg b/src/main/resources/META-INF/resources/img/main/tasks.jpg new file mode 100644 index 0000000..ca20f61 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/tasks.jpg differ diff --git a/src/main/resources/META-INF/resources/img/main/team.jpg b/src/main/resources/META-INF/resources/img/main/team.jpg new file mode 100644 index 0000000..f30744d Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/team.jpg differ diff --git a/src/main/resources/META-INF/resources/img/main/templates.jpg b/src/main/resources/META-INF/resources/img/main/templates.jpg new file mode 100644 index 0000000..9cafc26 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/main/templates.jpg differ diff --git a/src/main/resources/META-INF/resources/img/map-image.png b/src/main/resources/META-INF/resources/img/map-image.png new file mode 100644 index 0000000..a047a27 Binary files /dev/null and b/src/main/resources/META-INF/resources/img/map-image.png differ diff --git a/src/main/resources/META-INF/resources/index.xhtml b/src/main/resources/META-INF/resources/index.xhtml new file mode 100644 index 0000000..583486e --- /dev/null +++ b/src/main/resources/META-INF/resources/index.xhtml @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + + diff --git a/src/main/resources/application.properties b/src/main/resources/application.properties index 1949a5b..42368ba 100644 --- a/src/main/resources/application.properties +++ b/src/main/resources/application.properties @@ -14,6 +14,9 @@ server.ssl.key-password=password logging.level.ru.ulstu=DEBUG #HtmlUnit logging.level.com.gargoylesoftware.htmlunit=ERROR +#jsf +joinfaces.primefaces.theme=bootstrap +joinfaces.primefaces.font-awesome=true # Mail Settings spring.mail.host=smtp.yandex.ru spring.mail.port=465