Skip to content

Commit

Permalink
Merge pull request #630 from support-project/feature/issue186
Browse files Browse the repository at this point in the history
Feature/issue186
  • Loading branch information
koda-masaru authored Feb 6, 2017
2 parents c2d7c0f + 9279bda commit 050b626
Show file tree
Hide file tree
Showing 5 changed files with 123 additions and 94 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
package org.support.project.knowledge.deploy.v0_0_1;

import java.io.IOException;
import java.io.UnsupportedEncodingException;

import org.support.project.common.util.FileUtil;
import org.support.project.knowledge.config.AppConfig;
import org.support.project.knowledge.dao.ServiceConfigsDao;
import org.support.project.knowledge.dao.ServiceLocaleConfigsDao;
import org.support.project.knowledge.dao.gen.DatabaseControlDao;
import org.support.project.knowledge.deploy.Migrate;
import org.support.project.knowledge.entity.ServiceConfigsEntity;
import org.support.project.knowledge.entity.ServiceLocaleConfigsEntity;
import org.support.project.ormapping.tool.dao.InitializeDao;
import org.support.project.web.config.WebConfig;
import org.support.project.web.dao.RolesDao;
Expand All @@ -24,7 +33,7 @@ public boolean doMigrate() throws Exception {
return true;
}

private void addInitDatas() {
private void addInitDatas() throws UnsupportedEncodingException, IOException {
// 権限の追加
RolesEntity adminRole = RolesEntity.get();
adminRole.setRoleId(1);
Expand Down Expand Up @@ -53,6 +62,19 @@ private void addInitDatas() {
userRolesEntity.setUserId(1);
userRolesEntity.setRoleId(1);
userRolesDao.save(userRolesEntity);

ServiceConfigsEntity serviceConfigsEntity = new ServiceConfigsEntity(AppConfig.get().getSystemName());
serviceConfigsEntity.setServiceLabel(AppConfig.get().getSystemName());
serviceConfigsEntity.setServiceIcon("fa-book");
ServiceConfigsDao.get().insert(serviceConfigsEntity);

ServiceLocaleConfigsEntity en = new ServiceLocaleConfigsEntity("en", AppConfig.get().getSystemName());
en.setPageHtml(FileUtil.read(getClass().getResourceAsStream("/org/support/project/knowledge/deploy/v1_8_0/top_info.html")));
ServiceLocaleConfigsDao.get().insert(en);

ServiceLocaleConfigsEntity ja = new ServiceLocaleConfigsEntity("ja", AppConfig.get().getSystemName());
ja.setPageHtml(FileUtil.read(getClass().getResourceAsStream("/org/support/project/knowledge/deploy/v1_8_0/top_info_ja.html")));
ServiceLocaleConfigsDao.get().insert(ja);
}

private void createTables() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="headerimg">
<div id="headerwrap" onclick="location.href='/knowledge/open.knowledge/list';" style="cursor: pointer;">
<div id="headerwrap">
<h1><span><i class="fa fa-book"></i>&nbsp;Knowledge</span></h1>
<h2><span>Free Knowledge Base System</span></h2>
<br/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<div id="headerimg">
<div id="headerwrap" onclick="location.href='/knowledge/open.knowledge/list';" style="cursor: pointer;">
<div id="headerwrap">
<h1><span><i class="fa fa-book"></i>&nbsp;Knowledge</span></h1>
<h2><span>Free Knowledge Base System</span></h2>
<br/>
Expand Down
9 changes: 8 additions & 1 deletion src/main/webapp/WEB-INF/views/index/index.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,13 @@
<!-- endbuild -->
</c:param>
<c:param name="PARAM_SCRIPTS">
<script type="text/javascript">
$(document).ready(function() {
$('#headerwrap').click(function() {
location.href='<%= request.getContextPath()%>/open.knowledge/list';
});
});
</script>
</c:param>

<c:param name="PARAM_CONTENT">
Expand All @@ -31,7 +38,7 @@
<%= SanitizingLogic.get().sanitize(localeConfig.getPageHtml()) %>
<% } else { %>
<div id="headerimg">
<div id="headerwrap" onclick="location.href='<%= request.getContextPath()%>/open.knowledge/list';" style="cursor: pointer;">
<div id="headerwrap">
<h1><span><i class="fa fa-book"></i>&nbsp;Knowledge</span></h1>
<h2><span>Free Knowledge Base System</span></h2>
<br/>
Expand Down
180 changes: 90 additions & 90 deletions src/main/webapp/css/top.css
Original file line number Diff line number Diff line change
@@ -1,146 +1,146 @@
#headerimg {
position: relative;
width: 100%;
min-height: 100%;
height: auto !important;
height: 100%;
padding: 0px;
margin: 0px;
position: relative;
width: 100%;
min-height: 100%;
height: auto !important;
height: 100%;
padding: 0px;
margin: 0px;
}

#headerwrap {
background: url('../images/startup-594090_1280.jpg') no-repeat center top;
margin-top: -70px;
padding-top: 20px;
min-height: 600px;
width: 100%;
text-align: center;

background-attachment: relative;
background-position: center center;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
background-size: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
background: url('../images/startup-594090_1280.jpg') no-repeat center top;
margin-top: -70px;
padding-top: 20px;
min-height: 600px;
width: 100%;
text-align: center;
cursor: pointer;
background-attachment: relative;
background-position: center center;
-webkit-background-size: 100%;
-moz-background-size: 100%;
-o-background-size: 100%;
background-size: 100%;
-webkit-background-size: cover;
-moz-background-size: cover;
-o-background-size: cover;
background-size: cover;
}

