Skip to content

Commit 096879e

Browse files
committed
Clean-up
* Removed properties that are no longer needed due to FE rework * Futher cleaned up cas.css to sperate vanilla Apereo styles and OSF CAS customized ones; and re-organized the styles for better context awareness and readability. * Minor fixes / improvements for a few pages.
1 parent be45862 commit 096879e

7 files changed

Lines changed: 75 additions & 90 deletions

File tree

etc/cas/config/cas.properties

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -76,16 +76,6 @@ cas.authn.osf-url.logout=https://{{ .Values.osfDomain }}/logout/
7676
cas.authn.osf-url.resend-confirmation=https://{{ .Values.osfDomain }}/resend/
7777
cas.authn.osf-url.forgot-password=https://{{ .Values.osfDomain }}/forgotpassword/
7878
cas.authn.osf-url.register=https://{{ .Values.osfDomain }}/register/
79-
cas.authn.osf-url.search=https://{{ .Values.osfDomain }}/search/
80-
cas.authn.osf-url.support=https://{{ .Values.osfDomain }}/support/
81-
cas.authn.osf-url.donate=https://www.cos.io/about/support-cos/
82-
#
83-
# OSF Products
84-
#
85-
cas.authn.osf-url.preprints-home=https://{{ .Values.osfDomain }}/preprints/
86-
cas.authn.osf-url.registries-home=https://{{ .Values.osfDomain }}/registries/
87-
cas.authn.osf-url.institutions-home=https://{{ .Values.osfDomain }}/institutions/
88-
cas.authn.osf-url.meetings-home=https://{{ .Values.osfDomain }}/meetings/
8979
########################################################################################################################
9080

9181
########################################################################################################################

etc/cas/config/local/cas-local.properties

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,6 @@ cas.authn.osf-url.logout=http://localhost:5000/logout/
7777
cas.authn.osf-url.resend-confirmation=http://localhost:5000/resend/
7878
cas.authn.osf-url.forgot-password=http://localhost:5000/forgotpassword/
7979
cas.authn.osf-url.register=http://localhost:5000/register/
80-
cas.authn.osf-url.search=http://localhost:5000/search/
81-
cas.authn.osf-url.support=http://localhost:5000/support/
82-
cas.authn.osf-url.donate=https://www.cos.io/about/support-cos/
83-
#
84-
# OSF Products
85-
#
86-
cas.authn.osf-url.preprints-home=http://localhost:5000/preprints/
87-
cas.authn.osf-url.registries-home=http://localhost:5000/registries/
88-
cas.authn.osf-url.institutions-home=http://localhost:5000/institutions/
89-
cas.authn.osf-url.meetings-home=http://localhost:5000/meetings/
9080
########################################################################################################################
9181

9282
########################################################################################################################

src/main/java/io/cos/cas/osf/configuration/model/OsfUrlProperties.java

