Skip to content

Commit

Permalink
local dev email
Browse files Browse the repository at this point in the history
  • Loading branch information
bak11004 committed Apr 3, 2016
1 parent bb15993 commit ae26caf
Show file tree
Hide file tree
Showing 15 changed files with 316 additions and 147 deletions.
45 changes: 9 additions & 36 deletions Vagrantfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
# vi: set ft=ruby :

# Vagrant plugin requirements
required_plugins = %w(vagrant-triggers vagrant-vbguest)
required_plugins = %w(vagrant-triggers vagrant-vbguest vagrant-hostsupdater)

plugins_to_install = required_plugins.select { |plugin| not Vagrant.has_plugin? plugin }
if not plugins_to_install.empty?
Expand All @@ -25,18 +25,18 @@ Vagrant.configure(2) do |config|
# Admin user configuration
admin_name = 'admin'
admin_pw = 'admin'
admin_email = 'example@uconn.edu'
admin_email = 'ationdigitalmedia@gmail.com'

# Theme to auto-activate
theme_slug_to_activate = 'twentysixteen'

# Plugins to start install activated/deactivated
plugin_slug_list_activate = ['disable-comments', 'force-regenerate-thumbnails', 'advanced-custom-fields']
plugin_slug_list_deactivate = ['cas-maestro']
#plugin_slug_list_activate = ['disable-comments', 'force-regenerate-thumbnails', 'advanced-custom-fields']
#plugin_slug_list_deactivate = ['cas-maestro']

# Ruby array to shell array
plugins_activate = plugin_slug_list_activate.join(' ')
plugins_deactivate = plugin_slug_list_deactivate.join(' ')
#plugins_activate = plugin_slug_list_activate.join(' ')
#plugins_deactivate = plugin_slug_list_deactivate.join(' ')

# Wordpress Paths
local_shared_folder = './www'
Expand All @@ -57,6 +57,7 @@ Vagrant.configure(2) do |config|
config.vm.box = "ubuntu/trusty64"

# Network
config.vm.hostname = "ation.local"
config.vm.network "forwarded_port", guest: 80, host: 9800
config.vm.network "private_network", ip: "#{private_ip}"

Expand Down Expand Up @@ -113,36 +114,8 @@ Vagrant.configure(2) do |config|
sudo chmod +x wp-cli.phar
sudo mv wp-cli.phar /usr/local/bin/wp
echo -e "Installing Wordpress"
cd #{guest_wordpress_install}
wp core install --url=#{private_ip} --title='#{wp_site_title}' --admin_user=#{admin_name} --admin_password=#{admin_pw} --admin_email=#{admin_email} --path=#{guest_wordpress_install}
wp theme is-installed #{theme_slug_to_activate} --url=#{private_ip}
if [ $? -eq 0 ]
then
echo "Theme present, activating now"
wp theme activate #{theme_slug_to_activate} --url=#{private_ip}
else
echo "Specified theme not installed. Using default."
fi
for plugin in #{plugins_activate}
do
wp plugin is-installed $plugin --url=#{private_ip}
if [ $? -eq 1 ]
then
wp plugin install $plugin --activate --url=#{private_ip}
else
wp plugin activate $plugin --url=#{private_ip}
fi
done
for plugin in #{plugins_deactivate}
do
wp plugin is-installed $plugin --url=#{private_ip}
if [ $? -eq 1 ]
then
wp plugin install $plugin --url=#{private_ip}
echo "$plugin was not activated."
fi
done
sudo a2enmod rewrite
sudo bash -c 'cat #{guest_shared_folder}/apacheconfig > /etc/apache2/sites-available/000-default.conf'
sudo service apache2 restart
sudo service mysql restart
Expand Down
16 changes: 16 additions & 0 deletions www/apacheconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
<VirtualHost *:80>
ServerAdmin webmaster@localhost
DocumentRoot /var/www/html

<Directory /var/www/html>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Order allow,deny
allow from all
</Directory>

ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>

