diff --git a/web/themes/dcb2017/css/style.css b/web/themes/dcb2017/css/style.css new file mode 100644 index 000000000..85838f0b1 --- /dev/null +++ b/web/themes/dcb2017/css/style.css @@ -0,0 +1,93 @@ +html { + font-family: 'Poppins', sans-serif; + font-size: 16px; } + +body { + background: white; } + +.region-header { + margin: 0 auto; + max-width: 72rem; + overflow: hidden; } + +.region-featured { + position: relative; } + .region-featured:after { + background-image: url("../images/dcb-bg.jpg"); + background-size: cover; + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: -1; } + +.featured-footer { + background: black; + color: white; + font-size: 1.2rem; + font-weight: bold; + padding: 1rem; + text-align: center; } + +.region-content { + margin: 0 auto; + max-width: 72rem; } + +.region-footer { + margin: 0 auto; + max-width: 72rem; } + +ul.menu { + margin: 0; + padding: 0; } + ul.menu li.menu-item { + display: inline-block; + padding: 1rem 1.5rem; + text-transform: uppercase; } + ul.menu li.menu-item a { + color: black; + text-decoration: none; } + ul.menu li.menu-item a:hover, ul.menu li.menu-item a:focus, ul.menu li.menu-item a.is-active { + color: #44efb9; } + +nav.menu--main { + float: right; + font-weight: bold; + margin: 0.8rem; } + +.block-system-branding-block { + float: left; + margin: 0.5em 2em; } + +.site-logo img { + display: block; + width: 11rem; } + +#block-homepagehero { + font-size: 1.8rem; + line-height: 1.2; + margin: auto; + max-width: 30rem; + padding: 10rem 1rem; + text-align: center; } + +.form-item > label { + display: block; + font-weight: bold; } + .form-item > label.option { + display: inline; + font-weight: normal; } + +.form-submit { + background: #b33ee9; + border: 0; + color: white; + font-weight: bold; + padding: 0.5rem 1rem; + text-transform: uppercase; } + .form-submit:hover, .form-submit:focus { + background: #44efb9; } + +/*# sourceMappingURL=style.css.map */ diff --git a/web/themes/dcb2017/css/style.css.map b/web/themes/dcb2017/css/style.css.map new file mode 100644 index 000000000..50687a7d1 --- /dev/null +++ b/web/themes/dcb2017/css/style.css.map @@ -0,0 +1 @@ +{"version":3,"sources":["_global.scss","layout/_header.scss","layout/_featured.scss","layout/_content.scss","layout/_footer.scss","components/_menus.scss","base/_variables.scss","components/_blocks.scss","components/_forms.scss","base/_mixins.scss"],"names":[],"mappings":"AAAA;EACE,mCAAmC;EACnC,gBAAgB,EACjB;;AAED;EACE,kBAAkB,EACnB;;ACPD;EACE,eAAe;EACf,iBAAiB;EACjB,iBAAiB,EAClB;;ACJD;EACE,mBAAmB,EAapB;EAdD;IAII,8CAAqB;IACrB,uBAAuB;IACvB,YAAY;IACZ,mBAAmB;IACnB,OAAO;IACP,QAAQ;IACR,SAAS;IACT,UAAU;IACV,YAAY,EACb;;AAGH;EACE,kBAAkB;EAClB,aAAa;EACb,kBAAkB;EAClB,kBAAkB;EAClB,cAAc;EACd,mBAAmB,EACpB;;ACvBD;EACE,eAAe;EACf,iBAAiB,EAClB;;ACHD;EACE,eAAe;EACf,iBAAiB,EAClB;;ACHD;EACE,UAAU;EACV,WAAW,EAkBZ;EAhBG;IACA,sBAAsB;IACtB,qBAAqB;IACrB,0BAA0B,EAY3B;IAnBH;MAUM,aAAa;MACb,sBAAsB,EAOvB;MAlBL;QAgBQ,eCdW,EDeZ;;AAKJ;EACD,aAAa;EACb,kBAAkB;EAClB,eAAe,EAChB;;AE1BD;EACE,YAAY;EACZ,kBAAkB,EACnB;;AAED;EACE,eAAe;EACf,aAAa,EACd;;AAED;EACE,kBAAkB;EAClB,iBAAiB;EACjB,aAAa;EACb,iBAAiB;EACjB,oBAAoB;EACpB,mBAAmB,EACpB;;ACjBY;EACX,eAAe;EACf,kBAAkB,EAMnB;EARY;IAKT,gBAAgB;IAChB,oBAAoB,EACrB;;AAGH;ECTE,oBHEgB;EGDhB,UAAU;EACV,aAAa;EACb,kBAAkB;EAClB,qBAAqB;EACrB,0BAA0B,EDM3B;EAFD;ICAI,oBHRe,EGShB","file":"style.css","sourcesContent":["html {\n font-family: 'Poppins', sans-serif;\n font-size: 16px;\n}\n\nbody {\n background: white;\n}\n\n",".region-header {\n margin: 0 auto;\n max-width: 72rem;\n overflow: hidden;\n}\n",".region-featured {\n position: relative;\n\n &:after {\n background-image: url('../images/dcb-bg.jpg');\n background-size: cover;\n content: '';\n position: absolute;\n top: 0;\n left: 0;\n right: 0;\n bottom: 0;\n z-index: -1;\n }\n}\n\n.featured-footer {\n background: black;\n color: white;\n font-size: 1.2rem;\n font-weight: bold;\n padding: 1rem;\n text-align: center;\n}\n",".region-content {\n margin: 0 auto;\n max-width: 72rem;\n}\n",".region-footer {\n margin: 0 auto;\n max-width: 72rem;\n}\n","ul.menu {\n margin: 0;\n padding: 0;\n\n li.menu-item {\n display: inline-block;\n padding: 1rem 1.5rem;\n text-transform: uppercase;\n\n a {\n color: black;\n text-decoration: none;\n\n &:hover,\n &:focus,\n &.is-active {\n color: $dcb-green;\n }\n }\n }\n}\n\nnav.menu--main {\n float: right;\n font-weight: bold;\n margin: 0.8rem;\n}\n","// Custom variables, colours etc.\n\n$dcb-green: #44efb9;\n$dcb-blue: #b33ee9;\n$dcb-purple: #ec16a8;\n",".block-system-branding-block {\n float: left;\n margin: 0.5em 2em;\n}\n\n.site-logo img {\n display: block;\n width: 11rem;\n}\n\n#block-homepagehero {\n font-size: 1.8rem;\n line-height: 1.2;\n margin: auto;\n max-width: 30rem;\n padding: 10rem 1rem;\n text-align: center;\n}\n",".form-item > label {\n display: block;\n font-weight: bold;\n\n &.option {\n display: inline;\n font-weight: normal;\n }\n}\n\n.form-submit {\n @include button;\n}\n","@mixin button {\n background: $dcb-blue;\n border: 0;\n color: white;\n font-weight: bold;\n padding: 0.5rem 1rem;\n text-transform: uppercase;\n\n &:hover,\n &:focus {\n background: $dcb-green;\n }\n}\n"]} \ No newline at end of file diff --git a/web/themes/dcb2017/dcb2017.info.yml b/web/themes/dcb2017/dcb2017.info.yml new file mode 100644 index 000000000..992470e6a --- /dev/null +++ b/web/themes/dcb2017/dcb2017.info.yml @@ -0,0 +1,15 @@ +name: Drupalcamp Bristol 2017 +type: theme +description: Theme for the new Drupalcamp Bristol 2017 site based on classy. +core: 8.x +base theme: classy +libraries: + - dcb2017/global-styling + - dcb2017/fonts + +# Regions +regions: + header: Header + featured: Featured + content: Content + footer: Footer diff --git a/web/themes/dcb2017/dcb2017.libraries.yml b/web/themes/dcb2017/dcb2017.libraries.yml new file mode 100644 index 000000000..bde404387 --- /dev/null +++ b/web/themes/dcb2017/dcb2017.libraries.yml @@ -0,0 +1,9 @@ +global-styling: + css: + component: + css/style.css: {} + +fonts: + css: + theme: + //fonts.googleapis.com/css?family=Poppins: { type: external } diff --git a/web/themes/dcb2017/dcb2017.theme b/web/themes/dcb2017/dcb2017.theme new file mode 100644 index 000000000..ecde5b3bd --- /dev/null +++ b/web/themes/dcb2017/dcb2017.theme @@ -0,0 +1,15 @@ +isFrontPage()) { + $site_config = \Drupal::config('system.site'); + $variables['head_title'] = $site_config->get('name'); + } +} diff --git a/web/themes/dcb2017/gulpfile.js b/web/themes/dcb2017/gulpfile.js new file mode 100644 index 000000000..85485cef7 --- /dev/null +++ b/web/themes/dcb2017/gulpfile.js @@ -0,0 +1,46 @@ +/** + * @file gulpfile.js + * + * Provides gulp tasks for building theme components. + */ + +'use strict'; + +var gulp = require('gulp'), + sass = require('gulp-sass'), + prefix = require('gulp-autoprefixer'), + sourcemaps = require('gulp-sourcemaps'); + +/** + * @task sass + * + * Compile css from scss. + */ +gulp.task('sass', function () { + return gulp.src('sass/**/*.scss') + .pipe(sourcemaps.init()) + .pipe(sass({ + // Include the bootstrap library. + //includePaths: ['./node_modules/bootstrap-sass/assets/stylesheets'] + })) + .pipe(prefix(['last 15 versions', '> 1%', 'ie 8', 'ie 7'], { cascade: true })) + .pipe(sourcemaps.write('')) + .pipe(gulp.dest('css')); +}); + +/** + * @task watch + * + * Watch scss files for changes & recompile. + */ +gulp.task('watch', function () { + gulp.watch(['sass/*.scss', 'sass/**/*.scss'], ['sass']); +}); + +/** + * @task default + * + * Default task, running just `gulp` will + * compile & watch files. + */ +gulp.task('default', ['sass', 'watch']); diff --git a/web/themes/dcb2017/images/dcb-bg.jpg b/web/themes/dcb2017/images/dcb-bg.jpg new file mode 100644 index 000000000..042d3698f Binary files /dev/null and b/web/themes/dcb2017/images/dcb-bg.jpg differ diff --git a/web/themes/dcb2017/images/logo-with-dates.svg b/web/themes/dcb2017/images/logo-with-dates.svg new file mode 100644 index 000000000..17e12edd3 --- /dev/null +++ b/web/themes/dcb2017/images/logo-with-dates.svg @@ -0,0 +1,75 @@ + + diff --git a/web/themes/dcb2017/logo.png b/web/themes/dcb2017/logo.png new file mode 100644 index 000000000..cede3ba20 Binary files /dev/null and b/web/themes/dcb2017/logo.png differ diff --git a/web/themes/dcb2017/logo.svg b/web/themes/dcb2017/logo.svg new file mode 100644 index 000000000..3c28bfb40 --- /dev/null +++ b/web/themes/dcb2017/logo.svg @@ -0,0 +1,73 @@ + + diff --git a/web/themes/dcb2017/package.json b/web/themes/dcb2017/package.json new file mode 100644 index 000000000..4bf348a05 --- /dev/null +++ b/web/themes/dcb2017/package.json @@ -0,0 +1,19 @@ +{ + "name": "dcb2017_theme", + "version": "1.0.0", + "description": "A theme for new Drupalcamp Bristol site.", + "main": "gulpfile.js", + "author": "", + "license": "ISC", + "dependencies": { + }, + "devDependencies": { + "gulp": "^3.9.1", + "gulp-autoprefixer": "^2.3.1", + "gulp-sass": "^2.0.4", + "gulp-sourcemaps": "^1.5.2" + }, + "scripts": { + "postinstall": "find node_modules/ -name '*.info' -type f -delete" + } +} diff --git a/web/themes/dcb2017/sass/_global.scss b/web/themes/dcb2017/sass/_global.scss new file mode 100644 index 000000000..42f9e137f --- /dev/null +++ b/web/themes/dcb2017/sass/_global.scss @@ -0,0 +1,9 @@ +html { + font-family: 'Poppins', sans-serif; + font-size: 16px; +} + +body { + background: white; +} + diff --git a/web/themes/dcb2017/sass/base/_mixins.scss b/web/themes/dcb2017/sass/base/_mixins.scss new file mode 100644 index 000000000..c8261108d --- /dev/null +++ b/web/themes/dcb2017/sass/base/_mixins.scss @@ -0,0 +1,13 @@ +@mixin button { + background: $dcb-blue; + border: 0; + color: white; + font-weight: bold; + padding: 0.5rem 1rem; + text-transform: uppercase; + + &:hover, + &:focus { + background: $dcb-green; + } +} diff --git a/web/themes/dcb2017/sass/base/_variables.scss b/web/themes/dcb2017/sass/base/_variables.scss new file mode 100644 index 000000000..042771ee9 --- /dev/null +++ b/web/themes/dcb2017/sass/base/_variables.scss @@ -0,0 +1,5 @@ +// Custom variables, colours etc. + +$dcb-green: #44efb9; +$dcb-blue: #b33ee9; +$dcb-purple: #ec16a8; diff --git a/web/themes/dcb2017/sass/components/_blocks.scss b/web/themes/dcb2017/sass/components/_blocks.scss new file mode 100644 index 000000000..3371de507 --- /dev/null +++ b/web/themes/dcb2017/sass/components/_blocks.scss @@ -0,0 +1,18 @@ +.block-system-branding-block { + float: left; + margin: 0.5em 2em; +} + +.site-logo img { + display: block; + width: 11rem; +} + +#block-homepagehero { + font-size: 1.8rem; + line-height: 1.2; + margin: auto; + max-width: 30rem; + padding: 10rem 1rem; + text-align: center; +} diff --git a/web/themes/dcb2017/sass/components/_forms.scss b/web/themes/dcb2017/sass/components/_forms.scss new file mode 100644 index 000000000..6f102571d --- /dev/null +++ b/web/themes/dcb2017/sass/components/_forms.scss @@ -0,0 +1,13 @@ +.form-item > label { + display: block; + font-weight: bold; + + &.option { + display: inline; + font-weight: normal; + } +} + +.form-submit { + @include button; +} diff --git a/web/themes/dcb2017/sass/components/_menus.scss b/web/themes/dcb2017/sass/components/_menus.scss new file mode 100644 index 000000000..0cecdae16 --- /dev/null +++ b/web/themes/dcb2017/sass/components/_menus.scss @@ -0,0 +1,27 @@ +ul.menu { + margin: 0; + padding: 0; + + li.menu-item { + display: inline-block; + padding: 1rem 1.5rem; + text-transform: uppercase; + + a { + color: black; + text-decoration: none; + + &:hover, + &:focus, + &.is-active { + color: $dcb-green; + } + } + } +} + +nav.menu--main { + float: right; + font-weight: bold; + margin: 0.8rem; +} diff --git a/web/themes/dcb2017/sass/layout/_content.scss b/web/themes/dcb2017/sass/layout/_content.scss new file mode 100644 index 000000000..eb7a7a594 --- /dev/null +++ b/web/themes/dcb2017/sass/layout/_content.scss @@ -0,0 +1,4 @@ +.region-content { + margin: 0 auto; + max-width: 72rem; +} diff --git a/web/themes/dcb2017/sass/layout/_featured.scss b/web/themes/dcb2017/sass/layout/_featured.scss new file mode 100644 index 000000000..287b7356b --- /dev/null +++ b/web/themes/dcb2017/sass/layout/_featured.scss @@ -0,0 +1,24 @@ +.region-featured { + position: relative; + + &:after { + background-image: url('../images/dcb-bg.jpg'); + background-size: cover; + content: ''; + position: absolute; + top: 0; + left: 0; + right: 0; + bottom: 0; + z-index: -1; + } +} + +.featured-footer { + background: black; + color: white; + font-size: 1.2rem; + font-weight: bold; + padding: 1rem; + text-align: center; +} diff --git a/web/themes/dcb2017/sass/layout/_footer.scss b/web/themes/dcb2017/sass/layout/_footer.scss new file mode 100644 index 000000000..7ea38cde1 --- /dev/null +++ b/web/themes/dcb2017/sass/layout/_footer.scss @@ -0,0 +1,4 @@ +.region-footer { + margin: 0 auto; + max-width: 72rem; +} diff --git a/web/themes/dcb2017/sass/layout/_header.scss b/web/themes/dcb2017/sass/layout/_header.scss new file mode 100644 index 000000000..c6583ea06 --- /dev/null +++ b/web/themes/dcb2017/sass/layout/_header.scss @@ -0,0 +1,5 @@ +.region-header { + margin: 0 auto; + max-width: 72rem; + overflow: hidden; +} diff --git a/web/themes/dcb2017/sass/style.scss b/web/themes/dcb2017/sass/style.scss new file mode 100644 index 000000000..acdbff537 --- /dev/null +++ b/web/themes/dcb2017/sass/style.scss @@ -0,0 +1,15 @@ +// External libraries. + + +@import 'base/variables'; +@import 'base/mixins'; + +@import 'global'; // Global Theme Customizations. +@import 'layout/header'; +@import 'layout/featured'; +@import 'layout/content'; +@import 'layout/footer'; + +@import 'components/menus'; +@import 'components/blocks'; +@import 'components/forms'; diff --git a/web/themes/dcb2017/templates/blocks/block--homepagehero.html.twig b/web/themes/dcb2017/templates/blocks/block--homepagehero.html.twig new file mode 100644 index 000000000..417cdc309 --- /dev/null +++ b/web/themes/dcb2017/templates/blocks/block--homepagehero.html.twig @@ -0,0 +1,49 @@ +{# +/** + * @file + * Theme override to display a block. + * + * Available variables: + * - plugin_id: The ID of the block implementation. + * - label: The configured label of the block if visible. + * - configuration: A list of the block's configuration values. + * - label: The configured label for the block. + * - label_display: The display settings for the label. + * - provider: The module or other provider that provided this block plugin. + * - Block plugin specific settings will also be stored here. + * - content: The content of this block. + * - attributes: array of HTML attributes populated by modules, intended to + * be added to the main container tag of this template. + * - id: A valid HTML ID and guaranteed unique. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * - title_prefix: Additional output populated by modules, intended to be + * displayed in front of the main title tag that appears in the template. + * - title_suffix: Additional output populated by modules, intended to be + * displayed after the main title tag that appears in the template. + * + * @see template_preprocess_block() + */ +#} +{% + set classes = [ + 'block', + 'block-' ~ configuration.provider|clean_class, + 'block-' ~ plugin_id|clean_class, + ] +%} +