New project link changed to a bigger button #73
No reviewers
Labels
No Label
admins only
bug
design
duplicate
gimme feedback
good first issue
hmmmm
invalid
reference
wontfix
No Milestone
No Assignees
2 Participants
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: hmn/hmn#73
Loading…
Reference in New Issue
No description provided.
Delete Branch "giggs/hmn:giggs-patch-1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Changed the New project link in user profile into a bigger button
Thanks for your contribution! It looks good visually, but the styles are currently in conflict with some other styles in the website. I left some specific comments, but the thrust of it is that we already have a
button
class for links that should get us most of the way, and padding helpers besides. I'd like to start there to ensure that this button's styles are reasonably consistent with the rest of the site.@ -27,0 +30,4 @@
color: white;
text-align: start;
font-size: 18px;
padding: 15px 26px;
We use
rem
for our spacing and padding instead ofpx
so that the site plays nice with different choices of default font size. We also have lots of utility CSS classes to help us out with this. For example, since I see you want more padding on the sides than on the top and bottom, you could simply put the classespv2 ph3
on the button. (pv2
= padding vertical 2,ph3
= padding vertical 3.) This helps us use consistent spacing across the site, and makes it easier to do basic layout since we don't have to write a custom CSS class for everything.Most of our utility classes come from Tachyons, which you can check out here (full list of classes here. We also have a bunch of extra ones defined in core.scss.
@ -27,0 +35,4 @@
cursor: pointer;
}
}
This extra closing brace is a syntax error.
@ -136,3 +148,3 @@
{{ if .OwnProfile }}
{{ if .CanAddProject }}
<a href="{{ .NewProjectUrl }}">+ New Project</a>
<<a href="{{ .NewProjectUrl }}" class="button">Add New Project</a>>
This looks like broken syntax.
Also - we actually do already have some styles for links that look like buttons, using the classname
button
. If you remove your custom CSS for.button
, you should already see some styles take effect on this link. How does it look if you keepclass="button"
but remove your custom CSS?Thanks for the feedback!
I've included a screenshot of what it looks like with the default button class and another with the custom background color + white text.
I personally like the custom style better, especially in dark theme, but it's your call. Let me know which one I should submit for further review
As I mentioned on Discord I'm very new to this, I used an inline style attribute in the link for the custom style. Should I do differently?
I like your new style better too, but I'd also rather not deviate from our typical button styles. What I'd rather do instead is update our button styles globally across the site, and I made a separate issue for that: #74
For now I'd prefer to ship this with just the stock
button
class, but if you'd like to make a PR exploring alternate styles for the global.button
class, that would be very welcome.@ -136,3 +136,3 @@
{{ if .OwnProfile }}
{{ if .CanAddProject }}
<a href="{{ .NewProjectUrl }}">+ New Project</a>
<a href="{{ .NewProjectUrl }}" class="button pv2 ph3" style ="background-color: #7e3834; color:white;">Add New Project</a>
Indent is weird, but not a huge deal. Let's remove the inline styles per my comment and ship this as is; we can try other styles like this in #74.
Done, thanks!
Looks great, thank you!
This is deployed! Looks much better. Thanks again for your contribution!