aboutsummaryrefslogtreecommitdiff
path: root/templates/web/index.html
blob: 3339479b9416daa6fb723b3fea9d8a86db872f76 (plain)
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
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
<!DOCTYPE html>
<html>
    <head>
        <meta name="referrer" content="origin">
        <meta name="viewport" content="width=device-width, initial-scale=1.0">
        <!-- <link rel="stylesheet" type="text/css" href="links.css"> -->
        <link rel="shortcut icon" href="favicon.ico">
        <link rel="alternate" type="application/rss+xml" title="RSS" href="/rss">

        <title>Linkopedia</title>
        <style>
         html { width: 100%; }
         body {
             width: 100%; max-width: 80ch; margin: 1em auto;
             font-family: Verdana, Geneva, sans-serif;
             font-size: 12pt;
             color: #828282;
         }

         a:link { color: #000; text-decoration: none; }
         a:hover { text-decoration: underline; }

         body > header {
             color: #000;
             background-color: #82a9d2;
             padding: 0 1em;
             line-height: 2em;
             display: flex;
             flex-direction: row;
             justify-content: space-between;
         }
         body > header > h1 {
             font-size: 1em;
             margin:0;
             display: inline-block;
         }
         body > header > h1 > a { color: #000; }

         body > section {
             padding: 1em;
             background-color: #f2f2f2;
             border-bottom: 2px solid #82a9d2;
         }
         #linkslist { margin: 0; }
         #linkslist dd {
             margin: 0.2em 0 1em 0;
         }
         #linkslist dd > footer {
             font-size: 0.8em;
             margin-top: 0.2em;
         }

         #linkslist a:link { color: #000; }

         #linkslist a.tag {
             line-height: 1.2em;
             padding: 0 0.2em;
             border: 1px solid #828282;
             background-color: #E2E2E2;
             border-radius: 3px;
             color: #828282;
             text-decoration: none;
         }
         #linkslist a.tag:hover { color: #000; }


         #nextpage { color: #828282; }

         .placeholder { text-align: center; }

         body > footer {
             margin-top: 2em;
             text-align: center;
         }

        </style>
    </head>
    <body>
        <header>
            <h1><a href="{{ url_for('index') }}">Linkopedia</a></h1>
            <span>I Bookmark del <a href="https://gl-como.it/">GL-Como</a></span>
        </header>
        <section>
            {% if q %}<h2>Cerca: '{{ q }}'</h2>{% endif %}
            <dl id="linkslist">
                {% for entry in entries %}
                {% set doc = entry.get_data() %}
                <dt class="link" id="{{ doc.eid }}">
                    <a href="{{ doc.url }}" title="{{ doc.url }}">{{ doc.title }}</a>
                </dt>
                <dd>
                    {{ doc.description }}
                    <footer>
                        {{ doc.added }}
                        {{ "-" if doc.tags|count > 0 }}
                        {% for tag in doc.tags %}
                        <a class="tag" href="{{ url_for('search') }}?q=tag:{{tag|urlencode}}">{{ tag }}</a>
                        {% endfor %}
                        </footer>
                </dd>
                {% endfor %}
            </dl>
            {% if entries|count > 0 %}
                {% if q %}
                    <a id="nextpage" href="{{ url_for('search', q=q, p=page+1) }}">altro</a>
                {% else %}
                    <a id="nextpage" href="{{ url_for('index', p=page+1) }}">altro</a>
                {% endif %}
            {% else %}
                <div class="placeholder">nessun risultato</div>
            {% endif %}
        </section>
        <footer>
            <form method="get" action="{{ url_for('search') }}"><input name="q" placeholder="cerca..."></form>
        </footer>
    </body>
</html>