drupal t heming the future o f api-first edition · 2019. 12. 25. · frontend united.org...

137
The future of The future of Drupal Theming Drupal Theming By Mathieu Spillebeen API-first edition API-first edition

Upload: others

Post on 12-Sep-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

The future ofThe future of Drupal ThemingDrupal Theming

By Mathieu Spillebeen

API-first editionAPI-first edition

Page 2: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Mathieu SpillebeenMathieu Spillebeen

@MathieuSpil

[email protected]

Frontend United.org

Compony.io

Freelance Drupal Frontend developer

Page 3: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Making myself unpopularHopefully fixing it again

ContentsContents

Page 4: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

New technology

Peak of expectations

Disillusionment

Slow enlightenment

Plateau of productivity

Page 5: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

Mobile-first

Page 6: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

Mobile-first

Mobile-only 

Page 7: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

Mobile-first

Mobile-only 

Expensive, complex,only edge cases

Page 8: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

Mobile-first

Mobile-only 

Expensive, complex,only edge cases

Responsive!

Page 9: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

Mobile-first

Mobile-only 

Expensive, complex,only edge cases

Responsive!

Mobile-focus

Page 10: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

API-first?

Page 11: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

API-first?

API-only! Headless! 

Page 12: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

API-first?

API-only! Headless! 

Expensive, complex drupalismsData-structure mangling,=> Only edge cases

Page 13: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

API-first?

API-only! Headless! 

Expensive, complex drupalismsData-structure mangling,=> Only edge cases

Progressive decoup!ing

Page 14: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Time

Expectations

API-first?

API-only! Headless! 

Expensive, complex drupalismsData-structure mangling,=> Only edge cases

Progressive decoup!ing

API-powered components

Page 15: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing
Page 16: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Decouple

Page 17: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

interactive

Decouple

Page 18: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Decouple

Page 19: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Decouple

Page 20: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Decouple

Page 21: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Decouple

Page 22: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Independent, reusableIndependent, reusablethemed, functional,themed, functional,

cutting edge,cutting edge,Drupal Front-endDrupal Front-end

componentscomponentsthat YOU can decouplethat YOU can decouple

Page 23: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing
Page 24: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing
Page 25: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

That's the dreamThat's the dream

Page 26: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New themestructure

Page 27: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New themestructure

Toolingworkflow

Page 28: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New themestructure

Platform to share

Toolingworkflow

Page 29: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New themestructure

Platform to share

 compony.io

