Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Unix-style newlines with a newline ending every file
[*]
indent_style = space
indent_size = 2
insert_final_newline = true
25 changes: 18 additions & 7 deletions _config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,19 +8,30 @@ name: Drupal Pattern Lab


# Short bio or description (displayed in the header)
description: Curated resources on integrating Pattern Lab with Drupal 8.
description: Curated resources for integrating Pattern Lab with Drupal 8.


# URL of your avatar or profile pic (you could use your GitHub profile pic)
# avatar: https://raw.githubusercontent.com/drupal-pattern-lab/drupal-pattern-lab.github.io/master/images/drupal-pl-logo--grayscale.png
#theme: jekyll-theme-midnight
#theme: jekyll-theme-cayman


# Includes an icon in the footer for each username you enter
#footer-links:
# github: drupal-pattern-lab/drupal-pattern-lab.github.io
# slack:
#
sass:
sass_dir: styles

navItems:
-
text: Blog
url: /blog
-
text: GitHub Org
url: https://github.com/drupal-pattern-lab
-
text: Slack Channel
url: https://drupaltwig-slack.herokuapp.com
-
text: Roadmap
url: https://github.com/drupal-pattern-lab/roadmap/projects/1


# Enter your Google Analytics web tracking code (e.g. UA-2110908-2) to activate tracking
Expand Down
60 changes: 52 additions & 8 deletions _layouts/default.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,63 @@
<!doctype html>
<html>
<html class="no-js">
<head>
<meta charset="utf-8">
<title>{% if page.title %}{{ page.title }} | {% endif %}{{ site.name }}</title>
<meta name="description" content="{{ site.description }}">
<meta name="viewport" content="width=device-width,initial-scale=1">

<link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
<link rel="stylesheet" href="{{ '/styles/styles.drupal-pattern-lab.css?v=' | append: site.github.build_revision | relative_url }}">
</head>
<body>
<div class="site">
<header class="site__header">
{% include header.html %}
</header>
<div class="site__content">
{{ content }}

<header class="c-global-header">
<div class="o-flag c-global-header__intro">
<div class="o-flag__image">
<a href="/" alt="Home">
<img src="{{ '/assets/images/logo--inverted.svg' | relative_url }}" alt="Pattern Lab logo combined with the Drupal Drop" width="100">
</a>
</div>

<div class="o-flag__body c-global-header__intro-text">
<h1 class="c-project-name">{{ site.name | default: site.github.repository_name }}</h1>
</div>
</div>
</div>

<h2 class="c-project-tagline">{{ site.description | default: site.github.project_tagline }}</h2>


{% for nav_item in site.navItems %}
<a href="{{ nav_item.url }}" class="c-btn">{{ nav_item.text }}</a>
{% endfor %}
</header>



<section class="c-page">
{{ content }}

<footer class="c-global-footer">
{% if site.github.is_project_page %}
<span class="c-global-footer__owner">
<a href="{{ site.github.repository_url }}">{{ site.github.repository_name }}</a> is maintained by <a href="{{ site.github.owner_url }}">{{ site.github.owner_name }}</a>.</span>
{% endif %}
<span class="c-global-footer__credits">This page was generated by <a href="https://pages.github.com">GitHub Pages</a>.</span>
</footer>
</section>

<script src="/assets/script.js" defer></script>

{% if site.google_analytics %}
<script type="text/javascript">
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','//www.google-analytics.com/analytics.js','ga');
ga('create', '{{ site.google_analytics }}', 'auto');
ga('send', 'pageview');
</script>
{% endif %}
</body>

</html>
4 changes: 2 additions & 2 deletions _layouts/post.html
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
---
layout: default
---
<article>
<article class="c-article">
<header>
{% if page.title %}<h2>{{ page.title }}</h2>{% endif %}
<ul>
{% if page.author %}<li>by {{ page.author }}</li>{% endif %}
<li>{{ page.date }}</li>
<li>{{ page.date | date_to_string }}</li>
</ul>
</header>
{{ content }}
Expand Down
83 changes: 83 additions & 0 deletions assets/images/logo--inverted.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
84 changes: 84 additions & 0 deletions assets/images/logo.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
25 changes: 25 additions & 0 deletions assets/script.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/**
* Query selector using Vanilla JS and `querySelectorAll`, returning Array instead of NodeList..
* @param {String} selector
* @param {HTMLElement} [el=document] - Element to search within.
* @returns {Array}
*/
function query(selector, el) {
el = el || document;
// returning an Array instead of a NodeList
return Array.prototype.slice.call(el.querySelectorAll(selector));
}

function globalSetup() {
document.documentElement.classList.remove('no-js');
document.documentElement.classList.add('js');

// External links open in new tab
query('a[href^=http]').forEach(function (el) {
el.setAttribute('target', '_blank');
});
}

document.addEventListener('DOMContentLoaded', function () {
globalSetup();
});
2 changes: 1 addition & 1 deletion blog/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ <h2>Blog</h2>
<h3><a href="{{ post.url }}">{{ post.title }}</a></h3>
<ul>
{% if post.author %}<li>by {{ post.author }}</li>{% endif %}
<li>{{ post.date }}</li>
<li>{{ post.date | date_to_string }}</li>
</ul>
</header>
<p> {{ post.excerpt }} </p>
Expand Down
27 changes: 27 additions & 0 deletions styles/01-settings/_settings.variables.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/* ------------------------------------ *\
#SETTINGS - VARIABLES
\* ------------------------------------ */

// Breakpoints
$large-breakpoint: 64em !default;
$medium-breakpoint: 42em !default;

// Headers
$header-heading-color: #fff !default;
$header-bg-color: #159957 !default;
$header-bg-color-secondary: #155799 !default;

// Text
$section-headings-color: #159957 !default;
$body-text-color: #606c71 !default;
$body-link-color: #1e6bb8 !default;
$blockquote-text-color: #819198 !default;

// Code
$code-bg-color: #f3f6fa !default;
$code-text-color: #567482 !default;

// Borders
$border-color: #dce6f0 !default;
$table-border-color: #e9ebec !default;
$hr-border-color: #eff0f1 !default;
21 changes: 21 additions & 0 deletions styles/02-tools/_tools.mixins.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/* ------------------------------------ *\
#TOOLS - MIXINS
\* ------------------------------------ */

@mixin large {
@media screen and (min-width: #{$large-breakpoint}) {
@content;
}
}

@mixin medium {
@media screen and (min-width: #{$medium-breakpoint}) and (max-width: #{$large-breakpoint}) {
@content;
}
}

@mixin small {
@media screen and (max-width: #{$medium-breakpoint}) {
@content;
}
}
9 changes: 9 additions & 0 deletions styles/03-generic/_generic.box-sizing.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/* ------------------------------------ *\
#GENERIC - BOX SIZING
\* ------------------------------------ */

*,
*:before,
*:after {
box-sizing: border-box;
}
Loading