Skip to content

Commit

Permalink
Update pattern library
Browse files Browse the repository at this point in the history
  • Loading branch information
hugopeek committed Nov 3, 2020
1 parent c34dc94 commit 303e545
Show file tree
Hide file tree
Showing 33 changed files with 284 additions and 229 deletions.
10 changes: 6 additions & 4 deletions chunks/globalBackgroundRowCSS.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,13 @@ id: 448
name: globalBackgroundRowCSS
description: ''
category: a_global
snippet: "[[If:toPlaceholder=`img_uncropped`?\n &subject=`[[+image.crops.mobile.url:empty=``]][[+image.crops.tablet.url:empty=``]][[+image.crops.desktop.url:empty=``]]`\n &operand=`empty`\n &then=`\n [[pthumb:prepend=`url(`:append=`)`?\n &input=`[[+image.url:prepend=`/`]]`\n &options=`w=[[+imgWidth]]\n &q=[[++img_quality]]\n &scale=[[+imgScale:default=`1`]]\n `\n ]]`\n &else=``\n]]\n[[If:toPlaceholder=`img_src`?\n &subject=`[[+image.crops.[[+imgType]].url]]`\n &operator=`notempty`\n &then=`\n [[pthumb:prepend=`url(`:append=`)`?\n &input=`[[+image.url:prepend=`/`]]`\n &options=`w=[[+imgWidth]]\n &sx=[[+image.crops.[[+imgType]].x]]\n &sy=[[+image.crops.[[+imgType]].y]]\n &sw=[[+image.crops.[[+imgType]].width]]\n &sh=[[+image.crops.[[+imgType]].height]]\n &q=[[++img_quality]]\n &scale=[[+imgScale:default=`1`]]\n `\n ]]`\n &else=`[[+img_uncropped]]`\n]]\n[[If:empty=`[[+gradient]]`?\n &subject=`[[+image.extension]]`\n &operator=`is`\n &operand=`svg`\n &then=`[[+image.url:prepend=`url(/`:append=`)`]]`\n &else=`[[+img_src]]`\n]]\n[[+position:empty=`center center`]] /\n[[+size:empty=`cover`]]\n[[+repeat]]\n[[+attachment]]"
properties: 'a:3:{s:8:"imgWidth";a:7:{s:4:"name";s:8:"imgWidth";s:4:"desc";s:41:"romanesco.globalbackgroundrowcss.imgWidth";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:20:"romanesco:properties";s:4:"area";s:0:"";}s:7:"imgType";a:7:{s:4:"name";s:7:"imgType";s:4:"desc";s:40:"romanesco.globalbackgroundrowcss.imgType";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:20:"romanesco:properties";s:4:"area";s:0:"";}s:8:"imgScale";a:7:{s:4:"name";s:8:"imgScale";s:4:"desc";s:41:"romanesco.globalbackgroundrowcss.imgScale";s:4:"type";s:9:"textfield";s:7:"options";s:0:"";s:5:"value";s:0:"";s:7:"lexicon";s:20:"romanesco:properties";s:4:"area";s:0:"";}}'
content: "[[If:toPlaceholder=`img_uncropped`?\n &subject=`[[+image.crops.mobile.url:empty=``]][[+image.crops.tablet.url:empty=``]][[+image.crops.desktop.url:empty=``]]`\n &operand=`empty`\n &then=`\n [[pthumb:prepend=`url(`:append=`)`?\n &input=`[[+image.url:prepend=`/`]]`\n &options=`w=[[+imgWidth]]\n &q=[[++img_quality]]\n &scale=[[+imgScale:default=`1`]]\n `\n ]]`\n &else=``\n]]\n[[If:toPlaceholder=`img_src`?\n &subject=`[[+image.crops.[[+imgType]].url]]`\n &operator=`notempty`\n &then=`\n [[pthumb:prepend=`url(`:append=`)`?\n &input=`[[+image.url:prepend=`/`]]`\n &options=`w=[[+imgWidth]]\n &sx=[[+image.crops.[[+imgType]].x]]\n &sy=[[+image.crops.[[+imgType]].y]]\n &sw=[[+image.crops.[[+imgType]].width]]\n &sh=[[+image.crops.[[+imgType]].height]]\n &q=[[++img_quality]]\n &scale=[[+imgScale:default=`1`]]\n `\n ]]`\n &else=`[[+img_uncropped]]`\n]]\n[[If:empty=`[[+gradient]]`?\n &subject=`[[+image.extension]]`\n &operator=`is`\n &operand=`svg`\n &then=`[[+image.url:prepend=`url(/`:append=`)`]]`\n &else=`[[+img_src]]`\n]]\n[[+position:empty=`center center`]] /\n[[+size:empty=`cover`]]\n[[+repeat]]\n[[+attachment]]"