{{Toolingworkflow

Page 30: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New themestructure

Platform to share

 compony.io{{{{

The componytheme

Toolingworkflow

Page 31: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

The new themeThe new themestructurestructure

How?

Page 32: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

_sass-essentials

my-theme

components

my-theme.info.yml

my-theme.libraries.yml

my-theme.theme

How?

Page 33: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

_sass-essentials

my-theme

components

my-theme.info.yml

my-theme.libraries.yml

my-theme.theme

_global

node

status-messages

How?

Page 34: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

_sass-essentials

my-theme

components

my-theme.info.yml

my-theme.libraries.yml

my-theme.theme

_mixins.scss

_variables.scss

sass-essentials.scss

How?

Page 35: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

status-messages

dist

libraries.yml

smile.svg

status-messages.html.twig

smile.svg

status-messages.css

status-messages.js

status-messages.js

status-messages.scss

How?

Page 36: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

status-messages: version: VERSION css: component: dist/status-messages.css: {} js: dist/status-messages.js: {}

1234567

libraries.ymllibraries.yml

How?

Page 37: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

{#/** * Theme override for status messages. * ... */#} {{ attach_library('my-theme/status-messages') }} <div role="alert" class="message message--error"> <h2>{{ status_headings[type] }}</h2> {{ messages }}</div>

123456789

10111213

status-messages.html.twigstatus-messages.html.twig

How?

Page 38: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

How?status-messages

dist

libraries.yml

smile.svg

status-messages.html.twig

smile.svg

status-messages.css

status-messages.js

status-messages.js

status-messages.scss

Page 39: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

The new themeThe new themestructurestructure

Advantages

Page 40: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Conditional loadingConditional loading

Advantages

Page 41: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Views Infinite Scroll

components

_global

views-infinite-scroll-pager

page

views-infinite-scroll-pager.html.twig

libraries.yml

views-infinite-scroll-pager.css

Advantages

Page 42: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Views Infinite Scroll

components

_global

views-infinite-scroll-pager

page

views-infinite-scroll-pager.html.twig

libraries.yml

views-infinite-scroll-pager.css

Advantages

Page 43: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

MaintainabilityMaintainability

Advantages

Page 44: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

node--article.html.twig

node--article.js

/taxonomy-term/1

/node/article/1

libraries.yml

node--article

Page 45: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

node--article.html.twig

node--article.js

/taxonomy-term/1

/node/article/1

libraries.yml

node--article

Page 46: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

PerformancePerformance

Advantages

Page 47: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

/node/1

/taxonomy-term/1node

libraries.yml

node.css

node.html.twig

Page 48: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

/node/1

/taxonomy-term/1node

libraries.yml

node.css

node.html.twig

Page 49: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

/taxonomy-term/1

/node/1

page

libraries.yml

page.css

page.html.twig

Page 50: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

/taxonomy-term/1

/node/1

page

libraries.yml

page.css

page.html.twig

Page 51: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

{{

/any-page

1 in 10 of your CSS/JS

Page 52: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

FlexibilityFlexibility

Advantages

Page 53: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

brick: version: VERSION css: component: brick.css: {}

12345

brick

libraries.yml

.brick { width: 100%; padding: 2rem;}

1234

CSS-onlyCSS-only

brick.css

Advantages

Page 54: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

{{ attach_library('my-theme/brick') }}<div class="brick"> {{ attach_library('my-theme/messages') }} <div class="messages"> {{ content }} </div> </div>

123456789

node--article

node--article.html.twig

HTML-onlyHTML-only Advantages

Page 55: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

modal: version: VERSION js: modal.js: {}

1234

(function () { Drupal.behaviors.submitFormLoader = { attach: function (context, settings) { };})();

12345

JS-onlyJS-onlylibraries

libraries.yml

modal.js

Advantages

Page 56: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

... and loads more... and loads more

Advantages

Page 57: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Never start over againReadable to non-Drupal peopleExperiment on tiny parts, not oneverything

Page 58: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New themestructure

Toolingworkflow

Page 59: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New toolingNew toolingworkflowworkflow

How?

Page 60: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

_sass-essentials

my-theme

components

my-theme.info.yml

my-theme.libraries.yml

my-theme.theme

gulpfile.js

How?

Page 61: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

_sass-essentials

my-theme

components

my-theme.info.yml

my-theme.libraries.yml

my-theme.theme

gulpfile.js

How?

.nvmrc

package.json

package-lock.json

yarn.lock

Page 62: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

ConfigurableConfigurable

How?

project-specificenvironment-specific

 

Page 63: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

module.exports = { gulpthemes: [ { path: 'web/themes/compony', with_styleguide: false }, ], features: { autoprefixer: { enable: true, options: { browsers: ['last 2 versions', 'ie 9', '> 0.2%'], cascade: false },

123456789

1011121314

project.config.js

How?

Page 64: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

module.exports = { features: { auto_rebuild_drupal_cache: { enable: false, cache_rebuild_command: 'drush cr' }, browsersync: { enable: false, localhost_url: "https://local.dev/" },

123456789

10

local.config.js

How?

Page 65: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New toolingNew toolingworkflowworkflow

Advantages

Page 66: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Easy setupEasy setup

Advantages

Page 67: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

$ npm install $ gulp

core

gulpfile.js

config.js

index.js

local.config.js

project.config.js

Command line

Advantages

Page 68: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Sass compilingSass compiling

Advantages

Page 69: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

.message { background: url('../../../images/smile.svg');}

123

status-messages

dist

libraries.yml

smile.svg

smile.svg

status-messages.css

status-messages.scss

Advantages

Page 70: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

.message { background: url('../../../images/smile.svg');}

123

.message { background: url('smile.svg');}

123

status-messages

dist

libraries.yml

smile.svg

smile.svg

status-messages.css

status-messages.scss

Advantages

Page 71: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

AutoprefixerAutoprefixer

Advantages

Page 72: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 73: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Lossless imageLossless imageoptimisationoptimisation

Advantages

Page 74: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 75: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

BrowsersyncBrowsersync

Advantages

Page 76: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

LintingLinting

Advantages

Page 77: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 78: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

JS uglificationJS uglification

Advantages

Page 79: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

UglificationUglification

AggregationAggregation

++

Advantages

Page 80: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Babelify & BrowserifyBabelify & Browserify

Advantages

Page 81: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing
Page 82: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

TreeshakingTreeshaking

Advantages

Page 83: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Component-based,Component-based, multi-thememulti-theme

compilingcompiling

Advantages

Page 84: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

node

libraries.yml

node.css

node.html.twig

page

libraries.yml

page.css

page.html.twig

components Advantages

Page 85: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

_sass-essentials

my-theme

components

my-theme.info.yml

my-theme.libraries.yml

my-theme.theme

gulpfile.js

Advantages

          compony.io/blog/how-set-multiple-compony-themes-your-project

Page 86: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

module.exports = { options: { ... gulpthemes: [ { path: 'themes/custom/my-first-theme', }, { path: 'themes/custom/my-second-theme', }, ] },};

12345678910111213

project.config.js

Advantages

Page 87: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

partials

_partial-a.js

_partial-b.js

dist

example.js

example

libraries.yml

example.js

Page 88: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantagesdist

example.js

example

libraries.yml

example.js

some-library.min.js

Page 89: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

_scss-partials

_regions.scss

_utilities.scss

dist

style.css

_global

libraries.yml

style.scss

Page 90: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantagesdist

menu.css

menu

libraries.yml

menu.scss

menu__toggles.scss

menu__toggles.css

Page 91: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Rebuilding Drupal'sRebuilding Drupal'sCacheCache

Advantages

Page 92: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 93: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Refactor friendlyRefactor friendly

Advantages

Page 94: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing
Page 95: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 96: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Abstract onlyAbstract onlywhen neededwhen needed

Advantages

Page 97: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

node

_global

node.html.twig

node.css

libraries.yml

components Advantages

Page 98: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

node

_global

node.html.twig

node.css

libraries.yml

node--article

node--article.html.twig

components Advantages

Page 99: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

node

_global

node.html.twig

node.css

libraries.yml

node--article

node--article.html.twig

components

node

_global

node.html.twig

node.css

libraries.yml

node--article

node--article.html.twig

components

node

Advantages

Page 100: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

node

_global

components

node

node--article

node--article-full

node--article--teaser

node--blog

node--blog--full

node--blog--teaser

Page 101: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

... and loads more... and loads more

Advantages

Page 102: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Browsersyncing,Sass globbing,Source mapping,Cross-component variables & mixinsAuto-cleaning up empty directories,Features as options.

Advantages

Page 103: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New themestructure

Platform to share

Toolingworkflow

Page 104: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New platformNew platform to shareto share

How?

Page 105: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

DownloadingDownloading

How?

Page 106: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Compony.ioDownload theme-structure + tools

Download contributed components

How?

Page 107: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Drupal.orgDownload Drupal core

Download contributed modules

How?

Page 108: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

New platformNew platform to shareto share

Advantages

Page 109: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Drag and dropDrag and drop   cross-projectscross-projects

Advantages

Page 110: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Drag and dropDrag and drop   cross-projectscross-projects

-developers-developers

Advantages

Page 111: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Drag and dropDrag and drop   cross-projectscross-projects

-developers-developers-companies-companies

Advantages

Page 112: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Project-agnosticProject-agnosticcomponentscomponents

Advantages

Page 113: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Strip project specific content

Strip color, fonts & variables

page

libraries.yml

my-component.scss

my-component.html.twig

components Advantages

          compony.io/blog/create-compony-component

Page 114: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Share informationShare information on componentson components

Advantages

Page 115: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

/node/article/1

compony.io/components/status-messages

Page 116: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

CollaborateCollaborate on componentson components

Advantages

Page 117: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 118: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 119: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing
Page 120: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Invent componentInvent componentvariationsvariations

Advantages

Page 121: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 122: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 123: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

(Still in development)

Page 124: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

ComponentComponentcollectionscollections

Advantages

Page 125: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 126: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Advantages

Page 127: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Community basedCommunity basedenhancementsenhancements

Advantages

Page 128: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Proud DrupalProud DrupalFrontend developerFrontend developer

Advantages

Page 129: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

What is your nodeWhat is your nodeversion.version.

Advantages

Page 130: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

And lots moreAnd lots more

Advantages

Page 131: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Component naming & nesting conventionTwig and hook extending conventionsDocumentation on the 4 PHP functionsVersion control of components

Advantages

          compony.io/docs/documentation/documentation

Page 132: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

ititPuttingPutting

togethertogether

Page 135: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Mathieu SpillebeenMathieu Spillebeen

@MathieuSpil

[email protected]

frontendunited.org/get-involved

compony.io/social

Freelance Drupal Frontend developer

Page 136: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing
Page 137: Drupal T heming The future o f API-first edition · 2019. 12. 25. · Frontend United.org Compony.io Freelance Drupal Frontend developer. Making myself unpopular Hopefully fixing

Thank you forThank you forlisteninglistening