Compare commits

...

46 commits

Author SHA1 Message Date
4a926facf3 Add container class to fix indenting on webform confirmation pages
Ref agaric/sites/agaric-coop#241
2023-10-24 14:02:53 -04:00
57c713c4f9 Clean copy of webform confirmation template from webform module
In preparation for overriding.

Ref agaric/sites/agaric-coop#241
2023-10-24 14:01:06 -04:00
5c64104e87 Compile css 2023-08-30 13:28:52 -07:00
690653c952 Revert addition of authoring details from title paragraph
Ensure authoring details still display on every full node with author(s)
2023-08-30 13:28:34 -07:00
be59bfdb2c Compile css 2023-07-13 18:19:55 -07:00
2e7f90350d Add date to paragraph title template 2023-07-13 18:19:24 -07:00
ea1c1a1a37 Add authors to paragraph title template 2023-07-13 16:40:40 -07:00
Louis Elkner-Alfaro
6852975828 Add authors and date
Ref: https://gitlab.com/agaric/sites/agaric-coop/-/issues/239
2023-07-03 14:20:31 -07:00
d82b9e5615 Move syndication details into content 2022-11-18 12:43:41 -05:00
f0294c3a07 Add TODO and remove test comment (latter implies rss teaser not used) 2022-03-06 11:46:00 -05:00
023119cea1 Adapt pattern deprecated in Twig 2.10 for compatibility in Twig 3+
As of Twig 2.10, use the filter filter instead, or an if condition inside the for body (if your condition depends on a variable updated inside the loop and you are not using the loop variable).

Per tip on https://twig.symfony.com/doc/2.x/tags/for.html
2022-03-06 11:45:28 -05:00
9cf4362e07 Commit compiled CSS 2021-07-14 08:00:12 -04:00
benjamin melançon
b925a57e32 Commit compiled CSS 2020-06-18 12:47:37 -04:00
benjamin melançon
f957f0cb3a Don't do extra top margin for headings in flow when they're further nested in columns
Ref #221
2020-06-18 12:47:14 -04:00
benjamin melançon
b29b0b2d33 Fix template suggestions; works *without* the twigsuggest DS fix 2020-06-18 12:45:57 -04:00
benjamin melançon
e42ebca830 Override display suite two column layout to remove their classes, keep columns on mobile
For landing page teasers

Ref #221
2020-06-18 11:47:54 -04:00
benjamin melançon
a5b74b91b3 Commit compiled CSS 2020-06-17 16:20:48 -04:00
benjamin melançon
b8fbff0e37 Keep webforms wider on medium screen sizes 2020-06-17 16:20:41 -04:00
benjamin melançon
7445bc5a72 Try a crazy experiment of bold borders on webforms
Ref agaric/sites/agaric-com#221
2020-06-17 07:59:16 -04:00
benjamin melançon
0c2bf5f383 Commit compiled CSS 2020-06-12 21:59:44 -04:00
benjamin melançon
55c44c546e Make form label above and below padding more like headings 2020-06-12 19:47:58 -04:00
benjamin melançon
f4218ebf88 Commit compiled CSS 2020-06-12 11:06:11 -04:00
benjamin melançon
8867a73669 Update README 2020-06-12 11:05:02 -04:00
benjamin melançon
42d0de98c3 Try applying hover padding *all* the time; so only background changes 2020-06-12 10:59:32 -04:00
benjamin melançon
5a8e3c221a Do not make menu header transparent if background is white
Ref agaric/sites/agaric-com#86
2020-03-02 04:29:31 -05:00
benjamin melançon
cb0f7b6478 Commit compiled CSS 2020-03-02 03:12:59 -05:00
benjamin melançon
0097edac26 Widen main title so words like 'Community' aren't split into two lines 2020-03-02 03:07:33 -05:00
benjamin melançon
4b7ec7b8d1 Commit compiled CSS, with the one change we expected now 2019-11-18 04:50:13 -05:00
benjamin melançon
92bf8995f7 Update NPM packages, including updating Bulma to what we actually have compiled 2019-11-18 04:49:17 -05:00
benjamin melançon
2bdc1a42c8 Undo cancellation of blockquote styles 2019-11-18 04:40:47 -05:00
Benjamin Melançon
08bae50a18 Update Bulma, and add my bit of code styling CSS too 2019-08-18 17:08:44 -04:00
benjamin melançon
a11ac27bde Improve styling of inline code 2019-08-03 16:49:45 -04:00
benjamin melançon
660027931b Commit compiled CSS 2019-08-01 11:38:16 -04:00
benjamin melançon
e4331ffe7b Add shortcut for compiling CSS from Sass 2019-08-01 11:37:54 -04:00
benjamin melançon
cae8eea4c7 Remove interfering/unnecessary with column class 2019-08-01 11:33:07 -04:00
benjamin melançon
ba06059f67 Keep left, image column narrow-ish 2019-08-01 11:31:32 -04:00
benjamin melançon
9e9383e9da Add column classes to teaser content so images stack on mobile 2019-08-01 11:27:07 -04:00
benjamin melançon
09ab33dcf3 Format source code 2019-08-01 11:26:14 -04:00
benjamin melançon
5a268d9957 Commit compiled CSS 2019-08-01 10:26:02 -04:00
benjamin melançon
d204decc98 reduce the weight of the 'Just one more thing' font 2019-08-01 09:48:14 -04:00
mlncn
0ea75072c4 Merge branch 'fix-fix-bulma-prism' into 'master'
Fixes a bug in the highlighted code.

