From ace14d0fb7ef97fd7c75b92f1cbb0be4b873ab34 Mon Sep 17 00:00:00 2001 From: Andrew Duthie Date: Thu, 7 Mar 2024 08:31:50 -0500 Subject: [PATCH] Use static embed markup for mobile preview --- _config.yml | 3 + docs/_components/header.md | 19 +-- docs/_embeds/header/mobile.md | 116 +++++++++++++++++++ docs/_includes/helpers/mobile-embed.html | 22 +--- docs/_plugins/generate_nav_for_components.rb | 8 +- docs/mobile-embed-frame.md | 38 ------ 6 files changed, 126 insertions(+), 80 deletions(-) create mode 100644 docs/_embeds/header/mobile.md delete mode 100644 docs/mobile-embed-frame.md diff --git a/_config.yml b/_config.yml index ade8f6f2..13b2fc16 100644 --- a/_config.yml +++ b/_config.yml @@ -11,6 +11,9 @@ collections: components: output: true permalink: /:name/ + embeds: + output: true + permalink: /:collection/:path/ defaults: - scope: diff --git a/docs/_components/header.md b/docs/_components/header.md index f1d04190..42c94a56 100644 --- a/docs/_components/header.md +++ b/docs/_components/header.md @@ -8,7 +8,7 @@ lead: > ## Default -{% capture default_markup %} +{% capture example %}
@@ -106,21 +106,8 @@ lead: >
{% endcapture %} -{% include helpers/code-example.html code=default_markup %} +{% include helpers/code-example.html code=example %} ## Mobile -{% capture mobile_markup %} - - -{% endcapture %} -{% assign mobile_markup = mobile_markup | prepend: default_markup %} -{% include helpers/mobile-embed.html markup=mobile_markup %} +{% include helpers/mobile-embed.html embed="header/mobile" %} diff --git a/docs/_embeds/header/mobile.md b/docs/_embeds/header/mobile.md new file mode 100644 index 00000000..0035053b --- /dev/null +++ b/docs/_embeds/header/mobile.md @@ -0,0 +1,116 @@ +--- +title: Mobile Embed +layout: base +--- + +
+
+
+
+ + + +
+ + +
+
+ + + diff --git a/docs/_includes/helpers/mobile-embed.html b/docs/_includes/helpers/mobile-embed.html index acfa8bd0..2307f288 100644 --- a/docs/_includes/helpers/mobile-embed.html +++ b/docs/_includes/helpers/mobile-embed.html @@ -1,32 +1,12 @@
- -