Permalink
Browse files

Porting Subfolio Enhancers examples to the main repo.

  • Loading branch information...
nedbaldessin committed Sep 23, 2016
1 parent 45cc2f3 commit 2082e9a9c7424ca8f2045498e0f403e21f14d0a0
Showing with 327 additions and 2 deletions.
  1. +0 −1 .gitignore
  2. +0 −1 directory/.gitignore
  3. +3 −0 directory/examples/-b-footer.txt
  4. +7 −0 directory/examples/-hidden/-t-this_file_is_hidden.txt
  5. +8 −0 directory/examples/-t-introduction.txt
  6. +4 −0 directory/examples/00_thumbnails.info
  7. +5 −0 directory/examples/00_thumbnails/-t-readme.txt
  8. BIN directory/examples/00_thumbnails/-thumbnails/example.gif
  9. BIN directory/examples/00_thumbnails/-thumbnails/example.jpg
  10. BIN directory/examples/00_thumbnails/-thumbnails/example.png
  11. +18 −0 directory/examples/00_thumbnails/-thumbnails_custom/-t-readme.txt
  12. BIN directory/examples/00_thumbnails/example.gif
  13. BIN directory/examples/00_thumbnails/example.jpg
  14. BIN directory/examples/00_thumbnails/example.png
  15. BIN directory/examples/01_embedding_text_images/-b-bottom-image.png
  16. +8 −0 directory/examples/01_embedding_text_images/-b-bottom-text.txt
  17. BIN directory/examples/01_embedding_text_images/-hidden/-b-bottom-image.png
  18. BIN directory/examples/01_embedding_text_images/-hidden/-m-middle-image.png
  19. BIN directory/examples/01_embedding_text_images/-hidden/-t-top-image.png
  20. BIN directory/examples/01_embedding_text_images/-m-middle-image.png
  21. +8 −0 directory/examples/01_embedding_text_images/-m-middle_text.txt
  22. BIN directory/examples/01_embedding_text_images/-t-top-image.png
  23. +7 −0 directory/examples/01_embedding_text_images/-t-top-text.txt
  24. +1 −0 directory/examples/01_embedding_text_images/file-listing-placeholder-01.txt
  25. +1 −0 directory/examples/01_embedding_text_images/file-listing-placeholder-02.txt
  26. +1 −0 directory/examples/01_embedding_text_images/file-listing-placeholder-03.txt
  27. +5 −0 directory/examples/02_popups_links_shortcuts/-t-readme.txt
  28. +6 −0 directory/examples/02_popups_links_shortcuts/area17.com.link
  29. +8 −0 directory/examples/02_popups_links_shortcuts/giant_step_jukebox.pop
  30. +5 −0 directory/examples/02_popups_links_shortcuts/internal-shortcut.cut
  31. +5 −0 directory/examples/03_featuring_content/-t-readme.txt
  32. BIN directory/examples/03_featuring_content/-thumbnails-custom/file_thumbnail.png
  33. BIN directory/examples/03_featuring_content/-thumbnails-custom/folder_thumbnail.png
  34. BIN directory/examples/03_featuring_content/-thumbnails-custom/link_thumbnail.png
  35. +1 −0 directory/examples/03_featuring_content/featured-file.txt
  36. +27 −0 directory/examples/03_featuring_content/featured-link.ftr
  37. +27 −0 directory/examples/03_featuring_content/featured_file.ftr
  38. +27 −0 directory/examples/03_featuring_content/featured_folder.ftr
  39. +1 −0 directory/examples/03_featuring_content/featured_folder/-t-featured-folder.txt
  40. +5 −0 directory/examples/04_html_prototype/-t-readme.txt
  41. +20 −0 directory/examples/04_html_prototype/04_html_prototype.site/index.html
  42. +1 −0 directory/examples/05 display rss feed/-rss-enhancer.rss.cache
  43. +6 −0 directory/examples/05 display rss feed/-t-readme.txt
  44. +8 −0 directory/examples/05 display rss feed/rss-enhancer.rss
  45. +5 −0 directory/examples/06 slideshow.slide/-t-readme.txt
  46. BIN directory/examples/06 slideshow.slide/slideshow.slide/example.gif
  47. BIN directory/examples/06 slideshow.slide/slideshow.slide/example.jpg
  48. BIN directory/examples/06 slideshow.slide/slideshow.slide/example.png
  49. +16 −0 directory/examples/07_protecting_a_folder/-access
  50. +6 −0 directory/examples/07_protecting_a_folder/-t-readme.txt
  51. +5 −0 directory/examples/hiding_content.cut
  52. +72 −0 directory/examples/textile_cheat_sheet.txt
