last_post_column

NAML documentation   Watch a video
   Usages of this macro
... in last_post_column.naml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
<override_macro name="last_post_column" parameters="title,width,has_avatar_control,white_space">
    <n.table_column
Macro
Parameters: head, body
>
        <head>
            <td class="[n.column_default_border
Macro
/] nowrap last-post-column" align="center" style="[n.width_style
Macro
Parameters: width
.width/]; width: 100px;">
                <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.equal
Binary
Namespace: BasicNamespace
Parameters: value2, value1
 value1="[n.has_avatar_control/]" value2="no">
                    <then>
                        <table class="avatar-table">
                            <tr>
                                <td style="width:22px;border:none">
                                    <n.avatar_control
Macro
Parameters: group
 group="B"/>
                                </td>
                                <td class="nowrap" style="font-weight:bold;border:none">
                                    <n.default
Binary
Namespace: BasicNamespace
Parameters: to, text
. to="[t]Last Post[/t]"><n.title/></n.default.>
                                </td>
                            </tr>
                        </table>
                    </then>
                    <else>
                        <n.default
Binary
Namespace: BasicNamespace
Parameters: to, text
. to="[t]Last Post[/t]"><n.title/></n.default.>
                    </else>
                </n.if.equal>
            </td>
        </head>
        <body>
            <n.current_node
Binary
Namespace: NodeList
Parameters: do
.>
                <td class="[n.column_default_border
Macro
/] weak-color" style="float: left" >
                    <n.if
Binary
Namespace: BasicNamespace
Parameters: condition, else, then
.either
Binary
Namespace: BasicNamespace
Parameters: condition1, condition2
 condition1="[n.is_post
Binary
Namespace: NodeNamespace
/]" condition2="[n.has_topics
Binary
Namespace: NodeNamespace
Parameters: filter
/]">
                        <then>
                            <n.last_node
Binary
Namespace: NodeNamespace
Parameters: do
.>
                                <table class="avatar-table" align="center" >
                                    <tr>
                                        <td style="margin:.2em 0;padding:0 .2em;border:none;[n.style
Binary
Namespace: HtmlNamespace
Parameters: property, value
. property='white-space'][n.white_space/][/n.style.]">
                                            <n.owner
Binary
Namespace: NodeNamespace
Parameters: do
.avatar
Macro
Requires: user
Parameters: size, border_class, group
 size="small" group="B"/>
                                        </td>
                                        <td class="weak-color" style="color: black;font-size:90%;margin:.3em 0;padding:0 .2em;border:none;[n.style
Binary
Namespace: HtmlNamespace
Parameters: property, value
. property='white-space'][n.white_space/][/n.style.]">
                                            <n.when_created
Binary
Namespace: NodeNamespace
Parameters: do
.short_format
Macro
Requires: date
/>
                                        </td>
                                        <td style="padding:0 .2em;border:none;[n.style
Binary
Namespace: HtmlNamespace
Parameters: property, value
. property='white-space'][n.white_space/][/n.style.]">
                                            <span class="weak-color nowrap" style="padding-left:.0em;font-size:80%">
                                                <t>in</t>
                                            </span>
                                        </td>
                                        <td style="font-size:90%;margin:.3em 0;padding:0 .2em;border:none;[n.style
Binary
Namespace: HtmlNamespace
Parameters: property, value
. property='white-space'][n.white_space/][/n.style.]">
 <n.smart_post_link
Macro
Requires: node
Parameters: text, href, title, class
 text="[n.truncate
Binary
Namespace: NabbleNamespace
Parameters: size, if_truncated, text
. size='25'][n.node_text
Macro
Requires: node
Parameters: text
/][/n.truncate.]" />
                                     </td>
                                        <td style="padding:0 .2em;border:none;[n.style
Binary
Namespace: HtmlNamespace
Parameters: property, value
. property='white-space'][n.white_space/][/n.style.]">
                                            <span class="weak-color nowrap" style="padding-left:.0em;font-size:80%">
                                                <t>by</t>
                                            </span>
                                        </td>
                                        <td style="font-size:75%;margin:.2em 0;padding:0 .0em;border:none;[n.style
Binary
Namespace: HtmlNamespace
Parameters: property, value
. property='white-space'][n.white_space/][/n.style.]">
                                            <t><t.author.owner
Binary
Namespace: NodeNamespace
Parameters: do
.name
Binary
Namespace: UserNamespace
Parameters: truncate
 truncate="10"/></t>
                                        </td>
                                    </tr>
                                </table>
                            </n.last_node.>
                        </then>
                        <else>
                            <span style="padding-left:.4em;font-size:80%">
                                <t>Empty</t>
                            </span>
                        </else>
                    </n.if.either>
                </td>
            </n.current_node.>
        </body>
    </n.table_column>
</override_macro>
Overrides default macro
... in responsive.naml
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
<override_macro name="last_post_column" parameters="title,width,white_space">
    <n.table_column>
        <head>
            <td class="[n.column_default_border/] nowrap last-post-column" style="[n.width_style.width/]">
                <n.default. to="[t]Last Post[/t]"><n.title/></n.default.>
            </td>
        </head>
        <body>
            <n.current_node.>
                <td class="[n.column_default_border/] weak-color">
                    <n.if.either condition1="[n.is_post/]" condition2="[n.has_topics/]">
                        <then>
                            <n.last_node.>
                                <table class="avatar-table">
                                    <tr>
                                        <n.last_post_column_start/>
                                        <td class="column" style="width:100%;padding:0;border:none;[n.style. property='white-space'][n.white_space/][/n.style.]">
                                            <n.smart_post_link>
                                                <text.when_created.short_format/>
                                            </n.smart_post_link>
                                            <span class="weak-color column nowrap" style="padding-left:.2em">
                                                <t>by <t.author.owner.name truncate="20"/></t>
                                            </span>
                                        </td>
                                    </tr>
                                </table>
                            </n.last_node.>
                        </then>
                        <else>
                            <span style="padding-left:.4em">
                                <t>Empty</t>
                            </span>
                        </else>
                    </n.if.either>
                </td>
            </n.current_node.>
        </body>
    </n.table_column>
</override_macro>
Overrides default macro
... in columns.naml
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<macro name="last_post_column" parameters="title,width,white_space">
    <n.table_column>
        <head>
            <td class="[n.column_default_border/] nowrap last-post-column" style="[n.width_style.width/]">
                <n.default. to="[t]Last Post[/t]"><n.title/></n.default.>
            </td>
        </head>
        <body>
            <n.current_node.>
                <td class="[n.column_default_border/] weak-color">
                    <n.if.either condition1="[n.is_post/]" condition2="[n.has_topics/]">
                        <then>
                            <n.last_node.>
                                <table class="avatar-table">
                                    <tr>
                                        <n.last_post_column_start/>
                                        <td style="width:100%;padding:0 .3em;border:none;[n.style. property='white-space'][n.white_space/][/n.style.]">
                                            <n.smart_post_link>
                                                <text.when_created.short_format/>
                                            </n.smart_post_link>
                                            <span class="weak-color nowrap" style="padding-left:.2em">
                                                <t>by <t.author.owner.name truncate="20"/></t>
                                            </span>
                                        </td>
                                    </tr>
                                </table>
                            </n.last_node.>
                        </then>
                        <else>
                            <span style="padding-left:.4em">
                                <t>Empty</t>
                            </span>
                        </else>
                    </n.if.either>
                </td>
            </n.current_node.>
        </body>
    </n.table_column>
</macro>