Skip to content

Commit

Permalink
WET-410 Created a wet-boew section in GCWeb github
Browse files Browse the repository at this point in the history
  • Loading branch information
ouafaaetta committed Oct 3, 2023
1 parent 63861c8 commit 68571c5
Show file tree
Hide file tree
Showing 6 changed files with 411 additions and 25 deletions.
56 changes: 32 additions & 24 deletions Gruntfile.coffee
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ module.exports = (grunt) ->
"concat:components"
"concat:templates"
"concat:sites"
"concat:wet-boew"
"clean:wetboew_demos"
"copy:wetboew_demos"
]
Expand Down Expand Up @@ -553,11 +554,11 @@ module.exports = (grunt) ->
stripBanners: true
banner: "<%= banner %>"
src: [
"{sites,common,components,templates}/**/*.js"
"!{sites,common,components,templates}/**/test.js"
"!{sites,common,components,templates}/**/assets"
"!{sites,common,components,templates}/**/demo"
"!{sites,common,components,templates}/**/demos"
"{sites,common,components,templates,wet-boew}/**/*.js"
"!{sites,common,components,templates,wet-boew}/**/test.js"
"!{sites,common,components,templates,wet-boew}/**/assets"
"!{sites,common,components,templates,wet-boew}/**/demo"
"!{sites,common,components,templates,wet-boew}/**/demos"
]
dest: "<%= themeDist %>/js/theme.js"
common:
Expand All @@ -581,6 +582,13 @@ module.exports = (grunt) ->
separator: ","
src: "templates/**/index.json-ld"
dest: "_data/templates.json"
"wet-boew":
options:
banner: "["
footer: "]\n"
separator: ","
src: "wet-boew/**/index.json-ld"
dest: "_data/wet-boew.json"
sites:
options:
banner: "["
Expand Down Expand Up @@ -709,14 +717,14 @@ module.exports = (grunt) ->
layouts:
expand: true
flatten: true
src: "{sites,components,templates,docs}/**/layouts/**.*"
src: "{sites,components,templates,docs,wet-boew}/**/layouts/**.*"
dest: "<%= jekyllDist %>/_layouts"
includes:
files: [
expand: true
src: [
"{sites,components,templates}/**/*-{includes,inc}/**.html"
"!{sites,components,templates}/**/includes/**.*"
"{sites,components,templates,wet-boew}/**/*-{includes,inc}/**.html"
"!{sites,components,templates,wet-boew}/**/includes/**.*"
]
dest: "<%= jekyllDist %>/_includes"
rename: (dest, src) ->
Expand All @@ -727,21 +735,21 @@ module.exports = (grunt) ->
,
expand: true
src: [
"{sites,components,templates}/**/includes/**.*"
"{sites,components,templates,wet-boew}/**/includes/**.*"
]
dest: "<%= jekyllDist %>/_includes"
rename: (dest, src) ->
dest + src.substring( src.indexOf('/') ).replace( '/includes/', '/' )
,
expand: true
src: "{sites,components,templates}/*/include.html"
src: "{sites,components,templates,wet-boew}/*/include.html"
dest: "<%= jekyllDist %>/_includes"
rename: (dest, src) ->
dest + "/" + src.replace( '/include.html', '.html' )
]
samples:
expand: true
src: "{sites,common,components,templates}/**/samples/**.*"
src: "{sites,common,components,templates,wet-boew}/**/samples/**.*"
dest: "_includes"
rename: (dest, src) ->
dest + "/" + src.replace( 'samples/', '' )
Expand All @@ -764,15 +772,15 @@ module.exports = (grunt) ->
expand: true
flatten: true
src: [
"{sites,common,components,templates}/**/fonts/**.*"
"{sites,common,components,templates,wet-boew}/**/fonts/**.*"
"!**/*.scss"
]
dest: "<%= themeDist %>/fonts"
assets:
expand: true
src: [
"{sites,common,components,templates}/**/assets/**.*"
"{sites,common,components,templates}/**/assets/**/*.*"
"{sites,common,components,templates,wet-boew}/**/assets/**.*"
"{sites,common,components,templates,wet-boew}/**/assets/**/*.*"
]
dest: "<%= themeDist %>/assets"
rename: (dest, src) ->
Expand All @@ -787,7 +795,7 @@ module.exports = (grunt) ->
depsJS_custom:
expand: true
flatten: true
src: "{sites,common,components,templates}/deps/**.js"
src: "{sites,common,components,templates,wet-boew}/deps/**.js"
dest: "<%= themeDist %>/deps-js"
depsJS:
expand: true
Expand Down Expand Up @@ -1051,13 +1059,13 @@ module.exports = (grunt) ->
quiet: true
all:
src: [
"{sites,common,components,templates}/**/*.js"
"{sites,common,components,templates,wet-boew}/**/*.js"
]
jsonlint:
all:
src: [
"{sites,common,components,templates}/**/*.json",
"{sites,common,components,templates}/**/*.json-ld"
"{sites,common,components,templates,wet-boew}/**/*.json",
"{sites,common,components,templates,wet-boew}/**/*.json-ld"
]
options: {
indent: "\t"
Expand All @@ -1068,7 +1076,7 @@ module.exports = (grunt) ->
all:
expand: true
src: [
"{sites,common,components,templates}/**/*.scss"
"{sites,common,components,templates,wet-boew}/**/*.scss"
"!*-jekyll.scss"
"!node_modules"
]
Expand All @@ -1088,7 +1096,7 @@ module.exports = (grunt) ->
"Rakefile"

# Folders
"{sites,common,components,templates}/**"
"{sites,common,components,templates,wet-boew}/**"

#
# Exemptions...
Expand All @@ -1098,17 +1106,17 @@ module.exports = (grunt) ->
"!Gemfile.lock"

# Web contents
"!{sites,common,components,templates}/**/*.md"
"!{sites,common,components,templates,wet-boew}/**/*.md"
# "{sites,components,templates}/*/*.{md,html}"
# "{sites,components,templates}/*.{md, html}"
# "!{sites,components,templates}/*/**/*.{md,html}"

# Images
"!{sites,common,components,templates}/**/*.{jpg,png,ico}"
"!{sites,common,components,templates}/*.{ico,jpg,png}"
"!{sites,common,components,templates,wet-boew}/**/*.{jpg,png,ico}"
"!{sites,common,components,templates,wet-boew}/*.{ico,jpg,png}"

# External fonts
"!{sites,common,components,templates}/**/*.{eot,svg,ttf,woff}"
"!{sites,common,components,templates,wet-boew}/**/*.{eot,svg,ttf,woff}"

# Docker environment file
# File that gets created/populated in a manner that goes against .editorconfig settings during the main Travis-CI build.
Expand Down
95 changes: 95 additions & 0 deletions _data/wet-boew.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
[{
"@context": {
"@version": 1.1,
"dct": "http://purl.org/dc/terms/",
"title": { "@id": "dct:title", "@container": "@language" },
"description": { "@id": "dct:description", "@container": "@language" },
"modified": "dct:modified"
},
"title": {
"en": "Background image",
"fr": "Image d'arrière plan"
},
"description": {
"en": "Apply a background image from the given URL in parameter or as per the image group (srcset) information.",
"fr": "Défini une image d'arrière plan pour l'URL passé en paramètre ou tel que spécifier par l'information du group d'image (srcset)."
},
"modified": "2023-09-12",
"componentName": "bgimg",
"status": "stable",
"pages": {
"examples": [
{
"title": "Background image",
"language": "en",
"type": "general",
"url": "https://wet-boew.github.io/gcweb-compiled-demos/wetboew-demos/bgimg/bgimg-en.html"
},
{
"title": "Image d'arrière plan",
"language": "fr",
"url": "https://wet-boew.github.io/gcweb-compiled-demos/wetboew-demos/bgimg/bgimg-fr.html"
}
],
"docs": [
{
"title": "Background image",
"language": "en",
"url": "https://wet-boew.github.io/wet-boew/docs/ref/bgimg/bgimg-en.html"
},
{
"title": "Image d'arrière plan",
"language": "fr",
"url": "https://wet-boew.github.io/wet-boew/docs/ref/bgimg/bgimg-fr.html"
}
]
}
}
,{
"@context": {
"@version": 1.1,
"dct": "http://purl.org/dc/terms/",
"title": { "@id": "dct:title", "@container": "@language" },
"description": { "@id": "dct:description", "@container": "@language" },
"modified": "dct:modified"
},
"title": {
"en": "Favicon",
"fr": "Favoricône"
},
"description": {
"en": "This plugin provides the ability to add and update the favicon's on a web page.",
"fr": "Ce plugiciel offre la possibilité d'ajouter et de mettre à jour les favoricônes d'une page. "
},
"modified": "2023-09-12",
"componentName": "favicon",
"status": "stable",
"pages": {
"examples": [
{
"title": "Favicon",
"language": "en",
"type": "general",
"url": "https://wet-boew.github.io/gcweb-compiled-demos/wetboew-demos/favicon/favicon-en.html"
},
{
"title": "Favoricône",
"language": "fr",
"url": "https://wet-boew.github.io/gcweb-compiled-demos/wetboew-demos/favicon/favicon-fr.html"
}
],
"docs": [
{
"title": "Favicon",
"language": "en",
"url": "https://wet-boew.github.io/wet-boew/docs/ref/favicon/favicon-en.html"
},
{
"title": "Favoricône",
"language": "fr",
"url": "https://wet-boew.github.io/wet-boew/docs/ref/favicon/favicon-fr.html"
}
]
}
}
]
96 changes: 95 additions & 1 deletion index-en.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@ css:
<li><a href="#templates"><span aria-hidden="true" class="fas fa-table mrgn-rght-md"></span>Templates</a></li>
<li><a href="#experiment"><span aria-hidden="true" class="fas fa-puzzle-piece mrgn-rght-md"></span>Méli-mélo and thematics</a></li>
<li><a href="#sitesglobal"><span aria-hidden="true" class="fas fa-globe mrgn-rght-md"></span>Sites and global functionality</a></li>
<li><a href="#wetboew"><span aria-hidden="true" class="fas fa-cube mrgn-rght-md"></span>Wet-boew</a></li>
<li><a href="#other"><span aria-hidden="true" class="fas fa-info-circle mrgn-rght-md"></span>Other documentation</a></li>
<li><a href="#implementing-developing"><span aria-hidden="true" class="fas fa-code mrgn-rght-md"></span>Implementing&nbsp;/ Developing</a></li>
</ul>
Expand All @@ -58,6 +59,8 @@ css:
<a href="#sitesglobal" class="btn btn-link text-white"><span aria-hidden="true" class="fas fa-globe mrgn-rght-sm"></span>Sites and global</a>
</li>
<li class="mrgn-lft-md">
<a href="#wetboew" class="btn btn-link text-white"><span aria-hidden="true" class="fas fa-cube mrgn-rght-sm"></span>Wet-boew</a>
</li>
<a href="#other" class="btn btn-link text-white"><span aria-hidden="true" class="fas fa-info-circle mrgn-rght-sm"></span>Other</a>
</li>
<li class="mrgn-lft-md">
Expand Down Expand Up @@ -475,7 +478,98 @@ css:
</li>
{% endfor %}
</ul>

<h2 id="wetboew" class="mrgn-bttm-lg">Wet-boew</h2>
<ul class="row list-unstyled wb-eqht-grd wb-filter mrgn-tp-md pb-4" data-wb-filter='{ "selector": ">li" }'>
{% for wetboew in site.data[ "wet-boew" ] %}
{% assign list-pages = wetboew.pages %}
<li class="col-xs-12 col-md-6 mrgn-tp-md mrgn-bttm-md">
<div class="brdr-tp brdr-rght brdr-bttm brdr-lft hght-inhrt">
<h3 class="mrgn-tp-md mrgn-rght-md mrgn-bttm-md mrgn-lft-md">{{ wetboew.title[ page.language ] }}
{% if wetboew.status == "stable" %}
<span class="label label-success mrgn-lft-sm"><span class="wb-inv">State: </span>{{ comp_status[ wetboew.status ] }}</span>
{% elsif wetboew.status == "provisional" %}
<span class="label label-warning mrgn-lft-sm"><span class="wb-inv">State: </span>{{ comp_status[ wetboew.status ] }}</span>
{% elsif wetboew.status == "deprecated" %}
<span class="label label-danger mrgn-lft-sm"><span class="wb-inv">State: </span>{{ comp_status[ wetboew.status ] }}</span>
{% else %}
<span class="label label-default mrgn-lft-sm"><span class="wb-inv">State: </span>Undefined</span>
{% endif %}
</h3>
<div class="mrgn-rght-md mrgn-bttm-md mrgn-lft-md">
<p>{{ wetboew.description[ page.language ] | default: "[Short description of the wetboew]" }}</p>
<!--
Main working example
- First working example in the example list where the language match
-->
{% assign mainExamples = list-pages.examples | where: "language", page.language | first %}
<ul class="list-unstyled mrgn-bttm-lg mrgn-lft-md">
{% if mainExamples %}
<li>
{% if mainExamples.path %}
<a href="wet-boew/
{%- if wetboew.componentName -%}
{{ wetboew.componentName }}/
{%- endif -%}
{{ mainExamples.path }}" lang="{{ mainExamples.language }}" hreflang="{{ mainExamples.language }}"><span class="fas fa-eye small mrgn-rght-sm" aria-hidden="true"></span>Working example</a>
{% elsif mainExamples.url %}
<a href="{{ mainExamples.url }}" lang="{{ mainExamples.language }}" hreflang="{{ mainExamples.language }}"><span class="fas fa-eye small mrgn-rght-sm" aria-hidden="true"></span>Working example</a>
{% else %}
<span class="fas fa-eye small mrgn-rght-sm" aria-hidden="true"></span>Working example
{% endif %}
{% endif %}
<!--
Documentation
- Link to the documentations if any
-->
{% if list-pages.docs %}
<!--<ul class="list-unstyled mrgn-bttm-lg mrgn-lft-md">-->
{% assign docs = list-pages.docs | where: "language", page.language %}
{% for doc in docs %}
<li><a href="wet-boew/{{ wetboew.componentName }}/{{ doc.path }}"><span class="fas fa-info-circle small mrgn-rght-sm" aria-hidden="true"></span>Documentation</a></li>
{% if doc.url %}
<li><a href="{{ doc.url }}">Documentation</a></li>
{% endif %}
{% endfor %}
{% endif %}
<li><a href="https://github.com/wet-boew/GCWeb/tree/master/wet-boew/{{ component.componentName }}" hreflang="en"><span class="fas fa-code small mrgn-rght-sm" aria-hidden="true"></span>Source code</a></li>
</ul>
<!--
> All examples and info
* Example
* Documentation
* Spec
-->
<details class="mrgn-tp-lg"><summary>All examples and info</summary>
<ul class="list-unstyled">
{% for pgGroup in list-pages %}
{% assign grpkey = pgGroup[0] %}
<li>{{ page_group[ grpkey ] | default: "Unknown group" }}
<ul>
{% assign examples = pgGroup[1] %}
{% for example in examples %}
{% if example.path %}
<li><a href="wet-boew/
{%- if wetboew.componentName -%}
{{ wetboew.componentName }}/
{%- endif -%}
{{ example.path }}" {% if example.language != page.language %}lang="{{ example.language }}" hreflang="{{ example.language }}"{% endif %}>{{ example.title }}</a></li>
{% elsif example.url %}
<li><a href="{{ example.url }}">{{ example.title }}</a></li>
{% else %}
<li>{{ example.title }}</li>
{% endif %}
{% endfor %}
</ul>
</li>
{% endfor %}
</ul>
</details>
</div>
</div>
</li>
{% endfor %}
</ul>
<hr />
<h2 id="other">Other documentation</h2>
<div class="row mrgn-tp-md">
<div class="col-md-8">
Expand Down
Loading

0 comments on commit 68571c5

Please sign in to comment.