Skip to content

Instantly share code, notes, and snippets.

@robwri32
robwri32 / media-query.css
Created May 29, 2019 19:06 — forked from gokulkrishh/media-query.css
CSS Media Queries for Desktop, Tablet, Mobile.
/*
##Device = Desktops
##Screen = 1281px to higher resolution desktops
*/
@media (min-width: 1281px) {
//CSS
<?php if(has_post_thumbnail()): ?>
<?php $full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); ?>
<?php $attachment_data = wp_get_attachment_metadata(get_post_thumbnail_id()); ?>
<li>
<?php echo avada_render_first_featured_image_markup( $post->ID, $size, $permalink ); ?>
</li>
<?php elseif; ?>
<!--this is what i'm trying to integrate it shuold define a default image if no featured image is set. -->
<!--this is the code that works it is baked into the theme-->
<?php if(has_post_thumbnail()): ?>
<?php $full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); ?>
<?php $attachment_data = wp_get_attachment_metadata(get_post_thumbnail_id()); ?>
<li>
<?php echo avada_render_first_featured_image_markup( $post->ID, $size, $permalink ); ?>
</li>
<?php endif; ?>
<!--this is the code that works it is baked into the theme-->
<?php if(has_post_thumbnail()): ?>
<?php $full_image = wp_get_attachment_image_src(get_post_thumbnail_id(), 'full'); ?>
<?php $attachment_data = wp_get_attachment_metadata(get_post_thumbnail_id()); ?>
<li>
<?php echo avada_render_first_featured_image_markup( $post->ID, $size, $permalink ); ?>
</li>
<?php endif; ?>
jQuery( document ).ready(function() {
"use strict";
// position dropdown menu correctly
jQuery.fn.fusion_position_menu_dropdown = function( variables ) {
if( ( js_local_vars.header_position == 'Top' && ! jQuery( 'body.rtl' ).length ) || js_local_vars.header_position == 'Left' ) {
return jQuery( this ).children( '.sub-menu' ).each( function() {
# Routes.rb
Rails.application.routes.draw do
resources :puppies do
member do
post 'upvote'
end
end
devise_for :users
root 'welcome#index'
/* IPHONE 6 PLUS */
@media only screen
and (min-device-width : 414px)
and (max-device-width : 736px)
and (orientation : portrait) {
}
/* IPHONE 6 */
@media only screen
rlw-2:trah2 rlw_mbp$ rails generate rspec install
/Users/rlw_mbp/Desktop/ruby/trah2/config/environments/development.rb:1:in `<top (required)>': undefined method `configure' for #<Trah2::Application:0x007f948ca1b878> (NoMethodError)
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `block in require'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:214:in `load_dependency'
from /Library/Ruby/Gems/2.0.0/gems/activesupport-4.0.2/lib/active_support/dependencies.rb:229:in `require'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:591:in `block (2 levels) in <class:Engine>'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `each'
from /Library/Ruby/Gems/2.0.0/gems/railties-4.0.2/lib/rails/engine.rb:590:in `block in <class:Engine>'
from /Library/Ruby/Gems/2.0.0/gems/rai
# Don't forget to:
# 1. Wash the car
# 2. Buy groceries
# 3. Finish my TTS homework
todos = ['Wash the car', 'Buy groceries', 'Finish my TTS homework']
puts todos.each_index {|x| print x, " -- " }