Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
39e8e4f
Adds profile pic to params in home index view:
carjug Aug 10, 2015
9e6a29e
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
carjug Aug 10, 2015
02a4591
Changes subscriptions model methods -- breaks ig and twi find or crea…
carjug Aug 10, 2015
14c9bd0
refactoring home controller to actually use the real model (posts)
EliaMG Aug 10, 2015
4f9611a
Merge pull request #23 from QuartzBrandi/homefix
EliaMG Aug 10, 2015
4ee266f
Adds profile_pic to the params in the twitter search subscribe button
carjug Aug 10, 2015
2daf1a1
Adds assigns_profile_pic method to ig and twi subscriptions controllers.
carjug Aug 10, 2015
b8b2cdf
Fixing merge conflict
carjug Aug 10, 2015
de36304
Merge pull request #24 from QuartzBrandi/model_code_refactor/caj
carjug Aug 10, 2015
de81973
Fixed one twitter controller test and recorded HTTP response via VCR
lilagrc Aug 10, 2015
054940e
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
lilagrc Aug 10, 2015
2ddf6b8
Merge pull request #25 from QuartzBrandi/vcr
lilagrc Aug 10, 2015
f778ae5
WIP Saving content for Instagram.
QuartzBrandi Aug 10, 2015
852a2db
Trying to test refresh functionality for Instagram. WIP.
QuartzBrandi Aug 10, 2015
e30d9e7
able to persist posts into the database
EliaMG Aug 10, 2015
2783836
Fixed multiple image display for twitter
lilagrc Aug 10, 2015
b854e73
Fixed image display. Again.
lilagrc Aug 10, 2015
774db4b
Adds methods for storing but not duplicating user content in the post…
carjug Aug 10, 2015
e22bdf1
Merge pull request #26 from QuartzBrandi/instagramquery/bew+caj
carjug Aug 10, 2015
6d79c90
WIP on twitter feed refresh. Fixed merge issue
lilagrc Aug 10, 2015
76144ce
Merge pull request #27 from QuartzBrandi/postmodel
lilagrc Aug 10, 2015
0162bf3
fixed type
lilagrc Aug 10, 2015
6cec1ef
Put images into an array for display.
QuartzBrandi Aug 10, 2015
7225efb
added an order by posted at to the posts for a user
EliaMG Aug 11, 2015
7f48059
Merge pull request #28 from QuartzBrandi/orderby
EliaMG Aug 11, 2015
5e88416
Fixed bug--saves more than the first subscription's post\!
QuartzBrandi Aug 11, 2015
5fb16c7
Deletes deprecated comments:
carjug Aug 11, 2015
049c8e0
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
carjug Aug 11, 2015
a43381b
Merge conflict.
QuartzBrandi Aug 11, 2015
634c640
Adds basic formatting for page. Yay.
carjug Aug 11, 2015
1d61d7b
Changes website title
carjug Aug 11, 2015
b84c833
Fixes margin for user div
carjug Aug 11, 2015
0ff0a01
Modified header to reflect application name
carjug Aug 11, 2015
454969e
Merge pull request #29 from QuartzBrandi/home_stylez/caj
carjug Aug 11, 2015
b4fb205
More stylez
carjug Aug 11, 2015
32fabb9
Merge pull request #30 from QuartzBrandi/home_stylez/caj
carjug Aug 11, 2015
5745726
Added logic to change button once someone has subscribed. Updated twi…
lilagrc Aug 11, 2015
e69f15c
Merge pull request #32 from QuartzBrandi/subscribe
lilagrc Aug 11, 2015
ce0556c
Merge conflicts.
QuartzBrandi Aug 11, 2015
4a1d96b
Merge pull request #33 from QuartzBrandi/igbug/bew/beast/master
QuartzBrandi Aug 11, 2015
0368d65
Fixed IG refresh when also subscribed to Twitter subs.
QuartzBrandi Aug 11, 2015
810d072
Merge pull request #34 from QuartzBrandi/igbug2.0/bew/beast/master
QuartzBrandi Aug 11, 2015
eae0de9
Changed .already_subscribed to user model method
lilagrc Aug 11, 2015
dc07969
added refresh font awesome icon to the header
EliaMG Aug 11, 2015
c5d6008
Merge pull request #35 from QuartzBrandi/refresh
EliaMG Aug 11, 2015
79c7a45
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
lilagrc Aug 11, 2015
09bb606
Merge pull request #36 from QuartzBrandi/subscribe2
lilagrc Aug 11, 2015
b9fb5e1
style stuffz
carjug Aug 11, 2015
ab7ed81
Merge commits
carjug Aug 11, 2015
68fa3d2
working refactor of the create tweets method that should work for ref…
EliaMG Aug 11, 2015
275e3f0
wip: still trying to get refresh method to work.
EliaMG Aug 11, 2015
5554f9c
Finished refresh for le twitter
lilagrc Aug 11, 2015
918fd70
Fixed refresh button.
QuartzBrandi Aug 11, 2015
f8e088f
Merge pull request #37 from QuartzBrandi/twitrefresh
lilagrc Aug 11, 2015
765da14
Kinda refactored the refresh ig method... At least took some function…
QuartzBrandi Aug 11, 2015
e38c7fa
More styles
carjug Aug 11, 2015
73e0958
Merge conflicts resolved.
QuartzBrandi Aug 11, 2015
4eb3c35
More stylez
carjug Aug 11, 2015
78e92e3
Merge pull request #38 from QuartzBrandi/refactorig/bew/beast/master
QuartzBrandi Aug 11, 2015
acad5fa
Merge conflict resolutions
carjug Aug 11, 2015
a155140
Merge pull request #39 from QuartzBrandi/home_stylez/caj
carjug Aug 11, 2015
d752833
moved the twitter client into the twitter controller and refactored t…
EliaMG Aug 11, 2015
2ac773d
Merge branch 'beast/master' into refactorclient
EliaMG Aug 11, 2015
54b2bb7
Merge pull request #40 from QuartzBrandi/refactorclient
EliaMG Aug 11, 2015
b2e0fbd
Forgot to move private methods into private.
QuartzBrandi Aug 11, 2015
a64f4cd
Stylez
carjug Aug 11, 2015
8c529b6
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
carjug Aug 11, 2015
82aa465
Merge pull request #41 from QuartzBrandi/home_stylez/caj
carjug Aug 11, 2015
26ad269
Refresh both instagram and twitter posts.
QuartzBrandi Aug 11, 2015
698dbe5
Saves 15 recent posts from subscriber upon subscribing.
QuartzBrandi Aug 11, 2015
32329b2
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
QuartzBrandi Aug 11, 2015
14e025b
changes
carjug Aug 11, 2015
6af4bd0
Fixed bug where if they didn't type anything into the search window i…
QuartzBrandi Aug 11, 2015
28f2bfa
Adds stuff
carjug Aug 11, 2015
ccae621
deleted helpers not using and added a test for the application helper
EliaMG Aug 11, 2015
6698a7e
Trying to refactor istagram refresh. Again.
QuartzBrandi Aug 11, 2015
46f5801
Merge pull request #42 from QuartzBrandi/rerefactoring/bew/beast/master
QuartzBrandi Aug 11, 2015
678999b
implemented vcr with the rest of the existing twitter sub controller …
EliaMG Aug 12, 2015
8a1a17d
Changed some stylez and added a footer
lilagrc Aug 12, 2015
55fa3fb
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
lilagrc Aug 12, 2015
eb68c9c
Merge updates to branch
lilagrc Aug 12, 2015
b85526c
Merge pull request #43 from QuartzBrandi/home_stylez/caj
lilagrc Aug 12, 2015
4de3f86
Back to top arrow only shows up when logged in
lilagrc Aug 12, 2015
87d4040
Merge pull request #44 from QuartzBrandi/home_stylez/caj
lilagrc Aug 12, 2015
04c1da2
WIP on limiting subcribtions to private users
lilagrc Aug 12, 2015
24f9907
Removed background from mouth icon in header.
QuartzBrandi Aug 12, 2015
778019e
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
lilagrc Aug 12, 2015
749c450
Added show pages to see one person's posts in one place
lilagrc Aug 12, 2015
d7e5ccf
adding vcr to git ignore
EliaMG Aug 12, 2015
6935d41
fixed merge conflict in posts
EliaMG Aug 12, 2015
db8cb58
Merge pull request #45 from QuartzBrandi/modelspecsmaybe
EliaMG Aug 12, 2015
b64e7d5
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
lilagrc Aug 12, 2015
b30f12a
Merge pull request #46 from QuartzBrandi/ig_followers
EliaMG Aug 12, 2015
86cad0d
passing specs for user model- all methods covered
EliaMG Aug 12, 2015
4bcd680
Adds subscription model method tests
carjug Aug 12, 2015
85a4900
Added comments & got tests to work for some complicated methods.
QuartzBrandi Aug 12, 2015
0d707e7
post model test for create_instagram_post
lilagrc Aug 12, 2015
70f9055
WIP home controller specs
carjug Aug 12, 2015
25d23dd
post model test for create_instagram_post
lilagrc Aug 12, 2015
578761a
Adds tests for home controller search method
carjug Aug 12, 2015
266e52d
Added posts controller tests
lilagrc Aug 12, 2015
2433fac
tests for home controller
EliaMG Aug 12, 2015
4afcda8
Fixed a couple ig_controller tests
lilagrc Aug 12, 2015
dfa601d
Merge pull request #47 from QuartzBrandi/lotsorspec/bw+lg
lilagrc Aug 12, 2015
68289f9
finished home controller spec
EliaMG Aug 12, 2015
d4f427c
Merge pull request #48 from QuartzBrandi/specapalooza
EliaMG Aug 12, 2015
a295883
fixed tests with change in ig factory
EliaMG Aug 12, 2015
76d2952
WIP.
QuartzBrandi Aug 12, 2015
b93a7f3
WIP.
QuartzBrandi Aug 12, 2015
cae3874
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
QuartzBrandi Aug 12, 2015
ec3868b
Merge pull request #49 from QuartzBrandi/negtests/bew/beast/master
QuartzBrandi Aug 12, 2015
9f7eca3
added spec test for flash error
EliaMG Aug 12, 2015
b877e0b
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
EliaMG Aug 12, 2015
67f0064
added test for private user cant follow
EliaMG Aug 12, 2015
abbfaef
Merge pull request #50 from QuartzBrandi/testflash
EliaMG Aug 12, 2015
afaccfd
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
QuartzBrandi Aug 12, 2015
ebfdea0
Added final twi_sub controller test
lilagrc Aug 12, 2015
8be1e82
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
lilagrc Aug 12, 2015
2937010
Merge pull request #51 from QuartzBrandi/twi_refresh_test
lilagrc Aug 12, 2015
5abaff5
ughh
carjug Aug 12, 2015
1fbb49c
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
carjug Aug 12, 2015
08a907c
Finally got HTTParty call in the specs to work. (Kinda.)
QuartzBrandi Aug 12, 2015
6e69ccf
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
QuartzBrandi Aug 12, 2015
2e2e39a
Merge pull request #52 from QuartzBrandi/rspechttparty/bw+lg
QuartzBrandi Aug 12, 2015
1639bec
added a posted ago time to the home feed
EliaMG Aug 12, 2015
4a03b29
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
EliaMG Aug 12, 2015
d3d6ed8
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
carjug Aug 12, 2015
5479422
Commented out skip_filter.
QuartzBrandi Aug 12, 2015
fa56a3f
added conditional logic that dev login won't show if in production
EliaMG Aug 12, 2015
15f1969
Took out pry requirements because Heroku is angry.
QuartzBrandi Aug 12, 2015
f638279
Removed space.
QuartzBrandi Aug 12, 2015
3b356e6
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
QuartzBrandi Aug 12, 2015
1212452
deleting gems and oauth strategy we're not using
EliaMG Aug 12, 2015
25ee0fc
Updated show method for post controller
lilagrc Aug 12, 2015
d057f6e
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
lilagrc Aug 12, 2015
7960536
deleting things confuses git
EliaMG Aug 12, 2015
a9a464d
Merge pull request #53 from QuartzBrandi/deletestuff
EliaMG Aug 12, 2015
0b8c411
Trying to fix image not displaying on Heroku.
QuartzBrandi Aug 12, 2015
8910919
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
QuartzBrandi Aug 12, 2015
83191f0
Merge pull request #54 from QuartzBrandi/bugs/bew/beast/master
QuartzBrandi Aug 12, 2015
e9cfa65
refreshes feed on login
EliaMG Aug 13, 2015
5c6f6c5
wip: fixed specs for sessions, weird fail with the show posts by user…
EliaMG Aug 13, 2015
0094d1f
Fixed post controller tests
lilagrc Aug 13, 2015
cdcfbe9
Working on extra specs.
QuartzBrandi Aug 13, 2015
0215f1a
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
lilagrc Aug 13, 2015
efd7b28
Working on rspecs.
QuartzBrandi Aug 13, 2015
59d80ec
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
EliaMG Aug 13, 2015
69b0f43
removed binding pry
EliaMG Aug 13, 2015
7ce2208
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
QuartzBrandi Aug 13, 2015
ef53c3f
Took out a binding pry.
QuartzBrandi Aug 13, 2015
7b07261
Merge pull request #55 from QuartzBrandi/bugs2.0/bew/beast/master
QuartzBrandi Aug 13, 2015
d46fa60
refactored show post from one user to use a partial and be in descend…
EliaMG Aug 13, 2015
f443028
fixed merge conflict of two people deleting binding pry
EliaMG Aug 13, 2015
7fc88bf
Merge pull request #56 from QuartzBrandi/refreshonlogin
EliaMG Aug 13, 2015
08d297e
tried to add a favicon
EliaMG Aug 13, 2015
cd740d1
refactor for all the coolest notice messages
EliaMG Aug 13, 2015
b3b2912
Merge pull request #57 from QuartzBrandi/refreshonlogin
EliaMG Aug 13, 2015
6240e2f
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
carjug Aug 13, 2015
ceb66e9
refactoring the user search results
EliaMG Aug 13, 2015
6ea7559
refactored user results to use partials in partials. because.
EliaMG Aug 13, 2015
bed804f
fixed test based on partial
EliaMG Aug 13, 2015
ea06a79
Merge pull request #58 from QuartzBrandi/refactorfun
EliaMG Aug 13, 2015
649a58f
Moved favicon location.
QuartzBrandi Aug 13, 2015
54e7560
deleting extra lines
EliaMG Aug 13, 2015
56eff9b
Fixed some small bugs.
QuartzBrandi Aug 13, 2015
f1950e7
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
QuartzBrandi Aug 13, 2015
40f7ba7
Merge pull request #59 from QuartzBrandi/favicon/bew
QuartzBrandi Aug 13, 2015
002fecc
Created list of a user's subscriptions and an option to unfollow
lilagrc Aug 13, 2015
601bc3c
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
lilagrc Aug 13, 2015
be08c6a
Moved view all subscriptions link to footer
lilagrc Aug 13, 2015
020d2e5
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
carjug Aug 13, 2015
86353fd
Adds login to subscriptions controller test
carjug Aug 13, 2015
5ec28a1
wrote a test for creating twitter posts and deleted blank lines
EliaMG Aug 13, 2015
5bb286c
added a negative test for instagram
EliaMG Aug 13, 2015
1f381c1
added negative spec for twitter
EliaMG Aug 13, 2015
d03e328
Adds specs for unfollow and subscriptions in home controller and user…
carjug Aug 13, 2015
707bbbe
Merge pull request #60 from QuartzBrandi/index
carjug Aug 13, 2015
af95251
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
EliaMG Aug 13, 2015
3a7da4b
Merge pull request #61 from QuartzBrandi/refactorfun
EliaMG Aug 13, 2015
8dffb8a
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
carjug Aug 13, 2015
7f6a4b3
Fixes photo sizing in all subscriptions view
carjug Aug 13, 2015
f97b6b7
Whitespace fixes
carjug Aug 13, 2015
d4c0ce3
Whitespace fixes
carjug Aug 13, 2015
25701f9
Whitespace
carjug Aug 13, 2015
726923d
Whitespace fixes
carjug Aug 13, 2015
67dbcdb
Guard clause for private Twitter user.
QuartzBrandi Aug 13, 2015
f68076d
Merge pull request #62 from QuartzBrandi/fix/bew
QuartzBrandi Aug 13, 2015
bd9778a
Merge branch 'beast/master' of github.com:QuartzBrandi/C3Projects--Se…
carjug Aug 13, 2015
318f441
Merge pull request #63 from QuartzBrandi/whitespace
carjug Aug 13, 2015
0e409b6
one more rspec test. back to 100% coverage. yay oh yay.
EliaMG Aug 13, 2015
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,4 @@
coverage/
.env
.DS_Store
vcr_cassettes/
4 changes: 0 additions & 4 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,7 @@ gem 'dotenv-rails', groups: [:development, :test]
gem 'twitter'

