1. Roma Sokolov
  2. remarkz

Commits

Roma Sokolov  committed 0e095cb

improve templates

  • Participants
  • Parent commits 3c5c055
  • Branches default

Comments (0)

Files changed (4)

File templates/about.html

View file
       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>

File templates/base.html

View file
 
     <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>

File templates/list.html

View file
 {% 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 %}

File templates/macroses.jinja

View file
 {%- 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 -%}