Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
christianruhstaller committed Dec 15, 2016
2 parents 18454a2 + 85931c7 commit b5e7387
Show file tree
Hide file tree
Showing 23 changed files with 358 additions and 102 deletions.
Empty file.
100 changes: 100 additions & 0 deletions .deployment/files/production/public/.htaccess
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
RewriteEngine On

# Force www
RewriteCond %{HTTP_HOST} !^www\.yourodmain\.com [NC]
RewriteRule ^(.*)$ http://www.yourodmain.com/$1 [R=301,L]

# Force ssl
RewriteCond %{SERVER_PORT} 80
RewriteRule ^(.*)$ https://www.yourodmain.com/$1 [R=301,L]

# Handle Front Controller...
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

# ----------------------------------------------------------------------
# | Compression |
# ----------------------------------------------------------------------

<IfModule mod_deflate.c>
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css text/javascript application/javascript
</IfModule>

<IfModule mod_headers.c>
Header unset ETag
</IfModule>

FileETag None

<IfModule mod_expires.c>

ExpiresActive on
ExpiresDefault "access plus 1 month"

# CSS
ExpiresByType text/css "access plus 1 year"

# Data interchange
ExpiresByType application/atom+xml "access plus 1 hour"
ExpiresByType application/rdf+xml "access plus 1 hour"
ExpiresByType application/rss+xml "access plus 1 hour"

ExpiresByType application/json "access plus 0 seconds"
ExpiresByType application/ld+json "access plus 0 seconds"
ExpiresByType application/schema+json "access plus 0 seconds"
ExpiresByType application/vnd.geo+json "access plus 0 seconds"
ExpiresByType application/xml "access plus 0 seconds"
ExpiresByType text/xml "access plus 0 seconds"

# Favicon (cannot be renamed!) and cursor images
ExpiresByType image/vnd.microsoft.icon "access plus 1 week"
ExpiresByType image/x-icon "access plus 1 week"

# HTML
ExpiresByType text/html "access plus 0 seconds"

# JavaScript
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType application/x-javascript "access plus 1 year"
ExpiresByType text/javascript "access plus 1 year"

# Manifest files
ExpiresByType application/manifest+json "access plus 1 year"

ExpiresByType application/x-web-app-manifest+json "access plus 0 seconds"
ExpiresByType text/cache-manifest "access plus 0 seconds"

# Media files
ExpiresByType audio/ogg "access plus 1 month"
ExpiresByType image/bmp "access plus 1 month"
ExpiresByType image/gif "access plus 1 month"
ExpiresByType image/jpeg "access plus 1 month"
ExpiresByType image/png "access plus 1 month"
ExpiresByType image/svg+xml "access plus 1 month"
ExpiresByType video/mp4 "access plus 1 month"
ExpiresByType video/ogg "access plus 1 month"
ExpiresByType video/webm "access plus 1 month"

# Web fonts

# Embedded OpenType (EOT)
ExpiresByType application/vnd.ms-fontobject "access plus 1 month"
ExpiresByType font/eot "access plus 1 month"

# OpenType
ExpiresByType font/opentype "access plus 1 month"

# TrueType
ExpiresByType application/x-font-ttf "access plus 1 month"

# Web Open Font Format (WOFF) 1.0
ExpiresByType application/font-woff "access plus 1 month"
ExpiresByType application/x-font-woff "access plus 1 month"
ExpiresByType font/woff "access plus 1 month"

# Web Open Font Format (WOFF) 2.0
ExpiresByType application/font-woff2 "access plus 1 month"

# Other
ExpiresByType text/x-cross-domain-policy "access plus 1 week"
File renamed without changes.
Empty file removed .deployment/files/staging/.gitkeep
Empty file.
22 changes: 22 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
# Top-most EditorConfig file
root = true

# Unix-style newlines with a newline ending every file
[*]
end_of_line = lf
indent_style = space
indent_size = 4
insert_final_newline = true
trim_trailing_whitespace = true

[*.js]
indent_size = 2

[*.txt]
insert_final_newline = false

[*.md]
trim_trailing_whitespace = false

[Makefile]
indent_style = tab
5 changes: 4 additions & 1 deletion .env.local
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,7 @@ DB_HOST=localhost
DB_PORT=3306
DB_DATABASE=homestead
DB_USERNAME=homestead
DB_PASSWORD=secret
DB_PASSWORD=secret

DEV_MODE=1
CACHE=0
8 changes: 5 additions & 3 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ globals:
###########################################################################

require: true
$: true
jQuery: true
google: true

rules:

Expand Down Expand Up @@ -180,7 +183,7 @@ rules:
# #
###########################################################################

indent: [2, 2] # Set a specific tab width
indent: [0, 4] # Set a specific tab width
brace-style: 0 # enforce one true brace style
camelcase: 0 # require camel case names
comma-spacing: 2 # enforce spacing before and after comma
Expand All @@ -205,7 +208,7 @@ rules:
no-trailing-spaces: 2 # disallow trailing whitespace at the end of lines
no-multiple-empty-lines: 0 # disallow multiple empty lines
no-underscore-dangle: 0 # disallow dangling underscores in identifiers
no-extra-parens: 2 # disallow wrapping of non-IIFE statements in parens
no-extra-parens: 0 # disallow wrapping of non-IIFE statements in parens
one-var: 0 # allow just one var statement per function
padded-blocks: 0 # enforce padding within blocks
quotes: # specify whether double or single quotes should be used
Expand All @@ -222,4 +225,3 @@ rules:
spaced-line-comment: 0 # require or disallow a space immediately following
# the // in a line comment
wrap-regex: 0 # require regex literals to be wrapped in parentheses

