Skip to content

Commit

Permalink
新增自定义demo主题
Browse files Browse the repository at this point in the history
  • Loading branch information
kawhii committed Oct 11, 2017
1 parent f4b485a commit 4c78e40
Show file tree
Hide file tree
Showing 5 changed files with 87 additions and 4 deletions.
2 changes: 0 additions & 2 deletions sso-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -118,9 +118,7 @@
<exclude>WEB-INF/classes/services/*</exclude>
<exclude>WEB-INF/classes/application.*</exclude>
<exclude>WEB-INF/classes/bootstrap.properties</exclude>
<exclude>WEB-INF/classes/apereo.properties</exclude>
<exclude>**/user-details.properties</exclude>
<exclude>**/messages_*.properties</exclude>
<exclude>**/truststore.jks</exclude>
<exclude>**/*.md</exclude>
</excludes>
Expand Down
11 changes: 11 additions & 0 deletions sso-server/src/main/resources/demo.properties
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#
# \u7248\u6743\u6240\u6709.(c)2008-2017.\u5361\u5C14\u79D1\u6280\u5DE5\u4F5C\u5BA4
#
demo.css.file=/themes/demo/css/demo.css
demo.pageTitle=demo page title

standard.custom.css.file=/css/cas.css
admin.custom.css.file=/css/admin.css
cas.javascript.file=/js/cas.js


Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{
"@class": "org.apereo.cas.services.RegexRegisteredService",
"serviceId": "^(http|https)://(localhost|192.168).*",
"serviceId": "^http://(localhost|192.168).*",
"name": "Local Services",
"id": 10000002,
"description": "this is a localhost service",
"evaluationOrder": 10000000
"evaluationOrder": 10000000,
"theme":"demo"
}
7 changes: 7 additions & 0 deletions sso-server/src/main/resources/static/themes/demo/css/demo.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
/*
* 版权所有.(c)2008-2017.卡尔科技工作室
*/

h1 {
color: blue;
}
66 changes: 66 additions & 0 deletions sso-server/src/main/resources/templates/demo/casLoginView.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
<!DOCTYPE html>
<!--
~ 版权所有.(c)2008-2017.卡尔科技工作室
-->
<html>
<head>
<meta charset="UTF-8"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<meta http-equiv="X-UA-Compatible" content="IE=edge"/>
<title th:text="${#themes.code('demo.pageTitle')}"></title>
<link rel="stylesheet" th:href="@{${#themes.code('demo.css.file')}}"/>
</head>

<body>
<h1 th:text="${#themes.code('demo.pageTitle')}"></h1>
<div>
<form method="post" th:object="${credential}">
<div th:if="${#fields.hasErrors('*')}">
<span th:each="err : ${#fields.errors('*')}" th:utext="${err}"/>
</div>
<h2 th:utext="#{screen.welcome.instructions}"></h2>

<section class="row">
<label for="username" th:utext="#{screen.welcome.label.netid}"/>
<div th:unless="${openIdLocalId}">
<input class="required"
id="username"
size="25"
tabindex="1"
type="text"
th:disabled="${guaEnabled}"
th:field="*{username}"
th:accesskey="#{screen.welcome.label.netid.accesskey}"
autocomplete="off"/>
</div>
</section>

<section class="row">
<label for="password" th:utext="#{screen.welcome.label.password}"/>
<div>
<input class="required"
type="password"
id="password"
size="25"
tabindex="2"
th:accesskey="#{screen.welcome.label.password.accesskey}"
th:field="*{password}"
autocomplete="off"/>
</div>
</section>

<section>
<input type="hidden" name="execution" th:value="${flowExecutionKey}"/>
<input type="hidden" name="_eventId" value="submit"/>
<input type="hidden" name="geolocation"/>
<input class="btn btn-submit btn-block"
name="submit"
accesskey="l"
th:value="#{screen.welcome.button.login}"
tabindex="6"
type="submit"/>
</section>
</form>
</div>
</body>
</html>

0 comments on commit 4c78e40

Please sign in to comment.