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

[DOC-299] Rebranding theme with latest Spectrum CSS and branding content #74

Merged
merged 57 commits into from
May 20, 2021
Merged
Show file tree
Hide file tree
Changes from 47 commits
Commits
Show all changes
57 commits
Select commit Hold shift + click to select a range
64da649
WIP: Tightening up some spacing with typography, list items, and the …
bdenham Mar 1, 2021
7d1fb47
WIP typography style scoping
bdenham Mar 1, 2021
fd1020a
Switched start page to the example overview page
bdenham Mar 1, 2021
75175d6
Callout tightening
bdenham Mar 1, 2021
0368b68
Updating header for alerts
bdenham Mar 1, 2021
7fb6068
Updated typography, various spacings, and monospace fonts to provide …
bdenham Mar 1, 2021
99c23c3
Added link to comment on monospace fonts for inline code
bdenham Mar 1, 2021
032590e
Reduced size of edition banner down to one line.
bdenham Mar 1, 2021
e7aa00d
Merge branch 'master' into cleanup
bdenham Mar 1, 2021
3ad6dbe
Moved experimental selector to a .topic-intro style
bdenham Mar 2, 2021
357e3ad
Rebuilt app.css - testing for leftover style on devdocs test build
bdenham Mar 2, 2021
510552d
Added class for whatsnew tables
bdenham Apr 1, 2021
c12d617
Adobe branding updates
bdenham May 7, 2021
2c827b5
Updated variables for rebranding
bdenham May 12, 2021
36315ba
Updated from master
bdenham May 13, 2021
9794274
WIP: Commit save point in %(HEAD) %(color:yellow)%(refname:short)%(co…
bdenham May 13, 2021
5fa810c
[DOC-299] Updated favicon and removed magento apple-touch-icons
bdenham May 13, 2021
17fa4ac
[DOC-299] Update Magento inline logos to Adobe logo
bdenham May 13, 2021
44cf5f4
[DOC-299]-Updated spectrum-css packages and typography references in …
bdenham May 13, 2021
1720bb4
[DOC-299]-Updating class names from updated Spectrum CSS packages
bdenham May 13, 2021
aec1104
More updates
bdenham May 13, 2021
8d19178
Updating spectrum css for app-switcher
bdenham May 13, 2021
81d98ae
Updating spectrum headings
bdenham May 13, 2021
043b319
Spectrum CSS updates
bdenham May 13, 2021
454246f
Version switcher styling
bdenham May 13, 2021
934070b
Version switcher styling
bdenham May 13, 2021
8ff292c
Fixed version picker after spectrum package changes
bdenham May 14, 2021
5a86342
Rolling back postcss to earlier version for test
bdenham May 14, 2021
e5109a5
ActionButton was removed from spectrum-button package to it's own pac…
bdenham May 14, 2021
0a753f5
Switched deprecated node-sass to sass
bdenham May 14, 2021
c4d4b7f
More spectrum cleanup
bdenham May 16, 2021
a63bc63
[DOC-299] WIP: Label additions that adhere to branding and spectrum g…
bdenham May 17, 2021
ad7bc09
WIP: Added icons for indicators to be applied after discussion
bdenham May 17, 2021
28959c3
Re-enabled caching for jekyll build and updated app switcher for devd…
bdenham May 17, 2021
4acc4be
Fixed app-switcher
bdenham May 17, 2021
89304a1
Fixed search boxes on quick-search and search page
bdenham May 18, 2021
3777b88
WIP-Nav and Search
bdenham May 18, 2021
181172c
Updated search to make icon visible again
bdenham May 18, 2021
eef6fde
Tweaking search box items alignment
bdenham May 18, 2021
9c6d39b
Fixed spacing issues on home/front page
bdenham May 18, 2021
d0192e5
Cleaned up text line-heights and spacing on home page
bdenham May 18, 2021
1594e9e
Fixed side-nav edition icon alignments
bdenham May 18, 2021
0e61394
Alignment tweaks that work for both sideNav and inline content
bdenham May 18, 2021
19836d3
-mAdded color icons for B2B and CE content
bdenham May 18, 2021
4db981b
Fixed icon names and associated styling
bdenham May 18, 2021
7d64e01
Fixed deleted styles
bdenham May 18, 2021
b53a33b
Updated icons, trying tags instead of labels for edition markers
bdenham May 18, 2021
fcecfd3
Replaced remaining instances of Business Intelligence with Commerce R…
bdenham May 19, 2021
296df2e
WIP-Fixing code block
bdenham May 19, 2021
2f011dc
Commit app.css
bdenham May 20, 2021
b79106d
Fix for terminal code block's weird bottom border margin
bdenham May 20, 2021
7f7e165
Fix for terminal code block's weird bottom border margin
bdenham May 20, 2021
bd1fc81
Ugly CSS fix for bug in code block generation
bdenham May 20, 2021
1120ff3
Made github link buttons quiet and added temp fix for merchdocs code …
bdenham May 20, 2021
474196d
Tweaks to styles and added Eugene's fix to copy.js
bdenham May 20, 2021
e03fa86
Updated GitHub links block and page updated block from review
bdenham May 20, 2021
10f76fd
Updated theme version to 15
bdenham May 20, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,10 @@ xsdvi.log
npm-debug.log
CNAME
_config.local.yml
app.css.map
print.css.map
search.css.map
.vscode/

# OS generated files #
######################
Expand Down
28 changes: 17 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,37 +1,43 @@
# DevDocs theme

A Jekyll theme for Magento documentation sites. Uses NPM to build SCSS and JS files. Includes basic layouts and html includes.
A Jekyll theme for Adobe Commerce documentation sites. Uses NPM to build SCSS and JS files. Includes basic layouts and html includes.

## How to apply the theme to your project

1. In your project `Gemfile`, add this:
```
1. In your project `Gemfile`, add this:

```bash
gem 'devdocs', git: 'https://github.com/magento-devdocs/devdocs-theme.git'
```
2. Then, in your Jekyll `_config.yml` file, add this:
```

1. Then, in your Jekyll `_config.yml` file, add this:

```bash
theme: devdocs
```
3. Do a `bundle install` to fetch the theme and install all dependencies.

1. Do a `bundle install` to fetch the theme and install all dependencies.

## Developing the theme

Do a `npm install` and then `bundle install`.
Then run `npm run watch:all`.


## Using theme locally

1. To work with the theme locally and test how it works with DevDocs or any project that uses the theme, you'll want to specify this theme as local gem:
```

```bash
bundle config local.devdocs /path/to/theme/git/repository
```
2. Now you can build your project locally, and it will look for the latest theme gem in your filesystem instead of GitHub. Just make sure that your project requires the same branch as your local theme branch:
```

1. Now you can build your project locally, and it will look for the latest theme gem in your filesystem instead of GitHub. Just make sure that your project requires the same branch as your local theme branch:

```bash
gem 'devdocs', git: 'https://github.com/magento-devdocs/devdocs-theme.git', :branch => "your_branch_name"
```
3. Do a `bundle install` in your project to get the latest theme from local filesystem.

1. Do a `bundle install` in your project to get the latest theme from local filesystem.

## How to contribute

Expand Down
10 changes: 5 additions & 5 deletions _config.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
title: Magento Documentation Theme
description: Templates, styles and scripts for all Magento Documentation portals.
title: Adobe Commerce Documentation Theme
description: Templates, styles and scripts for Adobe Commerce Documentation portals.
logo: Docs Theme
baseurl: ""
permalink: pretty
Expand Down Expand Up @@ -38,7 +38,7 @@ defaults:
feedback_link: true
github_files: https://github.com/magento-devdocs/devdocs-theme/blob/
github_repo: https://github.com/magento-devdocs/devdocs-theme/

-
scope:
path: "video"
Expand Down Expand Up @@ -72,11 +72,11 @@ exclude:
- .idea

app_switcher:
apps:
apps:
- label: Developer
children:

- label: Commerce Developer Documentation
- label: Commerce Developer Guide
url: https://devdocs.magento.com/

- label: PWA Studio
Expand Down
26 changes: 13 additions & 13 deletions _data/var.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@
# Enterprise Cloud Edition (ECE) ---> Commerce Cloud
# Enterprise Edition for B2B ---> Commerce for B2B

#NOTE: The new product name variables use the old product name abbreviations (e.g., ce, ee, ece, b2b).
#NOTE: The new product name variables use the old product name abbreviations (e.g., ce, ee, ece, b2b).

# Product Name variables

ce: Magento Open Source
ee: Magento Commerce
b2b: Magento Commerce for B2B
mbi: Magento Business Intelligence
ee: Adobe Commerce
b2b: B2B for Adobe Commerce
mbi: Reporting for Commerce

# Cloud product name variables

ece: Magento Commerce Cloud
csuite: Magento Commerce Cloud Suite
ece: Adobe Commerce
csuite: Adobe Commerce Suite
ct: ece-tools
mcp-prod: Magento Cloud Patches
mcp: magento-cloud-patches
mcd: magento-cloud-docker
mcd-prod: Magento Cloud Docker
mcc-prod: Magento Cloud Components
mcc: magento-cloud-components
mcp-prod: Cloud Patches for Adobe Commerce
mcp: adobe-commerce-patches
mcd: adobe-commerce-docker
mcd-prod: Docker for Adobe Commerce
mcc-prod: Cloud Components for Adobe Commerce
mcc: adobe-commerce-components

# TIP: Use the following syntax to use a variable in the documentation source: {{site.data.var.xx}} where xx
# is the variable value.

# Magento-developed extension (MDE) variables
# Adobe-developed extension (ADE) variables

im: Inventory Management
14 changes: 7 additions & 7 deletions _includes/grid.html
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
<div class="columns {% if include.large %}large-{{include.large}}{% endif %}">
{% for section in include.sections %}
<div class="column">
<a href="{{ site.baseurl }}{{ section.url }}" class="card">
<h3 class="no_toc">{{ section.title }}</h3>
<p>{{ section.content }}</p>
</a>
</div>
<div class="column">
<a href="{{ site.baseurl }}{{ section.url }}" class="card">
<h3 class="spectrum-Heading .spectrum-Heading--sizeL no_toc">{{ section.title }}</h3>
<p>{{ section.content }}</p>
</a>
</div>
{% endfor %}
</div>
</div>
2 changes: 1 addition & 1 deletion _includes/home/intro.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<section class="home-intro">
<div class="container">
<h1 class="spectrum-Heading1 spectrum-Heading--XXL">{{ site.title }}</h1>
<h1 class="spectrum-Heading spectrum-Heading--sizeXXL">{{ site.title }}</h1>
<p class="lead">{{ site.description }}</p>

{% include layout/search-form.html %}
Expand Down
28 changes: 16 additions & 12 deletions _includes/layout/app-switcher.html
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@

<div class="app-switcher">
<div class="dropdown">
<button id="app-switcher-trigger" class="app-switcher-trigger" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false" aria-label="Documentation sites"></button>
<div class="dropdown-menu spectrum-Popover spectrum-Dropdown-popover spectrum-Popover--bottom dropdown-menu-right" aria-labelledby="app-switcher-trigger" role="menu">
<button id="app-switcher-trigger" class="app-switcher-trigger" data-toggle="dropdown" aria-haspopup="true"
aria-expanded="false" aria-label="Documentation sites"></button>
<div class="dropdown-menu spectrum-Popover spectrum-Dropdown-popover spectrum-Popover--bottom dropdown-menu-right"
aria-labelledby="app-switcher-trigger" role="menu">
<div class="app-switcher-content">
{% for group in site.app_switcher.apps %}
<div class="app-switcher-group">
<span class="spectrum-Menu-sectionHeading" id="app-switcher-category-{{ forloop.index }}">{{ group.label }}</span>
<ul class="spectrum-Menu" role="group" aria-labelledby="app-switcher-category-{{ forloop.index }}">
{% for item in group.children %}
<li class="spectrum-Menu-item" role="menuitem"><a class="spectrum-Menu-itemLabel" href="{{ item.url }}?itm_source={{ site.algolia.index_name }}&itm_medium=top_nav&itm_campaign=app_switcher&itm_term={{ item.label }}">{{ item.label }}</a></li>
{% for group in site.app_switcher.apps %}
<div class="spectrum-Menu app-switcher-group">
<span class="spectrum-Menu-sectionHeading"
id="app-switcher-category-{{ forloop.index }}">{{ group.label }}</span>
<ul class="spectrum-Menu" role="group" aria-labelledby="app-switcher-category-{{ forloop.index }}">
{% for item in group.children %}
<li class="spectrum-Menu-item" role="menuitem"><a class="spectrum-Menu-itemLabel"
href="{{ item.url }}?itm_source={{ site.algolia.index_name }}&itm_medium=top_nav&itm_campaign=app_switcher&itm_term={{ item.label }}">{{ item.label }}</a>
</li>
{% endfor %}
</ul>
</div>
{% endfor %}
</ul>
</div>
{% endfor %}
</div>
</div>
</div>
Expand Down
66 changes: 47 additions & 19 deletions _includes/layout/edition-callout.html
Original file line number Diff line number Diff line change
@@ -1,32 +1,60 @@
{% if page.ee_only == true %}
<div class="bs-callout spectrum-Alert edition-callout ee-only">
<div class="break">
<span class="edition-Label ee-only">{{site.data.var.ee}} only.
<a class="spectrum-Link" href="https://docs.magento.com/user-guide/getting-started.html#product-editions">
Learn more.</a>
</span>
</div>
{% endif %}
{% if page.b2b_only == true %}
<div class="break">
<span class="edition-Label b2b-only">{{site.data.var.b2b}} only.
<a class="spectrum-Link" href="https://docs.magento.com/user-guide/getting-started.html#product-editions">
Learn more.</a>
</span>
</div>
{% endif %}
{% if page.ce_only == true %}
<div class="break">
<span class="edition-Label ce-only">{{site.data.var.ce}} only.
<a class="spectrum-Link" href="https://docs.magento.com/user-guide/getting-started.html#product-editions">
Learn more.</a>
</span>
</div>
{% endif %}

<!-- {% if page.ee_only == true %}
<div class="bs-callout spectrum-Alert-edition edition-callout ee-only">
<i class="edition-marker-icon-image spectrum-Icon spectrum-UIIcon-InfoMedium spectrum-Alert-icon"></i>
<h4 class="spectrum-Alert-header">{{site.data.var.ee}} only</h4>
<div class="spectrum-Alert-content">
The content on this page is for {{site.data.var.ee}} only.
<h4 class="spectrum-Alert-header-edition">{{site.data.var.ee}} only</h4>
<div class="spectrum-Alert-content-edition">
The content on this page is for {{site.data.var.ee}} only.
<a href="https://docs.magento.com/user-guide/getting-started.html#product-editions">Learn more</a>
</div>
</div>
{% endif %}

{% if page.b2b_only == true %}
<div class="bs-callout spectrum-Alert edition-callout b2b-only">
{% endif %} {% if page.b2b_only == true %}
<div class="bs-callout spectrum-Alert-edition edition-callout b2b-only">
<i class="edition-marker-icon-image spectrum-Icon spectrum-UIIcon-InfoMedium spectrum-Alert-icon"></i>
<h4 class="spectrum-Alert-header">{{site.data.var.b2b}} only</h4>
<div class="spectrum-Alert-content">
The content on this page is for {{site.data.var.b2b}} only.
<h4 class="spectrum-Alert-header-edition">{{site.data.var.b2b}} only</h4>
<div class="spectrum-Alert-content-edition">
The content on this page is for {{site.data.var.b2b}} only.
<a href="https://docs.magento.com/user-guide/getting-started.html#product-editions">Learn more</a>
</div>
</div>
{% endif %}

{% if page.ce_only == true %}
<div class="bs-callout spectrum-Alert edition-callout ce-only">
{% endif %} {% if page.ce_only == true %}
<div class="bs-callout spectrum-Alert-edition edition-callout ce-only">
<i class="edition-marker-icon-image spectrum-Icon spectrum-UIIcon-InfoMedium spectrum-Alert-icon"></i>
<h4 class="spectrum-Alert-header">{{site.data.var.ce}} only</h4>
<div class="spectrum-Alert-content">
The content on this page is for {{site.data.var.ce}} only.
<h4 class="spectrum-Alert-header-edition">{{site.data.var.ce}} only</h4>
<div class="spectrum-Alert-content-edition">
The content on this page is for {{site.data.var.ce}} only.
<a href="https://docs.magento.com/user-guide/getting-started.html#product-editions">Learn more</a>
</div>
</div>
{% endif %}
{% endif %}

<div class="spectrum-Tags" role="list" aria-label="Tags">
<div class="spectrum-Tags-item" role="listitem" tabindex="0">
<img class="spectrum-Avatar" src="img/example-ava.jpg" alt="Avatar">
<span class="spectrum-Tags-itemLabel">Shantanu</span>
</div>
</div> -->
33 changes: 16 additions & 17 deletions _includes/layout/github-links.html
Original file line number Diff line number Diff line change
@@ -1,18 +1,17 @@
<div class="github-links spectrum-ButtonGroup">
{%- if page.github_link == true -%}
<div class="github-link spectrum-ButtonGroup-item">
<a class="improve-page spectrum-ActionButton spectrum-ActionButton--quiet" href="{{ page.github_files }}{{ page.github_path }}" target="_blank">
<img class="spectrum-Icon spectrum-Icon--sizeS" src="{{ site.baseurl }}/assets/i/icons/edit.svg" alt="" />
<span class="spectrum-ActionButton-label">Edit on GitHub</span>
</a>
</div>
{%- endif -%}
{%- if page.feedback_link == true -%}
<div class="new-issue spectrum-ButtonGroup-item">
<a class="spectrum-ActionButton spectrum-ActionButton--quiet" href="{{ page.github_repo }}issues/new?title=Feedback on page: {{ page.url }}" target="_blank">
<img class="spectrum-Icon spectrum-Icon--sizeS" src="{{ site.baseurl }}/assets/i/icons/bug.svg" alt="" />
<span class="spectrum-ActionButton-label">Log an Issue</span>
</a>
</div>
{%- endif -%}
<div class="github-links spectrum-ActionGroup--compact ActionGroup--justified">
{%- if page.github_link == true -%}
<button class="spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionGroup-item"
onclick="window.location.href='{{ page.github_files }}{{ page.github_path }}';" target="_blank">
<img class="spectrum-Icon spectrum-Icon--sizeS" src="{{ site.baseurl }}/assets/i/icons/edit.svg" alt="" />
<span class="spectrum-ActionButton-label">Edit on GitHub</span>
</button>
{%- endif -%}
{%- if page.feedback_link == true -%}
<button class="spectrum-ActionButton spectrum-ActionButton--sizeM spectrum-ActionGroup-item"
onclick="window.location.href='{{ page.github_repo }}issues/new?title=Feedback on page: {{ page.url }}';"
target="_blank">
<img class="spectrum-Icon spectrum-Icon--sizeS" src="{{ site.baseurl }}/assets/i/icons/bug.svg" alt="" />
<span class="spectrum-ActionButton-label">Log an Issue</span>
</button>
{%- endif -%}
</div>
12 changes: 2 additions & 10 deletions _includes/layout/header.html
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,8 @@
{% include layout/header-styles.html %}
{% include layout/header-scripts.html %}

<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="https://magento.com/favicon.ico">
<link rel="apple-touch-icon" type="image/png" href="https://magento.com/apple-touch-icon.png">
<link rel="apple-touch-icon" type="image/png" sizes="57x57" href="https://magento.com/apple-touch-icon-57x57.png">
<link rel="apple-touch-icon" type="image/png" sizes="72x72" href="https://magento.com/apple-touch-icon-72x72.png">
<link rel="apple-touch-icon" type="image/png" sizes="76x76" href="https://magento.com/apple-touch-icon-76x76.png">
<link rel="apple-touch-icon" type="image/png" sizes="114x114" href="https://magento.com/apple-touch-icon-114x114.png">
<link rel="apple-touch-icon" type="image/png" sizes="120x120" href="https://magento.com/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" type="image/png" sizes="144x144" href="https://magento.com/apple-touch-icon-144x144.png">
<link rel="apple-touch-icon" type="image/png" sizes="152x152" href="https://magento.com/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" type="image/png" sizes="180x180" href="https://magento.com/apple-touch-icon-180x180.png">
<link rel="icon" href="https://www.adobe.com/favicon.ico" type="image/x-icon"/>
<link rel="shortcut icon" type="image/vnd.microsoft.icon" href="https://adobe.com/favicon.ico">

</head>
<body class="layout-{{ page.layout }}">
Expand Down
Loading