-
Notifications
You must be signed in to change notification settings - Fork 16
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
Sample migration from v1.1 to v1.2 #85
Comments
Find and replace `v1.1` to `v1.2` For ebiwd/EBI-Framework#85
Step 1Swap the CSS and JS URL references from v1.1 to v1.2 - <link rel="icon" type="image/x-icon" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/images/logos/EMBL-EBI/favicons/favicon.ico" />
- <link rel="icon" type="image/png" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/images/logos/EMBL-EBI/favicons/favicon-32x32.png" />
- <link rel="icon" type="image/png" sizes="192×192" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/images/logos/EMBL-EBI/favicons/android-chrome-192x192.png" /> <!-- Android (192px) -->
- <link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/images/logos/EMBL-EBI/favicons/apple-icon-114x114.png" /> <!-- For iPhone 4 Retina display (114px) -->
- <link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/images/logos/EMBL-EBI/favicons/apple-icon-72x72.png" /> <!-- For iPad (72px) -->
- <link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/images/logos/EMBL-EBI/favicons/apple-icon-144x144.png" /> <!-- For iPad retinat (144px) -->
- <link rel="apple-touch-icon-precomposed" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/images/logos/EMBL-EBI/favicons/apple-icon-57x57.png" /> <!-- For iPhone (57px) -->
- <link rel="mask-icon" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/images/logos/EMBL-EBI/favicons/safari-pinned-tab.svg" color="#ffffff" /> <!-- Safari icon for pinned tab -->
+ <link rel="icon" type="image/x-icon" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/favicon.ico" />
+ <link rel="icon" type="image/png" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/favicon-32x32.png" />
+ <link rel="icon" type="image/png" sizes="192×192" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/android-chrome-192x192.png" /> <!-- Android (192px) -->
+ <link rel="apple-touch-icon-precomposed" sizes="114x114" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/apple-icon-114x114.png" /> <!-- For iPhone 4 Retina display (114px) -->
+ <link rel="apple-touch-icon-precomposed" sizes="72x72" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/apple-icon-72x72.png" /> <!-- For iPad (72px) -->
+ <link rel="apple-touch-icon-precomposed" sizes="144x144" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/apple-icon-144x144.png" /> <!-- For iPad retinat (144px) -->
+ <link rel="apple-touch-icon-precomposed" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/apple-icon-57x57.png" /> <!-- For iPhone (57px) -->
+ <link rel="mask-icon" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/safari-pinned-tab.svg" color="#ffffff" /> <!-- Safari icon for pinned tab -->
- <meta name="msapplication-TileImage" content="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/images/logos/EMBL-EBI/favicons/mstile-144x144.png" />
+ <meta name="msapplication-TileImage" content="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/images/logos/EMBL-EBI/favicons/mstile-144x144.png" />
- <link rel="stylesheet" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/libraries/foundation-6/css/foundation.css" type="text/css" media="all" />
- <link rel="stylesheet" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/css/ebi-global.css" type="text/css" media="all" />
- <link rel="stylesheet" href="https://www.ebi.ac.uk/web_guidelines/EBI-Icon-fonts/v1.1/fonts.css" type="text/css" media="all" />
+ <link rel="stylesheet" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/libraries/foundation-6/css/foundation.css" type="text/css" media="all" />
+ <link rel="stylesheet" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/css/ebi-global.css" type="text/css" media="all" />
+ <link rel="stylesheet" href="https://www.ebi.ac.uk/web_guidelines/EBI-Icon-fonts/v1.2/fonts.css" type="text/css" media="all" />
- <link rel="stylesheet" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/css/theme-embl-petrol.css" type="text/css" media="all" />
+ <link rel="stylesheet" href="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/css/theme-embl-petrol.css" type="text/css" media="all" />
- <script defer="defer" src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/js/script.js"></script>
+ <script defer="defer" src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/js/script.js"></script>
- <script src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/libraries/foundation-6/js/foundation.js"></script>
- <script src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.1/js/foundationExtendEBI.js"></script>
+ <script src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/libraries/foundation-6/js/foundation.js"></script>
+ <script src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/js/foundationExtendEBI.js"></script> Details: ebiwd/EBI-Pattern-library@0961f2a |
Step 2Remove references to these JS files:
- <!-- All JavaScript at the bottom, except for Modernizr -->
- <script src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/libraries/modernizr/modernizr.custom.49274.js"></script>
- <script defer="defer" src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/js/cookiebanner.js"></script>
- <script defer="defer" src="https://www.ebi.ac.uk/web_guidelines/EBI-Framework/v1.2/js/foot.js"></script> Details: ebiwd/EBI-Pattern-library@6b0451f |
Step 3Move the So what was: <div id="content" role="main" class="row">
<!-- Suggested layout containers -->
<section> becomes <div id="content">
<!-- Suggested layout containers -->
<section id="main-content-area" class="row" role="main"> As a diff: - <div id="content" role="main" class="row">
+ <div id="content"> - <section>
+ <section id="main-content-area" class="row" role="main"> For now, this won't have any visible changes. Details: ebiwd/EBI-Pattern-library@97cc791 |
Step 4
<header id="masthead-black-bar" class="clearfix masthead-black-bar">
<nav class="row">
<ul id="global-nav" class="menu">
<!-- set active class as appropriate -->
<li class="home-mobile"><a href="//www.ebi.ac.uk"></a></li>
<li class="home active"><a href="//www.ebi.ac.uk">EMBL-EBI</a></li>
<li class="services"><a href="//www.ebi.ac.uk/services">Services</a></li>
<li class="research"><a href="//www.ebi.ac.uk/research">Research</a></li>
<li class="training"><a href="//www.ebi.ac.uk/training">Training</a></li>
<li class="about"><a href="//www.ebi.ac.uk/about">About us</a></li>
<li class="search">
<a href="#" data-toggle="search-global-dropdown"><span class="show-for-small-only">Search</span></a>
<div id="search-global-dropdown" class="dropdown-pane" data-dropdown data-options="closeOnClick:true;">
<!-- The dropdown menu will be programatically added by script.js -->
</div>
</li>
<li class="float-right show-for-medium embl-selector">
<button class="button float-right" type="button" data-toggle="embl-dropdown">Hinxton</button>
<!-- The dropdown menu will be programatically added by script.js -->
</li>
</ul>
</nav>
</header> Don't forget to set your Your page should now begin to look more normal: Details: ebiwd/EBI-Pattern-library@94214a4 |
Step 5If you use the meta tags:
update them to
This won't have a visible effect yet. Details: ebiwd/EBI-Pattern-library@7e05742 |
Step 6Move Details: ebiwd/EBI-Pattern-library@e264002 |
Step 7We now need to make the masthead 'sticky' (if you use the stick container) and wrap and add a So what is currently: <div class="masthead row"> Becomes: <div data-sticky-container>
<div id="masthead" class="masthead" data-sticky data-sticky-on="large" data-top-anchor="main-content-area:top" data-btm-anchor="main-content-area:bottom">
<div class="masthead-inner row"> Don't forget to add the two new Your masthead should now span the full screen width and stick to the top properly, like so: Details: ebiwd/EBI-Pattern-library@fa3a711 |
Step 8Remove your old - <div data-sticky-container>
- <div id="masthead" data-sticky data-sticky-on="large" data-top-anchor="180" data-btm-anchor="300000">
<header id="masthead-black-bar" class="clearfix masthead-black-bar">
<nav class="row">
...
</nav>
</header>
- </div>
- </div> If you're setting your masthead background image or colour through the meta tags, it will now show — otherwise this won't have any visible effect. Details: ebiwd/EBI-Pattern-library@c917a85 |
Step 9You may have noticed we've been adding class names to our divs that previously only had IDs, that is the We also need to do this to the - <div id="local-footer">
+ <footer id="local-footer" class="local-footer"> - <div id="global-footer">
+ <div id="global-footer" class="global-footer"> - <nav id="global-nav-expanded" class="row">
+ <nav id="global-nav-expanded" class="row global-nav-expanded"> - <section id="ebi-footer-meta" class="row">
+ <section id="ebi-footer-meta" class="row ebi-footer-meta"> Your footer should now be styled properly. Details: ebiwd/EBI-Pattern-library@4684d0d |
Step 10If you have a This won't have a visible impact. Details: ebiwd/EBI-Pattern-library@b2cdef5 |
That's it, you should be finished now.
Again, not all of these structural changes are necessary for the look and feel of the site, but they provide a better html architecture that separates the areas of EMBL-EBI's content and your site/service's content -- which will now all be inside of The structure now follows: <body>
<header id="masthead-black-bar" class="clearfix masthead-black-bar">
<nav class="row">
<ul id="global-nav" class="menu">
EBI CONTROLLED STUFF
</ul>
</nav>
</header>
<div id="content">
<div data-sticky-container>
<header id="masthead" class="masthead" data-sticky>
<div class="masthead-inner row">
YOUR MENU AND PAGE TITLE
</div>
</header>
</div>
<footer id="main-content-area" class="row" role="main">
YOUR PAGE CONTENT
</footer>
</div>
<footer>
<div id="global-footer" class="global-footer">
EBI CONTROLLED STUFF
</div>
</footer>
</body> And here's a visualisation of the improved structure between v1.1 and v1.2: If you have questions, post them below or, if it's a question specific to your site's migration, open a new ticket. |
This issue will do a series of step-by-step diffs to migrate https://ebiwd.github.io/EBI-Pattern-library/sample-site/
Here's how it looks as v1.1:
The text was updated successfully, but these errors were encountered: