diff --git a/CHANGELOG.rst b/CHANGELOG.rst index 0f2a0ac..1199693 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -1,6 +1,13 @@ CHANGELOG ========= +0.9 +--- + +* Update installation instructions to use current django url syntax +* Update sample login template to use correct django admin `extrastyle` block +* Update styles and wording for PU CAS login include template + 0.8 --- * Now tested against Django 3.2-4.2 diff --git a/README.rst b/README.rst index d94c4be..8d11186 100644 --- a/README.rst +++ b/README.rst @@ -80,7 +80,7 @@ or configure them as needed based on the documentation:: urlpatterns = [ ... - url(r'^accounts/', include('pucas.cas_urls')), + path('accounts/', include('pucas.cas_urls')), ... ] diff --git a/pucas/__init__.py b/pucas/__init__.py index 0a46a2d..a631899 100644 --- a/pucas/__init__.py +++ b/pucas/__init__.py @@ -1,4 +1,4 @@ -__version_info__ = (0, 8, 0, None) +__version_info__ = (0, 9, 0, None) # Dot-connect all but the last. Last is dash-connected if not None. __version__ = ".".join([str(i) for i in __version_info__[:-1]]) diff --git a/pucas/static/pucas/pu-login.css b/pucas/static/pucas/pu-login.css index deaec5f..ab680b7 100644 --- a/pucas/static/pucas/pu-login.css +++ b/pucas/static/pucas/pu-login.css @@ -9,6 +9,7 @@ mezzanine / grappelli */ margin-top: 0 !important; } + /* match mezzanine/grappelli main content size, use Princeton colors and image, make CAS link look like a button and align it with @@ -16,34 +17,61 @@ mezzanine / grappelli */ alternatives. */ .cas-login { - margin: 50px auto 5px; - width: 450px; - text-align: left; + margin: 50px auto 50px; + width: 300px; + text-align: center; + background-color: white; /* so PU logo doesn't look so tight on dark bg */ + border-radius: 5px; } -/* match default grappelli login window size */ -.grp-container .cas-login { - width: 380px; -} + +/* for non-grappelli, display vertically stacked */ .cas-login a { +/* background-image: linear-gradient(rgba(0,0,0,0) 50%, white 51%),*/ background-image: url('https://fed.princeton.edu/cas/images/pu_signature_web.jpg'); background-repeat: no-repeat; - background-position: right; - padding-right: 175px; - height: 55px; + background-position: bottom; + padding-bottom: 8em; + height: 4em; margin-bottom: 25px; display: inline-block; font-size: 15px; } + +/* for grappelli, display login button and PU icon side by side */ +.grp-login .cas-login a { + background-position: right; + padding-right: 175px; + padding-bottom: 0; + margin-bottom: 25px; +} + .cas-login .button { /* princeton orange */ background-color: #ee7f2d; + border: none; + padding: 10px; display: inline-block; /* override Chrome/webkit gradient background */ background: -webkit-gradient(linear, left top, left bottom, from(#ee7f2d), to(#ee7f2d)); margin-top: 15px; + line-height: 1.5em; color: white; - -moz-border-radius: 5px; - -webkit-border-radius: 5px; border-radius: 5px; + +} + +/* when grappelli is used, match default grappelli login window size */ +.grp-login .grp-container .cas-login, .grp-login .cas-alt { + width: 380px; + margin-left: auto; + margin-right: auto; } + +/* adjust for grappelli button styles */ +.grp-login .cas-login .button { + box-sizing: inherit; + font-size: 14px; + margin-top: 12px; +} + diff --git a/pucas/templates/pucas/pu-cas-login.html b/pucas/templates/pucas/pu-cas-login.html index 24bdc8f..0d283f6 100644 --- a/pucas/templates/pucas/pu-cas-login.html +++ b/pucas/templates/pucas/pu-cas-login.html @@ -1,7 +1,8 @@ {# customized CAS login snippet with Princeton branding #} {# use with pu-login.css for styles #}
+Or login with a local site account: