diff --git a/Gemfile b/Gemfile index 1a34c45..660532a 100644 --- a/Gemfile +++ b/Gemfile @@ -73,3 +73,5 @@ end group :production do gem 'mysql2' end + +gem 'high_voltage', '~> 2.4.0' diff --git a/Gemfile.lock b/Gemfile.lock index c9ade6e..fe7dbff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -92,6 +92,7 @@ GEM globalid (0.3.6) activesupport (>= 4.1.0) hashie (3.4.2) + high_voltage (2.4.0) i18n (0.7.0) jbuilder (2.3.1) activesupport (>= 3.0.0, < 5) @@ -241,6 +242,7 @@ DEPENDENCIES devise factory_girl_rails faker + high_voltage (~> 2.4.0) jbuilder (~> 2.0) jquery-datatables-rails (~> 3.3.0) jquery-rails diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index e07c5a8..6a254ee 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -12,5 +12,6 @@ // //= require jquery //= require jquery_ujs +//= require dataTables/jquery.dataTables //= require turbolinks //= require_tree . diff --git a/app/assets/javascripts/users.coffee b/app/assets/javascripts/users.coffee new file mode 100644 index 0000000..24f83d1 --- /dev/null +++ b/app/assets/javascripts/users.coffee @@ -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/ diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index f9cd5b3..f03067c 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -11,5 +11,7 @@ * file per style scope. * *= require_tree . + *= require dataTables/jquery.dataTables *= require_self + *= require purecss */ diff --git a/app/assets/stylesheets/purecss.css b/app/assets/stylesheets/purecss.css new file mode 100644 index 0000000..a8615b6 --- /dev/null +++ b/app/assets/stylesheets/purecss.css @@ -0,0 +1,9 @@ +/* + =require purecss/base + =require purecss/buttons + =require purecss/forms + =require purecss/grids + =require purecss/grids-responsive + =require purecss/menus + =require purecss/tables +*/ diff --git a/app/assets/stylesheets/users.scss b/app/assets/stylesheets/users.scss new file mode 100644 index 0000000..1efc835 --- /dev/null +++ b/app/assets/stylesheets/users.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the users controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/app/controllers/users_controller.rb b/app/controllers/users_controller.rb new file mode 100644 index 0000000..3e74dea --- /dev/null +++ b/app/controllers/users_controller.rb @@ -0,0 +1,2 @@ +class UsersController < ApplicationController +end diff --git a/app/helpers/users_helper.rb b/app/helpers/users_helper.rb new file mode 100644 index 0000000..2310a24 --- /dev/null +++ b/app/helpers/users_helper.rb @@ -0,0 +1,2 @@ +module UsersHelper +end diff --git a/app/views/pages/landing.html.erb b/app/views/pages/landing.html.erb new file mode 100644 index 0000000..31184f6 --- /dev/null +++ b/app/views/pages/landing.html.erb @@ -0,0 +1,9 @@ +

Hallo

+ +<% if user_signed_in? %> +

Yeah! Je bent ingelogd.

+<% else %> + Log een keer in! +

<%= link_to "Log in met Zeus WPI", user_omniauth_authorize_path(:zeuswpi) %>

+<% end %> + diff --git a/config/routes.rb b/config/routes.rb index 6547aea..c800bae 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -3,6 +3,8 @@ Rails.application.routes.draw do omniauth_callbacks: 'callbacks' } + root to: 'high_voltage/pages#show', id: "landing" + # The priority is based upon order of creation: first created -> highest priority. # See how all your routes lay out with "rake routes". diff --git a/spec/controllers/users_controller_spec.rb b/spec/controllers/users_controller_spec.rb new file mode 100644 index 0000000..e2c3d3b --- /dev/null +++ b/spec/controllers/users_controller_spec.rb @@ -0,0 +1,5 @@ +require 'rails_helper' + +RSpec.describe UsersController, type: :controller do + +end diff --git a/spec/helpers/users_helper_spec.rb b/spec/helpers/users_helper_spec.rb new file mode 100644 index 0000000..b2e3444 --- /dev/null +++ b/spec/helpers/users_helper_spec.rb @@ -0,0 +1,15 @@ +require 'rails_helper' + +# Specs in this file have access to a helper object that includes +# the UsersHelper. For example: +# +# describe UsersHelper do +# describe "string concat" do +# it "concats two strings with spaces" do +# expect(helper.concat_strings("this","that")).to eq("this that") +# end +# end +# end +RSpec.describe UsersHelper, type: :helper do + pending "add some examples to (or delete) #{__FILE__}" +end