cordova-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From dblot...@apache.org
Subject docs commit: Added instructions for adding tool/sample app. Made their displays more intelligent. Added www/static/img/sample-apps.
Date Tue, 25 Aug 2015 23:15:01 GMT
Repository: cordova-docs
Updated Branches:
  refs/heads/cordova-website cf1de6d79 -> 1b4fd64ab


Added instructions for adding tool/sample app. Made their displays more intelligent. Added
www/static/img/sample-apps.


Project: http://git-wip-us.apache.org/repos/asf/cordova-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/cordova-docs/commit/1b4fd64a
Tree: http://git-wip-us.apache.org/repos/asf/cordova-docs/tree/1b4fd64a
Diff: http://git-wip-us.apache.org/repos/asf/cordova-docs/diff/1b4fd64a

Branch: refs/heads/cordova-website
Commit: 1b4fd64abc3c1fee32abb4ff2642a7c2cb61c907
Parents: cf1de6d
Author: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Authored: Tue Aug 25 16:14:58 2015 -0700
Committer: Dmitry Blotsky <dmitry.blotsky@gmail.com>
Committed: Tue Aug 25 16:14:58 2015 -0700

----------------------------------------------------------------------
 README.md                              |  15 +++++++++++++++
 www/_includes/tools_and_samples.html   |  27 ++++++++++++++++++++++-----
 www/index.html                         |   3 ---
 www/static/img/sample-apps/cordova.png | Bin 0 -> 4111 bytes
 www/static/img/tools/cordova.png       | Bin 0 -> 4111 bytes
 www/static/img/tools/dat.png           | Bin 4111 -> 0 bytes
 www/static/img/tools/wat.png           | Bin 4111 -> 0 bytes
 7 files changed, 37 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/1b4fd64a/README.md
----------------------------------------------------------------------
diff --git a/README.md b/README.md
index f8d8f63..76667c7 100644
--- a/README.md
+++ b/README.md
@@ -104,6 +104,21 @@ Now, copy the `cordova-docs/build-prod/` directory to the corresponding
director
 
 Finally, go into the cordova-website directory and commit *all* the changes introduced the
newly copied files. The commit might take a while (upwards of 30min), depending on the number
of files copied.
 
+Adding a Tool or a Sample App
+=============================
+
+To add an item to the **Codorva Tools** or **Sample Cordova Apps** sections on the main page,
follow these steps:
+
+1. Change the section's YAML file:
+    - `www/_data/tools.yml` for Cordova Tools, or
+    - `www/_data/sample-apps.yml` for Sample Cordova Apps.
+1. Optionally add an image (the image must be **less than 256KiB** in size):
+    1. Place the image it in the `img` directory:
+        - `www/static/img/tools` for Cordova Tools, or
+        - `www/static/img/sample-apps` for Sample Cordova Apps.
+    1. Set the `image` field in the YAML file to be just the image file's *name*.
+1. Submit a GitHub pull request with the changes.
+
 Troubleshooting
 ===============
 

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/1b4fd64a/www/_includes/tools_and_samples.html
----------------------------------------------------------------------
diff --git a/www/_includes/tools_and_samples.html b/www/_includes/tools_and_samples.html
index c452810..e0d2b15 100644
--- a/www/_includes/tools_and_samples.html
+++ b/www/_includes/tools_and_samples.html
@@ -1,3 +1,4 @@
+{% if site.data.tools | size > 0 %}
 <div class="container">
     <div class="row showcase_section_intro">
         <div class="col-md-12 text-center">
@@ -6,14 +7,19 @@
             <p>Lorem ipsum dolor sit amet, consectetur adipiscing elit. Donec erat
sem, cursus quis nibh porta, scelerisque blandit lorem. Vivamus blandit nec odio non bibendum.
Morbi efficitur purus ut metus viverra sodales. In aliquet nunc sagittis, dignissim libero
ut, vulputate nisi. Phasellus vulputate fermentum libero, lorem hah.</p>
         </div>
     </div>
