Giter VIP home page Giter VIP logo

spruce's Introduction

This theme is an example theme, upon which all new themes should be based.

Directory Structure

There are a few standard files that the theme loader looks for.

config.yml

Declares information about the theme to the backend, such as theme versioning and feature support. There are a few required attributes that you should be aware of.

  • api_version specifies the version of the theme API to use.
  • history is a changelog for each version of the theme. The text in this hash is shown to users for non-automatic upgrades, so ensure that the text in here is understandable by end users.
  • support is a hash of what features are supported as of what version
  • can_automatically_upgrade_to_versions lists versions that are "automatic" upgrades. These upgrades are bug fixes or other changes that do not affect the appearance of user sites.

meta.yml

Declares user-visible theme information, such as theme title, preview image location, and categorization.

  • name defines the name of the theme, used throughout the UI.
  • description is an explanation of the theme. Currently not used anywhere on Format, his attribute is being kept around for future compatibility.
  • skins defines the names and id's of variable presets (formerly known as skins). All themes should have at least two skins, most commonly a "light" and a "dark" skin.
  • default_skin defines the id of the above skin that should be the "default" for a theme.
  • preview_images defines paths (relative to the theme root) of theme preview images, used in both the customizer and in the in-app theme switcher.
  • preview_site_images defines paths to images for the demo site (eg. ora.format.com)
  • filter_attributes is a list of categories (vertical, slideshow, tiled, etc.) that the theme's design falls under. Used for the filtering mechanisms on both the marketing site and in the in-app theme switcher.
  • using_position (optional) overwrites the default position and color of the "Using Format" link. Leave this attribute out, unless the theme specifically needs it adjusted.

variables.yml

Defines all editable variables for a theme.

assets/

Holds arbitrary theme assets, such as stylesheets, javascript, or image assets. Commonly used assets include jQuery, blank pixels (for lazyloading), and a theme.js file for theme functionality.

Try to reduce the number of image assets used in a theme. Elements such as arrows for slideshows should be drawn using CSS wherever possible.

As well, these files are uploaded to S3 upon deployment, so niceties such as Liquid are not available to items in this folder.

templates/

Contains all theme templates.

Required:

  • gallery.html.liquid is for gallery pages
  • listing.html.liquid is for listing pages
  • basic.html.liquid is for title pages
  • simple.html.liquid is for content pages
  • stylesheet.css.liquid or stylesheet.scss.liquid is the theme stylesheet

Optional:

  • blog.html.liquid is for all blog pages (tags, search, index, single)
  • Any template with the extension .json.liquid provides a JSON response for URLs with .json appended, or when the Accepts header is set to JSON. Used in AJAX themes.

spruce's People

Contributors

maximsiebert avatar

Watchers

 avatar

spruce's Issues

Show Menu Title -> Show Current Page Title

I was initially confused with Show Menu Title as I was anticipating for it to show/hide the menu trigger. Maybe we can make this clearer in saying page title. Open to suggestions:

  • Show Menu Title -> Show Current Page Title

Galleries: Add Text Element Typography Variable

Currently:
big_text_typography changes both Header Text and Gallery Text Elements.

Revised:

  • Create a new typography variable with font-family,font-size,line-height, color(maybe)
  • Only effects Text elements in Galleries
  • Left aligned
  • Responsive behaviour: Retain user size on desktop/wide resolutions and use sensible font-size on mobile, e.g. 16px. Alternatively, we can scale down the user's font size using a multiplier

Revise label for `Collection Captions Text`

We should be more descriptive with this, rather than keeping it to text. I'm thinking label might work here, or maybe Page Link Label. 2 instances of it:

  • id: listing_caption_text
    label: Collection Captions Text
    
  • id: listing_caption_text_font
    label: Collection Captions Text
    

Store, Index: Up scaled product image

We have yet to roll out improvements to our Store layouts, and that includes retina store images. We should stick to the native resolution for now, 200x200.

screen shot 2018-02-23 at 4 12 59 pm

Galleries: Update hash style

  • http://garry-ing.format-staging.com/work#images-5 -> http://garry-ing.format-staging.com/work#5
  • We should stick to just having the number index

Site Image Logo: Tall logos are distorted

screen shot 2018-02-26 at 3 43 24 pm

  • Original: https://upload.wikimedia.org/wikipedia/commons/a/ab/Logo_TV_2015.png
  • You'll need to manual type image into the Logo Type variable in order to switch into the image logo

Collection page variable labels: Change occurrences of `caption` to `page link`

We have a rule to only reference "caption" in labels if they are directly related to Gallery item captions. For Collections, we should be refering to them as Page Link:

  • Collection Captions Text -> Page Link Text
  • Collection Captions Font -> Page Link Font
  • Collection Captions Font Size -> Page Link Font Size

There might be other instances of this.

Galleries, Captions: Update style for captions in slideshow

screen shot 2018-03-02 at 2 34 36 pm
We haven't taken a good look at how captions are being treated in the slideshow. A few thoughts:

  • Left align the block, like how it is presented in the gallery grid
  • Set a width/max-width so that we avoid really long line-lengths
  • Move the block further up so that it's not close to the bottom of the viewport

Code Clean-up

  • Indentation: 2 spaces
  • Remove extra spaces/indents
  • Remove any extra comments around functionality that we don't utilize
  • Remove any unused variables/logic
  • Remove extra CSS/SCSS declarations
  • Remove extra JS/Libs that are not in use

Vendor Prefixing Flexbox

We're anticipating issues with IE11 and older versions of iOS with regards to use of flexbox. We should prefix any instances of flexbox, and corresponding properties, where applicable.

Note we don't have an autoprefixer for themes.

Mobile: Unable to scroll long menus

Reproduce:

  • View site at a small resolution
  • Open menu
  • Open any menu group
  • Note that one can't scroll on the menu that extends beyond the bottom of the viewport.

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.