#headerwrap h1, #headerwrap h2 {
margin-top: 50px;
color: rgba(255, 69, 0, 0.9);
text-shadow: 0 0 25px #edf8ff, 0 0 20px #edf8ff, 0 0 0.40px #edf8ff;
margin-top: 50px;
color: rgba(255, 69, 0, 0.9);
text-shadow: 0 0 25px #edf8ff, 0 0 20px #edf8ff, 0 0 0.40px #edf8ff;
}
#headerwrap h1 {
font-size: 120px;
font-weight: 700;
letter-spacing: 3px;
font-size: 120px;
font-weight: 700;
letter-spacing: 3px;
}
#headerwrap h2 {
font-size: 50px;
font-weight: 300;
letter-spacing: 2px;
font-size: 50px;
font-weight: 300;
letter-spacing: 2px;
}

/*
#headerwrap h1 span, #headerwrap h2 span {
background-color: rgba( 100, 100, 100, 0.50 );
border: 1px solid rgba( 100, 100, 100, 0.50 );
padding:10px;
border-radius: 50px;
-webkit-border-radius: 50px;
-moz-border-radius: 50px;
background-color: rgba( 100, 100, 100, 0.50 );
border: 1px solid rgba( 100, 100, 100, 0.50 );
padding:10px;
border-radius: 50px;
-webkit-border-radius: 50px;
-moz-border-radius: 50px;
}
*/

@media screen and (max-width: 340px) {
#headerwrap h1 {
font-size: 40px;
}
#headerwrap h2 {
font-size: 20px;
}
#headerwrap h1 {
font-size: 40px;
}
#headerwrap h2 {
font-size: 20px;
}
}
@media screen and (min-width: 341px) and (max-width: 580px) {
#headerwrap h1 {
font-size: 40px;
}
#headerwrap h2 {
font-size: 20px;
}
#headerwrap h1 {
font-size: 40px;
}
#headerwrap h2 {
font-size: 20px;
}
}
@media screen and (min-width: 581px) and (max-width: 800px) {
#headerwrap h1 {
font-size: 70px;
}
#headerwrap h1 {
font-size: 70px;
}
}
@media screen and (min-width: 801px) and (max-width: 1000px) {
#headerwrap h1 {
font-size: 90px;
}
#headerwrap h1 {
font-size: 90px;
}
}

.get-start,.get-start:link,.get-start:visited,.get-start:active {
font-size: 32px;
margin: 10px;
background-color: #FF6600;
color: white;
border-radius: 30px;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
font-size: 32px;
margin: 10px;
background-color: #FF6600;
color: white;
border-radius: 30px;
-webkit-border-radius: 30px;
-moz-border-radius: 30px;
}
.get-start:hover {
background-color: #CC3333;
color: white;
background-color: #CC3333;
color: white;
}

.contects {
}

.subtitle {
margin-top: 20px;
margin-bottom: 20px;
text-align: center;
font-size: 32px;
margin-top: 20px;
margin-bottom: 20px;
text-align: center;
font-size: 32px;
}
.subtitle .description {
font-size: 18px;
font-size: 18px;
}


#about {
text-align: center;
width: 100%;
text-align: center;
width: 100%;
}

.about-icon {
margin-top: 10px;
text-align: center;
margin-top: 10px;
text-align: center;
}
.icon-img {
font-size: 48px;
color: #0099CC;
width: 100px;
height: 100px;
line-height: 100px;
border: 2px solid #0099CC;
border-radius: 50px;
-webkit-border-radius: 50px;
-moz-border-radius: 50px;
font-size: 48px;
color: #0099CC;
width: 100px;
height: 100px;
line-height: 100px;
border: 2px solid #0099CC;
border-radius: 50px;
-webkit-border-radius: 50px;
-moz-border-radius: 50px;
}
.about-title {
padding: 10px;
text-align: center;
font-size: 20px;
}
padding: 10px;
text-align: center;
font-size: 20px;
}
.about-description {
padding: 10px;
padding: 10px;
}


.navbar-default {
background: #333333;
background: #333333;
}

0 comments on commit 050b626

Please sign in to comment.