Skip to content

Commit

Permalink
Merge branch 'main' into task/GH-73-tacc-blockquote-plugin
Browse files Browse the repository at this point in the history
  • Loading branch information
wesleyboar committed Jun 14, 2021
2 parents 6f9440d + 2c50694 commit d2c554d
Show file tree
Hide file tree
Showing 29 changed files with 237 additions and 200 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 @@ -491,8 +489,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
5 changes: 2 additions & 3 deletions taccsite_cms/static/README.md
Original file line number Diff line number Diff line change
@@ -1,14 +1,13 @@
# TACC CMS - Static Files

All static files _specific to_ the Core CMS __must__ be placed here _within_ `site_cms`.
All static files _shared with_ the Core CMS __must__ be placed here _within_ `site_shared`.
All static files __must__ be placed here _within_ `site_cms`.

These assets will be served by Django and may be built by Node.

See project `README.md` at ["Static Files"](/README.md#static-files).

## Clarification

The `taccsite_cms` directory isolates all Core resources, while the `site_cms` and `site_shared` directories [namespaces the static files and templates][djangocms-custom-resources].
The `taccsite_cms` directory isolates all Core resources. The `site_cms` directory [namespaces the static files and templates][djangocms-custom-resources].

[djangocms-custom-resources]: https://docs.djangoproject.com/en/2.2/intro/tutorial06/#customize-your-app-s-look-and-feel
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
/*
Test
Styles for testing `postcss-extend`.
Instructions:
1. In this file, add code after "! Goal:" to show what the output should be.
2. In this file, add code after "! Test:" to be transformed by plugins.
3. In the output file, the code after "! Goal:" and "! Test:" should match.
Styleguide _Test.Extend
*/

/*! Class Selector */

/*! Goal: */
._test_1,._test_mixin_1{color:red}

/*! Test: */
._test_mixin_1 {
color: red;
}
._test_1 {
@extend ._test_mixin_1;
}

/*! Placeholder Selector */

/*! Goal: */
._test_2{color:yellow}

/*! Test: */
%_test_mixin_2 {
color: yellow;
}
._test_2 {
@extend %_test_mixin_2;
}

/*! Class & Placeholder Selector, Use Class Selector */

/*! Goal: */
._test_3,._test_mixin_3{color:green}

/*! Test: */
%_test_mixin_3,
._test_mixin_3 {
color: green;
}
._test_3 {
@extend ._test_mixin_3;
}

/*! Class & Placeholder Selector, Use Placeholder Selector */

/*! Goal: */
._test_4{color:blue}

/*! Test: */
%_test_mixin_4,
._test_mixin_4 {
color: blue;
}
._test_4 {
@extend %_test_mixin_4;
}


/*! Define Placeholder */

/*! Goal: */
._test_5{color:white}

/*! Test: */
@define-placeholder _test_mixin_5 {
color: white;
}
._test_5 {
@extend _test_mixin_5;
}
Original file line number Diff line number Diff line change
@@ -1,16 +1,14 @@
/*
Test
Styles for testing plugins, e.g.:
- `postcss-preset-env`
Styles for testing `postcss-preset-env` plugins.
Instructions:
1. In this file, add code after "! Goal:" to show what the output should be.
2. In this file, add code after "! Test:" to be transformed by plugins.
3. In the output file, the code after "! Goal:" and "! Test:" should match.
Styleguide _Test
Styleguide _Test.PresetEnv
*/

/*! Custom Media Queries */
Expand All @@ -28,6 +26,26 @@ Styleguide _Test
}
}

/*! Goal: */
@media (max-width:60em){._test{background-color:red}}@media (max-width:60em){._test{background-color:blue}}

/*! Test: */
@custom-media --test-window (min-width: 30em);

@media (--test-window) {
._test {
background-color: red;
}
}

@custom-media --test-window (min-width: 60em);

@media (--test-window) {
._test {
background-color: blue;
}
}

/*! Media Query Ranges */
/* SEE: https://preset-env.cssdb.org/features#media-query-ranges */

Expand All @@ -45,7 +63,6 @@ Styleguide _Test
}

/*! Custom Media Queries & Media Query Ranges */
/* SEE: https://preset-env.cssdb.org/features#custom-media-queries */

