diff --git a/sites/all/themes/contrib/basic/.gitignore b/sites/all/themes/contrib/basic/.gitignore new file mode 100644 index 000000000..153e34d6d --- /dev/null +++ b/sites/all/themes/contrib/basic/.gitignore @@ -0,0 +1,6 @@ +*.scssc +*.sassc +.sass-cache +*.map +node_modules +.DS_Store diff --git a/sites/all/themes/contrib/basic/Gruntfile.js b/sites/all/themes/contrib/basic/Gruntfile.js new file mode 100644 index 000000000..fad4c59e9 --- /dev/null +++ b/sites/all/themes/contrib/basic/Gruntfile.js @@ -0,0 +1,154 @@ +/** + * @file + */ +module.exports = function(grunt) { + + // This is where we configure each task that we'd like to run. + grunt.initConfig({ + pkg: grunt.file.readJSON('package.json'), + watch: { + // This is where we set up all the tasks we'd like grunt to watch for changes. + scripts: { + files: ['js/source/**/*.js'], + tasks: ['uglify'], + options: { + spawn: false, + }, + }, + images: { + files: ['images/source/**/*.{png,jpg,gif}'], + tasks: ['imagemin'], + options: { + spawn: false, + } + }, + vector: { + files: ['images/source/**/*.svg'], + tasks: ['svgmin'], + options: { + spawn: false, + } + }, + css: { + files: ['sass/**/*.{scss,sass}'], + tasks: ['sass', 'postcss'] + } + }, + uglify: { + // This is for minifying all of our scripts. + options: { + sourceMap: true, + mangle: false + }, + my_target: { + files: [{ + expand: true, + cwd: 'js/source', + src: '**/*.js', + dest: 'js/build' + }] + } + }, + imagemin: { + // This will optimize all of our images for the web. + dynamic: { + files: [{ + expand: true, + cwd: 'images/source/', + src: ['**/*.{png,jpg,gif}'], + dest: 'images/optimized/' + }] + } + }, + svgmin: { + options: { + plugins: [{ + removeViewBox: false + }, { + removeUselessStrokeAndFill: false + }] + }, + dist: { + files: [{ + expand: true, + cwd: 'images/source/', + src: ['**/*.svg'], + dest: 'images/optimized/' + }] + } + }, + sass: { + // This will compile all of our sass files + // Additional configuration options can be found at https://github.com/sindresorhus/grunt-sass + options: { + sourceMap: true, + // This controls the compiled css and can be changed to nested, compact or compressed. + outputStyle: 'expanded', + precision: 5 + }, + dist: { + files: { + 'css/base/base.css': 'sass/base/base.sass', + 'css/components/components.css': 'sass/components/components.sass', + 'css/components/tabs.css': 'sass/components/tabs.sass', + 'css/components/messages.css': 'sass/components/messages.sass', + 'css/layout/layout.css': 'sass/layout/layout.sass', + 'css/theme/theme.css': 'sass/theme/theme.sass', + 'css/theme/print.css': 'sass/theme/print.sass' + } + } + }, + postcss:{ + options: { + processors: [ + require('pixrem')(), + require('autoprefixer')({browsers: 'last 5 versions'}) + ] + }, + dist:{ + files:{ + 'css/base/base.css': 'css/base/base.css', + 'css/components/components.css': 'css/components/components.css', + 'css/components/tabs.css': 'css/components/tabs.css', + 'css/components/messages.css': 'css/components/messages.css', + 'css/layout/layout.css': 'css/layout/layout.css', + 'css/theme/theme.css': 'css/theme/theme.css', + 'css/theme/print.css': 'css/theme/print.css' + } + } + }, + browserSync: { + dev: { + bsFiles: { + src : [ + 'css/**/*.css', + 'templates/**/*.twig', + 'images/optimized/**/*.{png,jpg,gif,svg}', + 'js/build/**/*.js', + '*.theme' + ] + }, + options: { + watchTask: true, + // Change this to "true" if you'd like the css to be injected rather than a browser refresh. In order for this to work with Drupal you will need to install https://drupal.org/project/link_css keep in mind though that this should not be run on a production site. + injectChanges: false + } + } + }, + }); + // This is where we tell Grunt we plan to use this plug-in. + grunt.loadNpmTasks('grunt-contrib-uglify'); + grunt.loadNpmTasks('grunt-contrib-imagemin'); + grunt.loadNpmTasks('grunt-svgmin'); + grunt.loadNpmTasks('grunt-sass'); + grunt.loadNpmTasks('grunt-postcss'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-browser-sync'); + // Now that we've loaded the package.json and the node_modules we set the base path + // for the actual execution of the tasks + // grunt.file.setBase('/') + // This is where we tell Grunt what to do when we type "grunt" into the terminal. + // Note: if you'd like to run and of the tasks individually you can do so by typing 'grunt mytaskname' alternatively + // you can type 'grunt watch' to automatically track your files for changes. + grunt.registerTask('default', ['browserSync','watch']); +}; diff --git a/sites/all/themes/contrib/basic/LICENSE.txt b/sites/all/themes/contrib/basic/LICENSE.txt new file mode 100644 index 000000000..d159169d1 --- /dev/null +++ b/sites/all/themes/contrib/basic/LICENSE.txt @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Lesser General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License along + with this program; if not, write to the Free Software Foundation, Inc., + 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) year name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Lesser General +Public License instead of this License. diff --git a/sites/all/themes/contrib/basic/README.txt b/sites/all/themes/contrib/basic/README.txt new file mode 100644 index 000000000..876d8b5e3 --- /dev/null +++ b/sites/all/themes/contrib/basic/README.txt @@ -0,0 +1,242 @@ + +===================== +Introduction to Basic +===================== + +Basic boasts a clean HTML5 structure with extensible CSS classes and IDs for +unlimited theming possibilities as well as a top-down load order for improved +SEO. It is fully responsive out-of-the-box and provides an adaptive, elegant, +SASS-based grid system (Bourbon Neat). + +Basic's goal is to provide themers the building blocks needed to get their +designs up and running quickly and simply. + +Basic is perfect if you want a simple, smart, and flexible theme starter. + +Less code spam, more ham. + + +============ +Installation +============ + +Basic utilizes SASS for adaptive grids and layouts and general structure of the +site. It's recommended to use SASS for building out your theme. The following +packages are included via 'npm install' + - SASS (http://sass-lang.com/) + - Bourbon (http://bourbon.io/) + - Bourbon Neat (http://neat.bourbon.io/) + +Basic is meant to be YOUR theme. Follow one of the two methods below and you can +rename 'basic' to another name like 'mytheme'. You're also welcome to keep +'basic'. + +1. DRUSH: The provided drush install script will duplicate the basic theme + folder and rename all appropriate files and content to the new theme name you + provide. + + - Download and enable the basic theme: $ drush en basic + - Set the theme as default $ drush config-set system.theme default basic + or copy the includes/basic.drush.inc into your .drush folder. + - Run the provided drush install script: $ drush basic-install + - The script will first ask you to enter your theme name (eg. My Theme). + Second, it will ask you to enter a machine name (eg. my_theme). + - After complete, you can enable your new theme: $drush en my_theme + - At this time, you can uninstall basic: $drush pmu basic + - Commence work on your theme! + +2. MANUAL: To manually change the name of the theme follow these steps BEFORE + enabling the theme: + + - Rename the theme folder to 'mytheme' + - Rename basic.info.yml to mytheme.info.yml + - edit basic.info.yml and change the name, description, project (can be + deleted), and change all other instances of 'basic' to 'mytheme' + - Rename basic.libraries.yml to mytheme.libraries.yml + - Rename basic.theme to mytheme.theme + - in basic.theme, change each instance of 'basic' to 'mytheme' + - Rename config/schema/basic.schema.yml to mytheme.schema.yml + - Rename each file in config/install from block.block.basic_tools.yml (for + example) to block.block.mytheme_tools.yml + - Every file in config/install, change each instance of 'basic' to + 'mytheme' + - In js/source/scripts.js, change each instance of 'basic' to 'mytheme' + - In theme-settings.php, change each instance of 'basic' to 'mytheme' + - In templates/html.html.twig, change each instance of 'basic' to 'mytheme' + - In templates/menu-local-tasks.html.twig, change each instance of 'basic' to + 'mytheme' + - In templates/status-messages.html.twig, change each instance of 'basic' to + 'mytheme' + + When renaming, remember the following: + - Do not simply replace every instance of 'basic' in every file in the theme. + Most of Basic's dependencies use the word 'basic' somewhere and renaming + these instances will cause Basic to break in unpredictable ways. + - If you don't rename all these files, you may get a vague and unhelpful error + message when attempting to enable your theme: "The website encountered an + unexpected error. Please try again later." Turn on a higher level of error + logging in your server's php.ini to help determine what you've missed. + - If you don't bother renaming Basic in the above locations, be advised that + you will run into conflicts with other versions of Basic on your site. If + your site uses more than one theme based on Basic, make sure at least one of + the themes has been renamed properly! + + +============================ +How to compile SASS in Basic +============================ + +To use SASS and automatically compile it within your theme, please refer to "How +to Use Grunt with Basic" in the documentation below. + +Install node-sass: + + npm install node-sass -g + +If you don't like Grunt, or would just prefer to use SASS' internal watch +functionality, simply cd into your theme directory and run: + + node-sass sass -o css --output-style expanded --source-map true --watch + +Or simply compile the latest: + + node-sass sass -o css --output-style expanded --source-map true + + +======================= +What are the files for? +======================= + +- basic.info.yml + Provide informations about the theme, like regions and libraries. +- block.html.twig + Template to edit the blocks. +- comment.html.twig + Template to edit the comments. +- node.html.twig + Template to edit the nodes (in content). +- page.html.twig + Template to edit the page. +- basic.theme + Used to modify Drupal's default behavior before outputting HTML through the + templates. +- theme-settings.php + Provides additional settings in the theme settings page. + + +============ +In /sass +============ + +- layout/layout.sass + Defines the layout of the theme (compiles to css/layout/layout.css) +- theme/print.sass + Defines the way the theme looks when printed (compiles to css/theme/print.css) +- components/tabs.sass + Styles for the admin tabs (compiles to css/components/tabs.css) + + +============ +In /js +============ + +- modernizr.js + Modernizr detects HTML and CSS features and applies classes to + the object you can then reference in your stylesheets. Use the URL at + the top of the modernizr.js file to customize the features you wish to detect. +- selectivizr-min.js + This script will only be loaded for Internet Explorer 8 + through the ie8 theme library. It will provide a JS fallback for CSS :nth- + child, an important part of the Bourbon Neat grid system, as it is not + supported in Internet Explorer 8. +- build/scripts.js & source/scripts.js + When using Grunt, save files to the + source folder and a minified version will automatically be saved to the build + folder. See comments in basic.libraries.yml file to enable the starter + scripts.js file. + + +=================== +Changing the Layout +=================== + +The layout used in Basic is fairly similar to the Holy Grail method. It has been +tested on all major browsers including IE (5 to >10), Opera, Firefox, Safari, +and Chrome. The purpose of this method is to have a minimal markup for an ideal +display. For accessibility and search engine optimization, the best order to +display a page is the following: + +1. Header +2. Content +3. Sidebars +4. Footer + +This is how the page template is buit in Basic, and it works in fluid and fixed +layout. Refer to the notes in layout.sass to see how to modify the layout. + + +=========================== +How to Use Grunt with Basic +=========================== + +Grunt (http://gruntjs.com/) requires Node.JS to be installed on your machine. +There are various package managers that can handle this for you. + +https://nodejs.org/download/ + +Once Node.JS is installed, go to the root folder of Basic and install your Grunt +packages: + + npm install + +This will install the neccessary node_modules to run Grunt. In order for Grunt +to work from the command line we are going to need the Grunt CLI. Open a new +Terminal window and type: + + npm install -g grunt-cli + +This will install the CLI globally. Restart terminal when that is complete and +you will now be able to use Grunt commands. + +Once installed, cd to the root folder of Basic and run Grunt via the command +line: + + grunt + +This will initialize Grunt and start watching changes to your SASS files. Voilà! + + +============== +Updating Basic +============== + +Once you start using Basic, you will massively change it until you reach the +point where it has nothing to do with Basic anymore. Unlike Zen, Basic is not +intended to be use as a base theme for a sub-theme (even though it is possible +to do so). Because of this, it is not necessary to update your theme when a new +version of Basic comes out. Always see Basic as a STARTER, and as soon as you +start using it, it is not Basic anymore, but your own theme. + +If you didn't rename your theme, but you don't want to be notified when Basic +has a new version by the update module, simply delete "project = "basic" in +basic.info.yml. + + +================ +Bugs & Questions +================ + +Thanks for using Basic, and remember to use the issue queue in drupal.org for +any questions or bug reports: + +http://drupal.org/project/issues/basic + + +==================== +Current maintainers: +==================== +* Steve Krueger (SteveK) - https://www.drupal.org/u/stevek +* Leah Marsh (leahtard) - https://www.drupal.org/u/leahtard +* Joël Pittet (joelpittet) - https://www.drupal.org/u/joelpittet +* Catherine Winters (CatherineOmega) - https://www.drupal.org/u/catherineomega +* Johannes Schmidt (johannez) - https://www.drupal.org/u/johannez diff --git a/sites/all/themes/contrib/basic/basic.info.yml b/sites/all/themes/contrib/basic/basic.info.yml new file mode 100644 index 000000000..53a660df9 --- /dev/null +++ b/sites/all/themes/contrib/basic/basic.info.yml @@ -0,0 +1,28 @@ +name: Basic +type: theme +description: 'HTML5, SASS, Responsive grid starter theme.' +package: Core +# version: VERSION +# core: 8.x + +libraries: + - core/normalize + - basic/global + + +regions: + header: Header + help: Help + page_top: 'Page top' + page_bottom: 'Page bottom' + highlighted: Highlighted + content: Content + sidebar_first: 'Sidebar first' + sidebar_second: 'Sidebar second' + footer: Footer + +# Information added by Drupal.org packaging script on 2017-10-15 +version: '8.x-1.3' +core: '8.x' +project: 'basic' +datestamp: 1508096954 diff --git a/sites/all/themes/contrib/basic/basic.libraries.yml b/sites/all/themes/contrib/basic/basic.libraries.yml new file mode 100644 index 000000000..21500f5b1 --- /dev/null +++ b/sites/all/themes/contrib/basic/basic.libraries.yml @@ -0,0 +1,40 @@ +global: + version: VERSION + css: + base: + css/base/base.css: {} + layout: + css/layout/layout.css: {} + component: + css/components/components.css: {} + theme: + css/theme/theme.css: {} + css/theme/print.css: { media: print } + js: + js/modernizr.js: {} + # js/build/scripts.js: {} + # dependencies: + # - core/drupal + # - core/jquery + + # Uncomment the code above to load scripts.js file on all pages. This file also requires JQuery to be + # loaded on all pages. Consider implimenting your scripts through theme libraries if you wish to + # avoid this. https://www.drupal.org/developing/api/8/assets + +tabs: + version: VERSION + css: + component: + css/components/tabs.css: {} + +messages: + version: VERSION + css: + component: + css/components/messages.css: {} + +ie8: + version: VERSION + header: true + js: + js/selectivizr-min.js: { browsers: { IE: 'lte IE 8', '!IE': false }, minified: true, preprocess: false } diff --git a/sites/all/themes/contrib/basic/basic.theme b/sites/all/themes/contrib/basic/basic.theme new file mode 100644 index 000000000..5781cc09a --- /dev/null +++ b/sites/all/themes/contrib/basic/basic.theme @@ -0,0 +1,55 @@ +isFrontPage(); + } + catch (Exception $e) { + // If the database is not yet available, set default values for these + // variables. + $variables['is_front'] = FALSE; + } + + // If we're on the front page. + if (!$variables['is_front']) { + // Add unique classes for each page and website section. + $path = \Drupal::service('path.current')->getPath(); + $alias = \Drupal::service('path.alias_manager')->getAliasByPath($path); + $alias = trim($alias, '/'); + if (!empty($alias)) { + $name = str_replace('/', '-', $alias); + $variables['attributes']['class'][] = 'page-' . $name; + list($section,) = explode('/', $alias, 2); + if (!empty($section)) { + $variables['attributes']['class'][] = 'section-' . $section; + } + } + } + + // Add cachability metadata. + $theme_name = \Drupal::theme()->getActiveTheme()->getName(); + $theme_settings = \Drupal::config($theme_name . '.settings'); + CacheableMetadata::createFromRenderArray($variables) + ->addCacheableDependency($theme_settings) + ->applyTo($variables); + // Union all theme setting variables to the html.html.twig template. + $variables += $theme_settings->getOriginal(); +} + +/** + * Prepares variables for the field.html.twig template. + */ +function basic_preprocess_field(&$variables, $hook) { + // Make additional variables available to the template. + $variables['bundle'] = $variables['element']['#bundle']; +} diff --git a/sites/all/themes/contrib/basic/composer.json b/sites/all/themes/contrib/basic/composer.json new file mode 100644 index 000000000..a8c771a9f --- /dev/null +++ b/sites/all/themes/contrib/basic/composer.json @@ -0,0 +1,46 @@ +{ + "name": "drupal/basic", + "description": "HTML5, SASS, Responsive grid starter theme.", + "type": "drupal-theme", + "homepage": "http://drupal.org/project/basic", + "authors": [ + { + "name": "Steve Krueger", + "email": "steve@thejibe.com", + "homepage": "http://thejibe.com", + "role": "Maintainer" + }, + { + "name": "Joël Pittet", + "email": "joel@pittet.ca", + "homepage": "https://www.drupal.org/u/joelpittet", + "role": "Maintainer" + }, + { + "name": "Leah Wagner", + "email": "leah@thejibe.com", + "homepage": "http://thejibe.com", + "role": "Maintainer" + }, + { + "name": "Catherine Winters", + "email": "catherine@catherinewinters.com", + "homepage": "http://www.catherinewinters.com", + "role": "Maintainer" + }, + { + "name": "Johannes Schmidt", + "email": "mail@2tabs.com", + "homepage": "http://2tabs.com", + "role": "Maintainer" + } + ], + "support": { + "issues": "https://www.drupal.org/project/issues/basic", + "irc": "irc://irc.freenode.org/drupal-contribute", + "source": "http://cgit.drupalcode.org/basic" + }, + "license": "GPL-2.0+", + "minimum-stability": "dev", + "require": {} +} diff --git a/sites/all/themes/contrib/basic/config/install/basic.settings.yml b/sites/all/themes/contrib/basic/config/install/basic.settings.yml new file mode 100644 index 000000000..f4d8524c6 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/install/basic.settings.yml @@ -0,0 +1,9 @@ +browser_sync: + enabled: false + host: localhost + port: 3000 +clear_registry: false +ie_enabled: false +ie_enabled_versions: + ie8: false + ie9: false diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_account_menu.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_account_menu.yml new file mode 100644 index 000000000..e169f53b0 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_account_menu.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - system.menu.account + module: + - system + theme: + - basic +id: basic_account_menu +theme: basic +region: header +weight: 0 +provider: null +plugin: 'system_menu_block:account' +settings: + id: 'system_menu_block:account' + label: 'User account menu' + provider: system + label_display: '0' + level: 1 + depth: 1 +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_branding.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_branding.yml new file mode 100644 index 000000000..ef5012292 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_branding.yml @@ -0,0 +1,22 @@ +langcode: en +status: true +dependencies: + module: + - system + theme: + - basic +id: basic_branding +theme: basic +region: header +weight: 0 +provider: null +plugin: system_branding_block +settings: + id: system_branding_block + label: 'Site branding' + provider: system + label_display: '0' + use_site_logo: true + use_site_name: true + use_site_slogan: true +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_breadcrumbs.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_breadcrumbs.yml new file mode 100644 index 000000000..a7ba2ffaf --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_breadcrumbs.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - system + theme: + - basic +id: basic_breadcrumbs +theme: basic +region: content +weight: -45 +provider: null +plugin: system_breadcrumb_block +settings: + id: system_breadcrumb_block + label: Breadcrumbs + provider: system + label_display: '0' +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_content.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_content.yml new file mode 100644 index 000000000..b1a1d1520 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_content.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - system + theme: + - basic +id: basic_content +theme: basic +region: content +weight: 0 +provider: null +plugin: system_main_block +settings: + id: system_main_block + label: 'Main page content' + provider: system + label_display: '0' +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_footer.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_footer.yml new file mode 100644 index 000000000..b6f6eec81 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_footer.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - system.menu.footer + module: + - system + theme: + - basic +id: basic_footer +theme: basic +region: footer +weight: 0 +provider: null +plugin: 'system_menu_block:footer' +settings: + id: 'system_menu_block:footer' + label: 'Footer menu' + provider: system + label_display: '0' + level: 1 + depth: 0 +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_help.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_help.yml new file mode 100644 index 000000000..f54d8bc6b --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_help.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - help + theme: + - basic +id: basic_help +theme: basic +region: help +weight: -30 +provider: null +plugin: help_block +settings: + id: help_block + label: Help + provider: help + label_display: '0' +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_local_actions.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_local_actions.yml new file mode 100644 index 000000000..c2f0b37ef --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_local_actions.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + theme: + - basic +id: basic_local_actions +theme: basic +region: content +weight: -20 +provider: null +plugin: local_actions_block +settings: + id: local_actions_block + label: 'Primary admin actions' + provider: core + label_display: '0' +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_local_tasks.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_local_tasks.yml new file mode 100644 index 000000000..da84822dd --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_local_tasks.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + theme: + - basic +id: basic_local_tasks +theme: basic +region: content +weight: -40 +provider: null +plugin: local_tasks_block +settings: + id: local_tasks_block + label: Tabs + provider: core + label_display: '0' + primary: true + secondary: true +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_main_menu.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_main_menu.yml new file mode 100644 index 000000000..95168abf9 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_main_menu.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - system.menu.main + module: + - system + theme: + - basic +id: basic_main_menu +theme: basic +region: header +weight: 1 +provider: null +plugin: 'system_menu_block:main' +settings: + id: 'system_menu_block:main' + label: 'Main navigation' + provider: system + label_display: '0' + level: 1 + depth: 1 +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_messages.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_messages.yml new file mode 100644 index 000000000..5b7e6d664 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_messages.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - system + theme: + - basic +id: basic_messages +theme: basic +region: highlighted +weight: 0 +provider: null +plugin: system_messages_block +settings: + id: system_messages_block + label: 'Status messages' + provider: system + label_display: '0' +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_page_title.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_page_title.yml new file mode 100644 index 000000000..d1c324d00 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_page_title.yml @@ -0,0 +1,17 @@ +langcode: en +status: true +dependencies: + theme: + - basic +id: basic_page_title +theme: basic +region: content +weight: -50 +provider: null +plugin: page_title_block +settings: + id: page_title_block + label: 'Page title' + provider: core + label_display: '0' +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_search.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_search.yml new file mode 100644 index 000000000..c417f2f26 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_search.yml @@ -0,0 +1,19 @@ +langcode: en +status: true +dependencies: + module: + - search + theme: + - basic +id: basic_search +theme: basic +region: sidebar_first +weight: -1 +provider: null +plugin: search_form_block +settings: + id: search_form_block + label: Search + provider: search + label_display: visible +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/optional/block.block.basic_tools.yml b/sites/all/themes/contrib/basic/config/optional/block.block.basic_tools.yml new file mode 100644 index 000000000..742d392b7 --- /dev/null +++ b/sites/all/themes/contrib/basic/config/optional/block.block.basic_tools.yml @@ -0,0 +1,23 @@ +langcode: en +status: true +dependencies: + config: + - system.menu.tools + module: + - system + theme: + - basic +id: basic_tools +theme: basic +region: sidebar_first +weight: 0 +provider: null +plugin: 'system_menu_block:tools' +settings: + id: 'system_menu_block:tools' + label: Tools + provider: system + label_display: visible + level: 1 + depth: 0 +visibility: { } diff --git a/sites/all/themes/contrib/basic/config/schema/basic.schema.yml b/sites/all/themes/contrib/basic/config/schema/basic.schema.yml new file mode 100644 index 000000000..0a2f592fb --- /dev/null +++ b/sites/all/themes/contrib/basic/config/schema/basic.schema.yml @@ -0,0 +1,33 @@ +basic.settings: + type: theme_settings + label: 'Basic theme settings' + mapping: + browser_sync: + type: mapping + label: 'Enable Browser Sync' + mapping: + enabled: + type: boolean + label: 'Enable Browser Sync' + host: + type: string + label: 'Host' + port: + type: integer + label: 'Port' + clear_registry: + type: boolean + label: 'Enable clear Registry' + ie_enabled: + type: boolean + label: 'Enable IE support HTML classes' + ie_enabled_versions: + type: mapping + label: 'IE versions supported' + mapping: + ie8: + type: boolean + label: 'Support IE8' + ie9: + type: boolean + label: 'Support IE8' diff --git a/sites/all/themes/contrib/basic/css/base/base.css b/sites/all/themes/contrib/basic/css/base/base.css new file mode 100644 index 000000000..921a0f763 --- /dev/null +++ b/sites/all/themes/contrib/basic/css/base/base.css @@ -0,0 +1,271 @@ +html { + box-sizing: border-box; +} + +*, *::after, *::before { + box-sizing: inherit; +} + +button, input[type="button"], input[type="reset"], input[type="submit"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; + background-color: #555; + border: 0; + border-radius: 2px; + color: #fff; + cursor: pointer; + display: inline-block; + font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; + font-size: 16px; + -webkit-font-smoothing: antialiased; + font-weight: 600; + line-height: 1; + padding: 0.75em 1.5em; + text-decoration: none; + transition: background-color 150ms ease; + -webkit-user-select: none; + -moz-user-select: none; + -ms-user-select: none; + user-select: none; + vertical-align: middle; + white-space: nowrap; +} + +button:hover, button:focus, input[type="button"]:hover, input[type="button"]:focus, input[type="reset"]:hover, input[type="reset"]:focus, input[type="submit"]:hover, input[type="submit"]:focus { + background-color: #444444; + color: #fff; +} + +button:disabled, input[type="button"]:disabled, input[type="reset"]:disabled, input[type="submit"]:disabled { + cursor: not-allowed; + opacity: 0.5; +} + +button:disabled:hover, input[type="button"]:disabled:hover, input[type="reset"]:disabled:hover, input[type="submit"]:disabled:hover { + background-color: #555; +} + +fieldset { + background-color: transparent; + border: 0; + margin: 0; + padding: 0; +} + +legend { + font-weight: 600; + margin-bottom: 0.375em; + padding: 0; +} + +label { + display: block; + font-weight: normal; + margin-bottom: 0.375em; +} + +input, +select { + display: block; + font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; + font-size: 16px; +} + +input[type="color"], input[type="date"], input[type="datetime"], input[type="datetime-local"], input[type="email"], input[type="month"], input[type="number"], input[type="password"], input[type="search"], input[type="tel"], input[type="text"], input[type="time"], input[type="url"], input[type="week"], input:not([type]), textarea, +select[multiple] { + background-color: #fff; + border: 1px solid #ddd; + border-radius: 2px; + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06); + box-sizing: border-box; + font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; + font-size: 16px; + margin-bottom: 0.75em; + padding: 0.5em; + transition: border-color 150ms ease; + width: 100%; +} + +input[type="color"]:hover, input[type="date"]:hover, input[type="datetime"]:hover, input[type="datetime-local"]:hover, input[type="email"]:hover, input[type="month"]:hover, input[type="number"]:hover, input[type="password"]:hover, input[type="search"]:hover, input[type="tel"]:hover, input[type="text"]:hover, input[type="time"]:hover, input[type="url"]:hover, input[type="week"]:hover, input:not([type]):hover, textarea:hover, +select[multiple]:hover { + border-color: #b1b1b1; +} + +input[type="color"]:focus, input[type="date"]:focus, input[type="datetime"]:focus, input[type="datetime-local"]:focus, input[type="email"]:focus, input[type="month"]:focus, input[type="number"]:focus, input[type="password"]:focus, input[type="search"]:focus, input[type="tel"]:focus, input[type="text"]:focus, input[type="time"]:focus, input[type="url"]:focus, input[type="week"]:focus, input:not([type]):focus, textarea:focus, +select[multiple]:focus { + border-color: #555; + box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.06), 0 0 5px rgba(72, 72, 72, 0.7); + outline: none; +} + +input[type="color"]:disabled, input[type="date"]:disabled, input[type="datetime"]:disabled, input[type="datetime-local"]:disabled, input[type="email"]:disabled, input[type="month"]:disabled, input[type="number"]:disabled, input[type="password"]:disabled, input[type="search"]:disabled, input[type="tel"]:disabled, input[type="text"]:disabled, input[type="time"]:disabled, input[type="url"]:disabled, input[type="week"]:disabled, input:not([type]):disabled, textarea:disabled, +select[multiple]:disabled { + background-color: #f2f2f2; + cursor: not-allowed; +} + +input[type="color"]:disabled:hover, input[type="date"]:disabled:hover, input[type="datetime"]:disabled:hover, input[type="datetime-local"]:disabled:hover, input[type="email"]:disabled:hover, input[type="month"]:disabled:hover, input[type="number"]:disabled:hover, input[type="password"]:disabled:hover, input[type="search"]:disabled:hover, input[type="tel"]:disabled:hover, input[type="text"]:disabled:hover, input[type="time"]:disabled:hover, input[type="url"]:disabled:hover, input[type="week"]:disabled:hover, input:not([type]):disabled:hover, textarea:disabled:hover, +select[multiple]:disabled:hover { + border: 1px solid #ddd; +} + +textarea { + resize: vertical; +} + +[type="search"] { + -webkit-appearance: none; + -moz-appearance: none; + appearance: none; +} + +[type="checkbox"], +[type="radio"] { + display: inline; + margin-right: 0.375em; +} + +[type="file"] { + margin-bottom: 0.75em; + width: 100%; +} + +select { + margin-bottom: 1.5em; + max-width: 100%; + width: auto; +} + +ul, +ol { + list-style-type: none; + margin: 0; + padding: 0; +} + +dl { + margin-bottom: 0.75em; +} + +dl dt { + font-weight: 600; + margin-top: 0.75em; +} + +dl dd { + margin: 0; +} + +picture, +img { + max-width: 100%; + height: auto; + vertical-align: top; +} + +table { + border-collapse: collapse; + margin: 0.75em 0; + table-layout: fixed; + width: 100%; +} + +th { + border-bottom: 1px solid #a6a6a6; + font-weight: 600; + padding: 0.75em 0; + text-align: left; +} + +td { + border-bottom: 1px solid #ddd; + padding: 0.75em 0; +} + +tr, +td, +th { + vertical-align: middle; +} + +body { + color: #333; + font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; + font-size: 16px; + line-height: 1.5; + letter-spacing: 0.03em; +} + +h1, +h2, +h3, +h4, +h5, +h6 { + font-family: "Helvetica Neue", "Helvetica", "Roboto", "Arial", sans-serif; + font-size: 16px; + line-height: 1.3; + margin: 0 0 0.75em; +} + +h1 { + font-size: 2.2em; +} + +h2 { + font-size: 1.8em; +} + +h3 { + font-size: 1.4em; +} + +h4 { + font-size: 1.2em; +} + +h5 { + font-size: 1.1em; +} + +p { + margin: 0 0 0.75em; +} + +a { + color: #555; + text-decoration: none; + transition: color 150ms ease; +} + +a:active, a:focus, a:hover { + color: #404040; +} + +hr { + border-bottom: 1px solid #ddd; + border-left: 0; + border-right: 0; + border-top: 0; + margin: 1.5em 0; +} + +pre, code, tt { + font: 1em "andale mono", "lucida console", monospace; + line-height: 1.5; +} + +pre { + background-color: #efefef; + display: block; + padding: 5px; + margin: 5px 0; + border: 1px solid #aaaaaa; +} + +abbr { + border-bottom: 1px dotted #666666; + cursor: help; + white-space: nowrap; +} \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/css/components/components.css b/sites/all/themes/contrib/basic/css/components/components.css new file mode 100644 index 000000000..08e57a08c --- /dev/null +++ b/sites/all/themes/contrib/basic/css/components/components.css @@ -0,0 +1,33 @@ +html { + box-sizing: border-box; +} + +*, *::after, *::before { + box-sizing: inherit; +} + +.breadcrumb li { + list-style-type: none; + display: inline-block; +} + +#navigation li { + list-style-type: none; + display: inline-block; +} + +.site-name { + font-size: 2.2em; + line-height: 1.3em; + font-weight: 300; + padding: 0 0 0.5em; + margin: 0; +} + +.pager__item { + display: inline; +} + +.pager__item a { + display: inline-block; +} \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/css/components/messages.css b/sites/all/themes/contrib/basic/css/components/messages.css new file mode 100644 index 000000000..395ec23e1 --- /dev/null +++ b/sites/all/themes/contrib/basic/css/components/messages.css @@ -0,0 +1,50 @@ +html { + box-sizing: border-box; +} + +*, *::after, *::before { + box-sizing: inherit; +} + +.messages { + padding: 9px; + margin: 1em 0; + color: #919191; + background-color: #ddd; + border: 1px solid #c4c4c4; + word-wrap: break-word; +} + +.messages pre { + border: 0; +} + +.messages--warning { + color: #903023; + background-color: #ddc44f; + border-color: #d1b328; +} + +.messages--warning pre { + background-color: #d1b328; +} + +.messages--error { + color: white; + background-color: #cd4533; + border-color: #a53728; +} + +.messages--error pre { + background-color: #a53728; +} + +.messages--status { + color: #304319; + background-color: #8dbe51; + border-color: #73a03c; +} + +.messages--status pre { + background-color: #73a03c; +} \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/css/components/tabs.css b/sites/all/themes/contrib/basic/css/components/tabs.css new file mode 100644 index 000000000..8392afa33 --- /dev/null +++ b/sites/all/themes/contrib/basic/css/components/tabs.css @@ -0,0 +1,24 @@ +html { + box-sizing: border-box; +} + +*, *::after, *::before { + box-sizing: inherit; +} + +ul.tabs { + width: 100%; + margin: 0 0 5px; + border-bottom: 1px solid #ddd; +} + +ul.tabs li { + display: inline-block; +} + +ul.tabs a { + display: block; + border: 1px solid #ddd; + border-bottom: 0; + border-radius: 3px 3px 0 0; +} \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/css/layout/layout.css b/sites/all/themes/contrib/basic/css/layout/layout.css new file mode 100644 index 000000000..89a759b57 --- /dev/null +++ b/sites/all/themes/contrib/basic/css/layout/layout.css @@ -0,0 +1,174 @@ +html { + box-sizing: border-box; +} + +*, *::after, *::before { + box-sizing: inherit; +} + +.container { + max-width: 1200px; + margin-left: auto; + margin-right: auto; + width: auto; +} + +.container::after { + clear: both; + content: ""; + display: block; +} + +@media screen and (min-width: 45em) { + .one-sidebar.sidebar-second #content { + float: left; + display: block; + margin-right: 3.22581%; + width: 74.19355%; + } + .one-sidebar.sidebar-second #content:last-child { + margin-right: 0; + } +} + +@media screen and (min-width: 60em) { + .one-sidebar.sidebar-second #content { + float: left; + display: block; + margin-right: 2.12766%; + width: 65.95745%; + } + .one-sidebar.sidebar-second #content:last-child { + margin-right: 0; + } +} + +@media screen and (min-width: 45em) { + .one-sidebar.sidebar-first #content { + float: left; + display: block; + margin-right: 3.22581%; + width: 74.19355%; + margin-left: 25.80645%; + } + .one-sidebar.sidebar-first #content:last-child { + margin-right: 0; + } +} + +@media screen and (min-width: 60em) { + .one-sidebar.sidebar-first #content { + float: left; + display: block; + margin-right: 2.12766%; + width: 74.46809%; + margin-left: 25.53191%; + } + .one-sidebar.sidebar-first #content:last-child { + margin-right: 0; + } +} + +@media screen and (min-width: 45em) { + .two-sidebars #content { + float: left; + display: block; + margin-right: 3.22581%; + width: 48.3871%; + margin-left: 25.80645%; + } + .two-sidebars #content:last-child { + margin-right: 0; + } +} + +@media screen and (min-width: 60em) { + .two-sidebars #content { + float: left; + display: block; + margin-right: 2.12766%; + width: 40.42553%; + margin-left: 25.53191%; + } + .two-sidebars #content:last-child { + margin-right: 0; + } +} + +@media screen and (min-width: 45em) { + #sidebar-first { + float: left; + display: block; + margin-right: 3.22581%; + width: 22.58065%; + margin-left: -77.41935%; + } + #sidebar-first:last-child { + margin-right: 0; + } + .one-sidebar.sidebar-first #sidebar-first { + margin-left: -103.22581%; + } +} + +@media screen and (min-width: 60em) { + #sidebar-first { + float: left; + display: block; + margin-right: 2.12766%; + width: 23.40426%; + margin-left: -68.08511%; + } + #sidebar-first:last-child { + margin-right: 0; + } + .one-sidebar.sidebar-first #sidebar-first { + margin-left: -102.12766%; + } +} + +@media screen and (min-width: 45em) { + #sidebar-second { + float: left; + display: block; + margin-right: 3.22581%; + width: 22.58065%; + margin-left: 0%; + } + #sidebar-second:last-child { + margin-right: 0; + } +} + +@media screen and (min-width: 60em) { + #sidebar-second { + float: left; + display: block; + margin-right: 2.12766%; + width: 31.91489%; + margin-left: 0%; + } + #sidebar-second:last-child { + margin-right: 0; + } +} + +#footer { + float: none; + clear: both; +} + +#header, #footer, +#sidebar-first, +#sidebar-second, +#navigation { + background: rgba(170, 170, 170, 0.2); +} + +#header, +#footer, +.mission, +.breadcrumb, +.node { + clear: both; +} \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/css/theme/print.css b/sites/all/themes/contrib/basic/css/theme/print.css new file mode 100644 index 000000000..eb22536da --- /dev/null +++ b/sites/all/themes/contrib/basic/css/theme/print.css @@ -0,0 +1,34 @@ +* { + background-color: transparent; +} + +.sidebar, +#navigation, +#header-region, +#footer, +.breadcrumb, +.tabs, +.feed-icon, +.links { + display: none; +} + +.layout-container { + width: 100%; +} + +#content, +.title { + margin: 20px 0; + width: auto; +} + +a:hover, a:active, a:link, a:visited { + color: black; +} + +#content a:link:after, #content a:visited:after { + content: " (" attr(href) ") "; + font-size: 0.8em; + font-weight: normal; +} \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/css/theme/theme.css b/sites/all/themes/contrib/basic/css/theme/theme.css new file mode 100644 index 000000000..cb389d387 --- /dev/null +++ b/sites/all/themes/contrib/basic/css/theme/theme.css @@ -0,0 +1,7 @@ +html { + box-sizing: border-box; +} + +*, *::after, *::before { + box-sizing: inherit; +} \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/images/optimized/README.txt b/sites/all/themes/contrib/basic/images/optimized/README.txt new file mode 100644 index 000000000..a316d5431 --- /dev/null +++ b/sites/all/themes/contrib/basic/images/optimized/README.txt @@ -0,0 +1,26 @@ +============================= +Image Minification with Grunt +============================= + +When running Grunt, save images to /images/source and compressed images will +automatically be saved to /images/optimized. + +=========================== +How to Use Grunt with Basic +=========================== + +Grunt requires Node.JS to be installed on your machine. There are various +package managers that can handle this for you. + +https://nodejs.org/download/ + +Once Node.JS is installed, go to basic/grunt and install your Grunt packages: + + npm install + +This will install the neccessary node_modules to run Grunt. Once installed, run +Grunt via the command line: + + grunt + +This will initialize Grunt and start watching changes to your SASS files. Voilà! diff --git a/sites/all/themes/contrib/basic/images/source/README.txt b/sites/all/themes/contrib/basic/images/source/README.txt new file mode 100644 index 000000000..298d07874 --- /dev/null +++ b/sites/all/themes/contrib/basic/images/source/README.txt @@ -0,0 +1,26 @@ +============================= +Image Minification with Grunt +============================= + +When running Grunt, save images to /images/source and compressed images will +automatically be saved to /images/optimized. + +=========================== +How to Use Grunt with Basic +=========================== + +Grunt requires Node.JS to be installed on your machine. There are various +package managers that can handle this for you. + +https://nodejs.org/download/ + +Once Node.JS is installed, go to basic/grunt and install your Grunt packages: + + npm install + +This will install the neccessary node_modules to run grunt. Once installed, run +Grunt via the command line: + + grunt + +This will initialize Grunt and start watching changes to your SASS files. Voilà! diff --git a/sites/all/themes/contrib/basic/includes/basic.drush.inc b/sites/all/themes/contrib/basic/includes/basic.drush.inc new file mode 100644 index 000000000..f2d8ef8cf --- /dev/null +++ b/sites/all/themes/contrib/basic/includes/basic.drush.inc @@ -0,0 +1,442 @@ + dt('Run through the installation process of the Basic theme.'), + 'options' => array( + 'destination' => array( + 'description' => 'Path to which the theme will be placed. If you\'re providing a relative path, note it is relative to the drupal root.', + 'example-value' => 'themes/', + ), + ), + 'aliases' => array('binstall'), + ); + + return $items; +} + +/** + * Implements hook_drush_help(). + */ +function basic_drush_help($section) { + switch ($section) { + case 'drush:basic-install': + return dt('Runs through an automated process for installing and renaming your theme to use as your own.'); + } +} + +/** + * Implements drush_hook_COMMAND(). + */ +function drush_basic_install() { + drush_print('Checking for npm...'); + $npm_check_output = drush_shell_exec('npm version 2>&1'); + if (strpos($npm_check_output, 'command not found')) { + drush_print('NPM could not be found. Please install npm (https://nodejs.org/en/) and try again.'); + exit(); + } + else { + drush_print('npm was found.'); + } + + // Prompt the user what we're doing. + drush_print('-----------------------------'); + drush_print(dt('Welcome to the Basic Install!')); + drush_print('-----------------------------'); + drush_print(dt('We will perform the automated tasks for you to use your new theme. We will create a copy of the Basic theme and store it in the standard theme directory or in spescified destination.')); + drush_confirm(dt('Do you wish to continue?')); + + // Rebuild the theme data so that we can safely check for the existence of + // themes by using the information provided by list_themes(). + $theme_handler = \Drupal::service('theme_handler'); + $theme_handler->rebuildThemeData(); + + // Prompt for a theme name. + $name = drush_prompt(dt('Please enter the name of that you want for your theme'), 'My Theme'); + + // Try to generate a machine-readable name. If that fails, prompt for one. + if (!$machine_name = drush_basic_generate_theme_name($name)) { + drush_print(dt("Sorry, I couldn't generate a machine-readable name for @name", array( + '@name' => $name, + ))); + } + // Prompt for a theme name using the automatically generated default if any. + drush_set_option('machine-name', drush_basic_require_valid_theme_name(dt('Please enter a machine-readable name for your new theme'), $machine_name)); + + // Try to generate a machine-readable name. If that fails, prompt for one. + if (!$machine_name = drush_get_option('machine-name', drush_basic_generate_theme_name($name))) { + drush_print(dt("Sorry, I couldn't generate a machine-readable name for @name. Please use the '--machine-name' option to specify it manually.", array( + '@name' => $name, + ))); + } + + $origin_path = $theme_handler->getTheme('basic')->getPath(); + $temporary = \Drupal::config('system.file')->get('path.temporary'); + $temp_path = $temporary . '/' . $machine_name; + $destination_path = drush_basic_get_destination($machine_name); + + // Check whether the destination path exist and bail out if it does, + // so we don't delete any important data by accident. + if (file_exists($destination_path)) { + return drush_set_error('BASIC_COPY_PATH', dt('The path !path already exists.', array( + '!path' => $destination_path, + ))); + } + + if (is_dir($temp_path)) { + basic_rm_dir($temp_path); + } + + // Copy into temp directory. + if (!basic_copy_dir($origin_path, $temp_path)) { + return drush_set_error('DRUSH_COPY_DIR_FAILURE', dt('Failed to copy !origin_path to !temp_path.', array( + '!origin_path' => $origin_path, + '!temp_path' => $temp_path, + ))); + } + + // Recursively rewrite the file names and contents of all the files that are + // now in the subtheme's directory to represent the human- and + // machine-readable names of the subtheme. + $search = array( + 'basic' => $machine_name, + 'Basic' => $name, + ); + + if (!drush_basic_rewrite_recursive($temp_path, array_keys($search), array_values($search))) { + return drush_set_error('BASIC_COPY_GENERATE_THEME', dt('Failed to rewrite files and contents while generating theme.')); + } + + // Copy from temp folder into new theme's folder. + if (!basic_copy_dir($temp_path, $destination_path)) { + return drush_set_error('DRUSH_COPY_DIR_FAILURE', dt('Failed to copy !temp_path to !destination_path.', array( + '!temp_path' => $temp_path, + '!destination_path' => $destination_path, + ))); + } + + // Run npm install on the new theme folder. + drush_print(dt("Building node dependencies for the theme @theme. This could take a couple minutes.", array( + '@theme' => $machine_name, + ))); + drush_op('chdir', DRUPAL_ROOT . '/' . $destination_path); + drush_shell_exec('npm install'); + drush_print(dt("Node dependancies have been successfully built.")); + + // Notify user of successful installation. + drush_print(dt("------------------------------------------------------------------")); + drush_print(dt("The new theme, !theme, has been successfully derived from Basic and placed in !destination.", array( + '!theme' => $machine_name, + '!destination' => $destination_path, + ))); + drush_print(dt("------------------------------------------------------------------")); +} + +/** + * Generates a valid machine-readable name for a theme from any string. + * + * @param string $string + * The string to generate the machine-readable name from. + * + * @return string + * The generated machine-readable name. + */ +function drush_basic_generate_theme_name($string) { + // Lowercase to start. + $string = strtolower($string); + // Machine-readable names have to start with a lowercase letter. + // $string = preg_replace('/^[^a-z]+/', '', strtolower($string)); + // Machine-readable names may only contain alphanumeric characters and + // underscores. + $string = preg_replace('/[^a-z0-9_]+/', '_', $string); + // Trim all trailing and leading underscores. + $string = trim($string, '_'); + + // Get list of current themes. + $theme_handler = \Drupal::service('theme_handler'); + $themes = $theme_handler->listInfo(); + + if (isset($themes[$string])) { + $plain = $string; + $counter = 0; + + while (isset($themes[$string])) { + // Make sure that the machine-readable name of the theme is unique. + $string = $plain . '_' . $counter++; + } + } + + return $string; +} + +/** + * Helper function that continuously prompts for a valid machine-readable name. + * + * @param string $message + * The message that should be displayed. + * @param string $default + * (Optional) The default theme name. Defaults to NULL. + * + * @return string + * A valid, unique machine-readable name. + */ +function drush_basic_require_valid_theme_name($message, $default = NULL) { + while (TRUE) { + // Keep prompting for a machine-name until we get an acceptable value. + $prompt = drush_prompt($message, $default); + + if (!preg_match('/^[a-z][a-z0-9_]*$/', $prompt)) { + drush_print('The machine-readable name is invalid. It may only contain lowercase numbers, letters and underscores and must start with a letter.'); + } + else { + + // Get list of current themes. + $theme_handler = \Drupal::service('theme_handler'); + $themes = $theme_handler->listInfo(); + + // Validate that the machine-readable name of the theme is unique. + if (isset($themes[$prompt])) { + drush_print(dt('A theme with the name @name already exists. The machine-readable name must be unique.', array( + '@name' => $prompt, + ))); + } + else { + // The given machine-readable name is valid. Let's proceed. + return $prompt; + } + } + } +} + +/** + * Helper function to get proper destination for the new theme. + * + * @param string $machine_name + * A valid, unique machine-readable name for the new theme. + * + * @return string + * The path to the destination where the new theme should be placed. + */ +function drush_basic_get_destination($machine_name) { + // Find proper destination if no destination option is provided. + if ($destination = drush_get_option('destination')) { + $destination_path = drush_trim_path($destination) . '/' . $machine_name; + } + else { + $site_root = drush_get_context('DRUSH_DRUPAL_SITE_ROOT'); + if ($site_root == 'sites/default') { + $destination_path = 'themes/' . $machine_name; + } + else { + $destination_path = $site_root . '/themes/' . $machine_name; + } + } + $destination_path = drush_normalize_path($destination_path); + return $destination_path; +} + +/** + * Recursively rewrites (and renames) all files in a given path. + * + * @param string $path + * The path to rewrite all files in. + * @param string|array $search + * The string(s) to look for when replacing the file names and contents. Can + * be an array or a string. + * @param string|array $replace + * The string(s) to replace $search with. Can be an array or a string. + * + * @return bool + * TRUE if the operation succeeded, FALSE otherwise. + * + * @see omega_drush_replace_contents() + * @see str_replace() + */ +function drush_basic_rewrite_recursive($path, $search, $replace) { + if (!is_dir($path)) { + return drush_set_error('INVALID_PATH', dt('The given path !path is not a directory.', array( + '!path' => $path, + ))); + } + + // If the file actually is a directory, proceed with the recursion. + $directory = new DirectoryIterator($path); + + foreach ($directory as $item) { + if ($item->isDot()) { + // Do not process '..' and '.'. + continue; + } + + // Retrieve the path of the current item. + $pathname = $item->getPathname(); + if ($item->isDir() && !drush_basic_rewrite_recursive($pathname, $search, $replace)) { + return FALSE; + } + elseif ($item->isFile()) { + // If it is a file, try to replace its contents. + $content = file_get_contents($pathname); + + // Nothing to replace in empty files. + if (empty($content)) { + unlink($pathname); + continue; + } + + if (($changed_content = str_replace($search, $replace, $content)) === NULL) { + return drush_set_error('REWRITE_FAILURE', dt('There was an error while trying to rewrite !path (!search to !replace)', array( + '!path' => $pathname, + '!search' => $search, + '!replace' => $replace, + ))); + } + + if ($content !== $changed_content) { + file_put_contents($pathname, $changed_content); + } + } + } + + return TRUE; +} + +/** + * Copy $src to $dest. + * + * @param string $src + * The directory to copy. + * @param string $dest + * The destination to copy the source to, including the new name of + * the directory. To copy directory "a" from "/b" to "/c", then + * $src = "/b/a" and $dest = "/c/a". To copy "a" to "/c" and rename + * it to "d", then $dest = "/c/d". + * @param int $overwrite + * Action to take if destination already exists. + * - FILE_EXISTS_OVERWRITE - completely removes existing directory. + * - FILE_EXISTS_ABORT - aborts the operation. + * - FILE_EXISTS_MERGE - Leaves existing files and directories in place. + * + * @return bool + * TRUE on success, FALSE on failure. + */ +function basic_copy_dir($src, $dest, $overwrite = FILE_EXISTS_ABORT) { + // Preflight based on $overwrite if $dest exists. + if (file_exists($dest)) { + if ($overwrite === FILE_EXISTS_OVERWRITE) { + drush_op('drush_delete_dir', $dest, TRUE); + } + elseif ($overwrite === FILE_EXISTS_ABORT) { + return drush_set_error('DRUSH_DESTINATION_EXISTS', dt('Destination directory !dest already exists.', array('!dest' => $dest))); + } + elseif ($overwrite === FILE_EXISTS_MERGE) { + // $overwrite flag may indicate we should merge instead. + drush_log(dt('Merging existing !dest directory', array('!dest' => $dest))); + } + } + // $src readable? + if (!is_readable($src)) { + return drush_set_error('DRUSH_SOURCE_NOT_EXISTS', dt('Source directory !src is not readable or does not exist.', array('!src' => $src))); + } + // $dest writable? + if (!is_writable(dirname($dest))) { + return drush_set_error('DRUSH_DESTINATION_NOT_WRITABLE', dt('Destination directory !dest is not writable.', array('!dest' => dirname($dest)))); + } + // Try to do a recursive copy. + if (@drush_op('_basic_recursive_copy', $src, $dest)) { + return TRUE; + } + + return drush_set_error('DRUSH_COPY_DIR_FAILURE', dt('Unable to copy !src to !dest.', array('!src' => $src, '!dest' => $dest))); +} + +/** + * Internal function called by basic_copy_dir; do not use directly. + */ +function _basic_recursive_copy($src, $destination) { + static $machine_name; + if (!isset($machine_name)) { + $machine_name = drush_get_option('machine-name'); + } + // All subdirectories and contents. + $ignore_directories = array( + 'node_modules', + ); + $no_mask = '/^' . implode('|', $ignore_directories) . '$/'; + + if (is_dir($src)) { + if (!drush_mkdir($destination, TRUE)) { + return FALSE; + } + $dir_handle = opendir($src); + while ($file = readdir($dir_handle)) { + if (($file[0] != '.' || $file == '.gitignore') && !preg_match($no_mask, $file)) { + if (_basic_recursive_copy("$src/$file", "$destination/$file") !== TRUE) { + return FALSE; + } + } + } + closedir($dir_handle); + } + elseif (is_link($src)) { + symlink(readlink($src), $destination); + } + elseif (!copy($src, $destination)) { + return FALSE; + } + + // Rename files with basic. + if (strpos($destination, 'basic') !== FALSE) { + $renamed_destination = str_replace('basic', $machine_name, $destination); + rename($destination, $renamed_destination); + } + + // Preserve file modification time. + touch($destination, filemtime($src)); + + // Preserve execute permission. + if (!is_link($src) && !drush_is_windows()) { + // Get execute bits of $src. + $execperms = fileperms($src) & 0111; + // Apply execute permissions if any. + if ($execperms > 0) { + $perms = fileperms($destination) | $execperms; + chmod($destination, $perms); + } + } + + return TRUE; +} + +/** + * Recursively removes all files within the provided directory. + * + * USE WITH CAUTION. + * + * @param string $dir + * File path for the directory you want to delete. + */ +function basic_rm_dir($dir) { + if (is_dir($dir)) { + $objects = scandir($dir); + foreach ($objects as $object) { + if ($object != "." && $object != "..") { + if (is_dir($dir . "/" . $object)) { + basic_rm_dir($dir . "/" . $object); + } + else { + unlink($dir . "/" . $object); + } + } + } + rmdir($dir); + } +} diff --git a/sites/all/themes/contrib/basic/js/build/scripts.js b/sites/all/themes/contrib/basic/js/build/scripts.js new file mode 100644 index 000000000..0134f0b4e --- /dev/null +++ b/sites/all/themes/contrib/basic/js/build/scripts.js @@ -0,0 +1,2 @@ +!function(Drupal,$,window){Drupal.behaviors.basic={attach:function(context,settings){$(window).load(function(){}),$(window).resize(function(){}),$(window).scroll(function(){})}}}(Drupal,jQuery,this); +//# sourceMappingURL=scripts.js.map \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/js/modernizr.js b/sites/all/themes/contrib/basic/js/modernizr.js new file mode 100644 index 000000000..fd25a67e9 --- /dev/null +++ b/sites/all/themes/contrib/basic/js/modernizr.js @@ -0,0 +1,3 @@ +/*! modernizr 3.2.0 (Custom Build) | MIT * + * http://modernizr.com/download/?-applicationcache-audio-backgroundsize-borderimage-boxshadow-canvas-canvastext-cssanimations-csscolumns-cssreflections-csstransforms-csstransforms3d-csstransitions-flexbox-flexboxlegacy-fontface-generatedcontent-geolocation-hashchange-history-hsla-indexeddb-inlinesvg-input-inputtypes-localstorage-multiplebgs-opacity-postmessage-rgba-sessionstorage-smil-svg-svgclippaths-textshadow-video-webgl-websockets-websqldatabase-webworkers-domprefixes-hasevent-mq-prefixes-shiv-testallprops-testprop-teststyles !*/ +!function(e,t,n){function r(e,t){return typeof e===t}function a(){var e,t,n,a,o,i,s;for(var c in b)if(b.hasOwnProperty(c)){if(e=[],t=b[c],t.name&&(e.push(t.name.toLowerCase()),t.options&&t.options.aliases&&t.options.aliases.length))for(n=0;nf;f++)if(g=e[f],h=I.style[g],s(g,"-")&&(g=d(g)),I.style[g]!==n){if(o||r(a,"undefined"))return c(),"pfx"==t?g:!0;try{I.style[g]=a}catch(y){}if(I.style[g]!=h)return c(),"pfx"==t?g:!0}return c(),!1}function h(e,t,n,a,o){var i=e.charAt(0).toUpperCase()+e.slice(1),s=(e+" "+L.join(i+" ")+i).split(" ");return r(t,"string")||r(t,"undefined")?g(s,t,a,o):(s=(e+" "+E.join(i+" ")+i).split(" "),f(s,t,n))}function v(e,t,r){return h(e,n,n,t,r)}var y=[],b=[],x={_version:"3.2.0",_config:{classPrefix:"",enableClasses:!0,enableJSClass:!0,usePrefixes:!0},_q:[],on:function(e,t){var n=this;setTimeout(function(){t(n[e])},0)},addTest:function(e,t,n){b.push({name:e,fn:t,options:n})},addAsyncTest:function(e){b.push({name:null,fn:e})}},Modernizr=function(){};Modernizr.prototype=x,Modernizr=new Modernizr,Modernizr.addTest("applicationcache","applicationCache"in e),Modernizr.addTest("geolocation","geolocation"in navigator),Modernizr.addTest("history",function(){var t=navigator.userAgent;return-1===t.indexOf("Android 2.")&&-1===t.indexOf("Android 4.0")||-1===t.indexOf("Mobile Safari")||-1!==t.indexOf("Chrome")||-1!==t.indexOf("Windows Phone")?e.history&&"pushState"in e.history:!1}),Modernizr.addTest("postmessage","postMessage"in e),Modernizr.addTest("svg",!!t.createElementNS&&!!t.createElementNS("http://www.w3.org/2000/svg","svg").createSVGRect),Modernizr.addTest("websockets","WebSocket"in e&&2===e.WebSocket.CLOSING),Modernizr.addTest("localstorage",function(){var e="modernizr";try{return localStorage.setItem(e,e),localStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("sessionstorage",function(){var e="modernizr";try{return sessionStorage.setItem(e,e),sessionStorage.removeItem(e),!0}catch(t){return!1}}),Modernizr.addTest("websqldatabase","openDatabase"in e),Modernizr.addTest("webworkers","Worker"in e);var T=x._config.usePrefixes?" -webkit- -moz- -o- -ms- ".split(" "):[];x._prefixes=T;var w=t.documentElement,S="svg"===w.nodeName.toLowerCase();S||!function(e,t){function n(e,t){var n=e.createElement("p"),r=e.getElementsByTagName("head")[0]||e.documentElement;return n.innerHTML="x",r.insertBefore(n.lastChild,r.firstChild)}function r(){var e=b.elements;return"string"==typeof e?e.split(" "):e}function a(e,t){var n=b.elements;"string"!=typeof n&&(n=n.join(" ")),"string"!=typeof e&&(e=e.join(" ")),b.elements=n+" "+e,l(t)}function o(e){var t=y[e[h]];return t||(t={},v++,e[h]=v,y[v]=t),t}function i(e,n,r){if(n||(n=t),u)return n.createElement(e);r||(r=o(n));var a;return a=r.cache[e]?r.cache[e].cloneNode():g.test(e)?(r.cache[e]=r.createElem(e)).cloneNode():r.createElem(e),!a.canHaveChildren||m.test(e)||a.tagUrn?a:r.frag.appendChild(a)}function s(e,n){if(e||(e=t),u)return e.createDocumentFragment();n=n||o(e);for(var a=n.frag.cloneNode(),i=0,s=r(),c=s.length;c>i;i++)a.createElement(s[i]);return a}function c(e,t){t.cache||(t.cache={},t.createElem=e.createElement,t.createFrag=e.createDocumentFragment,t.frag=t.createFrag()),e.createElement=function(n){return b.shivMethods?i(n,e,t):t.createElem(n)},e.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+r().join().replace(/[\w\-:]+/g,function(e){return t.createElem(e),t.frag.createElement(e),'c("'+e+'")'})+");return n}")(b,t.frag)}function l(e){e||(e=t);var r=o(e);return!b.shivCSS||d||r.hasCSS||(r.hasCSS=!!n(e,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),u||c(e,r),e}var d,u,f="3.7.3",p=e.html5||{},m=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,g=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,h="_html5shiv",v=0,y={};!function(){try{var e=t.createElement("a");e.innerHTML="",d="hidden"in e,u=1==e.childNodes.length||function(){t.createElement("a");var e=t.createDocumentFragment();return"undefined"==typeof e.cloneNode||"undefined"==typeof e.createDocumentFragment||"undefined"==typeof e.createElement}()}catch(n){d=!0,u=!0}}();var b={elements:p.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:f,shivCSS:p.shivCSS!==!1,supportsUnknownElements:u,shivMethods:p.shivMethods!==!1,type:"default",shivDocument:l,createElement:i,createDocumentFragment:s,addElements:a};e.html5=b,l(t),"object"==typeof module&&module.exports&&(module.exports=b)}("undefined"!=typeof e?e:this,t);var C="Moz O ms Webkit",E=x._config.usePrefixes?C.toLowerCase().split(" "):[];x._domPrefixes=E;var k=function(e){function n(t,n){var a;return t?(n&&"string"!=typeof n||(n=i(n||"div")),t="on"+t,a=t in n,!a&&r&&(n.setAttribute||(n=i("div")),n.setAttribute(t,""),a="function"==typeof n[t],n[t]!==e&&(n[t]=e),n.removeAttribute(t)),a):!1}var r=!("onblur"in t.documentElement);return n}();x.hasEvent=k,Modernizr.addTest("hashchange",function(){return k("hashchange",e)===!1?!1:t.documentMode===n||t.documentMode>7}),Modernizr.addTest("audio",function(){var e=i("audio"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('audio/ogg; codecs="vorbis"').replace(/^no$/,""),t.mp3=e.canPlayType("audio/mpeg;").replace(/^no$/,""),t.opus=e.canPlayType('audio/ogg; codecs="opus"').replace(/^no$/,""),t.wav=e.canPlayType('audio/wav; codecs="1"').replace(/^no$/,""),t.m4a=(e.canPlayType("audio/x-m4a;")||e.canPlayType("audio/aac;")).replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("canvas",function(){var e=i("canvas");return!(!e.getContext||!e.getContext("2d"))}),Modernizr.addTest("canvastext",function(){return Modernizr.canvas===!1?!1:"function"==typeof i("canvas").getContext("2d").fillText}),Modernizr.addTest("video",function(){var e=i("video"),t=!1;try{(t=!!e.canPlayType)&&(t=new Boolean(t),t.ogg=e.canPlayType('video/ogg; codecs="theora"').replace(/^no$/,""),t.h264=e.canPlayType('video/mp4; codecs="avc1.42E01E"').replace(/^no$/,""),t.webm=e.canPlayType('video/webm; codecs="vp8, vorbis"').replace(/^no$/,""),t.vp9=e.canPlayType('video/webm; codecs="vp9"').replace(/^no$/,""),t.hls=e.canPlayType('application/x-mpegURL; codecs="avc1.42E01E"').replace(/^no$/,""))}catch(n){}return t}),Modernizr.addTest("webgl",function(){var t=i("canvas"),n="probablySupportsContext"in t?"probablySupportsContext":"supportsContext";return n in t?t[n]("webgl")||t[n]("experimental-webgl"):"WebGLRenderingContext"in e}),Modernizr.addTest("multiplebgs",function(){var e=i("a").style;return e.cssText="background:url(https://),url(https://),red url(https://)",/(url\s*\(.*?){3}/.test(e.background)}),Modernizr.addTest("opacity",function(){var e=i("a").style;return e.cssText=T.join("opacity:.55;"),/^0.55$/.test(e.opacity)}),Modernizr.addTest("rgba",function(){var e=i("a").style;return e.cssText="background-color:rgba(150,255,150,.5)",(""+e.backgroundColor).indexOf("rgba")>-1}),Modernizr.addTest("inlinesvg",function(){var e=i("div");return e.innerHTML="","http://www.w3.org/2000/svg"==("undefined"!=typeof SVGRect&&e.firstChild&&e.firstChild.namespaceURI)});var P=i("input"),_="autocomplete autofocus list placeholder max min multiple pattern required step".split(" "),N={};Modernizr.input=function(t){for(var n=0,r=t.length;r>n;n++)N[t[n]]=!!(t[n]in P);return N.list&&(N.list=!(!i("datalist")||!e.HTMLDataListElement)),N}(_);var z="search tel url email datetime date month week time datetime-local number range color".split(" "),R={};Modernizr.inputtypes=function(e){for(var r,a,o,i=e.length,s=":)",c=0;i>c;c++)P.setAttribute("type",r=e[c]),o="text"!==P.type&&"style"in P,o&&(P.value=s,P.style.cssText="position:absolute;visibility:hidden;",/^range$/.test(r)&&P.style.WebkitAppearance!==n?(w.appendChild(P),a=t.defaultView,o=a.getComputedStyle&&"textfield"!==a.getComputedStyle(P,null).WebkitAppearance&&0!==P.offsetHeight,w.removeChild(P)):/^(search|tel)$/.test(r)||(o=/^(url|email|number)$/.test(r)?P.checkValidity&&P.checkValidity()===!1:P.value!=s)),R[e[c]]=!!o;return R}(z),Modernizr.addTest("hsla",function(){var e=i("a").style;return e.cssText="background-color:hsla(120,40%,100%,.5)",s(e.backgroundColor,"rgba")||s(e.backgroundColor,"hsla")});var $="CSS"in e&&"supports"in e.CSS,A="supportsCSS"in e;Modernizr.addTest("supports",$||A);var M={}.toString;Modernizr.addTest("svgclippaths",function(){return!!t.createElementNS&&/SVGClipPath/.test(M.call(t.createElementNS("http://www.w3.org/2000/svg","clipPath")))}),Modernizr.addTest("smil",function(){return!!t.createElementNS&&/SVGAnimate/.test(M.call(t.createElementNS("http://www.w3.org/2000/svg","animate")))});var L=x._config.usePrefixes?C.split(" "):[];x._cssomPrefixes=L;var O=function(){var t=e.matchMedia||e.msMatchMedia;return t?function(e){var n=t(e);return n&&n.matches||!1}:function(t){var n=!1;return l("@media "+t+" { #modernizr { position: absolute; } }",function(t){n="absolute"==(e.getComputedStyle?e.getComputedStyle(t,null):t.currentStyle).position}),n}}();x.mq=O;var B=x.testStyles=l,F=function(){var e=navigator.userAgent,t=e.match(/applewebkit\/([0-9]+)/gi)&&parseFloat(RegExp.$1),n=e.match(/w(eb)?osbrowser/gi),r=e.match(/windows phone/gi)&&e.match(/iemobile\/([0-9])+/gi)&&parseFloat(RegExp.$1)>=9,a=533>t&&e.match(/android/gi);return n||a||r}();F?Modernizr.addTest("fontface",!1):B('@font-face {font-family:"font";src:url("https://")}',function(e,n){var r=t.getElementById("smodernizr"),a=r.sheet||r.styleSheet,o=a?a.cssRules&&a.cssRules[0]?a.cssRules[0].cssText:a.cssText||"":"",i=/src/i.test(o)&&0===o.indexOf(n.split(" ")[0]);Modernizr.addTest("fontface",i)}),B('#modernizr{font:0/0 a}#modernizr:after{content:":)";visibility:hidden;font:7px/1 a}',function(e){Modernizr.addTest("generatedcontent",e.offsetHeight>=7)});var j=function(t){var r,a=T.length,o=e.CSSRule;if("undefined"==typeof o)return n;if(!t)return!1;if(t=t.replace(/^@/,""),r=t.replace(/-/g,"_").toUpperCase()+"_RULE",r in o)return"@"+t;for(var i=0;a>i;i++){var s=T[i],c=s.toUpperCase()+"_"+r;if(c in o)return"@-"+s.toLowerCase()+"-"+t}return!1};x.atRule=j;var D={elem:i("modernizr")};Modernizr._q.push(function(){delete D.elem});var I={style:D.elem.style};Modernizr._q.unshift(function(){delete I.style});var W=x.testProp=function(e,t,r){return g([e],n,t,r)};Modernizr.addTest("textshadow",W("textShadow","1px 1px")),x.testAllProps=h,x.testAllProps=v,Modernizr.addTest("cssanimations",v("animationName","a",!0)),Modernizr.addTest("backgroundsize",v("backgroundSize","100%",!0)),Modernizr.addTest("borderimage",v("borderImage","url() 1",!0)),Modernizr.addTest("boxshadow",v("boxShadow","1px 1px",!0)),function(){Modernizr.addTest("csscolumns",function(){var e=!1,t=v("columnCount");try{(e=!!t)&&(e=new Boolean(e))}catch(n){}return e});for(var e,t,n=["Width","Span","Fill","Gap","Rule","RuleColor","RuleStyle","RuleWidth","BreakBefore","BreakAfter","BreakInside"],r=0;r0){var a=l,f,e=s.substring(0,e).replace(H,i);if(e==i||e.charAt(e.length-1)==o)e+="*";try{f=t(e)}catch(k){}if(f){e=0;for(c=f.length;e-1&&(a=a.substring(0,l));if(a.charAt(0)==":")switch(a.slice(1)){case "root":c=function(a){return b?a!=p:a==p};break;case "target":if(m==8){c=function(a){function c(){var d=location.hash,e=d.slice(1);return b?d==i||a.id!=e:d!=i&&a.id==e}k(j,"hashchange",function(){g(a,d,c())});return c()};break}return!1;case "checked":c=function(a){J.test(a.type)&&k(a,"propertychange",function(){event.propertyName=="checked"&&g(a,d,a.checked!==b)});return a.checked!==b};break;case "disabled":b=!b;case "enabled":c=function(c){if(K.test(c.tagName))return k(c,"propertychange",function(){event.propertyName=="$disabled"&&g(c,d,c.a===b)}),q.push(c),c.a=c.disabled,c.disabled===b;return a==":enabled"?b:!b};break;case "focus":e="focus",f="blur";case "hover":e||(e="mouseenter",f="mouseleave");c=function(a){k(a,b?f:e,function(){g(a,d,!0)});k(a,b?e:f,function(){g(a,d,!1)});return b};break;default:if(!L.test(a))return!1}return{className:d,b:c}}function w(a){return M+"-"+(m==6&&N?O++:a.replace(P,function(a){return a.charCodeAt(0)}))}function D(a){return a.replace(x,h).replace(Q,o)}function g(a,c,d){var b=a.className,c=u(b,c,d);if(c!=b)a.className=c,a.parentNode.className+=i}function u(a,c,d){var b=RegExp("(^|\\s)"+c+"(\\s|$)"),e=b.test(a);return d?e?a:a+o+c:e?a.replace(b,h).replace(x,h):a}function k(a,c,d){a.attachEvent("on"+c,d)}function r(a,c){if(/^https?:\/\//i.test(a))return c.substring(0,c.indexOf("/",8))==a.substring(0,a.indexOf("/",8))?a:null;if(a.charAt(0)=="/")return c.substring(0,c.indexOf("/",8))+a;var d=c.split(/[?#]/)[0];a.charAt(0)!="?"&&d.charAt(d.length-1)!="/"&&(d=d.substring(0,d.lastIndexOf("/")+1));return d+a}function y(a){if(a)return n.open("GET",a,!1),n.send(),(n.status==200?n.responseText:i).replace(R,i).replace(S,function(c,d,b,e,f){return y(r(b||f,a))}).replace(T,function(c,d,b){d=d||i;return" url("+d+r(b,a)+d+") "});return i}function U(){var a,c;a=f.getElementsByTagName("BASE");for(var d=a.length>0?a[0].href:f.location.href,b=0;b0&&setInterval(function(){for(var a=0,c=q.length;a8||!n)){var z={NW:"*.Dom.select",MooTools:"$$",DOMAssistant:"*.$",Prototype:"$$",YAHOO:"*.util.Selector.query",Sizzle:"*",jQuery:"*",dojo:"*.query"},t,q=[],O=0,N=!0,M="slvzr",R=/(\/\*[^*]*\*+([^\/][^*]*\*+)*\/)\s*/g,S=/@import\s*(?:(?:(?:url\(\s*(['"]?)(.*)\1)\s*\))|(?:(['"])(.*)\3))[^;]*;/g,T=/\burl\(\s*(["']?)(?!data:)([^"')]+)\1\s*\)/g,L=/^:(empty|(first|last|only|nth(-last)?)-(child|of-type))$/,B=/:(:first-(?:line|letter))/g,C=/(^|})\s*([^\{]*?[\[:][^{]+)/g,G=/([ +~>])|(:[a-z-]+(?:\(.*?\)+)?)|(\[.*?\])/g,H=/(:not\()?:(hover|enabled|disabled|focus|checked|target|active|visited|first-line|first-letter)\)?/g,P=/[^\w-]/g,K=/^(INPUT|SELECT|TEXTAREA|BUTTON)$/,J=/^(checkbox|radio)$/,v=m>6?/[\$\^*]=(['"])\1/:null,E=/([(\[+~])\s+/g,F=/\s+([)\]+~])/g,Q=/\s+/g,x=/^\s*((?:[\S\s]*\S)?)\s*$/,i="",o=" ",h="$1";(function(a,c){function d(){try{p.doScroll("left")}catch(a){setTimeout(d,50);return}b("poll")}function b(d){if(!(d.type=="readystatechange"&&f.readyState!="complete")&&((d.type=="load"?a:f).detachEvent("on"+d.type,b,!1),!e&&(e=!0)))c.call(a,d.type||d)}var e=!1,g=!0;if(f.readyState=="complete")c.call(a,i);else{if(f.createEventObject&&p.doScroll){try{g=!a.frameElement}catch(h){}g&&d()}k(f,"readystatechange",b);k(a,"load",b)}})(j,function(){for(var a in z){var c,d,b=j;if(j[a]){for(c=z[a].replace("*",a).split(".");(d=c.shift())&&(b=b[d]););if(typeof b=="function"){t=b;U();break}}}})}}})(this); diff --git a/sites/all/themes/contrib/basic/js/source/scripts.js b/sites/all/themes/contrib/basic/js/source/scripts.js new file mode 100644 index 000000000..f93ce6fc3 --- /dev/null +++ b/sites/all/themes/contrib/basic/js/source/scripts.js @@ -0,0 +1,37 @@ +/** + * @file + * A JavaScript file for the theme. + * + * In order for this JavaScript to be loaded on pages, see the instructions in + * the README.txt next to this file. + */ + +// JavaScript should be made compatible with libraries other than jQuery by +// wrapping it with an "anonymous closure". See: +// - https://drupal.org/node/1446420 +// - http://www.adequatelygood.com/2010/3/JavaScript-Module-Pattern-In-Depth +(function (Drupal, $) { + 'use strict'; + + // To understand behaviors, see https://www.drupal.org/node/2269515 + Drupal.behaviors.basic = { + attach: function (context, settings) { + + // Execute code once the DOM is ready. $(handler) not required + // within Drupal.behaviors. + $(window).on('load', function () { + // Execute code once the window is fully loaded. + }); + + $(window).on('resize', function () { + // Execute code when the window is resized. + }); + + $(window).on('scroll', function () { + // Execute code when the window scrolls. + }); + + } + }; + +})(Drupal, jQuery); diff --git a/sites/all/themes/contrib/basic/logo.png b/sites/all/themes/contrib/basic/logo.png new file mode 100644 index 000000000..f460ad61e Binary files /dev/null and b/sites/all/themes/contrib/basic/logo.png differ diff --git a/sites/all/themes/contrib/basic/logo.svg b/sites/all/themes/contrib/basic/logo.svg new file mode 100644 index 000000000..3d9432fed --- /dev/null +++ b/sites/all/themes/contrib/basic/logo.svg @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + diff --git a/sites/all/themes/contrib/basic/package.json b/sites/all/themes/contrib/basic/package.json new file mode 100644 index 000000000..31b69dffd --- /dev/null +++ b/sites/all/themes/contrib/basic/package.json @@ -0,0 +1,26 @@ +{ + "name": "basic", + "version": "0.1.0", + "dependencies": { + "bourbon": "~4.3.0", + "bourbon-neat": "~1.8.0", + "grunt": "^1.0.1", + "autoprefixer": "^6.7.2", + "grunt-browser-sync": "^2.2.0", + "grunt-contrib-concat": "^1.0.1", + "grunt-contrib-imagemin": "^1.0.1", + "grunt-contrib-uglify": "^2.1.0", + "grunt-contrib-watch": "^1.0.0", + "grunt-notify": "^0.4.5", + "grunt-sass": "^2.0.0", + "grunt-svgmin": "^4.0.0", + "grunt-postcss": "^0.8.0", + "pixrem": "^3.0.2", + "postcss": "^5.2.12" + }, + "description": "=========================== How to Use Grunt with Basic ===========================", + "main": "Gruntfile.js", + "devDependencies": {}, + "author": "", + "license": "MIT" +} diff --git a/sites/all/themes/contrib/basic/sass/base/_buttons.sass b/sites/all/themes/contrib/basic/sass/base/_buttons.sass new file mode 100755 index 000000000..0aebf6b92 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/base/_buttons.sass @@ -0,0 +1,32 @@ +// Button styles +#{$all-buttons} + appearance: none + background-color: $action-color + border: 0 + border-radius: $base-border-radius + color: #fff + cursor: pointer + display: inline-block + font-family: $base-font-family + font-size: $base-font-size + -webkit-font-smoothing: antialiased + font-weight: 600 + line-height: 1 + padding: $small-spacing $base-spacing + text-decoration: none + transition: background-color $base-duration $base-timing + user-select: none + vertical-align: middle + white-space: nowrap + + &:hover, + &:focus + background-color: shade($action-color, 20%) + color: #fff + + &:disabled + cursor: not-allowed + opacity: 0.5 + + &:hover + background-color: $action-color diff --git a/sites/all/themes/contrib/basic/sass/base/_forms.sass b/sites/all/themes/contrib/basic/sass/base/_forms.sass new file mode 100755 index 000000000..5a62704c3 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/base/_forms.sass @@ -0,0 +1,71 @@ +// Form styles +fieldset + background-color: transparent + border: 0 + margin: 0 + padding: 0 + +legend + font-weight: 600 + margin-bottom: $small-spacing / 2 + padding: 0 + +label + display: block + font-weight: normal + margin-bottom: $small-spacing / 2 + +input, +select + display: block + font-family: $base-font-family + font-size: $base-font-size + +#{$all-text-inputs}, +select[multiple] + background-color: $base-background-color + border: $base-border + border-radius: $base-border-radius + box-shadow: $form-box-shadow + box-sizing: border-box + font-family: $base-font-family + font-size: $base-font-size + margin-bottom: $small-spacing + padding: $base-spacing / 3 + transition: border-color $base-duration $base-timing + width: 100% + + &:hover + border-color: shade($base-border-color, 20%) + + &:focus + border-color: $action-color + box-shadow: $form-box-shadow-focus + outline: none + + &:disabled + background-color: shade($base-background-color, 5%) + cursor: not-allowed + + &:hover + border: $base-border + +textarea + resize: vertical + +[type="search"] + appearance: none + +[type="checkbox"], +[type="radio"] + display: inline + margin-right: $small-spacing / 2 + +[type="file"] + margin-bottom: $small-spacing + width: 100% + +select + margin-bottom: $base-spacing + max-width: 100% + width: auto diff --git a/sites/all/themes/contrib/basic/sass/base/_lists.sass b/sites/all/themes/contrib/basic/sass/base/_lists.sass new file mode 100755 index 000000000..021d0c47a --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/base/_lists.sass @@ -0,0 +1,16 @@ +// List styles +ul, +ol + list-style-type: none + margin: 0 + padding: 0 + +dl + margin-bottom: $small-spacing + +dt + font-weight: 600 + margin-top: $small-spacing + +dd + margin: 0 diff --git a/sites/all/themes/contrib/basic/sass/base/_media.sass b/sites/all/themes/contrib/basic/sass/base/_media.sass new file mode 100644 index 000000000..9a0eaddd8 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/base/_media.sass @@ -0,0 +1,9 @@ +// Media styles +figure + margin: 0 + +img, +picture + max-width: 100% + height: auto + vertical-align: top diff --git a/sites/all/themes/contrib/basic/sass/base/_tables.sass b/sites/all/themes/contrib/basic/sass/base/_tables.sass new file mode 100755 index 000000000..602bc9d1a --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/base/_tables.sass @@ -0,0 +1,21 @@ +// Table styles +table + border-collapse: collapse + margin: $small-spacing 0 + table-layout: fixed + width: 100% + +th + border-bottom: 1px solid shade($base-border-color, 25%) + font-weight: 600 + padding: $small-spacing 0 + text-align: left + +td + border-bottom: $base-border + padding: $small-spacing 0 + +tr, +td, +th + vertical-align: middle diff --git a/sites/all/themes/contrib/basic/sass/base/_typography.sass b/sites/all/themes/contrib/basic/sass/base/_typography.sass new file mode 100755 index 000000000..fb71f2513 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/base/_typography.sass @@ -0,0 +1,71 @@ +// Typographic styles +body + color: $base-font-color + font-family: $base-font-family + font-size: $base-font-size + line-height: $base-line-height + letter-spacing: $base-letter-spacing + +h1, +h2, +h3, +h4, +h5, +h6 + font-family: $heading-font-family + font-size: $base-font-size + line-height: $heading-line-height + margin: 0 0 $small-spacing + +h1 + font-size: 2.2em + +h2 + font-size: 1.8em + +h3 + font-size: 1.4em + +h4 + font-size: 1.2em + +h5 + font-size: 1.1em + +p + margin: 0 0 $small-spacing + +a + color: $action-color + text-decoration: none + transition: color $base-duration $base-timing + + &:active, + &:focus, + &:hover + color: shade($action-color, 25%) + +hr + border-bottom: $base-border + border-left: 0 + border-right: 0 + border-top: 0 + margin: $base-spacing 0 + +// Code +pre, code, tt + font: 1em "andale mono", "lucida console", monospace + line-height: 1.5 + +pre + background-color: #efefef + display: block + padding: 5px + margin: 5px 0 + border: 1px solid #aaaaaa + +// Abbreviation +abbr + border-bottom: 1px dotted #666666 + cursor: help + white-space: nowrap diff --git a/sites/all/themes/contrib/basic/sass/base/base.sass b/sites/all/themes/contrib/basic/sass/base/base.sass new file mode 100644 index 000000000..18ecac31d --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/base/base.sass @@ -0,0 +1,13 @@ +@import "../config/config" + +// BASE: HTML element styling Read more about SMACSS categorization for Drupal +// Themes: https://www.drupal.org/node/1887922 + +// This file is complied separately so we can pull in config dependencies above +// while also maintaining Drupal SMACSS structure. +@import "buttons" +@import "forms" +@import "lists" +@import "media" +@import "tables" +@import "typography" diff --git a/sites/all/themes/contrib/basic/sass/components/_breadcrumb.sass b/sites/all/themes/contrib/basic/sass/components/_breadcrumb.sass new file mode 100644 index 000000000..248bc0272 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/components/_breadcrumb.sass @@ -0,0 +1,5 @@ +// Breadcrumb styles +.breadcrumb + li + list-style-type: none + display: inline-block diff --git a/sites/all/themes/contrib/basic/sass/components/_navigation.sass b/sites/all/themes/contrib/basic/sass/components/_navigation.sass new file mode 100644 index 000000000..786ea89e2 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/components/_navigation.sass @@ -0,0 +1,5 @@ +// Navigation styles +#navigation + li + list-style-type: none + display: inline-block diff --git a/sites/all/themes/contrib/basic/sass/components/_pager.sass b/sites/all/themes/contrib/basic/sass/components/_pager.sass new file mode 100644 index 000000000..65cb0e219 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/components/_pager.sass @@ -0,0 +1,5 @@ +.pager__item + display: inline + + a + display: inline-block \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/sass/components/_site-name.sass b/sites/all/themes/contrib/basic/sass/components/_site-name.sass new file mode 100644 index 000000000..c507b8956 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/components/_site-name.sass @@ -0,0 +1,7 @@ +// Site name +.site-name + font-size: 2.2em + line-height: 1.3em + font-weight: 300 + padding: 0 0 0.5em + margin: 0 diff --git a/sites/all/themes/contrib/basic/sass/components/components.sass b/sites/all/themes/contrib/basic/sass/components/components.sass new file mode 100644 index 000000000..674d5ac6d --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/components/components.sass @@ -0,0 +1,11 @@ +@import "../config/config" + +// COMPONENTS: Discrete, reusable UI elements +// Read more about SMACSS categorization for Drupal themes: https://www.drupal.org/node/1887922 + +// This file is complied separately so we can pull in config dependencies above +// while also maintaining Drupals SMACSS structure. +@import "breadcrumb" +@import "navigation" +@import "site-name" +@import "pager" \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/sass/components/messages.sass b/sites/all/themes/contrib/basic/sass/components/messages.sass new file mode 100644 index 000000000..40c85a512 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/components/messages.sass @@ -0,0 +1,33 @@ +@import "../config/config" + +// Messages. +.messages + padding: 9px + margin: 1em 0 + color: darken($light-gray, 30%) + background-color: $light-gray + border: 1px solid darken($light-gray, 10%) + word-wrap: break-word + pre + border: 0 + +.messages--warning + color: darken($error-color, 15%) + background-color: $warning-color + border-color: darken($warning-color, 10%) + pre + background-color: darken($warning-color, 10%) + +.messages--error + color: white + background-color: $error-color + border-color: darken($error-color, 10%) + pre + background-color: darken($error-color, 10%) + +.messages--status + color: darken($status-color, 35%) + background-color: $status-color + border-color: darken($status-color, 10%) + pre + background-color: darken($status-color, 10%) \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/sass/components/tabs.sass b/sites/all/themes/contrib/basic/sass/components/tabs.sass new file mode 100644 index 000000000..9c56d24e0 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/components/tabs.sass @@ -0,0 +1,16 @@ +@import "../config/config" + +// Tabs. +ul.tabs + width: 100% + margin: 0 0 5px + border-bottom: 1px solid $light-gray + + li + display: inline-block + + a + display: block + border: 1px solid $light-gray + border-bottom: 0 + border-radius: 3px 3px 0 0 \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/sass/config/_config.sass b/sites/all/themes/contrib/basic/sass/config/_config.sass new file mode 100644 index 000000000..0819bd169 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/config/_config.sass @@ -0,0 +1,36 @@ +// Config +// --------- +// Use the same color all over the place? Need to do +// some math with height and width and text size? +// Sass supports variables as well as basic math +// operations and many useful functions. +// +// For setting variables, see: +// /sass/config/_variables.sass +// +// For setting mixins: +// /sass/config/_mixins.sass +// +// For complete documentation: +// http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#variables_ +// +// Available functions: +// http://sass-lang.com/docs/yardoc/Sass/Script/Functions.html + +// Bourbon and Bourbon Neat documentation: +// Bourbon: http://bourbon.io/docs/ +// Bourbon Neat (grid): http://neat.bourbon.io/docs/ + +// Import variables and mixins to be used (Bourbon) +@import "../../node_modules/bourbon/app/assets/stylesheets/bourbon" +@import "../../node_modules/bourbon-neat/app/assets/stylesheets/neat-helpers" + +// Import grid to be used (Bourbon Neat) +@import "grid-settings" + +// We load this after we provide our overrides +@import "../../node_modules/bourbon-neat/app/assets/stylesheets/neat" + +// Import local files +@import "variables" +@import "mixins" diff --git a/sites/all/themes/contrib/basic/sass/config/_grid-settings.sass b/sites/all/themes/contrib/basic/sass/config/_grid-settings.sass new file mode 100755 index 000000000..df3c14638 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/config/_grid-settings.sass @@ -0,0 +1,27 @@ +// Bourbon grid display. Set to "true" to turn on. +// $visual-grid: false +// $visual-grid-color: #EEEEEE +// $visual-grid-index: back +// $visual-grid-opacity: 0.4 + +// Set to false if you'd like to remove the responsiveness +$responsive: true + +// Neat Overrides +$column: 60px +$gutter: 20px +$grid-columns: 4 + +// We set the max width of the page. +$font-size: 16px +$max-width: 1200px + +// Breakpoints +$small-screen: 320px +$medium-screen: 720px +$large-screen: 960px + +// Define your mobile first breakpoints using min-width +$small-screen-up: new-breakpoint(min-width #{$small-screen/$font-size}em 4) +$medium-screen-up: new-breakpoint(min-width #{$medium-screen/$font-size}em 8) +$large-screen-up: new-breakpoint(min-width #{$large-screen/$font-size}em 12) diff --git a/sites/all/themes/contrib/basic/sass/config/_mixins.sass b/sites/all/themes/contrib/basic/sass/config/_mixins.sass new file mode 100644 index 000000000..fd310985c --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/config/_mixins.sass @@ -0,0 +1,19 @@ +// Mixins +// -------- +// Mixins allow you to define styles that can be re-used / throughout the +// stylesheet without needing to resort to / non-semantic classes like .float- +// left. Mixins can also / contain full CSS rules, and anything else allowed / +// elsewhere in a Sass document. They can even take / arguments which allows you +// to produce a wide variety / of styles with very few mixins. + +// For complete documentation: +// Sass mixins: http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#mixins +// Bourbon mixins: http://bourbon.io/docs/ + +// Omega Reset for Bourbon Neat grid +// Read more: http://www.joshfry.me/blog/2013/05/13/omega-reset-for-bourbon-neat +@mixin omega-reset($nth) + &:nth-child(#{$nth}) + margin-right: flex-gutter() + &:nth-child(#{$nth}+1) + clear: none diff --git a/sites/all/themes/contrib/basic/sass/config/_variables.sass b/sites/all/themes/contrib/basic/sass/config/_variables.sass new file mode 100644 index 000000000..c089aec5e --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/config/_variables.sass @@ -0,0 +1,65 @@ +// Variables +// ----------- +// Use the same color all over the place? Need to do some math with height and +// width and text size? Sass supports variables as well as basic math operations +// and many useful functions. + +// For complete documentation: +// http://sass-lang.com/docs/yardoc/file.SASS_REFERENCE.html#variables_ + +// Margin/Padding +$margin: $gutter +$padding: $gutter + +// Typography +$base-font-family: $helvetica +$heading-font-family: $base-font-family + +// Font Sizes +$base-font-size: $font-size + +// Line height +$base-line-height: 1.5 +$heading-line-height: 1.3 + +// Letter spacing +$base-letter-spacing: 0.03em + +// Other Sizes +$base-border-radius: 2px +$base-spacing: $base-line-height * 1em +$small-spacing: $base-spacing / 2 +$base-z-index: 0 + +// Colors +$dark-gray: #333 +$medium-gray: #999 +$light-gray: #ddd + +// Brand Colors +$primary-color: #555 + +// Action Colors +$status-color: #8dbe51 +$warning-color: #ddc44f +$error-color: #cd4533 + +// Font Colors +$base-font-color: $dark-gray +$action-color: $primary-color + +// Border +$base-border-color: $light-gray +$base-border: 1px solid $base-border-color + +// Background Colors +$base-background-color: #fff +$secondary-background-color: tint($base-border-color, 75%) + +// Forms +$form-box-shadow: inset 0 1px 3px rgba(#000, 0.06) +$form-box-shadow-focus: $form-box-shadow, 0 0 5px adjust-color($action-color, $lightness: -5%, $alpha: -0.3) + +// Animations +$base-duration: 150ms +$base-timing: ease diff --git a/sites/all/themes/contrib/basic/sass/layout/_layout--grid.sass b/sites/all/themes/contrib/basic/sass/layout/_layout--grid.sass new file mode 100644 index 000000000..82a6eceb5 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/layout/_layout--grid.sass @@ -0,0 +1,101 @@ +// Layout +// ------ +// Using a negative margin technique, made possible with Bourbon Neat, the page +// is loaded in this order: + +// 1. Header +// 2. Content +// 3. Navigation menus +// 4. Sidebar Left +// 5. Sideabr Right +// +// Layout rules. +// (Disclaimer: do not change if you're not sure you know what you're doing.) + +.container + @include outer-container + width: auto + +#content + .no-sidebar & + // 100% width for small screens. No definitions required. + // Same logic for medium screens. No definitions required. + // Same logic for large screens. No definitions required. + + .one-sidebar.sidebar-second & + // 100% width for small screens. No definitions required. + // Span this div 6 columns wide for medium screens. + @include media($medium-screen-up) + @include span-columns(6) + // Span this div 8 columns wide for large screens. + @include media($large-screen-up) + @include span-columns(8) + + .one-sidebar.sidebar-first & + // 100% width for small screens. No definitions required. + // Span this div 6 columns wide for medium screens. + @include media($medium-screen-up) + @include span-columns(6) + @include shift(2) + // Span this div 9 columns wide for large screens. + @include media($large-screen-up) + @include span-columns(9) + @include shift(3) + + .two-sidebars & + // 100% width for small screens. No definitions required. + // Span this div 4 columns wide for medium screens. + @include media($medium-screen-up) + @include span-columns(4) + @include shift(2) + // Span this div 5 columns wide for large screens. + @include media($large-screen-up) + @include span-columns(5) + @include shift(3) + +#sidebar-first + // 100% width for small screens. No definitions required. + // Span this div 2 columns wide for medium screens. + @include media($medium-screen-up) + @include span-columns(2) + // Shift it to the left to place it in the far left column. Different shift for two-sidebar and one-sidebar layout. + @include shift(-6) + .one-sidebar.sidebar-first & + @include shift(-8) + @include media($large-screen-up) + // Span this div 3 columns wide for large screens. + @include span-columns(3) + // Shift it to the left to place it in the far left column. Different shift for two-sidebar and one-sidebar layout. + @include shift(-8) + .one-sidebar.sidebar-first & + @include shift(-12) + +#sidebar-second + // 100% width for small screens. No definitions required. + // Span this div 2 columns wide for medium screens. + @include media($medium-screen-up) + @include span-columns(2) + @include shift(0) + @include media($large-screen-up) + // Span this div 4 columns wide for large screens. + @include span-columns(4) + @include shift(0) + +#footer + float: none + clear: both + +// Region Colors. Delete when starting a new theme. +#header, #footer, +#sidebar-first, +#sidebar-second, +#navigation + background: rgba(#aaa, 0.2) + +// Layout Helpers +#header, +#footer, +.mission, +.breadcrumb, +.node + clear: both diff --git a/sites/all/themes/contrib/basic/sass/layout/layout.sass b/sites/all/themes/contrib/basic/sass/layout/layout.sass new file mode 100644 index 000000000..9b5a5cb41 --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/layout/layout.sass @@ -0,0 +1,8 @@ +@import "../config/config" + +// LAYOUT: Macro arrangement of a web page, including any grid systems. +// Read more about SMACSS categorization for Drupal Themes: https://www.drupal.org/node/1887922 + +// This file is complied separately so we can pull in config dependencies above +// while also maintaining Drupals SMACSS structure. +@import "layout--grid" diff --git a/sites/all/themes/contrib/basic/sass/theme/print.sass b/sites/all/themes/contrib/basic/sass/theme/print.sass new file mode 100644 index 000000000..c03d6516a --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/theme/print.sass @@ -0,0 +1,36 @@ +// Use this stylesheet for print styles only. +* + background-color: transparent + +.sidebar, +#navigation, +#header-region, +#footer, +.breadcrumb, +.tabs, +.feed-icon, +.links + display: none + +.layout-container + width: 100% + +#content, +.title + margin: 20px 0 + width: auto + +a + &:hover, + &:active, + &:link, + &:visited + color: black + +// CSS2 selector to add visible href after links. +#content a + &:link:after, + &:visited:after + content: " (" attr(href) ") " + font-size: 0.8em + font-weight: normal diff --git a/sites/all/themes/contrib/basic/sass/theme/theme.sass b/sites/all/themes/contrib/basic/sass/theme/theme.sass new file mode 100644 index 000000000..b38e01bdf --- /dev/null +++ b/sites/all/themes/contrib/basic/sass/theme/theme.sass @@ -0,0 +1,9 @@ +@import "../config/config" + +// THEME: purely visual styling (“look-and-feel”) for a component. +// Read more about SMACSS categorization for Drupal Themes: https://www.drupal.org/node/1887922 +// When following SMCASS, this would be used for dark/light themes (not general styling): https://smacss.com/book/type-theme + +// This file is complied separately so we can pull in config dependencies above +// while also maintaining Drupals SMACSS structure. +// @import "theme/theme--light" diff --git a/sites/all/themes/contrib/basic/screenshot.png b/sites/all/themes/contrib/basic/screenshot.png new file mode 100644 index 000000000..1012e2838 Binary files /dev/null and b/sites/all/themes/contrib/basic/screenshot.png differ diff --git a/sites/all/themes/contrib/basic/templates/block/block--local-actions-block.html.twig b/sites/all/themes/contrib/basic/templates/block/block--local-actions-block.html.twig new file mode 100644 index 000000000..0fe6617f4 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/block/block--local-actions-block.html.twig @@ -0,0 +1,12 @@ +{% extends "block.html.twig" %} +{# +/** + * @file + * Theme override for local actions (primary admin actions.) + */ +#} +{% block content %} + {% if content %} + + {% endif %} +{% endblock %} \ No newline at end of file diff --git a/sites/all/themes/contrib/basic/templates/block/block--local-tasks-block.html.twig b/sites/all/themes/contrib/basic/templates/block/block--local-tasks-block.html.twig new file mode 100644 index 000000000..a191c60c2 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/block/block--local-tasks-block.html.twig @@ -0,0 +1,14 @@ +{% extends "@block/block.html.twig" %} +{# +/** + * @file + * Theme override for tabs. + */ +#} +{% block content %} + {% if content %} + + {% endif %} +{% endblock %} diff --git a/sites/all/themes/contrib/basic/templates/block/block--search-form-block.html.twig b/sites/all/themes/contrib/basic/templates/block/block--search-form-block.html.twig new file mode 100644 index 000000000..667202fb6 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/block/block--search-form-block.html.twig @@ -0,0 +1,45 @@ +{# +/** + * @file + * Theme override for the search form 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, including: + * - 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: A list HTML attributes populated by modules, intended to + * be added to the main container tag of this template. Includes: + * - 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() + * @see search_preprocess_block() + */ +#} +{% + set classes = [ + 'block', + 'block-search', + 'container-inline', + ] +%} + + {{ title_prefix }} + {% if label %} + {{ label }} + {% endif %} + {{ title_suffix }} + {% block content %} + {{ content }} + {% endblock %} + diff --git a/sites/all/themes/contrib/basic/templates/block/block--system-branding-block.html.twig b/sites/all/themes/contrib/basic/templates/block/block--system-branding-block.html.twig new file mode 100644 index 000000000..7c3b7dea1 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/block/block--system-branding-block.html.twig @@ -0,0 +1,30 @@ +{% extends "block.html.twig" %} +{# +/** + * @file + * Theme override for a branding block. + * + * Each branding element variable (logo, name, slogan) is only available if + * enabled in the block configuration. + * + * Available variables: + * - site_logo: Logo for site as defined in Appearance or theme settings. + * - site_name: Name for site as defined in Site information settings. + * - site_slogan: Slogan for site as defined in Site information settings. + */ +#} +{% block content %} + {% if site_logo %} + + {% endif %} + {% if site_name %} + + {% endif %} + {% if site_slogan %} +
{{ site_slogan }}
+ {% endif %} +{% endblock %} diff --git a/sites/all/themes/contrib/basic/templates/block/block--system-menu-block.html.twig b/sites/all/themes/contrib/basic/templates/block/block--system-menu-block.html.twig new file mode 100644 index 000000000..407f8403f --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/block/block--system-menu-block.html.twig @@ -0,0 +1,56 @@ +{# +/** + * @file + * Theme override for a menu 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: HTML attributes for the containing element. + * - id: A valid HTML ID and guaranteed unique. + * - title_attributes: HTML attributes for the title element. + * - content_attributes: HTML attributes for the content element. + * - 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. + * + * Headings should be used on navigation menus that consistently appear on + * multiple pages. When this menu block's label is configured to not be + * displayed, it is automatically made invisible using the 'visually-hidden' CSS + * class, which still keeps it visible for screen-readers and assistive + * technology. Headings allow screen-reader and keyboard only users to navigate + * to or skip the links. + * See http://juicystudio.com/article/screen-readers-display-none.php and + * http://www.w3.org/TR/WCAG-TECHS/H42.html for more information. + */ +#} +{% + set classes = [ + 'block', + 'block-menu', + 'navigation', + 'menu--' ~ derivative_plugin_id|clean_class, + ] +%} +{% set heading_id = attributes.id ~ '-menu'|clean_id %} + diff --git a/sites/all/themes/contrib/basic/templates/block/block.html.twig b/sites/all/themes/contrib/basic/templates/block/block.html.twig new file mode 100644 index 000000000..5a299a51d --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/block/block.html.twig @@ -0,0 +1,32 @@ +{% extends "@block/block.html.twig" %} +{# +/** + * @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 attributes = attributes.addClass([ + 'block-' ~ configuration.provider|clean_class, + attributes.id +]) %} diff --git a/sites/all/themes/contrib/basic/templates/breadcrumb.html.twig b/sites/all/themes/contrib/basic/templates/breadcrumb.html.twig new file mode 100644 index 000000000..7dc08c520 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/breadcrumb.html.twig @@ -0,0 +1,25 @@ +{# +/** + * @file + * Theme override for a breadcrumb trail. + * + * Available variables: + * - breadcrumb: Breadcrumb trail items. + */ +#} +{% if breadcrumb %} + +{% endif %} diff --git a/sites/all/themes/contrib/basic/templates/comment.html.twig b/sites/all/themes/contrib/basic/templates/comment.html.twig new file mode 100755 index 000000000..a3f3c0dfc --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/comment.html.twig @@ -0,0 +1,109 @@ +{# +/** + * @file + * Default theme implementation for comments. + * + * Available variables: + * - author: Comment author. Can be a link or plain text. + * - content: The content-related items for the comment display. Use + * {{ content }} to print them all, or print a subset such as + * {{ content.field_example }}. Use the following code to temporarily suppress + * the printing of a given child element: + * @code + * {{ content|without('field_example') }} + * @endcode + * - created: Formatted date and time for when the comment was created. + * Preprocess functions can reformat it by calling format_date() with the + * desired parameters on the 'comment.created' variable. + * - changed: Formatted date and time for when the comment was last changed. + * Preprocess functions can reformat it by calling format_date() with the + * desired parameters on the 'comment.changed' variable. + * - permalink: Comment permalink. + * - submitted: Submission information created from author and created + * during template_preprocess_comment(). + * - user_picture: The comment author's profile picture. + * - status: Comment status. Possible values are: + * unpublished, published, or preview. + * - title: Comment title, linked to the comment. + * - attributes: HTML attributes for the containing element. + * The attributes.class may contain one or more of the following classes: + * - comment: The current template type; e.g., 'theming hook'. + * - by-anonymous: Comment by an unregistered user. + * - by-{entity-type}-author: Comment by the author of the parent entity, + * eg. by-node-author. + * - preview: When previewing a new or edited comment. + * The following applies only to viewers who are registered users: + * - unpublished: An unpublished comment visible only to administrators. + * - 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. + * - content_attributes: List of classes for the styling of the comment content. + * - title_attributes: Same as attributes, except applied to the main title + * tag that appears in the template. + * + * These variables are provided to give context about the parent comment (if + * any): + * - comment_parent: Full parent comment entity (if any). + * - parent_author: Equivalent to author for the parent comment. + * - parent_created: Equivalent to created for the parent comment. + * - parent_changed: Equivalent to changed for the parent comment. + * - parent_title: Equivalent to title for the parent comment. + * - parent_permalink: Equivalent to permalink for the parent comment. + * - parent: A text string of parent comment submission information created from + * 'parent_author' and 'parent_created' during template_preprocess_comment(). + * This information is presented to help screen readers follow lengthy + * discussion threads. You can hide this from sighted users using the class + * visually-hidden. + * + * These two variables are provided for context: + * - comment: Full comment object. + * - entity: Entity the comments are attached to. + * + * @see template_preprocess_comment() + * + * @ingroup themeable + */ +#} + + + {% if title %} + {{ title_prefix }} + {% endif %} + + {# + Hide the "new" indicator by default, let a piece of JavaScript ask + the server which comments are new for the user. Rendering the final + "new" indicator here would break the render cache. + #} + + + {% if title %} + {{ title }} + {{ title_suffix }} + {% endif %} + + +
+ {{ user_picture }} + + + {# + Indicate the semantic relationship between parent and child comments + for accessibility. The list is difficult to navigate in a screen + reader without this information. + #} + {% if parent %} +

{{ parent }}

+ {% endif %} + + {{ permalink }} +
+ + + {{ content|without('links') }} + + {% if content.links %} + {{ content.links }} + {% endif %} + diff --git a/sites/all/themes/contrib/basic/templates/field--comment.html.twig b/sites/all/themes/contrib/basic/templates/field--comment.html.twig new file mode 100644 index 000000000..f78172205 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/field--comment.html.twig @@ -0,0 +1,42 @@ +{# +/** + * @file + * Default theme override for comment fields. + * + * Available variables: + * - attributes: HTML attributes for the containing element. + * - label_hidden: Whether to show the field label or not. + * - title_attributes: HTML attributes for the title. + * - label: The label for the field. + * - 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 title output populated by modules, intended to + * be displayed after the main title tag that appears in the template. + * - comments: List of comments rendered through comment.html.twig. + * - content_attributes: HTML attributes for the form title. + * - comment_form: The 'Add new comment' form. + * - comment_display_mode: Is the comments are threaded. + * - comment_type: The comment type bundle ID for the comment field. + * - entity_type: The entity type to which the field belongs. + * - field_name: The name of the field. + * - field_type: The type of the field. + * - label_display: The display settings for the label. + * + * @see template_preprocess_field() + * @see comment_preprocess_field() + */ +#} + + {% if comments and not label_hidden and (entity.entityType != 'node' or entity.bundle != 'forum') %} + {{ title_prefix }} + {{ label }} + {{ title_suffix }} + {% endif %} + + {{ comments }} + + {% if comment_form %} + {{ 'Add new comment'|t }} + {{ comment_form }} + {% endif %} + diff --git a/sites/all/themes/contrib/basic/templates/field.html.twig b/sites/all/themes/contrib/basic/templates/field.html.twig new file mode 100644 index 000000000..4cdb3e8c0 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/field.html.twig @@ -0,0 +1,20 @@ +{% extends "@stable/field/field.html.twig" %} + +{# Create classes array #} +{% set classes = [] %} + +{# BEM inspired class syntax: https://en.bem.info/ + Enable this code if you would like field classes like "article__tags", where article is the content type and field_tags is the field name. +#} +{% set classes = classes|merge([ + bundle ~ '__' ~ field_name|replace({'field_' : ''})|clean_class +]) %} + + +{% set attributes = attributes.addClass(classes) %} + +{# + Ensures that the visually hidden option for field labels works correctly. + @todo: Remove when https://www.drupal.org/node/2779919 is resolved. +#} +{% set title_attributes = title_attributes.addClass(label_display == 'visually_hidden' ? 'visually-hidden') %} diff --git a/sites/all/themes/contrib/basic/templates/html.html.twig b/sites/all/themes/contrib/basic/templates/html.html.twig new file mode 100644 index 000000000..372976e07 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/html.html.twig @@ -0,0 +1,81 @@ +{# +/** + * @file + * Default theme implementation for the basic structure of a single Drupal page. + * + * Variables: + * - logged_in: A flag indicating if user is logged in. + * - root_path: The root path of the current page (e.g., node, admin, user). + * - node_type: The content type for the current node, if the page is a node. + * - css: A list of CSS files for the current page. + * - head: Markup for the HEAD element (including meta tags, keyword tags, and + * so on). + * - head_title: A modified version of the page title, for use in the TITLE tag. + * - head_title_array: List of text elements that make up the head_title + * variable. May contain or more of the following: + * - title: The title of the page. + * - name: The name of the site. + * - slogan: The slogan of the site. + * - page_top: Initial rendered markup. This should be printed before 'page'. + * - page: The rendered page markup. + * - page_bottom: Closing rendered markup. This variable should be printed after + * 'page'. + * - styles: Style tags necessary to import all necessary CSS files in the head. + * - scripts: Script tags necessary to load the JavaScript files and settings + * in the head. + * - db_offline: A flag indicating if the database is offline. + * + * @see template_preprocess_html() + * + * @ingroup themeable + */ +#} + +{% if ie_enabled_versions.ie8 %} + {{- attach_library('basic/ie8') }} +{% endif %} +{% if ie_enabled_versions.ie9 or ie_enabled_versions.ie8 %} + + + + +{% else -%} + +{% endif %} + + + {{ head_title|safe_join(' | ') }} + + + + {% set classes = [] %} + {% for role in user.roles %} + {% set classes = classes|merge(['role--' ~ role|clean_class]) %} + {% endfor %} + + {% set sidebar_first = page.sidebar_first|render %} + {% set sidebar_second = page.sidebar_second|render %} + + + {{ page_top }} + {{ page }} + {{ page_bottom }} + + {% if browser_sync.enabled %} + + {% endif %} + + diff --git a/sites/all/themes/contrib/basic/templates/menu-local-task.html.twig b/sites/all/themes/contrib/basic/templates/menu-local-task.html.twig new file mode 100644 index 000000000..f29332e49 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/menu-local-task.html.twig @@ -0,0 +1,19 @@ +{# +/** + * @file + * Default theme implementation for a local task link. + * + * Available variables: + * - attributes: HTML attributes for the wrapper element. + * - is_active: Whether the task item is an active tab. + * - link: A rendered link element. + * + * Note: This template renders the content for each task item in + * menu-local-tasks.html.twig. + * + * @see template_preprocess_menu_local_task() + * + * @ingroup themeable + */ +#} +{{ link }} diff --git a/sites/all/themes/contrib/basic/templates/menu-local-tasks.html.twig b/sites/all/themes/contrib/basic/templates/menu-local-tasks.html.twig new file mode 100644 index 000000000..2e88a1808 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/menu-local-tasks.html.twig @@ -0,0 +1,29 @@ +{# +/** + * @file + * Default theme implementation to display primary and secondary local tasks. + * + * Available variables: + * - primary: HTML list items representing primary tasks. + * - secondary: HTML list items representing primary tasks. + * + * Each item in these variables (primary and secondary) can be individually + * themed in menu-local-task.html.twig. + * + * @see template_preprocess_menu_local_tasks() + * + * @ingroup themeable + */ +#} + +{{ attach_library('basic/tabs') }} + +{% if primary %} +

{{ 'Primary tabs'|t }}

+
    {{ primary }}
+{% endif %} +{% if secondary %} +

{{ 'Secondary tabs'|t }}

+
    {{ secondary }}
+{% endif %} + diff --git a/sites/all/themes/contrib/basic/templates/menu.html.twig b/sites/all/themes/contrib/basic/templates/menu.html.twig new file mode 100644 index 000000000..e482ef4aa --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/menu.html.twig @@ -0,0 +1,55 @@ +{# +/** + * @file + * Theme override to display a menu. + * + * Available variables: + * - menu_name: The machine name of the menu. + * - items: A nested list of menu items. Each menu item contains: + * - attributes: HTML attributes for the menu item. + * - below: The menu item child items. + * - title: The menu link title. + * - url: The menu link url, instance of \Drupal\Core\Url + * - localized_options: Menu link localized options. + * - is_expanded: TRUE if the link has visible children within the current + * menu tree. + * - is_collapsed: TRUE if the link has children within the current menu tree + * that are not currently visible. + * - in_active_trail: TRUE if the link is in the active trail. + */ +#} +{% import _self as menus %} + +{# + We call a macro which calls itself to render the full tree. + @see http://twig.sensiolabs.org/doc/tags/macro.html +#} +{{ menus.menu_links(items, attributes, 0) }} + +{% macro menu_links(items, attributes, menu_level) %} + {% import _self as menus %} + {% if items %} + {% if menu_level == 0 %} + + {% else %} + + {% endif %} +{% endmacro %} diff --git a/sites/all/themes/contrib/basic/templates/node.html.twig b/sites/all/themes/contrib/basic/templates/node.html.twig new file mode 100755 index 000000000..ea30c258d --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/node.html.twig @@ -0,0 +1,53 @@ +{# Create classes array. The 'node' class is required for contextual edit links. #} +{% set classes = [ + 'node' +] %} + +{# BEM inspired class syntax: https://en.bem.info/ + Enable this code if you would like node classes like "article article--layout-teaser", where article is the content type and teaser is the view mode. +{% set classes = classes|merge([ + node.bundle|clean_class, + view_mode ? node.bundle|clean_class ~ '--layout-' ~ view_mode|clean_class +]) %} +{% set title_classes = [ + node.bundle|clean_class ~ '__title' +] %} +#} + + + + {% if title_prefix or title_suffix or display_submitted or unpublished or page is empty and label %} +
+ {{ title_prefix }} + {% if not page and label %} + + {{ label }} + + {% endif %} + {{ title_suffix }} + + {% if display_submitted %} + + {% endif %} + + {% if not node.published %} +

{{ 'Unpublished'|t }}

+ {% endif %} +
+ {% endif %} + + + {{ content|without('links') }} + + + {% if content.links %} + + {% endif %} + + diff --git a/sites/all/themes/contrib/basic/templates/page.html.twig b/sites/all/themes/contrib/basic/templates/page.html.twig new file mode 100755 index 000000000..314f98be3 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/page.html.twig @@ -0,0 +1,93 @@ +{% set main_menu = page.primary_menu|render %} +{% set secondary_menu = page.secondary_menu|render %} + + + + + + + {% if main_menu or secondary_menu %} + + {% endif %} + + + +
+
+
+ +
+ + {{ page.breadcrumb }} + + {% if page.highlighted|render %} +
{{ page.highlighted }}
+ {% endif %} + + {{ title_prefix }} + + {% if title %} +

{{ title }}

+ {% endif %} + + {{ title_suffix }} + {{ page.help }} + + {% if tabs %} +
{{ tabs }}
+ {% endif %} + + {% if action_links %} + + {% endif %} + +
+ +
+ {{ page.content }} +
+ +
+ + {% if page.sidebar_first|render %} + + {% endif %} + + {% if page.sidebar_second|render %} + + {% endif %} +
+
+ + + + {% if page.footer|render %} +
+
+ {{ page.footer }} +
+
+ {% endif %} + + diff --git a/sites/all/themes/contrib/basic/templates/pager.html.twig b/sites/all/themes/contrib/basic/templates/pager.html.twig new file mode 100644 index 000000000..6e1056393 --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/pager.html.twig @@ -0,0 +1,98 @@ +{# +/** + * @file + * Theme override to display a pager. + * + * Available variables: + * - items: List of pager items. + * The list is keyed by the following elements: + * - first: Item for the first page; not present on the first page of results. + * - previous: Item for the previous page; not present on the first page + * of results. + * - next: Item for the next page; not present on the last page of results. + * - last: Item for the last page; not present on the last page of results. + * - pages: List of pages, keyed by page number. + * Sub-sub elements: + * items.first, items.previous, items.next, items.last, and each item inside + * items.pages contain the following elements: + * - href: URL with appropriate query parameters for the item. + * - attributes: A keyed list of HTML attributes for the item. + * - text: The visible text used for the item link, such as "‹ Previous" + * or "Next ›". + * - current: The page number of the current page. + * - ellipses: If there are more pages than the quantity allows, then an + * ellipsis before or after the listed pages may be present. + * - previous: Present if the currently visible list of pages does not start + * at the first page. + * - next: Present if the visible list of pages ends before the last page. + * + * @see template_preprocess_pager() + */ +#} +{% if items %} + +{% endif %} diff --git a/sites/all/themes/contrib/basic/templates/status-messages.html.twig b/sites/all/themes/contrib/basic/templates/status-messages.html.twig new file mode 100644 index 000000000..1dbdb703e --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/status-messages.html.twig @@ -0,0 +1,58 @@ +{# +/** + * @file + * Theme override for status messages. + * + * Displays status, error, and warning messages, grouped by type. + * + * An invisible heading identifies the messages for assistive technology. + * Sighted users see a colored box. See http://www.w3.org/TR/WCAG-TECHS/H69.html + * for info. + * + * Add an ARIA label to the contentinfo area so that assistive technology + * user agents will better describe this landmark. + * + * Available variables: + * - message_list: List of messages to be displayed, grouped by type. + * - status_headings: List of all status types. + * - display: (optional) May have a value of 'status' or 'error' when only + * displaying messages of that specific type. + * - attributes: HTML attributes for the element, including: + * - class: HTML classes. + * + * @see template_preprocess_status_messages() + */ +#} + +{{ attach_library('basic/messages') }} + +{% for type, messages in message_list %} + {% + set classes = [ + 'messages', + 'messages--' ~ type, + ] + %} + + {% if type == 'error' %} +
+ {% endif %} + {% if status_headings[type] %} +

{{ status_headings[type] }}

+ {% endif %} + {% if messages|length > 1 %} +
    + {% for message in messages %} +
  • {{ message }}
  • + {% endfor %} +
+ {% else %} + {{ messages|first }} + {% endif %} + {% if type == 'error' %} +
+ {% endif %} + + {# Remove type specific classes. #} + {{ attributes.removeClass(classes) }} +{% endfor %} diff --git a/sites/all/themes/contrib/basic/templates/views-mini-pager.html.twig b/sites/all/themes/contrib/basic/templates/views-mini-pager.html.twig new file mode 100644 index 000000000..aaa48405f --- /dev/null +++ b/sites/all/themes/contrib/basic/templates/views-mini-pager.html.twig @@ -0,0 +1,41 @@ +{# +/** + * @file + * Theme override for a views mini-pager. + * + * Available variables: + * - items: List of pager items. + * + * @see template_preprocess_views_mini_pager() + */ +#} +{% if items.previous or items.next %} + +{% endif %} diff --git a/sites/all/themes/contrib/basic/theme-settings.php b/sites/all/themes/contrib/basic/theme-settings.php new file mode 100644 index 000000000..b6860f2cc --- /dev/null +++ b/sites/all/themes/contrib/basic/theme-settings.php @@ -0,0 +1,83 @@ +getActiveTheme()->getName(); + +/** + * Implements hook_form_system_theme_settings_alter(). + * + * Form override for theme settings. + */ +function basic_form_system_theme_settings_alter(array &$form, FormStateInterface $form_state) { + $form['options_settings'] = [ + '#type' => 'fieldset', + '#title' => t('Theme Specific Settings'), + ]; + + // BrowserSync support. + $form['options_settings']['basic_browser_sync'] = [ + '#type' => 'fieldset', + '#title' => t('BrowserSync Settings'), + ]; + $form['options_settings']['basic_browser_sync']['browser_sync']['#tree'] = TRUE; + $form['options_settings']['basic_browser_sync']['browser_sync']['enabled'] = [ + '#type' => 'checkbox', + '#title' => t('Enable BrowserSync support for theme'), + '#default_value' => theme_get_setting('browser_sync.enabled'), + '#description' => t("Checking this box will automatically add the BrowserSync JS to your theme for development."), + ]; + + $form['options_settings']['basic_browser_sync']['browser_sync']['host'] = [ + '#type' => 'textfield', + '#title' => t('BrowserSync host'), + '#default_value' => theme_get_setting('browser_sync.host'), + '#description' => t("Default: localhost. Enter 'HOST' which will be replaced by your site's hostname."), + '#states' => [ + 'visible' => [':input[name="browser_sync[enabled]"]' => ['checked' => TRUE]], + ], + ]; + + $form['options_settings']['basic_browser_sync']['browser_sync']['port'] = [ + '#type' => 'number', + '#title' => t('Enable BrowserSync support for theme'), + '#default_value' => theme_get_setting('browser_sync.port'), + '#description' => t("Default: '3000'."), + '#states' => [ + 'visible' => [':input[name="browser_sync[enabled]"]' => ['checked' => TRUE]], + ], + ]; + + // IE specific settings. + $form['options_settings']['basic_ie'] = [ + '#type' => 'fieldset', + '#title' => t('Internet Explorer Stylesheets'), + ]; + $form['options_settings']['basic_ie']['ie_enabled'] = [ + '#type' => 'checkbox', + '#title' => t('Enable Internet Explorer stylesheets in theme'), + '#default_value' => theme_get_setting('ie_enabled'), + '#description' => t('If you check this box you can choose which IE stylesheets in theme get rendered on display.'), + ]; + $form['options_settings']['basic_ie']['ie_enabled_css'] = [ + '#type' => 'fieldset', + '#title' => t('Which IE versions you want to enable ".lt-ie" CSS classes'), + '#states' => [ + 'visible' => [':input[name="ie_enabled"]' => ['checked' => TRUE]], + ], + ]; + $form['options_settings']['basic_ie']['ie_enabled_css']['ie_enabled_versions'] = [ + '#type' => 'checkboxes', + '#options' => [ + 'ie8' => t('Internet Explorer 8'), + 'ie9' => t('Internet Explorer 9'), + ], + '#default_value' => array_keys(array_filter(theme_get_setting('ie_enabled_versions'))) ?: [], + ]; +}