Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added gc site search bar and main container working examples #2185

Closed
wants to merge 0 commits into from

Conversation

josephdiab
Copy link
Contributor

No description provided.

@josephdiab josephdiab changed the title added gc site search bar working example added gc site search bar and main container working examples Jul 5, 2023
@duboisp duboisp self-requested a review July 13, 2023 15:51
Copy link
Member

@duboisp duboisp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As discussed,

  • create independent working example for the main element by leveraging the "layout: core"
  • Fix the lintspacing. You can probably configure your editorconfig plugin for your text editor
  • Remove the custom style or if needed lets chat about it I would like to understand it.

"dateModified": "2023-07-04",
"description": "Documentation on how to use main container.",
"language": "en",
"title": "Main Container example"
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Use the layout "core" like this page: https://github.com/wet-boew/GCWeb/blob/master/sites/layouts/default.html

replace {{content}} by your content page

},
"modified": "2023-07-05",
"componentName": "search-bar",
"processing": "baseline",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This property is only for the component in the common folder.

Suggested change
"processing": "baseline",

"fr": "Documentation sur l'utilisation de la barre de recherche."
},
"modified": "2023-07-05",
"componentName": "search-bar",
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The component name must match the folder name

Suggested change
"componentName": "search-bar",
"componentName": "search",

Comment on lines 12 to 16
<style>
.btn-square {
border-radius: 0;
}
</style>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What is that custom style for? We should not have any custom style. Regarding the boder radius, I do think we already have an CSS class that already do it.

Comment on lines 18 to 34
<section class="col-xs-12 col-sm-5 col-md-4">
<form action="#" method="post" name="cse-search-box" role="search" class="form-inline">
<div class="form-group wb-srch-qry">
<label for="wb-srch-q" class="wb-inv">Search Canada.ca</label>
<div class="input-group">
<input id="wb-srch-q" list="wb-srch-q-ac" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Search Canada.ca" style="display: inline-block; width: calc(100% - 42px);" />
<div class="input-group-append" style="white-space: nowrap;">
<button type="submit" class="btn btn-primary btn-square" style="margin-left: -1px;">
<span class="glyphicon-search glyphicon"></span>
<span class="wb-inv">Search</span>
</button>
</div>
</div>
<datalist id="wb-srch-q-ac"></datalist>
</div>
</form>
</section>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of reproducing it here, you can simply add a paragraph which mention this page example are located in the site header.

</form>
</section>

<br>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

<br> should not be used for spacing, like to separate paragraph. Rarely the br element is needed in web content.

Suggested change
<br>

Comment on lines 12 to 36
<style>
.btn-square {
border-radius: 0;
}
</style>

<section class="col-xs-12 col-sm-5 col-md-4">
<form action="#" method="post" name="cse-search-box" role="search" class="form-inline">
<div class="form-group wb-srch-qry">
<label for="wb-srch-q" class="wb-inv">Rechercher dans Canada.ca</label>
<div class="input-group">
<input id="wb-srch-q" list="wb-srch-q-ac" class="wb-srch-q form-control" name="q" type="search" value="" size="34" maxlength="170" placeholder="Rechercher dans Canada.ca" style="display: inline-block; width: calc(100% - 42px);" />
<div class="input-group-append" style="white-space: nowrap;">
<button type="submit" class="btn btn-primary btn-square" style="margin-left: -1px;">
<span class="glyphicon-search glyphicon"></span>
<span class="wb-inv">Search</span>
</button>
</div>
</div>
<datalist id="wb-srch-q-ac"></datalist>
</div>
</form>
</section>

<br>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See my comment in English, apply an equivalent fix

Comment on lines 60 to 63
&lt;/div&gt;
&lt;/form&gt;
&lt;/section&gt;
</code></pre>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You need an empty line at the end of the file.

Suggested change
&lt;/div&gt;
&lt;/form&gt;
&lt;/section&gt;
</code></pre>
&lt;/div&gt;
&lt;/form&gt;
&lt;/section&gt;
</code></pre>

Comment on lines 42 to 44
<!-- heading level 1 -->

<!-- content page -->
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When you will move this example in its own page, please add the h1 and for the content you can add a paragraph of lorem ipsum

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

2 participants