Giter VIP home page Giter VIP logo

greenwood-getting-started's People

Contributors

aholtzman avatar dependabot[bot] avatar devlab2425 avatar hutchgrant avatar jstockdi avatar thescientist13 avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

greenwood-getting-started's Issues

remove non web standard usages of CSS

As a "getting started" template, it would stand to reason that it probably should only promote web standards, which in this repo is conflicted due to usages of:

  1. nested CSS
  2. import for CSS files

Examples

  1. https://github.com/ProjectEvergreen/greenwood-getting-started/blob/master/src/components/footer/footer.css
  2. https://github.com/ProjectEvergreen/greenwood-getting-started/blob/master/src/components/footer/footer.js

What we should do here is the following

  1. For any instances of import xxx from some.css, put that right into the JavaScript template, e.g.
    // create templates that interpolate variables and HTML!
    getTemplate() {
    
      return `
        <style>
          /* contents of CSS file goes here instead */
        </style>
      
        /* some HTML code */
      `;
    }
  2. Un nest any of that CSS
  3. Remove dependency on @eve-container/eve-container and replace with FlexBox / Grid equivalent

This will be important as the next version of Greenwood, while custom PostCSS plugins will still be supported, it wont be by default, so if a project wants to use nested CSS, that's great, they can by just installing it into their project.

overflow scroll

Problem

No idea why this scroll is present in blog/page template; it looks out of place.

image

Solution

Remove it

use a `<template>` tag for header and footer components

Overview

Although we are just using Light DOM for the header and footer, e.g.

export default class HeaderComponent extends HTMLElement {
  // run some code to set HTML when the component is ready
  connectedCallback() {
    this.innerHTML = this.getTemplate();
  }

  // create templates that interpolate variables and HTML!
  getTemplate() {
    return `
      <!-- a bunch of HTML -->
    `;
  }
}

customElements.define('app-header', HeaderComponent);

It would likely be a bit more idiomatic to use a <template> tag

const template = document.createElement('template');

template.innerHTML = `
  <!-- a bunch of HTML -->
`;

export default class HeaderComponent extends HTMLElement {
  // run some code to set HTML when the component is ready
  connectedCallback() {
    this.innerHTML = template.content.cloneNode(true); // or something similar
  }
}

customElements.define('app-header', HeaderComponent);

Would also want to make sure this change is reflected in the Greenwood getting started guide
https://www.greenwoodjs.io/getting-started/branding/#templating

Missing template when running `npm run build`

Getting the following error

Error: ENOENT: no such file or directory, mkdir '/path/to/project/greenwood-getting-started/.greenwood/blog/first-post'

Full error output

$ npm run build

> [email protected] build /path/to/project/greenwood-getting-started
> greenwood build

-------------------------------------------------------
Welcome to Greenwood ♻️
-------------------------------------------------------
Reading project config
Initializing project workspace contexts
Generating graph of workspace files...
Scaffolding out project files...
Generate pages from templates...
Error: ENOENT: no such file or directory, mkdir '/path/to/project/greenwood-getting-started/.greenwood/blog/first-post'
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] build: `greenwood build`
npm ERR! Exit status 1
npm ERR! 
npm ERR! Failed at the [email protected] build script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in:
npm ERR!     /path/to/log/.npm/_logs/2019-10-03T01_12_47_261Z-debug.log

change footer to be "sticky"

Currently the content of each page is set in the respective CSS is hardcoded to a certain height. This helps the <footer> from appearing in the middle of the page.

Ideally it would be nice to keep the footer at the bottom of the viewport at all times dynamically.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.