gem 'omniauth'
gem 'omniauth-github'
gem 'omniauth-instagram'
gem 'omniauth-twitter'

gem 'instagram'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '4.2.3'
Expand Down
20 changes: 0 additions & 20 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ GEM
railties (>= 3.0.0)
faraday (0.9.1)
multipart-post (>= 1.2, < 3)
faraday_middleware (0.9.2)
faraday (>= 0.7.4, < 0.10)
globalid (0.3.5)
activesupport (>= 4.1.0)
hashie (3.4.2)
Expand All @@ -94,11 +92,6 @@ GEM
json (~> 1.8)
multi_xml (>= 0.5.2)
i18n (0.7.0)
instagram (1.1.5)
faraday (>= 0.7, < 0.10)
faraday_middleware (>= 0.8, < 0.10)
hashie (>= 0.4.0)
multi_json (~> 1.0, >= 1.0.3)
jbuilder (2.3.1)
activesupport (>= 3.0.0, < 5)
multi_json (~> 1.2)
Expand All @@ -124,7 +117,6 @@ GEM
naught (1.0.0)
nokogiri (1.6.6.2)
mini_portile (~> 0.6.0)
oauth (0.4.7)
oauth2 (1.0.0)
faraday (>= 0.8, < 0.10)
jwt (~> 1.0)
Expand All @@ -134,21 +126,12 @@ GEM
omniauth (1.2.2)
hashie (>= 1.2, < 4)
rack (~> 1.0)
omniauth-github (1.1.2)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.1)
omniauth-instagram (1.0.1)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.0)
omniauth-oauth (1.1.0)
oauth
omniauth (~> 1.0)
omniauth-oauth2 (1.3.1)
oauth2 (~> 1.0)
omniauth (~> 1.2)
omniauth-twitter (1.2.1)
json (~> 1.3)
omniauth-oauth (~> 1.1)
pg (0.18.2)
pry (0.10.1)
coderay (~> 1.1.0)
Expand Down Expand Up @@ -271,13 +254,10 @@ DEPENDENCIES
dotenv-rails
factory_girl_rails (~> 4.0)
httparty
instagram
jbuilder (~> 2.0)
jquery-rails
omniauth
omniauth-github
omniauth-instagram
omniauth-twitter
pg
pry-rails
rails (= 4.2.3)
Expand Down
Binary file added app/assets/images/favicon.ico
Binary file not shown.
Binary file added app/assets/images/header-mouth-original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/header-mouth.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/mouths.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tongue-out-original.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added app/assets/images/tongue-out.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions app/assets/javascripts/posts.coffee
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# Place all the behaviors and hooks related to the matching controller here.
# All this logic will automatically be available in application.js.
# You can use CoffeeScript in this file: http://coffeescript.org/
95 changes: 86 additions & 9 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,36 @@ body {
// Exactly 50px because first (top) navbar is exactly 50px according to Bootstrap.
// Any more than 50px and there will be white space between the first and second navbars.
padding-top: 50px;
background-color: #FFFFCC;
background-color: #4FD5D6;
}

