Skip to content

Commit

Permalink
design changes
Browse files Browse the repository at this point in the history
  • Loading branch information
prithvi16 committed Sep 11, 2017
1 parent 2cee60a commit 7227504
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 9 deletions.
17 changes: 15 additions & 2 deletions app/assets/stylesheets/application.scss
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,18 @@
body{
font-family: 'Quicksand', sans-serif;
}
.title-bar{
display: flex;
justify-content: space-between;
margin:20px;
}

.brand-title{

font-family: 'PT Mono', monospace;
font-weight: bold;
font-size: 30px;
}
btn {
display: inline-block;
margin-bottom: 0;
Expand All @@ -50,7 +62,7 @@
.new-paste {
font-size: 30px;
font-weight: 500;
margin-top: 20px;

a{
color: #222;

Expand All @@ -67,8 +79,9 @@
border-color: black;
}
#word-area {

font-size: 19px;
font-family: 'PT Mono', monospace;
font-weight: bold;
}

.paste-title{
Expand Down
8 changes: 5 additions & 3 deletions app/controllers/index_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@ def home
def new
@paste = Paste.new(paste_params)
@paste.hash_number= SecureRandom.hex (6)

@paste.save
if @paste.title.blank?
@paste.title= "Untitled"
end
@paste.save
redirect_to "/p/"+ @paste.hash_number

end
Expand All @@ -33,7 +35,7 @@ def show
private

def paste_params
params.require(:paste).permit(:title, :content , :pass_checker , :pass_key)
params.require(:paste).permit(:title, :content )
end

end
2 changes: 1 addition & 1 deletion app/views/index/home.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@

<div class="form-group">
<%= f.label :content %>
<%= f.text_area :content, size: "60x12" , id: "word-area" , class: "form-control", placeholder: "REMEMBER MARKDOWN IS ❤ " %>
<%= f.text_area :content, size: "60x16" , id: "word-area" , class: "form-control", placeholder: "REMEMBER MARKDOWN IS ❤ " %>

</div>

Expand Down
14 changes: 12 additions & 2 deletions app/views/layouts/application.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,19 @@
<body>

<div class="container">
<div class="new-paste">
<%= link_to "new paste" , "/" %>

<div class="title-bar">

<div class="brand-title">
Markdown//BIN
</div>
<div class="new-paste">
<%= link_to "new paste" , "/" %>
</div>


</div>



<%= yield %>
Expand Down
2 changes: 1 addition & 1 deletion test/controllers/index_controller_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class IndexControllerTest < ActionDispatch::IntegrationTest
test "should get home" do
get index_home_url
get root_url
assert_response :success
end

Expand Down

0 comments on commit 7227504

Please sign in to comment.