-    <!-- ROW 1 Starts -->
     <div class="row cordova_tools_gallery">
         {% for tool in site.data.tools %}
         <div class="col-lg-2 col-sm-4 card">
             <div class="card_inner">
                 <img src="{{ site.baseurl }}/static/img/tools/{{ tool.image }}" class="center-block"/>
                 <p class="card_title">
-                    {{ tool.name }}
+                    {% if tool.url %}
+                        <a href="{{ tool.url }}">
+                            {{ tool.name }}
+                        </a>
+                    {% else %}
+                        {{ tool.name }}
+                    {% endif %}
                 </p>
                 <p>
                     {{ tool.description | truncatewords:25 }}
@@ -29,8 +35,10 @@
             </div>
         </div>
     </div>
-</div><!-- /container -->
+</div>
+{% endif %}
 
+{% if site.data.sample-apps | size > 0 %}
 <div class="container">
     <div class="row showcase_section_intro">
         <div class="col-md-12 text-center">
@@ -43,13 +51,21 @@
         <div class="col-lg-2 col-sm-4 card">
             <div class="sample_app_thumb"></div>
             <div class="card_inner">
-                <p class="card_title">{{ app.name }}</p>
+                <p class="card_title">
+                    {% if app.url %}
+                        <a href="{{ app.url }}">
+                            {{ app.name }}
+                        </a>
+                    {% else %}
+                        {{ app.name }}
+                    {% endif %}
+                </p>
                 <p>{{ app.description | truncatewords:10 }}</p>
             </div>
         </div>
         {% endfor %}
     </div>
-    <div class="row"> <!-- Add yours or see more links -->
+    <div class="row">
         <div class="col-sm-12">
             <div class="pull-right add_seemore_links">
                 <a href="#">Add your app</a>
@@ -62,3 +78,4 @@
         </p>
     </div>
 </div>
+{% endif %}

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/1b4fd64a/www/index.html
----------------------------------------------------------------------
diff --git a/www/index.html b/www/index.html
index 34d0280..ab97ba6 100644
--- a/www/index.html
+++ b/www/index.html
@@ -195,10 +195,7 @@ permalink: /
         </div>
     </div>
 
-    <!--Remove these comment markers to include the Tools and Sample Apps sections. -->
-    {% comment %}
     {% include tools_and_samples.html %}
-    {% endcomment %}
 
 </div><!-- /container-fluid -->
 

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/1b4fd64a/www/static/img/sample-apps/cordova.png
----------------------------------------------------------------------
diff --git a/www/static/img/sample-apps/cordova.png b/www/static/img/sample-apps/cordova.png
new file mode 100644
index 0000000..8ad8bac
Binary files /dev/null and b/www/static/img/sample-apps/cordova.png differ

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/1b4fd64a/www/static/img/tools/cordova.png
----------------------------------------------------------------------
diff --git a/www/static/img/tools/cordova.png b/www/static/img/tools/cordova.png
new file mode 100644
index 0000000..8ad8bac
Binary files /dev/null and b/www/static/img/tools/cordova.png differ

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/1b4fd64a/www/static/img/tools/dat.png
----------------------------------------------------------------------
diff --git a/www/static/img/tools/dat.png b/www/static/img/tools/dat.png
deleted file mode 100644
index 8ad8bac..0000000
Binary files a/www/static/img/tools/dat.png and /dev/null differ

http://git-wip-us.apache.org/repos/asf/cordova-docs/blob/1b4fd64a/www/static/img/tools/wat.png
----------------------------------------------------------------------
diff --git a/www/static/img/tools/wat.png b/www/static/img/tools/wat.png
deleted file mode 100644
index 8ad8bac..0000000
Binary files a/www/static/img/tools/wat.png and /dev/null differ


---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@cordova.apache.org
For additional commands, e-mail: commits-help@cordova.apache.org


Mime
View raw message