Skip to content

Commit e0d48f0

Browse files
committed
adding drupal 8
0 parents  commit e0d48f0

File tree

13,285 files changed

+1461931
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

13,285 files changed

+1461931
-0
lines changed

.csslintrc

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
{
2+
"important": true,
3+
"adjoining-classes": false,
4+
"known-properties": true,
5+
"box-sizing": false,
6+
"box-model": true,
7+
"overqualified-elements": true,
8+
"display-property-grouping": true,
9+
"bulletproof-font-face": false,
10+
"compatible-vendor-prefixes": false,
11+
"regex-selectors": false,
12+
"errors": false,
13+
"duplicate-background-images": true,
14+
"duplicate-properties": true,
15+
"empty-rules": true,
16+
"selector-max-approaching": false,
17+
"gradients": false,
18+
"fallback-colors": false,
19+
"font-sizes": false,
20+
"font-faces": false,
21+
"floats": false,
22+
"star-property-hack": true,
23+
"outline-none": true,
24+
"import": true,
25+
"ids": true,
26+
"underscore-property-hack": true,
27+
"rules-count": false,
28+
"qualified-headings": true,
29+
"selector-max": false,
30+
"shorthand": true,
31+
"text-indent": true,
32+
"unique-headings": true,
33+
"universal-selector": false,
34+
"unqualified-attributes": true,
35+
"vendor-prefix": true,
36+
"zero-units": true
37+
}

.editorconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
# Drupal editor configuration normalization
2+
# @see http://editorconfig.org/
3+
4+
# This is the top-most .editorconfig file; do not search in parent directories.
5+
root = true
6+
7+
# All files.
8+
[*]
9+
end_of_line = LF
10+
indent_style = space
11+
indent_size = 2
12+
charset = utf-8
13+
trim_trailing_whitespace = true
14+
insert_final_newline = true

.eslintignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
core/assets/vendor/**/*
2+
core/modules/locale/tests/locale_test.js
3+
core/vendor/**/*
4+
sites/**/files/**/*
5+
libraries/**/*
6+
sites/**/libraries/**/*
7+
profiles/**/libraries/**/*
8+
**/js_test_files/**/*

.eslintrc

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
{
2+
"env": {
3+
"browser": true
4+
},
5+
"globals": {
6+
"Drupal": true,
7+
"drupalSettings": true,
8+
"drupalTranslations": true,
9+
"domready": true,
10+
"jQuery": true,
11+
"_": true,
12+
"matchMedia": true,
13+
"Backbone": true,
14+
"Modernizr": true,
15+
"CKEDITOR": true
16+
},
17+
"rules": {
18+
// Errors.
19+
"block-scoped-var": 2,
20+
"brace-style": [2, "stroustrup", {"allowSingleLine": true}],
21+
"comma-style": [2, "last"],
22+
"eqeqeq": [2, "smart"],
23+
"guard-for-in": 2,
24+
"indent": [2, 2, {"indentSwitchCase": true}],
25+
"key-spacing": [2, {"beforeColon": false, "afterColon": true}],
26+
"lines-around-comment": [2, {"beforeBlockComment": true, "afterBlockComment": false}],
27+
"no-implied-eval": 2,
28+
"no-mixed-spaces-and-tabs": 2,
29+
"no-nested-ternary": 2,
30+
"no-reserved-keys": 2,
31+
"no-trailing-spaces": 2,
32+
"no-undef": 2,
33+
"no-undefined": 2,
34+
"no-unused-vars": [2, {"vars": "local", "args": "none"}],
35+
"one-var": [2, "never"],
36+
"semi": [2, "always"],
37+
"space-after-keywords": [2, "always"],
38+
"space-before-blocks": [2, "always"],
39+
"space-before-function-paren": [2, {"anonymous": "always", "named": "never"}],
40+
"space-in-brackets": [2, "never"],
41+
"space-in-parens": [2, "never"],
42+
"spaced-line-comment": [2, "always"],
43+
"strict": 2,
44+
// Warnings.
45+
"max-nested-callbacks": [1, 3],
46+
"valid-jsdoc": [1, {
47+
"prefer": {
48+
"returns": "return",
49+
"property": "prop"
50+
},
51+
"requireReturn": false
52+
}],
53+
// Disabled.
54+
"camelcase": 0,
55+
"consistent-return": 0,
56+
"dot-notation": 0,
57+
"new-cap": 0,
58+
"no-alert": 0,
59+
"no-new": 0,
60+
"no-shadow": 0,
61+
"no-underscore-dangle": 0,
62+
"no-use-before-define": 0,
63+
"quotes": 0
64+
}
65+
}

