Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ecep-113): style news & related patterns #16

Merged
merged 59 commits into from
May 3, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
b86b86d
chore(ecep): migrate ECEP-113 from core-cms
wesleyboar Apr 6, 2022
253e606
chore(blog): delete unused empty stylesheet
wesleyboar Apr 7, 2022
c0bd5ce
Merge branch 'main' into cms/ecep-cms
wesleyboar Apr 8, 2022
5263a3a
fix(ecep): restore ECEP-114 lost code
wesleyboar Apr 8, 2022
19d54fb
Squashed merge of task/FP-1596-pagination:
wesleyboar Apr 11, 2022
d896aa3
Squashed merge of task/FP-1491-button:
wesleyboar Apr 11, 2022
cd56a6d
chore(css): better note (noop)
wesleyboar Apr 11, 2022
22b324d
chore(css): rename --item-buffer to --post-buffer
wesleyboar Apr 11, 2022
0d1c4b3
fix(blog): remove post bottom extra space in lists
wesleyboar Apr 11, 2022
bf07165
feat(blog): pagination
wesleyboar Apr 11, 2022
81eb30b
Merge branch 'main' into cms/ecep-cms
wesleyboar Apr 11, 2022
8ab2a5b
feat(blog): hide tags & categories
wesleyboar Apr 12, 2022
21c3a2d
chore(blog): use more legible selector
wesleyboar Apr 12, 2022
ef93be3
fix(blog): revert "chore … more legible selector"
wesleyboar Apr 12, 2022
4dbc85f
feat(blog): give list media only just enough space
wesleyboar Apr 13, 2022
370220a
fix(blog): remove project-specific styles
wesleyboar Apr 14, 2022
4e04181
fix(blog): article header width to max-width
wesleyboar Apr 15, 2022
10bbe57
feat(blog): move selectors out to allow reuse
wesleyboar Apr 15, 2022
6052e72
feat(ecep-114/113): c-nav & generic/figures
wesleyboar Apr 15, 2022
33a6d3b
fix(blog): more specific heading tag selectors
wesleyboar Apr 18, 2022
d685359
fix(typography): more space under h3
wesleyboar Apr 18, 2022
6c555f9
feat(blog): article wraps around small main image
wesleyboar Apr 19, 2022
efdc213
feat(blog): article content drop-caps
wesleyboar Apr 19, 2022
172c32a
chore(blog): add missing organizational comment
wesleyboar Apr 19, 2022
156aee2
Revert "feat(blog): article content drop-caps"
wesleyboar Apr 19, 2022
ebbfa02
Merge branch 'main' into cms/ecep-cms
wesleyboar Apr 24, 2022
0045a18
Merge branch 'main' into cms/ecep-cms
wesleyboar Apr 25, 2022
0830829
Merge branch 'main' into cms/ecep-cms
wesleyboar Apr 25, 2022
c5d5c8f
fix(ECEP-114): nav should go mobile at wider width
wesleyboar Apr 25, 2022
a1d6fe3
Merge branch 'main' into cms/ecep-cms
wesleyboar Apr 25, 2022
00aa175
fix(ECEP-114): larger nav link click area
wesleyboar Apr 25, 2022
02cdc67
fix(ECEP-114): larger no list nav link click area
wesleyboar Apr 25, 2022
7d11703
fix(ECEP-114): remove whitespace between nav links
wesleyboar Apr 25, 2022
27d58cf
fix(ECEP-114): indenting, wrapping, spacing
wesleyboar Apr 25, 2022
c896cce
refactor(ECEP-114): rename indent variables
wesleyboar Apr 25, 2022
8c0c594
Merge branch 'main' into cms/ecep-cms
wesleyboar Apr 25, 2022
65c643c
feat(ECEP-113): post thumbnail box width required
wesleyboar Apr 26, 2022
b3bcaeb
feat(ECEP-113): post thumbnail image align center
wesleyboar Apr 26, 2022
95f6618
feat(ECEP-113): post thumbnail improved via :empty
wesleyboar Apr 26, 2022
d3566fb
fix(ecep-113): hide—not highlight—empty tags/cats
wesleyboar Apr 26, 2022
bb328a7
chore(ecep-113): style .tags separate from .attr
wesleyboar Apr 26, 2022
0b39df8
chore(ecep-113): move attr styles beneath headers'
wesleyboar Apr 26, 2022
9b8ec52
fix(ecep-113): move no-tags/cats from ecep to core
wesleyboar Apr 26, 2022
c6886b6
noop(css): remove lone semicolons
wesleyboar Apr 26, 2022
54ebdac
fix(ecep-113): tweak list item header space & pos
wesleyboar Apr 26, 2022
1b4416a
fix(ecep-113): better article spacing & font size
wesleyboar Apr 27, 2022
a00240f
fix(ecep-113): hide « / » of "« Previous / Next »"
wesleyboar Apr 27, 2022
a92c247
reverts bulk of "fix(ecep-113): hide « / » …"
wesleyboar Apr 27, 2022
7403cbc
docs(ecep-113): simpler comments, drop unused file
wesleyboar Apr 28, 2022
51eab20
fix(ecep-113): move cms-specific styles to cms
wesleyboar Apr 29, 2022
d0a24e2
feat(ecep-113): break figures into el. & comp.
wesleyboar Apr 29, 2022
b71062c
docs(ecep-113): document elements/figure
wesleyboar Apr 29, 2022
ca82444
feat(ecep-113): use `:--cms-logged-in` selector
wesleyboar Apr 29, 2022
8f79d0d
feat(ecep-113): add component bootstrap.pagination
wesleyboar Apr 29, 2022
99fb122
Revert "feat(ecep-113): use `:--cms-logged-in` selector"
wesleyboar Apr 29, 2022
cd14d69
Merge branch 'main' into task/ECEP-113-support-news
wesleyboar Apr 29, 2022
213b29a
docs(ecep-113): tweak figure docblock
wesleyboar Apr 29, 2022
f2d6a70
docs(ecep-113): simplify figure docblock
wesleyboar Apr 29, 2022
9136bc9
fix(ecep-113): use core-styles var not cms var
wesleyboar Apr 29, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions source/_imports/components/bootstrap.figure.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
Figure (Bootstrap)