# vim: syntax=apache ts=4 sw=4 sts=4 sr noet
5 changes: 5 additions & 0 deletions www/wp-content/themes/ation2016/page.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,11 @@
$context['work'] = Timber::get_posts( $work_args );
} else if ( $post->post_name === 'services' ) {
$context['services'] = Timber::get_terms('service');
$proj_args = array(
'post_type' => 'project',
'posts_per_page' => 10,
);
$context['projects'] = Timber::get_posts( $proj_args );
} else if ( is_front_page() ) {
// Grab vimeo URL and it's ID to pass to embed.
$context['vimeo_id'] = substr( parse_url( $post->vimeo_url, PHP_URL_PATH ), 1 );
Expand Down
25 changes: 20 additions & 5 deletions www/wp-content/themes/ation2016/src/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ jQuery( document ).ready( function( $ ) {
// Redo layout once each image is loaded
$blocks.imagesLoaded().progress( function() {
$blocks.isotope('layout');
})
.done( function() {
console.log('imagesloaded done');
// If we are on the work page and a hash has been provided, filter by that hash
if ( $blocks && window.location.hash ) {
var urlfilt = window.location.hash.replace('#', '.');
$blocks.isotope({
filter: urlfilt,
percentPosition: true,
itemSelector: '.block',
columnWidth: '.block',
});
}
});

// Filter grid items based on their work category, on the click of a filter
Expand All @@ -35,10 +48,12 @@ jQuery( document ).ready( function( $ ) {

// Mute autoplay vimeo embed
var video_iframe= $("#vimeo_player")[0];
var player = $f(video_iframe);
player.addEvent('ready', function() {
console.log('muting vimeo');
player.api('setVolume', 0);
});
if( video_iframe ) {
var player = $f(video_iframe);
player.addEvent('ready', function() {
console.log('muting vimeo');
player.api('setVolume', 0);
});
}

});
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ $service-padding: 20px;

.services {
.bubbles {
background-color: transparent;
margin-bottom: 40px;
a {
border-radius: 50px;
width: 70px;
Expand Down Expand Up @@ -38,11 +40,15 @@ $service-padding: 20px;
margin-left: -$service-padding;
padding-left: $service-padding;
line-height: 1.5;
background-color: $orange;
font-weight: bold;
border-bottom: 5px solid $orange;
font-weight: 200;
}

p {
&:first-of-type {
flex: 1 0 auto;
margin-top: 0;
}
font-family: $header-font;
color: white;
}
Expand Down
1 change: 1 addition & 0 deletions www/wp-content/themes/ation2016/src/styles/site.scss
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ $header-height-sticky: 70px;
@import 'utility/images';
@import 'utility/embeds';
@import 'utility/utility';
@import 'utility/forms';

body {
background-color: $white;
Expand Down
23 changes: 22 additions & 1 deletion www/wp-content/themes/ation2016/src/styles/utility/_buttons.scss
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.ation-btn {
border: 3px solid $white;
border: 3px solid transparent;
color: $white;
background-color: $orange;
transition: 0.2s;
Expand All @@ -9,10 +9,31 @@
font-family: $header-font;
margin-bottom: 20px;
text-align: center;
letter-spacing: 1px;
&.small {
font-size: 14px;
}
&.no-marg-bot {
margin-bottom: 0px;
}
&:hover {
color: $orange;
background-color: $white;
border-color: $orange;
text-decoration: none;
}
}


.btn-circle {
margin-top: 2px;
margin-left: 2px;
margin-right: 2px;
width: 70px;
height: 70px;
padding: 0;
border-radius: 50px;
background-size: 120%;
background-repeat: no-repeat;
background-position: -8.5px 2px;
}
15 changes: 15 additions & 0 deletions www/wp-content/themes/ation2016/src/styles/utility/_forms.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
form {
margin-bottom: 40px;
label {
font-family: $header-font;
font-size: 16px;
}
input,select,textarea {
font-family: $header-font;
}
input[type="submit"] {
@extend .ation-btn;
@extend .small;
@extend .no-marg-bot;
}
}
25 changes: 20 additions & 5 deletions www/wp-content/themes/ation2016/static/scripts/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,19 @@ jQuery( document ).ready( function( $ ) {
// Redo layout once each image is loaded
$blocks.imagesLoaded().progress( function() {
$blocks.isotope('layout');
})
.done( function() {
console.log('imagesloaded done');
// If we are on the work page and a hash has been provided, filter by that hash
if ( $blocks && window.location.hash ) {
var urlfilt = window.location.hash.replace('#', '.');
$blocks.isotope({
filter: urlfilt,
percentPosition: true,
itemSelector: '.block',
columnWidth: '.block',
});
}
});

// Filter grid items based on their work category, on the click of a filter
Expand All @@ -35,10 +48,12 @@ jQuery( document ).ready( function( $ ) {

// Mute autoplay vimeo embed
var video_iframe= $("#vimeo_player")[0];
var player = $f(video_iframe);
player.addEvent('ready', function() {
console.log('muting vimeo');
player.api('setVolume', 0);
});
if( video_iframe ) {
var player = $f(video_iframe);
player.addEvent('ready', function() {
console.log('muting vimeo');
player.api('setVolume', 0);
});
}

});
2 changes: 1 addition & 1 deletion www/wp-content/themes/ation2016/static/scripts/main.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit ae26caf

Please sign in to comment.