Skip to content

Instantly share code, notes, and snippets.

@ryancarlson
Last active March 13, 2018 18:04
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ryancarlson/c1c67e41a4309072bdf38bbadabec619 to your computer and use it in GitHub Desktop.
Save ryancarlson/c1c67e41a4309072bdf38bbadabec619 to your computer and use it in GitHub Desktop.
<manifest>
<title>
<content:text i18n-id="{{uuid}}">Duis filet mignon ground round officia.</content:text>
</title>
<categories>
<category id="{{category_id}}" banner_id="{{banner_id}}">
<title>
<content:text i18n-id="{{uuid}}">Duis filet mignon ground round officia.</content:text>
</title>
</category>
</categories>
<articles>
<article src="{{page_xml_uri}}">
<title>
<content:text>Article title</content:text>
</title>
<categories>
<category id={{id}} />
</categories>
</article>
</articles>
<resources>
<resource id="{{filename.jpg}}" src="{{sha256.jpg}}" />
</resources>
</manifest>
<article>
<!--
Article Header - REQUIRED
-->
<header>
<!-- Defaults to full width, height?-->
<cover-image src="{{sha256.jpg}}" />
<!--
Page title, displayed in page header - REQUIRED
text-color: DEFAULT( primary-color )
text-scale: DEFAULT( 1.8 )
-->
<title>
<content:text i18n-id="{{uuid}}">Spicy jalapeno bacon ipsum dolor amet porchetta.</content:text>
</title>
<!--
Page tagline, displayed in page header - OPTIONAL
text-color: DEFAULT( primary-color )
text-scale: DEFAULT( 1.0 )
-->
<tagline>
<content:text i18n-id="{{uuid}}">Duis filet mignon ground round officia.</content:text>
</tagline>
<!--
Author, displayed in page header - OPTIONAL
text-color: DEFAULT( primary-text-color )
text-scale: DEFAULT( 1.0 )
-->
<author>
<content:text i18n-id="{{uuid}}">Duis filet mignon ground round officia.</content:text>
</author>
</header>
<!--
HERO - Page content - OPTIONAL
content directly in the page, primarily used when no cards exist
-->
<hero>
<!-- Adds a bold style and padding/margin to simulate a section label
text-scale: DEFAULT( 1.0 )
text-color: DEFAULT( primary-text-color )
text-style: DEFAULT (bold)
-->
<label>
<content:text>Duis filet mignon ground round officia.</content:text>
</label>
<!--
Paragraph section - OPTIONAL - adds padding/margin around content
text-scale: DEFAULT( 1.0 )
text-color: DEFAULT( primary-text-color )
-->
<paragraph>
<content:text>Meatloaf beef ribs pork belly boudin ut andouille nostrud fugiat turkey exercitation dolore velit
pig pork. Cupidatat elit et, dolore nisi laboris incididunt prosciutto commodo fugiat sint eiusmod jowl.
Proident dolore ball tip tri-tip ut veniam.
</content:text>
<content:image src="{{sha256.jpg}}" align="[left,center,right,justify?]"/>
<!--
Button - OPTIONAL
color: DEFAULT( primary-color )
text-color: DEFAULT ( primary-text-color ) [ applied to content:text node ]
-->
<content:button type="url" value="https://give.cru.org">
<content:text i18n-id="{{uuid}}">Label</content:text>
</content:button>
</paragraph>
</hero>
</article>
@ryancarlson
Copy link
Author

ryancarlson commented Feb 13, 2018

The thing I'm least certain of is how to related categories and articles at the highest level. This version has them defined separately and related by a comma separated list of category_id's on each article.

Another way to do it would be to nest articles inside categories. I feel like this would be more cumbersome to maintain, but I could be wrong.

Either way should allow an article to be present in more than one category, if that's desired.

@frett
Copy link

frett commented Feb 28, 2018

I think referencing them by id would be best. maybe do nested elements instead of just doing a csv attribute.

<articles>
  <article src="{{page_xml_uri}}">
    <category id="{{id1}}" />
    <category id="{{id2}}" />
  </article>
</articles>

The one thing that gets tricky is that the <articles> node will probably be generated by the mobile-content-api, so we may actually want to move the category ids to the individual articles.

@ryancarlson
Copy link
Author

I'm following. There would still be listed

<categories> 
  <category>...</category>
</categories>

somewhere though, right?

@frett
Copy link

frett commented Feb 28, 2018

screen shot 2018-02-28 at 3 56 29 pm
Based on this screenshot, would "One guy gives you his very honest..." be the tagline or hero->label?

@frett
Copy link

frett commented Feb 28, 2018

yeah, the main list of categories could still live in the manifest.

@ryancarlson
Copy link
Author

@frett in that screenshot, the line you mentioned would be "tagline"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment