-
Notifications
You must be signed in to change notification settings - Fork 152
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
[LAND-SEE] - Add mocks, images, home template, and navigation #596
Conversation
@@ -0,0 +1,13 @@ | |||
<?xml version="1.0" encoding="utf-8"?> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
optimize using svgo tool
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the svgo suggestion, @camelburrito. I went ahead and committed the optimized svgs.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Took a quick stab, most of the changes seem okay. Can you quickly explain why you were not able reuse footer and nav. Also can you provide a staging url for this PR?
For sure, here's the staging URL: https://landseeampstart.firebaseapp.com/templates/land-see/land-see.amp I felt that our theme styling was opinionated enough that it warranted creating custom partials as opposed to modifying the base components with new rules/markup. There were both Basecss classes and functional assumptions that the base components implemented, and that weren't editable by passing JSON variables, that didn't align with the Land + See theme design. Major items being:
Please let me know your thoughts and suggestions. |
I looked into using the ampstart navbar component some more and realized that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Overall Things look great, Just minor CSS nits
I commented on how to re-use existing components , happy to get on a call if things are not clear.
I really liked how you filled out the variables . This makes existing copypasteable components work on your template !
Thank you!
css/templates/land-see/page.css
Outdated
h2, | ||
.h2 { | ||
letter-spacing: 0; | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merge these rules into one
css/templates/land-see/page.css
Outdated
left: 0; | ||
width: 100%; | ||
height: 1px; | ||
background: #efe5e3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not just add border-bottom to the hr?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I originally wanted to control the width of the border, but realized I could just use 100% width due to container margins to achieve the same outcome. You're right, that could've been simplified. I did, however, end up reusing that class to add a border to the base ampstart nav component in the sidebar.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one small nit: instead of width 100% use right:0;
css/templates/land-see/page.css
Outdated
background: #efe5e3; | ||
} | ||
|
||
.fa { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is fa? - lets not create more undocumented utility classes.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a font-awesome class that I'm overriding. Eliminating that in my next commits.
|
||
{{#footer}} | ||
<!-- Start Footer --> | ||
<footer class="ampstart-footer flex flex-column items-center {{#spacing-classes}}{{.}}{{/spacing-classes}}{{^spacing-classes}}px3{{/spacing-classes}}"> |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I reviewed the footer partial and compared it against the existing footer component
It is possible to fully reuse the footer partial,
ampstart-footer
ampstart-footer-nav
ampstart-social-follow
classes should be more than enough to do all this with flexboxes (and more CSS as needed.)
To reorder DOM - you can use flexbox ordering
retain the existing copyright and you can add a new TOC variable if you need in the footer component
--> | ||
}} | ||
|
||
{{#navbar}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Again same feedback as above - we should try and use the components code as much as possible
I looked into using the ampstart navbar component some more and realized that {{#fixeditems}} could be used for the search icon. The problem I ran into there is that I'd like to use the font-awesome icon instead of passing in an svg. So I'm continuing to use my custom partial, but updated the "search" icon to be more customizable via JSON variables.
You are free to modify the components library to fit in anything that does not already have a place for it in there.
Also make sure the stuff you use has an appropriate distribution license , Apache-2 or CC0 I guess for images. Not sure if font awesome is re-distributable
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Eliminating font-awesome in next commit. That will solve a couple issues. I'll now just pass in our svg to existing {{#fixeditems}}
, and we won't need to rely on any font-awesome dependencies.
Thanks for the pointers, @camelburrito. My approach considered the tradeoff of custom partials/markup in exchange for reducing the amount of CSS needed to override the base components sufficiently enough to suit our theme. Sounds like more CSS is acceptable. Going to attempt reusing the base components with minimal modification. |
Deployed latest to staging for your review, @camelburrito: https://landseeampstart.firebaseapp.com/templates/land-see/land-see.amp Components mods:
Let me know if you need any additional changes. Thanks! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code Looks Good, this is good to go after the 3 minor stuff are fixed.
css/templates/land-see/page.css
Outdated
left: 0; | ||
width: 100%; | ||
height: 1px; | ||
background: #efe5e3; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
one small nit: instead of width 100% use right:0;
templates/land-see/land-see.amp.json
Outdated
}, | ||
"copyright": { | ||
"text": "© Land + See, 2017 • ", | ||
"terms": |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"tos": {
"classes": "",
"link": {
"url":"#", "text": "text"
}
}
This will line it up close to existing stuff and make it extensible
css/templates/land-see/page.css
Outdated
letter-spacing: .1rem; | ||
} | ||
|
||
.sidebar-nav-item { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you namespace this class so that it is sepcific to your template (i think you use land-see)
Minor changes fixed, staging deployed @camelburrito! |
Congrats on your First PR! |
Thanks, @camelburrito! |
…ject#596) * add mocks, customize components, copy css [wip] * add images, tweak css * primary, sidebar, footer nav [wip] * images tweaks * wrap up initial nav work * add land-see, may need alternative to svg waves * remove .ai files from repo * move image into correct folder * optimize svgs with svgo * make icon customizable * make target of search _blank * refactor nav to use ampstart base components * add search icon * trim whitespace ✂️ * resolve PR requests * build updated CSS_SIZES
Initial PR for Land + See templates. This adds the home template, references stories template (which will be added in subsequent PRs), and establishes the main, sidebar, and footer nav.
Please see mockups in
/mocks/land-see
, categorized based off of approved design mockups:https://projects.invisionapp.com/share/5DCXJEX3P#/screens/247500921_Home-Desktop-V5
Committed images needed to build out the home template, along with both .png and .svg samples of structural images. I plan on removing redundant image types as PRs are approved, but wanted to commit both for now. As mentioned on our initial dev conference call, @camelburrito, I've embedded the waves .svgs as tiling background images in css. That's kinda pushing the size of the css file already, so we may need to consider an alternative approach.
I'm working with Grain & Mortar as a consultant, so I signed an individual CLA. Please let me know if that's not sufficient.