<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Htmlcenter Blog</title>
	<atom:link href="https://www.htmlcenter.com/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.htmlcenter.com/</link>
	<description>Web app development tutorials and tools</description>
	<lastBuildDate>Wed, 18 Dec 2024 22:28:19 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	
	<item>
		<title>Static website hosting with Cloudflare pages</title>
		<link>https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/</link>
					<comments>https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/#respond</comments>
		
		<dc:creator><![CDATA[Saulius]]></dc:creator>
		<pubDate>Fri, 29 Nov 2024 16:20:37 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Tutorials]]></category>
		<guid isPermaLink="false">https://www.htmlcenter.com/?p=4572</guid>

					<description><![CDATA[<p>In this post, we walk you through the steps of hosting a static website project on Cloudflare Pages. Why Cloudflare Pages? Multiple options exist for static website hosting. This time we will explore the Cloudflare pages option. Cloudflare pages have free and paid tiers. At the time of writing this post, their free tier provides: [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/">Static website hosting with Cloudflare pages</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/" rel="bookmark" title="Build static website with 11ty. Part 2">Build static website with 11ty. Part 2</a></li>
<li><a href="https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/" rel="bookmark" title="How to build static website with 11ty">How to build static website with 11ty</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/" rel="bookmark" title="Static HTML sites with Markdown and Metalsmith">Static HTML sites with Markdown and Metalsmith</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><em>In this post, we walk you through the steps of hosting <a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/">a static website project</a> on Cloudflare Pages.</em></p>
<h3>Why Cloudflare Pages?</h3>
<p>Multiple options exist for static website hosting. This time we will explore the Cloudflare pages option.</p>
<p>Cloudflare pages have free and paid tiers.</p>
<p>At the time of writing this post, their free tier provides:</p>
<ul>
<li>Unlimited sites</li>
<li>Unlimited visitor bandwidth</li>
<li>100 custom domains per project</li>
</ul>
<p>This is more than enough even for a website with a large number of users.</p>
<p>In addition, Cloudflare has one of the most robust cloud platforms globally and they are well known for the web and edge security solutions.</p>
<p>Good reason to explore the process of hosting web pages on their platform.</p>
<h3>Prepare your project</h3>
<p>What will you need to follow this tutorial and to deploy a static website to Cloudflare pages?</p>
<ul>
<li>Cloudflare account &#8211; if you don&#8217;t have it, create one with a free plan.</li>
<li>GitHub account</li>
<li>Static website. You can use the one we have created in the <a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/">earlier tutorials</a>)</li>
</ul>
<h3>Connect GitHub to Cloudflare</h3>
<p>Cloudflare provides good <a href="https://developers.cloudflare.com/pages/get-started/git-integration/" target="_blank" rel="noopener">documentation</a> that covers website hosting setup.</p>
<p>Log in to your Cloudflare account, and find the <code>Workers &amp; Pages</code> section on the left menu.</p>
<p>Once you are in this area, select <code>Create</code> an application option.</p>
<p><img fetchpriority="high" decoding="async" class="aligncenter size-full wp-image-4584" src="https://www.htmlcenter.com/wp-content/uploads/2024/11/create-new-webpage-cloudflaire.png" alt="create a new page Cloudflare" width="1400" height="642" srcset="https://www.htmlcenter.com/wp-content/uploads/2024/11/create-new-webpage-cloudflaire.png 1400w, https://www.htmlcenter.com/wp-content/uploads/2024/11/create-new-webpage-cloudflaire-300x138.png 300w, https://www.htmlcenter.com/wp-content/uploads/2024/11/create-new-webpage-cloudflaire-1024x470.png 1024w, https://www.htmlcenter.com/wp-content/uploads/2024/11/create-new-webpage-cloudflaire-768x352.png 768w" sizes="(max-width: 1400px) 100vw, 1400px" /></p>
<p>We could deploy static webpages with CLI but, connecting the GitHub repository will allow us to automate future deployments in a version-controlled way.</p>
<p>The process of connecting the GitHub repository is straightforward and follows the standard OAuth flow.</p>
<p>You will be redirected to GitHub auth to confirm the authorization and select what access you provide to Cloudflare.</p>
<p>Select the single specific repository you use for your project code. We don&#8217;t want to give Cloudflare more access than is needed.</p>
<p><img decoding="async" class="aligncenter wp-image-4586" src="https://www.htmlcenter.com/wp-content/uploads/2024/11/connect-cloudflare-to-github.png" alt="connect cloudflare to github" width="489" height="569" srcset="https://www.htmlcenter.com/wp-content/uploads/2024/11/connect-cloudflare-to-github.png 1276w, https://www.htmlcenter.com/wp-content/uploads/2024/11/connect-cloudflare-to-github-258x300.png 258w, https://www.htmlcenter.com/wp-content/uploads/2024/11/connect-cloudflare-to-github-880x1024.png 880w, https://www.htmlcenter.com/wp-content/uploads/2024/11/connect-cloudflare-to-github-768x893.png 768w" sizes="(max-width: 489px) 100vw, 489px" /></p>
<p>Next, you will be asked to provide specific details about the static website project.</p>
<p>Including the <code>build command</code> and the <code>build output directory</code>.</p>
<p>This is required as before deployment Cloudflare will run the build and will use the static website assets from the output directory.</p>
<p>Enter the commands you use, or use the following if you trying out our <a href="https://github.com/popularowl/11ty-static-web" target="_blank" rel="noopener">sample website</a>.</p>
<p><img decoding="async" class="aligncenter wp-image-4590" src="https://www.htmlcenter.com/wp-content/uploads/2024/11/configure-build.png" alt="configure Cloudflare build" width="600" height="400" srcset="https://www.htmlcenter.com/wp-content/uploads/2024/11/configure-build.png 2014w, https://www.htmlcenter.com/wp-content/uploads/2024/11/configure-build-300x200.png 300w, https://www.htmlcenter.com/wp-content/uploads/2024/11/configure-build-1024x682.png 1024w, https://www.htmlcenter.com/wp-content/uploads/2024/11/configure-build-768x512.png 768w, https://www.htmlcenter.com/wp-content/uploads/2024/11/configure-build-1536x1023.png 1536w" sizes="(max-width: 600px) 100vw, 600px" /></p>
<p>You can optionally provide environment variables if your website uses them.</p>
<p>Once settings are saved, Cloudflare will run the build and will enable your static website hosting.</p>
<p>It will also generate the public URL.</p>
<p>The option to add a custom domain name is also there.</p>
<h3>Make changes</h3>
<p>As GitHub is now connected to your deployments, every time you commit new changes to the main branch, Cloudflare will perform a new code upload for your website.</p>
<p>It&#8217;s all automated.</p>
<p>You can always check the status of your static site and which code commit is deployed by going to the <code>Workers &amp; Pages</code> section and selecting the project.</p>
<p>Here is the information you will see.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-4595" src="https://www.htmlcenter.com/wp-content/uploads/2024/11/static-website-hosting-status.png" alt="static website hosting status Cloudflare" width="589" height="221" srcset="https://www.htmlcenter.com/wp-content/uploads/2024/11/static-website-hosting-status.png 1868w, https://www.htmlcenter.com/wp-content/uploads/2024/11/static-website-hosting-status-300x112.png 300w, https://www.htmlcenter.com/wp-content/uploads/2024/11/static-website-hosting-status-1024x384.png 1024w, https://www.htmlcenter.com/wp-content/uploads/2024/11/static-website-hosting-status-768x288.png 768w, https://www.htmlcenter.com/wp-content/uploads/2024/11/static-website-hosting-status-1536x576.png 1536w" sizes="auto, (max-width: 589px) 100vw, 589px" /></p>
<p>Notice the deployed commit hash, timestamp, and the actual URL for the website. In my case, it&#8217;s <a href="https://11ty-static-web.pages.dev/" target="_blank" rel="noopener">11ty-static-web.pages.dev</a></p>
<h3>Summary</h3>
<p>In this tutorial, we have deployed a simple static website to Cloudflare pages hosting.</p>
<p>It didn&#8217;t take long and was intuitive.</p>
<p>You can create an unlimited number of such sites, and up to 100 custom domains pointed to your projects.</p>
<p>The comments section is open under this post in case you want to discuss your experience with Cloudflare.</p>
<div class="blog-post-newsletter-form text-center center-block">
<p style="margin: 25px 15px 0px 15px;">Enjoyed this post?</p>
<p style="margin: 25px 15px 0px 15px;">We are writing an e-book that explains how to quickly deploy static websites on various hosting platforms.</p>
<p style="margin: 25px 15px 10px 15px;">Subscribe and get a 50% discount when it launches!</p>
<form action="https://app.kit.com/forms/7391904/subscriptions" class="seva-form formkit-form validate" method="post" data-sv-form="7391904" data-uid="c1bb531be2" data-format="inline" data-version="5" target="_blank">
	<input type="email" name="email_address" class="form-control newsletter-email" placeholder="Email Address" required="" type="text" /><br />
	<button type="submit" data-element="submit" class="btn btn-htmlcenter">Subscribe</button><br />
</form>
</div>
<p>The post <a href="https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/">Static website hosting with Cloudflare pages</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/" rel="bookmark" title="Build static website with 11ty. Part 2">Build static website with 11ty. Part 2</a></li>
<li><a href="https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/" rel="bookmark" title="How to build static website with 11ty">How to build static website with 11ty</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/" rel="bookmark" title="Static HTML sites with Markdown and Metalsmith">Static HTML sites with Markdown and Metalsmith</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Build static website with 11ty. Part 2</title>
		<link>https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/</link>
					<comments>https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/#respond</comments>
		
		<dc:creator><![CDATA[ProDeveloper]]></dc:creator>
		<pubDate>Thu, 21 Nov 2024 17:25:49 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Tutorials]]></category>
		<guid isPermaLink="false">https://www.htmlcenter.com/?p=4479</guid>

					<description><![CDATA[<p>We continue the tutorial about building static websites with an 11ty site generator. In the previous part, we created a static website structure, configuration, pages, and links. This tutorial part is about adding CSS styles, dynamically generated pages, and dynamically generated sitemap.  CSS Styles Let&#8217;s remember what was the structure of the website code at [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/">Build static website with 11ty. Part 2</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/" rel="bookmark" title="How to build static website with 11ty">How to build static website with 11ty</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/" rel="bookmark" title="Static website hosting with Cloudflare pages">Static website hosting with Cloudflare pages</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/" rel="bookmark" title="Static HTML sites with Markdown and Metalsmith">Static HTML sites with Markdown and Metalsmith</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><em>We continue the tutorial about building static websites with an 11ty site generator.</em></p>
<p><em>In the <a href="https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/">previous part</a>, we created a static website structure, configuration, pages, and links. This tutorial part is about adding CSS styles, dynamically generated pages, and dynamically generated sitemap. </em></p>
<h3>CSS Styles</h3>
<p>Let&#8217;s remember what was the structure of the website code at the end of the previous tutorial part.</p>
<pre>/
└── 11ty-static-website
    ├── content
    │   ├── _includes
    │   │   └── base.njk
    │   ├── about.md
    │   ├── index.md
    │   └── blog
    │       ├── blog-post-a.md
    │       ├── blog-post-b.md
    │       └── blog-post-c.md
    ├── .eleventy.js
    └── package.json
</pre>
<p>To add styles we will create a new directory under the <code>content</code> directory called <code>css</code>. It will hold our stylesheet files.</p>
<p>In this directory create a file called <code>bundle.njk</code>. Notice the extension of this file. It&#8217;s not an actual stylesheet itself, but rather the template.</p>
<p>Through this template, we will instruct the 11ty generator to combine a few CSS files into one single stylesheet file. It&#8217;s a good mechanism which allows us to split CSS stylesheets into meaningful pieces and produce only one style file during static website generation.</p>
<pre><code>
---
permalink: /css/bundle.css
eleventyExcludeFromCollections: true
excludeFromSitemap: true
---
{% include "content/css/reset.css" %}
{% include "content/css/variables.css" %}
{% include "content/css/styles.css" %}
{% include "content/css/syntax.css" %}
</code></pre>
<p>A few things are happening in this template.</p>
<p><code>permalink</code> specifies the final location of the output CSS file after it is generated. All <code>include</code> statements import separate CSS files from the <code>css</code> directory.</p>
<p>You can find and copy all CSS files mentioned in the above snipped from <a href="https://github.com/popularowl/11ty-static-web/tree/main/content/css" target="_blank" rel="noopener">the example code repository on GitHub</a>.</p>
<p>Next, for the 11ty generator to copy the final CSS file over to the destination we will have to insert the <a href="https://www.11ty.dev/docs/copy/" target="_blank" rel="noopener">addPassthroughCopy</a> configuration to the <code>.eleventy.js</code> (see the directory structure).</p>
<pre><code>

// 11ty setup
module.exports = function(eleventyConfig) {

    // passthrough paths
    eleventyConfig.addPassthroughCopy("content/css/bundle.css");  
  
    // minify html output
    eleventyConfig.addTransform("htmlmin", function(content, outputPath) {
        if( this.outputPath.endsWith(".html") ) {
            const minified = minify(content, {
                useShortDoctype: true,
                removeComments: true,
                minifyJS: true,
                collapseWhitespace: true
            });

            return minified;
        }
        return content;
    });

    // custom shortcodes
    eleventyConfig.addShortcode('version', () =&gt; `${+ new Date()}`);
    eleventyConfig.addShortcode('year', () =&gt; `${new Date().getFullYear()}`);
    eleventyConfig.addShortcode('build', () =&gt; `${new Date().toISOString().split('T')[0]}`);

    return {
        dir: {
            input: 'content',
            includes: '_includes',
            output: 'dist'
        },
        markdownTemplateEngine: 'njk',
        htmlTemplateEngine: 'njk',
        dataTemplateEngine: 'njk'
    };
};


</code></pre>
<p>In addition to addPassthroughCopy, you will notice I added a couple of new functions to the file.</p>
<p><a href="https://www.11ty.dev/docs/transforms/" target="_blank" rel="noopener">eleventyConfig.addTransform</a> allows us to transform the HTML during generation. In our case, we want to minify it (reduce the size of HTML pages).</p>
<p><a href="https://www.11ty.dev/docs/shortcodes/" target="_blank" rel="noopener">eleventyConfig.addShortcode</a> adds the short codes, we can use within the template pages across 11ty projects.</p>
<p>Once you copy all CSS files from the reference project, your website should now have lean styling and look something like this</p>
<p><a href="https://www.htmlcenter.com/wp-content/uploads/2024/11/11ty-static-website.png"><img loading="lazy" decoding="async" class="alignnone wp-image-4460" src="https://www.htmlcenter.com/wp-content/uploads/2024/11/11ty-static-website-856x1024.png" alt="11ty static website minimal lean" width="471" height="563" srcset="https://www.htmlcenter.com/wp-content/uploads/2024/11/11ty-static-website-856x1024.png 856w, https://www.htmlcenter.com/wp-content/uploads/2024/11/11ty-static-website-251x300.png 251w, https://www.htmlcenter.com/wp-content/uploads/2024/11/11ty-static-website-768x919.png 768w, https://www.htmlcenter.com/wp-content/uploads/2024/11/11ty-static-website-1284x1536.png 1284w, https://www.htmlcenter.com/wp-content/uploads/2024/11/11ty-static-website.png 1464w" sizes="auto, (max-width: 471px) 100vw, 471px" /></a></p>
<h3>Sitemap</h3>
<p>Next, we will add a sitemap.</p>
<p>Add the file called <code>sitemap.njk</code> to the content directory. This file is a template, which has logic for how the actual sitemap XML file is generated. Here are file contents.</p>
<pre><code>
---
permalink: /sitemap.xml
excludeFromSitemap: true
---
<!--?xml version="1.0" encoding="UTF-8"?-->

  {%- for item in collections.all %}
    {%- if item.data.excludeFromSitemap !== true %}
      
        https://localhost:8080{{ item.url }}
        {{ item.data.lastmod or item.date | formatDate('yyyy-MM-dd')  }}
        {%- if item.data.changefreq %}
          {{ item.data.changefreq }}
        {%- endif %}
        {%- if item.data.priority %}
          {{ item.data.priority }}
        {%- endif %}
      
    {%- endif %}
  {%- endfor %}

</code></pre>
<p>We are using the <a href="https://mozilla.github.io/nunjucks/templating.html" target="_blank" rel="noopener">Nunjucks</a> templating language to iterate through the static website pages collections array provided by 11ty.</p>
<p>And if posts do not have the <code>excludeFromSitemap</code> variable set  <code>true</code> we include them in to sitemap XML file. Relatively simple setup.</p>
<h3>Add RSS feed</h3>
<p><a href="https://en.wikipedia.org/wiki/RSS" target="_blank" rel="noopener">RSS feed</a> is a way to provide an updated feed for your website to the people who want to subscribe and receive notifications about new content.</p>
<p>11ty provides a simple plugin that lets us dynamically generate such feed during build time.</p>
<p>First, you have to install the plugin and save it to your package.json while running this</p>
<pre><code>npm install @11ty/eleventy-plugin-rss --save</code></pre>
<p>Then upgrade <code>eleventy.js</code> with plugin configuration</p>
<pre><code>
// 11ty setup
module.exports = function(eleventyConfig) {

.....

    eleventyConfig.addPlugin(feedPlugin, {
		type: "atom", // or "rss", "json"
		outputPath: "/feed.xml",
		collection: {
			name: "blog", 
			limit: 10,    
		},
		metadata: {
			language: "en",
			title: "11ty static website",
			subtitle: "Minimal static 11ty website",
			base: "https://localhost:8080/",
			author: {
				name: "Popularowl",
				email: "", // Optional
			}
		}
	});
 .....

};
</code></pre>
<p>Your RSS feed should now be present as <code>feed.xml</code></p>
<h3>Summary</h3>
<p>This 2 part tutorial covers the basics of using an 11ty static website generator to build blog-type websites. You can always visit the <a href="https://www.11ty.dev/docs/" target="_blank" rel="noopener">official 11ty documentation</a> to get more detailed insights.</p>
<p>Full source code for the static website we created (together with some improvements) is present in the open <a href="https://github.com/popularowl/11ty-static-web" target="_blank" rel="noopener">GitHub repository</a>. Give it a star if you find it useful.</p>
<p>Leave any questions/feedback in the comments section below.</p>
<div class="blog-post-newsletter-form text-center center-block">
<p style="margin: 25px 15px 0px 15px;">Enjoyed this post?</p>
<p style="margin: 25px 15px 0px 15px;">We are writing an e-book that explains how to quickly deploy static websites on various hosting platforms.</p>
<p style="margin: 25px 15px 10px 15px;">Subscribe and get a 50% discount when it launches!</p>
<form action="https://app.kit.com/forms/7391904/subscriptions" class="seva-form formkit-form validate" method="post" data-sv-form="7391904" data-uid="c1bb531be2" data-format="inline" data-version="5" target="_blank">
	<input type="email" name="email_address" class="form-control newsletter-email" placeholder="Email Address" required="" type="text" /><br />
	<button type="submit" data-element="submit" class="btn btn-htmlcenter">Subscribe</button><br />
</form>
</div>
<p>The post <a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/">Build static website with 11ty. Part 2</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/" rel="bookmark" title="How to build static website with 11ty">How to build static website with 11ty</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/" rel="bookmark" title="Static website hosting with Cloudflare pages">Static website hosting with Cloudflare pages</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/" rel="bookmark" title="Static HTML sites with Markdown and Metalsmith">Static HTML sites with Markdown and Metalsmith</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to build static website with 11ty</title>
		<link>https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/</link>
					<comments>https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/#comments</comments>
		
		<dc:creator><![CDATA[ProDeveloper]]></dc:creator>
		<pubDate>Sat, 16 Nov 2024 23:02:08 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[web tutorials]]></category>
		<guid isPermaLink="false">https://www.htmlcenter.com/?p=4421</guid>

					<description><![CDATA[<p>Static websites are gaining popularity among web developers these days. They have several advantages. Consists of HTML files, which means they can be quickly deployed to web servers. Static websites are very scalable &#8211; have a small web server usage footprint, and do not require databases. Summary In this tutorial, we will build a static [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/">How to build static website with 11ty</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/" rel="bookmark" title="Build static website with 11ty. Part 2">Build static website with 11ty. Part 2</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/" rel="bookmark" title="Static website hosting with Cloudflare pages">Static website hosting with Cloudflare pages</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/" rel="bookmark" title="Static HTML sites with Markdown and Metalsmith">Static HTML sites with Markdown and Metalsmith</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><em><a href="https://en.wikipedia.org/wiki/Static_web_page" target="_blank" rel="noopener">Static websites</a> are gaining popularity among web developers these days.</em></p>
<p><em>They have several advantages. <a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/">Consists of HTML files</a>, which means they can be quickly deployed to web servers. Static websites are very scalable &#8211; have a small web server usage footprint, and do not require databases.</em></p>
<h3>Summary</h3>
<p>In this tutorial, we will build a static website using Markdown syntax for content and an <a href="https://www.11ty.dev/" target="_blank" rel="noopener">Eleventy (11ty)</a> static site generator to generate static HTML files.</p>
<p><em>Prerequisites</em>: you will need <a href="https://nodejs.org/en" target="_blank" rel="noopener">Nodejs</a> runtime installed on your dev machine to follow the steps in this tutorial. At the bottom of this page, we share the link to the full project source code on GitHub.</p>
<p>A static website will have 5 pages, a lean CSS design, tags, a dynamic sitemap and a dynamic RSS feed.</p>
<h3>Initialize the project</h3>
<p>Create a dedicated working directory go to it and run the below npm commands.</p>
<pre><code>
npm init -y
npm install @11ty/eleventy --save
npx @11ty/eleventy

output: [11ty] Wrote 0 files in 0.03 seconds (v3.0.0)
</code></pre>
<p>The first command creates a file <code>package.json</code> that serves as a descriptor/metadata file for our project.</p>
<p>The next line installs the 11ty npm package. The third command runs the Eleventy static site generator in the directory, to test.</p>
<p>You see that 11ty generated exactly 0 HTML files.</p>
<p>This is because we have no Markdown files or any other files available in a directory yet. Let&#8217;s create a page called <code>about.md</code> and add the following <a href="https://en.wikipedia.org/wiki/Markdown" target="_blank" rel="noopener">Markdown</a> syntax code</p>
<pre><code>
# About

This is a lean static web site, powered by [11ty static site generator](https://www.11ty.dev/).

It's created as an example source code for tutorial.

## Useful links

- [Blog posts](/blog/)
- [About](/about/)

</code></pre>
<p>Now you can run 11ty again, and this Markdown file will be converted to an HTML file. By default, an HTML file will be created in <code>_site</code> directory.</p>
<pre><code>
npx @11ty/eleventy --serve

[11ty] Writing ./_site/about/index.html from ./about.md (liquid)
[11ty] Wrote 1 file in 0.11 seconds (v3.0.0)
[11ty] Watching…
[11ty] Server at http://localhost:8080/
</code></pre>
<p>Notice, this time we added <code>--serve</code> flag, which tells 11ty to not only generate static files but also start a local web server so we can test the newly generated static website.</p>
<h3>Structure</h3>
<p>Next, we will define the structure of our static website project.</p>
<p>Add a file called <code>.eleventy.js</code> to your directory. This is a <a href="https://www.11ty.dev/docs/config/" target="_blank" rel="noopener">configuration file for 11ty generator</a> where we specify the structure of our project.</p>
<pre><code>
// 11ty setup
module.exports = function(eleventyConfig) {

    return {
        dir: {
            input: 'content',
            includes: '_includes',
            output: 'dist'
        },
        markdownTemplateEngine: 'njk',
        htmlTemplateEngine: 'njk',
        dataTemplateEngine: 'njk'
    };
};
</code></pre>
<p>In <code>dir</code> object, within this JSON file we define 3 directories: the input directory &#8211; where our website files should be located. Files in this directory will be converted by an 11ty generator.</p>
<p>The <code>output</code> directory defines where the generator will create HTML files.</p>
<p>And <code>includes</code> element defines the directory for files that we use for creating web page layouts.</p>
<p>The last 3 elements instruct 11ty to use <code>njk</code> or Nunjucks to be used as a templating language.</p>
<p>As we configured 11ty to look for source files in a <code>content</code> directory &#8211; therefore we need to create this directory in the project. Move the <code>about.md</code> file we created earlier to this dir.</p>
<p>Next, we create <code>index.md</code> which will be our home page. Then we create <code>blog-post-a.md</code>, <code>blog-post-b.md</code>, <code>blog-post-c.md</code> pages to represent blog posts. Add any example Markdown text in them &#8211; this can change it later.</p>
<p>You can use this <a href="https://jaspervdj.be/lorem-markdownum/" target="_blank" rel="noopener">random Markdown text generator</a> to create some example content.</p>
<p>Your directory structure should now look like this</p>
<pre>/
└── 11ty-static-website
    ├── content
    │   ├── about.md
    │   ├── index.md
    │   └── blog
    │       ├── blog-post-a.md
    │       ├── blog-post-b.md
    │       └── blog-post-c.md
    ├── .eleventy.js
    └── package.json
</pre>
<p>Run the same 11ty build command as before and you should see the below results</p>
<pre><code>
npx @11ty/eleventy --serve
[11ty] Writing ./dist/about/index.html from ./content/about.md (njk)
[11ty] Writing ./dist/index.html from ./content/index.md (njk)
[11ty] Writing ./dist/blog/blog-post-a/index.html from ./content/blog/blog-post-a.md (njk)
[11ty] Writing ./dist/blog/blog-post-b/index.html from ./content/blog/blog-post-b.md (njk)
[11ty] Writing ./dist/blog/blog-post-c/index.html from ./content/blog/blog-post-c.md (njk)
[11ty] Wrote 5 files in 0.17 seconds (v3.0.0)
[11ty] Watching…
[11ty] Server at http://localhost:8080/
</code></pre>
<h3>Includes</h3>
<p>11ty site generator allows us to create templates of website pages.</p>
<p>The concept of layouts lets one webpage include other web pages as layouts. We are going to create a header, footer, and base layout for our site.</p>
<p>Create the <code>_includes</code> a directory within the contents folder. In this directory create a file called <code>base.njk</code> with the following template.</p>
<pre><code>&lt;!DOCTYPE html&gt;
&lt;html lang="en" dir="ltr"&gt;
    &lt;head&gt;
        &lt;!-- charset / viewport --&gt;
        &lt;meta charset="utf-8"&gt;
        &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt;
        &lt;title&gt;{{ title }}&lt;/title&gt;
        &lt;meta name="description" content="{{ description }}"&gt;
        &lt;link rel="canonical" href="{{ page.url }}"&gt;

    &lt;/head&gt;
    &lt;body&gt;
       &lt;!-- content --&gt;
       &lt;main id="content"&gt;{{ content | safe }}&lt;/main&gt;
    &lt;/body&gt;
&lt;/html&gt;</code></pre>
<p>Every web page that references this template will be wrapped with this layout. A template is created in <a href="https://mozilla.github.io/nunjucks/templating.html" target="_blank" rel="noopener">Nunjucks templating syntax</a> &#8211; remember earlier we added this in 11ty configuration.</p>
<p>The items within <code>{{}}</code> are Nunjucks variables.</p>
<p>We are going to create them within the actual Markdown pages. Some variables as  <code>{{ page.url }}</code> are provided to us by 11ty itself.</p>
<p>Now we have to reference this template. Open <code>index.md</code> file and add the following very top of the Markdown page</p>
<pre><code>
---
layout: base.njk
title: Minimal static 11ty website
description: Minimal static 11ty website which serves as skeleton project for larger web projects
---
</code></pre>
<p>Notice the <code>layout</code> value, as well as the <code>title</code> and <code>description</code> variables.</p>
<p>Now if you run the 11ty generator again and check the index HTML pages generated &#8211; you will have HTML markup from the template in index page. But not in others.</p>
<h3>Next Steps</h3>
<p>At this stage, we have our project structured and all content pages created. With simple templating.</p>
<p>But we still need to add CSS styling to web pages. And add some dynamically generated files like sitemap.</p>
<p>In the <a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/">next part of the tutorial</a>, we will cover CSS styles, more advanced templating, dynamically generated sitemap, and RSS feed.</p>
<p>You can find the full source code for the finished <a href="https://github.com/popularowl/11ty-static-web" target="_blank" rel="noopener">11ty static website project on GitHub</a>.</p>
<div class="blog-post-newsletter-form text-center center-block">
<p style="margin: 25px 15px 0px 15px;">Enjoyed this post?</p>
<p style="margin: 25px 15px 0px 15px;">We are writing an e-book that explains how to quickly deploy static websites on various hosting platforms.</p>
<p style="margin: 25px 15px 10px 15px;">Subscribe and get a 50% discount when it launches!</p>
<form action="https://app.kit.com/forms/7391904/subscriptions" class="seva-form formkit-form validate" method="post" data-sv-form="7391904" data-uid="c1bb531be2" data-format="inline" data-version="5" target="_blank">
	<input type="email" name="email_address" class="form-control newsletter-email" placeholder="Email Address" required="" type="text" /><br />
	<button type="submit" data-element="submit" class="btn btn-htmlcenter">Subscribe</button><br />
</form>
</div>
<p>The post <a href="https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/">How to build static website with 11ty</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/" rel="bookmark" title="Build static website with 11ty. Part 2">Build static website with 11ty. Part 2</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/" rel="bookmark" title="Static website hosting with Cloudflare pages">Static website hosting with Cloudflare pages</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/" rel="bookmark" title="Static HTML sites with Markdown and Metalsmith">Static HTML sites with Markdown and Metalsmith</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/feed/</wfw:commentRss>
			<slash:comments>2</slash:comments>
		
		
			</item>
		<item>
		<title>Static HTML sites with Markdown and Metalsmith</title>
		<link>https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/</link>
					<comments>https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/#comments</comments>
		
		<dc:creator><![CDATA[ProDeveloper]]></dc:creator>
		<pubDate>Mon, 07 Mar 2016 13:56:45 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[web tutorials]]></category>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=4213</guid>

					<description><![CDATA[<p>HTML The language in which all websites and web apps are being presented on the web browsers is HTML. This markup language is what web browsers read, understand, and render. In addition to HTML, web applications in most cases have dedicated JavaScript code and style files. Many websites are dynamic with HTML and corresponding assets [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/">Static HTML sites with Markdown and Metalsmith</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/" rel="bookmark" title="How to build static website with 11ty">How to build static website with 11ty</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/" rel="bookmark" title="Static website hosting with Cloudflare pages">Static website hosting with Cloudflare pages</a></li>
<li><a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/" rel="bookmark" title="Build static website with 11ty. Part 2">Build static website with 11ty. Part 2</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<h3>HTML</h3>
<p><em>The language in which all websites and web apps are being presented on the web browsers is <a href="https://en.wikipedia.org/wiki/HTML" target="_blank" rel="noopener">HTML</a>. </em></p>
<p><em>This markup language is what web browsers read, understand, and render. In addition to HTML, web applications in most cases have dedicated JavaScript code and style files.</em></p>
<p>Many websites are dynamic with HTML and corresponding assets generated dynamically, by the web server backend application.</p>
<p>Recently, static websites started to gain popularity.</p>
<p>A static website means that all HTML and Javascript required by web browsers are statically generated on the server side and will not change.</p>
<p>This brings many benefits for website performance &#8211; most of the content can be <a href="https://en.wikipedia.org/wiki/Web_cache" target="_blank" rel="noopener">cached</a> and can be loaded by the browser very fast.</p>
<p>Such pages do not change, you don&#8217;t need the backed server at all. Hence the name &#8211; static websites.</p>
<p>Because of this nature, static websites can be served from multiple platforms which allows content sharing. Examples would be <a href="https://pages.github.com/" target="_blank" rel="noopener">GitHub pages</a> or even <a href="https://www.dropbox.com/" target="_blank" rel="noopener">DropBox</a>.</p>
<p><span id="more-4213"></span></p>
<h3>Generating static HTML websites</h3>
<p>What are the most common ways of generating static HTML websites?</p>
<p>You can, of course, create and maintain your static website pages in HTML language as a set of files.</p>
<p>However, being a markup language, <a href="http://www.htmlcenter.com/blog/html-table-attributes/" target="_blank" rel="noopener">HTML is hard to read for humans</a>.</p>
<p><a href="https://daringfireball.net/projects/markdown/syntax" target="_blank" rel="noopener">Markdown</a> language comes to the rescue. Markdown is easy to read for humans and a large array of tools exists to convert markdown to HTML markup.</p>
<p>Static site generators work this way &#8211; they use such converters, plus provide some extra bits for generating structure for static websites.</p>
<p>In this tutorial, we are going to use one of such static site generators &#8211; <a href="http://www.metalsmith.io/" target="_blank" rel="noopener">Metalsmith</a>. You will learn how to set up and configure a simple static website.</p>
<h3>MobileGap &#8211; the list of open-source mobile applications</h3>
<p>MobileGap is a simple website we have created to maintain the list of open-source mobile application projects.</p>
<p>The first version of  <code>mobilegap.net</code> site was quickly put together by using an existing <a href="http://www.htmlcenter.com/blog/speed-wordpress-site/" target="_blank" rel="noopener">WordPress</a> template we had lying around.</p>
<p>But, as the number of developers asking to add their open-source applications to the list grew, we decided to open-source the content creation of this website.</p>
<p>The good option for such a setup was to maintain website content in a Markdown language, generate HTML markup from it, and move generated HTML files to be served by the web server. Markdown pages should be hosted on a publically accessible repository like GitHub.</p>
<p>Now, everyone wishing to add their application to the list only has to issue a GitHub pull request to <a href="https://github.com/sauliuz/mobilegap.net" target="_blank" rel="noopener">MobileGap GitHub project</a> to update the pages.</p>
<p>How did we set it up?</p>
<h3>Maintain static HTML websites with Markdown and Metalsmith</h3>
<p>We are using <a href="https://github.com/metalsmith/metalsmith">metalsmith.io</a> simple static site generator to convert Markdown pages to HTML markup.</p>
<p>Now let&#8217;s reference the current project structure of <a href="https://github.com/sauliuz/mobilegap.net" target="_blank" rel="noopener">mobilegap.net source code</a></p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-4219" src="http://www.htmlcenter.com/wp-content/uploads/2016/03/metalsmith.io-project-structure-300x138.jpg" alt="metalsmith.io for generating static HTML websites" width="450" height="207" srcset="https://www.htmlcenter.com/wp-content/uploads/2016/03/metalsmith.io-project-structure-300x138.jpg 300w, https://www.htmlcenter.com/wp-content/uploads/2016/03/metalsmith.io-project-structure-768x353.jpg 768w, https://www.htmlcenter.com/wp-content/uploads/2016/03/metalsmith.io-project-structure.jpg 900w" sizes="auto, (max-width: 450px) 100vw, 450px" /></p>
<p>Metalsmith is a NodeJS module and requires <a href="https://nodejs.org/en/download/" target="_blank" rel="noopener">NodeJS to be installed</a> on the system. Let&#8217;s go through the files in the project.</p>
<p><code>package.json</code> is a packaging file for Node applications. It has a list of dependencies which the application relies on in the <code>dependencies</code> section. The contents of the file are the following:</p>
<pre><code class="language-json">
{
 "name": "www.mobilegap.net",
 "version": "0.1.0",
 "description": "MobileGap - open source mobile application directory",
 "main": "index.js",
 "repository": { 
 "type" : "git",
 "url" : "https://github.com/sauliuz/mobilegap.net.git"
},
 "dependencies": {
 "handlebars": "^4.0.5",
 "metalsmith": "^2.1.0",
 "metalsmith-markdown": "^0.2.1",
 "metalsmith-templates": "^0.7.0"
},
 "author": "popularowl.com",
 "license": "MIT"
}
</code></pre>
<p>The dependencies section lists a few npm packages our project relies on. Metalsmith core is simplistic and minimal, and to use Markdown or templating functionality, we have to list these specific Metalsmith modules. There is also a handlebars module, which helps to set up templates.</p>
<p>Other sections of the file provide information about the project. If you want to understand the structure of a packaging file for NodeJS projects, <a href="https://docs.npmjs.com/getting-started/using-a-package.json" target="_blank" rel="noopener">check the official documentation</a>.</p>
<p>Run <code>npm install</code> on your system and the npm package manager (it comes together with NodeJS installation) will download all the project dependencies.</p>
<p>Now let&#8217;s look at <code>index.js</code></p>
<pre><code class="language-javascript">

var Metalsmith = require('metalsmith'),
 markdown = require('metalsmith-markdown'),
 templates = require('metalsmith-templates'),
 Handlebars = require('handlebars'),
 fs = require('fs');

 Handlebars.registerPartial('header', fs.readFileSync(__dirname + '/templates/partials/header.hbt').toString());
 Handlebars.registerPartial('footer', fs.readFileSync(__dirname + '/templates/partials/footer.hbt').toString());

Metalsmith(__dirname)
 .use(markdown())
 .use(templates('handlebars'))
 .source('./markdown')
 .destination('./mobilegap.net')
 .build(function (err) { if(err) console.log(err) })

</code></pre>
<p>If you are familiar with NodeJS applications, this file doesn&#8217;t look very complex.</p>
<p>First, we retrieve all the required modules. Then we are registering partials for Handlebars templates. This allows us to keep a shared header and footer for all pages.</p>
<p>Next, we set Metalsmith static site generator, with <code>Metalsmith(..)</code> providing it with the location to a current directory.</p>
<p>We use Handlebars templates, the markdown directory as a source, and the mobilegap.net directory as a destination for generated HTML files.</p>
<p>The last step is <code>build()</code>. We are catching and logging any errors that might happen during the build process.</p>
<p>As you might have already guessed, Markdown files are located in <code>markdown</code> a directory, template files are located in <code>templates</code>. We like simplicity.</p>
<p>Now, if you run <code>node index.js</code> all the markdown files from the markdown directory will be converted to HTML using the template and partials from the templates directory.</p>
<p>The resulting HTML files are created in the mobilegap.net directory. Metalsmith will delete the old HTML files before creating new ones by default.</p>
<p>Metalsmith will also copy all other files (styles, JavaScript) from a source directory to a destination directory as they are.</p>
<p>What&#8217;s left is to move generated HTML files to your web server. In the next part of this post, I&#8217;ll describe the process we use to employ a simple CI pipeline to automate the generation of static HTML websites after new code changes are merged into the GitHub repository.</p>
<p>The post <a href="https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/">Static HTML sites with Markdown and Metalsmith</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/how-to-build-static-website-with-11ty/" rel="bookmark" title="How to build static website with 11ty">How to build static website with 11ty</a></li>
<li><a href="https://www.htmlcenter.com/blog/static-website-hosting-with-cloudflare-pages/" rel="bookmark" title="Static website hosting with Cloudflare pages">Static website hosting with Cloudflare pages</a></li>
<li><a href="https://www.htmlcenter.com/blog/build-static-website-with-11ty-part-2/" rel="bookmark" title="Build static website with 11ty. Part 2">Build static website with 11ty. Part 2</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/static-html-websites-markdown-metalsmith/feed/</wfw:commentRss>
			<slash:comments>6</slash:comments>
		
		
			</item>
		<item>
		<title>How AngularJS communicates with web services</title>
		<link>https://www.htmlcenter.com/blog/how-angularjs-communicates-with-web-services/</link>
					<comments>https://www.htmlcenter.com/blog/how-angularjs-communicates-with-web-services/#respond</comments>
		
		<dc:creator><![CDATA[ProDeveloper]]></dc:creator>
		<pubDate>Mon, 31 Aug 2015 12:41:38 +0000</pubDate>
				<category><![CDATA[Angular.js]]></category>
		<category><![CDATA[Blog]]></category>
		<category><![CDATA[HTML5 Tips]]></category>
		<category><![CDATA[angularjs]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[tips]]></category>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=4095</guid>

					<description><![CDATA[<p>Few posts ago I have created a simple open source AngularJS project named Angular Starter. The structure and overview of Angular Starter is covered in one of HTMLCenter blog posts. This time, I&#8217;m going to introduce the example of http communication to Angular Starter application in order for the web app to communicate with cloud-based services. APIs [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/how-angularjs-communicates-with-web-services/">How AngularJS communicates with web services</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/building-angular-js-starter-application/" rel="bookmark" title="Building Angular.js Starter application">Building Angular.js Starter application</a></li>
<li><a href="https://www.htmlcenter.com/blog/building-angularjs-based-native-mobile-application-part-2/" rel="bookmark" title="Building AngularJS based native mobile application. Part 2">Building AngularJS based native mobile application. Part 2</a></li>
<li><a href="https://www.htmlcenter.com/blog/how-to-build-angularjs-based-native-mobile-application/" rel="bookmark" title="How to build AngularJS based native mobile application">How to build AngularJS based native mobile application</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><em>Few posts ago I have created a simple open source AngularJS project named Angular Starter. The structure and overview of Angular Starter is <a title="Angular Starter overview" href="http://www.htmlcenter.com/blog/building-angular-js-starter-application/" target="_blank">covered in one of HTMLCenter blog posts</a>.</em></p>
<p><em>This time, I&#8217;m going to introduce the example of <code>http</code> communication to <a title="Angular Starter" href="https://github.com/popularowl/angular-starter" target="_blank">Angular Starter</a> application in order for the web app to communicate with cloud-based services. APIs and web services are usually the main sources of data for Angular.js applications and a good example always helps.</em></p>
<h3>Angular Starter Update</h3>
<p>Recent <a title="Angular Starter update" href="https://github.com/popularowl/angular-starter/commit/c8584f44872389543da3eb89c3581bb1d6bf9ca5" target="_blank">Angular Starter source update</a> has introduced example communication with <a title="httpbin web service" href="http://httpbin.org/" target="_blank">httpbin.org</a> web service in order to retrieve users IP address before proceeding with login. httpbin.org web service is great for testing various API requests. It can mock many example API responses, including but not limited to <code>xml</code>, <code>json</code>, <code>html</code> and it even supports streaming response examples. Angular Starter project uses this service for receiving IP address of the client application.<span id="more-4095"></span></p>
<p><a href="http://www.htmlcenter.com/wp-content/uploads/2015/08/httpbin.org_.png"><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4199" src="http://www.htmlcenter.com/wp-content/uploads/2015/08/httpbin.org_.png" alt="httpbin.org" width="450" height="235" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/08/httpbin.org_.png 450w, https://www.htmlcenter.com/wp-content/uploads/2015/08/httpbin.org_-300x156.png 300w" sizes="auto, (max-width: 450px) 100vw, 450px" /></a></p>
<h3> Displaying Users IP Address</h3>
<p>The example <code>http</code> communication piece captures and displays application user IP address on the Angular Starter login page. Such functionality is quite common in financial web apps and apps requiring increased security. In our case, it&#8217;s just an example of communication with external web service.</p>
<p>First we have to add <code>$httpProvider</code> as a dependency to Angular.js application. Also, a couple of new configuration settings for all http requests our application will be making. All this is being configured in <code>app.js</code></p>
<pre class="prettyprint">mostPopularListingsApp.config(function($routeProvider, $locationProvider, $httpProvider) {
  ...
  // Settings for http communications
  $httpProvider.defaults.useXDomain = true;
  delete $httpProvider.defaults.headers.common['X-Requested-With'];
  ...
});
</pre>
<p>As we now added $httpProvider to Angular Starter app configuration, what&#8217;s left is to use <code>$http</code> object in the <code>LoginController.js</code></p>
<pre class="prettyprint">function loadUserIp(){
  $http.get('http://httpbin.org/ip').
    then(function(response) {
    // this callback will be called asynchronously
    // when the response is available
    userIp = response.data.origin;
    console.log(userIp);
  
    // assigning userIp to scope
    return $scope.userip = userIp;
    ...
}

    // Introducing delay 500 ms
    var filterTextTimeout = $timeout(function() {
      loadUserIp();            
    }, 500); 
</pre>
<p>Notice the 500ms delay we are introducing before assigning the <code>$scope.userip</code> value? It takes some time for <code>http</code> response to come back from web service. The result is following:</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-4198 size-full" src="http://www.htmlcenter.com/wp-content/uploads/2015/08/Angular-Starter-Login-e1440966075749.png" alt="AngularJS Login Example" width="450" height="236" /></p>
<p>Clone the new version of Angular Starter app from GitHub and try running the project yourself.</p>
<h3>Launching and Testing Angular Starter</h3>
<p>Based on the reader feedback we got, the final section of this post will list main commands used for launching Angular Starter project in local dev environment and running the unit tests for its code. You have to clone the project on your dev environment first:</p>
<pre class="prettyprint">git clone https://github.com/popularowl/angular-starter.git
</pre>
<p>Angular Starter comes with few inbuilt <a title="Node Package Manager" href="https://www.npmjs.com/" target="_blank">npm</a> commands.</p>
<p><code>npm start</code> (will start the local web server on localhost:8000 and will serve app directory)<br />
<code>npm test</code> (will start karma for continuous testing once code changes are detected)<br />
<code>npm test-single-run</code> (will start karma for one single test run)</p>
<p>Check out all the available npm commands in <a title="Angular Starter" href="https://github.com/popularowl/angular-starter/blob/master/package.json">package.json</a>.</p>
<p>All the feedback and improvement suggestions for Angular Starter are very welcome. Use the comment section below or create the <a title="Angular Starter project improvements" href="https://github.com/PopularOwl/angular-starter/issues">issue on the GitHub project page</a>. Thanks!</p>
<p>The post <a href="https://www.htmlcenter.com/blog/how-angularjs-communicates-with-web-services/">How AngularJS communicates with web services</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/building-angular-js-starter-application/" rel="bookmark" title="Building Angular.js Starter application">Building Angular.js Starter application</a></li>
<li><a href="https://www.htmlcenter.com/blog/building-angularjs-based-native-mobile-application-part-2/" rel="bookmark" title="Building AngularJS based native mobile application. Part 2">Building AngularJS based native mobile application. Part 2</a></li>
<li><a href="https://www.htmlcenter.com/blog/how-to-build-angularjs-based-native-mobile-application/" rel="bookmark" title="How to build AngularJS based native mobile application">How to build AngularJS based native mobile application</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/how-angularjs-communicates-with-web-services/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>How to Customize Bootstrap &#8211; The Resources You Are Looking For</title>
		<link>https://www.htmlcenter.com/blog/how-to-customize-bootstrap-the-resources-you-are-looking-for/</link>
					<comments>https://www.htmlcenter.com/blog/how-to-customize-bootstrap-the-resources-you-are-looking-for/#comments</comments>
		
		<dc:creator><![CDATA[Karol]]></dc:creator>
		<pubDate>Wed, 15 Jul 2015 14:01:32 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[HTML5]]></category>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=4156</guid>

					<description><![CDATA[<p>As we all know, Bootstrap can be used for multiple purposes and is capable of running any type of site. However, when it comes to the appearance of its individual elements &#8211; things like content blocks, forms, buttons &#8211; it&#8217;s very easy to spot the typical Bootstrap footprint, so to speak. As a result, many [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/how-to-customize-bootstrap-the-resources-you-are-looking-for/">How to Customize Bootstrap &#8211; The Resources You Are Looking For</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/ultimate-collection-of-resources-for-developers-starting-with-bootstrap/" rel="bookmark" title="Ultimate Collection of Resources for Developers Starting With Bootstrap">Ultimate Collection of Resources for Developers Starting With Bootstrap</a></li>
<li><a href="https://www.htmlcenter.com/blog/the-bootstrap-framework-controversy-should-you-use-it-or-not/" rel="bookmark" title="The Bootstrap Framework Controversy &#8230; Should You Use It or Not?">The Bootstrap Framework Controversy &#8230; Should You Use It or Not?</a></li>
<li><a href="https://www.htmlcenter.com/blog/hello-bootstrap-responsive-design/" rel="bookmark" title="Hello with Bootstrap and Responsive design">Hello with Bootstrap and Responsive design</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>As we all know, Bootstrap can be used for multiple purposes and is capable of running any type of site. However, when it comes to the appearance of its individual elements &#8211; things like content blocks, forms, buttons &#8211; it&#8217;s very easy to spot the typical Bootstrap footprint, so to speak.</p>
<p>As a result, many Bootstrap sites seem to look very much alike.</p>
<p><em>Note. This is part three in our Bootstrap series. Previously, we talked about <a href="http://www.htmlcenter.com/blog/the-bootstrap-framework-controversy-should-you-use-it-or-not/">whether or not you should be using Bootstrap</a> in the first place, and we also listed the <a href="http://www.htmlcenter.com/blog/ultimate-collection-of-resources-for-developers-starting-with-bootstrap/">ultimate set of Bootstrap resources</a> for developers who want to get started with the framework.</em></p>
<p>This time, the topic is about customizing sites built with Bootstrap framework.</p>
<p>Or in other words, what we&#8217;re going to be focusing on today is how to make your Bootstrap site stand out from everyone else&#8217;s.</p>
<p><span id="more-4156"></span></p>
<p>Here are the resources you should look into:</p>
<h3>Official customizer for Bootstrap</h3>
<p><a href="http://getbootstrap.com/customize/">The official Bootstrap customizable download</a>. This is the first place to go if you want to customize your Bootstrap installation. The interesting thing about how it works is that instead of giving you a settings file of some kind, you actually get to customize the framework prior to downloading and installing it.</p>
<p>Just some of the things you can adjust: common CSS styles, Bootstrap components, JS components, jQuery plugins in use, default colors, global styles, individual elements of every CSS class, margins, padding settings, and many <em>many</em> more.</p>
<p>Once you&#8217;re done, just click the <em>Compile and Download</em> button and get your own version of Bootstrap.</p>
<h3>Customizing/extending Bootstrap CSS</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4171" src="http://www.htmlcenter.com/wp-content/uploads/2015/07/customizing-Bootstrap-framework.jpg" alt="customizing Bootstrap framework" width="500" height="349" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/07/customizing-Bootstrap-framework.jpg 500w, https://www.htmlcenter.com/wp-content/uploads/2015/07/customizing-Bootstrap-framework-300x209.jpg 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></p>
<p><a href="http://stylebootstrap.info/">StyleBootstrap</a>. Great tool for editing the default UI elements of Bootstrap. Compared to the official customization tool, this one delivers some helpers in the form of color pickers that should make the customization faster for you. When you&#8217;re done adjusting your custom styles, you can download the final CSS file and add it to your existing Bootstrap installation.</p>
<p><a href="http://pikock.github.io/bootstrap-magic/">Bootstrap Magic</a>. Another customization tool for the Bootstrap CSS. This one is a bit more advanced and delivers some cool helpers for faster usage. For example, it gives you autocomplete for LESS variables and functions, you get contextual and live preview of the changes you&#8217;re making, you can import and create variables, and there&#8217;s also a color picker. You can export your custom CSS when you&#8217;re done adjusting it.</p>
<p><a href="http://bootswatchr.com/">BootSwatchr</a>. This CSS editor for Bootstrap is more code-based in a sense that you can customize your version of the framework by adjusting the actual CSS code. However, you get to see a preview of your actions on the right side of the screen at all times (provides you with immediate feedback). Additionally, there&#8217;s a gallery of ready-made modifications, which you can use too.</p>
<p><a href="http://bootstrap-live-customizer.com/">Bootstrap Live Customizer</a>. Similar to BootSwatchr, but more geared towards developers who prefer to use a UI instead of doing everything in the source code. This customizer allows you to adjust any element of the Bootstrap stylesheet and do so through an easy-to-grasp interface.</p>
<h3>New fonts</h3>
<p><a href="http://fortawesome.github.io/Font-Awesome/3.2.1/">Font Awesome</a>. It is perhaps the most popular icon font of them all. The Bootstrap version gives you 360+ icons that you can use on your site. Since it is a font, all the icons are in vector formats and will look great on any device and at any scale.</p>
<h3>Adjusting the UI</h3>
<p><a href="http://designmodo.github.io/Flat-UI/">Flat UI by Designmodo</a>. Great package by the guys over at Designmodo. It includes all the basic graphical elements of the framework, such as buttons, input fields, checkboxes, typography settings, icons, color swatches, and many more. Everything available for free. And like the name suggests, it&#8217;s a &#8220;flat design&#8221; take on the Bootstrap framework.</p>
<p><a href="http://ckrack.github.io/fbootstrapp/">Fbootstrapp</a>. A very interesting package designed to make Facebook app development easier. It mimics the design of Facebook, including all the basic elements such as buttons, forms, grids, and more. Great for any developer building something for Facebook.</p>
<h3>Bootstrap plugins and snippets</h3>
<ul>
<li><a href="http://bootsnipp.com/">Bootsnipp</a>. It&#8217;s an element gallery for Bootstrap. You&#8217;ll find a lot of short and sweet snippets there that provide quick fixes and modifications to the Bootstrap framework. For instance, you can find snippets for custom checkboxes, login and registration forms, profile picture styling, pricing tables, and much more.</li>
<li><a href="https://github.com/Serhioromano/bootstrap-calendar">Bootstrap Calendar</a>. A full calendar plugin that allows you to display months, years, weeks, and the events assigned to them.</li>
<li><a href="https://github.com/sairam/bootstrap-prompts">Bootstrap Prompts</a>. Alerts for Bootstrap that display modal windows instead of using browser alerts.</li>
<li><a href="http://blueimp.github.io/Bootstrap-Image-Gallery/">Bootstrap Image Gallery</a>. A touch-enabled, responsive and customizable image and video gallery.</li>
<li><a href="https://github.com/noreiller/bootstrap-modal-carousel">Bootstrap Modal Carousel</a>. A set of JS and CSS extensions that allow you to display a carousel in Bootstrap.</li>
<li><a href="http://bootstrap-plus.github.io/bootstrap-media-lightbox/">Bootstrap Media Lightbox</a>. A lightweight and borderless media lightbox extension for Bootstrap.</li>
<li><a href="http://lipis.github.io/bootstrap-social/">Social Buttons for Bootstrap</a>. A set of great looking social media buttons for Bootstrap based on Font Awesome.</li>
<li><a href="http://geedmo.github.io/yamm/">Yamm!</a> A great mega-menu for Bootstrap. It utilizes the default navbar markup and grid system.</li>
<li><a href="https://github.com/asyraf9/bootstrap-sidebar">Bootstrap Sidebar</a>. A responsive sidebar plugin. Helpful if your menus are too big to fit into a horizontal menubar.</li>
<li><a href="https://github.com/morrissinger/BootstrapTreeNav">BootstrapTreeNav</a>. A plugin that makes it possible to create tree-style navigation in Bootstrap.</li>
<li><a href="http://reactiveraven.github.io/jqBootstrapValidation/">jqBootstrapValidation</a>. A great jQuery form validation plugin for Bootstrap.</li>
<li><a href="https://github.com/flatlogic/bootstrap-tabcollapse">Bootstrap Tabcollapse</a>. Adjusts the Bootstrap tabs component for smaller screens by making it collapsible.</li>
<li><a href="http://sliptree.github.io/bootstrap-tokenfield/">Tokenfield for Bootstrap</a>. A great tagging plugin for Bootstrap that uses jQuery. Big focus on keyboard support.</li>
<li><a href="http://weareoutman.github.io/clockpicker/">ClockPicker</a>. A nice clock-style time-picker for Bootstrap.</li>
<li><a href="https://github.com/sathomas/acc-wizard">Accordian Wizard</a>. An accordion-based wizard implementation for Bootstrap.</li>
<li><a href="http://ethaizone.github.io/Bootstrap-Confirmation/">Bootstrap Confirmation</a>. A very nice plugin that replaces the default confirmation dialogs with pop-overs.</li>
<li><a href="http://plugins.krajee.com/star-rating">Bootstrap Star Rating</a>. A cool star rating plugin based on jQuery. Supports fractional star fill and RTL input.</li>
</ul>
<h3>Books</h3>
<p><a href="https://www.packtpub.com/web-development/extending-bootstrap">Extending Bootstrap</a> by Christoffer Niska. Published by PACKT Publishing, this book is geared towards intermediate developers who want to extend Bootstrap through themes and plugins (already existing ones and their own).</p>
<h3>Modifying the grid</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4172" src="http://www.htmlcenter.com/wp-content/uploads/2015/07/Bootstrap-framework-grid-example.png" alt="Bootstrap framework grid example" width="500" height="332" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/07/Bootstrap-framework-grid-example.png 500w, https://www.htmlcenter.com/wp-content/uploads/2015/07/Bootstrap-framework-grid-example-300x199.png 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></p>
<p><a href="http://shoelace.io/">Shoelace</a>. Visual Bootstrap grid builder. Instead of experimenting with HTML, build your site&#8217;s Bootstrap grid through an easy-to-use UI.</p>
<p><a href="http://www.layoutit.com/build">LayoutIt</a>. Another Bootstrap layout builder. But this time, apart from the grid adjustments, you can also add basic site elements such as titles, paragraphs, navigation, forms, tables, images, and everything else that&#8217;s part of Bootstrap&#8217;s structure.</p>
<p><em>That&#8217;s about it for our set of Bootstrap goodies and extensions, so now it&#8217;s your turn to chip in! Do you know of any other Bootstrap resource that would look good on this list?</em></p>
<p>The post <a href="https://www.htmlcenter.com/blog/how-to-customize-bootstrap-the-resources-you-are-looking-for/">How to Customize Bootstrap &#8211; The Resources You Are Looking For</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/ultimate-collection-of-resources-for-developers-starting-with-bootstrap/" rel="bookmark" title="Ultimate Collection of Resources for Developers Starting With Bootstrap">Ultimate Collection of Resources for Developers Starting With Bootstrap</a></li>
<li><a href="https://www.htmlcenter.com/blog/the-bootstrap-framework-controversy-should-you-use-it-or-not/" rel="bookmark" title="The Bootstrap Framework Controversy &#8230; Should You Use It or Not?">The Bootstrap Framework Controversy &#8230; Should You Use It or Not?</a></li>
<li><a href="https://www.htmlcenter.com/blog/hello-bootstrap-responsive-design/" rel="bookmark" title="Hello with Bootstrap and Responsive design">Hello with Bootstrap and Responsive design</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/how-to-customize-bootstrap-the-resources-you-are-looking-for/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>How Framework7 and PhoneGap fit together</title>
		<link>https://www.htmlcenter.com/blog/how-framework7-and-phonegap-fit-together/</link>
					<comments>https://www.htmlcenter.com/blog/how-framework7-and-phonegap-fit-together/#comments</comments>
		
		<dc:creator><![CDATA[ProDeveloper]]></dc:creator>
		<pubDate>Fri, 03 Jul 2015 13:02:50 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Mobile Tutorials]]></category>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=4006</guid>

					<description><![CDATA[<p>This is the final part of HTMLCenter tutorial about Framework7 mobile HTML5 framework. In previous part one we have created a skeleton mobile web application with several views. In part two we added login functionality and communication to cloud-based service APIs (Parse BaaS). This final part is about wrapping up the existing Framework7 application into PhoneGap (Cordova) wrapper and creating [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/how-framework7-and-phonegap-fit-together/">How Framework7 and PhoneGap fit together</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/phonegap-plugins-mobile-application-projects/" rel="bookmark" title="PhoneGap plugins for mobile application projects">PhoneGap plugins for mobile application projects</a></li>
<li><a href="https://www.htmlcenter.com/blog/developing-phonegap-mobile-project-from-start-to-finish/" rel="bookmark" title="Developing PhoneGap mobile project. From start to finish">Developing PhoneGap mobile project. From start to finish</a></li>
<li><a href="https://www.htmlcenter.com/blog/framework7-and-parse-for-user-login/" rel="bookmark" title="Framework7 and Parse for User login">Framework7 and Parse for User login</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><em>This is the final part of HTMLCenter tutorial about Framework7 mobile HTML5 framework. In previous <a title="HTML5 mobile ui frameworks" href="http://www.htmlcenter.com/blog/html5-frameworks-for-mobile-web-applications/" target="_blank">part one</a> we have created a skeleton mobile web application with several views. In <a title="Framework7 login app with Parse" href="http://www.htmlcenter.com/blog/framework7-and-parse-for-user-login/" target="_blank">part two</a> we added login functionality and communication to cloud-based service APIs (Parse BaaS). This final part is about wrapping up the existing Framework7 application into PhoneGap (Cordova) wrapper and creating native mobile app as a result.</em></p>
<p><a title="Building PhoneGap mobile application" href="http://www.htmlcenter.com/blog/developing-phonegap-mobile-project-from-start-to-finish/" target="_blank">PhoneGap</a> is a popular choice among mobile web app developers to package their HTML5 applications for distribution as native mobile apps. PhoneGap framework is based on <a title="Apache Cordova" href="https://cordova.apache.org/" target="_blank">Apache Cordova open source project</a> which provides this exact functionality. It also supports <a title="Very useful PhoneGap plugins" href="http://www.htmlcenter.com/blog/phonegap-plugins-mobile-application-projects/" target="_blank">custom plugin system</a> which lets developers hook into native mobile OS API&#8217;s.</p>
<p>We are going to start new PhoneGap project and add our existing Framework7 application in.</p>
<p><span id="more-4006"></span></p>
<h3>Starting with PhoneGap</h3>
<p>The best way to start PhoneGap project is to use its command line interface (also called Cordova CLI). Its a little handy tool which is used from the command line with many pre-built Cordova helper methods.</p>
<p>Cordova CLI requires Node.js to be installed on your machine as its using <a title="Node package Manager" href="https://www.npmjs.com/" target="_blank">Node package manager</a> (npm) for installation. Once you have <a title="Install Node.js to use PhoneGap" href="https://nodejs.org/" target="_blank">Node.js installed</a> on your development machine here is the command to install Cordova CLI globally (MacOSX)</p>
<pre class="prettyprint">$: sudo npm install -g cordova</pre>
<p>After install is completed successfully, you should be able to run <code>cordova</code> command to invoke CLI from the terminal. For example, this should work</p>
<pre>$: cordova help

Synopsis
    cordova command [options]

Global Commands
    create ................... Create a project
    help ..................... Get help for a command

Project Commands
    info ..................... Generate project information

    platform ................. Manage project platforms
    plugin ................... Manage project plugins
</pre>
<p>Now you have Cordova CLI installed and can use it to initialise new PhoneGap project. Here is the example</p>
<pre class="prettyprint">$: cordova create htmlcenterLogin com.htmlcenter.loginapp HTMLCenterHello</pre>
<p>We are sending create command to the cordova utility together with the application directory name, unique id (reverse domain name serves as unique app id) and a title of the new application. All of these can later be changed in the project&#8217;s <code>config.xml</code> configuration file.</p>
<p>PhoneGap relies on mobile OS SDK&#8217;s being available on your development machine. This is a separate procedure to download and install them. You can find these on the mobile OS developer sites. I&#8217;m going to use iOS project as and example for this tutorial and this requires me to have <a title="Xcode IDE" href="https://developer.apple.com/xcode/" target="_blank">Apple Xcode</a> installed. <a title="Android SDK" href="http://developer.android.com/sdk/index.html" target="_blank">Android SDK</a> has its own requirements.</p>
<pre class="prettyprint">$: cordova platform add ios
$: cordova platforms ls
$: cordova build ios</pre>
<p>First line adds Cordova iOS platform to the project (again by using Node&#8217;s npm). The second one shows what platforms are added to the project and which ones are available. Third line builds PhoneGap project for iOS platform.</p>
<p>What exactly did this command for adding platforms did? It has created new directory within your project <code>platforms</code> directory. It does it for each different mobile platform you add in order to maintain separate file sets.<br />
Worth to note that you only have to maintain main code in <code>www</code> directory with your application code, Cordova CLI maintains the specific platform directories itself (copying files from main <code>www</code> directory etc.)</p>
<p>And what about <code>cordova build ios</code>? This command has copied files from your main <code>www</code> directory and builded .app file in order to be tested in iOS simulator (in my case its <code>HTMLCenterHello.app</code>). Usually, very first build run requires more compilation time but subsequent builds are much faster as Cordova is reusing already compiled components.</p>
<p>Your projects/ios directory now contain a fully working iOS native application project. Once I open it in XCode and run the emulator I can see a native iOs app which is running default PhoneGap mobile web application in it.</p>
<h3>Adding Framework7 project to PhoneGap</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4082" src="http://www.htmlcenter.com/wp-content/uploads/2015/03/Framework7-application-with-PhoneGap-framework.png" alt="Framework7 application with PhoneGap framework" width="300" height="554" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/03/Framework7-application-with-PhoneGap-framework.png 300w, https://www.htmlcenter.com/wp-content/uploads/2015/03/Framework7-application-with-PhoneGap-framework-162x300.png 162w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>In order for our Framewok7 application to become working native iOS app we just have to add it to www directory in PhoneGap project which we have created in tutorial parts <a title="HTML5 Framework7" href="http://www.htmlcenter.com/blog/html5-frameworks-for-mobile-web-applications/" target="_blank">one</a> and <a title="Framework7 login application" href="http://www.htmlcenter.com/blog/framework7-and-parse-for-user-login/" target="_blank">two</a>. It currently contains example <code>index.html</code> file with some CSS and JavaScript. This application is what you currently see running in your emulator.</p>
<p>While replacing existing html, css and js files we will maintain the example <code>index.js</code> file as it contains example code how to bind to events Cordova framework distributes to your app. Just copy the <code>index.js</code> file to you Framework7 project js directory and reference it in the <code>index.html</code> file. This is how I updated references in <code>index.htm</code> for our example project.</p>
<pre class="prettyprint">...
 &lt;!-- Cordova index.js file with all Cordova bindings --&gt;
 &lt;script type="text/javascript" src="js/index.js"&gt;&lt;/script&gt;
 &lt;!-- Path to Framework7 Library JS--&gt;
 &lt;script type="text/javascript" src="js/framework7/framework7.min.js"&gt;&lt;/script&gt;
 &lt;!-- Path to your app js--&gt;
 &lt;script type="text/javascript" src="js/my-app.js"&gt;&lt;/script&gt;
...
</pre>
<p>After copying all the files and adding <code>index.js</code> we launch the app from within XCode and our Framework7 application is now running within iOS simulator as native iOS application. It still has all the functionality we added in previous tutorials. Users can register and login, and their details are being saved and validated on Parse BaaS platform.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4083" src="http://www.htmlcenter.com/wp-content/uploads/2015/03/PhoneGap-Parse-and-Framework7-login.png" alt="PhoneGap Parse and Framework7 login" width="300" height="554" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/03/PhoneGap-Parse-and-Framework7-login.png 300w, https://www.htmlcenter.com/wp-content/uploads/2015/03/PhoneGap-Parse-and-Framework7-login-162x300.png 162w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<h3>Conclusion</h3>
<p>In this tutorial, we have created new PhoneGap project, generated iOS build and converted Framework7 based mobile web application to a native iOS app. The native app we have generated is very simple, but it already has navigation, transitions, secondary side views and HTTP communication (cloud APIs) enabled. Next natural steps for development would be to create application icon, add loading view and add more screen views.</p>
<p>We already mentioned that PhoneGap provides plugin functionality and there are many plugins out there for developers to use in order to leverage native mobile OS functionality via JavaScript. PhoneGap plugins are the best way to use native mobile OS APIs from within your JavaScript code. This <a title="Cordova plugin directory" href="http://plugins.cordova.io" target="_blank">Cordova plugin directory</a> will get you started.</p>
<p>You can find a source code for the application we created during all 3 parts of this tutorial in PopularOwl Labs <a title="Framework7 open source project GitHub" href="https://github.com/popularowl/framework7-parse" target="_blank">repository on GitHub</a>. Any improvement suggestions are most certainly welcome. Let us know!</p>
<p>The post <a href="https://www.htmlcenter.com/blog/how-framework7-and-phonegap-fit-together/">How Framework7 and PhoneGap fit together</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/phonegap-plugins-mobile-application-projects/" rel="bookmark" title="PhoneGap plugins for mobile application projects">PhoneGap plugins for mobile application projects</a></li>
<li><a href="https://www.htmlcenter.com/blog/developing-phonegap-mobile-project-from-start-to-finish/" rel="bookmark" title="Developing PhoneGap mobile project. From start to finish">Developing PhoneGap mobile project. From start to finish</a></li>
<li><a href="https://www.htmlcenter.com/blog/framework7-and-parse-for-user-login/" rel="bookmark" title="Framework7 and Parse for User login">Framework7 and Parse for User login</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/how-framework7-and-phonegap-fit-together/feed/</wfw:commentRss>
			<slash:comments>4</slash:comments>
		
		
			</item>
		<item>
		<title>Ultimate Collection of Resources for Developers Starting With Bootstrap</title>
		<link>https://www.htmlcenter.com/blog/ultimate-collection-of-resources-for-developers-starting-with-bootstrap/</link>
					<comments>https://www.htmlcenter.com/blog/ultimate-collection-of-resources-for-developers-starting-with-bootstrap/#comments</comments>
		
		<dc:creator><![CDATA[Karol]]></dc:creator>
		<pubDate>Wed, 22 Apr 2015 12:57:50 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Bootstrap]]></category>
		<category><![CDATA[HTML5]]></category>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=4117</guid>

					<description><![CDATA[<p>A couple of weeks ago, we published a general overview of Bootstrap and its pros and cons. Basically, the goal was to help you decide whether or not Bootstrap is a platform worth using for your next web development project. Feel free to check that post right now if you haven&#8217;t already (link). Some of [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/ultimate-collection-of-resources-for-developers-starting-with-bootstrap/">Ultimate Collection of Resources for Developers Starting With Bootstrap</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/how-to-customize-bootstrap-the-resources-you-are-looking-for/" rel="bookmark" title="How to Customize Bootstrap &#8211; The Resources You Are Looking For">How to Customize Bootstrap &#8211; The Resources You Are Looking For</a></li>
<li><a href="https://www.htmlcenter.com/blog/the-bootstrap-framework-controversy-should-you-use-it-or-not/" rel="bookmark" title="The Bootstrap Framework Controversy &#8230; Should You Use It or Not?">The Bootstrap Framework Controversy &#8230; Should You Use It or Not?</a></li>
<li><a href="https://www.htmlcenter.com/blog/hello-bootstrap-responsive-design/" rel="bookmark" title="Hello with Bootstrap and Responsive design">Hello with Bootstrap and Responsive design</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p>A couple of weeks ago, we published a general overview of Bootstrap and its pros and cons. Basically, the goal was to help you decide whether or not Bootstrap is a platform worth using for your next web development project.</p>
<p><em>Feel free to check that post right now if you haven&#8217;t already (<a title="The Bootstrap Framework Controversy … Should You Use It or Not?" href="http://www.htmlcenter.com/blog/the-bootstrap-framework-controversy-should-you-use-it-or-not/" target="_blank">link</a>).</em></p>
<p>Some of you have expressed really strong opinions in the comments section under that post, which only proves that Bootstrap framework remains to be one of the hot topics in the web development world today. So as a follow-up, this time we&#8217;re taking a look at some of the most useful Bootstrap developer resources from around the web.</p>
<p>This list goes through various types of information, tutorials, and tools related to Bootstrap framework. I&#8217;ve divided it into a handful of categories just to make everything a bit easier to grasp and allow you to skip things you&#8217;re not interested in.</p>
<p><span id="more-4117"></span></p>
<p>Starting with:</p>
<h3>Official documentation</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4148" src="http://www.htmlcenter.com/wp-content/uploads/2015/04/htmlcenter-bootstrap-documentation.jpg" alt="htmlcenter bootstrap documentation" width="500" height="323" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/04/htmlcenter-bootstrap-documentation.jpg 500w, https://www.htmlcenter.com/wp-content/uploads/2015/04/htmlcenter-bootstrap-documentation-300x193.jpg 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></p>
<p><a href="http://getbootstrap.com/getting-started/">Getting started with Bootstrap</a>. This is the first place you go for everything Bootstrap-related. While the official docs are not always written in the most beginner-friendly form, they surely are the most up-to-date, and they provide you with everything needed to make Bootstrap work. Make sure to look into:</p>
<ul>
<li><a href="http://getbootstrap.com/css/">CSS in Bootstrap</a>. A breakdown of everything that the Bootstrap stylesheet has to offer (an explanation of every class) and how to work with it effectively.</li>
<li><a href="http://getbootstrap.com/components/">Components in Bootstrap</a>. A handy cheat-sheet listing every element that the default installation of Bootstrap comes with. Including glyphicons, drop-downs, buttons, input fields, navbars, labels, and much more.</li>
<li><a href="http://getbootstrap.com/javascript/">JavaScript in Bootstrap</a>. A description of the JS libraries and classes delivered with Bootstrap, plus how to use them to bring Bootstrap&#8217;s components to life.</li>
</ul>
<p><a href="http://getbootstrap.com/customize/">Customizable download package</a>. A truly great section on the official site, rarely seen with other systems and frameworks. Here, you can customize your version of Bootstrap by enabling or disabling certain modules. You can even adjust things like the default typography settings, colors, margins, and much more. In short, customizing your version of Bootstrap prior to downloading and installing it is a much faster alternative to doing it afterward (on a live site).</p>
<p><a href="https://github.com/twbs/bootstrap-sass">Bootstrap SASS</a>. It&#8217;s where you can download a version of Bootstrap ported to SASS.</p>
<h3>Bootstrap step-by-step tutorials</h3>
<p><a href="http://www.sitepoint.com/understanding-twitter-bootstrap-3/">Understanding Twitter Bootstrap 3</a>. Brief tutorial by SitePoint.com taking you all the way from scratch to an operational Bootstrap website. It&#8217;s the shortest tutorial on this list as it&#8217;s presented in a single blog post. Skips a couple of steps, but still gives you a great overview on how to work with the platform.</p>
<p><a href="http://www.tutorialrepublic.com/twitter-bootstrap-tutorial/">Bootstrap Tutorial</a> by Tutorial Republic. This tutorial is divided into two main parts &#8211; <em>basic</em>, and <em>advanced</em>. Each part features a number of lessons on individual aspects of Bootstrap. In them, you will learn things such as working with the grid, making sure that the result of your work is responsive, creating tables, lists, forms, and working with everything else on your way to Bootstrap mastery. That being said, the focus here is more on the individual elements of Bootstrap rather than teaching you how to build a complete site from start to finish.</p>
<p><a href="http://www.w3schools.com/bootstrap/default.asp">Bootstrap 3 Tutorial</a> by W3Schools. You can find a lot of great stuff at w3schools.com, so it&#8217;s no surprise that they have a whole section dedicated to Bootstrap as well. With this tutorial, you will learn how to work with Bootstrap both in terms of the general website structure, as well as its individual elements. There are 19 chapters as part of the tutorial, and each one comes with written descriptions and source code demos that you can test through an operational dev environment.</p>
<h3>Online courses</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4149" src="http://www.htmlcenter.com/wp-content/uploads/2015/04/htmlcenter-bootstrap-online-tutorials.jpg" alt="htmlcenter bootstrap online tutorials" width="500" height="347" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/04/htmlcenter-bootstrap-online-tutorials.jpg 500w, https://www.htmlcenter.com/wp-content/uploads/2015/04/htmlcenter-bootstrap-online-tutorials-300x208.jpg 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></p>
<p><a href="http://www.codecademy.com/courses/web-beginner-en-yjvdd/0/1">Make a Website: Bootstrap</a>. Great free course at CodeCademy.com that takes you by hand through the process of re-building Airbnb&#8217;s homepage with Bootstrap. The course uses a custom three-column interface that presents the current instructions (1st column), the source code editor (2nd column), and the preview section (3rd column). The whole process is nicely guided, so you can easily understand what&#8217;s going on under the hood.</p>
<p><a href="https://www.udemy.com/code-responsive-website-twitter-bootstrap/">Code a Responsive Website with Bootstrap</a>. This is a Udemy course priced at €89 ($95). Out of all Udemy courses on Bootstrap, this one seems the most professional and with the videos having the highest production value. Apart from that, it&#8217;s been taken by nearly 2,500 students and has the overall rating of 4.7 based on 104 reviews. The course goes through the steps of hand-coding a responsive site using Bootstrap, and it consists of 28 lectures that add up to a total of four hours of video tutorials.</p>
<p><a href="https://www.codeschool.com/courses/blasting-off-with-bootstrap">Blasting Off with Bootstrap</a>. A course that&#8217;s part of the &#8220;HTML/CSS Path&#8221; at CodeSchool.com. The first module of the course is free and the rest can be accessed by buying the $29 / month membership (which gives you unlimited access to all courses at CodeSchool.com, by the way). The course is well-structured and it takes you all the way from basic understanding of how Bootstrap works to working with grids, to adjusting typography, to adding a bit of flare to your creations, to adding extra JavaScript components.</p>
<h3>Individual elements of Bootstrap explained</h3>
<p>First, let&#8217;s take a look at what W3Schools has to offer in this department:</p>
<ul>
<li><a href="http://www.w3schools.com/bootstrap/bootstrap_grid_system.asp">Grids in Bootstrap</a>. Bootstrap&#8217;s grid system explained (along with examples and code demos).</li>
<li>Basic CSS classes explained: <a href="http://www.w3schools.com/bootstrap/bootstrap_ref_css_text.asp">typography</a>, <a href="http://www.w3schools.com/bootstrap/bootstrap_ref_css_buttons.asp">buttons</a>, <a href="http://www.w3schools.com/bootstrap/bootstrap_ref_css_forms.asp">forms and form elements</a>, <a href="http://www.w3schools.com/bootstrap/bootstrap_ref_css_helpers.asp">helper classes</a>, <a href="http://www.w3schools.com/bootstrap/bootstrap_ref_css_images.asp">images</a>, <a href="http://www.w3schools.com/bootstrap/bootstrap_ref_css_tables.asp">tables</a>.</li>
<li>Individual components explained: <a href="http://www.w3schools.com/bootstrap/bootstrap_ref_comp_glyphs.asp">glyphicons</a>, <a href="http://www.w3schools.com/bootstrap/bootstrap_ref_comp_dropdowns.asp">drop-downs</a>, <a href="http://www.w3schools.com/bootstrap/bootstrap_ref_comp_navs.asp">navs</a>.</li>
</ul>
<p><a href="http://www.sitepoint.com/understanding-bootstrap-grid-system/">Understanding Bootstrap&#8217;s Grid System</a>. An in-depth breakdown of what Bootstrap&#8217;s grid system is and how to work with it.</p>
<h3>Bootstrap and WordPress</h3>
<p><a href="https://wordpress.org/themes/bootstrap-basic/">Bootstrap Basic</a>. A simple WordPress theme for developers to build their own creations on top of. You can treat it as a starter theme, or just as a point of reference when you get stuck working on a custom build.</p>
<p><a href="http://bootstrapwp.com/">BootstrapWP</a>. A detailed online course teaching how to build a complete WordPress theme with Bootstrap. It covers not only the basic steps required in order to build a theme, but also how to create custom post types, a theme options panel, and even updating your theme later down the road when new versions of the framework come out.</p>
<p><a href="https://www.udemy.com/bootstrap-wordpress/">Bootstrap 3! Create a Responsive WordPress Theme Now!</a> Another Udemy course (€87, ~$93). This one focuses exclusively on building your first WordPress theme on Bootstrap. There&#8217;s three hours of video content across 35 lectures. Everything is divided into a handful of sections that transition nicely from one to another. The course has the average rating of 4.9 (25 reviews) and it&#8217;s been taken by nearly 4,000 students.</p>
<h3>Free Bootstrap themes</h3>
<p><a href="http://startbootstrap.com/">Start Bootstrap</a>. A collection of Bootstrap themes and templates. There&#8217;s a lot of free and open source themes here, as well as some great premium products.</p>
<p><a href="http://www.bootstrapzero.com/">Bootstrap Zero</a>. Said to be the largest open-source, free Bootstrap template collection. What&#8217;s great here is that apart from standard website templates, you&#8217;ll also find templates for dashboards, admin interfaces, and more.</p>
<h3>Other Bootstrap tools and resources</h3>
<p><a href="http://shoelace.io/">Shoelace</a>. A visual grid builder for Bootstrap. This nice drag-and-drop interface lets you construct a grid structure in no time. Then you can export the result of your work as HTML. Saves a lot of time during development.</p>
<p><a href="http://bootsnipp.com/buttons">Button builder</a>. Very small yet handy button generator for Bootstrap. Just a couple of clicks and you have yourself a good-looking button.</p>
<p><a href="https://jetstrap.com/">Jetstrap</a>. A drag-and-drop Bootstrap site builder. It provides a faster alternative to building a Bootstrap site by hand with source code. The plans start at $16 per month.</p>
<p><a href="http://bootsnipp.com/resources">Resources at Bootsnipp</a>. A massive roundup of various Bootstrap resources. Some of the things you&#8217;ll find inside: icon fonts, JavaScript extensions, forms, templates, prototyping tools, development resources, extensions, UI elements, and more.</p>
<p><em>There you have it, more than 32 Bootstrap resources for you to devour! Feel free to comment and let us know if there&#8217;s anything else that should be listed here. We&#8217;d be happy to update this post with your input.</em></p>
<p>The post <a href="https://www.htmlcenter.com/blog/ultimate-collection-of-resources-for-developers-starting-with-bootstrap/">Ultimate Collection of Resources for Developers Starting With Bootstrap</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/how-to-customize-bootstrap-the-resources-you-are-looking-for/" rel="bookmark" title="How to Customize Bootstrap &#8211; The Resources You Are Looking For">How to Customize Bootstrap &#8211; The Resources You Are Looking For</a></li>
<li><a href="https://www.htmlcenter.com/blog/the-bootstrap-framework-controversy-should-you-use-it-or-not/" rel="bookmark" title="The Bootstrap Framework Controversy &#8230; Should You Use It or Not?">The Bootstrap Framework Controversy &#8230; Should You Use It or Not?</a></li>
<li><a href="https://www.htmlcenter.com/blog/hello-bootstrap-responsive-design/" rel="bookmark" title="Hello with Bootstrap and Responsive design">Hello with Bootstrap and Responsive design</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/ultimate-collection-of-resources-for-developers-starting-with-bootstrap/feed/</wfw:commentRss>
			<slash:comments>9</slash:comments>
		
		
			</item>
		<item>
		<title>Building Angular.js Starter application</title>
		<link>https://www.htmlcenter.com/blog/building-angular-js-starter-application/</link>
					<comments>https://www.htmlcenter.com/blog/building-angular-js-starter-application/#respond</comments>
		
		<dc:creator><![CDATA[ProDeveloper]]></dc:creator>
		<pubDate>Thu, 16 Apr 2015 13:18:20 +0000</pubDate>
				<category><![CDATA[Angular.js]]></category>
		<category><![CDATA[HTML5]]></category>
		<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[angularjs]]></category>
		<category><![CDATA[html5]]></category>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=4093</guid>

					<description><![CDATA[<p>We have recently created example Angular.js web app with the minimal generic functionality. Small enough to be called framework but with built-in test cases, controllers and several views with user forms. The goal is to have a reusable foundation for Angular projects. This blog post is about how we designed Angular Starter structure. Part two [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/building-angular-js-starter-application/">Building Angular.js Starter application</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/how-angularjs-communicates-with-web-services/" rel="bookmark" title="How AngularJS communicates with web services">How AngularJS communicates with web services</a></li>
<li><a href="https://www.htmlcenter.com/blog/building-angularjs-based-native-mobile-application-part-2/" rel="bookmark" title="Building AngularJS based native mobile application. Part 2">Building AngularJS based native mobile application. Part 2</a></li>
<li><a href="https://www.htmlcenter.com/blog/what-is-2-way-binding-in-angular-js/" rel="bookmark" title="What is 2 way binding in Angular.js">What is 2 way binding in Angular.js</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><em>We have recently created <a title="HTMLCenter Angular Starter app" href="https://github.com/PopularOwl/angular-starter">example Angular.js web app</a> with the minimal generic functionality. Small enough to be called framework but with built-in test cases, controllers and several views with user forms. The goal is to have a reusable foundation for Angular projects. This blog post is about how we designed Angular Starter structure. Part two of this posts is about <a title="Consuming APIs with AngularJS" href="http://www.htmlcenter.com/blog/how-angularjs-communicates-with-web-services/" target="_blank">consuming APIs with AngularJS</a>.</em></p>
<h3>Why Angular Starter</h3>
<p>There are many tutorials on how to start application development with Angular.js. As well as a good few projects on GitHub with the Angular app skeletons. Like the <a title="Angular seed project" href="https://github.com/angular/angular-seed">angular-seed project</a> created by Angular.js development team itself.</p>
<p>What we needed was a minimal project, with pre-built basic functionality and structure of communication with web services and APIs. And of course automated test cases.</p>
<p>We wanted test cases to get some special attention as we are big fans of TDD (test-driven development). Having the majority of test cases created even before any app functionality is coded is a good help to keep those bugs away.</p>
<p>I haven&#8217;t found the open source project which completely match my requirements and Angular Starter was born. It&#8217;s an open source project, <a title="Angular.js Starter application" href="https://github.com/PopularOwl/angular-starter">hosted on GitHub</a> and I welcome all suggestions and comments.</p>
<p>What exactly is its structure and how it can help to start your <a title="Building AngularJS Application" href="http://www.htmlcenter.com/blog/how-to-build-angularjs-based-native-mobile-application/" target="_blank">Angular apps</a>?</p>
<p><span id="more-4093"></span></p>
<h3>Angular Starter structure</h3>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4134" src="http://www.htmlcenter.com/wp-content/uploads/2015/04/Angular-Starter-example-Angular-application.png" alt="Angular Starter example Angular application" width="300" height="411" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/04/Angular-Starter-example-Angular-application.png 300w, https://www.htmlcenter.com/wp-content/uploads/2015/04/Angular-Starter-example-Angular-application-218x300.png 218w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>In the above print screen, you can see the initial structure of Angular Starter project. On the top level, we have <code>app</code> and <code>tests</code> directories plus all the project configuration files for Bower, Karma, Node (we will come to all these later in the post).</p>
<p>The <code>app</code> directory has <code>components</code> and <code>resource</code> subdirectories. Components hold all application related components like views and controllers.</p>
<p>Resources directory is for resources like JavaScript, CSS and all 3rd party components managed by Bower package manager. I have named directory <code>bower</code> to make it clear this is where Bower downloads all the external libraries our project depends on.</p>
<p>And that&#8217;s all the directories in the Angular Starter we app.</p>
<h3>Angular Starter configuration files</h3>
<p>At the project top level, we have several configuration files. Some of them I have already mentioned in the section above. Let&#8217;s go through them one by one. <code>.bowerrc</code> is a configuration file instructing Bower package manager how to behave. If you are not familiar with <a title="Bower package manager" href="http://bower.io/">Bower</a><br />
&#8211; its great package manager for external libraries and frameworks. It&#8217;s mostly used to manage front end framework dependencies. That&#8217;s how it&#8217;s being used in Angular Starter project as well.</p>
<p>Configuration file <code>.bowerrc</code> has simple instructions telling Bower to save all packages it downloads to specific directory in this project</p>
<pre class="prettyprint">{
  "directory": "app/resources/bower"
}
</pre>
<p>Another configuration file for Bower is <code>.bower.json</code> &#8211; it specifies what do we want Bower to download and manage for us.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4136" src="http://www.htmlcenter.com/wp-content/uploads/2015/04/Karma-spectacular-test-runner-for-Angular.png" alt="Karma spectacular test runner for Angular" width="400" height="221" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/04/Karma-spectacular-test-runner-for-Angular.png 400w, https://www.htmlcenter.com/wp-content/uploads/2015/04/Karma-spectacular-test-runner-for-Angular-300x165.png 300w" sizes="auto, (max-width: 400px) 100vw, 400px" /></p>
<p><a title="Karma test runner" href="http://karma-runner.github.io">Karma</a> is a spectacular test runner for JavaScript. This is how its creators define this project.</p>
<p>It is very handy test runner and works well with Angular.js apps (maybe because it&#8217;s created by Angular.js dev team folks?). Karma starts the real web browser, loads all the specified files into this browser and runs the unit tests.</p>
<p>We are using Karma to run <a title="Jasmine BDD testing framework" href="http://jasmine.github.io/">Jasmine</a> test cases for us. <code>karma.conf.js</code> is the configuration file telling Karma test runner what to do. It&#8217;s quite self-explanatory</p>
<pre class="prettyprint">module.exports = function(config){
  config.set({

    basePath : './',

    files : [
      'app/resources/bower/angular/angular.js',
      'app/resources/bower/angular-mocks/angular-mocks.js',
      'app/resources/bower/angular-route/angular-route.js',
      'app/app.js',
      'app/components/home/*.js',
      'app/resources/js/*.js',
      'tests/*_test.js'
    ],

    autoWatch : true,
    frameworks: ['jasmine'],
    browsers : ['Chrome'],

    plugins : [
      'karma-chrome-launcher',
      'karma-jasmine',
      'karma-junit-reporter'
    ],

    junitReporter : {
      outputFile: 'tests/junit-reporter-log.xml',
      suite: 'unit'
    }

  });
};
</pre>
<p>Karma is instructed to load all necessary files, use Chrome browser for testing, and create test reports after all tests are performed. <code>autoWatch</code> tells Karma to keep watching for file changes and re-run all tests after developer saves the new code.</p>
<p>And the last configuration file is <code>package.json</code> with the instructions to Node to prepare and manage Angular Starter project for us.</p>
<p>Even though actual Angular Starter web app does not depend on Node.js being installed we use npm (Node package manager tool) to manage builds and testing for us. It also installs and manages required backend components (in the similar manner as Bower does for front-end components). We have set npm to also run project tasks for us.</p>
<p><code>npm start</code> will launch simple HTTP server in Angular.js project directory and <code>npm test</code> will run all Jasmine unit tests with the help of Karma.</p>
<h3>Angular Starter Components</h3>
<p>An App components directory has both views and controllers which are being used in Angular Starter project. We decided to keep views and controllers separate in order for better maintainability if your <a title="2 way binding in Angular.js apps" href="http://www.htmlcenter.com/blog/what-is-2-way-binding-in-angular-js/" target="_blank">Angular.js app</a> project grows more complex.</p>
<p>The naming convention is important here and all controller file names should match the view name they are using. For example, A<code>boutController.js</code> should match <code>aboutView.html</code></p>
<h3>Application Tests</h3>
<p><code>tests</code> directory is where we keep all Angular Starter project unit tests. They have the suffix <code>_test.js</code> and that&#8217;s what Karma understands and runs. You will find that naming convention in the project is to use controller name as part of the test file name and keep test files separated for each controller. This again gives us better maintainability.</p>
<p>After tests are run with npm tests here is the output you&#8217;ll get. Notice how fast Karma runner is &#8211; all 12 tests are finished in 0.46 seconds.</p>
<pre class="prettyprint">INFO [karma]: Karma v0.10.10 server started at http://localhost:9876/
INFO [launcher]: Starting browser Chrome
INFO [Chrome 41.0.2272 (Mac OS X 10.8.5)]: Connected on socket K8zKwK8wbP1-5_mWbc9q
Chrome 41.0.2272 (Mac OS X 10.8.5): Executed 12 of 12 SUCCESS (0.466 secs / 0.03 secs)
</pre>
<p>If you keep this terminal window open, all your files included in Karma config will be monitored for changes and once any changes are detected all the test cases will be re-run.</p>
<h3>Conclusion</h3>
<p>This post summarises the structure and configuration of Angular Starter open source project. In the follow-up article on HTMLCenter, I&#8217;m going to introduce you to some of the basic functionality you can find in Angular Starter, like communication to web services via Rest API&#8217;s.</p>
<p>Follow our blog or even better, subscribe to <a title="HTMLCenter Newsletter" href="http://eepurl.com/be0fb1">HTMLCenter Newsletter</a> and we will deliver you a notification once 2nd part of this article is up.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4138" src="http://www.htmlcenter.com/wp-content/uploads/2015/04/HTMLCenter-Angular-Starter-on-GitHub.png" alt="HTMLCenter Angular Starter on GitHub" width="500" height="294" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/04/HTMLCenter-Angular-Starter-on-GitHub.png 500w, https://www.htmlcenter.com/wp-content/uploads/2015/04/HTMLCenter-Angular-Starter-on-GitHub-300x176.png 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></p>
<p>Angular Starter source code <a title="Angular Starter source" href="https://github.com/PopularOwl/angular-starter">can be found on GitHub</a>.</p>
<p>All the feedback and improvement suggestions are very welcome. Use the comment section below or create the <a title="Angular Starter project improvements" href="https://github.com/PopularOwl/angular-starter/issues">issue on the GitHub project page</a>. Thanks!</p>
<p>The post <a href="https://www.htmlcenter.com/blog/building-angular-js-starter-application/">Building Angular.js Starter application</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/how-angularjs-communicates-with-web-services/" rel="bookmark" title="How AngularJS communicates with web services">How AngularJS communicates with web services</a></li>
<li><a href="https://www.htmlcenter.com/blog/building-angularjs-based-native-mobile-application-part-2/" rel="bookmark" title="Building AngularJS based native mobile application. Part 2">Building AngularJS based native mobile application. Part 2</a></li>
<li><a href="https://www.htmlcenter.com/blog/what-is-2-way-binding-in-angular-js/" rel="bookmark" title="What is 2 way binding in Angular.js">What is 2 way binding in Angular.js</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/building-angular-js-starter-application/feed/</wfw:commentRss>
			<slash:comments>0</slash:comments>
		
		
			</item>
		<item>
		<title>Framework7 and Parse for User login</title>
		<link>https://www.htmlcenter.com/blog/framework7-and-parse-for-user-login/</link>
					<comments>https://www.htmlcenter.com/blog/framework7-and-parse-for-user-login/#comments</comments>
		
		<dc:creator><![CDATA[ProDeveloper]]></dc:creator>
		<pubDate>Thu, 09 Apr 2015 12:50:10 +0000</pubDate>
				<category><![CDATA[Blog]]></category>
		<category><![CDATA[Mobile Tutorials]]></category>
		<category><![CDATA[Web Tutorials]]></category>
		<category><![CDATA[html5]]></category>
		<category><![CDATA[mobile tutorials]]></category>
		<category><![CDATA[parse]]></category>
		<guid isPermaLink="false">http://www.htmlcenter.com/?p=3917</guid>

					<description><![CDATA[<p>This is the second tutorial about building Framework7 HTML5 mobile web application. In the first tutorial part we have prepared the base by creating 3 mobile application views. One of them was the app user login view. In this tutorial part, we will make user registration and login functionality live by enabling login view communication with Parse -cloud-based backend service. The final third part is [&#8230;]</p>
<p>The post <a href="https://www.htmlcenter.com/blog/framework7-and-parse-for-user-login/">Framework7 and Parse for User login</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->

Related posts:<ol>
<li><a href="https://www.htmlcenter.com/blog/how-framework7-and-phonegap-fit-together/" rel="bookmark" title="How Framework7 and PhoneGap fit together">How Framework7 and PhoneGap fit together</a></li>
<li><a href="https://www.htmlcenter.com/blog/html5-frameworks-for-mobile-web-applications/" rel="bookmark" title="HTML5 frameworks for mobile web applications">HTML5 frameworks for mobile web applications</a></li>
<li><a href="https://www.htmlcenter.com/blog/phonegap-plugins-mobile-application-projects/" rel="bookmark" title="PhoneGap plugins for mobile application projects">PhoneGap plugins for mobile application projects</a></li>
</ol>
</div>
]]></description>
										<content:encoded><![CDATA[<p><em>This is the second tutorial about building Framework7 HTML5 mobile web application. </em><em>In the <a title="HTML5 and Framework7 first part" href="http://www.htmlcenter.com/blog/html5-frameworks-for-mobile-web-applications/" target="_blank">first tutorial part</a> we have prepared the base by creating 3 mobile application views. One of them was the app user login view. In this tutorial part, we will make user registration and login functionality live by enabling login view communication with Parse -cloud-based backend service. <em>The final <a title="Framework7 and PgoneGap" href="http://www.htmlcenter.com/blog/how-framework7-and-phonegap-fit-together/" target="_blank">third part</a> is about wrapping Framework7 application into PgoneGap.</em></em></p>
<h3>Creating Parse User Database</h3>
<p>Nowadays you have many options once it comes to cloud-based storage options for mobile web apps. We did a good <a title="HTML BaaS" href="http://www.htmlcenter.com/blog/what-baas-for-html5-application/" target="_blank">summary on HTMLCenter</a> a few posts ago.</p>
<p>For todays tutorial, we are using <a title="Parse login" href="https://parse.com/products" target="_blank">Parse service</a>. Parse at the time or writing supports 3 main functions &#8211; Core for data storage and user management, Push for push notifications and Analytics for logging different app events. They have free tier available for starting apps &#8211; it allows for up to 30 requests per second throughput and has 2TB data transfer limit per month. I&#8217;m sure we will not need this capacity in our tutorial!</p>
<p>Go ahead and create a free account on Parse. After you signup / login you can create new applications. I created one called framework7test dedicated for this tutorial. You can see it below.</p>
<p><span id="more-3917"></span></p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4026" src="http://www.htmlcenter.com/wp-content/uploads/2015/03/Parse-mobile-applications-backend-service.jpg" alt="Parse mobile applications backend service" width="500" height="389" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/03/Parse-mobile-applications-backend-service.jpg 500w, https://www.htmlcenter.com/wp-content/uploads/2015/03/Parse-mobile-applications-backend-service-300x233.jpg 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /></p>
<p>What I specifically like about Parse &#8211; it has great user management functionality in built and available out of the box. Client applications can register new users and then log them in with only 2 API requests.<br />
First we are going to register new user. Parse is asking client applications to send Application Id and API key in the HTTP headers. This information you can retrieve from <a title="Parse documentation" href="https://parse.com/docs/rest#users-signup">Parse API reference documentation page</a>. It should have your credential details pre filled in example requests.</p>
<p>Username has to be unique in the User database and Parse has inbuilt validation for this (try to create another user with the same name and you will get &#8220;username already taken&#8221; error.</p>
<pre class="prettyprint">curl -X POST \
 -H "X-Parse-Application-Id: xxx" \
 -H "X-Parse-REST-API-Key: yyy" \
 -H "Content-Type: application/json" \
 -d '{"username":"htmlcenter","password":"superpassword","moreinfo":"its a great blog"}' https://api.parse.com/1/users</pre>
<p>After our new user is successfully created some time latter our mobile application can make another request with user login data in order to login. Parse will handle username / password validation steps and will issue session token with user details if login was successful. In case login data is incorrect your application will receive appropriate response from Parse service.</p>
<pre class="prettyprint">curl -X GET \
 -H "X-Parse-Application-Id: xxx" \
 -H "X-Parse-REST-API-Key: yyy" \
 -G \
 --data-urlencode 'username=htmlcenter' \
 --data-urlencode 'password=superpassword' https://api.parse.com/1/login</pre>
<p>As you can see all user management functionality is already provided for our mobile application by Parse without us doing much work. We do not have to store any user related data in mobile web app (not recommended for security reasons). Our client application will only have registration and login forms for app user to submit data. Here is how registered user data looks in Parse cloud service &#8211; via web UI.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4034" src="http://www.htmlcenter.com/wp-content/uploads/2015/03/HTMLCenter-user-data-in-Parse.jpg" alt="HTMLCenter user data in Parse" width="500" height="184" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/03/HTMLCenter-user-data-in-Parse.jpg 500w, https://www.htmlcenter.com/wp-content/uploads/2015/03/HTMLCenter-user-data-in-Parse-300x110.jpg 300w" sizes="auto, (max-width: 500px) 100vw, 500px" /><br />
Next step is to enable login and registration views.</p>
<h3>Framework7 Http Requests</h3>
<p>Framework7 doesn&#8217;t use any external 3rd party libraries. In their applications developers can use jQuery like syntax for accessing DOM and jQuery Ajax syntax to send / receive requests via HTTP.</p>
<p>In this tutorial part we continue using source code from where we left it the <a title="Framework7 application source code" href="http://www.htmlcenter.com/blog/html5-frameworks-for-mobile-web-applications/" target="_blank">previous tutorial part</a>. I have added another page called <code>register</code> by simply copying login page HTML code and renaming <code>data-page</code> attribute. This page has 3 fields we are going to be sending to Parse: <code>username</code>, <code>password</code> and <code>email</code>. In order to login, user will need only username and password but our application could retrieve users email anytime by requesting information from Parse.</p>
<p>We first have to create the method for Send button that once its clicked by application user our app sends HTTP request with registration data to Parse service. This is done in <code>my-app.js</code> JavaScript file:</p>
<pre class="prettyprint">// Function to handle Submit button on Register page
$$('#submmit-register').on('click', function () {
 
 var username = $$('#register-username').val();
 var email = $$('#register-email').val();
 var password = $$('#register-password').val();
 
 if (!username || !password || !email){
  myApp.alert('Please fill in all Registration form fields');
  return;
 }

 ...

});</pre>
<p>This above peace of code captures values from registration form and assigns them to variables to be used in the HTTP request. Code also checks for these fields not to be empty and displays simple alert message if any one of them is missing data. Note the <code>myApp.alert</code> in the code &#8211;  it will display nice iOS7 like popup message.</p>
<p><img loading="lazy" decoding="async" class="aligncenter wp-image-4042 size-full" src="http://www.htmlcenter.com/wp-content/uploads/2015/03/Framework7-registration-form.jpg" alt="Framework7 registration form" width="300" height="448" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/03/Framework7-registration-form.jpg 300w, https://www.htmlcenter.com/wp-content/uploads/2015/03/Framework7-registration-form-200x300.jpg 200w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>Next block of code uses the <code>username</code>, <code>email</code> and <code>password</code> values we have captured and sends HTTP POST request to Parse backend in order to create new user. Request format is the same as curl one we have discussed before just has to be adjusted to jQuery Ajax like syntax</p>
<pre class="prettyprint">var query = 'https://api.parse.com/1/users';
var postdata = {};

postdata.username = username;
postdata.password = password;
postdata.email = email;
myApp.showIndicator();
$$.ajax({
 url: query,
 headers: {"X-Parse-Application-Id":applicationId,"X-Parse-REST-API-Key":restApiKey},
 type: "POST",
 contentType: "application/json",
 data: JSON.stringify(postdata),
 statusCode: {
  201: success201,
  400: notsuccess,
  500: notsuccess
 }
});</pre>
<p>As you can see, we are setting query url, JSON object to be posted to Parse and initialising Framework7 spinner before making Ajax request.</p>
<p>I have externalised the deader values in the beginning of <code>my-app.js</code> JavaScript file so they can be used across multiple Ajax requests. We set HTTP request type to POST and add handle methods for HTTP response status codes. In our case HTTP 201 means successfully created user and any other HTTP code means request did not succeed.</p>
<p>Whats left is to add the methods to handle success and failed Parse responses:</p>
<pre class="prettyprint">var success201 = function(data, textStatus, jqXHR) {
 // We have received response and can hide activity indicator
 myApp.hideIndicator();
 // Will pass context with retrieved user name
 // to welcome page. Redirect to welcome page
 mainView.router.load({
 template: Template7.templates.welcomeTemplate,
  context: {
   name: username
  }
 });
};

var notsuccess = function(data, textStatus, jqXHR) {
 // We have received response and can hide activity indicator
 myApp.hideIndicator();
 myApp.alert('Login was unsuccessful, please try again');
};
</pre>
<p>In both cases we are dismissing spinner. In case user registration was successful we are loading up welcome page from Framework7 template. If registration for some reason was not successful, we are going display already familiar Framework7 popup message about unsuccessful registration.</p>
<p>Worth to mention that it would be possible to verify more details about why the registration request has failed as Parse actually sends informative response message. But we are going to do it in 3rd tutorial part.</p>
<p><img loading="lazy" decoding="async" class="aligncenter size-full wp-image-4050" src="http://www.htmlcenter.com/wp-content/uploads/2015/03/Framework7-login-application.jpg" alt="Framework7 login application" width="300" height="455" srcset="https://www.htmlcenter.com/wp-content/uploads/2015/03/Framework7-login-application.jpg 300w, https://www.htmlcenter.com/wp-content/uploads/2015/03/Framework7-login-application-197x300.jpg 197w" sizes="auto, (max-width: 300px) 100vw, 300px" /></p>
<p>The same approach I did for login page functionality. Only difference is the request is GET and we have no request body to send. As we are expecting HTTP 200 response as success response instead of using status codes to handle responses we can just use <code>success</code> / <code>error</code>:</p>
<pre class="prettyprint">$$.ajax({
   url: query,
   headers: {"X-Parse-Application-Id":applicationId,"X-Parse-REST-API-Key":restApiKey},
   type: "GET",
   // if successful response received (http 2xx)
   success: function(data, textStatus ){
 
     // We have received response and can hide activity indicator
     myApp.hideIndicator();
 
     data = JSON.parse(data);
     if (!data.username) {return}

     var username = data.username; 
 
    // Will pass context with retrieved user name 
    // to welcome page. Redirect to welcome page
    mainView.router.load({
     template: Template7.templates.welcomeTemplate,
     context: {
      name: username
     }
   });
  },
  error: function(xhr, textStatus, errorThrown){ 
    // We have received response and can hide activity indicator
    myApp.hideIndicator(); 
    myApp.alert('Login was unsuccessful, please verify username and password and try again');

    $$('#login-email').val('');
    $$('#login-password').val('');
  }
});</pre>
<h3>Conclusion</h3>
<p>Adding HTTP communication to Framework7 is not hard if you are familiar with jQuery type Ajax request syntax and JavaScript async nature of coding (all the callback fun). In this tutorial we have added such communication with Parse backend service for registering / user login. You can find all the related <a title="web app source code on GitHub" href="https://github.com/PopularOwl/framework7-parse" target="_blank">project source code on GitHub</a>.</p>
<p>In the final 3rd part of the tutorial we are going to wrap up this application to PhoneGap framework which will make it a native mobile app. Stay tuned for the last tutorial part.</p>
<p>The post <a href="https://www.htmlcenter.com/blog/framework7-and-parse-for-user-login/">Framework7 and Parse for User login</a> appeared first on <a href="https://www.htmlcenter.com">Htmlcenter Blog</a>.</p>
<div class='yarpp yarpp-related yarpp-related-rss yarpp-template-list'>
<!-- YARPP List -->
<p>Related posts:</p><ol>
<li><a href="https://www.htmlcenter.com/blog/how-framework7-and-phonegap-fit-together/" rel="bookmark" title="How Framework7 and PhoneGap fit together">How Framework7 and PhoneGap fit together</a></li>
<li><a href="https://www.htmlcenter.com/blog/html5-frameworks-for-mobile-web-applications/" rel="bookmark" title="HTML5 frameworks for mobile web applications">HTML5 frameworks for mobile web applications</a></li>
<li><a href="https://www.htmlcenter.com/blog/phonegap-plugins-mobile-application-projects/" rel="bookmark" title="PhoneGap plugins for mobile application projects">PhoneGap plugins for mobile application projects</a></li>
</ol>
</div>
]]></content:encoded>
					
					<wfw:commentRss>https://www.htmlcenter.com/blog/framework7-and-parse-for-user-login/feed/</wfw:commentRss>
			<slash:comments>21</slash:comments>
		
		
			</item>
	</channel>
</rss>
