summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorwebchick2014-01-08 07:38:33 (GMT)
committerwebchick2014-01-08 07:38:33 (GMT)
commitf51f026f8b9528b0d1bf5ee70b4378d6897a5f12 (patch)
tree49299fd43d737b65c93db18117d68ccda202bf88
parentd259b5c631562a63fb8e03e7080088723ea74bad (diff)
Issue #2041793 by mortendk, rteijeiro, LewisNyman, magnify, axe312, zorp, mdrummond: Install-page.html.twig markup and CSS.
-rw-r--r--core/modules/system/templates/install-page.html.twig79
-rw-r--r--core/themes/seven/install-page.css227
-rw-r--r--core/themes/seven/install-page.html.twig69
-rw-r--r--core/themes/seven/js/mobile.install.js2
4 files changed, 227 insertions, 150 deletions
diff --git a/core/modules/system/templates/install-page.html.twig b/core/modules/system/templates/install-page.html.twig
index 52c5d8f..a462a5a 100644
--- a/core/modules/system/templates/install-page.html.twig
+++ b/core/modules/system/templates/install-page.html.twig
@@ -12,64 +12,55 @@
*/
#}
<!DOCTYPE html>
-<html lang="{{ language.langcode }}" dir="{{ language.dir }}" class="install-background">
+<html lang="{{ language.langcode }}" dir="{{ language.dir }}">
<head>
- <title>{{ head_title }}</title>
{{ head }}
+ <title>{{ head_title }}</title>
{{ styles }}
{{ scripts }}
</head>
<body class="install-page">
- <div id="page">
- <div id="header">
- {% if site_name %}
- <h1 id="site-name">
- <span>{{ site_name }}</span>
- </h1>
- {% endif %}
- {% if site_slogan %}
- <h2 class="site-slogan">{{ site_slogan }}</h2>
- {% endif %}
+ <div class="l-container">
- {% if header %}
- <div id="header-region">
- {{ header }}
- </div>
+ <header role="banner">
+ {% if site_name or site_slogan %}
+ <div class="name-and-slogan">
+ {% if site_name %}
+ <h1>{{ site_name }}</h1>
+ {% endif %}
+ {% if site_slogan %}
+ <div class="site-slogan">{{ site_slogan }}</div>
+ {% endif %}
+ </div>{# /.name-and-slogan #}
{% endif %}
+ </header>
- </div> <!-- /header -->
-
- <div id="container" class="clearfix">
-
- {% if sidebar_first %}
- <div id="sidebar-first" class="column sidebar">
- {{ sidebar_first }}
- </div> <!-- /sidebar-first -->
+ <main role="main">
+ {% if title %}
+ <h1>{{ title }}</h1>
{% endif %}
+ {{ messages }}
+ {{ content }}
+ </main>
- <div id="content" class="column">
- {% if title %}<h1 class="title" id="page-title">{{ title }}</h1>{% endif %}
- {% if messages %}{{ messages }}{% endif %}
- <div id="content-content" class="clearfix">
- {{ content }}
- </div> <!-- /content-content -->
- </div> <!-- /content -->
-
- {% if sidebar_second %}
- <div id="sidebar-second" class="column sidebar">
- {{ sidebar_second }}
- </div> <!-- /sidebar-second -->
- {% endif %}
+ {% if sidebar_first %}
+ <aside class="l-sidebar-first" role="complementary">
+ {{ sidebar_first }}
+ </aside>{# /.l-sidebar-first #}
+ {% endif %}
- </div> <!-- /container -->
+ {% if sidebar_second %}
+ <aside class="l-sidebar-second" role="complementary">
+ {{ sidebar_second }}
+ </aside>{# /.l-sidebar-second #}
+ {% endif %}
- <div id="footer-wrapper">
- <div id="footer">
- {% if footer %}{{ footer }}{% endif %}
- </div> <!-- /footer -->
- </div> <!-- /footer-wrapper -->
+ {% if footer %}
+ <footer role="contentinfo">
+ {{ footer }}
+ </footer>
+ {% endif %}
- </div> <!-- /page -->
</body>
</html>
diff --git a/core/themes/seven/install-page.css b/core/themes/seven/install-page.css
index 7533636..7981932 100644
--- a/core/themes/seven/install-page.css
+++ b/core/themes/seven/install-page.css
@@ -23,170 +23,187 @@
background-position: left top, 50% 50%;
min-height: 100%;
}
-body.install-page {
+.install-page {
background: none;
}
+.name-and-slogan h1 {
+ font-size: 2em;
+ line-height: 1.2em;
+ color: #0074bd;
+}
+
+/**
+ * Layout
+ */
+.install-page .l-container {
+ background: #fff;
+ width: auto;
+ margin-left: 1.25em;
+ margin-right: 1.25em;
+}
+.install-page .l-container:after { /* no reason for a clearfix in the markup */
+ content: "";
+ display: table;
+ clear: both;
+}
+@media all and (max-width: 48em) { /* 768px */
+ .install-page .l-container {
+ margin-top: 1.25em;
+ padding: 10px 20px 0;
+ }
+ .install-page .name-and-slogan {
+ margin: 0 0 1.45em 0;
+ }
+}
+
@media all and (min-width: 48em) { /* 768px */
html {
display: table;
}
- body {
+ .install-page {
display: table-cell;
padding: 1em 0;
vertical-align: middle;
}
- html, body {
+ html, .install-page {
margin: 0;
width: 100%;
height: 100%;
}
- body.install-page #page {
+ .install-page .l-container {
margin: 0 auto;
max-width: 770px;
width: 75%;
border-radius: 5px;
box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
+ padding: 20px 0 40px 0;
}
- body.install-page #content {
+
+ /* Positioning sidebar & content */
+ .install-page [role="main"] {
-webkit-box-sizing: border-box;
-moz-box-sizing: border-box;
box-sizing: border-box;
clear: none;
float: left;
- padding-left: 50px;
- padding-right: 50px;
+ padding-left: 3.85em;
+ padding-right: 3.85em;
width: 65%;
}
- [dir="rtl"] body.install-page #content {
+ [dir="rtl"] .install-page [role="main"] {
float: right;
}
- ul{
+ ul {
padding: 15px;
- margin: 0.25em 0 0.25em 0;
+ margin: 0.25em 0;
}
- body.install-page #sidebar-first {
+ .install-page .l-sidebar-first {
float: left;
width: 35%;
}
- [dir="rtl"] body.install-page #sidebar-first {
+ [dir="rtl"] .install-page .l-sidebar-first {
float: right;
}
-}
-body.install-page #site-name {
- font-size: 2em;
- line-height: 1.2em;
- color: #0074bd;
- margin: 0.75em 0 0.75em 50px; /* LTR */
-}
-[dir="rtl"] body.install-page #site-name {
- margin: 0.75em 50px 0.75em 0;
-}
-body.install-page #page-title {
- background: transparent;
- padding-top: 0;
-}
-body.install-page .site-slogan {
- margin: 0.75em 0 0.75em 50px; /* LTR */
-}
-[dir="rtl"] body.install-page .site-slogan {
- margin: 0.75em 50px 0.75em 0;
-}
-@media all and (max-width: 48em) { /* 768px */
- body.install-page #site-name {
- margin-left: 0;
- }
- body.install-page .site-slogan {
- margin: 0.75em 0 1.5em;
+
+ /* Margins for sitename */
+ .install-page .name-and-slogan h1 {
+ margin: 0.75em 0 0.75em 1.9em; /* LTR */
}
- body.install-page {
- padding: 0;
+ [dir="rtl"] .install-page .name-and-slogan h1 {
+ margin: 0.75em 1.9em 0.75em 0;
}
- body.install-page #page {
- width: auto;
- padding: 10px 20px 0;
- }
-}
-.install-task-list {
- margin-left: 0; /* LTR */
- list-style-type: none;
- list-style-image: none;
- padding-left: 0; /* LTR */
- padding-bottom: 1em;
-}
-[dir="rtl"] .install-task-list {
- margin-right: 0;
- padding-right: 0;
-}
-.install-task-list li {
- padding: 0.5em 1em 0.5em 50px; /* LTR */
- color: #1a1a1a;
-}
-[dir="rtl"] .install-task-list li {
- padding: 0.5em 20px 0.5em 1em;
-}
-.install-task-list li.active {
- background: #ebeae4;
- position: relative;
- font-weight: normal;
-}
-.install-task-list li.active:after {
- left: 100%; /* LTR */
- border: solid transparent;
- border-color: rgba(235, 234, 228, 0);
- border-left-color: #ebeae4; /* LTR */
- border-width: 17px;
- content: " ";
- height: 0;
- width: 0;
- position: absolute;
- pointer-events: none;
- top: 50%;
- margin-top: -17px;
-}
-[dir="rtl"] .install-task-list li.active:after {
- left: auto;
- right: 100%;
- border-left-color: transparent;
- border-right-color: #ebeae4;
-}
-.install-task-list li.done {
- color: #adadad;
-}
-.step-indicator {
- display: none;
}
+
+/**
+ * Task list & step indicator
+ */
@media all and (max-width: 48em) { /* 768px */
- .install-task-list {
- display: none;
- }
- body.in-maintenance #branding h1 {
- float: left; /* LTR */
- width: auto;
+ header[role="banner"] {
+ position: relative;
}
.step-indicator {
display: block;
font-size: 1.385em;
position: absolute;
- top: 1.9em;
- right: 40px;
+ top: 0.2em;
+ right: 0.5em;
}
[dir="rtl"] .step-indicator {
- left: 40px;
- right: auto;
+ left: 2em;
+ right: auto;
+ }
+ .install-task-list {
+ display: none;
+ }
+}
+
+@media all and (min-width: 48em) { /* 768px */
+ .step-indicator {
+ display: none;
+ }
+ .install-task-list {
+ margin-left: 0; /* LTR */
+ list-style-type: none;
+ list-style-image: none;
+ padding-left: 0; /* LTR */
+ padding-bottom: 1em;
+ }
+ [dir="rtl"] .install-task-list {
+ margin-right: 0;
+ padding-right: 0;
+ }
+ .install-task-list li {
+ padding: 0.5em 1em 0.5em 3.85em; /* LTR */
+ color: #1a1a1a;
+ }
+ [dir="rtl"] .install-task-list li {
+ padding: 0.5em 1em 0.5em 1em;
+ }
+ .install-task-list .active {
+ background: #ebeae4;
+ position: relative;
+ font-weight: normal;
+ }
+ .install-task-list .active:after {
+ left: 100%; /* LTR */
+ border: solid transparent;
+ border-color: rgba(235, 234, 228, 0);
+ border-left-color: #ebeae4; /* LTR */
+ border-width: 1.35em;
+ content: " ";
+ height: 0;
+ width: 0;
+ position: absolute;
+ pointer-events: none;
+ top: 50%;
+ margin-top: -1.32em;
+ }
+ [dir="rtl"] .install-task-list .active:after {
+ left: auto;
+ right: 100%;
+ border-left-color: transparent;
+ border-right-color: #ebeae4;
+ }
+ .install-task-list .done {
+ color: #adadad;
}
}
+
+/**
+ * Password widget
+ */
.install-page .password-parent,
.install-page .confirm-parent {
width: auto;
}
-.install-page div.form-item div.password-suggestions {
+.install-page .form-item .password-suggestions {
float: none;
width: auto;
}
@media all and (max-width: 1010px) and (min-width: 48em) {
.install-page .password-strength,
.install-page .confirm-parent,
- .install-page div.password-confirm {
+ .install-page .password-confirm {
float: none;
width: auto;
}
diff --git a/core/themes/seven/install-page.html.twig b/core/themes/seven/install-page.html.twig
new file mode 100644
index 0000000..1e9a1c2
--- /dev/null
+++ b/core/themes/seven/install-page.html.twig
@@ -0,0 +1,69 @@
+{#
+/**
+ * @file
+ * Seven theme implementation to display a Drupal installation page.
+ *
+ * All the available variables are mirrored in html.html.twig and
+ * page.html.twig.
+ * Some may be blank but they are provided for consistency.
+ *
+ * @see template_preprocess_install_page()
+ *
+ * @ingroup themeable
+ */
+#}
+<!DOCTYPE html>
+<html lang="{{ language.langcode }}" dir="{{ language.dir }}" class="install-background">
+<head>
+ {{ head }}
+ <title>{{ head_title }}</title>
+ {{ styles }}
+ {{ scripts }}
+</head>
+<body class="install-page">
+
+<div class="l-container">
+
+ <header role="banner">
+ {% if site_name or site_slogan %}
+ <div class="name-and-slogan">
+ {% if site_name %}
+ <h1>{{ site_name }}</h1>
+ {% endif %}
+ {% if site_slogan %}
+ <div class="site-slogan">{{ site_slogan }}</div>
+ {% endif %}
+ </div>{# /.name-and-slogan #}
+ {% endif %}
+ </header>
+
+ {% if sidebar_first %}
+ <aside class="l-sidebar-first" role="complementary">
+ {{ sidebar_first }}
+ </aside>{# /.l-sidebar-first #}
+ {% endif %}
+
+ <main role="main">
+ {% if title %}
+ <h1>{{ title }}</h1>
+ {% endif %}
+ {{ messages }}
+ {{ content }}
+ </main>
+
+ {% if sidebar_second %}
+ <aside class="l-sidebar-second" role="complementary">
+ {{ sidebar_second }}
+ </aside>{# /.l-sidebar-second #}
+ {% endif %}
+
+ {% if footer %}
+ <footer role="contentinfo">
+ {{ footer }}
+ </footer>
+ {% endif %}
+
+</div>{# /.l-container #}
+
+</body>
+</html>
diff --git a/core/themes/seven/js/mobile.install.js b/core/themes/seven/js/mobile.install.js
index 6ee8934..2326c24 100644
--- a/core/themes/seven/js/mobile.install.js
+++ b/core/themes/seven/js/mobile.install.js
@@ -18,7 +18,7 @@
function installStepsSetup () {
var steps = document.querySelectorAll('.install-task-list li');
if (steps.length) {
- var header = document.querySelector('#header');
+ var header = document.querySelector('header[role="banner"]');
var stepIndicator = document.createElement('div');
stepIndicator.className = 'step-indicator';
stepIndicator.innerHTML = findActiveStep(steps) + '/' + steps.length;