Lines changed: 0 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -61,41 +61,6 @@ public class OsfUrlProperties implements Serializable {
6161
*/
6262
private String forgotPassword;
6363

64-
/**
65-
* OSF Preprints landing page URL.
66-
*/
67-
private String preprintsHome;
68-
69-
/**
70-
* OSF Registries landing page URL.
71-
*/
72-
private String registriesHome;
73-
74-
/**
75-
* OSF Institutions landing page URL.
76-
*/
77-
private String institutionsHome;
78-
79-
/**
80-
* OSF meetings landing page URL.
81-
*/
82-
private String meetingsHome;
83-
84-
/**
85-
* OSF search page URL.
86-
*/
87-
private String search;
88-
89-
/**
90-
* OSF support page URL.
91-
*/
92-
private String support;
93-
94-
/**
95-
* OSF / COS donation page URL.
96-
*/
97-
private String donate;
98-
9964
/**
10065
* Build the default service URL using OSF login endpoint with OSF home page as destination.
10166
*/

src/main/resources/messages.properties

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -627,6 +627,7 @@ authenticationFailure.TermsOfServiceConsentRequiredException=
627627
#
628628
screen.error.page.loginagain=Log in again
629629
screen.authnerror.instructions=Oops! Something went wrong ...
630+
screen.authnerror.instructions.devmode=Developer mode only !!!
630631
screen.authnerror.button.resendosfconfirmation=Resend confirmation email
631632
screen.authnerror.button.backtoosf=Exit and go back to OSF
632633
screen.accountdisabled.heading=Account disabled

src/main/resources/static/css/cas.css

Lines changed: 65 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
/**************************************************
2+
* Start of default styles as of Apereo CAS 6.2.x *
3+
**************************************************/
4+
15
/* Root / Reset */
26

37
:root {
@@ -114,6 +118,20 @@ header>nav .cas-brand .cas-logo {
114118
border: none;
115119
}
116120

121+
/**
122+
* Disabled for OSF CAS.
123+
*
124+
* @media screen and (max-width: 767.99px) {
125+
* .login-section {
126+
* border-right: none;
127+
* border-bottom: 1px solid rgba(0, 0, 0, .2);
128+
* border-bottom: var(--cas-theme-border-light, 1px solid rgba(0, 0, 0, .2));
129+
* max-width: none;
130+
* padding: 0 1.5rem;
131+
* }
132+
* }
133+
*/
134+
117135
.close {
118136
font-size: 1.5rem;
119137
font-weight: 700;
@@ -122,7 +140,6 @@ header>nav .cas-brand .cas-logo {
122140
text-shadow: 0 1px 0 #fff;
123141
text-transform: none;
124142
text-decoration: none;
125-
;
126143
}
127144

128145
button.close {
@@ -209,6 +226,16 @@ button.close {
209226
margin-right: 0.375rem;
210227
}
211228

229+
/**
230+
* Disabled for OSF CAS.
231+
*
232+
* @media screen and (max-width: 767.99px) {
233+
* .logout-banner {
234+
* width: 100%;
235+
* }
236+
* }
237+
*/
238+
212239
.cas-footer {
213240
font-size: 0.75rem;
214241
}
@@ -568,7 +595,13 @@ button.close {
568595
border-radius: 4px;
569596
}
570597

571-
/* customized styles for OSF CAS */
598+
/************************************************
599+
* End of default styles as of Apereo CAS 6.2.x *
600+
************************************************/
601+
602+
/******************************************
603+
* Start of customized styles for OSF CAS *
604+
******************************************/
572605

573606
:root {
574607
--cas-theme-osf-navbar: #263947;
@@ -578,12 +611,12 @@ button.close {
578611
--cas-theme-osf-green: #357935;
579612
--cas-theme-osf-blue: #1b6d85;
580613
--cas-theme-osf-red: #b52b27;
581-
--cas-theme-osf-disabled: var(--cas-theme-osf-grey, #eeeeee);
614+
--cas-theme-osf-disabled: #eeeeee;
582615
--cas-theme-osf-disabled-dark: #cccccc;
583616
--cas-theme-primary: var(--cas-theme-osf-navbar, #263947);
584617
--cas-theme-danger: var(--cas-theme-osf-red, #b52b27);
585618
--mdc-theme-primary: var(--cas-theme-primary, #263947);
586-
--mdc-theme-surface: var(--cas-theme-osf-surface, #F7F7F7);
619+
--mdc-theme-surface: var(--cas-theme-osf-surface, #f7f7f7);
587620
}
588621

589622
body {
@@ -611,22 +644,6 @@ body {
611644
justify-content: center;
612645
}
613646

614-
615-
.mdi-before-text {
616-
font-size: inherit;
617-
vertical-align: text-bottom;
618-
margin-right: 0.5rem;
619-
}
620-
621-
.mdi-before-text:before {
622-
font-size:inherit;
623-
}
624-
625-
.cas-field-primary {
626-
margin-bottom: 1rem!important;
627-
margin-top: 0.5rem!important;
628-
}
629-
630647
.hr-text {
631648
line-height: 1rem;
632649
position: relative;
@@ -639,7 +656,6 @@ body {
639656
font-size: 1rem;
640657
}
641658

642-
643659
.hr-text::before {
644660
content: '';
645661
background: linear-gradient(to right, transparent, black, var(--cas-theme-osf-surface, #f7f7f7));
@@ -719,10 +735,6 @@ body {
719735
background-color: var(--cas-theme-osf-disabled, #EFEFEF);
720736
}
721737

722-
.title-danger {
723-
color: var(--cas-theme-osf-red, #b52b27);
724-
}
725-
726738
.mdc-top-app-bar__row,
727739
.mdc-top-app-bar__row .mdc-top-app-bar__section {
728740
min-width: fit-content;
@@ -810,6 +822,20 @@ body {
810822
margin: 0.5rem 0;
811823
}
812824

825+
.mdi-before-text {
826+
font-size: inherit;
827+
vertical-align: text-bottom;
828+
margin-right: 0.5rem;
829+
}
830+
831+
.mdi-before-text:before {
832+
font-size: inherit;
833+
}
834+
835+
.title-danger {
836+
color: var(--cas-theme-osf-red, #b52b27);
837+
}
838+
813839
.text-no-wrap {
814840
white-space: nowrap;
815841
}
@@ -822,14 +848,11 @@ body {
822848
font-size: 1.125rem;
823849
}
824850

825-
.text-extra-large {
826-
font-size: 1.25rem;
827-
}
828-
829851
.margin-large-vertical {
830852
margin: 1rem 0;
831853
}
832854

855+
.hidden-button,
833856
.hidden-details {
834857
display: none;
835858
}
@@ -849,6 +872,10 @@ body {
849872
padding-left: 28px;
850873
}
851874

875+
.login-error-card .form-button {
876+
padding-top: 1rem;
877+
}
878+
852879
.login-section .mdc-button,
853880
.login-section .mdc-text-field,
854881
.login-error-card .mdc-button,
@@ -903,6 +930,11 @@ body {
903930
margin: 0.25rem 0;
904931
}
905932

933+
.cas-field-primary {
934+
margin-bottom: 1rem!important;
935+
margin-top: 0.5rem!important;
936+
}
937+
906938
.cas-field-col-2 {
907939
margin-top: 1rem!important;
908940
margin-bottom: 1.5rem!important;
@@ -1142,3 +1174,7 @@ body {
11421174
padding-top: 0.625rem!important;
11431175
}
11441176
}
1177+
1178+
/****************************************
1179+
* End of customized styles for OSF CAS *
1180+
****************************************/

src/main/resources/templates/error.html

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414

1515
<div class="d-flex justify-content-center flex-md-row flex-column mdc-card mdc-card-content w-lg-30">
1616
<section class="login-error-card">
17-
<section>
17+
<section>
1818
<div th:replace="fragments/osfbannerui :: osfBannerUI">
1919
<a href="fragments/osfbannerui.html"></a>
2020
</div>
@@ -37,9 +37,9 @@ <h2 th:utext="#{screen.unavailable.heading}"></h2>
3737
<i class="mdi mdi-logout mdi-before-text"></i>
3838
<span><a th:href="@{/logout(service=${osfUrl.logout})}" th:utext="#{screen.authnerror.button.backtoosf}"></a></span>
3939
</section>
40-
<hr class="my-4" />
4140
<section>
42-
<!-- <section th:if="${osfCasLoginContext.devMode}"> -->
41+
<!-- <section th:if="${devMode}"> -->
42+
<hr class="my-4" />
4343
<section class="text-without-mdi text-center text-bold text-large margin-large-vertical title-danger">
4444
<span th:utext="#{screen.authnerror.instructions.devmode}"></span>
4545
</section>
@@ -54,8 +54,8 @@ <h2 th:utext="#{screen.unavailable.heading}"></h2>
5454
onclick="showErrorDetails();">
5555
<span class="mdc-button__label" th:utext="#{screen.unavailable.button.viewdetails}"></span>
5656
</button>
57-
<button id="buttonHideErrorDetails" type="button" style="display: none;"
58-
class="mdc-button mdc-button--raised button-osf-navbar"
57+
<button id="buttonHideErrorDetails" type="button"
58+
class="mdc-button mdc-button--raised button-osf-navbar hidden-button"
5959
onclick="hideErrorDetails();">
6060
<span class="mdc-button__label" th:utext="#{screen.unavailable.button.hidedetails}"></span>
6161
</button>
@@ -70,7 +70,10 @@ <h2 th:utext="#{screen.unavailable.heading}"></h2>
7070

7171
<script type="text/javascript">
7272
disableSignUpButton();
73+
</script>
7374

75+
<script type="text/javascript">
76+
<!-- <script type="text/javascript" th:if="${devMode}"> -->
7477
function showErrorDetails() {
7578
$("#buttonViewErrorDetails").hide()
7679
$("#buttonHideErrorDetails").show()

src/main/resources/templates/fragments/tosloginform.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,7 @@
9696
function checkTosConsent(checkbox) {
9797
let submitButton = document.getElementById("primarySubmitButton");
9898
submitButton.disabled = !checkbox.checked;
99-
submitButton.style.backgroundColor = checkbox.checked ? "#1b6d85": "#EFEFEF";
99+
submitButton.style.backgroundColor = checkbox.checked ? "#1b6d85": "#efefef";
100100
}
101101
</script>
102102

0 commit comments

Comments
 (0)