See merge request agaric/patternlibrary!15
2019-06-06 18:48:50 +00:00
David Valdez
cf4e5ac137 Fixes a bug in the highlighted code.
https://github.com/jgthms/bulma/issues/1708
2019-06-06 12:46:41 -05:00
mlncn
80eb51b977 Merge branch 'fix-header-drupal-87' into 'master'
Drupal 8.7.1 add a new div which was breaking our header.

See merge request agaric/patternlibrary!14
2019-05-13 18:56:07 +00:00
David Valdez
44c29fb885 Drupal 8.7.1 add a new div which was breaking our header.
That was fixed on this commit, see more info here:
https://www.drupal.org/node/3002643
2019-05-13 13:54:13 -05:00
David Valdez
402f5296a5 Merge branch 'privacy-policy' into 'master'
Add the privacy policy in the footer

See merge request agaric/patternlibrary!12
2019-03-12 19:12:25 +00:00
David Valdez
f8c16b5846 Add the privacy policy in the footer 2019-03-12 13:10:11 -06:00
29 changed files with 1362 additions and 1067 deletions

View file

@ -17,6 +17,19 @@ _This command will look at your `.nvmrc` file and use the version node.js specif
_This command looks at `package.json` and installs all the npm dependencies specified in it. Some of the dependencies include grunt and grunt-sass._
## Usage
### Compile CSS
`grunt sass`
See more available Grunt commands:
`grunt --help`
## Stuff we're not using
### Rebuild the style guide
`grunt kss`

File diff suppressed because it is too large Load diff

View file

@ -67,3 +67,4 @@
@import "agaric/component.iconlist";
@import "agaric/component.related";
@import "agaric/component.footer";
@import "agaric/component.code";

View file

