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

[LAND-SEE] - Add mocks, images, home template, and navigation #596

Merged
merged 16 commits into from
Sep 10, 2017

Conversation

afilbert
Copy link
Contributor

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.

@camelburrito camelburrito self-requested a review August 23, 2017 07:52
@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="utf-8"?>
Copy link
Collaborator

Choose a reason for hiding this comment

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

optimize using svgo tool

Copy link
Contributor Author

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.

Copy link
Collaborator

@camelburrito camelburrito left a 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?

@afilbert
Copy link
Contributor Author

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:

  • Dropdowns/accordions in the sidebar being expandable vs our design featuring a fixed subnav for Stories
  • The simple search icon as opposed to the input on main nav, and the need for it to persist at all breakpoints
  • Specific layout of the footer, including how it behaves responsively when scaling down

Please let me know your thoughts and suggestions.

@afilbert
Copy link
Contributor Author

afilbert commented Sep 4, 2017

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.

Copy link
Collaborator

@camelburrito camelburrito left a 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!

h2,
.h2 {
letter-spacing: 0;
}
Copy link
Collaborator

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

left: 0;
width: 100%;
height: 1px;
background: #efe5e3;
Copy link
Collaborator

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?

Copy link
Contributor Author

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.

Copy link
Collaborator

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;

background: #efe5e3;
}

.fa {
Copy link
Collaborator

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.

Copy link
Contributor Author

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}}">
Copy link
Collaborator

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}}
Copy link
Collaborator

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

Copy link
Contributor Author

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.

@afilbert
Copy link
Contributor Author

afilbert commented Sep 9, 2017

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.

@afilbert
Copy link
Contributor Author

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!

Copy link
Collaborator

@camelburrito camelburrito left a 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.

left: 0;
width: 100%;
height: 1px;
background: #efe5e3;
Copy link
Collaborator

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;

},
"copyright": {
"text": "© Land + See, 2017 • ",
"terms":
Copy link
Collaborator

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

letter-spacing: .1rem;
}

.sidebar-nav-item {
Copy link
Collaborator

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)

@afilbert
Copy link
Contributor Author

Minor changes fixed, staging deployed @camelburrito!

@camelburrito camelburrito merged commit 0cd9662 into ampproject:master Sep 10, 2017
@camelburrito
Copy link
Collaborator

Congrats on your First PR!

@afilbert
Copy link
Contributor Author

Thanks, @camelburrito!

gifteconomist pushed a commit to metalabdesign/ampstart that referenced this pull request Oct 19, 2017
…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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants