This repository has been archived by the owner on Apr 21, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 42
Component/vetting tiny slider #219
Open
treighton
wants to merge
2
commits into
10up:gh-pages
Choose a base branch
from
treighton:component/vetting-tiny-slider
base: gh-pages
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import { tns } from "./node_modules/tiny-slider/src/tiny-slider"; | ||
|
||
var slider = tns({ | ||
container: ".my-slider", | ||
items: 1, | ||
slideBy: "page", | ||
autoplay: false | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
@import "./node_modules/tiny-slider/dist/tiny-slider.css"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
<div class="my-slider"> | ||
<div> | ||
<img | ||
src="https://via.placeholder.com/150/ffff00/000000?Text=3" | ||
alt="C/O https://placeholder.com/" | ||
/> | ||
</div> | ||
<div> | ||
<img | ||
src="https://via.placeholder.com/150/ffff00/000000?Text=3" | ||
alt="C/O https://placeholder.com/" | ||
/> | ||
</div> | ||
<div> | ||
<img | ||
src="https://via.placeholder.com/150/ffff00/000000?Text=3" | ||
alt="C/O https://placeholder.com/" | ||
/> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
<div class="tabs"> | ||
<div class="code-tab-control tab-control"> | ||
<ul class="code-tab-list tab-list" role="tablist"> | ||
<li class="code-tab-item tab-item"> | ||
<a href="#text" id="js-text-link" role="tab" aria-controls="text">HTML</a> | ||
</li> | ||
<li class="code-tab-item tab-item"> | ||
<a href="#css" id="js-css-link" role="tab" aria-controls="css">CSS</a> | ||
</li> | ||
<li class="code-tab-item tab-item"> | ||
<a href="#js" id="js-js-link" role="tab" aria-controls="js">JavaScript</a> | ||
</li> | ||
</ul> | ||
</div><!-- //.tab-control --> | ||
|
||
<div class="tab-group"> | ||
|
||
<div id="text" class="code-tab tab-content" role="tabpanel"> | ||
|
||
<div class="tab__body"> | ||
<div class="copy-html"> | ||
{% highlight html %} | ||
{% include_relative component.html %} | ||
{% endhighlight %} | ||
</div> | ||
</div> | ||
|
||
<ul class="button-group"> | ||
<li><button data-clipboard-action="copy" data-clipboard-target=".copy-html" class="copy-clipboard button button--tertiary">Copy HTML to clipboard</button></li> | ||
</ul> | ||
</div> | ||
|
||
<div id="css" class="code-tab tab-content" role="tabpanel"> | ||
<div class="tab__body"> | ||
<div class="code-block"> | ||
<div class="copy-css-snippet"> | ||
{% highlight css %} | ||
{% include_relative component.css %} | ||
{% endhighlight %} | ||
</div> | ||
</div><!--/.code-block--> | ||
</div><!--/.tab__body--> | ||
<ul class="button-group"> | ||
<li><button data-clipboard-action="copy" data-clipboard-target=".copy-css-snippet" class="copy-clipboard button button--tertiary">Copy CSS to clipboard</button></li> | ||
</ul> | ||
</div><!--/.code-tab--> | ||
|
||
<div id="js" class="code-tab tab-content" role="tabpanel"> | ||
<div class="tab__body"> | ||
<div class="code-block"> | ||
<div class="copy-js-snippet"> | ||
{% highlight javascript %} | ||
{% include_relative component-usage.js %} | ||
{% endhighlight %} | ||
</div><!--/.copy-js-snippet--> | ||
</div><!--/.code-block--> | ||
</div><!--/.tab__body--> | ||
<ul class="button-group"> | ||
<li><button data-clipboard-action="copy" data-clipboard-target=".copy-js-snippet" class="copy-clipboard button button--tertiary">Copy JavaScript to clipboard</button></li> | ||
</ul> | ||
|
||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<h3>Installation</h3> | ||
|
||
<p>You can view full documentation for this component in the <a href="https://github.com/ganlanyuan/tiny-slider">Tiny Slider repository</a>. This documentation should be enough to get you going.</p> | ||
|
||
<div class="u-spacing__bottom--medium"> | ||
<code>npm install tiny-slider --save</code> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
The Tiny Slider component is based off the popular library [Tiny Slider 2](https://github.com/ganlanyuan/tiny-slider#fallback), it was chosen because it passed accessibility, performance, and quality tests. Therefore the [tiny-slider.js](https://github.com/ganlanyuan/tiny-slider/blob/master/dist/min/tiny-slider.js) file and [tiny-slider.css](https://github.com/ganlanyuan/tiny-slider/blob/master/dist/tiny-slider.css) file is necessary to use this component out of the box before customizing for your own use. Pikaday is also generally flexible enough with a strong API to accomplish most goals of any carousel you might encounter. | ||
|
||
## Accessibility Notes | ||
|
||
- Autoplaying will lead to less than desirable screen reader behavior | ||
- Looping slides will make the "count" listed by screen readers behave abnormally | ||
- Even though the slider out of the box passes WCAG 2.1AA you should still make sure to check your build to ensure that things like color contrast, and navigability still pass WCAG 2.1AA |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
<ul> | ||
<li><a href="https://github.com/ganlanyuan/tiny-slider">Tiny Slider Github</a></li> | ||
<li><a href="http://ganlanyuan.github.io/tiny-slider/demo/">Tiny Slider Demos</a></li> | ||
</ul> |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@treighton can you elaborate on "abnormally"?