Skip to content

Commit

Permalink
to heroku
Browse files Browse the repository at this point in the history
  • Loading branch information
thai321 committed Sep 29, 2017
1 parent 7bd5fe8 commit 4ae2238
Show file tree
Hide file tree
Showing 23 changed files with 1,192 additions and 80 deletions.
4 changes: 2 additions & 2 deletions FrontEnd/components/project_show/step_item.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,8 @@ class StepItem extends React.Component {
return (
<div className="step-item-buttons">
<div>
<span className="step-item-count">Step {count}</span>
<span className="step-item-count">Step {count}:</span>
<span className="step-item-title">{title}</span>
</div>

{editButton()}
Expand All @@ -35,7 +36,6 @@ class StepItem extends React.Component {
<div className="step-item">
{displayButtons(author.id)}

<span className="step-item-title">{title}</span>
<div
className="ql-editor"
dangerouslySetInnerHTML={{ __html: body }}
Expand Down
2 changes: 1 addition & 1 deletion FrontEnd/components/step_form/step_form.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class StepForm extends React.Component {
const header =
this.props.formType === 'new'
? 'New Step'
: `Edit Step ${this.props.idx + 1}`;
: `Edit Step ${this.props.idx}`;

return (
<div>
Expand Down
Binary file added app/assets/images/aquinas.jpg
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/davidhume.jpg
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/epicurus.jpg
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/galileo.jpg
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/lewis.JPG
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/newton.jpg
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/plato.jpg
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/pythagoras.jpg
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/rene.jpg
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/socrates.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
15 changes: 8 additions & 7 deletions app/assets/javascripts/bundle.js
Original file line number Diff line number Diff line change
Expand Up @@ -63342,7 +63342,13 @@ var StepItem = function (_React$Component) {
'span',
{ className: 'step-item-count' },
'Step ',
count
count,
':'
),
_react2.default.createElement(
'span',
{ className: 'step-item-title' },
title
)
),
editButton()
Expand All @@ -63356,11 +63362,6 @@ var StepItem = function (_React$Component) {
'div',
{ className: 'step-item' },
displayButtons(author.id),
_react2.default.createElement(
'span',
{ className: 'step-item-title' },
title
),
_react2.default.createElement('div', {
className: 'ql-editor',
dangerouslySetInnerHTML: { __html: body }
Expand Down Expand Up @@ -71370,7 +71371,7 @@ var StepForm = function (_React$Component) {
project_id = _props$step.project_id;

var text = this.props.formType === 'new' ? 'Create Step' : 'Update Step';
var header = this.props.formType === 'new' ? 'New Step' : 'Edit Step ' + (this.props.idx + 1);
var header = this.props.formType === 'new' ? 'New Step' : 'Edit Step ' + this.props.idx;

return _react2.default.createElement(
'div',
Expand Down
2 changes: 1 addition & 1 deletion app/assets/javascripts/bundle.js.map

Large diffs are not rendered by default.

5 changes: 4 additions & 1 deletion app/assets/stylesheets/components/step_item.scss
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,15 @@
.step-item-count {
font-family: 'Faustina', sans-serif;
font-size: 40px;
font-weight: bold;
}
}

.step-item-title {
font-family: 'Open Sans', sans-serif;
font-size: 30px;
font-size: 35px;
font-weight: bold;
margin-left: 10px;
}

.step-item-buttons-group {
Expand Down
2 changes: 1 addition & 1 deletion app/models/project.rb
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ class Project < ApplicationRecord
validates :title, presence: true
validates :published, inclusion: [true, false]

default_scope -> { order(created_at: :desc) }
# default_scope -> { order(created_at: :desc) }

has_attached_file :image, default_url: "default_project.png",styles: {
medium: '300x300>'
Expand Down
541 changes: 541 additions & 0 deletions db/save.rb

Large diffs are not rendered by default.

8 changes: 0 additions & 8 deletions db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,14 +46,6 @@
t.index ["follower_id"], name: "index_follows_on_follower_id"
end

create_table "projectTags", force: :cascade do |t|
t.integer "project_id", null: false
t.integer "tag_id", null: false
t.datetime "created_at", null: false
t.datetime "updated_at", null: false
t.index ["project_id", "tag_id"], name: "index_projectTags_on_project_id_and_tag_id", unique: true
end

create_table "project_tags", force: :cascade do |t|
t.integer "project_id", null: false
t.integer "tag_id", null: false
Expand Down
580 changes: 534 additions & 46 deletions db/seeds.rb

Large diffs are not rendered by default.

Empty file added db/seeds/aristotle.rb
Empty file.
29 changes: 29 additions & 0 deletions db/seeds/data.rb

Large diffs are not rendered by default.

55 changes: 42 additions & 13 deletions db/seeds/seed_user.rb
Original file line number Diff line number Diff line change
@@ -1,28 +1,57 @@
User.create(username: 'guest', email: '[email protected]', password: '123456')
puts 'Create a Guest for Demo'
demo = User.create(username: 'guest', email: '[email protected]', password: '123456')




u1 = User.create(username: 'Aristotle', email: '[email protected]', password: '123456')
u1.image = File.new("#{Rails.root}/app/assets/images/aristotle.jpg")
u1.save


# f = File.open("aristotle.jpg")
u2 = User.create(username: 'galileo', email: '[email protected]', password: '123456')
u2.image = File.new("#{Rails.root}/app/assets/images/galileo.jpg")
u2.save


u3 = User.create(username: 'Plato', email: '[email protected]', password: '123456')
u3.image = File.new("#{Rails.root}/app/assets/images/plato.jpg")
u3.save


u4 = User.create(username: 'Pythagoras', email: '[email protected]', password: '123456')
u4.image = File.new("#{Rails.root}/app/assets/images/pythagoras.jpg")
u4.save

u5 = User.create(username: 'Rene Descartes', email: '[email protected]', password: '123456')
u5.image = File.new("#{Rails.root}/app/assets/images/rene.jpg")
u5.save


u6 = User.create(username: 'CSLewis', email: '[email protected]', password: '123456')
u6.image = File.new("#{Rails.root}/app/assets/images/lewis.jpg")
u6.save


u7 = User.create(username: 'Thomas Aquinas', email: '[email protected]', password: '123456')
u7.image = File.new("#{Rails.root}/app/assets/images/aquinas.jpg")
u7.save

u8 = User.create(username: 'Epicurus', email: '[email protected]', password: '123456')
u8.image = File.new("#{Rails.root}/app/assets/images/epicurus.jpg")
u8.save

User.create(username: 'galileo', email: '[email protected]', password: '123456')
u9 = User.create(username: 'Socrates', email: '[email protected]', password: '123456')
u9.image = File.new("#{Rails.root}/app/assets/images/socrates.jpg")
u9.save


u10 = User.create(username: 'David Hume', email: '[email protected]', password: '123456')
u10.image = File.new("#{Rails.root}/app/assets/images/davidhume.jpg")
u10.save

u11 = User.create(username: 'Isaac Newton', email: '[email protected]', password: '123456')
u11.image = File.new("#{Rails.root}/app/assets/images/newton.jpg")
u11.save

User.create(username: 'Plato', email: '[email protected]', password: '123456')
User.create(username: 'Pythagoras', email: '[email protected]', password: '123456')
User.create(username: 'Rene', email: '[email protected]', password: '123456')
User.create(username: 'CSLewis', email: '[email protected]', password: '123456')
User.create(username: 'Thomas Aquinas', email: '[email protected]', password: '123456')
User.create(username: 'Epicurus', email: '[email protected]', password: '123456')
User.create(username: 'Socrates', email: '[email protected]', password: '123456')
User.create(username: 'David Hume', email: '[email protected]', password: '123456')
User.create(username: 'Isaac Newton', email: '[email protected]', password: '123456')

puts 'Create 11 Users'
29 changes: 29 additions & 0 deletions db/seeds/test.rb

Large diffs are not rendered by default.

0 comments on commit 4ae2238

Please sign in to comment.