@ -5,9 +5,6 @@
// Styleguide: Base.Blockquote
.content blockquote {
border-left-width: 0;
padding-left: 0;
padding-right: 0;
color: currentColor;
//
* {

View file

@ -59,23 +59,19 @@ p {
.content a {
font-weight: bold;
padding: $link-hover-padding;
margin: -$link-hover-padding;
&:hover {
color: $link-hover;
background-color: $link-hover-background;
padding: $link-hover-padding;
margin: -$link-hover-padding;
}
&:focus {
color: $link-focus;
background-color: $link-hover-background;
padding: $link-hover-padding;
margin: -$link-hover-padding;
}
&:active {
color: $link-active;
background-color: $link-hover-background;
padding: $link-hover-padding;
margin: -$link-hover-padding;
}
}

View file

@ -25,6 +25,22 @@
margin-bottom: .6rem;
}
.content p.form-label,
.form-label {
margin-top: .6rem;
margin-top: 1rem;
margin-bottom: .6rem;
}
// Webforms
.webform-form,
.webform-submission-form {
border-left: 4px solid $blue-dark;
border-right: 4px solid $blue-dark;
margin: .1rem 1.5rem .1rem 1.5rem;
padding: 0 1.5rem;
@include widescreen {
margin: .5rem 6rem .5rem 6rem;
padding: 0 6rem;
}
}

View file

@ -0,0 +1,22 @@
// Fixes https://github.com/jgthms/bulma/issues/1708
code .tag, code .number {
display: inline;
padding: inherit;
font-size: inherit;
line-height: inherit;
text-align: inherit;
vertical-align: inherit;
border-radius: inherit;
font-weight: inherit;
white-space: inherit;
background: inherit;
margin: inherit;
}
// Try to undo what presumably prism styling is doing to our in-text code:
code {
background-color: inherit;
color: inherit;
font-size: inherit;
padding: 0.2em 0.25em;
}

View file

@ -170,7 +170,7 @@
.title {
margin-top: 0.25em;
margin-left: -1.25em;
max-width: 6em;
max-width: 12em;
}
.subtitle {
font-size: $size-5;

View file

@ -17,10 +17,10 @@
#logo .logo-color {
fill: currentColor;
}
& + section,
& + .floating-tabs + #main-content + section,
& + .floating-tabs + #main-content + article > section:first-child,
& + .floating-tabs + #main-content + .node > section:first-child {
& + div[data-drupal-messages-fallback] + section,
& + div[data-drupal-messages-fallback] + .floating-tabs + #main-content + section,
& + div[data-drupal-messages-fallback] + .floating-tabs + #main-content + article > section:first-child,
& + div[data-drupal-messages-fallback] + .floating-tabs + #main-content + .node > section:first-child {
padding-top: 3.3125em;
@include desktop {
padding-top: 5.875em;

View file

@ -19,3 +19,9 @@
border-top: 0;
}
}
.section.related .title.is-5 {
font-size: 1.1rem;
line-height: 1.25em;
font-weight: normal; // TODO just remove the '.title' instead.
}

View file

@ -35,15 +35,11 @@ a.teaser {
}
.media.teaser {
display: flex;
//
.media-left {
width: 12em;
//
img {
width: 100%;
height: auto;
display: block;
}
}
}

View file

@ -45,6 +45,9 @@
h2:first-child {
margin-top: 1.1428em;
}
.columns h2:first-child {
margin-top: inherit;
}
}
}
.flow_full {

View file

@ -39,8 +39,8 @@
#}
<description>
{% set one_and_done = false %}
{% for item in items if not one_and_done %}
{% if item.content['#paragraph'].type.0.entity.id == 'text' %}
{% for item in items %}
{% if item.content['#paragraph'].type.0.entity.id == 'text' and not one_and_done %}
{% set one_and_done = true %}
{{ item.content|render|escape }}
{% endif %}

View file

@ -46,4 +46,9 @@
})
%}
<h1{{ item.attributes }}>{{ item.content}} </h1>
{% if authors is not empty %}
<p class="byline is-mono">Written by {{ authors }}</p>
<p class="byline is-mono">Posted on <time class="dt-published" datetime="{{ iso_datetime }}">{{ date }}</time></p>
{% endif %}
{% endfor %}

View file

@ -0,0 +1,2 @@
{% extends "ds-2col.html.twig" %}
{% set attributes = attributes.addClass('is-mobile') %}

View file