View
@@ -2,4 +2,3 @@ engine/application/logs/*
engine/info/disabled.php
.DS_Store
.htaccess
directory/*
View
@@ -1 +0,0 @@
*
@@ -0,0 +1,3 @@
**Important note:** Enhancer files must be encoded as Unicode (UTF-8) for them to work properly. Enhancer files use YAML, a human friendly data serialization standard stored in plaintext files. Indentation, spacing and text case are super important. Learn more at "yaml.org":http://www.yaml.org.
@@ -0,0 +1,7 @@
h1. Hiding content
h2. Enhancer
Did you know that you can hide any file or folder simply by putting a dash in the name? For example, this folder is called -hidden (look in the URL) and if you didn't notice, it wasn't listed in the file listing.
Of course, you can still get to it via direct URL.
@@ -0,0 +1,8 @@
h1. Subfolio Enhancers
h2. Demo files
h3. Getting started with Subfolio enhancers
Here is everything you need to take advantage of enhancers... just copy these files and customize.
@@ -0,0 +1,4 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
comment: This is a comment on a file or folder
@@ -0,0 +1,5 @@
h1. Thumbnails
h2. Enhancer
Thumbnails are automatically created for browser-viewable images (unless they are too big). To create custom thumbnails, see <a href="00_thumbnails/-thumbnails_custom/">-thumbnails_custom</a> folder.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,18 @@
h1. Custom Thumbnails
h2. Enhancer
If a -thumbnails-custom/ folder exists, any thumbnails within it will override the auto-generated -thumbnails/ folder content.
To create a custom thumbnail:
1. If it doesn't exist, create a folder called "-thumbnails-custom" within the same folder your images are in.
2. Design your custom thumbnails with any size you desire.
3. Giving your thumbnail the same filename as the image it is referencing.
3. Upload your custom thumbnail(s) to the "-thumbnails-custom" folder.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -0,0 +1,8 @@
h1. Embedding text and images
h2. Bottom of page
<pre><code>-b-bottom-text.txt</code></pre>
This text will appear at the bottom of the page, *below the file listing*. You can use textile, markdown or html. Set your preference in your settings.
@@ -0,0 +1,8 @@
h1. Embedding text and images
h2. Middle of page
<pre><code>-m-middle-text.txt</code></pre>
This text will appear on the top of the page, *below any images or features* you may have in the folder, but above the file listing. You can use textile, markdown or html. Set your preference in your settings.
Binary file not shown.
@@ -0,0 +1,7 @@
h1. Embedding text and images
h2. Top of page
<pre><code>-t-top-text.txt</code></pre>
This text will appear at the top of the page, *above any images or features* you may have in the folder. You can use textile, markdown or html. Set your preference in your settings.
@@ -0,0 +1 @@
This file is here simply to show the file listing.
@@ -0,0 +1 @@
This file is here simply to show the file listing.
@@ -0,0 +1 @@
This file is here simply to show the file listing.
@@ -0,0 +1,5 @@
h1. Popups, links and shortcuts
h2. Enhancer
File listings are for files. But sometimes you want to show something in a popup window, link to another website or create a shortcut to content in other folders. This is how you do it.
@@ -0,0 +1,6 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
target: _blank
url: http://www.area17.com
comment: Example link to an external website.
@@ -0,0 +1,8 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
url: http://jukebox.giantstep.net/player
width: 494
height: 560
style: WINDOW
comment: Example link within a pop-up window.
@@ -0,0 +1,5 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
name: internal shortcut
directory: -hidden
@@ -0,0 +1,5 @@
h1. Featuring content
h2. Enhancer
If you are looking to make a portfolio website or you just want to feature certain content, this enhancer is your best friend. You can feature a link to another website, to a file or folder. If you feature a file or folder that is in the same folder, it will magically disappear from the file listing.
@@ -0,0 +1 @@
You've arrived at your featured file. Notice that featuring a file in the same directory makes it disappear from the listing.
@@ -0,0 +1,27 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
# Note: to hide the title, thumbnail or description, put # in front of that line.
### Give your feature a title
### Add the a local or offsite link
title: Featured Link
link: http://www.area17.com
### Add path to thumbnail image (standard size 249x159)
### Put your image in a folder called "-thumbnails-custom"
image: -thumbnails-custom/link_thumbnail.png
### Define the size of the entire feature
### Default margin is 15px
width: 250
height: 230
### Add a description
### Make sure there is a space at the beginning of the line.
description:>
You can feature any local or offsite link. Also good for surfacing files and folders that are deep in your site.
@@ -0,0 +1,27 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
# Note: to hide the title, thumbnail or description, put # in front of that line.
### Give your feature a title
### Add the path to the file
title: Featured File
file: featured-file.txt
### Add path to thumbnail image (standard size 249x159)
### Put your image in a folder called "-thumbnails-custom"
image: -thumbnails-custom/file_thumbnail.png
### Define the size of the entire feature
### Default margin is 15px
width: 250
height: 230
### Add a description
### Make sure there is a space at the beginning of the line.
description:>
You can feature a file in the same folder. By doing so, the file will not appear in the listing below.
@@ -0,0 +1,27 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
# Note: to hide the title, thumbnail or description, put # in front of that line.
### Give your feature a title
### Add the path to the file
title: Featured Folder
folder: featured_folder
### Add path to thumbnail image (standard size 249x159)
### Put your image in a folder called "-thumbnails-custom"
image: -thumbnails-custom/folder_thumbnail.png
### Define the size of the entire feature
### Default margin is 15px
width: 250
height: 230
### Add a description
### Make sure there is a space at the beginning of the line.
description:>
You can feature a folder in the same folder. By doing so, the folder will not appear in the listing below.
@@ -0,0 +1 @@
You've arrived at your featured folder. Notice that featuring a folder in the same directory makes it disappear from the listing.
@@ -0,0 +1,5 @@
h1. HTML Prototype
h2. Enhancer
Have a prototype that you need to show but don't want it in the Subfolio framework ... just add a .site extension to your folder and you are done. To work properly, an index.html file must exist within the folder.
@@ -0,0 +1,20 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML Transitional 4.01//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="Content-Style-Type" content="text/css">
<title></title>
<meta name="Generator" content="Cocoa HTML Writer">
<meta name="CocoaVersion" content="949.54">
<style type="text/css">
p.p1 {margin: 0.0px 0.0px 0.0px 0.0px}
p.p2 {margin: 0.0px 0.0px 0.0px 0.0px; font: 12.0px Times; min-height: 14.0px}
font.f1 {font: 12.0px Times}
</style>
</head>
<body>
<p class="p1"><font face="Times" size="3" class="f1">This is my lovely HTML prototype.</font></p>
<p class="p2"><br></p>
<p class="p1"><font face="Times" size="3" class="f1">IMPORTANT: To work, index.html must exist within the folder.</font></p>
</body>
</html>
@@ -0,0 +1,6 @@
h1. RSS
h2. Enhancer
The RSS enhancer allows you to take any RSS feed from anywhere and display it within Subfolio. It could be used as a stand alone file (eg. example.rss) or as an embedded text file (eg. -t-example.rss).
@@ -0,0 +1,8 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
# Note: It may take a few minutes to work for the first time.
feedurl: http://feeds.feedburner.com/area17/news
count: 10 # maxiumum number of items to show
cache: 3600 # number of seconds to cache the feed for
@@ -0,0 +1,5 @@
h1. Slideshow
h2. Enhancer
Don't want your users to see thumbnails? No problem, simply put a .slide extension to any folder and the user will go directly to the first image (or file) in that folder.
@@ -0,0 +1,16 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
# Note: Users and groups have to be created first in your settings before this will work.
allow_users: [username, username, etc]
allow_groups: [groupname, groupname, etc]
deny_users: [username, username, etc]
deny_groups: [groupname, groupname, etc]
Does not apply to sub-folders:
current_folder:
allow_users: [username, username, etc]
allow_groups: [groupname, groupname, etc]
deny_users: [username, username, etc]
deny_groups: [groupname, groupname, etc]
@@ -0,0 +1,6 @@
h1. Protecting a folder
h2. Enhancer
You can deny/allow user/group access to any folder. Users and groups have to be created first in your settings before this will work.
@@ -0,0 +1,5 @@
# YAML NOTE: Indentation, spacing and text case are super important.
# This file must be encoded as Unicode (UTF-8) for it to work properly.
name: hiding content
directory: 02_enhancers/-hidden
@@ -0,0 +1,72 @@
h1. Subfolio Enhancers
h2. Textile cheat sheet
h3. Using markup in enhancers
Markup can be used to style text within enhancers files. Subfolio uses Textile by default, however you can change this to Markdown or HTML in your general settings.
***
h1. Header 1
<pre><code>h1. Header 1</code></pre>
h2. Header 2
<pre><code>h2. Header 2</code></pre>
h3. Header 3
<pre><code>h3. Header 3</code></pre>
This is _italicized_
<pre><code>This is _italicized_</code></pre>
This is *bold*
<pre><code>This is *bold*</code></pre>
* Bulleted item 1
* Bulleted item 2
<pre><code>* Bulleted item 1
* Bulleted item 2</code></pre>
# Numbered item 1
# Numbered item 2
<pre><code># Bulleted item 1
# Bulleted item 2</code></pre>
"text link":http://area17.com
<pre><code>"text link":http://area17.com</code></pre>
_Embed an image:_
<pre><code>!http://www.example.com/image.png!</code></pre>
bq. Blockquoted Text
<pre><code>bq. Blockquoted Text</code></pre>
_Embed Code:_
To get this:
<pre><code>/* Code Block */
#include <stdio.h>
#include <stdlib.h>
int main()
</code></pre>
Do this:
<pre><code><pre><code>
/* Code Block */
#include <stdio.h>
#include <stdlib.h>
int main()</code></pre>
</code></pre>

0 comments on commit 2082e9a

Please sign in to comment.