@tacc/core-styles 2.37.5 → 2.38.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/branding_logos.css +1 -1
- package/dist/components/README.css +1 -1
- package/dist/components/admonition/demo.css +1 -1
- package/dist/components/admonition.css +1 -1
- package/dist/components/align/demo.css +1 -1
- package/dist/components/align.css +1 -1
- package/dist/components/bootstrap/bootstrap--col.demo.css +1 -1
- package/dist/components/bootstrap/bootstrap--form.demo.css +1 -1
- package/dist/components/bootstrap/bootstrap--modal.demo.css +1 -1
- package/dist/components/bootstrap/demo.css +1 -1
- package/dist/components/bootstrap.col.css +1 -1
- package/dist/components/bootstrap.container.css +1 -1
- package/dist/components/bootstrap.css +1 -1
- package/dist/components/bootstrap.figure.css +1 -1
- package/dist/components/bootstrap.form.css +1 -1
- package/dist/components/bootstrap.modal--cms.css +1 -1
- package/dist/components/bootstrap.modal--portal.css +1 -1
- package/dist/components/bootstrap.modal.css +1 -1
- package/dist/components/bootstrap.nav-tabs.css +1 -1
- package/dist/components/bootstrap.pagination.css +1 -1
- package/dist/components/bootstrap.row.css +1 -1
- package/dist/components/bootstrap3.breadcrumb.css +1 -1
- package/dist/components/bootstrap3.css +1 -1
- package/dist/components/bootstrap5.border-spinner.css +1 -1
- package/dist/components/c-app-card/demo.css +1 -1
- package/dist/components/c-app-card.css +1 -1
- package/dist/components/c-button/demo.css +1 -1
- package/dist/components/c-button--cms.css +1 -1
- package/dist/components/c-button.css +1 -1
- package/dist/components/c-button.selectors.css +1 -1
- package/dist/components/c-callout.css +1 -1
- package/dist/components/c-card/c-card--frontera.demo.css +1 -1
- package/dist/components/c-card/c-card.demo.css +1 -1
- package/dist/components/c-card/c-card.demo.images.css +1 -1
- package/dist/components/c-card--docs.css +1 -1
- package/dist/components/c-card--from-tup-cms.css +1 -1
- package/dist/components/c-card--frontera-about-page.css +1 -1
- package/dist/components/c-card.css +1 -1
- package/dist/components/c-card.selectors.css +1 -1
- package/dist/components/c-content-block.css +1 -1
- package/dist/components/c-data-list.css +1 -1
- package/dist/components/c-form--cms.css +1 -1
- package/dist/components/c-form--login.css +1 -1
- package/dist/components/c-form--portal.css +1 -1
- package/dist/components/c-form.css +1 -1
- package/dist/components/c-form.selectors.css +1 -1
- package/dist/components/c-image-map.css +1 -1
- package/dist/components/c-image-map.skin.css +1 -1
- package/dist/components/c-image-map.structure.css +1 -1
- package/dist/components/c-island/demo.css +1 -1
- package/dist/components/c-island.css +1 -1
- package/dist/components/c-message/demo.css +1 -1
- package/dist/components/c-message--compact.css +1 -1
- package/dist/components/c-message--expanded.css +1 -1
- package/dist/components/c-message.css +1 -1
- package/dist/components/c-message.selectors.css +1 -1
- package/dist/components/c-nav/demo.css +1 -1
- package/dist/components/c-nav.css +1 -1
- package/dist/components/c-page.css +1 -1
- package/dist/components/c-pill/demo.css +1 -1
- package/dist/components/c-pill.css +1 -1
- package/dist/components/c-pill.selectors.css +1 -1
- package/dist/components/c-recognition.css +1 -1
- package/dist/components/c-see-all-link.css +1 -1
- package/dist/components/c-show-more.css +1 -1
- package/dist/components/c-tag/demo.css +1 -1
- package/dist/components/c-tag.css +1 -1
- package/dist/components/c-tag.selectors.css +1 -1
- package/dist/components/c-update.css +1 -1
- package/dist/components/cortal.icon.css +1 -1
- package/dist/components/cortal.icon.font.css +1 -1
- package/dist/components/demo.css +1 -1
- package/dist/components/django-cms-forms.css +1 -1
- package/dist/components/django-cms-forms.hacks.css +1 -1
- package/dist/components/django-cms-forms.selectors.css +1 -1
- package/dist/components/mui.tabs.css +1 -1
- package/dist/components/pymdownx--tabbed.css +1 -1
- package/dist/components/pymdownx.css +1 -1
- package/dist/components/tacc-docs.css +1 -1
- package/dist/core-styles.base.css +1 -1
- package/dist/core-styles.cms.css +1 -1
- package/dist/core-styles.demo.css +1 -1
- package/dist/core-styles.docs.css +1 -1
- package/dist/core-styles.header.css +2 -2
- package/dist/core-styles.portal.css +1 -1
- package/dist/core-styles.settings.css +1 -1
- package/dist/core-styles.theme.default.css +1 -1
- package/dist/core-styles.theme.has-dark-logo.css +1 -1
- package/dist/core-styles.wysiwyg.css +1 -1
- package/dist/elements/README.css +1 -1
- package/dist/elements/bootstrap.css +1 -1
- package/dist/elements/demo.css +1 -1
- package/dist/elements/form.css +1 -1
- package/dist/elements/headings/demo.css +1 -1
- package/dist/elements/headings--cms.css +1 -1
- package/dist/elements/headings--docs.css +1 -1
- package/dist/elements/html-elements/demo.css +1 -1
- package/dist/elements/html-elements.cms.css +1 -1
- package/dist/elements/html-elements.css +1 -1
- package/dist/elements/html-elements.docs.css +1 -1
- package/dist/elements/irregular-link.css +1 -1
- package/dist/elements/links.css +1 -1
- package/dist/elements/mailto-link.css +1 -1
- package/dist/elements/monospace.css +1 -1
- package/dist/elements/root--cms.css +1 -1
- package/dist/elements/root--demo.css +1 -1
- package/dist/elements/root--docs.css +1 -1
- package/dist/elements/root--portal.css +1 -1
- package/dist/elements/root.css +1 -1
- package/dist/elements/sticky-footer/demo.css +1 -1
- package/dist/elements/sticky-footer.css +1 -1
- package/dist/elements/table--basic.css +1 -1
- package/dist/elements/table--nested.css +1 -1
- package/dist/elements/table.cms.css +1 -1
- package/dist/elements/table.css +1 -1
- package/dist/elements/table.docs.css +1 -1
- package/dist/elements/table.portal.css +1 -1
- package/dist/elements/table.selectors.css +1 -1
- package/dist/elements/tacc-search-bar.css +1 -1
- package/dist/fractal.server.refresh.css +1 -1
- package/dist/generics/README.css +1 -1
- package/dist/generics/attributes/demo.css +1 -1
- package/dist/generics/attributes.css +1 -1
- package/dist/generics/fonts.css +1 -1
- package/dist/generics/pseudo-elements.css +1 -1
- package/dist/objects/README.css +1 -1
- package/dist/objects/o-fixed-header-table/demo.css +1 -1
- package/dist/objects/o-fixed-header-table.css +1 -1
- package/dist/objects/o-flex-item-table-wrap/demo.css +1 -1
- package/dist/objects/o-flex-item-table-wrap.css +1 -1
- package/dist/objects/o-float-content.css +1 -1
- package/dist/objects/o-grid.css +1 -1
- package/dist/objects/o-heading-steps.css +1 -1
- package/dist/objects/o-offset-content.css +1 -1
- package/dist/objects/o-section/demo.css +1 -1
- package/dist/objects/o-section--docs.css +1 -1
- package/dist/objects/o-section.css +1 -1
- package/dist/objects/o-section.selectors.css +1 -1
- package/dist/objects/o-site.css +1 -1
- package/dist/objects/o-table-wrap/demo.basic.css +1 -1
- package/dist/objects/o-table-wrap/demo.extra.css +1 -1
- package/dist/objects/o-table-wrap/example.flexible-horz.css +1 -1
- package/dist/objects/o-table-wrap/example.overflow-hidden.css +1 -1
- package/dist/objects/o-table-wrap/example.overflow-scroll.css +1 -1
- package/dist/objects/o-table-wrap/o-table-wrap--flexible-horz.css +1 -1
- package/dist/objects/o-table-wrap/o-table-wrap--flexible-vert.css +1 -1
- package/dist/objects/o-table-wrap/o-table-wrap--overflow-hidden.css +1 -1
- package/dist/objects/o-table-wrap/o-table-wrap--overflow-scroll-extra.css +1 -1
- package/dist/objects/o-table-wrap/o-table-wrap--overflow-scroll.css +1 -1
- package/dist/objects/o-table-wrap.css +1 -1
- package/dist/settings/README.css +1 -1
- package/dist/settings/border.css +1 -1
- package/dist/settings/color/demo.css +1 -1
- package/dist/settings/color--cms.css +1 -1
- package/dist/settings/color--demo.css +1 -1
- package/dist/settings/color--docs.css +1 -1
- package/dist/settings/color--portal.css +1 -1
- package/dist/settings/color--portal.v1.css +1 -1
- package/dist/settings/color--portal.v2.css +1 -1
- package/dist/settings/color.accent.css +1 -1
- package/dist/settings/color.accent.v3.css +1 -1
- package/dist/settings/color.css +1 -1
- package/dist/settings/color.v3.css +1 -1
- package/dist/settings/demo.css +1 -1
- package/dist/settings/font/demo-family.css +1 -1
- package/dist/settings/font/demo-size.css +1 -1
- package/dist/settings/font/demo-style.css +1 -1
- package/dist/settings/font/demo-weight.css +1 -1
- package/dist/settings/font--cms.css +1 -1
- package/dist/settings/font--docs.css +1 -1
- package/dist/settings/font--portal.css +1 -1
- package/dist/settings/font.css +1 -1
- package/dist/settings/max-width.css +1 -1
- package/dist/settings/space.css +1 -1
- package/dist/tools/README.css +1 -1
- package/dist/tools/media-queries.css +1 -1
- package/dist/tools/selectors.common.css +1 -1
- package/dist/tools/selectors.css +1 -1
- package/dist/tools/selectors.form.css +1 -1
- package/dist/tools/selectors.monospace.css +1 -1
- package/dist/tools/x-article-link.css +1 -1
- package/dist/tools/x-blockquote.css +1 -1
- package/dist/tools/x-breadcrumbs.css +1 -1
- package/dist/tools/x-center.css +1 -1
- package/dist/tools/x-drop-cap.css +1 -1
- package/dist/tools/x-drop-cap.demo.css +1 -1
- package/dist/tools/x-fake-border.css +1 -1
- package/dist/tools/x-figure.css +1 -1
- package/dist/tools/x-grid.css +1 -1
- package/dist/tools/x-layout.css +1 -1
- package/dist/tools/x-link/demo.css +1 -1
- package/dist/tools/x-link.css +1 -1
- package/dist/tools/x-mailto-text-replace.css +1 -1
- package/dist/tools/x-message/demo.css +1 -1
- package/dist/tools/x-message.css +1 -1
- package/dist/tools/x-message.demo.css +1 -1
- package/dist/tools/x-message.v1.css +1 -1
- package/dist/tools/x-overlay.css +1 -1
- package/dist/tools/x-tabs/demo.css +1 -1
- package/dist/tools/x-tabs.css +1 -1
- package/dist/tools/x-tabs.skin.css +1 -1
- package/dist/tools/x-tabs.structure.css +1 -1
- package/dist/tools/x-truncate.css +1 -1
- package/dist/trumps/README.css +1 -1
- package/dist/trumps/demo.css +1 -1
- package/dist/trumps/s-affixed-input-wrapper/demo.css +1 -1
- package/dist/trumps/s-affixed-input-wrapper.css +1 -1
- package/dist/trumps/s-article-list.css +1 -1
- package/dist/trumps/s-article-preview.css +1 -1
- package/dist/trumps/s-blockquote.css +1 -1
- package/dist/trumps/s-breadcrumbs.css +1 -1
- package/dist/trumps/s-cms-nav.css +1 -1
- package/dist/trumps/s-document.css +1 -1
- package/dist/trumps/s-drop-cap.css +1 -1
- package/dist/trumps/s-footer--thick.css +1 -1
- package/dist/trumps/s-footer--thin.css +1 -1
- package/dist/trumps/s-footer.css +1 -1
- package/dist/trumps/s-footer.properties.css +1 -1
- package/dist/trumps/s-form--cms.css +1 -1
- package/dist/trumps/s-form--login.css +1 -1
- package/dist/trumps/s-form--portal.css +1 -1
- package/dist/trumps/s-form-page/demo.css +1 -1
- package/dist/trumps/s-form-page/example.css +1 -1
- package/dist/trumps/s-form-page.css +1 -1
- package/dist/trumps/s-form.css +1 -1
- package/dist/trumps/s-form.selectors.css +1 -1
- package/dist/trumps/s-guide-doc.css +1 -1
- package/dist/trumps/s-header/s-header.demo.css +1 -1
- package/dist/trumps/s-header.bootstrap.css +1 -1
- package/dist/trumps/s-header.css +1 -1
- package/dist/trumps/s-hero-banner/s-hero-banner.demo.css +1 -1
- package/dist/trumps/s-hero-banner.css +1 -1
- package/dist/trumps/s-image-grid.css +1 -1
- package/dist/trumps/s-inline-dl.css +1 -1
- package/dist/trumps/s-irregular-links.css +1 -1
- package/dist/trumps/s-paragraph-table.css +1 -1
- package/dist/trumps/s-portal-nav.css +1 -1
- package/dist/trumps/s-style-guide.css +1 -1
- package/dist/trumps/s-system-specs.css +1 -1
- package/dist/trumps/s-truncated-table.css +1 -1
- package/dist/trumps/tacc-search-bar.css +1 -1
- package/dist/trumps/u-empty.css +1 -1
- package/dist/trumps/u-hide.css +1 -1
- package/dist/trumps/u-highlight/u-highlight.demo.css +1 -1
- package/dist/trumps/u-highlight.css +1 -1
- package/dist/trumps/u-mailto-text-replace.css +1 -1
- package/dist/trumps/u-nested-text-content.css +1 -1
- package/dist/vendors/bootstrap5/demo.css +1 -1
- package/dist/vendors/bootstrap5--border-spinner.css +1 -1
- package/fractal.config.js +3 -0
- package/package.json +1 -1
- package/src/lib/_imports/branding_logos.css +6 -9
- package/src/lib/_imports/components/c-show-more/c-show-more--generated.hbs +116 -0
- package/src/lib/_imports/components/c-show-more/c-show-more.hbs +68 -0
- package/src/lib/_imports/components/c-show-more/c-show-more.js +72 -0
- package/src/lib/_imports/components/c-show-more/config.yml +9 -0
- package/src/lib/_imports/components/c-show-more/readme.md +2 -0
- package/src/lib/_imports/components/c-show-more.css +5 -0
- package/src/lib/_imports/trumps/_s-cms-nav/_s-cms-nav.hbs +0 -16
- package/src/lib/_imports/trumps/s-header/config.yml +4 -2
- package/src/lib/_imports/trumps/s-header/s-header--different-logos.hbs +7 -0
- package/src/lib/_imports/trumps/s-header/s-header.hbs +13 -5
- package/src/lib/_imports/trumps/s-header.css +23 -25
package/package.json
CHANGED
|
@@ -14,10 +14,8 @@
|
|
|
14
14
|
align-items: center;
|
|
15
15
|
justify-content: center;
|
|
16
16
|
|
|
17
|
-
/*
|
|
18
|
-
|
|
19
|
-
/* FAQ: Do not use `48.78px`, because Safari only accepts whole numbers */
|
|
20
|
-
height: 49px;
|
|
17
|
+
/* To prevent header bar resize when content is dynamically added */
|
|
18
|
+
height: 50px;
|
|
21
19
|
|
|
22
20
|
background-color: var(--global-color-primary--xx-dark);
|
|
23
21
|
color: var(--global-color-primary--xx-light);
|
|
@@ -63,9 +61,8 @@
|
|
|
63
61
|
/* Logo Selectors */
|
|
64
62
|
|
|
65
63
|
.portal-logo {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
border: none;
|
|
64
|
+
height: 100%;
|
|
65
|
+
}
|
|
66
|
+
img.portal-logo {
|
|
67
|
+
border-style: none; /* no effect if Bootstrap is loaded */
|
|
71
68
|
}
|
|
@@ -0,0 +1,116 @@
|
|
|
1
|
+
<script type="module">
|
|
2
|
+
import { generateMarkup } from '../raw/c-show-more/c-show-more.js';
|
|
3
|
+
|
|
4
|
+
generateMarkup(document.querySelectorAll(
|
|
5
|
+
'p.js-show-more--one-line:not(.js-show-more--link)'
|
|
6
|
+
), {
|
|
7
|
+
startIndex: 0
|
|
8
|
+
});
|
|
9
|
+
|
|
10
|
+
generateMarkup(document.querySelectorAll(
|
|
11
|
+
'p.js-show-more--one-line.js-show-more--link'
|
|
12
|
+
), {
|
|
13
|
+
shouldToggleResembleLink: true,
|
|
14
|
+
startIndex: 10
|
|
15
|
+
});
|
|
16
|
+
|
|
17
|
+
generateMarkup(document.querySelectorAll(
|
|
18
|
+
'p.js-show-more--many-lines:not(.js-show-more--link)'
|
|
19
|
+
), {
|
|
20
|
+
lines: 3,
|
|
21
|
+
startIndex: 20
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
generateMarkup(document.querySelectorAll(
|
|
25
|
+
'p.js-show-more--many-lines.js-show-more--link'
|
|
26
|
+
), {
|
|
27
|
+
lines: 3,
|
|
28
|
+
shouldToggleResembleLink: true,
|
|
29
|
+
startIndex: 30
|
|
30
|
+
});
|
|
31
|
+
</script>
|
|
32
|
+
|
|
33
|
+
<h3>Using Generated Markup</h3>
|
|
34
|
+
<p>JavaScript will convert static markup into a full component structure.</p>
|
|
35
|
+
|
|
36
|
+
<dl>
|
|
37
|
+
<dt>One Line Example</dt>
|
|
38
|
+
<dd>
|
|
39
|
+
<dl>
|
|
40
|
+
<dt>Default:</dt>
|
|
41
|
+
<dd>
|
|
42
|
+
<dl>
|
|
43
|
+
<dt>Input:</dt>
|
|
44
|
+
<dd>
|
|
45
|
+
<pre><code><p class="js-show-more--one-line">
|
|
46
|
+
This is a JavaScript-enhanced single line example that will be truncated with an ellipsis. The markup is simpler, and the JavaScript will convert it to the full component structure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
47
|
+
</p></code></pre>
|
|
48
|
+
</dd>
|
|
49
|
+
<dt>Output:</dt>
|
|
50
|
+
<dd>
|
|
51
|
+
<p class="js-show-more--one-line">
|
|
52
|
+
This is a JavaScript-enhanced single line example that will be truncated with an ellipsis. The markup is simpler, and the JavaScript will convert it to the full component structure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
53
|
+
</p>
|
|
54
|
+
</dd>
|
|
55
|
+
</dl>
|
|
56
|
+
</dd>
|
|
57
|
+
<dt>With Link-Style Toggle:</dt>
|
|
58
|
+
<dd>
|
|
59
|
+
<dl>
|
|
60
|
+
<dt>Input:</dt>
|
|
61
|
+
<dd>
|
|
62
|
+
<pre><code><p class="js-show-more--one-line js-show-more--link">
|
|
63
|
+
This is a JavaScript-enhanced single line example that will be truncated with an ellipsis. The markup is simpler, and the JavaScript will convert it to the full component structure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
64
|
+
</p></code></pre>
|
|
65
|
+
</dd>
|
|
66
|
+
<dt>Output:</dt>
|
|
67
|
+
<dd>
|
|
68
|
+
<p class="js-show-more--one-line js-show-more--link">
|
|
69
|
+
This is a JavaScript-enhanced single line example that will be truncated with an ellipsis. The markup is simpler, and the JavaScript will convert it to the full component structure. Lorem ipsum dolor sit amet, consectetur adipiscing elit.
|
|
70
|
+
</p>
|
|
71
|
+
</dd>
|
|
72
|
+
</dl>
|
|
73
|
+
</dd>
|
|
74
|
+
</dl>
|
|
75
|
+
</dd>
|
|
76
|
+
|
|
77
|
+
<dt>Many Lines Example</dt>
|
|
78
|
+
<dd>
|
|
79
|
+
<dl>
|
|
80
|
+
<dt>Default:</dt>
|
|
81
|
+
<dd>
|
|
82
|
+
<dl>
|
|
83
|
+
<dt>Input:</dt>
|
|
84
|
+
<dd>
|
|
85
|
+
<pre><code><p class="js-show-more--many-lines">
|
|
86
|
+
This is a JavaScript-enhanced multi-line example. The markup starts simple, then JavaScript builds the full component structure. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
87
|
+
</p></code></pre>
|
|
88
|
+
</dd>
|
|
89
|
+
<dt>Output:</dt>
|
|
90
|
+
<dd>
|
|
91
|
+
<p class="js-show-more--many-lines">
|
|
92
|
+
This is a JavaScript-enhanced multi-line example. The markup starts simple, then JavaScript builds the full component structure. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
93
|
+
</p>
|
|
94
|
+
</dd>
|
|
95
|
+
</dl>
|
|
96
|
+
</dd>
|
|
97
|
+
<dt>With Link-Style Toggle:</dt>
|
|
98
|
+
<dd>
|
|
99
|
+
<dl>
|
|
100
|
+
<dt>Input:</dt>
|
|
101
|
+
<dd>
|
|
102
|
+
<pre><code><p class="js-show-more--many-lines js-show-more--link">
|
|
103
|
+
This is a JavaScript-enhanced multi-line example. The markup starts simple, then JavaScript builds the full component structure. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
104
|
+
</p></code></pre>
|
|
105
|
+
</dd>
|
|
106
|
+
<dt>Output:</dt>
|
|
107
|
+
<dd>
|
|
108
|
+
<p class="js-show-more--many-lines js-show-more--link">
|
|
109
|
+
This is a JavaScript-enhanced multi-line example. The markup starts simple, then JavaScript builds the full component structure. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
110
|
+
</p>
|
|
111
|
+
</dd>
|
|
112
|
+
</dl>
|
|
113
|
+
</dd>
|
|
114
|
+
</dl>
|
|
115
|
+
</dd>
|
|
116
|
+
</dl>
|
|
@@ -0,0 +1,68 @@
|
|
|
1
|
+
<h3>Using Generated Markup</h3>
|
|
2
|
+
<p>JavaScript will convert static markup into a full component structure.</p>
|
|
3
|
+
|
|
4
|
+
<dl>
|
|
5
|
+
<dt>One Line Example</dt>
|
|
6
|
+
<dd>
|
|
7
|
+
<dl>
|
|
8
|
+
<dt>Default:</dt>
|
|
9
|
+
<dd>
|
|
10
|
+
<p class="c-show-more c-show-more--one-line">
|
|
11
|
+
<input type="checkbox" class="c-show-more__state" id="show-more-1">
|
|
12
|
+
<span class="c-show-more__target">
|
|
13
|
+
This is a single line of text that will be truncated with an ellipsis when it gets too long for its container width. The full text will be revealed when you click "Show More".
|
|
14
|
+
</span>
|
|
15
|
+
<label class="c-show-more__toggle" for="show-more-1">
|
|
16
|
+
<span class="c-show-more__on-text">Show More</span>
|
|
17
|
+
<span class="c-show-more__off-text">Show Less</span>
|
|
18
|
+
</label>
|
|
19
|
+
</p>
|
|
20
|
+
</dd>
|
|
21
|
+
<dt>With Link-Style Toggle:</dt>
|
|
22
|
+
<dd>
|
|
23
|
+
<p class="c-show-more c-show-more--one-line">
|
|
24
|
+
<input type="checkbox" class="c-show-more__state" id="show-more-2">
|
|
25
|
+
<span class="c-show-more__target">
|
|
26
|
+
This is a single line of text that will be truncated with an ellipsis when it gets too long for its container width. The full text will be revealed when you click "Show More".
|
|
27
|
+
</span>
|
|
28
|
+
<label class="c-show-more__toggle" for="show-more-2">
|
|
29
|
+
<span class="x-link c-show-more__on-text">Show More</span>
|
|
30
|
+
<span class="x-link c-show-more__off-text">Show Less</span>
|
|
31
|
+
</label>
|
|
32
|
+
</p>
|
|
33
|
+
</dd>
|
|
34
|
+
</dl>
|
|
35
|
+
</dd>
|
|
36
|
+
|
|
37
|
+
<dt>Many Lines Example</dt>
|
|
38
|
+
<dd>
|
|
39
|
+
<dl>
|
|
40
|
+
<dt>Default:</dt>
|
|
41
|
+
<dd>
|
|
42
|
+
<p class="c-show-more c-show-more--many-lines">
|
|
43
|
+
<input type="checkbox" class="c-show-more__state" id="show-more-3">
|
|
44
|
+
<span class="c-show-more__target">
|
|
45
|
+
This is a JavaScript-enhanced multi-line example. The markup starts simple, then JavaScript builds the full component structure. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
46
|
+
</span>
|
|
47
|
+
<label class="c-show-more__toggle" for="show-more-3">
|
|
48
|
+
<span class="c-show-more__on-text">Show More</span>
|
|
49
|
+
<span class="c-show-more__off-text">Show Less</span>
|
|
50
|
+
</label>
|
|
51
|
+
</p>
|
|
52
|
+
</dd>
|
|
53
|
+
<dt>With Link-Style Toggle:</dt>
|
|
54
|
+
<dd>
|
|
55
|
+
<p class="c-show-more c-show-more--many-lines">
|
|
56
|
+
<input type="checkbox" class="c-show-more__state" id="show-more-4">
|
|
57
|
+
<span class="c-show-more__target">
|
|
58
|
+
This is a JavaScript-enhanced multi-line example. The markup starts simple, then JavaScript builds the full component structure. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.
|
|
59
|
+
</span>
|
|
60
|
+
<label class="c-show-more__toggle" for="show-more-4">
|
|
61
|
+
<span class="x-link c-show-more__on-text">Show More</span>
|
|
62
|
+
<span class="x-link c-show-more__off-text">Show Less</span>
|
|
63
|
+
</label>
|
|
64
|
+
</p>
|
|
65
|
+
</dd>
|
|
66
|
+
</dl>
|
|
67
|
+
</dd>
|
|
68
|
+
</dl>
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
export const defaults = {
|
|
2
|
+
elements: document.querySelectorAll(`
|
|
3
|
+
[class*="js-show-more"]
|
|
4
|
+
`),
|
|
5
|
+
options: {
|
|
6
|
+
lines: 0,
|
|
7
|
+
targetTag: 'span',
|
|
8
|
+
shouldToggleResembleLink: false,
|
|
9
|
+
startIndex: 0,
|
|
10
|
+
},
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Convert elements with js-show-more--* classes into show-more components
|
|
15
|
+
*/
|
|
16
|
+
export function generateMarkup(
|
|
17
|
+
elements = defaults.elements,
|
|
18
|
+
options = defaults.options
|
|
19
|
+
) {
|
|
20
|
+
options = { ...defaults.options, ...options };
|
|
21
|
+
|
|
22
|
+
[...elements].forEach((element, index) => {
|
|
23
|
+
if (element.querySelector('p, div, section, article, aside, nav, header, hgroup, footer, main')) {
|
|
24
|
+
console.warn(
|
|
25
|
+
'A "c-show-more" component expects only text and inline elements. Block elements may not truncate correctly. Consider restructuring content to avoid block elements.',
|
|
26
|
+
element
|
|
27
|
+
);
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const wrapper = document.createElement(element.tagName);
|
|
31
|
+
wrapper.className = element.className;
|
|
32
|
+
wrapper.classList.add('c-show-more');
|
|
33
|
+
wrapper.classList.add(`c-show-more--${options.lines <= 1 ? 'one-line' : 'many-lines'}`);
|
|
34
|
+
|
|
35
|
+
const checkbox = document.createElement('input');
|
|
36
|
+
checkbox.type = 'checkbox';
|
|
37
|
+
checkbox.className = 'c-show-more__state';
|
|
38
|
+
checkbox.id = `show-more-${options.startIndex + index}`;
|
|
39
|
+
|
|
40
|
+
const target = document.createElement(options.targetTag);
|
|
41
|
+
target.className = 'c-show-more__target';
|
|
42
|
+
target.innerHTML = element.innerHTML;
|
|
43
|
+
if (options.lines) {
|
|
44
|
+
target.style.setProperty('--lines', options.lines);
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
const toggle = document.createElement('label');
|
|
48
|
+
toggle.className = 'c-show-more__toggle';
|
|
49
|
+
toggle.htmlFor = checkbox.id;
|
|
50
|
+
|
|
51
|
+
const onText = document.createElement('span');
|
|
52
|
+
onText.className =
|
|
53
|
+
`${options.shouldToggleResembleLink ? 'x-link ' : ''}`
|
|
54
|
+
+ 'c-show-more__on-text';
|
|
55
|
+
onText.textContent = 'Show More';
|
|
56
|
+
|
|
57
|
+
const offText = document.createElement('span');
|
|
58
|
+
offText.className =
|
|
59
|
+
`${options.shouldToggleResembleLink ? 'x-link ' : ''}`
|
|
60
|
+
+ 'c-show-more__off-text';
|
|
61
|
+
offText.textContent = 'Show Less';
|
|
62
|
+
|
|
63
|
+
toggle.appendChild(onText);
|
|
64
|
+
toggle.appendChild(offText);
|
|
65
|
+
|
|
66
|
+
wrapper.appendChild(checkbox);
|
|
67
|
+
wrapper.appendChild(target);
|
|
68
|
+
wrapper.appendChild(toggle);
|
|
69
|
+
|
|
70
|
+
element.replaceWith(wrapper);
|
|
71
|
+
});
|
|
72
|
+
}
|
|
@@ -13,6 +13,7 @@ Styleguide: Components.ShowMore
|
|
|
13
13
|
*/
|
|
14
14
|
@import url("../tools/x-truncate.css");
|
|
15
15
|
|
|
16
|
+
|
|
16
17
|
/* Truncation */
|
|
17
18
|
|
|
18
19
|
/* Many Lines */
|
|
@@ -26,11 +27,14 @@ Styleguide: Components.ShowMore
|
|
|
26
27
|
/* One Line */
|
|
27
28
|
.c-show-more--one-line .c-show-more__target {
|
|
28
29
|
@mixin truncate--one-line;
|
|
30
|
+
|
|
31
|
+
display: block;
|
|
29
32
|
}
|
|
30
33
|
.c-show-more--one-line .c-show-more__state:checked ~ .c-show-more__target {
|
|
31
34
|
@mixin untruncate--one-line;
|
|
32
35
|
}
|
|
33
36
|
|
|
37
|
+
|
|
34
38
|
/* Show More / Show Less */
|
|
35
39
|
|
|
36
40
|
/* State */
|
|
@@ -44,6 +48,7 @@ Styleguide: Components.ShowMore
|
|
|
44
48
|
display: block;
|
|
45
49
|
}
|
|
46
50
|
|
|
51
|
+
|
|
47
52
|
/* Toggle */
|
|
48
53
|
.c-show-more__toggle {
|
|
49
54
|
cursor: pointer;
|
|
@@ -7,26 +7,10 @@ from https://frontera-portal.tacc.utexas.edu/. It has:
|
|
|
7
7
|
- extra markup (`a > span`)
|
|
8
8
|
-->
|
|
9
9
|
<ul class="s-cms-nav navbar-nav mr-auto">
|
|
10
|
-
<li class="nav-item active">
|
|
11
|
-
<a class="nav-link" href="/"><span>Frontera</span></a>
|
|
12
|
-
</li>
|
|
13
|
-
|
|
14
|
-
<li class="nav-item">
|
|
15
|
-
<a class="nav-link" href="/training/"><span>Training</span></a>
|
|
16
|
-
</li>
|
|
17
|
-
|
|
18
10
|
<li class="nav-item">
|
|
19
11
|
<a class="nav-link" href="/user-guide/"><span>User Guide</span></a>
|
|
20
12
|
</li>
|
|
21
13
|
|
|
22
|
-
<li class="nav-item">
|
|
23
|
-
<a class="nav-link" href="/allocations/"><span>Allocations</span></a>
|
|
24
|
-
</li>
|
|
25
|
-
|
|
26
|
-
<li class="nav-item">
|
|
27
|
-
<a class="nav-link" href="/fellowship/"><span>Fellowships</span></a>
|
|
28
|
-
</li>
|
|
29
|
-
|
|
30
14
|
<li class="nav-item">
|
|
31
15
|
<a class="nav-link" href="/news/"><span>News</span></a>
|
|
32
16
|
</li>
|
|
@@ -5,7 +5,9 @@ context:
|
|
|
5
5
|
- ../../assets/core-styles.header.css
|
|
6
6
|
- ../../assets/core-styles.theme.default.css
|
|
7
7
|
variants:
|
|
8
|
+
- name: default
|
|
9
|
+
hidden: true
|
|
8
10
|
- name: with-branding
|
|
9
11
|
label: With Branding
|
|
10
|
-
- name:
|
|
11
|
-
label:
|
|
12
|
+
- name: different-logos
|
|
13
|
+
label: Different Logos
|
|
@@ -1,14 +1,22 @@
|
|
|
1
1
|
<nav id="s-header" class="s-header navbar navbar-expand-lg navbar-dark">
|
|
2
2
|
<a class="navbar-brand" href="/">
|
|
3
|
-
<img
|
|
4
|
-
|
|
3
|
+
<img
|
|
4
|
+
{{#if isSVGLogo}}
|
|
5
|
+
src="https://cdn.jsdelivr.net/gh/TACC/Core-CMS-Custom@21da26d/digitalrocks_assets/NSF-DigitalRocks-Logo-White.svg"
|
|
6
|
+
alt="Vector Logo"
|
|
7
|
+
{{else}}
|
|
8
|
+
src="http://cep.tacc.utexas.edu/static/site_cms/img/org_logos/portal.png"
|
|
9
|
+
alt="Raster Logo"
|
|
10
|
+
{{/if}}
|
|
11
|
+
class="portal-logo"
|
|
12
|
+
/>
|
|
5
13
|
</a>
|
|
6
|
-
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#
|
|
7
|
-
aria-controls="
|
|
14
|
+
<button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#navbarExpandTarget-{{default id 0}}"
|
|
15
|
+
aria-controls="navbarExpandTarget-{{default id 0}}" aria-expanded="false" aria-label="Toggle navigation">
|
|
8
16
|
<span class="navbar-toggler-icon"></span>
|
|
9
17
|
</button>
|
|
10
18
|
|
|
11
|
-
<div class="collapse navbar-collapse" id="
|
|
19
|
+
<div class="collapse navbar-collapse" id="navbarExpandTarget-{{default id 0}}">
|
|
12
20
|
{{> @s-cms-nav}} {{> @s-portal-nav}}
|
|
13
21
|
</div>
|
|
14
22
|
</nav>
|
|
@@ -18,12 +18,12 @@ Styleguide Trumps.Scopes.Header
|
|
|
18
18
|
@import url("../tools/media-queries.css");
|
|
19
19
|
@import url("./s-header.bootstrap.css");
|
|
20
20
|
|
|
21
|
-
/* WARNING: NO-R/EM:
|
|
22
|
-
`em` nor `rem` was not allowed because results were not consistent.
|
|
23
|
-
UPDATE: As of PR #312, this has likely changed (untested). */
|
|
21
|
+
/* WARNING: NO-R/EM: CMS uses 1rem = 10px, but Portal uses 1rem = 16px */
|
|
24
22
|
|
|
25
23
|
.s-header {
|
|
24
|
+
--height: 50px;
|
|
26
25
|
--header-major-border-width: 1px;
|
|
26
|
+
|
|
27
27
|
font-size: var(--global-font-size--medium); /* NO-R/EM: Overwrite `bootstrap.3.3.7.css` */
|
|
28
28
|
font-weight: var(--bold);
|
|
29
29
|
letter-spacing: 0.025px; /* 14px * 0.025em equals design-requested 0.35px */
|
|
@@ -43,6 +43,19 @@ Styleguide Trumps.Scopes.Header
|
|
|
43
43
|
border-bottom: var(--header-major-border-width) solid var(--header-major-border-color);
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
/* To prevent header bar resize whether:
|
|
47
|
+
- navbar is collapsed or expanded
|
|
48
|
+
- logo is wide or narrow
|
|
49
|
+
- logo is raster or vector
|
|
50
|
+
*/
|
|
51
|
+
.s-header .navbar-brand {
|
|
52
|
+
height: calc(
|
|
53
|
+
var(--height)
|
|
54
|
+
- var(--nav-padding-vert) * 2
|
|
55
|
+
- var(--header-major-border-width)
|
|
56
|
+
);
|
|
57
|
+
}
|
|
58
|
+
|
|
46
59
|
/* Affiliation */
|
|
47
60
|
|
|
48
61
|
/* SEE: ../branding_logos.css */
|
|
@@ -50,17 +63,13 @@ Styleguide Trumps.Scopes.Header
|
|
|
50
63
|
/* Logo */
|
|
51
64
|
|
|
52
65
|
.s-header .navbar-brand {
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
min-width: 176px;
|
|
59
|
-
margin-right: 16px; /* NO-R/EM: 1rem (from Bootstrap via `.navbar-brand`) */
|
|
60
|
-
padding: 0;
|
|
66
|
+
/* To align first CMS nav link with Portal "Dashboard" header */
|
|
67
|
+
/* CAVEAT: A wide logo will shift first CMS nav link rightward */
|
|
68
|
+
flex-shrink: 0;
|
|
69
|
+
flex-basis: 175px;
|
|
70
|
+
margin-right: 15px; /* NO-R/EM: 1rem (from Bootstrap via `.navbar-brand`) */
|
|
61
71
|
|
|
62
|
-
|
|
63
|
-
/* text-decoration: none; */ /* already provided by Bootstrap */
|
|
72
|
+
padding: unset;
|
|
64
73
|
}
|
|
65
74
|
|
|
66
75
|
/* Navigation */
|
|
@@ -71,7 +80,7 @@ Styleguide Trumps.Scopes.Header
|
|
|
71
80
|
align-items: stretch;
|
|
72
81
|
}
|
|
73
82
|
|
|
74
|
-
.s-header
|
|
83
|
+
.s-header {
|
|
75
84
|
/* Make horizontal padding match the horizontal content buffer in Portal */
|
|
76
85
|
/* FAQ: The `calc()` keeps track of disparate source of space values */
|
|
77
86
|
/* `16px` = `1rem` from Portal (via `#sidebar .nav-content`) */
|
|
@@ -82,17 +91,6 @@ Styleguide Trumps.Scopes.Header
|
|
|
82
91
|
background-color: var(--header-bkgd-color);
|
|
83
92
|
padding: var(--nav-padding-vert) var(--nav-padding-horz);
|
|
84
93
|
}
|
|
85
|
-
/* On wide viewport, prevent header resize from dynamic content */
|
|
86
|
-
@media (--medium-and-above) {
|
|
87
|
-
.s-header.navbar {
|
|
88
|
-
--logo-height: 60px;
|
|
89
|
-
|
|
90
|
-
min-height: var(--logo-height);
|
|
91
|
-
}
|
|
92
|
-
.s-header > .navbar-brand {
|
|
93
|
-
min-height: calc( var(--logo-height) - var(--nav-padding-vert) * 2 );
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
94
|
|
|
97
95
|
/* Navigation: Links */
|
|
98
96
|
|