-
Notifications
You must be signed in to change notification settings - Fork 53
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Random projects page #132
Merged
Merged
Random projects page #132
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4e96ef3
Test for zoomed layout for random projects
eefeb6e
Zoomed layout actually zooms
19d84a6
Assigns random project in controller
675826f
Proper rendering of zoomed project
c8a9e64
Refreshes projects every 30 seconds
c2ca21f
Update zoomed.html.haml
kirushik f8dc8e7
Update random.html.haml
kirushik 93f49b0
toggleClass instead of ifs
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
// This is a manifest file that'll be compiled into application.js, which will include all the files | ||
// listed below. | ||
// | ||
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts, | ||
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path. | ||
// | ||
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the | ||
// the compiled file. | ||
// | ||
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD | ||
// GO AFTER THE REQUIRES BELOW. | ||
// | ||
//= require jquery | ||
//= require jquery_ujs | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
$font-size-base: 32px; | ||
|
||
@import "strap-on"; | ||
@import "font-awesome"; | ||
|
||
@import "zoomed"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.page-header #play-pause-button { | ||
display: none; | ||
} | ||
.page-header:hover #play-pause-button { | ||
display: block; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
%html{xmlns: 'http://www.w3.org/1999/html'} | ||
%head | ||
%title | ||
- if content_for?(:title) | ||
Hack Week: | ||
= yield :title | ||
-else | ||
Hack Week | ||
%meta{charset: 'utf-8'} | ||
%meta{name: 'viewport', content: 'width=device-width, initial-scale=1.0'} | ||
= favicon_link_tag 'favicon.gif' | ||
= stylesheet_link_tag 'zoomed.application', media: 'all' | ||
%meta{property: 'og:title', content: 'SUSE Hack Week'} | ||
%meta{property: 'og:image', content: 'http://hackweek.suse.com/images/hackweek-logo-10.png'} | ||
%meta{property: 'og:site_name', content: 'SUSE Hack Week'} | ||
%meta{property: 'og:description', content: 'Hack Week is the week where SUSE engineers can experiment without limits. This is the opportunity to innovate, collaborate across teams and learn.'} | ||
= javascript_include_tag 'zoomed.application' | ||
= csrf_meta_tags | ||
%body | ||
.container-fluid | ||
#content | ||
= yield | ||
|
||
= yield :script |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,63 @@ | ||
- content_for :title do | ||
= @project.title | ||
|
||
.row | ||
.col-md-12 | ||
.page-header.media | ||
.pull-left | ||
%h3 | ||
= @project.title | ||
%br | ||
%small | ||
= render :partial => "projects/state_name", :locals => {:project => @project } | ||
by | ||
= link_to @project.originator.name, @project.originator | ||
.pull-right | ||
%button.btn.btn-default#play-pause-button{ data: { running: :true } } | ||
=fa_icon :pause, id: 'play-pause-icon' | ||
.row | ||
.col-sm-8 | ||
:markdown | ||
#{@project.description} | ||
.col-sm-4 | ||
.row | ||
.col-sm-12 | ||
%h5 | ||
- if @project.users.empty? | ||
No hackers. | ||
-else | ||
Hackers: | ||
.well.well-sm#hackers | ||
- @project.users.each do |user| | ||
= link_to user_path(user) do | ||
= image_tag user.gravatar_url(:size => "64"), alt: user.name, title: user.name, class: "img-thumbnail", id: "user#{user.id}-gravatar" | ||
.clearfix | ||
|
||
.row | ||
.col-sm-12 | ||
%h5 | ||
Activity: | ||
%ul | ||
- @project.updates.last(5).reverse.each do |update| | ||
%li | ||
= render :partial => "updates/show", :locals => { :update => update } | ||
|
||
- content_for :script do | ||
:javascript | ||
$(function() { | ||
$('#play-pause-button').click(function() { | ||
var button = $('#play-pause-button'); | ||
var icon = $('#play-pause-icon'); | ||
var running = Boolean(button.data("running")); | ||
|
||
button.data("running", !running); | ||
icon.toggleClass('fa-play fa-pause'); | ||
}); | ||
|
||
window.setInterval(function() { | ||
var running = Boolean($('#play-pause-button').data("running")); | ||
if (running) { | ||
location.reload(); | ||
} | ||
}, 30000); | ||
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
= "#{time_ago_in_words update.created_at} ago:" | ||
%em | ||
%small= "#{time_ago_in_words update.created_at} ago:" | ||
= link_to "#{update.author.name}", user_path(update.author) | ||
= " #{update.text}" | ||
%small= " #{update.text}" | ||
= link_to "#{update.project.title}", project_path(update.project) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I might be misreading this, but isn't this missing an else? Wouldn't this display 'No Hackers:' if there are no project participants?