Skip to content

Commit

Permalink
Merge branch 'main' into bugfix/GH-230-header-search-bar-font-size-in…
Browse files Browse the repository at this point in the history
…consistent
  • Loading branch information
wesleyboar committed Jun 10, 2021
2 parents 24862d5 + 2c50694 commit eef029e
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 102 deletions.
67 changes: 0 additions & 67 deletions taccsite_cms/default_secrets.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,70 +294,3 @@
########################

_PORTAL = False # True for any CMS that is part of a Portal.

"""
Portal Links
Usage:
- For each link used in the templating, add new links values (see example below).
- New links must be added to the _PORTAL_AUTH_LINKS and _PORTAL_UNAUTH_LINKS lists.
Values to populate:
_NAMED_LINK = { # The name of the link object.
"name": "…", # The name of the link (to distinguish it, as if for ID).
"url": "…", # The URL path to which the link should navigate the user.
"text": "…", # The text of the link.
"icon": "…", # The icon of the link.
}
Links Configuration Example.
_ANY_AUTH_LINK = {
"name": "section-1",
"url": "/some/section/",
"text": "Visit Section",
"icon": "some-section",
}
_ANY_UNAUTH_LINK = {
"name": "action-1",
"url": "/some-action/",
"text": "Do Action",
"icon": "some-action",
}
"""

########################
# LINKS (for Portal).

_DASH_AUTH_LINK = {
"name": "dash",
"url": "/workbench/dashboard/",
"text": "My Dashboard",
"icon": "desktop",
}
_PROFILE_AUTH_LINK = {
"name": "profile",
"url": "/accounts/profile/",
"text": "My Account",
"icon": "user-circle",
}
_LOGOUT_AUTH_LINK = {
"name": "logout",
"url": "/accounts/logout/",
"text": "Log Out",
"icon": "sign-out-alt",
}

_LOGIN_UNAUTH_LINK = {
"name": "login",
"url": "/login/",
"text": "Log In",
"icon": "sign-in-alt",
}

_PORTAL_AUTH_LINKS = [ _DASH_AUTH_LINK, _PROFILE_AUTH_LINK, _LOGOUT_AUTH_LINK ] # Default TACC Portal.
_PORTAL_UNAUTH_LINKS = [ _LOGIN_UNAUTH_LINK ] # Default TACC Portal.
4 changes: 0 additions & 4 deletions taccsite_cms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,6 @@ def getsecrets():

# Configure Portal.
PORTAL = current_secrets._PORTAL
PORTAL_AUTH_LINKS = current_secrets._PORTAL_AUTH_LINKS
PORTAL_UNAUTH_LINKS = current_secrets._PORTAL_UNAUTH_LINKS

# Optional features.
FEATURES = current_secrets._FEATURES
Expand Down Expand Up @@ -490,8 +488,6 @@ def get_subdirs_as_module_names(path):
'LOGO',
'FAVICON',
'PORTAL',
'PORTAL_AUTH_LINKS',
'PORTAL_UNAUTH_LINKS',
'FEATURES',
'GOOGLE_ANALYTICS_PROPERTY_ID',
'GOOGLE_ANALYTICS_PRELOAD'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,42 +1,37 @@
<!-- FAQ:
This is the markup of the #s-header, as of 2020-08-13,
This is the markup of the #s-header, as of 2021-06,
from https://frontera-portal.tacc.utexas.edu/. It has:
- Bootstrap class names
- Bootstrap attributes
- illegally-nested markup (`ul > div > li`)
- extra markup (`a > span`)
-->
<ul class="s-portal-nav navbar-nav">
<div class="navbar-nav">
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle"
href="#"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<span>Sections</span>
<span class="sr-only">Toggle Dropdown</span>
</a>
<div class="dropdown-menu dropdown-menu-right">
<a class="dropdown-item" href="#">
<i class="nav-icon"></i> Section 1
</a>
<a class="dropdown-item" href="#">
<i class="nav-icon"></i> Section 2
</a>
<a class="dropdown-item" href="#">
<i class="nav-icon"></i> Section 3
</a>
</div>
</li>
</div>

<li class="nav-item">
<a class="nav-link" href="/login/">
<i class="nav-icon"></i> Log in
<!-- When user is not logged in, there are zero dropdown(-*) classes -->
<li class="nav-item dropdown">
<a class="nav-link dropdown-toggle"
href="#"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false"
>
<i class="icon icon-user"></i>
<span>username</span>
<span class="sr-only">Toggle Dropdown</span>
</a>
<nav class="dropdown-menu dropdown-menu-right show">
<a class="dropdown-item" href="/workbench/dashboard">
<i class="icon icon-dashboard"></i> My Dashboard
</a>
<a class="dropdown-item" href="/workbench/onboarding/admin">
<i class="icon icon-approved-boxed"></i> Onboarding Admin
</a>
<a class="dropdown-item" href="/accounts/profile/">
<i class="icon icon-gear"></i> My Account
</a>
<a class="dropdown-item" href="/accounts/logout">
<i class="icon icon-user"></i> Log Out
</a>
</nav>
</li>
</ul>

0 comments on commit eef029e

Please sign in to comment.