Roma Sokolov avatar Roma Sokolov committed 0e095cb

improve templates

Comments (0)

Files changed (4)

templates/about.html

       Authors: Nikita Kovshov, Roman Sokolov.
     </p>
     <p class="hint">
-      You can generate bookmarklet with your tags. Drag link to Links Area in your browser. If you find interesting page you can click on bookmarklet and save it to selfnotes. Also you can select text and send it to selfnotes with bookmarklet. Enjoy!
+      You can generate bookmarklet with your tags. Once it done, you can add your remarks with one click!
     </p>
   </div>
     <form id="bookmarklet" action="/about/" method="POST">
         <p class="center">
           <a href='javascript:function tltp(a){d=document;mObj=d.getElementsByTagName("body")[0].appendChild(d.createElement("div"));mObj.id="modalContainer";st="background-color:transparent;position:fixed;top:0px;right:0px;z-index:10000;";if(mObj.cssText)mObj.cssText=st;else mObj.style.cssText=st;alertObj=mObj.appendChild(d.createElement("div"));st="position:relative;width:300px;min-height:100px;margin-top:50px;border:2px solid #000;background-color:#F2F5F6;";if(alertObj.cssText)alertObj.cssText=st;else alertObj.style.cssText=st;alertObj.appendChild(d.createElement("p")).innerHTML=a;rem=function(){document.getElementsByTagName("body")[0].removeChild(document.getElementById("modalContainer"))};setTimeout(rem,2E3)}function bkmrk(){d=document;t=d.getSelection?d.getSelection():d.selection.createRange().text;et=encodeURIComponent(t);t=et.trim().length?et:encodeURIComponent(d.location.toString());parameters="item="+t;url="{{ url_for('bookmarklet', tags='/'.join(tags), _external=True) }}";http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest;http_request.overrideMimeType&&http_request.overrideMimeType("text/html")}else if(window.ActiveXObject)try{http_request=new ActiveXObject("Msxml2.XMLHTTP")}catch(a){try{http_request=new ActiveXObject("Microsoft.XMLHTTP")}catch(b){}}http_request||tltp("Cannot create XMLHTTP instance");http_request.onreadystatechange=function(){if(http_request.readyState==4)if(http_request.status==200){result=http_request.responseText;tltp(result)}else tltp(http_request.status)};http_request.open("POST",url,true);http_request.setRequestHeader("Content-type","application/x-www-form-urlencoded");http_request.setRequestHeader("Content-length",parameters.length);http_request.setRequestHeader("Connection","close");http_request.send(parameters)};void(bkmrk());'>Post Selfnote</a>
         </p>
+        <p class="hint">
+          Drag link to Links Area in your browser. Click on bookmarklet when you browsing to save current url to remarkz. Also you can select text and send it to remarkz. Enjoy!
+        </p>
       </div>
       {% endif %}
     </form>

templates/base.html

 
     <script type="text/javascript" src="http://code.jquery.com/jquery-1.4.2.min.js"></script>
     <script type="text/javascript" src="{{ url_for('static', filename='common.js') }}"></script>
-    <title> {% block title %} {% endblock %} -- Selfnote </title>
+    <title> {% block title %} {% endblock %} -- Remar.kZ </title>
     {% endblock %}
     <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
   </head>
   <body>
     <div id="about">
-      <a href="{{ url_for('main') }}" tabindex="42">Remar.kz</a> &lt;$&gt;
-      <a href="{{ url_for('about') }}" tabindex="43">About </a>
+      <a href="{{ url_for('main') }}" tabindex="42">Remar.kZ</a> &lt;$&gt;
+      <a href="{{ url_for('about') }}" tabindex="43">About</a>
     </div>
     <div id="content">
-      {% block content %}  {% endblock %}
+      {% block content %}{% endblock %}
     </div>
   </body>
 </html>

templates/list.html

 {% block top_content %}
 <div class="text info">Tags: {% autoescape false %}{{ M.show_tags(tags) }}{% endautoescape %}</div>
 <div class="paging">
-{% if page > 1 %} <a href="{{ url_for('get', tags='/'.join(tags)) }}?page={{ page - 1 }}"> back </a> {% endif %}
+{% if page > 1 %} <a href="{{ url_for('get', tags='/'.join(tags)) }}?page={{ page - 1 }}"> =&lt;&lt; </a> {% endif %}
 &nbsp;Page # {{ page }} &nbsp;
-{% if not last_page %} <a href="{{ url_for('get', tags='/'.join(tags)) }}?page={{ page + 1 }}"> forward </a> {% endif %}
+{% if not last_page %} <a href="{{ url_for('get', tags='/'.join(tags)) }}?page={{ page + 1 }}"> &gt;&gt;= </a> {% endif %}
 </div>
 {% endblock %}
 {% block bottom_content %}
 <dl class="text">
 {% for item in items %}
-<dd>{{ item }}</dd>
+<dt class="hint"> {{ loop.index + start }}) {{ item[1] }}</dt>
+<dd>{{ item[0]|urlize }}</dd>
 {% endfor %}
 </dl>
 {% endblock %}

templates/macroses.jinja

 {%- macro show_tags(tags) -%}
 {%- for tag in tags -%}
-<span class="info">{{ tag }}</span>{% if not loop.last %}, {% endif %}{% endfor %}
+<span class="info"><a href="{{ url_for('get', tags=tag) }}">{{ tag }}</a></span>{% if not loop.last %}, {% endif %}{% endfor %}
 {%- endmacro -%}
 
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.