5 changes: 5 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,12 @@ assets/vendor/bower
.tmp

# The style.css must be generated using 'compass compile'
assets/css/style.scss.css
assets/css/style.css
assets/css/grid.css

assets/js/main.bundle.js
assets/js/main.bundle.js.map

.deployment/data/*.zip
.deployment/data/*.tar
Expand Down
2 changes: 1 addition & 1 deletion .tasks/deployment/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ mv "$REV_FOLDER" "$COPY_DEST"

printf "Now we want to upload our archive to the server.\n"

scp "$COPY_DEST/$archiveFileName" $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_APPROOT
scp -P $DEPLOY_PORT "$COPY_DEST/$archiveFileName" $DEPLOY_USER@$DEPLOY_HOST:$DEPLOY_APPROOT

if [ $? -eq 1 ]; then
exit 1
Expand Down
8 changes: 6 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
help:
@ $(SCRIPTS_FOLDER)/help

build: clean test js css copy
build: clean js css copy

# Install all the project dependencies
# this may change in any project
Expand Down Expand Up @@ -69,6 +69,10 @@ watch-css:
test:
@ $(ESLINT) $(JS_BASE) --ignore-pattern=$(JS_BASE)/$(JS_OUT)

phpunit:
# Not in use for right now
# @ $(PHPUNIT) --bootstrap $(PHPUNIT_BOOTSTRAP) --configuration $(PHPUNIT_CONFIG) $(PHPUNIT_TESTDIR)

copy:
@ ASSETS_PATH=$(ASSETS_PATH) \
DEST=$(COPY_DEST) \
Expand Down Expand Up @@ -137,7 +141,7 @@ watch-scss: watch-sass
cssmin
favicons
test
phpunit
build
icons
clean

1 change: 0 additions & 1 deletion assets/css/grid.css

This file was deleted.

4 changes: 0 additions & 4 deletions assets/css/style.scss.css

This file was deleted.

2 changes: 0 additions & 2 deletions assets/js/main.bundle.js

This file was deleted.

1 change: 0 additions & 1 deletion assets/js/main.bundle.js.map

This file was deleted.

25 changes: 18 additions & 7 deletions assets/scss/base/_common.scss
Original file line number Diff line number Diff line change
@@ -1,8 +1,19 @@
a {
color: $link-color;
&:hover,
&:focus,
&:active {
color: $link-color-hover;
}
}
color: $link-color;
text-decoration: none;
transition: color .2s ease;
&:hover,
&:focus,
&:active {
color: $link-color-hover;
}
}

img {
max-width: 100%;
}

td,
th {
vertical-align: top;
}
82 changes: 52 additions & 30 deletions assets/scss/grid.scss
Original file line number Diff line number Diff line change
@@ -1,47 +1,69 @@
@charset "utf-8";

@import
'../vendor/bower/gridle/sass/gridle/gridle',
'../shared-variables.json',
'utils/variables',
'../vendor/bower/gi-scss-mixins/mixins';
'../vendor/bower/gridle/sass/gridle/gridle',
'../shared-variables.json',
'utils/variables',
'utils/mixins',
'../vendor/bower/gi-scss-mixins/mixins';

// check the documentation http://gridle.org/documentation

// setting up the grid
@include gridle_setup((
context: $default-columns-amount,
gutter-width: $default-gutter-width,
context: $default-columns-amount,
gutter-width: $default-gutter-width,
));

@include gridle_register_state (tablet, (
query: map-get($breakpoints, tablet),

gutter-width: 10%,
max-width: $break-medium,
query: map-get($breakpoints, tablet),
gutter-width: $tablet-gutter-width,
max-width: $break-medium,
));

// make the use of media queries a piece of cake
@include gridle_register_state (mobile, (
query: map-get($breakpoints, mobile),
gutter-width: 10%,
max-width: $break-small,
query: map-get($breakpoints, mobile),
gutter-width: $mobile-gutter-width,
max-width: $break-small,
));


// Generate classes
@include gridle_generate_classes(all, -debug);
@import 'utils/grid-helpers';


/**
* Main page container
*/

.container {
max-width: $break-large;
margin: 0 auto;
@include breakpoint($break-large) {
width: 100%;
}
max-width: $container-max-width;
margin: 0 auto;
@include breakpoint($break-large) {
max-width: $mobile-container-max-width;
}
}


/**
* Fix negative margins for breakpoints
*/

.row {
@include respond-to(tablet) {
margin-left: -($tablet-gutter-width / 2);
margin-right: -($tablet-gutter-width / 2);
}

@include respond-to(mobile) {
margin-left: -($mobile-gutter-width / 2);
margin-right: -($mobile-gutter-width / 2);
}
}


/**
* Small hack for a big problem, used to enable the background colors,
* images inside a grid block
Expand All @@ -54,16 +76,16 @@
* .gr-6
*/
.gr-inner {
margin-left: $default-gutter-width / 2;
margin-right: $default-gutter-width / 2;

@include respond-to(tablet) {
margin-left: 5%; // the half of the gutter width on tablet!
margin-right: 5%;
}

@include respond-to(mobile) {
margin-left: 5%; // the half of the gutter width on mobile!
margin-right: 5%;
}
margin-left: $default-gutter-width / 2;
margin-right: $default-gutter-width / 2;

@include respond-to(tablet) {
margin-left: $tablet-gutter-width / 2; // the half of the gutter width on tablet!
margin-right: $tablet-gutter-width / 2;
}

@include respond-to(mobile) {
margin-left: $mobile-gutter-width / 2; // the half of the gutter width on mobile!
margin-right: $mobile-gutter-width / 2;
}
}
Loading

0 comments on commit b5e7387

Please sign in to comment.