/*! Goal: */
@media (min-width:992px) and (max-width:1199px){._test{background-color:red}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Add to Bootstrap styles. See:
Styleguide Components.Bootstrap.Grid
*/
@import url("../../../../../../../taccsite_cms/static/site_shared/css/src/_imports/tools/media-queries.css");
@import url("_imports/tools/media-queries.css");

@media (--x-wide-and-above) {
.container { max-width: var(--global-max-width--x-wide); }
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ Markup: o-section.html
Styleguide Objects.Section
*/
@import url("../../../../../../../taccsite_cms/static/site_shared/css/src/_imports/tools/media-queries.css");
@import url("../../../../../../../taccsite_cms/static/site_cms/css/src/_imports/tools/x-layout.css");
@import url("_imports/tools/media-queries.css");
@import url("_imports/tools/x-layout.css");



Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,35 +3,44 @@ Article Link
Styles that allow visible link hover for article lists.
.x-article-link-stretch - Stretch link to cover container
.x-article-link-stretch--gapless - Make link box fix gapless layout
.x-article-link-hover - Give link a hover state
.x-article-link-hover--gapless - Make link hover state fix gapless layout
%x-article-link-stretch - Stretch link to cover container
%x-article-link-stretch--gapless - Make link box fix gapless layout
%x-article-link-hover - Give link a hover state
%x-article-link-hover--gapless - Make link hover state fix gapless layout
Styleguide Tools.ExtendsAndMixins.ArticleLink
*/

/* WARNING: A link ancestor must have its `position` set (not to static) */

/* Expand link to cover container */
.x-article-link-stretch {
.x-article-link-stretch,
%x-article-link-stretch {
position: absolute;
height: 100%;
width: 100%;
/* An explicit position (in case container has top padding) */
/* To prevent container padding from offsetting an `outline` */
top: 0;
left: 0;

/* To prevent `outline` from being inexplicably offset in Firefox */
/* SEE: http://johndoesdesign.com/blog/2012/css/firefox-and-its-css-focus-outline-bug/ */
overflow: hidden;
}
.x-article-link-stretch--gapless {
.x-article-link-stretch--gapless,
%x-article-link-stretch--gapless {
width: calc(100% + 30px); /* GH-99: Use standard spacing value */
left: -15px;
}

/* Give link state (pseudo-class) feedback */
.x-article-link-hover {
.x-article-link-hover,
%x-article-link-hover {
outline: 1px solid var(--global-color-accent--normal);

outline-offset: 1em;
}
.x-article-link-hover--gapless {
.x-article-link-hover--gapless,
%x-article-link-hover--gapless {
outline-offset: 0;
}
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,20 @@ Styleguide Tools.ExtendsAndMixins.Center
/* Horizontal */

/* Horizontal: Inline */
.x-center--horz-inline {
.x-center--horz-inline, /* DEPRECATED */
%x-center--horz-inline {
text-align: center;
}

/* Horizontal: Block */
.x-center--horz-block {
.x-center--horz-block, /* DEPRECATED */
%x-center--horz-block {
margin: 0 auto;
}

/* Horizontal: Block: Multiple Children */
.x-center--horz-block-multiple-children {
.x-center--horz-block-multiple-children, /* DEPRECATED */
%x-center--horz-block-multiple-children {
display: flex;
flex-direction: row;
justify-content: center;
Expand All @@ -39,7 +42,8 @@ Styleguide Tools.ExtendsAndMixins.Center
/* Vertical */

/* Vertical: Inline: Multiple Lines - via Flexbox */
.x-center--vert-inline-multiline--flex {
.x-center--vert-inline-multiline--flex, /* DEPRECATED */
%x-center--vert-inline-multiline--flex {
display: flex;
flex-direction: column;
justify-content: center;
Expand All @@ -48,7 +52,8 @@ Styleguide Tools.ExtendsAndMixins.Center
/* Both */

/* Both: Any - via Flexbox */
.x-center--both--flex {
.x-center--both--flex, /* DEPRECATED */
%x-center--both--flex {
display: flex;
justify-content: center;
align-items: center;
Expand Down
Loading

0 comments on commit d2c554d

Please sign in to comment.