.container-fluid {
width: 70%;
background-color: #CDFFFF;
margin-top: -20px;
background-position: fixed no-repeat;
}

header {
background-color: #FF0000;
}

.header1 {
float: left;
width: 20%;
margin: 5px;
box-sizing: border-box;
}

.header1:hover {
content: image-url("tongue-out.png");
}

.jumbotron {
text-align: center;
background-color: #FF0000;
color: #FFFFCC;
margin-top: 20px;
}

.beast-mode {
Expand All @@ -32,6 +55,7 @@ body {

// Style of the navbar(s).
.navbar {
padding-left: 0;
background-color: #FF0000;
border: none;
// Default is rounded borders, which looks weird with two navbars.
Expand All @@ -40,15 +64,15 @@ body {

.navbar-default .navbar-brand {
font-family: 'Rock Salt', cursive;
color: #FFFFCC;
color: #CDFFFF;
}

.navbar-default .navbar-brand:hover {
color: #990000;
}

.navbar-default .navbar-text {
color: #FFFFCC;
color: #CDFFFF;
}

.navbar-brand {
Expand All @@ -57,7 +81,12 @@ body {

// To adjust the height of the second navbar, so it's not MASSIVE.
.navbar.navbar-static-top {
min-height: 30px;
margin-top: 5px;
min-height: 35px;
}

.navbar.navbar-static-top p {
margin-top: 20px;
}

//Style for the webpage subtitle.
Expand All @@ -81,8 +110,56 @@ p.navbar-text {
border: none;
}

// Form gains a margin when shrinking window.
// .navbar-form {
// margin-top: 1px;
// margin-bottom: 1px;
// }
.fa-refresh {
margin-right: 5px;
}

// Stuff for the feed!!!!!!!!!!!!!

.thumbnail {
margin-top: 3rem;
width: 100%;
}

.user{
// padding-left: 20px;
margin-bottom: 10px;
border-bottom: solid 1px #CABCBC;
}

.prof-pic {
width: 50px;
margin: 5px;
}

.posted-at {
float: right;
margin-right: 10px;
margin-top: 20px;
color: #616161;
}

.fix-width {
width: 350px;
}

.caption {
margin: 0 60px 20px 60px;
text-align: center;
font-weight: 500;
}

.img2 {
width: 50px;
}


footer {
position: fixed;
width: 100%;
bottom: 0;
}

footer a{
float: right;
}
1 change: 1 addition & 0 deletions app/assets/stylesheets/home.scss
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
// Place all the styles related to the home controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/

3 changes: 3 additions & 0 deletions app/assets/stylesheets/posts.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
// Place all the styles related to the posts controller here.
// They will automatically be included in application.css.
// You can use Sass (SCSS) here: http://sass-lang.com/
10 changes: 1 addition & 9 deletions app/controllers/application_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,10 @@ def assign_user
end
end

def twitter_api_object
Twitter::REST::Client.new do |config|
config.consumer_key = ENV["TWITTER_CLIENT_ID"]
config.consumer_secret = ENV["TWITTER_CLIENT_SECRET"]
config.access_token = ENV["TWITTER_ACCESS_TOKEN"]
config.access_token_secret = ENV["TWITTER_ACCESS_SECRET"]
end
end

def redirect_if_not_allowed
unless logged_in?
flash[:error] = "You must be logged in to see that."

redirect_to root_path
end
end
Expand Down
60 changes: 37 additions & 23 deletions app/controllers/home_controller.rb
Original file line number Diff line number Diff line change
@@ -1,34 +1,48 @@
class HomeController < ApplicationController

# def index
# if logged_in?
# client = twitter_api_object
# twitter_ids = @user.subscriptions.pluck(:twitter_id)
def index
if logged_in?
@posts = @user.posts.sorted_order
end
end

# @sub_array_tweets = []
def search
if params[:search].nil? || params[:search].empty?
flash[:error] = "Please enter text into the search box."
redirect_to root_path
elsif params[:website] == "twitter"
redirect_to twi_subscriptions_path(params: {twitter_search: params[:search]})
else
# when the website is instagram
redirect_to ig_subscriptions_path(params: {instagram_search: params[:search]})
end
end

# twitter_ids.each do |twitter_id|
# client.user_timeline(twitter_id.to_i).each do |tweet|
# @sub_array_tweets << tweet
# end
# end
# list of a user's subcriptions
def subscriptions
posts = @user.posts

# @sub_array_tweets.sort! { |a,b| b.as_json["created_at"].to_time <=> a.as_json["created_at"].to_time }
sub_array = []

# could transform tweets into our own "post" object...
# need to combine
# end
# end
posts.each do |post|
sub_array << [post.subscription_id, post.username]
end

def search
if params[:website] == "twitter"
redirect_to twi_subscriptions_path(params: {twitter_search: params[:search]})
elsif params[:website] == "instagram"
redirect_to ig_subscriptions_path(params: {instagram_search: params[:search]})
else
flash[:error] = "Please search via the search box."
redirect_to root_path
@sub_array = sub_array.uniq

@sub_array.each do |post|
id = post[0]
subscription = Subscription.find(id)
pic = subscription.profile_pic
post << pic
end
end

def unfollow
subscription = Subscription.find(params[:subscription_id])

@user.dissociate_subscription(subscription)

redirect_to subscriptions_path
end
end
Loading