Commit c091f2d0 authored by Aldo's avatar Aldo

new themes + ruby (sass, compass)

parent 34120bd8
......@@ -79,8 +79,10 @@ drush en paragraphs -y
#drush pmu
#drush pm-uninstall paragraphs
# Generate module/theme/routing
# Generate module/theme/routing/..
drush gen
drush gen module-standard
drush gen theme
drush gen theme-setting
drush gen yml-routing
......@@ -97,7 +99,6 @@ drush sql-cli < dump.sql
drush config-export --destination=config/site
drush config-import --source=config/site
```
taxonomy -> content
### Te gebruiken modules
```
......@@ -198,4 +199,5 @@ composer create-project drupal-composer/drupal-project:8.x-dev some-dir --no-int
* [custom controller](https://www.drupal.org/docs/8/api/routing-system/introductory-drupal-8-routes-and-controllers-example)
* [Search API](https://www.drupal.org/docs/8/modules/search-api)
* [Search API Autocomplete](https://www.drupal.org/docs/8/modules/search-api-autocomplete)
* [facets](https://drupal8.support/en/modules/facets)
\ No newline at end of file
* [facets](https://drupal8.support/en/modules/facets)
* [theming](https://www.drupal.org/docs/8/theming)
\ No newline at end of file
......@@ -223,7 +223,7 @@ installed_extras:
- nodejs
- pimpmylog
# - redis
# - ruby
- ruby
# - selenium
- solr
# - tideways
......@@ -307,7 +307,9 @@ npm_config_prefix: "/home/{{ drupalvm_user }}/.npm-global"
# Ruby Configuration (if enabled above).
ruby_install_gems_user: "{{ drupalvm_user }}"
ruby_install_gems: []
ruby_install_gems:
- sass
- compass
# Varnish Configuration (if enabled above).
varnish_listen_port: "81"
......
......@@ -28,6 +28,7 @@
"drupal/easy_breadcrumb": "^1.12",
"drupal/facets": "^1.4",
"drupal/paragraphs": "^1.8",
"drupal/paragraphs_trimmed": "^1.0",
"drupal/pathauto": "^1.4",
"drupal/search_api": "^1.13",
"drupal/search_api_autocomplete": "^1.2",
......
......@@ -4,7 +4,7 @@
"Read more about it at https://getcomposer.org/doc/01-basic-usage.md#installing-dependencies",
"This file is @generated automatically"
],
"content-hash": "064f2fb28929c1ad17952ca856eac1d5",
"content-hash": "5bee043827438c8dd08db57c4274514c",
"packages": [
{
"name": "alchemy/zippy",
......@@ -3509,6 +3509,62 @@
"source": "https://git.drupalcode.org/project/paragraphs"
}
},
{
"name": "drupal/paragraphs_trimmed",
"version": "1.0.0-beta2",
"source": {
"type": "git",
"url": "https://git.drupalcode.org/project/paragraphs_trimmed.git",
"reference": "8.x-1.0-beta2"
},
"dist": {
"type": "zip",
"url": "https://ftp.drupal.org/files/projects/paragraphs_trimmed-8.x-1.0-beta2.zip",
"reference": "8.x-1.0-beta2",
"shasum": "6616413766b723d617debf314e8b33c34f9777e1"
},
"require": {
"drupal/core": "*",
"drupal/paragraphs": "*"
},
"require-dev": {
"drupal/paragraphs": "*",
"drupal/smart_trim": "*"
},
"type": "drupal-module",
"extra": {
"branch-alias": {
"dev-1.x": "1.x-dev"
},
"drupal": {
"version": "8.x-1.0-beta2",
"datestamp": "1551485288",
"security-coverage": {
"status": "not-covered",
"message": "Project has not opted into security advisory coverage!"
}
}
},
"notification-url": "https://packages.drupal.org/8/downloads",
"license": [
"GPL-2.0+"
],
"authors": [
{
"name": "drclaw",
"homepage": "https://www.drupal.org/user/823702"
}
],
"description": "Trim rendered paragraphs output similar to how you might do on a long text field",
"homepage": "https://www.drupal.org/project/paragraphs_trimmed",
"keywords": [
"Drupal"
],
"support": {
"source": "http://cgit.drupalcode.org/paragraphs_trimmed",
"issues": "https://www.drupal.org/project/issues/paragraphs_trimmed"
}
},
{
"name": "drupal/pathauto",
"version": "1.4.0",
......
......@@ -27,6 +27,10 @@ class RouteSubscriber extends RouteSubscriberBase
$route->setRequirement('_access', 'TRUE');
}
if ($route = $collection->get('is_front')) {
$route->setPath('/test');
}
// // Define custom access for '/user/login'.
// if ($route = $collection->get('user.login')) {
// $route->setRequirement('_custom_access', 'Drupal\new_route\Access\StandardAccessCheck::access');
......
calibrate.extra_small:
label: mobile
mediaQuery: ''
weight: 0
multipliers:
- 1x
calibrate.small:
label: mobile
mediaQuery: 'all and (min-width: 576px) and (max-width: 767px)'
weight: 1
multipliers:
- 1x
calibrate.medium:
label: narrow
mediaQuery: 'all and (min-width: 768px) and (max-width: 991px)'
weight: 2
multipliers:
- 1x
calibrate.large:
label: wide
mediaQuery: 'all and (min-width: 992px) and (max-width: 1199px)'
weight: 3
multipliers:
- 1x
calibrate.extra_large:
label: wide
mediaQuery: 'all and (min-width: 1200px)'
weight: 4
multipliers:
- 1x
name: Calibrate
type: theme
base theme: stable
description: A flexible theme with a responsive, mobile-first layout.
package: Custom
core: 8.x
libraries:
- calibrate/global
regions:
header: 'Header'
primary_menu: 'Primary menu'
secondary_menu: 'Secondary menu'
page_top: 'Page top'
page_bottom: 'Page bottom'
featured: 'Featured'
breadcrumb: 'Breadcrumb'
content: 'Content'
sidebar_first: 'Sidebar first'
sidebar_second: 'Sidebar second'
footer: 'Footer'
# Main theme library.
global:
js:
js/calibrate.js: {}
css:
base:
css/base/elements.css: {}
component:
css/components/block.css: {}
css/components/breadcrumb.css: {}
css/components/field.css: {}
css/components/form.css: {}
css/components/header.css: {}
css/components/menu.css: {}
css/components/messages.css: {}
css/components/node.css: {}
css/components/sidebar.css: {}
css/components/table.css: {}
css/components/tabs.css: {}
css/components/buttons.css: {}
layout:
css/layouts/layout.css: {}
theme:
css/theme/print.css: { media: print }
<?php
/**
* @file
* Functions to support theming in the Calibrate theme.
*/
/**
* Implements hook_preprocess_HOOK() for html.html.twig.
*/
function calibrate_preprocess_html(&$variables) {
}
/**
* Implements hook_preprocess_HOOK() for page.html.twig.
*/
function calibrate_preprocess_page(&$variables) {
}
/**
* Implements hook_preprocess_HOOK() for node.html.twig.
*/
function calibrate_preprocess_node(&$variables) {
}
# Default settings of Calibrate theme.
font_size: 16
# Schema for the configuration files of the Calibrate theme.
calibrate.settings:
type: theme_settings
label: 'Calibrate settings'
mapping:
font_size:
type: integer
label: Font size
/**
* @file
* Calibrate behaviors.
*/
(function ($, Drupal) {
'use strict';
/**
* Behavior description.
*/
Drupal.behaviors.calibrate = {
attach: function (context, settings) {
console.log('It works!');
}
};
} (jQuery, Drupal));
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 23.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
viewBox="0 0 25.6 25.7" style="enable-background:new 0 0 25.6 25.7;" xml:space="preserve" width="60" height="60">
<style type="text/css">
.st0{fill:#231F20;}
.st1{fill:#83C341;}
</style>
<g>
<path class="st0" d="M25.7,12.9C25.7,5.8,19.9,0,12.8,0C5.8,0,0,5.8,0,12.9c0,6.8,5.3,12.4,12,12.8c-0.2-0.6-0.3-1.4-0.5-2.2
c-5.2-0.6-9.4-5.1-9.4-10.6C2.1,7,7,2.2,12.9,2.2S23.6,7,23.6,12.9c0,5.4-4,9.9-9.3,10.6c-0.1,0.9-0.3,1.6-0.5,2.2
C20.5,25.2,25.7,19.7,25.7,12.9z"/>
<path class="st0" d="M5.6,12.9c0-4,3.2-7.2,7.2-7.2S20,8.9,20,12.9c0,3.3-2.3,6.1-5.3,7c0,0.3-0.1,0.7-0.1,1
c3.6-0.8,6.3-4.1,6.3-7.9c0-4.5-3.7-8.2-8.2-8.2S4.5,8.5,4.5,13c0,3.9,2.8,7.2,6.5,8c0-0.3-0.1-0.6-0.1-1C8,19.1,5.6,16.3,5.6,12.9
z"/>
<path class="st1" d="M12.9,11.2c-0.8,0-1.4,0.6-1.4,1.4c0,0.9,0.2,4.3,0.6,7.5c0,0.3,0.1,0.6,0.1,0.9c0.1,0.9,0.2,1.8,0.3,2.6
c0.1,0.9,0.3,1.7,0.4,2.1c0.1-0.5,0.3-1.2,0.4-2.1c0.1-0.8,0.2-1.7,0.3-2.6c0-0.3,0.1-0.6,0.1-0.9c0.3-3.2,0.6-6.6,0.6-7.5
C14.3,11.8,13.7,11.2,12.9,11.2z"/>
</g>
<g>
<path class="st0" d="M43.2,10.3c-0.5-1-1.2-1.7-1.9-2.2c-0.8-0.5-1.7-0.7-2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.5-3.8c-1-1-2.2-1.5-3.6-1.5S76.5,8,75.5,9.1
S74,11.5,74,13z M89.8,19.6h-1.7V6.2h1.6v1.5c0.4-0.6,0.9-1,1.4-1.3S92.2,6,92.9,6v1.9c-1.1,0.1-1.9,0.4-2.3,1
c-0.5,0.5-0.7,1.4-0.7,2.7v8H89.8z M105.6,17.5c-0.5,0.8-1.3,1.4-2.2,1.8c-0.9,0.4-1.9,0.7-3,0.7c-2,0-3.6-0.7-4.9-2s-2-3-2-5
s0.7-3.7,2-5s3-2,5-2c1,0,2,0.2,2.8,0.6c0.9,0.4,1.6,1,2.1,1.8V6.3h1.7v13.4h-1.7v-2.2H105.6z M105.6,12.8c0-1.4-0.5-2.7-1.5-3.7
c-1-1.1-2.2-1.6-3.5-1.6c-1.4,0-2.7,0.5-3.7,1.6s-1.5,2.4-1.5,3.9s0.5,2.8,1.5,3.8s2.2,1.5,3.6,1.5s2.5-0.5,3.6-1.6
C105.1,15.6,105.6,14.3,105.6,12.8z M111.2,19.6V7.9h-2.6V6.2h2.6V1.8h1.7v4.3h2.6v1.7h-2.6v11.7h-1.7V19.6z M130,13.4h-12.1
c0.1,1.5,0.6,2.6,1.6,3.5c0.9,0.9,2.1,1.3,3.6,1.3c1,0,1.9-0.3,2.7-0.8c0.8-0.5,1.4-1.2,1.9-2.2h2c-0.6,1.5-1.5,2.6-2.6,3.4
s-2.4,1.2-3.9,1.2c-1.9,0-3.6-0.7-5-2.1c-1.3-1.4-2-3.1-2-5c0-2,0.7-3.7,2-5.1c1.3-1.3,3-2,5.1-2c2,0,3.7,0.7,4.9,2.1
c1.3,1.4,1.9,3.2,1.9,5.4L130,13.4L130,13.4z M128.1,11.9c-0.3-1.5-0.9-2.6-1.8-3.4c-0.9-0.8-2-1.1-3.4-1.1c-1.3,0-2.4,0.4-3.3,1.2
s-1.5,1.9-1.7,3.3H128.1z"/>
</g>
</svg>
{
"name": "calibrate",
"private": true,
"scripts": {
"sass-watch": "node-sass -w --output-style expanded scss -o css",
"sass-compile": "node-sass --output-style expanded scss -o css",
"livereload": "livereload css",
"start": "run-p sass-watch livereload"
},
"devDependencies": {
"livereload": "^0.7.0",
"node-sass": "^4.9.3",
"npm-run-all": "^4.1.3"
}
}
$font-stack: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
body {
font: 100% $font-stack;
background-color: red;
}
<?php
/**
* @file
* Theme settings form for Calibrate theme.
*/
/**
* Implements hook_form_system_theme_settings_alter().
*/
function calibrate_form_system_theme_settings_alter(&$form, &$form_state) {
$form['calibrate'] = [
'#type' => 'details',
'#title' => t('Calibrate'),
'#open' => TRUE,
];
$form['calibrate']['font_size'] = [
'#type' => 'number',
'#title' => t('Font size'),
'#min' => 12,
'#max' => 18,
'#default_value' => theme_get_setting('font_size'),
];
}
# Default settings of Flufiness theme.
font_size: 16
# Schema for the configuration files of the Flufiness theme.
flufiness.settings:
type: theme_settings
label: 'Flufiness settings'
mapping:
font_size:
type: integer
label: Font size
flufiness.extra_small:
label: mobile
mediaQuery: ''
weight: 0
multipliers:
- 1x
flufiness.small:
label: mobile
mediaQuery: 'all and (min-width: 576px) and (max-width: 767px)'
weight: 1
multipliers:
- 1x
flufiness.medium:
label: narrow
mediaQuery: 'all and (min-width: 768px) and (max-width: 991px)'
weight: 2
multipliers:
- 1x
flufiness.large:
label: wide
mediaQuery: 'all and (min-width: 992px) and (max-width: 1199px)'
weight: 3
multipliers:
- 1x
flufiness.extra_large:
label: wide
mediaQuery: 'all and (min-width: 1200px)'
weight: 4
multipliers:
- 1x
name: Flufiness
type: theme
base theme: classy
description: A cuddly theme that offers extra fluffiness.
package: Custom
core: 8.x
libraries:
- flufiness/global
regions:
header: 'Header'
primary_menu: 'Primary menu'
secondary_menu: 'Secondary menu'
page_top: 'Page top'
page_bottom: 'Page bottom'
featured: 'Featured'
breadcrumb: 'Breadcrumb'
content: 'Content'
sidebar_first: 'Sidebar first'
sidebar_second: 'Sidebar second'
footer: 'Footer'
# Main theme library.
global:
js:
js/flufiness.js: {}
css:
base:
css/base/elements.css: {}
component:
css/components/block.css: {}
css/components/breadcrumb.css: {}
css/components/field.css: {}
css/components/form.css: {}
css/components/header.css: {}
css/components/menu.css: {}
css/components/messages.css: {}
css/components/node.css: {}
css/components/sidebar.css: {}
css/components/table.css: {}
css/components/tabs.css: {}
css/components/buttons.css: {}
layout:
css/layouts/layout.css: {}
theme:
css/theme/print.css: { media: print }
<?php
/**
* @file
* Functions to support theming in the Flufiness theme.
*/
/**
* Implements hook_preprocess_HOOK() for html.html.twig.
*/
function flufiness_preprocess_html(&$variables) {
}
/**
* Implements hook_preprocess_HOOK() for page.html.twig.
*/
function flufiness_preprocess_page(&$variables) {
}
/**
* Implements hook_preprocess_HOOK() for node.html.twig.
*/
function flufiness_preprocess_node(&$variables) {
}
/**
* @file
* Flufiness behaviors.
*/
(function ($, Drupal) {
'use strict';
/**
* Behavior description.
*/
Drupal.behaviors.flufiness = {
attach: function (context, settings) {
console.log('It works!');
}
};
} (jQuery, Drupal));
<svg xmlns="http://www.w3.org/2000/svg" width="100" height="60">
<rect x="3" y="3" rx="10" ry="10" width="94" height="54" style="stroke: #187bb8; fill: #f5f5ff;"/>
<text x="50%" y="50%" text-anchor="middle" alignment-baseline="middle" style="font-family: Arial, 'Helvetica Neue', Helvetica; fill: #187bb8;">Flufiness logo</text>
</svg>
{
"name": "flufiness",
"private": true,
"scripts": {
"sass-watch": "node-sass -w --output-style expanded scss -o css",
"sass-compile": "node-sass --output-style expanded scss -o css",
"livereload": "livereload css",
"start": "run-p sass-watch livereload"
},
"devDependencies": {
"livereload": "^0.7.0",
"node-sass": "^4.9.3",
"npm-run-all": "^4.1.3"
}
}
<?php
/**
* @file
* Theme settings form for Flufiness theme.
*/
/**
* Implements hook_form_system_theme_settings_alter().
*/
function flufiness_form_system_theme_settings_alter(&$form, &$form_state) {
$form['flufiness'] = [
'#type' => 'details',
'#title' => t('Flufiness'),
'#open' => TRUE,
];
$form['flufiness']['font_size'] = [
'#type' => 'number',
'#title' => t('Font size'),
'#min' => 12,
'#max' => 18,
'#default_value' => theme_get_setting('font_size'),
];
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment