Skip to content

Instantly share code, notes, and snippets.

View l34marr's full-sized avatar

TsungWei Hu l34marr

View GitHub Profile
@l34marr
l34marr / city-town.py
Last active May 7, 2018 07:39
List Temple Data
cities = {
'KeelungCity': '基隆市',
'TaipeiCity': '臺北市',
'NewTaipeiCity': '新北市',
'TaoyuanCity': '桃園市',
'HsinchuCounty': '新竹縣',
'HsinchuCity': '新竹市',
'MiaoliCounty': '苗栗縣',
'TaichungCity': '臺中市',
'NantouCounty': '南投縣',
@l34marr
l34marr / atctListTemple
Last active December 14, 2015 06:49
working with atctListTemple()
# Title: Helper method for temple folder view
# Parameter List: temples=0, subtemples=0, folders=0, images=0, subimages=0, others=0
# Bound Names: context, container, script, traverse_subpath
result = {}
is_topic = context.portal_type == 'Topic'
if temples:
if is_topic:
result['temples'] = context.queryCatalog(portal_type=('Temple',),
/**
* slidingPanels is similar to a horizontal accordion navigation, or holding
* some playing cards in your hand... sliding panels around to reveal one of
* interest.
*
* slidingPanels r1 // 2008.02.18 // jQuery 1.2.3+
* <http://cherne.net/brian/resources/jquery.slidingPanels.html>
*
* REQUIRES jQuery hoverIntent plug-in
* <http://cherne.net/brian/resources/jquery.hoverIntent.html>
@l34marr
l34marr / carousel.css
Last active October 13, 2015 21:28
Products.Carousel browser/carousel.css updated for ChiNan Project.
@l34marr
l34marr / base.cfg
Created October 29, 2012 10:15
Plone Config Files
######################################################
# Base Configuration; this provides sane defaults
# for commonly used parts.
# ---------------------------------------------------
#
# Buildout instructions in this file are
# usually only changed by experienced developers.
#
# Beyond here there be dragons!
@l34marr
l34marr / main_template.pt
Created October 26, 2012 04:36
Sunburst main_template Page Template
<metal:page define-macro="master">
<tal:doctype tal:replace="structure string:&lt;!DOCTYPE html&gt;" />
<html xmlns="http://www.w3.org/1999/xhtml"
tal:define="portal_state context/@@plone_portal_state;
context_state context/@@plone_context_state;
plone_view context/@@plone;
lang portal_state/language;
view nocall:view | nocall: plone_view;
dummy python: plone_view.mark_view(view);