This styleguide is showing only the UI-Kit components with a reasonable
4 | template. It is not providing a comprehensive list of every style
5 | available in UI-Kit or the theme. Feel free to add other components as needed.
6 |
For live examples of other styling, install the defaul content and visit
7 | the **/test** page.
This styleguide is showing only the UI-Kit components with a reasonable
46 | template. It is not providing a comprehensive list of every style
47 | available in UI-Kit or the theme. Feel free to add other components as needed.
48 |
For live examples of other styling, install the defaul content and visit
49 | the **/test** page.
50 |
51 |
52 |
53 |
54 |
55 |
56 |
57 |
58 |
59 |
60 |
61 |
62 |
81 |
82 |
83 |
84 |
85 |
86 |
87 |
88 |
89 |
90 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/WARNING.txt:
--------------------------------------------------------------------------------
1 | WARNING: This folder is deleted and re-recreated each time the style guide is
2 | built. Do NOT put your own files in this folder.
3 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/github-fork--black.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/govCMS/govcms8_uikit_starter/3da817b1ddd96fa2511a75dc2fca5d9e852fed43/styleguide/kss-assets/github-fork--black.png
--------------------------------------------------------------------------------
/styleguide/kss-assets/govcms8_kss-accordion.js:
--------------------------------------------------------------------------------
1 | (function (window, document) {
2 |
3 | 'use strict';
4 |
5 | var count = 1;
6 |
7 | // Get the .au-body class in ui-kit-accordion section.
8 | var groups = document.querySelectorAll('#kssref-ui-kit-accordion .au-body');
9 |
10 | for (var i = 0; i < groups.length; i++) {
11 | var group = groups[i];
12 |
13 | // Update the onclick attribute to get the right accordion-group number.
14 | var buttons = group.querySelectorAll('.au-btn');
15 | for (var k = 0; k < buttons.length; k++) {
16 | var button = buttons[k];
17 |
18 | var str = button.getAttribute('onclick');
19 | var newValue = str.replace(".accordion-group", ".accordion-group-" + count);
20 | button.setAttribute('onclick', newValue);
21 | }
22 |
23 | // Update the accordion-group to get number from au-body count.
24 | var el = group.querySelector('.accordion-group');
25 | var newValue = el.getAttribute('class') + '-' + count;
26 | el.setAttribute('class', newValue);
27 |
28 | var accordions = group.querySelectorAll('.au-accordion');
29 |
30 | for (var j = 0; j < accordions.length; j++) {
31 | var accordion = accordions[j];
32 |
33 | // Update href of accordion to be unique.
34 | var el = accordion.querySelector('.au-accordion__title');
35 | var newValue = el.getAttribute('href') + '-' + count;
36 | el.setAttribute('href', newValue);
37 |
38 | // Update aria-controls of accordion to be unique.
39 | newValue = el.getAttribute('aria-controls') + '-' + count;
40 | el.setAttribute('aria-controls', newValue);
41 |
42 | // Update id of accordion body to be unique.
43 | el = accordion.querySelector('.au-accordion__body');
44 | newValue = el.getAttribute('id') + '-' + count;
45 | el.setAttribute('id', newValue);
46 | }
47 |
48 | count++;
49 | }
50 |
51 |
52 | })(window, document);
53 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/govcms8_kss.css:
--------------------------------------------------------------------------------
1 | /* Custom styling for GovCMS styleguide. */
2 | .kss-markup {
3 | clear: both;
4 | }
5 |
6 | /* Styleguide example block should not move horizontally. */
7 | .au-body--dark.col-sm-6:not(.au-body--alt) {
8 | clear: left;
9 | }
10 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/kss-accordion.js:
--------------------------------------------------------------------------------
1 | (function (window, document) {
2 |
3 | 'use strict';
4 |
5 | var count = 1;
6 |
7 | var groups = document.querySelectorAll('#kssref-ui-kit-accordion .au-body');
8 | console.log(groups);
9 |
10 | for (var i = 0; i < groups.length; i++) {
11 | var group = groups[i];
12 | console.log(count);
13 | console.log(group);
14 |
15 | var buttons = group.querySelectorAll('.au-btn');
16 | for (var k = 0; k < buttons.length; k++) {
17 | var button = buttons[k];
18 |
19 | var str = button.getAttribute('onclick');
20 | var newValue = str.replace(".accordion-group", ".accordion-group-" + count);
21 | console.log(newValue);
22 | button.setAttribute('onclick', newValue);
23 | }
24 |
25 | var el = group.querySelector('.accordion-group');
26 | var newValue = el.getAttribute('class') + '-' + count;
27 | console.log(newValue);
28 | el.setAttribute('class', newValue);
29 |
30 | var accordions = group.querySelectorAll('.au-accordion');
31 |
32 | for (var j = 0; j < accordions.length; j++) {
33 | var accordion = accordions[j];
34 | console.log(accordion);
35 |
36 | var el = accordion.querySelector('.au-accordion__title');
37 | var newValue = el.getAttribute('href') + '-' + count;
38 | console.log(newValue);
39 | el.setAttribute('href', newValue);
40 |
41 | newValue = el.getAttribute('aria-controls') + '-' + count;
42 | console.log(newValue);
43 | el.setAttribute('aria-controls', newValue);
44 |
45 | el = accordion.querySelector('.au-accordion__body');
46 | newValue = el.getAttribute('id') + '-' + count;
47 | console.log(newValue);
48 | el.setAttribute('id', newValue);
49 | }
50 |
51 | count++;
52 | }
53 |
54 |
55 | })(window, document);
56 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/kss-fullscreen.js:
--------------------------------------------------------------------------------
1 | (function (window, document) {
2 | 'use strict';
3 |
4 | // Set the configuration values on object creation.
5 | // - idPrefix: The string that uniquely prefixes the ID of all elements that
6 | // can receive the fullscreen focus.
7 | // - bodyClass: The class that is set on the body element when the fullscreen
8 | // mode is toggled on.
9 | // - elementClass: the class that is set on the element that is receiving the
10 | // fullscreen focus.
11 | var KssFullScreen = function (config) {
12 | this.idPrefix = config.idPrefix || 'kss-fullscreen-';
13 | this.bodyClass = config.bodyClass || 'kss-fullscreen-mode';
14 | this.elementClass = config.elementClass || 'is-fullscreen';
15 |
16 | this.init();
17 | };
18 |
19 | // Initialize the page to see if the fullscreen mode should be immediately
20 | // turned on.
21 | KssFullScreen.prototype.init = function () {
22 | // Check the location hash to see if it matches the idPrefix.
23 | if (window.location.hash.slice(0, this.idPrefix.length + 1) === '#' + this.idPrefix) {
24 | this.setFocus(window.location.hash.slice(1 + this.idPrefix.length));
25 | }
26 |
27 | var self = this;
28 | // Initialize all fullscreen toggle buttons.
29 | document.querySelectorAll('a[data-kss-fullscreen]').forEach(function (button) {
30 | // Get the section reference from the data attribute.
31 | button.onclick = self.setFocus.bind(self, button.dataset.kssFullscreen);
32 | });
33 | };
34 |
35 | // Activation function that takes the ID of the element that will receive
36 | // fullscreen focus.
37 | KssFullScreen.prototype.setFocus = function (id) {
38 | var el;
39 |
40 | // Find the element with the given ID and start fullscreen mode.
41 | if (el = document.getElementById(id)) {
42 | el.classList.toggle('is-fullscreen');
43 | document.body.classList.toggle('kss-fullscreen-mode');
44 |
45 | // When enabling the focus mode, change the location hash.
46 | if (el.classList.contains('is-fullscreen')) {
47 | window.location.hash = '#' + this.idPrefix + id;
48 | // Don't follow the link location.
49 | return false;
50 | }
51 | }
52 |
53 | return true;
54 | };
55 |
56 | // Export to DOM global space.
57 | window.KssFullScreen = KssFullScreen;
58 |
59 | })(window, document);
60 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/kss-guides.js:
--------------------------------------------------------------------------------
1 | (function (window, document) {
2 | 'use strict';
3 |
4 | var KssGuides = function (config) {
5 | this.bodyClass = config.bodyClass || 'kss-guides-mode';
6 |
7 | this.init();
8 | };
9 |
10 | KssGuides.prototype.init = function () {
11 | var self = this;
12 | // Initialize all guides toggle buttons.
13 | document.querySelectorAll('a[data-kss-guides]').forEach(function (el) {
14 | el.onclick = self.showGuides.bind(self);
15 | });
16 | };
17 |
18 | // Toggle the guides mode.
19 | KssGuides.prototype.showGuides = function () {
20 | document.getElementsByTagName('body')[0].classList.toggle(this.bodyClass);
21 | };
22 |
23 | // Export to DOM global space.
24 | window.KssGuides = KssGuides;
25 |
26 | })(window, document);
27 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/kss-markup.js:
--------------------------------------------------------------------------------
1 | (function (window, document) {
2 | 'use strict';
3 |
4 | var KssMarkup = function (config) {
5 | this.bodyClass = config.bodyClass || 'kss-markup-mode';
6 | this.detailsClass = config.detailsClass || 'kss-markup';
7 |
8 | this.init();
9 | };
10 |
11 | KssMarkup.prototype.init = function () {
12 | var self = this;
13 | // Initialize all markup toggle buttons.
14 | document.querySelectorAll('a[data-kss-markup]').forEach(function (el) {
15 | el.onclick = self.showGuides.bind(self);
16 | });
17 | };
18 |
19 | // Activation function that takes the ID of the element that will receive
20 | // fullscreen focus.
21 | KssMarkup.prototype.showGuides = function () {
22 | var body = document.getElementsByTagName('body')[0],
23 | enabled = body.classList.contains(this.bodyClass);
24 |
25 | document.querySelectorAll('.' + this.detailsClass).forEach(function (el) {
26 | if (enabled) {
27 | el.removeAttribute('open');
28 | } else {
29 | el.setAttribute('open', '');
30 | }
31 | });
32 |
33 | // Toggle the markup mode.
34 | body.classList.toggle(this.bodyClass);
35 | };
36 |
37 | // Export to DOM global space.
38 | window.KssMarkup = KssMarkup;
39 |
40 | })(window, document);
41 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/kss.js:
--------------------------------------------------------------------------------
1 | (function() {
2 | var KssStateGenerator;
3 |
4 | KssStateGenerator = (function() {
5 | var pseudo_selectors;
6 |
7 | pseudo_selectors = ['hover', 'enabled', 'disabled', 'active', 'visited', 'focus', 'target', 'checked', 'empty', 'first-of-type', 'last-of-type', 'first-child', 'last-child'];
8 |
9 | function KssStateGenerator() {
10 | var idx, idxs, pseudos, replaceRule, rule, stylesheet, _i, _len, _len2, _ref, _ref2;
11 | pseudos = new RegExp("(\\:" + (pseudo_selectors.join('|\\:')) + ")", "g");
12 | try {
13 | _ref = document.styleSheets;
14 | for (_i = 0, _len = _ref.length; _i < _len; _i++) {
15 | stylesheet = _ref[_i];
16 | if (stylesheet.href && stylesheet.href.indexOf(document.domain) >= 0) {
17 | idxs = [];
18 | _ref2 = stylesheet.cssRules;
19 | for (idx = 0, _len2 = _ref2.length; idx < _len2; idx++) {
20 | rule = _ref2[idx];
21 | if ((rule.type === CSSRule.STYLE_RULE) && pseudos.test(rule.selectorText)) {
22 | replaceRule = function(matched, stuff) {
23 | return matched.replace(/\:/g, '.pseudo-class-');
24 | };
25 | this.insertRule(rule.cssText.replace(pseudos, replaceRule));
26 | }
27 | pseudos.lastIndex = 0;
28 | }
29 | }
30 | }
31 | } catch (_error) {}
32 | }
33 |
34 | KssStateGenerator.prototype.insertRule = function(rule) {
35 | var headEl, styleEl;
36 | headEl = document.getElementsByTagName('head')[0];
37 | styleEl = document.createElement('style');
38 | styleEl.type = 'text/css';
39 | if (styleEl.styleSheet) {
40 | styleEl.styleSheet.cssText = rule;
41 | } else {
42 | styleEl.appendChild(document.createTextNode(rule));
43 | }
44 | return headEl.appendChild(styleEl);
45 | };
46 |
47 | return KssStateGenerator;
48 |
49 | })();
50 |
51 | new KssStateGenerator;
52 |
53 | }).call(this);
54 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/noise-low.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/govCMS/govcms8_uikit_starter/3da817b1ddd96fa2511a75dc2fca5d9e852fed43/styleguide/kss-assets/noise-low.png
--------------------------------------------------------------------------------
/styleguide/kss-assets/sample-inline.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/govCMS/govcms8_uikit_starter/3da817b1ddd96fa2511a75dc2fca5d9e852fed43/styleguide/kss-assets/sample-inline.png
--------------------------------------------------------------------------------
/styleguide/kss-assets/sample-inline.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/sample.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/govCMS/govcms8_uikit_starter/3da817b1ddd96fa2511a75dc2fca5d9e852fed43/styleguide/kss-assets/sample.png
--------------------------------------------------------------------------------
/styleguide/kss-assets/sample.svg:
--------------------------------------------------------------------------------
1 |
4 |
--------------------------------------------------------------------------------
/styleguide/kss-assets/scrollspy.js:
--------------------------------------------------------------------------------
1 | (function e(t,n,r){function s(o,u){if(!n[o]){if(!t[o]){var a=typeof require=="function"&&require;if(!u&&a)return a(o,!0);if(i)return i(o,!0);var f=new Error("Cannot find module '"+o+"'");throw f.code="MODULE_NOT_FOUND",f}var l=n[o]={exports:{}};t[o][0].call(l.exports,function(e){var n=t[o][1][e];return s(n?n:e)},l,l.exports,e,t,n,r)}return n[o].exports}var i=typeof require=="function"&&require;for(var o=0;o scrollTop);
116 | };
117 |
118 | ScrollSpy.prototype.markNav = function (elems) {
119 | var navItems = this.nav,
120 | isAlreadyMarked = false;
121 |
122 | for (var i = 0, max = navItems.length; i < max; i++) {
123 | if (elems.viewStatusList[i] && !isAlreadyMarked) {
124 | isAlreadyMarked = true;
125 | navItems[i].classList.add(this.className);
126 | } else {
127 | navItems[i].classList.remove(this.className);
128 | }
129 | }
130 | };
131 |
132 |
133 | module.exports = ScrollSpy;
134 |
135 | },{}],2:[function(require,module,exports){
136 | (function (global){
137 | /**
138 | * ScrollSpy
139 | *
140 | */
141 |
142 | var ScrollSpy = require('./modules/scrollspy');
143 |
144 | global.ScrollSpy = module.exports = ScrollSpy;
145 |
146 | }).call(this,typeof global !== "undefined" ? global : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : {})
147 | },{"./modules/scrollspy":1}]},{},[2]);
148 |
--------------------------------------------------------------------------------
/templates/block/block--local-tasks-block.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "block.html.twig" %}
2 | {#
3 | /**
4 | * @file
5 | * Theme override for tabs.
6 | */
7 | #}
8 |
9 | {% block content %}
10 | {% set classes = [
11 | 'au-body',
12 | 'tabs',
13 | local_task_style ? local_task_style,
14 | ]
15 | %}
16 | {% if content %}
17 |
22 | {% endif %}
23 | {% endblock %}
24 |
--------------------------------------------------------------------------------
/templates/block/block--system-branding-block.html.twig:
--------------------------------------------------------------------------------
1 | {% extends "block.html.twig" %}
2 | {#
3 | /**
4 | * @file
5 | * Theme override for a branding block.
6 | *
7 | * Each branding element variable (logo, name, slogan) is only available if
8 | * enabled in the block configuration.
9 | *
10 | * Available variables:
11 | * - site_logo: Logo for site as defined in Appearance or theme settings.
12 | * - site_name: Name for site as defined in Site information settings.
13 | * - site_slogan: Slogan for site as defined in Site information settings.
14 | */
15 | #}
16 | {% block content %}
17 | {% if site_logo %}
18 |
19 |
20 |
21 | {% endif %}
22 | {% if site_name %}
23 | {{ site_name }}
24 | {% endif %}
25 | {{ site_slogan }}
26 | {% endblock %}
27 |
--------------------------------------------------------------------------------
/templates/block/block--system-menu-block.html.twig:
--------------------------------------------------------------------------------
1 | {#
2 | /**
3 | * @file
4 | * Theme override for a menu block.
5 | *
6 | * Available variables:
7 | * - plugin_id: The ID of the block implementation.
8 | * - label: The configured label of the block if visible.
9 | * - configuration: A list of the block's configuration values.
10 | * - label: The configured label for the block.
11 | * - label_display: The display settings for the label.
12 | * - provider: The module or other provider that provided this block plugin.
13 | * - Block plugin specific settings will also be stored here.
14 | * - content: The content of this block.
15 | * - attributes: HTML attributes for the containing element.
16 | * - id: A valid HTML ID and guaranteed unique.
17 | * - title_attributes: HTML attributes for the title element.
18 | * - content_attributes: HTML attributes for the content element.
19 | * - title_prefix: Additional output populated by modules, intended to be
20 | * displayed in front of the main title tag that appears in the template.
21 | * - title_suffix: Additional output populated by modules, intended to be
22 | * displayed after the main title tag that appears in the template.
23 | *
24 | * Headings should be used on navigation menus that consistently appear on
25 | * multiple pages. When this menu block's label is configured to not be
26 | * displayed, it is automatically made invisible using the 'visually-hidden' CSS
27 | * class, which still keeps it visible for screen-readers and assistive
28 | * technology. Headings allow screen-reader and keyboard only users to navigate
29 | * to or skip the links.
30 | * See http://juicystudio.com/article/screen-readers-display-none.php and
31 | * http://www.w3.org/TR/WCAG-TECHS/H42.html for more information.
32 | */
33 | #}
34 | {% if attributes.id %}
35 | {% set heading_id = attributes.id ~ '-menu'|clean_id %}
36 | {% endif %}
37 | {% if not hide_title and heading_id %}
38 |