Skip to content
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

Seperated css #7258

Merged
merged 5 commits into from
Jan 18, 2020
Merged
Show file tree
Hide file tree
Changes from 4 commits
Commits
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
52 changes: 52 additions & 0 deletions app/assets/stylesheets/notes.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#notes .card {
background-color: #fff;
border: 1px solid;
border-color: #D3D3D3;
border-radius: 6px;
margin:1em 0em 1em 0em;
padding: 0px !important;
}
#notes .card-body {
margin-right: 1em;
margin-left: 1em;
padding: 0.8em;
text-align: left;
}

#notes .btn {
font-size: 15px;
}

#notes .buttons {
text-align: center;
}

#notes .imgg {
background: #aaa;
display: flex;
align-items: center;
}

#notes .note-not {
margin-left:auto;
margin-right: auto;
color: #fff;
}

#notes .ellipsis {
cursor: pointer;
}

#notes .dropdown-menu li a{
display: inline-block;
padding-bottom: 5px;
padding-left: 14px;
font-size: 13px;
}

#notes .bottom-right {
position: absolute;
bottom: 10px;
right: 16px;
text-decoration: underline;
}
57 changes: 1 addition & 56 deletions app/views/notes/_notes.html.erb
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<%= stylesheet_link_tag "notes", :media => "all" %>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you actually don't need to add this. Rails automatically adds these assets through the asset pipeline: https://guides.rubyonrails.org/asset_pipeline.html#controller-specific-assets

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Uzay-G Previously I did'nt added it but this was the reply from @jywarren in the previous pr
Screenshot 2020-01-16 at 9 34 40 PM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm. Well, i made the request because it seemed in the screenshots generated here that the styles were not appearing. I don't know that they're automatically included; we do have other styles that are for only specific pages, i believe?

https://stable.publiclab.org/tag/water-quality shows the way that page is supposed to look:

image

And i think the styles weren't getting loaded. Do you have this running locally and can you confirm? If not, we can check the latest auto-generated screenshots for this PR. Thanks for your patience on this!

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@jywarren This is the page that I am getting locally without including the stylesheet link
Screenshot 2020-01-18 at 3 03 55 PM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And what happens when you include it?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Uzay-G It remains the same
Screenshot 2020-01-18 at 4 43 15 PM

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah alright so we need to remove the stylesheet link tag

<% notes = notes || @notes # accept local if present, default to instance %>
<% pinned_nodes = pinned_nodes || @pinned_nodes || [] # accept local if present, default to instance %>
<% tagname = tagname || false %>
Expand All @@ -16,59 +17,3 @@
</div>
<%= will_paginate notes, renderer: WillPaginate::ActionView::BootstrapLinkRenderer unless @unpaginated || (unpaginated ||= false) %>

<style>
/* TODO: Let's move this to a real stylesheet */
#notes .card {
background-color: #fff;
border: 1px solid;
border-color: #D3D3D3;
border-radius: 6px;
margin:1em 0em 1em 0em;
padding: 0px !important;
}
#notes .card-body {
margin-right: 1em;
margin-left: 1em;
padding: 0.8em;
text-align: left;
}

#notes .btn {
font-size: 15px;
}

#notes .buttons {
text-align: center;
}

#notes .imgg {
background: #aaa;
display: flex;
align-items: center;
}

#notes .note-not {
margin-left:auto;
margin-right: auto;
color: #fff;
}

#notes .ellipsis {
cursor: pointer;
}

#notes .dropdown-menu li a{
display: inline-block;
padding-bottom: 5px;
padding-left: 14px;
font-size: 13px;
}

#notes .bottom-right {
position: absolute;
bottom: 10px;
right: 16px;
text-decoration: underline;
}

</style>