Add huge old migrate d8 migration presentation
BIN
migrate-d8-great/12412508015_1e5340004b_k.jpg
Normal file
After Width: | Height: | Size: 1.6 MiB |
BIN
migrate-d8-great/400041711_fwSZpkHK_c.jpg
Normal file
After Width: | Height: | Size: 87 KiB |
BIN
migrate-d8-great/4154868194_14f8918c77_o.jpg
Normal file
After Width: | Height: | Size: 2.4 MiB |
BIN
migrate-d8-great/Click-1-512.png
Normal file
After Width: | Height: | Size: 18 KiB |
BIN
migrate-d8-great/Grus_grus_-migrating_north-6a.jpg
Normal file
After Width: | Height: | Size: 2.9 MiB |
BIN
migrate-d8-great/How-to-Inventory-Your-Home-e1458050076712.jpg
Normal file
After Width: | Height: | Size: 87 KiB |
26
migrate-d8-great/LICENSE
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
Copyright (c) 2012, Michael Bostock
|
||||||
|
All rights reserved.
|
||||||
|
|
||||||
|
Redistribution and use in source and binary forms, with or without
|
||||||
|
modification, are permitted provided that the following conditions are met:
|
||||||
|
|
||||||
|
* Redistributions of source code must retain the above copyright notice, this
|
||||||
|
list of conditions and the following disclaimer.
|
||||||
|
|
||||||
|
* Redistributions in binary form must reproduce the above copyright notice,
|
||||||
|
this list of conditions and the following disclaimer in the documentation
|
||||||
|
and/or other materials provided with the distribution.
|
||||||
|
|
||||||
|
* The name Michael Bostock may not be used to endorse or promote products
|
||||||
|
derived from this software without specific prior written permission.
|
||||||
|
|
||||||
|
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||||
|
AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||||
|
IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
|
||||||
|
DISCLAIMED. IN NO EVENT SHALL MICHAEL BOSTOCK BE LIABLE FOR ANY DIRECT,
|
||||||
|
INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
|
||||||
|
BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||||
|
DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
|
||||||
|
OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
|
||||||
|
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
|
||||||
|
EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
28
migrate-d8-great/README.md
Normal file
|
@ -0,0 +1,28 @@
|
||||||
|
# Migrate Your Way to Drupal 8 Greatness
|
||||||
|
|
||||||
|
Slides for a presentation at Twin Cities Drupal Camp. View <a href="http://mlncn.github.io/migrate-d8-great/">index.html</a> in a browser, but view the source for my notes.
|
||||||
|
|
||||||
|
Don't let getting the content over stop you from moving to Drupal 8— whether from another version of Drupal or some other something else entirely.
|
||||||
|
|
||||||
|
Don't let moving the content over be an afterthought, either.
|
||||||
|
|
||||||
|
We will:
|
||||||
|
|
||||||
|
Introduce you to Drupal's Migrate API, which is the powerful Migrate module moved into core for Drupal 8.
|
||||||
|
Show you how to upgrade your Drupal site with Migrate API, which is now the official upgrade path for Drupal 6 and Drupal 7 sites upgrading to Drupal 8.
|
||||||
|
Provide strategies for approaching migrating content from different sources into Drupal.
|
||||||
|
Detail the steps for migrating from some common non-Drupal sources.
|
||||||
|
Answer your questions to the best of our ability! Feel free to ask them in the comments below or ask us directly, and we'll try to incorporate it into the session.
|
||||||
|
|
||||||
|
Learning Objectives & Outcomes:
|
||||||
|
|
||||||
|
Have confidence in your ability to use Drupal 8's core Migrate module to bring in content from Drupal datases, other databases, and flat files.
|
||||||
|
|
||||||
|
We might even throw in a little Python-powered preparation of decade-old HTML if you're all of hardy constitutions, but mostly we'll be covering how Drupal 8 gives you the tools to get content into your beautifully constructed Drupal 8 site.
|
||||||
|
|
||||||
|
# Built on stack.js
|
||||||
|
|
||||||
|
Stack.js is a presentation library with intuitive, scroll-based navigation.
|
||||||
|
|
||||||
|
https://mbostock.github.io/stack/
|
||||||
|
https://github.com/mbostock/stack
|
After Width: | Height: | Size: 318 KiB |
After Width: | Height: | Size: 1.8 MiB |
BIN
migrate-d8-great/bluemarine.png
Normal file
After Width: | Height: | Size: 31 KiB |
BIN
migrate-d8-great/btm-y88ciaav59f.jpg
Normal file
After Width: | Height: | Size: 64 KiB |
BIN
migrate-d8-great/cochituate-rail-trail-framingham-natick.jpg
Normal file
After Width: | Height: | Size: 3.3 MiB |
9294
migrate-d8-great/d3.v3.js
vendored
Normal file
5
migrate-d8-great/d3.v3.min.js
vendored
Normal file
BIN
migrate-d8-great/drupal-empty-content.png
Normal file
After Width: | Height: | Size: 26 KiB |
BIN
migrate-d8-great/drupal-upgrade-are-you-sure-missing-paths.png
Normal file
After Width: | Height: | Size: 35 KiB |
BIN
migrate-d8-great/drupal-upgrade-page.png
Normal file
After Width: | Height: | Size: 48 KiB |
BIN
migrate-d8-great/drupal-upgrade-screen.png
Normal file
After Width: | Height: | Size: 60 KiB |
BIN
migrate-d8-great/drupal5-garland-cyrillic.png
Normal file
After Width: | Height: | Size: 15 KiB |
BIN
migrate-d8-great/drupal6.jpg
Normal file
After Width: | Height: | Size: 114 KiB |
BIN
migrate-d8-great/drush-migrate-import-all.png
Normal file
After Width: | Height: | Size: 84 KiB |
BIN
migrate-d8-great/drush-migrate-upgrade-configure-only.png
Normal file
After Width: | Height: | Size: 19 KiB |
BIN
migrate-d8-great/drutopia-homepage.png
Normal file
After Width: | Height: | Size: 28 KiB |
BIN
migrate-d8-great/house-blueprints.jpg
Normal file
After Width: | Height: | Size: 274 KiB |
BIN
migrate-d8-great/img_20160624_180333_1024.jpg
Normal file
After Width: | Height: | Size: 177 KiB |
417
migrate-d8-great/index.html
Normal file
|
@ -0,0 +1,417 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html>
|
||||||
|
<head>
|
||||||
|
<title>Migrate Your Way to Drupal 8 Greatness</title>
|
||||||
|
<meta charset="utf-8">
|
||||||
|
<meta name="viewport" content="width=device-width">
|
||||||
|
<style>
|
||||||
|
|
||||||
|
@import url(http://fonts.googleapis.com/css?family=Ubuntu:500|Quattrocento+Sans:400,700,400italic);
|
||||||
|
|
||||||
|
section {
|
||||||
|
background-color: white;
|
||||||
|
color: black;
|
||||||
|
padding: 2em;
|
||||||
|
font-family: "Quattrocento Sans", Helvetica, Verdana, sans-serif;
|
||||||
|
font-weight: 400;
|
||||||
|
background-size: cover;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.reverse {
|
||||||
|
background-color: #0678be;
|
||||||
|
color: white;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:link,
|
||||||
|
a:visited {
|
||||||
|
color: #99CCFF;
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
section.reverse a:link,
|
||||||
|
section.reverse a:visited {
|
||||||
|
color: yellow;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:hover {
|
||||||
|
text-decoration: underline;
|
||||||
|
}
|
||||||
|
|
||||||
|
section p {
|
||||||
|
font-size: 1em;
|
||||||
|
line-height: 1.4;
|
||||||
|
}
|
||||||
|
|
||||||
|
section strong {
|
||||||
|
font-weight: 700;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1,h2,h3,h4,h5,h6 {
|
||||||
|
font-family: Ubuntu, Arial, sans-serif;
|
||||||
|
font-weight: 500;
|
||||||
|
text-align: center;
|
||||||
|
}
|
||||||
|
|
||||||
|
h1 {
|
||||||
|
font-size: 2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
.big li {
|
||||||
|
font-size: 1.2em;
|
||||||
|
}
|
||||||
|
|
||||||
|
img {
|
||||||
|
margin-left: auto;
|
||||||
|
margin-right: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
cite {
|
||||||
|
font-size: .8em;
|
||||||
|
color: #eee;
|
||||||
|
position: absolute;
|
||||||
|
bottom: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark {
|
||||||
|
color: #111;
|
||||||
|
}
|
||||||
|
|
||||||
|
.dark a {
|
||||||
|
color: #0678be;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote cite {
|
||||||
|
color: inherit;
|
||||||
|
display: block;
|
||||||
|
position: relative;
|
||||||
|
text-align: right;
|
||||||
|
padding-right: 1em;
|
||||||
|
}
|
||||||
|
|
||||||
|
blockquote cite::before {
|
||||||
|
content: "—";
|
||||||
|
}
|
||||||
|
|
||||||
|
</style>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body>
|
||||||
|
<section class="reverse" style="padding-top: 2em">
|
||||||
|
<h1>Migrate Your Way<br />to Drupal 8 Greatness</h1>
|
||||||
|
<h2>Bring in content from older Drupal sites, other databases, or HTML files</h2>
|
||||||
|
<h4><a href="https://etherpad.net/p/d8migrate">etherpad.net/p/d8migrate</a></h4>
|
||||||
|
<h4><a href="https://mlncn.withknown.com/">@mlncn</a><br />
|
||||||
|
<a href="http://agaric.com/">agaric.com</a></h4>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section style="background-image: url(upgrade-database-settings-php.png); background-size: contain; background-position: center; background-repeat: no-repeat;">
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<pre>
|
||||||
|
drush migrate-upgrade --legacy-root=http://data.agaric.com --configure-only
|
||||||
|
</pre>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(drush-migrate-upgrade-configure-only.png); background-size: contain; background-repeat: no-repeat; background-position: center center; background-color: gray;">
|
||||||
|
<!-- This is working with the same 'upgrade' database with the source database credentials in settings.local.php -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section style="background-image:url(upgrade-database-settings-php-drupal_6.png);">
|
||||||
|
<!-- Bizarrely, to actually run the migration we just configured, we have to change the label for the source database to drupal_6, which is the name of the migration group that was created. Just go along with it; i blundered through this so you wouldn't have to. -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section style="background-image:url(drush-migrate-import-all.png);">
|
||||||
|
<!-- Now we can run the migration! OK, we could do that before, but now we can re-run and make tweaks. -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<pre>
|
||||||
|
drush mr --all
|
||||||
|
</pre>
|
||||||
|
<!-- Granted, the ability to roll back a migration is not as crucial when you could get to the same state by re-installing the site -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(missing-filter-plugins.png)">
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(bluemarine.png);">
|
||||||
|
<!-- What if you're coming from an older version of Drupal than Drupal 6? If you're coming from Drupal 4.7 and the state-of-the-art Bluemarine theme (still tables-based), first off what time warp did you walk out of, . -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(drupal5-garland-cyrillic.png);">
|
||||||
|
<!-- Ah, Drupal 5 and the Garland theme. Showing off multilingual capabilities, and XHTML 1.0! I hope there are no cuss words on there. There are not currently any supported upgrade-style migration plugins for Drupal 5 or earlier. You can either use Drupal's in-place upgrading process to update them to Drupal 6, and then use migrate upgrade— or you can take the custom migration approach, which is probably better than taking anything more than necessary from a site a decade or more old. So let's talk about that approach where we're building the migration tunnel ourselves... -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(12412508015_1e5340004b_k.jpg);">
|
||||||
|
<!-- The first thing you do to migrate is build a Drupal site. Yes, build the Drupal 8 site first. You don't need the theme yet. That can wait for the content. But you need the structure.-->
|
||||||
|
<cite style="margin-left: 13em">George Pankewytch, <a href="https://www.flickr.com/photos/gwp57/12412508015/in/photolist-jURmbT-bA2kjP-oRrdMA-jUTRW9-bp7ELM-iZDTWg-idzeyL-2V2uSq-4t2DEw-dqmnbS-7G3Ahs-bzmwVL-6rXkoU-7FYCQZ-7G3LYb-7G3Cvb-4UxjPw-7FYPoD-7G3Ej7-7G3JGS-5TvBSK-7FYP3K-7FYMpp-7V5XGc-nUsvgg-9Bu87Y-nY3uWi-7FYL7X-7G3zN7-7FYRsD-7G3Fah-q4vWzR-8Cocj-awv86s-nY3uXR-7G3H4Q-6NaA5y-7G3FEb-7G3Lzh-bcubtk-7FYJa2-dGnaRW-g6kSZd-nSF7ta-7G3LbU-4VBEfb-7hdcwr-aWUL3M-7ySngF-5TzV6o">16 Months after Sandy</a></cite>
|
||||||
|
</section>
|
||||||
|
<section style="background-image:url(house-blueprints.jpg); background-position: bottom center">
|
||||||
|
<!-- Define your new content structure, on paper. Palantir has example. -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(drutopia-homepage.png);">
|
||||||
|
<!-- One reason we can't build before -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section style="background-image:url(4154868194_14f8918c77_o.jpg);">
|
||||||
|
<!-- You cannot bring the content in first. That will look like this. -->
|
||||||
|
|
||||||
|
<cite>Wil Carraway, <a href="https://www.flickr.com/photos/carraways_photography/4154868194/in/photolist-7k9Myw-G5AUJR-4ArZGX-bwbBCp-goGgzt-dUFCXq-7Q2V4Y-boLRSY-62XsPF-E3JW8-mDLfwt-dr3Ux6-kCPGXx-9r9xTg-5E5PYC-aMBCUp-fKtoNR-7m2Cw9-pweMqq-b4cNJX-89juAe-dPZiKF-nzWwfD-pRcSpP-5u18Ud-mCFcFX-y9Rrpi-jAPFyv-8yHyC4-ehBxt-E2osU-9zRpGb-bzdXnu-qmtQ6g-8B6mDp-5QA5Xu-9p88cW-pAYqk-7ekyPh-dPYpMS-akVDzB-23Gukc-6Bgqn8-aQ6UDB-5SuDfQ-9Cxxgx-dr3Wpt-suD6p2-dVyHgK-85jYrw/">Pile of Junk</a></cite>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(Grus_grus_-migrating_north-6a.jpg);">
|
||||||
|
<!-- OK. You have some sense of where you're trying to go. -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="reverse">
|
||||||
|
<p style="margin-left: 7em; margin-top: 6em;"><big><code>
|
||||||
|
1 * #Entities<br />
|
||||||
|
+ 2 * #Fields<br />
|
||||||
|
= Migration Complexity</code></big></p>
|
||||||
|
<!-- This adds up faster than you think. Five content types and one user with an average of eight fields each equals 6*1 + 6*8*2 = 102, at two hours per complexity point, that's 204 hours, or more than a month of one person's work, or $30,600 -->
|
||||||
|
<!-- You'll note what i did *not* say, what is missing from that formula, is any mention of pieces of content. The more *pieces* of content you have relative to types of contest, the better the 'deal' you get. -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(btm-y88ciaav59f.jpg);">
|
||||||
|
<!-- -->
|
||||||
|
<blockquote style="background-color: white; padding: .3em;">You're not going to migrate in your schema that you had in Drupal 7 or 6 or Joomla...</blockquote>
|
||||||
|
<cite>disco insolence, <a href="https://discoinsolence.wordpress.com/2013/09/04/solvognens-tangle-of-wires/">Solvognen’s Tangle Of Wires</a></cite>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(400041711_fwSZpkHK_c.jpg);">
|
||||||
|
<!-- -->
|
||||||
|
<blockquote style="background-color: white; padding: .3em;">...you'll build it exactly as you want it in Drupal 8.<cite>Les Lim</cite></blockquote>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(img_20160624_180333_1024.jpg);">
|
||||||
|
<!-- To go back to the house analogy, you want to have built the perfect house— but not furnished yet. -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(tcdrupal-badge-character-encoding.jpg); background-size: 20em; background-position: center; background-repeat: no-repeat; padding-bottom: -15em;">
|
||||||
|
<!-- My badge helpfully illustrates a common migration issue: character encoding -->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(substitition-to-remove-extra-quotation-marks.png)">
|
||||||
|
</section>
|
||||||
|
|
||||||
|
|
||||||
|
<section class="reverse">
|
||||||
|
<br /><br />
|
||||||
|
<blockquote>Migrate module is using a more general process called extract, transform, and load, or ETL.<cite>Brad Lowry</cite></blockquote>
|
||||||
|
<br /><br /><br />
|
||||||
|
<!-- Or if you want the official statement of the same, from the Migration API documentation -->
|
||||||
|
<blockquote>Migration is an <a href="https://en.wikipedia.org/wiki/Extract,_transform,_load">Extract, Transform, Load (ETL)</a> process. For historical reasons, in the Drupal migration tool the extract phase is called "source", the transform phase is called "process", and the load phase is called "destination".
|
||||||
|
<cite><a href="https://api.drupal.org/api/drupal/core%21modules%21migrate%21migrate.api.php/group/migration/8.2.x">Migration API</a></cite>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(ralph-kimball-etl-data-warehouse.png); background-size:contain; background-position: center; background-repeat: no-repeat;">
|
||||||
|
<!-- Cover of a Ralph Kimball book.
|
||||||
|
If you like to understand the theory behind what you're doing, read a Ralph Kimbal book. Keep in mind, however, that If you just want -->
|
||||||
|
<cite>Attrib, <a href="">""</a></cite>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image: url(migrate-plus-releases-screenshot-2016-09-25.png); background-size: contain; background-position: center; background-repeat: no-repeat;">
|
||||||
|
<!-- Currently, these contributed modules lag behind This is the versions currently available for Migrate Plus. So while it might seem like a good idea to start building on the latest version of Drupal 8 available (it probably wasn't a good idea anyway), it's a bad idea if you want to build your migration early in the process. And building the migration early in the process is a good idea-->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
In a file <code>agaric_migrate.info.yml</code>:
|
||||||
|
<pre>
|
||||||
|
type: module
|
||||||
|
name: Agaric Migrate
|
||||||
|
description: "Migrate from Agaric's Drupal 7 site to its new Agaric 8 site."
|
||||||
|
package: Migrate
|
||||||
|
core: 8.x
|
||||||
|
dependencies:
|
||||||
|
- migrate
|
||||||
|
- migrate_plus
|
||||||
|
</pre>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<p>For more complex processing, you can add process plugins.</p>
|
||||||
|
|
||||||
|
<p>In a file like <code>src/Plugin/migrate/process/NerdUserRoles.php</code></p>
|
||||||
|
|
||||||
|
<p>You start out with:</p>
|
||||||
|
<pre>
|
||||||
|
namespace Drupal\nerdcustom\Plugin\migrate\process;
|
||||||
|
use Drupal\migrate\ProcessPluginBase;
|
||||||
|
use Drupal\migrate\MigrateExecutableInterface;
|
||||||
|
use Drupal\migrate\Row;
|
||||||
|
</pre>
|
||||||
|
|
||||||
|
<cite><a href="https://github.com/stevector/nerdologues-d8/blob/master/modules/custom/nerdcustom/src/Plugin/migrate/process/NerdUserRoles.php">github.com/stevector/nerdologues-d8</a></cite>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- I'm showing you this because a bunch of improv comedians are ahead of my professional web development company in migrating to Drupal 8. -->
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<pre>
|
||||||
|
/**
|
||||||
|
* This plugin maps old roles to new roles.
|
||||||
|
*
|
||||||
|
* @MigrateProcessPlugin(
|
||||||
|
* id = "nerd_user_roles"
|
||||||
|
* )
|
||||||
|
*/
|
||||||
|
class NerdUserRoles extends ProcessPluginBase {
|
||||||
|
/**
|
||||||
|
* {@inheritdoc}
|
||||||
|
*/
|
||||||
|
public function transform($value, MigrateExecutableInterface $migrate_executable, Row $row, $destination_property) {
|
||||||
|
if ($value == 3) {
|
||||||
|
return 'administrator';
|
||||||
|
}
|
||||||
|
elseif ($value == 4) {
|
||||||
|
return 'content_administrator';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</pre>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<!-- If nothing else, i hope this presentation has shown you that migration is not just for the birds. -->
|
||||||
|
<section style="background-image: url(loggerhead_turtles_migration_282.jpg);">
|
||||||
|
<cite>earthtimes.org, <a href="http://www.earthtimes.org/nature/loggerhead-turtle-migration-mystery-solved/332/">Loggerhead turtle migration mystery solved</a></cite>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="reverse" style="padding:6em 10em; background-image: url(turtle-in-sand.png); background-size: contain; background-position: bottom center; background-repeat: no-repeat;">
|
||||||
|
<h4><a href="https://etherpad.net/p/d8migrate">etherpad.net/p/d8migrate</a></h4>
|
||||||
|
<h4><a href="http://mlncn.withknown.com/" rel="author">benjamin melançon</a></h4>
|
||||||
|
<h5><a href="mailto:ben@agaric.com">ben@agaric.com</a></h5>
|
||||||
|
<h5><a href="https://twitter.com/mlncn">@mlncn</a></h5>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h2>Reading & Resources</h2>
|
||||||
|
<ul>
|
||||||
|
<li><a href="https://www.drupal.org/docs/8/upgrade/upgrading-from-drupal-6-or-7-to-drupal-8">drupal.org/docs/8/upgrade/upgrading-from-drupal-6-or-7-to-drupal-8</a></li>
|
||||||
|
<li>Recommended way, with Drush, is in the sub-page of these instructions called <a href="https://www.drupal.org/node/2350651">Upgrade using Drush (at drupal.org/node/2350651)</a></li>
|
||||||
|
<li>All the options - automatic, mixed, and manual: <a href="https://github.com/kafeiinteractif/shotgun-migrate-tour">github.com/kafeiinteractif/shotgun-migrate-tour</a></li>
|
||||||
|
<li><a href="http://dspeak.com/fldc14/migrate.html">dspeak.com/fldc14/migrate.html</a> (has most background of migrate-in-D8 effort, probably view as historical document)</li>
|
||||||
|
<li>From a non-Drupal database <a href="http://www.jeffgeerling.com/blog/2016/migrating-20000-images-audio-clips-and-video-clips-drupal-8">www.jeffgeerling.com/blog/2016/migrating-20000-images-audio-clips-and-video-clips-drupal-8</a> (even though the example is from Drupal, it's really about the non-upgrade approach)Non-Drupal database</li>
|
||||||
|
<li>https://www.chapterthree.com/blog/drupal-to-drupal-8-via-migrate-api</li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section id="lorenz" style="text-align:center;padding-top:0;">
|
||||||
|
<canvas></canvas>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image: url(.jpg);">
|
||||||
|
<h2 style="margin-top: 10em">.</h2>
|
||||||
|
<cite><a href="https://www.flickr.com/photos/littlesister/">IndyDina</a>, ""</cite>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section class="reverse" style="background-image:url(doctorow-civilwar-spreadsheet.jpeg);">
|
||||||
|
<blockquote style="background-color: black; padding: 0.5em"><big><big> </big></big></blockquote>
|
||||||
|
<!-- -->
|
||||||
|
<cite>Cory Doctorow, <a href="http://boingboing.net/2012/08/23/civilwar.html">"The coming civil war over general purpose computing"</a></cite>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section style="background-image:url(1413479953ewaste2.jpg);">
|
||||||
|
<!-- .-->
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<section>
|
||||||
|
<h2></h2>
|
||||||
|
<ul>
|
||||||
|
<li></li>
|
||||||
|
<li></li>
|
||||||
|
<li></li>
|
||||||
|
</ul>
|
||||||
|
</section>
|
||||||
|
|
||||||
|
<script src="d3.v3.min.js"></script>
|
||||||
|
<script src="stack.v1.js"></script>
|
||||||
|
<script>
|
||||||
|
|
||||||
|
var mystack = stack()
|
||||||
|
.on("activate", activate)
|
||||||
|
.on("deactivate", deactivate);
|
||||||
|
|
||||||
|
var section = d3.selectAll("section"),
|
||||||
|
lorenz = d3.select("#lorenz"),
|
||||||
|
lorenzIndex = section[0].indexOf(lorenz.node());
|
||||||
|
|
||||||
|
function activate(d, i) {
|
||||||
|
if (i === lorenzIndex) startLorenz();
|
||||||
|
}
|
||||||
|
|
||||||
|
function deactivate(d, i) {
|
||||||
|
if (i === lorenzIndex) stopLorenz();
|
||||||
|
}
|
||||||
|
|
||||||
|
var lorenzInterval;
|
||||||
|
|
||||||
|
function startLorenz() {
|
||||||
|
var δτ = 0.003,
|
||||||
|
ρ = 28,
|
||||||
|
σ = 10,
|
||||||
|
β = 8 / 3,
|
||||||
|
x = .5,
|
||||||
|
y = .5,
|
||||||
|
z = 10,
|
||||||
|
n = 30;
|
||||||
|
|
||||||
|
var width = 1280,
|
||||||
|
height = 720;
|
||||||
|
|
||||||
|
var canvas = d3.select("canvas")
|
||||||
|
.style("position", "absolute")
|
||||||
|
.style("top", 0)
|
||||||
|
.style("left", 0)
|
||||||
|
.style("width", "100%")
|
||||||
|
.style("height", "100%")
|
||||||
|
.attr("width", width)
|
||||||
|
.attr("height", height);
|
||||||
|
|
||||||
|
var color = d3.scale.linear()
|
||||||
|
.domain([0, 20, 30, 50])
|
||||||
|
.range(["yellow", "orange", "brown", "purple"])
|
||||||
|
.interpolate(d3.interpolateHcl);
|
||||||
|
|
||||||
|
var context = canvas.node().getContext("2d");
|
||||||
|
|
||||||
|
context.lineWidth = .2;
|
||||||
|
context.fillStyle = "rgba(0,0,0,.03)";
|
||||||
|
|
||||||
|
d3.timer(function() {
|
||||||
|
context.save();
|
||||||
|
context.globalCompositeOperation = "lighter";
|
||||||
|
context.translate(width / 2, height / 2);
|
||||||
|
context.scale(12, 14);
|
||||||
|
context.rotate(30);
|
||||||
|
for (var i = 0; i < n; ++i) {
|
||||||
|
context.strokeStyle = color(z);
|
||||||
|
context.beginPath();
|
||||||
|
context.moveTo(x, y);
|
||||||
|
x += δτ * σ * (y - x);
|
||||||
|
y += δτ * (x * (ρ - z) - y);
|
||||||
|
z += δτ * (x * y - β * z);
|
||||||
|
context.lineTo(x, y);
|
||||||
|
context.stroke();
|
||||||
|
}
|
||||||
|
context.restore();
|
||||||
|
return !lorenzInterval;
|
||||||
|
});
|
||||||
|
|
||||||
|
lorenzInterval = setInterval(function() {
|
||||||
|
context.fillRect(0, 0, width, height);
|
||||||
|
}, 100);
|
||||||
|
}
|
||||||
|
|
||||||
|
function stopLorenz() {
|
||||||
|
lorenzInterval = clearInterval(lorenzInterval);
|
||||||
|
}
|
||||||
|
|
||||||
|
</script>
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
migrate-d8-great/katrina-wrecked-house.jpg
Normal file
After Width: | Height: | Size: 289 KiB |
BIN
migrate-d8-great/loggerhead_turtles_migration_282.jpg
Normal file
After Width: | Height: | Size: 42 KiB |
BIN
migrate-d8-great/migrate-core-screenshot-2016-06-25.png
Normal file
After Width: | Height: | Size: 17 KiB |
After Width: | Height: | Size: 22 KiB |
BIN
migrate-d8-great/migrate-plus-releases-screenshot-2016-09-25.png
Normal file
After Width: | Height: | Size: 40 KiB |
BIN
migrate-d8-great/missing-filter-plugins.png
Normal file
After Width: | Height: | Size: 63 KiB |
BIN
migrate-d8-great/ralph-kimball-etl-data-warehouse.png
Normal file
After Width: | Height: | Size: 430 KiB |
BIN
migrate-d8-great/running-upgrade-screen.png
Normal file
After Width: | Height: | Size: 76 KiB |
BIN
migrate-d8-great/sadwomanbench.jpg
Normal file
After Width: | Height: | Size: 25 KiB |
After Width: | Height: | Size: 220 KiB |
BIN
migrate-d8-great/sandhill-cranes01.jpg
Normal file
After Width: | Height: | Size: 228 KiB |
After Width: | Height: | Size: 1.5 MiB |
BIN
migrate-d8-great/sql-select-count-node-type.png
Normal file
After Width: | Height: | Size: 29 KiB |
55
migrate-d8-great/stack.v0.css
Normal file
|
@ -0,0 +1,55 @@
|
||||||
|
body {
|
||||||
|
background: #929292;
|
||||||
|
font-family: "Helvetica Neue";
|
||||||
|
margin: auto;
|
||||||
|
width: 1280px;
|
||||||
|
}
|
||||||
|
|
||||||
|
a {
|
||||||
|
color: #6baed6;
|
||||||
|
}
|
||||||
|
|
||||||
|
a:not(:hover) {
|
||||||
|
text-decoration: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stack {
|
||||||
|
background: #222 url(cartographer.png);
|
||||||
|
color: #fff;
|
||||||
|
box-sizing: border-box;
|
||||||
|
-moz-box-sizing: border-box;
|
||||||
|
-webkit-box-sizing: border-box;
|
||||||
|
-ms-box-sizing: border-box;
|
||||||
|
-o-box-sizing: border-box;
|
||||||
|
display: none;
|
||||||
|
font-size: 48px;
|
||||||
|
height: 800px;
|
||||||
|
padding: 160px 80px;
|
||||||
|
width: 1280px;
|
||||||
|
-webkit-transform: translate3d(0,0,0);
|
||||||
|
}
|
||||||
|
|
||||||
|
.active {
|
||||||
|
box-shadow: 0px 4px 8px rgba(0,0,0,.5);
|
||||||
|
display: block;
|
||||||
|
position: fixed;
|
||||||
|
}
|
||||||
|
|
||||||
|
.grey {
|
||||||
|
color: #969696;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media
|
||||||
|
screen and (max-device-width: 1024px) {
|
||||||
|
body {
|
||||||
|
width: 1200px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stack {
|
||||||
|
margin: 40px 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.stack {
|
||||||
|
display: block;
|
||||||
|
}
|
||||||
|
}
|
219
migrate-d8-great/stack.v0.js
Normal file
|
@ -0,0 +1,219 @@
|
||||||
|
var stack = (function() {
|
||||||
|
var stack = {},
|
||||||
|
event = d3.dispatch("activate", "deactivate"),
|
||||||
|
section = d3.selectAll("section"),
|
||||||
|
self = d3.select(window),
|
||||||
|
body = document.body,
|
||||||
|
root = document.documentElement,
|
||||||
|
timeout,
|
||||||
|
duration = 250,
|
||||||
|
ease = "cubic-in-out",
|
||||||
|
screenY,
|
||||||
|
size,
|
||||||
|
yActual,
|
||||||
|
yFloor,
|
||||||
|
yTarget,
|
||||||
|
yActive = -1,
|
||||||
|
yMax,
|
||||||
|
yOffset,
|
||||||
|
n = section[0].length;
|
||||||
|
|
||||||
|
// Invert the z-index so the earliest slides are on top.
|
||||||
|
section.classed("stack", true).style("z-index", function(d, i) { return n - i; });
|
||||||
|
|
||||||
|
// Detect the slide height (by showing an active slide).
|
||||||
|
section.classed("active", true);
|
||||||
|
size = section.node().getBoundingClientRect().height;
|
||||||
|
section.classed("active", false);
|
||||||
|
|
||||||
|
// Sets the stack position.
|
||||||
|
stack.position = function(y1) {
|
||||||
|
var y0 = body.scrollTop / size;
|
||||||
|
if (arguments.length < 1) return y0;
|
||||||
|
|
||||||
|
// clamp and round
|
||||||
|
if (y1 >= n) y1 = n - 1;
|
||||||
|
else if (y1 < 0) y1 = Math.max(0, n + y1);
|
||||||
|
y1 = Math.floor(y1);
|
||||||
|
|
||||||
|
if (y0 - y1) {
|
||||||
|
self.on("scroll.stack", null);
|
||||||
|
leap(y1);
|
||||||
|
d3.select(body).transition()
|
||||||
|
.duration(duration)
|
||||||
|
.ease(ease)
|
||||||
|
.tween("scrollTop", tween(yTarget = y1))
|
||||||
|
.each("end", function() { yTarget = null; self.on("scroll.stack", scroll); });
|
||||||
|
}
|
||||||
|
|
||||||
|
location.replace("#" + y1);
|
||||||
|
|
||||||
|
return stack;
|
||||||
|
};
|
||||||
|
|
||||||
|
// Don't do anything fancy for iOS.
|
||||||
|
if (section.style("display") == "block") return;
|
||||||
|
|
||||||
|
self
|
||||||
|
.on("keydown.stack", keydown)
|
||||||
|
.on("resize.stack", resize)
|
||||||
|
.on("scroll.stack", scroll)
|
||||||
|
.on("mousemove.stack", snap)
|
||||||
|
.on("hashchange.stack", hashchange);
|
||||||
|
|
||||||
|
resize();
|
||||||
|
hashchange();
|
||||||
|
scroll();
|
||||||
|
|
||||||
|
// if scrolling up, jump to edge of previous slide
|
||||||
|
function leap(yNew) {
|
||||||
|
if ((yActual < n - 1) && (yActual == yFloor) && (yNew < yActual)) {
|
||||||
|
yActual -= .5 - yOffset / size / 2;
|
||||||
|
scrollTo(0, yActual * size);
|
||||||
|
reactivate();
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function reactivate() {
|
||||||
|
var yNewActive = Math.floor(yActual) + (yActual % 1 ? .5 : 0);
|
||||||
|
if (yNewActive !== yActive) {
|
||||||
|
var yNewActives = {};
|
||||||
|
yNewActives[Math.floor(yNewActive)] = 1;
|
||||||
|
yNewActives[Math.ceil(yNewActive)] = 1;
|
||||||
|
if (yActive >= 0) {
|
||||||
|
var yOldActives = {};
|
||||||
|
yOldActives[Math.floor(yActive)] = 1;
|
||||||
|
yOldActives[Math.ceil(yActive)] = 1;
|
||||||
|
for (var i in yOldActives) {
|
||||||
|
if (i in yNewActives) delete yNewActives[i];
|
||||||
|
else event.deactivate.call(section[0][+i], +i);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (var i in yNewActives) {
|
||||||
|
event.activate.call(section[0][+i], +i);
|
||||||
|
}
|
||||||
|
yActive = yNewActive;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function resize() {
|
||||||
|
yOffset = (window.innerHeight - size) / 2;
|
||||||
|
yMax = 1 + yOffset / size;
|
||||||
|
|
||||||
|
d3.select(body)
|
||||||
|
.style("margin-top", yOffset + "px")
|
||||||
|
.style("margin-bottom", yOffset + "px")
|
||||||
|
.style("height", (n - .5) * size + yOffset + "px");
|
||||||
|
}
|
||||||
|
|
||||||
|
function hashchange() {
|
||||||
|
var hash = +location.hash.slice(1);
|
||||||
|
if (!isNaN(hash) && hash !== yFloor) stack.position(hash);
|
||||||
|
}
|
||||||
|
|
||||||
|
function keydown() {
|
||||||
|
var delta;
|
||||||
|
switch (d3.event.keyCode) {
|
||||||
|
case 39: // right arrow
|
||||||
|
if (d3.event.metaKey) return;
|
||||||
|
case 40: // down arrow
|
||||||
|
case 34: // page down
|
||||||
|
delta = d3.event.metaKey ? Infinity : 1; break;
|
||||||
|
case 37: // left arrow
|
||||||
|
if (d3.event.metaKey) return;
|
||||||
|
case 38: // up arrow
|
||||||
|
case 33: // page up
|
||||||
|
delta = d3.event.metaKey ? -Infinity : -1; break;
|
||||||
|
case 32: // space
|
||||||
|
delta = d3.event.shiftKey ? -1 : 1;
|
||||||
|
break;
|
||||||
|
default: return;
|
||||||
|
}
|
||||||
|
if (timeout) timeout = clearTimeout(timeout);
|
||||||
|
if (yTarget == null) yTarget = (delta > 0 ? Math.floor : Math.ceil)(yActual == yFloor ? yFloor : yActual + (.5 - yOffset / size / 2));
|
||||||
|
stack.position(yTarget = Math.max(0, Math.min(n - 1, yTarget + delta)));
|
||||||
|
d3.event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
function scroll() {
|
||||||
|
// Detect whether to scroll with documentElement or body.
|
||||||
|
if (body !== root && root.scrollTop) body = root;
|
||||||
|
|
||||||
|
var yNew = Math.max(0, body.scrollTop / size);
|
||||||
|
if (yNew >= n - 1.51 + yOffset / size) yNew = n - 1;
|
||||||
|
|
||||||
|
// if scrolling up, jump to edge of previous slide
|
||||||
|
if (leap(yNew)) return;
|
||||||
|
|
||||||
|
var yNewFloor = Math.max(0, Math.floor(yActual = yNew)),
|
||||||
|
yError = Math.min(yMax, (yActual % 1) * 2);
|
||||||
|
|
||||||
|
if (yFloor != yNewFloor) {
|
||||||
|
location.replace("#" + yNewFloor);
|
||||||
|
yFloor = yNewFloor;
|
||||||
|
}
|
||||||
|
|
||||||
|
section
|
||||||
|
.classed("active", false);
|
||||||
|
|
||||||
|
d3.select(section[0][yFloor])
|
||||||
|
.style("-webkit-transform", yError ? "translate3d(0," + (-yError * size) + "px,0)" : null)
|
||||||
|
.style("-o-transform", yError ? "translate(0," + (-yError * size) + "px)" : null)
|
||||||
|
.style("-moz-transform", yError ? "translate(0," + (-yError * size) + "px)" : null)
|
||||||
|
.style("transform", yError ? "translate(0," + (-yError * size) + "px)" : null)
|
||||||
|
.classed("active", yError != yMax);
|
||||||
|
|
||||||
|
d3.select(section[0][yFloor + 1])
|
||||||
|
.style("-webkit-transform", yError ? "translate3d(0,0,0)" : null)
|
||||||
|
.style("-o-transform", yError ? "translate(0,0)" : null)
|
||||||
|
.style("-moz-transform", yError ? "translate(0,0)" : null)
|
||||||
|
.style("transform", yError ? "translate(0,0)" : null)
|
||||||
|
.classed("active", yError > 0);
|
||||||
|
|
||||||
|
reactivate();
|
||||||
|
}
|
||||||
|
|
||||||
|
function snap() {
|
||||||
|
var y = d3.event.clientY;
|
||||||
|
if (y === screenY) return; // ignore move on scroll
|
||||||
|
screenY = y;
|
||||||
|
|
||||||
|
if (yTarget != null) return; // don't snap if already snapping
|
||||||
|
|
||||||
|
var y0 = stack.position(),
|
||||||
|
y1 = Math.max(0, Math.round(y0 + .25));
|
||||||
|
|
||||||
|
// if we're before the first slide, or after the last slide, do nothing
|
||||||
|
if (y0 <= 0 || y0 >= n - 1.51 + yOffset / size) return;
|
||||||
|
|
||||||
|
// if the previous slide is not visible, immediate jump
|
||||||
|
if (y1 > y0 && y1 - y0 < .5 - yOffset / size) scrollTo(0, y1 * size);
|
||||||
|
|
||||||
|
// else transition
|
||||||
|
else if (y1 !== y0) stack.position(y1);
|
||||||
|
}
|
||||||
|
|
||||||
|
function tween(y) {
|
||||||
|
return function() {
|
||||||
|
var i = d3.interpolateNumber(this.scrollTop, y * size);
|
||||||
|
return function(t) { scrollTo(0, i(t)); scroll(); };
|
||||||
|
};
|
||||||
|
}
|
||||||
|
|
||||||
|
stack.duration = function(_) {
|
||||||
|
if (!arguments.length) return duration;
|
||||||
|
duration = _;
|
||||||
|
return stack;
|
||||||
|
};
|
||||||
|
|
||||||
|
stack.ease = function(_) {
|
||||||
|
if (!arguments.length) return ease;
|
||||||
|
ease = _;
|
||||||
|
return stack;
|
||||||
|
};
|
||||||
|
|
||||||
|
d3.rebind(stack, event, "on");
|
||||||
|
|
||||||
|
return stack;
|
||||||
|
})();
|
1
migrate-d8-great/stack.v0.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
var stack=function(){function t(t){return K-1>d&&d==f&&d>t?(d-=.5-m/u/2,scrollTo(0,d*u),e(),!0):void 0}function e(){var t=Math.floor(d)+(d%1?.5:0);if(t!==T){var e={};if(e[Math.floor(t)]=1,e[Math.ceil(t)]=1,T>=0){var n={};n[Math.floor(T)]=1,n[Math.ceil(T)]=1;for(var a in n)a in e?delete e[a]:y.deactivate.call(k[0][+a],+a)}for(var a in e)y.activate.call(k[0][+a],+a);T=t}}function n(){m=(window.innerHeight-u)/2,v=1+m/u,d3.select(g).style("margin-top",m+"px").style("margin-bottom",m+"px").style("height",(K-.5)*u+m+"px")}function a(){var t=+location.hash.slice(1);isNaN(t)||t===f||p.position(t)}function l(){var t;switch(d3.event.keyCode){case 39:if(d3.event.metaKey)return;case 40:case 34:t=d3.event.metaKey?1/0:1;break;case 37:if(d3.event.metaKey)return;case 38:case 33:t=d3.event.metaKey?-1/0:-1;break;case 32:t=d3.event.shiftKey?-1:1;break;default:return}c&&(c=clearTimeout(c)),null==h&&(h=(t>0?Math.floor:Math.ceil)(d==f?f:d+(.5-m/u/2))),p.position(h=Math.max(0,Math.min(K-1,h+t))),d3.event.preventDefault()}function o(){g!==x&&x.scrollTop&&(g=x);var n=Math.max(0,g.scrollTop/u);if(n>=K-1.51+m/u&&(n=K-1),!t(n)){var a=Math.max(0,Math.floor(d=n)),l=Math.min(v,2*(d%1));f!=a&&(location.replace("#"+a),f=a),k.classed("active",!1),d3.select(k[0][f]).style("-webkit-transform",l?"translate3d(0,"+-l*u+"px,0)":null).style("-o-transform",l?"translate(0,"+-l*u+"px)":null).style("-moz-transform",l?"translate(0,"+-l*u+"px)":null).style("transform",l?"translate(0,"+-l*u+"px)":null).classed("active",l!=v),d3.select(k[0][f+1]).style("-webkit-transform",l?"translate3d(0,0,0)":null).style("-o-transform",l?"translate(0,0)":null).style("-moz-transform",l?"translate(0,0)":null).style("transform",l?"translate(0,0)":null).classed("active",l>0),e()}}function r(){var t=d3.event.clientY;if(t!==i&&(i=t,null==h)){var e=p.position(),n=Math.max(0,Math.round(e+.25));0>=e||e>=K-1.51+m/u||(n>e&&.5-m/u>n-e?scrollTo(0,n*u):n!==e&&p.position(n))}}function s(t){return function(){var e=d3.interpolateNumber(this.scrollTop,t*u);return function(t){scrollTo(0,e(t)),o()}}}var c,i,u,d,f,h,v,m,p={},y=d3.dispatch("activate","deactivate"),k=d3.selectAll("section"),M=d3.select(window),g=document.body,x=document.documentElement,b=250,w="cubic-in-out",T=-1,K=k[0].length;return k.classed("stack",!0).style("z-index",function(t,e){return K-e}),k.classed("active",!0),u=k.node().getBoundingClientRect().height,k.classed("active",!1),p.position=function(e){var n=g.scrollTop/u;return arguments.length<1?n:(e>=K?e=K-1:0>e&&(e=Math.max(0,K+e)),e=Math.floor(e),n-e&&(M.on("scroll.stack",null),t(e),d3.select(g).transition().duration(b).ease(w).tween("scrollTop",s(h=e)).each("end",function(){h=null,M.on("scroll.stack",o)})),location.replace("#"+e),p)},k.style("display")!="block"?(M.on("keydown.stack",l).on("resize.stack",n).on("scroll.stack",o).on("mousemove.stack",r).on("hashchange.stack",a),n(),a(),o(),p.duration=function(t){return arguments.length?(b=t,p):b},p.ease=function(t){return arguments.length?(w=t,p):w},d3.rebind(p,y,"on"),p):void 0}();
|
231
migrate-d8-great/stack.v1.js
Normal file
|
@ -0,0 +1,231 @@
|
||||||
|
function stack() {
|
||||||
|
var stack = {},
|
||||||
|
size = [1280, 720],
|
||||||
|
fontSize = 32,
|
||||||
|
sectionHeight,
|
||||||
|
windowHeight,
|
||||||
|
dispatch = d3.dispatch("scroll", "activate", "deactivate"),
|
||||||
|
touchy = "ontouchstart" in document,
|
||||||
|
resize = touchy ? resizeTouchy : resizeNoTouchy,
|
||||||
|
i = NaN,
|
||||||
|
y = 0,
|
||||||
|
yt,
|
||||||
|
scrollRatio = 1 / 6;
|
||||||
|
|
||||||
|
var section = d3.selectAll("section")
|
||||||
|
.style("box-sizing", "border-box")
|
||||||
|
.each(initialize);
|
||||||
|
|
||||||
|
var n = section.size();
|
||||||
|
|
||||||
|
var body = d3.select("body")
|
||||||
|
.style("margin", 0)
|
||||||
|
.style("padding", 0)
|
||||||
|
.style("background", "#333");
|
||||||
|
|
||||||
|
if (touchy) {
|
||||||
|
section
|
||||||
|
.style("position", "relative");
|
||||||
|
|
||||||
|
d3.select(window)
|
||||||
|
.on("resize.stack", resize)
|
||||||
|
.each(resize);
|
||||||
|
} else {
|
||||||
|
var background = d3.select("body").insert("div", "section")
|
||||||
|
.style("background", "#000")
|
||||||
|
.style("box-shadow", "0 8px 16px rgba(0,0,0,.3)")
|
||||||
|
.style("padding", "1px 0")
|
||||||
|
.style("margin-top", "-1px")
|
||||||
|
.style("z-index", 0);
|
||||||
|
|
||||||
|
section
|
||||||
|
.style("display", "none")
|
||||||
|
.style("opacity", 0)
|
||||||
|
.style("z-index", 0);
|
||||||
|
|
||||||
|
var sectionAndBackground = d3.selectAll(section[0].concat(background.node()))
|
||||||
|
.style("position", "fixed")
|
||||||
|
.style("left", 0)
|
||||||
|
.style("top", 0)
|
||||||
|
.style("width", "100%");
|
||||||
|
|
||||||
|
var indicator = d3.select("body").append("div")
|
||||||
|
.attr("class", "indicator")
|
||||||
|
.selectAll("div")
|
||||||
|
.data(d3.range(section.size()))
|
||||||
|
.enter().append("div")
|
||||||
|
.style("position", "absolute")
|
||||||
|
.style("z-index", 10)
|
||||||
|
.style("left", 0)
|
||||||
|
.style("width", "3px")
|
||||||
|
.style("background", "linear-gradient(to top,black,white)");
|
||||||
|
|
||||||
|
var sectionPrevious = d3.select(null),
|
||||||
|
sectionCurrent = d3.select(section[0][0]),
|
||||||
|
sectionNext = d3.select(section[0][1]);
|
||||||
|
|
||||||
|
d3.select(window)
|
||||||
|
.on("resize.stack", resize)
|
||||||
|
.on("scroll.stack", reposition)
|
||||||
|
.on("keydown.stack", keydown)
|
||||||
|
.each(resize);
|
||||||
|
|
||||||
|
d3.timer(function() {
|
||||||
|
reposition();
|
||||||
|
return true;
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function dispatchEvent(event, i) {
|
||||||
|
var target = section[0][i], sourceEvent = event.sourceEvent = d3.event;
|
||||||
|
try {
|
||||||
|
d3.event = event;
|
||||||
|
dispatch[event.type].call(target, target.__data__, i);
|
||||||
|
} finally {
|
||||||
|
d3.event = sourceEvent;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function initialize(d, i) {
|
||||||
|
this.__stack__ = {index: i, active: false};
|
||||||
|
}
|
||||||
|
|
||||||
|
function activate() {
|
||||||
|
if (!this.__stack__.active) {
|
||||||
|
this.__stack__.active = true;
|
||||||
|
dispatchEvent({type: "activate"}, this.__stack__.index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function deactivate() {
|
||||||
|
if (this.__stack__.active) {
|
||||||
|
this.__stack__.active = false;
|
||||||
|
dispatchEvent({type: "deactivate"}, this.__stack__.index);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function resizeTouchy() {
|
||||||
|
var marginBottom = 20;
|
||||||
|
|
||||||
|
sectionHeight = size[1] / size[0] * innerWidth;
|
||||||
|
windowHeight = innerHeight;
|
||||||
|
|
||||||
|
section
|
||||||
|
.style("height", sectionHeight + "px")
|
||||||
|
.style("box-shadow", "0 4px 4px rgba(0,0,0,.3)")
|
||||||
|
.filter(function(d, i) { return i < n - 1; })
|
||||||
|
.style("margin-bottom", marginBottom + "px");
|
||||||
|
|
||||||
|
body
|
||||||
|
.style("font-size", innerWidth / size[0] * fontSize + "px");
|
||||||
|
}
|
||||||
|
|
||||||
|
function resizeNoTouchy() {
|
||||||
|
if (sectionHeight) var y0 = y;
|
||||||
|
|
||||||
|
sectionHeight = size[1] / size[0] * innerWidth;
|
||||||
|
windowHeight = innerHeight;
|
||||||
|
|
||||||
|
sectionAndBackground
|
||||||
|
.style("top", (windowHeight - sectionHeight) / 2 + "px")
|
||||||
|
.style("height", sectionHeight + "px");
|
||||||
|
|
||||||
|
indicator
|
||||||
|
.style("top", function(i) { return (i + (1 - scrollRatio) / 2) * windowHeight + "px"; })
|
||||||
|
.style("height", windowHeight * scrollRatio + "px");
|
||||||
|
|
||||||
|
body
|
||||||
|
.style("font-size", innerWidth / size[0] * fontSize + "px")
|
||||||
|
.style("height", windowHeight * n + "px");
|
||||||
|
|
||||||
|
// Preserve the current scroll position on resize.
|
||||||
|
if (!isNaN(y0)) scrollTo(0, (y = y0) * windowHeight);
|
||||||
|
}
|
||||||
|
|
||||||
|
function reposition() {
|
||||||
|
var y1 = pageYOffset / windowHeight,
|
||||||
|
i1 = Math.max(0, Math.min(n - 1, Math.floor(y1 + (1 + scrollRatio) / 2)));
|
||||||
|
|
||||||
|
if (i !== i1) {
|
||||||
|
if (i1 === i + 1) { // advance one
|
||||||
|
sectionPrevious.interrupt().style("display", "none").style("opacity", 0).style("z-index", 0).each(deactivate);
|
||||||
|
sectionPrevious = sectionCurrent.interrupt().style("opacity", 1).style("z-index", 1);
|
||||||
|
sectionPrevious.transition().each("end", deactivate);
|
||||||
|
sectionCurrent = sectionNext.interrupt().style("opacity", 0).style("z-index", 2).each(activate);
|
||||||
|
sectionCurrent.transition().style("opacity", 1);
|
||||||
|
sectionNext = d3.select(section[0][i1 + 1]).interrupt().style("display", "block").style("opacity", 0).style("z-index", 0);
|
||||||
|
} else if (i1 === i - 1) { // rewind one
|
||||||
|
sectionNext.interrupt().style("display", "none").style("opacity", 0).style("z-index", 0).each(deactivate);
|
||||||
|
sectionNext = sectionCurrent.interrupt().style("opacity", 1).style("z-index", 1);
|
||||||
|
sectionNext.transition().each("end", deactivate);
|
||||||
|
sectionCurrent = sectionPrevious.interrupt().style("opacity", 0).style("z-index", 2).each(activate);
|
||||||
|
sectionCurrent.transition().style("opacity", 1);
|
||||||
|
sectionPrevious = d3.select(section[0][i1 - 1]).interrupt().style("display", "block").style("opacity", 0).style("z-index", 0);
|
||||||
|
} else { // skip
|
||||||
|
sectionPrevious.interrupt().style("display", "none").style("opacity", 0).style("z-index", 0).each(deactivate);
|
||||||
|
sectionCurrent.interrupt().style("display", "none").style("opacity", 0).style("z-index", 0).each(deactivate);
|
||||||
|
sectionNext.interrupt().style("display", "none").style("opacity", 0).style("z-index", 0).each(deactivate);
|
||||||
|
sectionPrevious = d3.select(section[0][i1 - 1]).interrupt().style("display", "block").style("opacity", 0).style("z-index", 0).each(deactivate);
|
||||||
|
sectionCurrent = d3.select(section[0][i1]).interrupt().style("display", "block").style("opacity", 1).style("z-index", 2).each(activate);
|
||||||
|
sectionNext = d3.select(section[0][i1 + 1]).interrupt().style("display", "block").style("opacity", 0).style("z-index", 0).each(deactivate);
|
||||||
|
}
|
||||||
|
i = i1;
|
||||||
|
}
|
||||||
|
|
||||||
|
dispatchEvent({type: "scroll", offset: y = y1}, i);
|
||||||
|
}
|
||||||
|
|
||||||
|
function keydown() {
|
||||||
|
var delta;
|
||||||
|
switch (d3.event.keyCode) {
|
||||||
|
case 39: // right arrow
|
||||||
|
if (d3.event.metaKey) return;
|
||||||
|
case 40: // down arrow
|
||||||
|
case 34: // page down
|
||||||
|
delta = d3.event.metaKey ? Infinity : 1; break;
|
||||||
|
case 37: // left arrow
|
||||||
|
if (d3.event.metaKey) return;
|
||||||
|
case 38: // up arrow
|
||||||
|
case 33: // page up
|
||||||
|
delta = d3.event.metaKey ? -Infinity : -1; break;
|
||||||
|
case 32: // space
|
||||||
|
delta = d3.event.shiftKey ? -1 : 1;
|
||||||
|
break;
|
||||||
|
default: return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var y0 = isNaN(yt) ? y : yt;
|
||||||
|
|
||||||
|
yt = Math.max(0, Math.min(n - 1, (delta > 0
|
||||||
|
? Math.floor(y0 + (1 + scrollRatio) / 2)
|
||||||
|
: Math.ceil(y0 - (1 - scrollRatio) / 2)) + delta));
|
||||||
|
|
||||||
|
d3.select(document.documentElement)
|
||||||
|
.interrupt()
|
||||||
|
.transition()
|
||||||
|
.duration(500)
|
||||||
|
.tween("scroll", function() {
|
||||||
|
var i = d3.interpolateNumber(pageYOffset, yt * windowHeight);
|
||||||
|
return function(t) { scrollTo(0, i(t)); };
|
||||||
|
})
|
||||||
|
.each("end", function() { yt = NaN; });
|
||||||
|
|
||||||
|
d3.event.preventDefault();
|
||||||
|
}
|
||||||
|
|
||||||
|
stack.size = function(_) {
|
||||||
|
return arguments.length ? (size = [+_[0], +_[1]], resize(), stack) : size;
|
||||||
|
};
|
||||||
|
|
||||||
|
stack.scrollRatio = function(_) {
|
||||||
|
return arguments.length ? (scrollRatio = +_, resize(), stack) : scrollRatio;
|
||||||
|
};
|
||||||
|
|
||||||
|
stack.fontSize = function(_) {
|
||||||
|
return arguments.length ? (fontSize = +_, resize(), stack) : fontSize;
|
||||||
|
};
|
||||||
|
|
||||||
|
d3.rebind(stack, dispatch, "on");
|
||||||
|
|
||||||
|
return stack;
|
||||||
|
}
|
1
migrate-d8-great/stack.v1.min.js
vendored
Normal file
|
@ -0,0 +1 @@
|
||||||
|
function stack(){function e(e,t){var n=b[0][t],i=e.sourceEvent=d3.event;try{d3.event=e,h[e.type].call(n,n.__data__,t)}finally{d3.event=i}}function t(e,t){this.__stack__={index:t,active:!1}}function n(){this.__stack__.active||(this.__stack__.active=!0,e({type:"activate"},this.__stack__.index))}function i(){this.__stack__.active&&(this.__stack__.active=!1,e({type:"deactivate"},this.__stack__.index))}function s(){var e=20;o=p[1]/p[0]*innerWidth,r=innerHeight,b.style("height",o+"px").style("box-shadow","0 4px 4px rgba(0,0,0,.3)").filter(function(e,t){return k-1>t}).style("margin-bottom",e+"px"),z.style("font-size",innerWidth/p[0]*u+"px")}function l(){if(o)var e=_;o=p[1]/p[0]*innerWidth,r=innerHeight,w.style("top",(r-o)/2+"px").style("height",o+"px"),M.style("top",function(e){return(e+(1-g)/2)*r+"px"}).style("height",r*g+"px"),z.style("font-size",innerWidth/p[0]*u+"px").style("height",r*k+"px"),isNaN(e)||scrollTo(0,(_=e)*r)}function a(){var t=pageYOffset/r,s=Math.max(0,Math.min(k-1,Math.floor(t+(1+g)/2)));v!==s&&(s===v+1?(K.interrupt().style("display","none").style("opacity",0).style("z-index",0).each(i),K=N.interrupt().style("opacity",1).style("z-index",1),K.transition().each("end",i),N=W.interrupt().style("opacity",0).style("z-index",2).each(n),N.transition().style("opacity",1),W=d3.select(b[0][s+1]).interrupt().style("display","block").style("opacity",0).style("z-index",0)):s===v-1?(W.interrupt().style("display","none").style("opacity",0).style("z-index",0).each(i),W=N.interrupt().style("opacity",1).style("z-index",1),W.transition().each("end",i),N=K.interrupt().style("opacity",0).style("z-index",2).each(n),N.transition().style("opacity",1),K=d3.select(b[0][s-1]).interrupt().style("display","block").style("opacity",0).style("z-index",0)):(K.interrupt().style("display","none").style("opacity",0).style("z-index",0).each(i),N.interrupt().style("display","none").style("opacity",0).style("z-index",0).each(i),W.interrupt().style("display","none").style("opacity",0).style("z-index",0).each(i),K=d3.select(b[0][s-1]).interrupt().style("display","block").style("opacity",0).style("z-index",0).each(i),N=d3.select(b[0][s]).interrupt().style("display","block").style("opacity",1).style("z-index",2).each(n),W=d3.select(b[0][s+1]).interrupt().style("display","block").style("opacity",0).style("z-index",0).each(i)),v=s),e({type:"scroll",offset:_=t},v)}function c(){var e;switch(d3.event.keyCode){case 39:if(d3.event.metaKey)return;case 40:case 34:e=d3.event.metaKey?1/0:1;break;case 37:if(d3.event.metaKey)return;case 38:case 33:e=d3.event.metaKey?-1/0:-1;break;case 32:e=d3.event.shiftKey?-1:1;break;default:return}var t=isNaN(y)?_:y;y=Math.max(0,Math.min(k-1,(e>0?Math.floor(t+(1+g)/2):Math.ceil(t-(1-g)/2))+e)),d3.select(document.documentElement).interrupt().transition().duration(500).tween("scroll",function(){var e=d3.interpolateNumber(pageYOffset,y*r);return function(t){scrollTo(0,e(t))}}).each("end",function(){y=0/0}),d3.event.preventDefault()}var o,r,y,d={},p=[1280,720],u=32,h=d3.dispatch("scroll","activate","deactivate"),x="ontouchstart"in document,f=x?s:l,v=0/0,_=0,g=1/6,b=d3.selectAll("section").style("box-sizing","border-box").style("line-height","1.35em").each(t),k=b.size(),z=d3.select("body").style("margin",0).style("padding",0).style("background","#333");if(x)b.style("position","relative"),d3.select(window).on("resize.stack",f).each(f);else{var m=d3.select("body").insert("div","section").style("background","#000").style("box-shadow","0 8px 16px rgba(0,0,0,.3)").style("padding","1px 0").style("margin-top","-1px").style("z-index",0);b.style("display","none").style("opacity",0).style("z-index",0);var w=d3.selectAll(b[0].concat(m.node())).style("position","fixed").style("left",0).style("top",0).style("width","100%"),M=d3.select("body").append("div").attr("class","indicator").selectAll("div").data(d3.range(b.size())).enter().append("div").style("position","absolute").style("z-index",10).style("left",0).style("width","3px").style("background","linear-gradient(to top,black,white)"),K=d3.select(null),N=d3.select(b[0][0]),W=d3.select(b[0][1]);d3.select(window).on("resize.stack",f).on("scroll.stack",a).on("keydown.stack",c).each(f),d3.timer(function(){return a(),!0})}return d.size=function(e){return arguments.length?(p=[+e[0],+e[1]],f(),d):p},d.scrollRatio=function(e){return arguments.length?(g=+e,f(),d):g},d.fontSize=function(e){return arguments.length?(u=+e,f(),d):u},d3.rebind(d,h,"on"),d}
|
After Width: | Height: | Size: 3.3 KiB |
BIN
migrate-d8-great/tcdrupal-badge-character-encoding.jpg
Normal file
After Width: | Height: | Size: 1.4 MiB |
BIN
migrate-d8-great/turtle-in-sand.png
Normal file
After Width: | Height: | Size: 453 KiB |
BIN
migrate-d8-great/update-status-vocabulary.png
Normal file
After Width: | Height: | Size: 12 KiB |
BIN
migrate-d8-great/upgrade-database-settings-php-drupal_6.png
Normal file
After Width: | Height: | Size: 17 KiB |
BIN
migrate-d8-great/upgrade-database-settings-php.png
Normal file
After Width: | Height: | Size: 17 KiB |