Skip to content

Commit

Permalink
Merge branch 'main' into task/GH-93-GH-142-GH-133-article-list-plugin…
Browse files Browse the repository at this point in the history
…s-and-styles--no-reverts
  • Loading branch information
wesleyboar committed Nov 12, 2021
2 parents df7a458 + 82ffc16 commit a854b0b
Show file tree
Hide file tree
Showing 14 changed files with 147 additions and 88 deletions.
19 changes: 18 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,25 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## [Unreleased]

## [3.3.0] - 2021-11-04: Brainmap Project; Fix Standard Template; Fix Header Links

### Added

- Quick: [v3.0.7] Changelog (#389, #390, #391)
- BM-5/BM-19: Add Brainmap Project (#393, #398)
- Quick: (for BM-19) New CSS Branding Logo Class (#392)
- task/FP-263: Add Frontera Favicon (update submodule) (#394)

### Changed

- Noop: Reduce verbosity of nested dropdown comment (#396)
- Noop: Fix Comment Typo & Move Styles Down Under It (#364)

### Fixed

- Bugfix/FP-1277: Extra Margin from Container by User on Standard Template (#370)
- FP-1235: Do not support dropdown menu text as link (#395)
- Hotfix: Fix Branding Links not Opening in New Window (#397)

## [3.0.7] - 2021-10-26: Hotfixes (mostly for Frontera); Rename Unused Component

Expand Down Expand Up @@ -162,7 +178,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [2.0.0] - 2021-03-31
v2.0.0 Production release as of Mar 31, 2021.

[unreleased]: https://github.com/TACC/Core-CMS/compare/v3.0.7...HEAD
[unreleased]: https://github.com/TACC/Core-CMS/compare/v3.3.0...HEAD
[3.3.0]: https://github.com/TACC/Core-CMS/releases/tag/v3.3.0
[3.0.7]: https://github.com/TACC/Core-CMS/releases/tag/v3.0.7
[3.0.0]: https://github.com/TACC/Core-CMS/releases/tag/v3.0.0
[2.5.2]: https://github.com/TACC/Core-CMS/releases/tag/v2.5.2
Expand Down
2 changes: 1 addition & 1 deletion docker-compose.dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ services:
- .:/code
ports:
- 8000:8000
command: ['python3', 'manage.py', 'runserver', '0.0.0.0:8000']
command: ["python3", "manage.py", "runserver", "0.0.0.0:8000"]
container_name: core_cms
hostname: core_cms
networks:
Expand Down
94 changes: 47 additions & 47 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,49 +1,49 @@
{
"name": "portal-cms",
"version": "2.1.0",
"license": "MIT",
"description": "The core CMS codebase for all new and updated TACC CMS sites.",
"scripts": {
"prebuild": "python3 taccsite_cms/settings_to_json.py",
"build": "npm run build:css",
"build:css": "node postcss.js",
"watch": "npm-watch"
},
"// scripts": {
"prebuild": "Export Django settings to JSON (for Node to use)",
"build": "Run all static file build commands",
"build:css": "Build stylesheets from source files",
"watch": "Build static files when source files change"
},
"repository": "[email protected]:TACC/CORE-cms.git",
"devDependencies": {
"async": "^3.2.0",
"cssnano": "^4.1.10",
"dotenv": "^8.2.0",
"npm-watch": "^0.7.0",
"postcss-cli": "^7.1.2",
"postcss-css-variables": "^0.17.0",
"postcss-extend": "^1.0.5",
"postcss-import": "^12.0.1",
"postcss-preset-env": "^6.7.0",
"yarn": "^1.22.5"
},
"watch": {
"build:css": {
"patterns": [
"./taccsite_cms/static/site_cms/css/src",
"./taccsite_custom/**/static/**/css/src"
],
"extensions": "css",
"runOnChangeOnly": false
}
},
"// watch": {
"build:css": "macOS requires object-based conifguration",
"build:css // SEE": "https://github.com/M-Zuber/npm-watch/issues/35"
},
"resolutions": {
"dot-prop": ">=5.2.0"
},
"author": "TACC ACI WMA <[email protected]>"
"name": "portal-cms",
"version": "2.1.0",
"license": "MIT",
"description": "The core CMS codebase for all new and updated TACC CMS sites.",
"scripts": {
"prebuild": "python3 taccsite_cms/settings_to_json.py",
"build": "npm run build:css",
"build:css": "node postcss.js",
"watch": "npm-watch"
},
"// scripts": {
"prebuild": "Export Django settings to JSON (for Node to use)",
"build": "Run all static file build commands",
"build:css": "Build stylesheets from source files",
"watch": "Build static files when source files change"
},
"repository": "[email protected]:TACC/CORE-cms.git",
"devDependencies": {
"async": "^3.2.0",
"cssnano": "^4.1.10",
"dotenv": "^8.2.0",
"npm-watch": "^0.7.0",
"postcss-cli": "^7.1.2",
"postcss-css-variables": "^0.17.0",
"postcss-extend": "^1.0.5",
"postcss-import": "^12.0.1",
"postcss-preset-env": "^6.7.0",
"yarn": "^1.22.5"
},
"watch": {
"build:css": {
"patterns": [
"./taccsite_cms/static/site_cms/css/src",
"./taccsite_custom/**/static/**/css/src"
],
"extensions": "css",
"runOnChangeOnly": false
}
},
"// watch": {
"build:css": "macOS requires object-based conifguration",
"build:css // SEE": "https://github.com/M-Zuber/npm-watch/issues/35"
},
"resolutions": {
"dot-prop": ">=5.2.0"
},
"author": "TACC ACI WMA <[email protected]>"
}
5 changes: 4 additions & 1 deletion taccsite_cms/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ def gettext(s): return s
# Requires django-auth-ldap ≥ 2.0.0
LDAP_ENABLED = True

# Default portal authorization verification endpoint.
CEP_AUTH_VERIFICATION_ENDPOINT = 'localhost' #'https://0.0.0.0:8000'

########################
# DATABASE SETTINGS
########################
Expand Down Expand Up @@ -413,7 +416,7 @@ def get_subdirs_as_module_names(path):
'default': {
'ENGINE': 'haystack.backends.elasticsearch_backend.ElasticsearchSearchEngine',
'URL': ES_HOSTS,
'INDEX_NAME': 'cms',
'INDEX_NAME': ES_INDEX_PREFIX.format('cms'),
'KWARGS': {'http_auth': ES_AUTH }
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ Styleguide Objects.OffsetContent
[class*="o-offset-content--"] {
--offset-distance: 8.5vw; /* NOTE: Value is from Texascale.org 2020 */
--buffer: 30px; /* double Bootstrap `.col` padding */
--max-width: initial;
}

@media only screen and (--medium-and-above) {
Expand All @@ -27,8 +26,8 @@ Styleguide Objects.OffsetContent
.o-offset-content--left + .o-offset-content--left { clear: left; }
}
@media only screen and (--medium-and-above) and (--max-wide-and-below) {
[class*="c-offset-content--"] {
--max-width: 50%;
[class*="o-offset-content--"] {
max-width: 50%;
}
/* Apply negative margin only when using offset value */
.o-offset-content--right {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Markup: o-section.html
Styleguide Objects.Section
*/
/* TODO: FP-1318: Move styling of tags (<a>, <h1–6>) to `s-section` */
@import url("_imports/tools/media-queries.css");
@import url("_imports/tools/x-layout.css");

Expand Down Expand Up @@ -237,3 +238,14 @@ Styleguide Objects.Section
/* NOTE: A `z-index` > 0 is only necessary for sections before banner */
/* CAVEAT: Any section pop-out el's can NOT overflow atop section after it */
[class*="o-section--style"] { z-index: 1; }





/* Scope (should be moved to `s-section`) */
/* NOTE: FP-1318: Other should-be-scope CSS (<a>, <h1–6>) is in this file */

[class*="o-section--style"] .c-callout__title {
color: var(--global-color-primary--xx-light);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,4 @@ Styleguide Objects.Site
.o-site__head,
.o-site__foot {
flex-shrink: 0;

/* Hides any overflow from `o-site__body` (e.g. `o-section__banner-image`) */
position: relative;
z-index: 1;
}
56 changes: 39 additions & 17 deletions taccsite_cms/static/site_cms/css/src/_imports/trumps/s-header.css
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,10 @@ Styleguide Trumps.Scopes.Header
border-bottom: 1px solid env(--header-major-border-color);
}


/* Affiliation */

/* SEE: taccsite_cms/static/site_cms/css/src/_imports/branding_logos.css */



/* Logo */

.s-header .navbar-brand {
Expand All @@ -54,11 +51,9 @@ Styleguide Trumps.Scopes.Header
padding: 0;

color: env(--header-text-color);
/* text-decoration: none; *//* already provided by Bootstrap */
/* text-decoration: none; */ /* already provided by Bootstrap */
}



/* Navigation */

/* On wide viewport, prevent header resize from dynamic content */
Expand Down Expand Up @@ -106,14 +101,14 @@ Styleguide Trumps.Scopes.Header
border-width: 0 0 var(--border-width);
border-style: solid;
border-color: var(--border-color);
margin-bottom: calc( var(--border-width) * -1 );
margin-bottom: calc(var(--border-width) * -1);
}
/* HACK: Using an ID selector, because Bootstrap has overspecific selectors */
#s-header .nav-link,
/* HACK: Support `span.nav-link` having children `a` and `a.dropdown-toggle-split` */
#s-header .nav-link > a {
color: env(--header-text-color);
/* text-decoration: none; *//* already provided by Bootstrap */
/* text-decoration: none; */ /* already provided by Bootstrap */
}

/* Navigation: Links: Responsive Design */
Expand All @@ -127,8 +122,6 @@ Styleguide Trumps.Scopes.Header
padding-left: 14px; /* NO-R/EM: .875rem (overwrite Bootstrap) */
}



/* Search */

.s-header .s-search-bar,
Expand All @@ -145,20 +138,49 @@ Styleguide Trumps.Scopes.Header
margin-left: 12px;
}

/* Dropdown */

.dropdown-menu {
font-size: 16px; /* NO-R/EM: 1rem (from Bootstrap via `.dropdown-menu`) */
}

/* Icons */

/* HACK: Using FontAwesome as placeholder */
.s-header [class*="fa-"] {
width: 27px; /* NO-R/EM: 1.25em (from Portal `.fa`—FP-228 will deprecate it) */
text-align: center;
width: 27px; /* NO-R/EM: 1.25em (from Portal `.fa`—FP-228 will deprecate it) */
text-align: center;
}

/* Theme-based Icon Colors */

/* Sets theme-based colors for selectors in themes that use third party images for icons or need color overrides. */
/* This will eventually be superceded by GH-101. */

/* For black icons:
- create a selector definition in s-header.css:
.selector-target {
filter: env(--targeted-selector);
};
- set the environment_variables value in theme.*.json to inverted value:
"environment-variables": {
...
"--targeted-selector": "invert(100%)"
}
*/


/* Dropdown */

.dropdown-menu {
font-size: 16px; /* NO-R/EM: 1rem (from Bootstrap via `.dropdown-menu`) */
/* For themed icons using a color:
- create a selector definition in s-header.css:
.selector-target {
mix-blend-mode: "overlay";
filter: env(--selector-theme-color);
};
- set the environment_variables value in theme.*.json to the desired color value:
"environment-variables": {
...
"--selector-theme-color": "#ABCDEF"
} */

.navbar-toggler-icon  {
filter: env(--menu-toggle-icon);
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"name": "default",

"environment-variables": {

"// HEADER": "",
"--header-text-color": "var(--global-color-primary--xx-light)",
"--header-bkgd-color": "var(--global-color-primary--xx-dark)",
"--header-minor-border-color": "var(--global-color-primary--normal)",
"// To 'hide' border by setting its color to match background color": "",
"--header-major-border-color": "var(--global-color-primary--xx-dark)"

"--header-major-border-color": "var(--global-color-primary--xx-dark)",
"// To set the bootstrap navbar-toggler-icon svg color for current theme": "",
"--menu-toggle-icon": "none"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,13 @@
"name": "has-dark-logo",

"environment-variables": {

"// HEADER": "",
"--header-text-color": "var(--global-color-primary--x-dark)",
"--header-bkgd-color": "var(--global-color-primary--x-light)",
"--header-minor-border-color": "var(--global-color-primary--normal)",
"// To show border between only the light header and content below it": "",
"--header-major-border-color": "var(--global-color-primary--normal)"
"--header-major-border-color": "var(--global-color-primary--normal)",
"// To set the bootstrap navbar-toggler-icon svg color for current theme": "",
"--menu-toggle-icon": "invert(100%)"
}
}
10 changes: 3 additions & 7 deletions taccsite_cms/templates/cms_menu.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,14 @@
{% for child in children %}
<li class="nav-item{% if child.selected or child.ancestor %} active{% endif %}{% if child.children %} dropdown{% endif %}">
{% if child.children %}
<span class="nav-link">
<a href="{{ child.attr.redirect_url|default:child.get_absolute_url }}">
{{ child.get_menu_title|safe }}
{% if child.selected %}<span class="sr-only">(current)</span>{% endif %}
</a>
<a
href=""
class="dropdown-toggle dropdown-toggle-split"
class="nav-link dropdown-toggle"
data-toggle="dropdown"
aria-haspopup="true"
aria-expanded="false">
{{ child.get_menu_title|safe }}
{% if child.selected %}<span class="sr-only">(current)</span>{% endif %}
<span class="sr-only">Toggle Dropdown</span>
</a>
<div class="dropdown-menu" role="menu" aria-labelledby="navbarDropdown">
Expand All @@ -28,7 +25,6 @@
{% if grandchild.selected %}<span class="sr-only">(current)</span>{% endif %}
</a>
{% endfor %}
</span>
{% else %}
<a class="nav-link" href="{{ child.attr.redirect_url|default:child.get_absolute_url }}">
{{ child.get_menu_title|safe }}
Expand Down
2 changes: 1 addition & 1 deletion taccsite_cms/templates/header_branding.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
<div id="header-branding" class="branding-header {{className}}">
{# DEBUG: #}{# <code>{{ brands|first }}</code> #}
{% for brand in brands %}
{% with filename=brand|index:1 selectors=brand|index:2 targeturl=brand|index:3 targetType=brand|index:4 accessibility=brand|index:5 corstype=brand|index:6 visibility=brand|index:7 %}
{% with filename=brand|index:1 selectors=brand|index:2 targeturl=brand|index:3 targettype=brand|index:4 accessibility=brand|index:5 corstype=brand|index:6 visibility=brand|index:7 %}
{% if visibility == "True" %}
{% if brand == brands|first %}
<a href="{{ targeturl }}" target="{{ targettype }}">
Expand Down
Loading

0 comments on commit a854b0b

Please sign in to comment.