Connor Frederick Ladly-Fredeen
    • Create new note
    • Create a note from template
      • Sharing URL Link copied
      • /edit
      • View mode
        • Edit mode
        • View mode
        • Book mode
        • Slide mode
        Edit mode View mode Book mode Slide mode
      • Customize slides
      • Note Permission
      • Read
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Write
        • Only me
        • Signed-in users
        • Everyone
        Only me Signed-in users Everyone
      • Engagement control Commenting, Suggest edit, Emoji Reply
    • Invite by email
      Invitee

      This note has no invitees

    • Publish Note

      Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

      Your note will be visible on your profile and discoverable by anyone.
      Your note is now live.
      This note is visible on your profile and discoverable online.
      Everyone on the web can find and read all notes of this public team.
      See published notes
      Unpublish note
      Please check the box to agree to the Community Guidelines.
      View profile
    • Commenting
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
      • Everyone
    • Suggest edit
      Permission
      Disabled Forbidden Owners Signed-in users Everyone
    • Enable
    • Permission
      • Forbidden
      • Owners
      • Signed-in users
    • Emoji Reply
    • Enable
    • Versions and GitHub Sync
    • Note settings
    • Note Insights New
    • Engagement control
    • Make a copy
    • Transfer ownership
    • Delete this note
    • Save as template
    • Insert from template
    • Import from
      • Dropbox
      • Google Drive
      • Gist
      • Clipboard
    • Export to
      • Dropbox
      • Google Drive
      • Gist
    • Download
      • Markdown
      • HTML
      • Raw HTML
Menu Note settings Note Insights Versions and GitHub Sync Sharing URL Create Help
Create Create new note Create a note from template
Menu
Options
Engagement control Make a copy Transfer ownership Delete this note
Import from
Dropbox Google Drive Gist Clipboard
Export to
Dropbox Google Drive Gist
Download
Markdown HTML Raw HTML
Back
Sharing URL Link copied
/edit
View mode
  • Edit mode
  • View mode
  • Book mode
  • Slide mode
Edit mode View mode Book mode Slide mode
Customize slides
Note Permission
Read
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Write
Only me
  • Only me
  • Signed-in users
  • Everyone
