Add samples index (#359)
* add samples_index to web/ directory Co-authored-by: Thea Flowers <theaflowers@google.com> * add pub_get.dart script * build sample index in peanut post build * re-generate sample index with web demos * print more details in peanut_post_build.dart * add images for demos * run generator * update README * add animations and provider shopper as symlinks * add links to symlinked web demos * use relative paths * update cookbook images, urls, and description CSS * use relative URL for navbar link * unstage HTML files * .gitignore generated HTML files * add margin to toolbar * rename escape functions * add and update copyright headers Co-authored-by: Thea Flowers <theaflowers@google.com>
10
web/samples_index/web/description.dart
Normal file
@@ -0,0 +1,10 @@
|
||||
import 'dart:html';
|
||||
|
||||
import 'package:mdc_web/mdc_web.dart';
|
||||
|
||||
InputElement searchInput;
|
||||
|
||||
void main() {
|
||||
querySelectorAll('.mdc-card__primary-action')
|
||||
.forEach((el) => MDCRipple(el));
|
||||
}
|
||||
BIN
web/samples_index/web/images/add_to_app1.png
Normal file
|
After Width: | Height: | Size: 71 KiB |
BIN
web/samples_index/web/images/add_to_app2.png
Normal file
|
After Width: | Height: | Size: 146 KiB |
BIN
web/samples_index/web/images/animations1.png
Normal file
|
After Width: | Height: | Size: 110 KiB |
BIN
web/samples_index/web/images/animations2.png
Normal file
|
After Width: | Height: | Size: 31 KiB |
BIN
web/samples_index/web/images/animations3.png
Normal file
|
After Width: | Height: | Size: 574 KiB |
BIN
web/samples_index/web/images/charts1.png
Normal file
|
After Width: | Height: | Size: 99 KiB |
BIN
web/samples_index/web/images/cookbook/animated-container.png
Normal file
|
After Width: | Height: | Size: 706 KiB |
BIN
web/samples_index/web/images/cookbook/authenticated-requests.png
Normal file
|
After Width: | Height: | Size: 583 KiB |
BIN
web/samples_index/web/images/cookbook/background-parsing.png
Normal file
|
After Width: | Height: | Size: 646 KiB |
BIN
web/samples_index/web/images/cookbook/basic-list.png
Normal file
|
After Width: | Height: | Size: 462 KiB |
BIN
web/samples_index/web/images/cookbook/cached-images.png
Normal file
|
After Width: | Height: | Size: 552 KiB |
BIN
web/samples_index/web/images/cookbook/dismissible.png
Normal file
|
After Width: | Height: | Size: 584 KiB |
BIN
web/samples_index/web/images/cookbook/drawer.png
Normal file
|
After Width: | Height: | Size: 592 KiB |
BIN
web/samples_index/web/images/cookbook/error-reporting.png
Normal file
|
After Width: | Height: | Size: 638 KiB |
BIN
web/samples_index/web/images/cookbook/fading-in-images.png
Normal file
|
After Width: | Height: | Size: 555 KiB |
BIN
web/samples_index/web/images/cookbook/fetch-data.png
Normal file
|
After Width: | Height: | Size: 602 KiB |
BIN
web/samples_index/web/images/cookbook/finders.png
Normal file
|
After Width: | Height: | Size: 613 KiB |
BIN
web/samples_index/web/images/cookbook/floating-app-bar.png
Normal file
|
After Width: | Height: | Size: 731 KiB |
BIN
web/samples_index/web/images/cookbook/focus.png
Normal file
|
After Width: | Height: | Size: 648 KiB |
BIN
web/samples_index/web/images/cookbook/fonts.png
Normal file
|
After Width: | Height: | Size: 597 KiB |
BIN
web/samples_index/web/images/cookbook/grid-lists.png
Normal file
|
After Width: | Height: | Size: 538 KiB |
BIN
web/samples_index/web/images/cookbook/handling-taps.png
Normal file
|
After Width: | Height: | Size: 550 KiB |
BIN
web/samples_index/web/images/cookbook/hero-animations.png
Normal file
|
After Width: | Height: | Size: 608 KiB |
BIN
web/samples_index/web/images/cookbook/horizontal-list.png
Normal file
|
After Width: | Height: | Size: 461 KiB |
BIN
web/samples_index/web/images/cookbook/introduction.png
Normal file
|
After Width: | Height: | Size: 688 KiB |
BIN
web/samples_index/web/images/cookbook/key-value.png
Normal file
|
After Width: | Height: | Size: 582 KiB |
BIN
web/samples_index/web/images/cookbook/long-lists.png
Normal file
|
After Width: | Height: | Size: 555 KiB |
BIN
web/samples_index/web/images/cookbook/mixed-list.png
Normal file
|
After Width: | Height: | Size: 600 KiB |
BIN
web/samples_index/web/images/cookbook/mocking.png
Normal file
|
After Width: | Height: | Size: 644 KiB |
BIN
web/samples_index/web/images/cookbook/named-routes.png
Normal file
|
After Width: | Height: | Size: 619 KiB |
|
After Width: | Height: | Size: 669 KiB |
BIN
web/samples_index/web/images/cookbook/navigation-basics.png
Normal file
|
After Width: | Height: | Size: 612 KiB |
BIN
web/samples_index/web/images/cookbook/network-image.png
Normal file
|
After Width: | Height: | Size: 532 KiB |
BIN
web/samples_index/web/images/cookbook/opacity-animation.png
Normal file
|
After Width: | Height: | Size: 598 KiB |
BIN
web/samples_index/web/images/cookbook/orientation.png
Normal file
|
After Width: | Height: | Size: 602 KiB |
BIN
web/samples_index/web/images/cookbook/package-fonts.png
Normal file
|
After Width: | Height: | Size: 590 KiB |
BIN
web/samples_index/web/images/cookbook/page-route-animation.png
Normal file
|
After Width: | Height: | Size: 626 KiB |
BIN
web/samples_index/web/images/cookbook/passing-data.png
Normal file
|
After Width: | Height: | Size: 644 KiB |
BIN
web/samples_index/web/images/cookbook/physics-simulation.png
Normal file
|
After Width: | Height: | Size: 590 KiB |
BIN
web/samples_index/web/images/cookbook/picture-using-camera.png
Normal file
|
After Width: | Height: | Size: 604 KiB |
BIN
web/samples_index/web/images/cookbook/play-video.png
Normal file
|
After Width: | Height: | Size: 616 KiB |
BIN
web/samples_index/web/images/cookbook/profiling.png
Normal file
|
After Width: | Height: | Size: 718 KiB |
BIN
web/samples_index/web/images/cookbook/reading-writing-files.png
Normal file
|
After Width: | Height: | Size: 656 KiB |
BIN
web/samples_index/web/images/cookbook/retrieve-input.png
Normal file
|
After Width: | Height: | Size: 590 KiB |
BIN
web/samples_index/web/images/cookbook/returning-data.png
Normal file
|
After Width: | Height: | Size: 614 KiB |
BIN
web/samples_index/web/images/cookbook/ripples.png
Normal file
|
After Width: | Height: | Size: 520 KiB |
BIN
web/samples_index/web/images/cookbook/scrolling.png
Normal file
|
After Width: | Height: | Size: 629 KiB |
BIN
web/samples_index/web/images/cookbook/send-data.png
Normal file
|
After Width: | Height: | Size: 594 KiB |
BIN
web/samples_index/web/images/cookbook/snackbars.png
Normal file
|
After Width: | Height: | Size: 585 KiB |
BIN
web/samples_index/web/images/cookbook/sqlite.png
Normal file
|
After Width: | Height: | Size: 629 KiB |
BIN
web/samples_index/web/images/cookbook/tabs.png
Normal file
|
After Width: | Height: | Size: 540 KiB |
BIN
web/samples_index/web/images/cookbook/tap-drag.png
Normal file
|
After Width: | Height: | Size: 621 KiB |
BIN
web/samples_index/web/images/cookbook/text-field-changes.png
Normal file
|
After Width: | Height: | Size: 635 KiB |
BIN
web/samples_index/web/images/cookbook/text-input.png
Normal file
|
After Width: | Height: | Size: 535 KiB |
BIN
web/samples_index/web/images/cookbook/themes.png
Normal file
|
After Width: | Height: | Size: 628 KiB |
BIN
web/samples_index/web/images/cookbook/validation.png
Normal file
|
After Width: | Height: | Size: 638 KiB |
BIN
web/samples_index/web/images/cookbook/web-sockets.png
Normal file
|
After Width: | Height: | Size: 656 KiB |
BIN
web/samples_index/web/images/filipino_cuisine1.png
Normal file
|
After Width: | Height: | Size: 1.8 MiB |
BIN
web/samples_index/web/images/flutter_maps_firestore1.png
Normal file
|
After Width: | Height: | Size: 920 KiB |
BIN
web/samples_index/web/images/flutter_maps_firestore2.png
Normal file
|
After Width: | Height: | Size: 846 KiB |
BIN
web/samples_index/web/images/gallery1.png
Normal file
|
After Width: | Height: | Size: 451 KiB |
BIN
web/samples_index/web/images/gallery2.png
Normal file
|
After Width: | Height: | Size: 301 KiB |
BIN
web/samples_index/web/images/gallery3.png
Normal file
|
After Width: | Height: | Size: 1.6 MiB |
BIN
web/samples_index/web/images/gallery4.png
Normal file
|
After Width: | Height: | Size: 3.2 MiB |
BIN
web/samples_index/web/images/gallery5.png
Normal file
|
After Width: | Height: | Size: 717 KiB |
BIN
web/samples_index/web/images/github_dataviz1.png
Normal file
|
After Width: | Height: | Size: 263 KiB |
BIN
web/samples_index/web/images/isolate1.png
Normal file
|
After Width: | Height: | Size: 139 KiB |
BIN
web/samples_index/web/images/isolate2.png
Normal file
|
After Width: | Height: | Size: 115 KiB |
BIN
web/samples_index/web/images/isolate3.png
Normal file
|
After Width: | Height: | Size: 164 KiB |
BIN
web/samples_index/web/images/jsonexample1.png
Normal file
|
After Width: | Height: | Size: 105 KiB |
BIN
web/samples_index/web/images/jsonexample2.png
Normal file
|
After Width: | Height: | Size: 251 KiB |
BIN
web/samples_index/web/images/jsonexample3.png
Normal file
|
After Width: | Height: | Size: 279 KiB |
BIN
web/samples_index/web/images/logos/logo_flutter_1080px_clr.png
Normal file
|
After Width: | Height: | Size: 16 KiB |
BIN
web/samples_index/web/images/logos/logo_flutter_96px_clr.png
Normal file
|
After Width: | Height: | Size: 5.9 KiB |
|
After Width: | Height: | Size: 23 KiB |
BIN
web/samples_index/web/images/particle_background1.png
Normal file
|
After Width: | Height: | Size: 878 KiB |
BIN
web/samples_index/web/images/place_tracker1.png
Normal file
|
After Width: | Height: | Size: 1.0 MiB |
BIN
web/samples_index/web/images/place_tracker2.png
Normal file
|
After Width: | Height: | Size: 1012 KiB |
BIN
web/samples_index/web/images/place_tracker3.png
Normal file
|
After Width: | Height: | Size: 972 KiB |
BIN
web/samples_index/web/images/place_tracker4.png
Normal file
|
After Width: | Height: | Size: 239 KiB |
BIN
web/samples_index/web/images/platform_design1.png
Normal file
|
After Width: | Height: | Size: 147 KiB |
BIN
web/samples_index/web/images/platform_design2.png
Normal file
|
After Width: | Height: | Size: 137 KiB |
BIN
web/samples_index/web/images/platform_design3.png
Normal file
|
After Width: | Height: | Size: 232 KiB |
BIN
web/samples_index/web/images/platform_design4.png
Normal file
|
After Width: | Height: | Size: 193 KiB |
BIN
web/samples_index/web/images/platform_design5.png
Normal file
|
After Width: | Height: | Size: 82 KiB |
BIN
web/samples_index/web/images/platform_design6.png
Normal file
|
After Width: | Height: | Size: 58 KiB |
BIN
web/samples_index/web/images/platform_design7.png
Normal file
|
After Width: | Height: | Size: 72 KiB |
BIN
web/samples_index/web/images/platform_view_swift1.png
Normal file
|
After Width: | Height: | Size: 127 KiB |
BIN
web/samples_index/web/images/platform_view_swift2.png
Normal file
|
After Width: | Height: | Size: 125 KiB |
BIN
web/samples_index/web/images/provider_shopper1.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
web/samples_index/web/images/provider_shopper2.png
Normal file
|
After Width: | Height: | Size: 22 KiB |
BIN
web/samples_index/web/images/provider_shopper3.png
Normal file
|
After Width: | Height: | Size: 12 KiB |
BIN
web/samples_index/web/images/slide_puzzle1.png
Normal file
|
After Width: | Height: | Size: 3.2 MiB |
BIN
web/samples_index/web/images/timeflow1.png
Normal file
|
After Width: | Height: | Size: 486 KiB |
BIN
web/samples_index/web/images/vision_challenge1.png
Normal file
|
After Width: | Height: | Size: 1.1 MiB |
BIN
web/samples_index/web/images/vision_challenge2.png
Normal file
|
After Width: | Height: | Size: 438 KiB |
162
web/samples_index/web/main.dart
Normal file
@@ -0,0 +1,162 @@
|
||||
import 'dart:html';
|
||||
|
||||
import 'package:mdc_web/mdc_web.dart';
|
||||
import 'package:samples_index/browser.dart';
|
||||
|
||||
/// The Material text input for searching
|
||||
MDCTextField searchBar;
|
||||
MDCChipSet chipSet;
|
||||
|
||||
/// The current set of query parameters that determine how the cards are
|
||||
/// filtered. e.g. {'search': 'kittens', 'platform': 'ios'}
|
||||
final queryParams = <String, String>{};
|
||||
const searchKey = 'search';
|
||||
const typeKey = 'type';
|
||||
const platformKey = 'platform';
|
||||
|
||||
void main() {
|
||||
// Initialize Material components
|
||||
MDCFloatingLabel(querySelector('.mdc-floating-label'));
|
||||
searchBar = MDCTextField(querySelector('#search-bar'));
|
||||
MDCRipple(querySelector('#clear-button'));
|
||||
|
||||
// Listen for hash changes
|
||||
window.onHashChange.listen((_) {
|
||||
queryParams.clear();
|
||||
queryParams.addAll(parseHash(window.location.hash));
|
||||
setSearchBarText();
|
||||
setSelectedChips();
|
||||
filterCards();
|
||||
});
|
||||
|
||||
// Use a ripple effect on all cards
|
||||
querySelectorAll('.mdc-card__primary-action').forEach((el) => MDCRipple(el)
|
||||
// Navigate to the description page when tapped
|
||||
..listen('click', (e) {
|
||||
window.location.href = el.attributes['href'];
|
||||
}));
|
||||
|
||||
// Filter cards on each keypress
|
||||
searchBar.listen('keydown', (Event e) async {
|
||||
await Future(() {});
|
||||
handleSearch();
|
||||
});
|
||||
|
||||
// Update the URL only when the user is done typing in the search bar
|
||||
searchBar.listen('change', (Event e) {
|
||||
queryParams[searchKey] = searchBar.value;
|
||||
updateHash();
|
||||
});
|
||||
|
||||
// Update the hash, cards, and text input when the clear button is pressed
|
||||
querySelector('#clear-button').onClick.listen((e) {
|
||||
queryParams.remove('search');
|
||||
updateHash();
|
||||
setSearchBarText();
|
||||
filterCards();
|
||||
});
|
||||
|
||||
// Initialize chips
|
||||
chipSet = MDCChipSet(querySelector('.mdc-chip-set'));
|
||||
chipSet.listen('MDCChip:selection', (Event e) {
|
||||
// Get the query parameters for this chip
|
||||
var selectedChipIndex = chipSet.chips.indexWhere((chip) => chip.selected);
|
||||
var chipParams = paramsForChip(selectedChipIndex);
|
||||
|
||||
// Overwrite query parameters with new ones
|
||||
queryParams.remove(typeKey);
|
||||
queryParams.remove(platformKey);
|
||||
queryParams.addAll(chipParams);
|
||||
updateHash();
|
||||
filterCards();
|
||||
});
|
||||
|
||||
// Apply the search from the hash in the URL
|
||||
queryParams.addAll(parseHash(window.location.hash));
|
||||
setSearchBarText();
|
||||
setSelectedChips();
|
||||
|
||||
// Filter cards if a filter is being applied
|
||||
if (queryParams.isNotEmpty) {
|
||||
filterCards();
|
||||
}
|
||||
}
|
||||
|
||||
void setSearchBarText() {
|
||||
var search = queryParams[searchKey] ?? '';
|
||||
searchBar.value = search;
|
||||
}
|
||||
|
||||
void setSelectedChips() {
|
||||
var type = queryParams.containsKey(typeKey) ? queryParams[typeKey] : '';
|
||||
if (type.isNotEmpty) {
|
||||
if (type == 'sample') {
|
||||
chipSet.chips[1].selected = true;
|
||||
}
|
||||
if (type == 'cookbook') {
|
||||
chipSet.chips[2].selected = true;
|
||||
}
|
||||
}
|
||||
|
||||
// Apply the platform from the hash in the URL
|
||||
var platform =
|
||||
queryParams.containsKey(platformKey) ? queryParams[platformKey] : '';
|
||||
if (platform.isNotEmpty) {
|
||||
if (platform == 'web') {
|
||||
chipSet.chips[3].selected = true;
|
||||
}
|
||||
}
|
||||
if (platform.isEmpty && type.isEmpty) {
|
||||
chipSet.chips[0].selected = true;
|
||||
}
|
||||
}
|
||||
|
||||
void handleSearch() {
|
||||
var search = searchBar.value;
|
||||
queryParams[searchKey] = search;
|
||||
filterCards();
|
||||
}
|
||||
|
||||
void updateHash() {
|
||||
if (queryParams.isEmpty) {
|
||||
_replaceHash('');
|
||||
return;
|
||||
}
|
||||
_replaceHash(formatHash(queryParams));
|
||||
}
|
||||
|
||||
void _replaceHash(String hash) {
|
||||
var currentUri = Uri.parse(window.location.href);
|
||||
window.history
|
||||
.replaceState(null, '', currentUri.replace(fragment: hash).toString());
|
||||
}
|
||||
|
||||
void filterCards() {
|
||||
// The search query, e.g. 'kittens platform:web'
|
||||
var searchQuery = searchQueryFromParams(queryParams);
|
||||
|
||||
// Filter out all elements with non-matching search-attrs
|
||||
var elements = querySelectorAll('[search-attrs]');
|
||||
for (var element in elements) {
|
||||
var searchAttributes = element.attributes['search-attrs'];
|
||||
if (matchesQuery(searchQuery, searchAttributes)) {
|
||||
element.hidden = false;
|
||||
} else {
|
||||
element.hidden = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Map<String, String> paramsForChip(int index) {
|
||||
switch (index) {
|
||||
case 1:
|
||||
return {typeKey: 'sample'};
|
||||
case 2:
|
||||
return {typeKey: 'cookbook'};
|
||||
case 3:
|
||||
return {platformKey: 'web'};
|
||||
case 0:
|
||||
default:
|
||||
return {};
|
||||
}
|
||||
}
|
||||
346
web/samples_index/web/styles.scss
Normal file
@@ -0,0 +1,346 @@
|
||||
// Material Design Web theme colors. Must be imported before importing
|
||||
// material-components-web.scss.
|
||||
$mdc-theme-primary: #0175C2;
|
||||
$mdc-theme-secondary: #FFC108;
|
||||
//$mdc-theme-background: $playground-background-color;
|
||||
//$mdc-theme-surface: $playground-background-color;
|
||||
//$mdc-theme-error: $dark-red;
|
||||
|
||||
@import 'package:mdc_web/material-components-web';
|
||||
|
||||
$dark: #202124;
|
||||
$background-color: #F8F9FA;
|
||||
$grey: var(--mdc-theme-text-secondary-on-background,rgba(0,0,0,.54));
|
||||
$font-size-small: 0.875rem;
|
||||
$card-width: 300px;
|
||||
$mobile-width: 960px;
|
||||
$container-width: 960px;
|
||||
$text-color: $dark;
|
||||
$footer-height: 96px;
|
||||
$font: Roboto, sans-serif;
|
||||
|
||||
html, body {
|
||||
height: 100%;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
body {
|
||||
background-color: $background-color;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.content {
|
||||
min-height: 100%;
|
||||
>.container {
|
||||
padding-bottom: $footer-height;
|
||||
}
|
||||
}
|
||||
|
||||
h1, h2, h3, h4, h5, h6 {
|
||||
color: $text-color;
|
||||
font-family: $font;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
h1 {
|
||||
font-size: 28px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h2 {
|
||||
font-size: 22px;
|
||||
font-weight: bold;
|
||||
}
|
||||
|
||||
h3 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
h4 {
|
||||
font-size: 22px;
|
||||
}
|
||||
|
||||
h5 {
|
||||
font-size: 18px;
|
||||
}
|
||||
|
||||
h6 {
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
* {
|
||||
font-family: $font;
|
||||
}
|
||||
|
||||
a {
|
||||
text-decoration: none;
|
||||
}
|
||||
|
||||
|
||||
[hidden] {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.navbar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: center;
|
||||
|
||||
background-color: $dark;
|
||||
color: white;
|
||||
padding: 16px 125px 16px 125px;
|
||||
margin-bottom: 48px;
|
||||
|
||||
|
||||
@media screen and (max-width: $mobile-width) {
|
||||
padding: 8px 16px 8px 16px;
|
||||
margin-bottom: 16px;
|
||||
}
|
||||
|
||||
.leading {
|
||||
&:hover {
|
||||
opacity: 0.8;
|
||||
}
|
||||
}
|
||||
|
||||
.leading, .nav-items {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
> * {
|
||||
margin: 0 8px 0 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.nav-items {
|
||||
@media screen and (max-width: $mobile-width) {
|
||||
display: none;
|
||||
}
|
||||
}
|
||||
|
||||
span.title {
|
||||
font-size: 28px;
|
||||
font-weight: 300;
|
||||
margin: 0;
|
||||
color: #5DE0FD;
|
||||
}
|
||||
|
||||
img {
|
||||
height: 36px;
|
||||
}
|
||||
|
||||
a {
|
||||
color: white;
|
||||
|
||||
&:active {
|
||||
color: white;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.footer {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: center;
|
||||
align-items: center;
|
||||
|
||||
background-color: $dark;
|
||||
color: white;
|
||||
//padding: 36px 125px 36px 125px;
|
||||
height: $footer-height;
|
||||
margin-top: -$footer-height;
|
||||
}
|
||||
|
||||
.container {
|
||||
width: 100%;
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
padding: 8px;
|
||||
@media screen and (min-width: $mobile-width) {
|
||||
max-width: $container-width;
|
||||
}
|
||||
}
|
||||
|
||||
.toolbar {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
justify-content: space-between;
|
||||
align-items: start;
|
||||
margin-bottom: 12px;
|
||||
|
||||
@media screen and (max-width: $mobile-width) {
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.buttons {
|
||||
button {
|
||||
margin-right: 12px;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.screenshots {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
height: 360px;
|
||||
overflow-x: scroll;
|
||||
|
||||
@media screen and (max-width: $mobile-width) {
|
||||
height: 240px;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
flex-wrap: nowrap;
|
||||
overflow-x: scroll;
|
||||
img {
|
||||
flex: 0 0 auto;
|
||||
}
|
||||
}
|
||||
|
||||
img {
|
||||
border-radius: 8px;
|
||||
margin: 0 8px 0 8px;
|
||||
max-width:100%;
|
||||
max-height:100%;
|
||||
}
|
||||
}
|
||||
|
||||
.index-header {
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
}
|
||||
|
||||
.search-container {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: flex-start;
|
||||
margin-bottom: 12px;
|
||||
max-width: 640px;
|
||||
margin-right: 8px;
|
||||
margin-left: 8px;
|
||||
}
|
||||
|
||||
.mdc-chip-set {
|
||||
justify-content: center;
|
||||
}
|
||||
|
||||
.mdc-card__media {
|
||||
background-position: top;
|
||||
}
|
||||
|
||||
.mdc-chip__text, .mdc-text-field__icon {
|
||||
outline: 0;
|
||||
}
|
||||
|
||||
#search-bar {
|
||||
flex: 1;
|
||||
@include mdc-text-field-fill-color($background-color);
|
||||
@include mdc-states-hover-opacity(0.0);
|
||||
@include mdc-states-focus-opacity(0.0);
|
||||
|
||||
}
|
||||
|
||||
.grid {
|
||||
display: grid;
|
||||
grid-template-columns: repeat(auto-fill, $card-width);
|
||||
grid-gap: 8px;
|
||||
@media screen and (max-width: $mobile-width) {
|
||||
display: block;
|
||||
}
|
||||
}
|
||||
|
||||
.demo-card {
|
||||
width: $card-width;
|
||||
margin: 12px;
|
||||
@media screen and (max-width: $mobile-width) {
|
||||
margin-left: auto;
|
||||
margin-right: auto;
|
||||
width: 100%;
|
||||
max-width: $card-width;
|
||||
}
|
||||
}
|
||||
|
||||
.demo-card__title {
|
||||
font-family: $font;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.demo-card__primary {
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.demo-card__primary-action {
|
||||
height: 100%;
|
||||
}
|
||||
|
||||
.demo-card__secondary {
|
||||
font-family: $font;
|
||||
padding: 0 1rem 8px;
|
||||
color: $grey;
|
||||
}
|
||||
|
||||
.demo-card__label {
|
||||
position: absolute;
|
||||
top: 0;
|
||||
right: 0;
|
||||
}
|
||||
|
||||
.type-label {
|
||||
font-family: $font;
|
||||
font-size: $font-size-small;
|
||||
text-transform: uppercase;
|
||||
color: $dark;
|
||||
background-color: rgba(255, 255, 255, .95);
|
||||
border-radius: 8px;
|
||||
padding: 7px;
|
||||
margin: 4px;
|
||||
}
|
||||
|
||||
.type-label-bordered {
|
||||
border: 1px solid $dark;
|
||||
}
|
||||
|
||||
.description-title-row {
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
h1 {
|
||||
margin-right: 8px;
|
||||
}
|
||||
}
|
||||
|
||||
.tags-container {
|
||||
max-width: 400px;
|
||||
.tags-label {
|
||||
color: $dark;
|
||||
display: flex;
|
||||
flex-direction: row;
|
||||
align-items: center;
|
||||
justify-content: start;
|
||||
text-transform: uppercase;
|
||||
font-weight: bold;
|
||||
>span{
|
||||
margin-left: 4px;
|
||||
}
|
||||
}
|
||||
|
||||
.tags {
|
||||
color: $grey;
|
||||
a {
|
||||
margin-left: 8px;
|
||||
margin-right: 8px;
|
||||
text-decoration: underline;
|
||||
|
||||
color: $dark;
|
||||
|
||||
&:active {
|
||||
color: $dark;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
color: lighten($dark, 25%);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||