-----

[[If:toPlaceholder=`img_uncropped`?
[[If:toPlaceholder=`bg[[+id]].img_uncropped`?
&subject=`[[+image.crops.mobile.url:empty=``]][[+image.crops.tablet.url:empty=``]][[+image.crops.desktop.url:empty=``]]`
&operand=`empty`
&then=`
Expand All @@ -19,7 +21,7 @@ properties: 'a:3:{s:8:"imgWidth";a:7:{s:4:"name";s:8:"imgWidth";s:4:"desc";s:41:
]]`
&else=``
]]
[[If:toPlaceholder=`img_src`?
[[If:toPlaceholder=`bg[[+id]].img_src`?
&subject=`[[+image.crops.[[+imgType]].url]]`
&operator=`notempty`
&then=`
Expand All @@ -34,14 +36,14 @@ properties: 'a:3:{s:8:"imgWidth";a:7:{s:4:"name";s:8:"imgWidth";s:4:"desc";s:41:
&scale=[[+imgScale:default=`1`]]
`
]]`
&else=`[[+img_uncropped]]`
&else=`[[+bg[[+id]].img_uncropped]]`
]]
[[If:empty=`[[+gradient]]`?
&subject=`[[+image.extension]]`
&operator=`is`
&operand=`svg`
&then=`[[+image.url:prepend=`url(/`:append=`)`]]`
&else=`[[+img_src]]`
&else=`[[+bg[[+id]].img_src]]`
]]
[[+position:empty=`center center`]] /
[[+size:empty=`cover`]]
Expand Down
133 changes: 65 additions & 68 deletions chunks/head.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,75 +2,72 @@ id: 106
name: head
description: ''
category: o_global
snippet: "<title>[[++romanesco.title_format]]</title>\n\n<meta charset=\"[[++modx_charset]]\">\n<meta name=\"description\" content=\"[[*description]]\">\n\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\n[[$openGraphMeta]]\n\n<base href=\"[[!++site_url]]\">\n\n<script>document.documentElement.className = 'js';</script>\n\n[[If?\n &subject=`[[++critical_css]]_[[*critical_css_uri:notempty=`1`]]`\n &operator=`eq`\n &operand=`1_1`\n &then=`\n <link href=\"[[*critical_css_uri]]\" rel=\"stylesheet\">\n <link href=\"[[++romanesco.semantic_dist_path]]/semantic[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]\" rel=\"stylesheet\" media=\"print\" onload=\"this.media='all'\">\n <link href=\"[[++romanesco.custom_css_path]]/site[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]\" rel=\"stylesheet\" media=\"print\" onload=\"this.media='all'\">\n `\n &else=`\n <link href=\"[[++romanesco.semantic_dist_path]]/semantic[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]\" rel=\"stylesheet\">\n <link href=\"[[++romanesco.custom_css_path]]/site[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]\" rel=\"stylesheet\">\n `\n]]\n\n[[- SET CONDITIONS FOR LOADING ADDITIONAL ASSETS ]]\n[[~[[*id]]:contains=`status`:or:contains=`hub`:then=`1`:toPlaceholder=`load_assets_hub`]]\n[[cbHasFields:toPlaceholder=`load_assets_map`? &field=`[[++romanesco.cb_field_map_id]]` &then=`1`]]\n[[modifiedIf?\n &subject=`[[cbHasFields? &field=`[[++romanesco.cb_field_code_id]]` &then=`1`]][[*context_key:is=`notes`:then=`1`]][[*uri:contains=`notes/`:then=`1`]]`\n &operator=`notempty`\n &then=`1`\n &toPlaceholder=`load_syntax_highlighting`\n]]\n\n[[+load_assets_map:eq=`1`:then=`<link rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.6.0/dist/leaflet.css\" integrity=\"sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==\" crossorigin=\"\"/>`]]\n[[+load_assets_hub:eq=`1`:then=`<link href=\"[[++romanesco.semantic_dist_path]]/components/modal.css\" rel=\"stylesheet\">`]]\n[[+load_syntax_highlighting:eq=`1`:then=`<link href=\"[[++romanesco.semantic_vendor_path]]/prism/prism.min.css\" rel=\"stylesheet\">`]]\n\n[[++head_additional]]\n\n[[[[++romanesco.favicon_version:notempty=`$favicons`]]]]\n\n[[[[If?\n &subject=`[[getContextSetting:default=`[[++google_analytics_ua]]`? &context=`[[*context_key]]` &setting=`google_analytics_ua`]]`\n &operator=`notempty`\n &then=`$googleAnalytics`\n]]]]\n[[[[If?\n &subject=`[[getContextSetting:default=`[[++matomo_analytics_url]]`? &context=`[[*context_key]]` &setting=`matomo_analytics_url`]]`\n &operator=`notempty`\n &then=`$matomoAnalytics`\n]]]]\n\n[[[[If?\n &subject=`[[++romanesco.private_backyard]]`\n &operator=`EQ`\n &operand=`1`\n &then=`!checkPermissions? &context=`hub``\n]]]]\n\n[[$structuredDataSite]]\n"
properties: 'a:0:{}'
content: "<title>[[++romanesco.title_format]]</title>\n\n<meta charset=\"[[++modx_charset]]\">\n<meta name=\"description\" content=\"[[*description]]\">\n\n<meta http-equiv=\"X-UA-Compatible\" content=\"IE=edge\">\n<meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n\n[[$openGraphMeta]]\n\n<base href=\"[[!++site_url]]\">\n\n<script>document.documentElement.className = 'js';</script>\n\n[[If?\n &subject=`[[++critical_css]]_[[*critical_css_uri:notempty=`1`]]`\n &operator=`eq`\n &operand=`1_1`\n &then=`\n <link href=\"[[*critical_css_uri]]\" rel=\"stylesheet\">\n <link href=\"[[++romanesco.semantic_dist_path]]/semantic[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]\" rel=\"stylesheet\" media=\"print\" onload=\"this.media='all'\">\n <link href=\"[[++romanesco.custom_css_path]]/site[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]\" rel=\"stylesheet\" media=\"print\" onload=\"this.media='all'\">\n `\n &else=`\n <link href=\"[[++romanesco.semantic_dist_path]]/semantic[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]\" rel=\"stylesheet\">\n <link href=\"[[++romanesco.custom_css_path]]/site[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]\" rel=\"stylesheet\">\n `\n]]\n\n[[- SET CONDITIONS FOR LOADING ADDITIONAL ASSETS ]]\n[[~[[*id]]:contains=`status`:or:contains=`hub`:then=`1`:toPlaceholder=`load_assets_hub`]]\n[[cbHasFields:toPlaceholder=`load_assets_map`? &field=`[[++romanesco.cb_field_map_id]]` &then=`1`]]\n[[modifiedIf?\n &subject=`[[cbHasFields? &field=`[[++romanesco.cb_field_code_id]]` &then=`1`]][[*context_key:is=`notes`:then=`1`]][[*uri:contains=`notes/`:then=`1`]]`\n &operator=`notempty`\n &then=`1`\n &toPlaceholder=`load_syntax_highlighting`\n]]\n\n[[+load_assets_map:eq=`1`:then=`<link rel=\"stylesheet\" href=\"https://unpkg.com/leaflet@1.6.0/dist/leaflet.css\" integrity=\"sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==\" crossorigin=\"\"/>`]]\n[[+load_assets_hub:eq=`1`:then=`<link href=\"[[++romanesco.semantic_dist_path]]/components/modal.css\" rel=\"stylesheet\">`]]\n[[+load_syntax_highlighting:eq=`1`:then=`<link href=\"[[++romanesco.semantic_vendor_path]]/prism/prism.min.css\" rel=\"stylesheet\">`]]\n\n[[++head_additional]]\n\n[[[[++romanesco.favicon_version:notempty=`$favicons`]]]]\n\n[[[[If?\n &subject=`[[getContextSetting:default=`[[++google_analytics_ua]]`? &context=`[[*context_key]]` &setting=`google_analytics_ua`]]`\n &operator=`notempty`\n &then=`$googleAnalytics`\n]]]]\n[[[[If?\n &subject=`[[getContextSetting:default=`[[++matomo_analytics_url]]`? &context=`[[*context_key]]` &setting=`matomo_analytics_url`]]`\n &operator=`notempty`\n &then=`$matomoAnalytics`\n]]]]\n\n[[[[If?\n &subject=`[[++romanesco.private_backyard]]`\n &operator=`EQ`\n &operand=`1`\n &then=`!checkPermissions? &context=`hub``\n]]]]\n\n[[$structuredDataSite]]\n"

-----

<head>
<title>[[++romanesco.title_format]]</title>

<meta charset="[[++modx_charset]]">
<meta name="description" content="[[*description]]">

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

[[$openGraphMeta]]

<base href="[[!++site_url]]">

<script>document.documentElement.className = 'js';</script>

[[If?
&subject=`[[++critical_css]]_[[*critical_css_uri:notempty=`1`]]`
&operator=`eq`
&operand=`1_1`
&then=`
<link href="[[*critical_css_uri]]" rel="stylesheet">
<link href="[[++romanesco.semantic_dist_path]]/semantic[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]" rel="stylesheet" media="print" onload="this.media='all'">
<link href="[[++romanesco.custom_css_path]]/site[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]" rel="stylesheet" media="print" onload="this.media='all'">
`
&else=`
<link href="[[++romanesco.semantic_dist_path]]/semantic[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]" rel="stylesheet">
<link href="[[++romanesco.custom_css_path]]/site[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]" rel="stylesheet">
`
]]
[[- SET CONDITIONS FOR LOADING ADDITIONAL ASSETS ]]
[[~[[*id]]:contains=`status`:or:contains=`hub`:then=`1`:toPlaceholder=`load_assets_hub`]]
[[cbHasFields:toPlaceholder=`load_assets_map`? &field=`[[++romanesco.cb_field_map_id]]` &then=`1`]]
[[modifiedIf?
&subject=`[[cbHasFields? &field=`[[++romanesco.cb_field_code_id]]` &then=`1`]][[*context_key:is=`notes`:then=`1`]]`
&operator=`notempty`
&then=`1`
&toPlaceholder=`load_syntax_highlighting`
]]

[[+load_assets_map:eq=`1`:then=`<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/>`]]
[[+load_assets_hub:eq=`1`:then=`<link href="[[++romanesco.semantic_dist_path]]/components/modal.css" rel="stylesheet">`]]
[[+load_syntax_highlighting:eq=`1`:then=`<link href="[[++romanesco.semantic_vendor_path]]/prism/prism.min.css" rel="stylesheet">`]]

[[++head_additional]]

[[[[++romanesco.favicon_version:notempty=`$favicons`]]]]

[[[[If?
&subject=`[[getContextSetting:default=`[[++google_analytics_ua]]`? &context=`[[*context_key]]` &setting=`google_analytics_ua`]]`
&operator=`notempty`
&then=`$googleAnalytics`
]]]]
[[[[If?
&subject=`[[getContextSetting:default=`[[++matomo_analytics_url]]`? &context=`[[*context_key]]` &setting=`matomo_analytics_url`]]`
&operator=`notempty`
&then=`$matomoAnalytics`
]]]]

[[[[If?
&subject=`[[++romanesco.private_backyard]]`
&operator=`EQ`
&operand=`1`
&then=`!checkPermissions? &context=`hub``
]]]]

[[$structuredDataSite]]
</head>
<title>[[++romanesco.title_format]]</title>

<meta charset="[[++modx_charset]]">
<meta name="description" content="[[*description]]">

<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">

[[$openGraphMeta]]

<base href="[[!++site_url]]">

<script>document.documentElement.className = 'js';</script>

[[If?
&subject=`[[++critical_css]]_[[*critical_css_uri:notempty=`1`]]`
&operator=`eq`
&operand=`1_1`
&then=`
<link href="[[*critical_css_uri]]" rel="stylesheet">
<link href="[[++romanesco.semantic_dist_path]]/semantic[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]" rel="stylesheet" media="print" onload="this.media='all'">
<link href="[[++romanesco.custom_css_path]]/site[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]" rel="stylesheet" media="print" onload="this.media='all'">
`
&else=`
<link href="[[++romanesco.semantic_dist_path]]/semantic[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]" rel="stylesheet">
<link href="[[++romanesco.custom_css_path]]/site[[++minify_css_js:eq=`1`:then=`.min`]].css?v=[[++romanesco.assets_version_css]]" rel="stylesheet">
`
]]
[[- SET CONDITIONS FOR LOADING ADDITIONAL ASSETS ]]
[[~[[*id]]:contains=`status`:or:contains=`hub`:then=`1`:toPlaceholder=`load_assets_hub`]]
[[cbHasFields:toPlaceholder=`load_assets_map`? &field=`[[++romanesco.cb_field_map_id]]` &then=`1`]]
[[modifiedIf?
&subject=`[[cbHasFields? &field=`[[++romanesco.cb_field_code_id]]` &then=`1`]][[*context_key:is=`notes`:then=`1`]][[*uri:contains=`notes/`:then=`1`]]`
&operator=`notempty`
&then=`1`
&toPlaceholder=`load_syntax_highlighting`
]]

[[+load_assets_map:eq=`1`:then=`<link rel="stylesheet" href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" integrity="sha512-xwE/Az9zrjBIphAcBb3F6JVqxf46+CDLwfLMHloNu6KEQCAWi6HcDUbeOfBIptF7tcCzusKFjFw2yuvEpDL9wQ==" crossorigin=""/>`]]
[[+load_assets_hub:eq=`1`:then=`<link href="[[++romanesco.semantic_dist_path]]/components/modal.css" rel="stylesheet">`]]
[[+load_syntax_highlighting:eq=`1`:then=`<link href="[[++romanesco.semantic_vendor_path]]/prism/prism.min.css" rel="stylesheet">`]]

[[++head_additional]]

[[[[++romanesco.favicon_version:notempty=`$favicons`]]]]

[[[[If?
&subject=`[[getContextSetting:default=`[[++google_analytics_ua]]`? &context=`[[*context_key]]` &setting=`google_analytics_ua`]]`
&operator=`notempty`
&then=`$googleAnalytics`
]]]]

[[++matomo_tracking_code]]

[[[[If?
&subject=`[[++romanesco.private_backyard]]`
&operator=`EQ`
&operand=`1`
&then=`!checkPermissions? &context=`hub``
]]]]

[[$structuredDataSite]]
Loading

0 comments on commit 303e545

Please sign in to comment.