.gitattributes

Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
# Drupal git normalization
2+
# @see https://www.kernel.org/pub/software/scm/git/docs/gitattributes.html
3+
# @see https://www.drupal.org/node/1542048
4+
5+
# Normally these settings would be done with macro attributes for improved
6+
# readability and easier maintenance. However macros can only be defined at the
7+
# repository root directory. Drupal avoids making any assumptions about where it
8+
# is installed.
9+
10+
# Define text file attributes.
11+
# - Treat them as text.
12+
# - Ensure no CRLF line-endings, neither on checkout nor on checkin.
13+
# - Detect whitespace errors.
14+
# - Exposed by default in `git diff --color` on the CLI.
15+
# - Validate with `git diff --check`.
16+
# - Deny applying with `git apply --whitespace=error-all`.
17+
# - Fix automatically with `git apply --whitespace=fix`.
18+
19+
# Auto-detect text files, ensure they use LF.
20+
* text=auto eol=lf
21+
22+
*.css text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
23+
*.engine text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
24+
*.html text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=html
25+
*.inc text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
26+
*.info text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
27+
*.install text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
28+
*.js text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
29+
*.json text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
30+
*.lock text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
31+
*.md text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
32+
*.module text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
33+
*.php text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
34+
*.po text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
35+
*.script text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
36+
*.sh text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
37+
*.sql text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
38+
*.test text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
39+
*.theme text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2 diff=php
40+
*.txt text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
41+
*.xml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
42+
*.yml text eol=lf whitespace=blank-at-eol,-blank-at-eof,-space-before-tab,tab-in-indent,tabwidth=2
43+
44+
# Define binary file attributes.
45+
# - Do not treat them as text.
46+
# - Include binary diff in patches instead of "binary files differ."
47+
*.gif -text diff
48+
*.gz -text diff
49+
*.ico -text diff
50+
*.jpg -text diff
51+
*.png -text diff
52+
*.phar -text diff
53+
*.exe -text diff

.htaccess