Add to Bootstrap styles. See:

- [Bootstrap Figures](https://getbootstrap.com/docs/4.0/content/figures/)

Styleguide Components.Bootstrap.Figure
*/
@import url("_imports/elements/figure.css");

.figure {
@extend figure;
}
.figure-caption {
@extend figcaption;
}
29 changes: 29 additions & 0 deletions source/_imports/components/bootstrap.pagination.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
/*
Pagination (Bootstrap)

Style Bootstrap pagination. See:

- [Bootstrap Pagination](https://getbootstrap.com/docs/4.0/components/pagination/)

Styleguide Components.Bootstrap.Pagination
*/
@import url("@tacc/core-styles/source/_imports/components/c-page.css");
Copy link
Member Author

@wesleyboar wesleyboar May 2, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hint: This imported stylesheet was added in #5.




/* CAVEAT: These rules only style a minimal instance of Bootstrap pagination */
/* SEE: https://github.com/nephila/djangocms-blog/blob/1.1.1/djangocms_blog/templates/djangocms_blog/post_list.html */
.pagination {
@extend .c-page-list;

margin-block: var(--global-space--x-large);

width: fit-content;
margin-inline: auto;
}
.pagination a,
.pagination span {
@extend .c-page-end;

padding-block: 0;
}
11 changes: 0 additions & 11 deletions source/_imports/components/django.cms.blog.css

This file was deleted.

11 changes: 0 additions & 11 deletions source/_imports/components/django.cms.post.css

This file was deleted.

22 changes: 22 additions & 0 deletions source/_imports/elements/figure.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
Figure & Figcaption (Text Content)

Element that represents self-contained content, potentially with an optional caption.

Reference:

- [HTML: Figure | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figure)
- [HTML: Figcaption | MDN](https://developer.mozilla.org/en-US/docs/Web/HTML/Element/figcaption)

Styleguide Elements.TextContent.Figure
*/

figure > img {
margin-bottom: 20px;
}
figcaption {
color: var(--global-color-primary--dark);
font-size: var(--global-font-size--medium);
border-top: var(--global-border-width--normal) solid var(--global-color-primary--normal);
padding-top: 12px;
}
4 changes: 4 additions & 0 deletions source/_imports/elements/html-elements.css
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,10 @@ Reference:
Styleguide Elements.TextContent
*/

p {
margin-bottom: 2rem; /* overwrite Bootstrap */
}

Comment on lines +113 to +116
Copy link
Member Author

@wesleyboar wesleyboar Apr 29, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note. This style—and this whole file—could be considered CMS-specific, in which case it should move to Core-CMS via TACC/Core-CMS#482, but I just haven't confirmed whether either (this code or this whole file) is CMS-specific yet, because the Docs could also use such basic html element styles.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to leave it here until you are sure. =)

/* Lists */

ol, ul,
Expand Down
22 changes: 17 additions & 5 deletions source/_imports/objects/o-offset-content.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,17 @@ Styleguide Objects.OffsetContent
*/
@import url("_imports/tools/media-queries.css");

[class*="o-offset-content--"] {
--offset-distance: 8.5vw; /* NOTE: Value is from Texascale.org 2020 */
--buffer: 30px; /* double Bootstrap `.col` padding */


@custom-selector :--o-offset-content
.o-offset-content--left,
.o-offset-content--right;



:--o-offset-content {
--offset-distance: min(30vw, 410px);
--buffer: calc( 2 * var(--global-space--grid-gap) );
}

@media only screen and (--medium-and-above) {
Expand All @@ -24,10 +32,14 @@ Styleguide Objects.OffsetContent
margin-right: var(--buffer);
}
.o-offset-content--left + .o-offset-content--left { clear: left; }

.figure:is(:--o-offset-content) .figure-caption {
padding-right: 125px;
}
}
@media only screen and (--medium-and-above) and (--max-wide-and-below) {
[class*="o-offset-content--"] {
max-width: 50%;
:--o-offset-content {
max-width: 560px;
}
Copy link
Member Author

@wesleyboar wesleyboar Apr 29, 2022

/* Apply negative margin only when using offset value */
.o-offset-content--right {
Expand Down