88 lines
2.4 KiB
Text
88 lines
2.4 KiB
Text
|
|
[%# View a hierarchical list of all images in a mood theme.
|
||
|
|
#
|
||
|
|
# Authors:
|
||
|
|
# import r26.1 livejournal -- original page
|
||
|
|
# Jen Griffin <kareila@livejournal.com> -- TT conversion
|
||
|
|
#
|
||
|
|
# Copyright (c) 2008-2020 by Dreamwidth Studios, LLC.
|
||
|
|
#
|
||
|
|
# This program is free software; you may redistribute it and/or modify it
|
||
|
|
# under the same terms as Perl itself. For a copy of the license, please
|
||
|
|
# reference 'perldoc perlartistic' or 'perldoc perlgpl'.
|
||
|
|
#
|
||
|
|
%]
|
||
|
|
|
||
|
|
[%- sections.title='.title' | ml( sitename = site.nameshort ) -%]
|
||
|
|
|
||
|
|
[%- sections.head = BLOCK %]
|
||
|
|
<style type="text/css">
|
||
|
|
#content select {
|
||
|
|
width: auto;
|
||
|
|
display: inline;
|
||
|
|
padding-right: 2rem;
|
||
|
|
font-size: 90%;
|
||
|
|
}
|
||
|
|
#content input {
|
||
|
|
margin-bottom: 1rem;
|
||
|
|
}
|
||
|
|
div.themeselect {
|
||
|
|
margin-bottom: 15px;
|
||
|
|
margin-top: 30px;
|
||
|
|
text-align: center;
|
||
|
|
}
|
||
|
|
#content ul ul {
|
||
|
|
margin: 0 0 0.2em 2em;
|
||
|
|
}
|
||
|
|
</style>
|
||
|
|
[% END %]
|
||
|
|
|
||
|
|
[%- CALL dw.active_resource_group( "foundation" ) -%]
|
||
|
|
|
||
|
|
<p><a href="/moodlist">[% '.backlink' | ml %]</a></p>
|
||
|
|
|
||
|
|
<p>[% '.moods.howtochange' | ml( aopts = "href='${site.root}/customize/'" ) %]</p>
|
||
|
|
|
||
|
|
<div class="themeselect">
|
||
|
|
[%- IF ownerinfo -%]
|
||
|
|
<b>[% ownerinfo %]</b>
|
||
|
|
[%- ELSE -%]
|
||
|
|
|
||
|
|
<form action='moodlist' method='GET'>
|
||
|
|
[% form.select( name = "moodtheme", selected = themeid,
|
||
|
|
items = theme_select ) %]
|
||
|
|
|
||
|
|
[% form.submit( value = dw.ml( '.btn.view' ) ) %]
|
||
|
|
[% IF mode; form.hidden( name = 'mode', value = mode ); END %]
|
||
|
|
</form>
|
||
|
|
|
||
|
|
<p><a href='/moodlist?moodtheme=[% themeid %]'>[% '.view.table' | ml %]</a></p>
|
||
|
|
[%- END -%]
|
||
|
|
</div>
|
||
|
|
|
||
|
|
[%- MACRO do_tree BLOCK -%]
|
||
|
|
[%- IF lists.$num.size -%]
|
||
|
|
<ul>
|
||
|
|
[%- FOREACH mood IN lists.$num;
|
||
|
|
pic = load_image( themeid, mood.name );
|
||
|
|
dicturl = "http://dictionary.reference.com/search?q=${mood.name}" -%]
|
||
|
|
|
||
|
|
<li>[% '.moodname' | ml( id = mood.id,
|
||
|
|
name = "<b><a href='$dicturl' target='dict'>${mood.name}</a></b>" ) %]
|
||
|
|
</li>
|
||
|
|
|
||
|
|
[%- IF pic.keys.size -%]
|
||
|
|
<img align='absmiddle' alt="[% mood.name | html %]"
|
||
|
|
src="[% pic.pic %]" width='[% pic.w %]' height='[% pic.h %]'
|
||
|
|
hspace='2' vspace='2' />
|
||
|
|
[%- END -%]
|
||
|
|
|
||
|
|
[% do_tree( num = mood.id ) %]
|
||
|
|
|
||
|
|
[%- END -%]
|
||
|
|
</ul>
|
||
|
|
|
||
|
|
[%- END -%]
|
||
|
|
[%- END -%]
|
||
|
|
|
||
|
|
[% do_tree( num = 0 ) %]
|