Lines changed: 181 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,181 @@
1+
#
2+
# Apache/PHP/Drupal settings:
3+
#
4+
5+
# Protect files and directories from prying eyes.
6+
<FilesMatch "\.(engine|inc|install|make|module|profile|po|sh|.*sql|theme|twig|tpl(\.php)?|xtmpl|yml)(~|\.sw[op]|\.bak|\.orig|\.save)?$|^(\..*|Entries.*|Repository|Root|Tag|Template)$|^#.*#$|\.php(~|\.sw[op]|\.bak|\.orig|\.save)$">
7+
<IfModule mod_authz_core.c>
8+
Require all denied
9+
</IfModule>
10+
<IfModule !mod_authz_core.c>
11+
Order allow,deny
12+
</IfModule>
13+
</FilesMatch>
14+
15+
# Don't show directory listings for URLs which map to a directory.
16+
Options -Indexes
17+
18+
# Follow symbolic links in this directory.
19+
Options +FollowSymLinks
20+
21+
# Make Drupal handle any 404 errors.
22+
ErrorDocument 404 /index.php
23+
24+
# Set the default handler.
25+
DirectoryIndex index.php index.html index.htm
26+
27+
# Add correct encoding for SVGZ.
28+
AddType image/svg+xml svg svgz
29+
AddEncoding gzip svgz
30+
31+
# Override PHP settings that cannot be changed at runtime. See
32+
# sites/default/default.settings.php and
33+
# Drupal\Core\DrupalKernel::bootEnvironment() for settings that can be
34+
# changed at runtime.
35+
36+
# PHP 5, Apache 1 and 2.
37+
<IfModule mod_php5.c>
38+
php_flag session.auto_start off
39+
php_value mbstring.http_input pass
40+
php_value mbstring.http_output pass
41+
php_flag mbstring.encoding_translation off
42+
# PHP 5.6 has deprecated $HTTP_RAW_POST_DATA and produces warnings if this is
43+
# not set.
44+
php_value always_populate_raw_post_data -1
45+
</IfModule>
46+
47+
# Requires mod_expires to be enabled.
48+
<IfModule mod_expires.c>
49+
# Enable expirations.
50+
ExpiresActive On
51+
52+
# Cache all files for 2 weeks after access (A).
53+
ExpiresDefault A1209600
54+
55+
<FilesMatch \.php$>
56+
# Do not allow PHP scripts to be cached unless they explicitly send cache
57+
# headers themselves. Otherwise all scripts would have to overwrite the
58+
# headers set by mod_expires if they want another caching behavior. This may
59+
# fail if an error occurs early in the bootstrap process, and it may cause
60+
# problems if a non-Drupal PHP file is installed in a subdirectory.
61+
ExpiresActive Off
62+
</FilesMatch>
63+
</IfModule>
64+
65+
# Various rewrite rules.
66+
<IfModule mod_rewrite.c>
67+
RewriteEngine on
68+
69+
# Set "protossl" to "s" if we were accessed via https://. This is used later
70+
# if you enable "www." stripping or enforcement, in order to ensure that
71+
# you don't bounce between http and https.
72+
RewriteRule ^ - [E=protossl]
73+
RewriteCond %{HTTPS} on
74+
RewriteRule ^ - [E=protossl:s]
75+
76+
# Make sure Authorization HTTP header is available to PHP
77+
# even when running as CGI or FastCGI.
78+
RewriteRule ^ - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
79+
80+
# Block access to "hidden" directories whose names begin with a period. This
81+
# includes directories used by version control systems such as Subversion or
82+
# Git to store control files. Files whose names begin with a period, as well
83+
# as the control files used by CVS, are protected by the FilesMatch directive
84+
# above.
85+
#
86+
# NOTE: This only works when mod_rewrite is loaded. Without mod_rewrite, it is
87+
# not possible to block access to entire directories from .htaccess because
88+
# <DirectoryMatch> is not allowed here.
89+
#
90+
# If you do not have mod_rewrite installed, you should remove these
91+
# directories from your webroot or otherwise protect them from being
92+
# downloaded.
93+
RewriteRule "(^|/)\." - [F]
94+
95+
# If your site can be accessed both with and without the 'www.' prefix, you
96+
# can use one of the following settings to redirect users to your preferred
97+
# URL, either WITH or WITHOUT the 'www.' prefix. Choose ONLY one option:
98+
#
99+
# To redirect all users to access the site WITH the 'www.' prefix,
100+
# (http://example.com/foo will be redirected to http://www.example.com/foo)
101+
# uncomment the following:
102+
# RewriteCond %{HTTP_HOST} .
103+
# RewriteCond %{HTTP_HOST} !^www\. [NC]
104+
# RewriteRule ^ http%{ENV:protossl}://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
105+
#
106+
# To redirect all users to access the site WITHOUT the 'www.' prefix,
107+
# (http://www.example.com/foo will be redirected to http://example.com/foo)
108+
# uncomment the following:
109+
# RewriteCond %{HTTP_HOST} ^www\.(.+)$ [NC]
110+
# RewriteRule ^ http%{ENV:protossl}://%1%{REQUEST_URI} [L,R=301]
111+
112+
# Modify the RewriteBase if you are using Drupal in a subdirectory or in a
113+
# VirtualDocumentRoot and the rewrite rules are not working properly.
114+
# For example if your site is at http://example.com/drupal uncomment and
115+
# modify the following line:
116+
# RewriteBase /drupal
117+
#
118+
# If your site is running in a VirtualDocumentRoot at http://example.com/,
119+
# uncomment the following line:
120+
# RewriteBase /
121+
122+
# Redirect common PHP files to their new locations.
123+
RewriteCond %{REQUEST_URI} ^(.*)?/(install.php) [OR]
124+
RewriteCond %{REQUEST_URI} ^(.*)?/(rebuild.php)
125+
RewriteCond %{REQUEST_URI} !core
126+
RewriteRule ^ %1/core/%2 [L,QSA,R=301]
127+
128+
# Pass all requests not referring directly to files in the filesystem to
129+
# index.php.
130+
RewriteCond %{REQUEST_FILENAME} !-f
131+
RewriteCond %{REQUEST_FILENAME} !-d
132+
RewriteCond %{REQUEST_URI} !=/favicon.ico
133+
RewriteRule ^ index.php [L]
134+
135+
# For security reasons, deny access to other PHP files on public sites.
136+
# Note: The following URI conditions are not anchored at the start (^),
137+
# because Drupal may be located in a subdirectory. To further improve
138+
# security, you can replace '!/' with '!^/'.
139+
# Allow access to PHP files in /core (like authorize.php or install.php):
140+
RewriteCond %{REQUEST_URI} !/core/[^/]*\.php$
141+
# Allow access to test-specific PHP files:
142+
RewriteCond %{REQUEST_URI} !/core/modules/system/tests/https?.php
143+
# Allow access to Statistics module's custom front controller.
144+
# Copy and adapt this rule to directly execute PHP files in contributed or
145+
# custom modules or to run another PHP application in the same directory.
146+
RewriteCond %{REQUEST_URI} !/core/modules/statistics/statistics.php$
147+
# Deny access to any other PHP files that do not match the rules above.
148+
# Specifically, disallow autoload.php from being served directly.
149+
RewriteRule "^(.+/.*|autoload)\.php($|/)" - [F]
150+
151+
# Rules to correctly serve gzip compressed CSS and JS files.
152+
# Requires both mod_rewrite and mod_headers to be enabled.
153+
<IfModule mod_headers.c>
154+
# Serve gzip compressed CSS files if they exist and the client accepts gzip.
155+
RewriteCond %{HTTP:Accept-encoding} gzip
156+
RewriteCond %{REQUEST_FILENAME}\.gz -s
157+
RewriteRule ^(.*)\.css $1\.css\.gz [QSA]
158+
159+
# Serve gzip compressed JS files if they exist and the client accepts gzip.
160+
RewriteCond %{HTTP:Accept-encoding} gzip
161+
RewriteCond %{REQUEST_FILENAME}\.gz -s
162+
RewriteRule ^(.*)\.js $1\.js\.gz [QSA]
163+
164+
# Serve correct content types, and prevent mod_deflate double gzip.
165+
RewriteRule \.css\.gz$ - [T=text/css,E=no-gzip:1]
166+
RewriteRule \.js\.gz$ - [T=text/javascript,E=no-gzip:1]
167+
168+
<FilesMatch "(\.js\.gz|\.css\.gz)$">
169+
# Serve correct encoding type.
170+
Header set Content-Encoding gzip
171+
# Force proxies to cache gzipped & non-gzipped css/js files separately.
172+
Header append Vary Accept-Encoding
173+
</FilesMatch>
174+
</IfModule>
175+
</IfModule>
176+
177+
# Add headers to all responses.
178+
<IfModule mod_headers.c>
179+
# Disable content sniffing, since it's an attack vector.
180+
Header always set X-Content-Type-Options nosniff
181+
</IfModule>

0 commit comments

Comments
 (0)