@ -0,0 +1,29 @@
{#
/**
* @file
* Override Display Suite 2 column template to get rid of DS classes.
*
* Available variables:
* - outer_wrapper: outer wrapper element
* - left_wrapper: wrapper element around left region
* - right_wrapper: wrapper element around right region
* - attributes: layout attributes
* - left_attributes: attributes for left region
* - right_attributes: attributes for right region
* - left: content of left region
* - right: content of right region
*/
#}
<{{ outer_wrapper }}{{ attributes.addClass('columns', 'clearfix') }}>
{{ title_suffix.contextual_links }}
<{{ left_wrapper }}{{ left_attributes.addClass('column') }}>
{{ left }}
</{{ left_wrapper }}>
<{{ right_wrapper }}{{ right_attributes.addClass('column') }}>
{{ right }}
</{{ right_wrapper }}>
</{{ outer_wrapper }}>

View file

@ -0,0 +1,40 @@
{#
/**
* @file
* Theme override for an item list.
*
* Available variables:
* - items: A list of items. Each item contains:
* - attributes: HTML attributes to be applied to each list item.
* - value: The content of the list element.
* - title: The title of the list.
* - list_type: The tag for list element ("ul" or "ol").
* - wrapper_attributes: HTML attributes to be applied to the list wrapper.
* - attributes: HTML attributes to be applied to the list.
* - empty: A message to display when there are no items. Allowed value is a
* string or render array.
* - context: A list of contextual data associated with the list. May contain:
* - list_style: The custom list style.
*
* @see template_preprocess_item_list()
*/
#}
{% if context.list_style %}
{%- set attributes = attributes.addClass('item-list__' ~ context.list_style) %}
{% endif %}
{% if items or empty %}
{%- if title is not empty -%}
<h3>{{'Shared to'|t}}</h3>
{%- endif -%}
{%- if items -%}
<{{list_type}}{{attributes}}>
{%- for item in items -%}
<li{{item.attributes}}>{{ item.value }}</li>
{%- endfor -%}
</{{list_type}}>
{%- else -%}
{{- empty -}}
{%- endif -%}
{%- endif %}

View file

@ -74,8 +74,8 @@
{% set title_paragraph_index = null %}
{% set has_title_paragraph = false %}
{% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% for i, paragraph in content.field_body_paragraph %}
{% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% set has_title_paragraph = true %}
{% set title_paragraph_index = i %}
{{ paragraph }}
@ -103,8 +103,8 @@
<div class="container">
<div class="flow content">
{% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if i is not same as(title_paragraph_index) %}
{% for i, paragraph in content.field_body_paragraph %}
{% if i|first != '#' and i is not same as(title_paragraph_index) %}
{{ paragraph }}
{% endif %}
{% endfor %}

View file

@ -6,8 +6,8 @@
{% set has_title_paragraph = false %}
{% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% for i, paragraph in content.field_body_paragraph %}
{% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% set has_title_paragraph = true %}
{{ paragraph }}
{% endif %}

View file

@ -76,8 +76,8 @@
{% set title_paragraph_index = null %}
{% set has_title_paragraph = false %}
{% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% for i, paragraph in content.field_body_paragraph %}
{% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% set has_title_paragraph = true %}
{% set title_paragraph_index = i %}
{{ paragraph }}
@ -106,15 +106,15 @@
</div>
{% endif %}
</div>
{% if content.field_authors is not empty %}
<p class="byline is-mono">Written by {{ content.field_authors }}</p>
<p class="byline is-mono">Posted on <time class="dt-published" datetime="{{ iso_datetime }}">{{ date }}</time></p>
{% endif %}
</div>
</div>
</section>
{% elseif content.field_authors is not empty %}
<span class="hidden"><a href="{{ url }}" class="u-url">{{ date }}</a><a class="u-author" href="/"></a></span>
{% endif %}
{% if content.field_authors is not empty %}
<div class="container">
<p class="byline is-mono">{{ content.field_authors }}</p>
<p class="byline is-mono">Posted on <time class="dt-published" datetime="{{ iso_datetime }}">{{ date }}</time></p>
</div>
{% endif %}
<div class="e-content">
@ -123,8 +123,8 @@
{% set walls_up = false %}
{% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if i is not same as(title_paragraph_index) %}
{% for i, paragraph in content.field_body_paragraph %}
{% if i|first != '#' and i is not same as(title_paragraph_index) %}
{% if paragraph['#paragraph'].field_style_escape_flow.value is not empty %}
{% set bust_out = paragraph['#paragraph'].field_style_escape_flow.value %}
{% endif %}
@ -167,14 +167,14 @@
{{ content.field_tags }}
{% endif %}
</div>
{{content.indieweb_syndication}}
</div>
</section>
{% endif %}
</article>{# end h-entry article #}
<!-- Unexpected extra content -->
{{ content|without('field_body_paragraph', 'field_authors', 'field_tags', 'uid', 'created', 'comment') }}
{{ content|without('field_body_paragraph', 'field_authors', 'field_tags', 'uid', 'created', 'comment', 'indieweb_syndication') }}
{% if content.comment %}
{{ content.comment }}

View file

@ -74,8 +74,8 @@
{% set title_paragraph_index = null %}
{% set has_title_paragraph = false %}
{% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% for i, paragraph in content.field_body_paragraph %}
{% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% set has_title_paragraph = true %}
{% set title_paragraph_index = i %}
{{ paragraph }}
@ -109,8 +109,8 @@
{% set walls_up = false %}
{% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if i is not same as(title_paragraph_index) %}
{% for i, paragraph in content.field_body_paragraph %}
{% if i|first != '#' and i is not same as(title_paragraph_index) %}
{% if paragraph['#paragraph'].field_style_escape_flow.value is not empty %}
{% set bust_out = paragraph['#paragraph'].field_style_escape_flow.value %}
{% endif %}

View file

@ -71,14 +71,12 @@
*/
#}
BOW! BOW BEFORE MY POWER!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
<a class="teaser media content" href="{{ url }}">
{% set has_title_paragraph = false %}
{% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% for i, paragraph in content.field_body_paragraph %}
{% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% set has_title_paragraph = true %}
{{ paragraph }}
{% endif %}

View file

@ -71,12 +71,12 @@
*/
#}
<a class="teaser media content" href="{{ url }}">
<a class="teaser media content columns" href="{{ url }}">
{% set has_title_paragraph = false %}
{% if content.field_body_paragraph %}
{% for i, paragraph in content.field_body_paragraph if i|first != '#' %}
{% if content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% for i, paragraph in content.field_body_paragraph %}
{% if i|first != '#' and content.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% set has_title_paragraph = true %}
{{ paragraph }}
{% endif %}
@ -84,7 +84,7 @@
{% endif %}
{% if not has_title_paragraph %}
<div class="media-left">
<div class="media-left column is-one-third is-one-quarter-desktop">
{{ content.field_image }}
{% if node.bundle == 'blog' and content.field_authors is not empty %}
<p class="byline is-mono">
@ -93,7 +93,7 @@
</p>
{% endif %}
</div>
<div class="media-content content">
<div class="media-content content column is-two-thirds is-three-quarters-desktop ">
<h3 class="title is-5">{{ label }}</h3>
<div class="subtitle is-6">
{{ content.field_summary }}

View file

@ -28,6 +28,9 @@
<div class="column">
Powered by <a href="https://www.drutopia.org/">Drutopia</a>
</div>
<div class="column">
<a href="/privacy-policy">Privacy Policy</a>
</div>
</div>
</div>
{% endif %}

View file

@ -38,6 +38,7 @@
* @ingroup themeable
*/
#}
{% set attributes = attributes.setAttribute('data-headerbg', 'transparent') %}
{%
set classes = [
'hero',
@ -46,6 +47,9 @@
%}
{% if paragraph.field_style_color is not empty %}
{% set classes = classes|merge(['is-'~paragraph.field_style_color.value]) %}
{% if paragraph.field_style_color.value == 'white' %}
{% set attributes = attributes.removeAttribute('data-headerbg') %}
{% endif %}
{% endif %}
{% if paragraph.field_style_titlebar.value == false %}
{% set classes = classes|merge(['hero-project']) %}
@ -58,12 +62,13 @@
{% set classes = classes|merge(styles) %}
{% endif %}
{% if paragraph.field_style_titlebar.value == true and paragraph.field_image is not empty %}
{% set attributes = attributes.setAttribute('data-headerbg', 'transparent').setAttribute('style', 'background-image: url('~file_url(paragraph.field_image.entity.uri.value)~')') %}
{% set attributes = attributes.setAttribute('style', 'background-image: url('~file_url(paragraph.field_image.entity.uri.value)~')') %}
{% endif %}
{% block paragraph %}
<section{{ attributes.addClass(classes) }} data-headerbg="transparent">
<section{{ attributes.addClass(classes) }}>
{% block content %}
{% if paragraph.field_style_titlebar.value == false %}
<div class="container">

View file

@ -13,8 +13,8 @@
{% set title_paragraph_index = null %}
{% set has_title_paragraph = false %}
{% if paragraphs.field_body_paragraph %}
{% for i, paragraph in paragraphs.field_body_paragraph if i|first != '#' %}
{% if paragraphs.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% for i, paragraph in paragraphs.field_body_paragraph %}
{% if i|first != '#' and paragraphs.field_body_paragraph['#items'][i].entity.type.0.entity.id == 'title' %}
{% set has_title_paragraph = true %}
{% set title_paragraph_index = i %}
<div class="column is-one-third">

View file

@ -0,0 +1,34 @@
{#
/**
* @file
* Default theme implementation to webform confirmation.
*
* Available variables:
* - progress: Progress bar.
* - message: Confirmation message.
* - back_url: URL to the previous webform submission.
*
* @see template_preprocess_webform_confirmation()
*
* @ingroup themeable
*/
#}
{{ attach_library('webform/webform.confirmation') }}
{% if progress %}
{{ progress }}
{% endif %}
<div{{ attributes.addClass('webform-confirmation container') }}>
{% if message %}
<div class="webform-confirmation__message">{{ message }}</div>
{% endif %}
{% if back %}
<div class="webform-confirmation__back">
<a href="{{ back_url }}" rel="prev"{{ back_attributes }}>{{ back_label }}</a>
</div>
{% endif %}
</div>

1
css Executable file
View file

@ -0,0 +1 @@
grunt sass

View file

@ -3,21 +3,21 @@
"version": "1.0.0",
"devDependencies": {
"assemble": "^0.4.42",
"grunt": "^1.0.1",
"grunt": "^1.0.4",
"grunt-contrib-clean": "^0.6.0",
"grunt-contrib-connect": "^1.0.2",
"grunt-contrib-watch": "^1.0.0",
"grunt-kss": "^5.0.1",
"grunt-sass": "^2.1.0",
"grunt-shell": "^2.1.0",
"kss": "^3.0.0-beta.18",
"node-sass": "^4.10.0"
"kss": "^3.0.0-beta.25",
"node-sass": "^4.13.0"
},
"dependencies": {
"bulma": "^0.7.2",
"bulma": "^0.7.5",
"bulma-extensions": "^1.0.4",
"grunt-cli": "^1.3.2",
"ionicons": "^4.4.6",
"ionicons": "^4.6.3",
"slick-carousel": "^1.8.1"
}
}