Only me Signed-in users Everyone
Engagement control Commenting, Suggest edit, Emoji Reply
  • Invite by email
    Invitee

    This note has no invitees

  • Publish Note

    Share your work with the world Congratulations! 🎉 Your note is out in the world Publish Note

    Your note will be visible on your profile and discoverable by anyone.
    Your note is now live.
    This note is visible on your profile and discoverable online.
    Everyone on the web can find and read all notes of this public team.
    See published notes
    Unpublish note
    Please check the box to agree to the Community Guidelines.
    View profile
    Engagement control
    Commenting
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    • Everyone
    Suggest edit
    Permission
    Disabled Forbidden Owners Signed-in users Everyone
    Enable
    Permission
    • Forbidden
    • Owners
    • Signed-in users
    Emoji Reply
    Enable
    Import from Dropbox Google Drive Gist Clipboard
       Owned this note    Owned this note      
    Published Linked with GitHub
    • Any changes
      Be notified of any changes
    • Mention me
      Be notified of mention me
    • Unsubscribe
    ## Adeptmind Requirements: - Introduce new flags (see list below) based on Shopify admin product tags - Update the flag redesign (see HTML/CSS below) - Increase the size of the image to capitalize on the freed real estate - Only show 1 flag on a tile, even if the product has multiple tags. (see order below) - Move the grey line divider below the tile rather than in between image and brand/title when the products tiles are within a grid ## Flags Priority and Order Should a product have multiple flags, prioritize flag appearance as follow (1 flag only shows on tiles) 1. Sale (this one exists if the product has a cross price) 2. Best Seller 3. Eco-Friendly 4. New 5. Staff Pick 6. In The News 7. Innovation Products with the following tags in the Shopify admin, will display the above flags - Best_Seller - Eco_Friendly - New - Staff_Pick - In_The_News - Innovation ## Screenshots Include the grey line moved to the bottom of the tile. Sale (this one exists if the product has a cross price) Best Seller Eco-Friendly New Staff Pick In The News Innovation ## Product flag HTML Before ``` <div> <!-- "New Release" flag --> <span class="de-ProductFlag de-u-textMedium de-u-bgBlue de-u-textWhite"> <span class="de-u-hiddenVisually">Special product, </span>New Release </span> <!-- "Sale" flag --> <span class="de-ProductFlag de-u-textMedium de-u-bgRed de-u-textWhite"> <span class="de-u-hiddenVisually">Special product, </span>Sale </span> <!-- "Innovation" flag --> <span class="de-ProductFlag de-u-textMedium de-u-bgLime de-u-textBlack"> <span class="de-u-hiddenVisually">Special product, </span>Innovation </span> </div> ``` After Overall changes ``` <div>/<span> changed to <ul>/<li> ``` Container changes Added a `de-ProductTile-flagContainer` CSS class to the container to position the flags Also added the following utility classes to the container: - `de-u-listReset` - `de-u-spaceNone` - `de-u-textShrink1` - `de-u-md-textGrow` Flag changes New `de-ProductFlag--*` modifiers `de-u-textMedium changed` to `de-u-textSemibold` Added `de-u-textShrink1` Removed background and text color CSS utility classes Simplified visually hidden text (for more inclusive UX) ``` <ul class="de-ProductTile-flagContainer de-u-listReset de-u-spaceNone de-u-textShrink1 de-u-md-textGrow"> <!-- "Primary" flag style (previously "New Release" flag style) - white background, blue text, blue border --> <li class="de-ProductFlag de-ProductFlag--primary de-u-textSemibold de-u-textShrink1"> {{ text }}<span class="de-u-hiddenVisually"> product</span> </li> <!-- "Secondary" flag style (previously "Sale" flag style) - white background, red text, red border --> <li class="de-ProductFlag de-ProductFlag--secondary de-u-textSemibold de-u-textShrink1"> {{ text }}<span class="de-u-hiddenVisually"> product</span> </li> <!-- "Tertiary" flag style (previously "Innovation" flag style) - lime background, black text, lime border --> <li class="de-ProductFlag de-ProductFlag--tertiary de-u-textSemibold de-u-textShrink1"> {{ text }}<span class="de-u-hiddenVisually"> product</span> </li> </ul> ``` Product flag CSS In theory, you won't need to modify any CSS on your end if you reuse the HTML + CSS classes as shown above, but I've provided the "before" and "after" as references. Before, the text, border, and background colors were passed on a case-by-case basis via utility CSS classes. This was a fine approach, but now that we have multiple flags that share the same style, I adopted a BEM approach introducing de-ProductFlag--primary, de-ProductFlag--secondary, and de-ProductFlag--tertiary modifiers. I also removed the CSS positioning responsibility away from the Product Flag to allow de-ProductFlag CSS to only focus on its own visual styles. A benefit of this change is that we can now have multiple flags displayed at once next to each other instead of on top of each other (since they were all previously absolutely positioned). It is now the responsibility of the flag container to position the flags as needed. Before ``` .de-ProductFlag { line-height: 1.2; min-width: 102px; padding: .38125em .75375em; position: absolute; right: 0; text-align: center; text-transform: uppercase; top: 0; z-index: 1; } ``` After ``` /** * Base Product flag styles * White bg, black text/border */ .de-ProductFlag { background-color: #fff; border-width: 2px; border-style: solid; border-color: #2a2b2c; border-radius: .5em; display: inline-block; line-height: 1.2; margin: 0 0 0 .25em; padding: 0.2em 0.6em; text-align: center; text-transform: uppercase; z-index: 1; } ``` ``` /** * 1. Per design direction, allow flags to take up more space at wider viewports */ @media (min-width: $breakpoint-md) { .de-ProductFlag { padding: 0.38125em 0.75375em; /* 1 */ } } /** * Primary Product Flag modifier * White bg, blue text/border modifier */ .de-ProductFlag--primary { color: #0082c3; border-color: #0082c3; } /** * Secondary Product Flag modifier * White bg, red text/border modifier */ .de-ProductFlag--secondary { color: #e53322; border-color: #e53322; } /** * Tertiary Product Flag modifier * Lime bg/border, black text */ .de-ProductFlag--tertiary { color: #2a2b2c; background-color: #cbfb00; border-color: #cbfb00; } ``` Product flag container CSS The following is a new CSS rule to position the flags container properly within a Product Tile. The CSS class is applied to the container (the `<ul>`) of the flags as shown above. As before, this CSS is for reference only; you shouldn't need to add or modify any CSS if you reuse the HTML + CSS classes as shown in the "Product flag HTML" section above. New addition ``` .de-ProductTile-flagContainer { left: 0.15em; position: absolute; top: 0.4em; z-index: 1; } ``` Increase the size of the hero image Since the flags now overlay the hero image, we can allow the image to expand to the edges both vertically and horizontally. All padding was removed around the container that wraps the image and flags. The @media query was also removed as it applied padding at wider viewports. Before ``` .de-ProductTile-showcase { background-color: #fff; padding: 2.566rem .5625rem 0; text-align: center; position: relative; } @media (min-width: 40em) { .de-ProductTile-showcase { padding: 2.566rem 1.602rem 0; } } ``` After ``` .de-ProductTile-showcase { background-color: #fff; text-align: center; position: relative; } ``` Move grey divider line below product tile when rendered within a grid (HTML changes) When a product tile is rendered within a grid, the horizontal divider line should be at the bottom. When a product tile renders in a carousel, the horizontal divider line should be in the middle (same as before). A new product tile CSS modifier class, de-ProductTile--gridAlternate , was introduced to handle both use cases. By adding this CSS class, the product tile will render with the grey divider line at the bottom. Left: Before Right: After Product Tile Container HTML Before ``` <article class="de-ProductTile de-u-lineHeight3 de-u-bgWhite js-de-ProductTile"> ... </article> ``` After ``` <article class="de-ProductTile de-u-lineHeight3 de-u-bgWhite js-de-ProductTile de-ProductTile--gridAlternate"> ... </article> ``` Brand Logo HTML A new CSS class, de-ProductTile-brandLogo, was introduced onto the SVG logo. The de-u-SpaceTop04 utility CSS class was removed. Before ``` <svg class="de-u-spaceTop04 de-subBrandLogo"> ... </svg> ``` After ``` <svg class="de-ProductTile-brandLogo de-subBrandLogo"> ... </svg> ``` Swatch Objects HTML The de-u-padEnds* padding utility class was modified from de-u-padEnds06 to de-u-md-padEnds06. Before ``` <div class="de-SwatchObjects de-SwatchObjects--productTile de-u-padEnds06"> ... </div> ``` After ``` <div class="de-SwatchObjects de-SwatchObjects--productTile de-u-md-padEnds06"> ... </div> ``` Spacing below "Free Pickup" text was removed Before ``` <p class="de-u-textShrink1 de-u-textMedium">Free pickup</p> ``` After ``` <p class="de-u-textShrink1 de-u-textMedium de-u-spaceBottomNone">Free pickup</p> ``` Move grey divider line below product tile when rendered within a grid (CSS changes) Product Tile & modifier Before ``` .de-ProductTile { padding: 0 .5em; width: 100%; } @media (min-width: 40em) { .de-ProductTile { padding: 0.5625rem; } } ``` After ``` .de-ProductTile { margin: 0 0.5em; padding: 0.5em 0; width: 100%; } @media (min-width: $breakpoint-md) { .de-ProductTile { margin: 0 0.5625rem; padding: 0.5625rem 0; } } /** * Grid alternate modifier * These styles were modified for a when a product tile is * within a grid context. */ .de-ProductTile--gridAlternate { border-bottom: 1px solid #d5d9db; .de-ProductTile-header { border-top: none; } .de-ProductTile-brandLogo { margin-top: 0; } } @media (min-width: 40em) { .de-ProductTile--gridAlternate { margin-bottom: 1em; } } ``` Brand Logo SVG A CSS class was added so as not to target the SVG element directly. Margin was also added. Before ``` .de-ProductTile svg { height: 16px; width: auto; } @media (min-width: 40em) { .de-ProductTile svg { height: 18px; width: auto; } } ``` After ``` .de-ProductTile-brandLogo { margin-top: 0.624rem; height: 16px; width: auto; } @media (min-width: 40em) { .de-ProductTile-brandLogo { height: 18px; width: auto; } } ``` Product Tile footer The following was removed. ``` /** * 1. container height set to 70px to accommodate for 3 lines of text and not change * height of parent container */ .de-ProductTile-footer { height: 70px; /* 1 */ } ```

    Import from clipboard

    Paste your markdown or webpage here...

    Advanced permission required

    Your current role can only read. Ask the system administrator to acquire write and comment permission.

    This team is disabled

    Sorry, this team is disabled. You can't edit this note.

    This note is locked

    Sorry, only owner can edit this note.

    Reach the limit

    Sorry, you've reached the max length this note can be.
    Please reduce the content or divide it to more notes, thank you!

    Import from Gist

    Import from Snippet

    or

    Export to Snippet

    Are you sure?

    Do you really want to delete this note?
    All users will lose their connection.

    Create a note from template

    Create a note from template

    Oops...
    This template has been removed or transferred.
    Upgrade
    All
    • All
    • Team
    No template.

    Create a template

    Upgrade

    Delete template

    Do you really want to delete this template?
    Turn this template into a regular note and keep its content, versions, and comments.

    This page need refresh

    You have an incompatible client version.
    Refresh to update.
    New version available!
    See releases notes here
    Refresh to enjoy new features.
    Your user state has changed.
    Refresh to load new user state.

    Sign in

    Forgot password

    or

    By clicking below, you agree to our terms of service.

    Sign in via Facebook Sign in via Twitter Sign in via GitHub Sign in via Dropbox Sign in with Wallet
    Wallet ( )
    Connect another wallet

    New to HackMD? Sign up

    Help

    • English
    • 中文
    • Français
    • Deutsch
    • 日本語
    • Español
    • Català
    • Ελληνικά
    • Português
    • italiano
    • Türkçe
    • Русский
    • Nederlands
    • hrvatski jezik
    • język polski
    • Українська
    • हिन्दी
    • svenska
    • Esperanto
    • dansk

    Documents

    Help & Tutorial

    How to use Book mode

    Slide Example

    API Docs

    Edit in VSCode

    Install browser extension

    Contacts

    Feedback

    Discord

    Send us email

    Resources

    Releases

    Pricing

    Blog

    Policy

    Terms

    Privacy

    Cheatsheet

    Syntax Example Reference
    # Header Header 基本排版
    - Unordered List
    • Unordered List
    1. Ordered List
    1. Ordered List
    - [ ] Todo List
    • Todo List
    > Blockquote
    Blockquote
    **Bold font** Bold font
    *Italics font* Italics font
    ~~Strikethrough~~ Strikethrough
    19^th^ 19th
    H~2~O H2O
    ++Inserted text++ Inserted text
    ==Marked text== Marked text
    [link text](https:// "title") Link
    ![image alt](https:// "title") Image
    `Code` Code 在筆記中貼入程式碼
    ```javascript
    var i = 0;
    ```
    var i = 0;
    :smile: :smile: Emoji list
    {%youtube youtube_id %} Externals
    $L^aT_eX$ LaTeX
    :::info
    This is a alert area.
    :::

    This is a alert area.

    Versions and GitHub Sync
    Get Full History Access

    • Edit version name
    • Delete

    revision author avatar     named on  

    More Less

    Note content is identical to the latest version.
    Compare
      Choose a version
      No search result
      Version not found
    Sign in to link this note to GitHub
    Learn more
    This note is not linked with GitHub
     

    Feedback

    Submission failed, please try again

    Thanks for your support.

    On a scale of 0-10, how likely is it that you would recommend HackMD to your friends, family or business associates?

    Please give us some advice and help us improve HackMD.

     

    Thanks for your feedback

    Remove version name

    Do you want to remove this version name and description?

    Transfer ownership

    Transfer to
      Warning: is a public team. If you transfer note to this team, everyone on the web can find and read this note.

        Link with GitHub

        Please authorize HackMD on GitHub
        • Please sign in to GitHub and install the HackMD app on your GitHub repo.
        • HackMD links with GitHub through a GitHub App. You can choose which repo to install our App.
        Learn more  Sign in to GitHub

        Push the note to GitHub Push to GitHub Pull a file from GitHub

          Authorize again
         

        Choose which file to push to

        Select repo
        Refresh Authorize more repos
        Select branch
        Select file
        Select branch
        Choose version(s) to push
        • Save a new version and push
        • Choose from existing versions
        Include title and tags
        Available push count

        Pull from GitHub

         
        File from GitHub
        File from HackMD

        GitHub Link Settings

        File linked

        Linked by
        File path
        Last synced branch
        Available push count

        Danger Zone

        Unlink
        You will no longer receive notification when GitHub file changes after unlink.

        Syncing

        Push failed

        Push successfully