do fancy python packaging stuff
This commit is contained in:
		
							parent
							
								
									716a42858c
								
							
						
					
					
						commit
						5b2f99516f
					
				
					 15 changed files with 39 additions and 20 deletions
				
			
		
							
								
								
									
										15
									
								
								dlibrary/templates/base.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										15
									
								
								dlibrary/templates/base.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,15 @@
 | 
			
		|||
{% from 'utils.html' import root with context -%}
 | 
			
		||||
<!DOCTYPE html>
 | 
			
		||||
<html>
 | 
			
		||||
  <head>
 | 
			
		||||
    <meta charset="utf-8">
 | 
			
		||||
    <meta name="viewport" content="width=device-width, initial-scale=1">
 | 
			
		||||
    <meta name="color-scheme" content="dark">
 | 
			
		||||
    <title>{% if title %}{{ title }} - {% else %}{% endif %}DLibrary</title>
 | 
			
		||||
    <link rel="stylesheet" type="text/css" href="{{ root() }}static/dlibrary.css">
 | 
			
		||||
    {% block head %}{% endblock %}
 | 
			
		||||
  </head>
 | 
			
		||||
  <body>
 | 
			
		||||
    {% block body required %}{% endblock %}
 | 
			
		||||
  </body>
 | 
			
		||||
</html>
 | 
			
		||||
							
								
								
									
										20
									
								
								dlibrary/templates/list.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										20
									
								
								dlibrary/templates/list.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,20 @@
 | 
			
		|||
{% extends 'base.html' %}
 | 
			
		||||
{% block body %}
 | 
			
		||||
{% from 'utils.html' import root with context %}
 | 
			
		||||
<h1 id="list-title"><a href={{ root() }}>DLibrary</a> {% block list_title %}{% endblock %}</h1>
 | 
			
		||||
<div class="card-listing">
 | 
			
		||||
  {% for work in works %}
 | 
			
		||||
  <div class="card">
 | 
			
		||||
    <a href="{{ root() }}works/{{ work['id'] }}/">
 | 
			
		||||
      <img src="{{ root() }}thumbnails/{{ work['id'] }}.jpg">
 | 
			
		||||
      <div class="card-authors">
 | 
			
		||||
        [{% if work['circle'] %}{{ work['circle'] }}{% endif %}{% if work['circle'] and work['authors'] %} ({% endif %}{{ ', '.join(work['authors']) }}{% if work['circle'] and work['authors'] %}){% endif %}]
 | 
			
		||||
      </div>
 | 
			
		||||
      <div class="card-title">
 | 
			
		||||
        {{ work['title'] }}
 | 
			
		||||
      </div>
 | 
			
		||||
    </a>
 | 
			
		||||
  </div>
 | 
			
		||||
  {% endfor %}
 | 
			
		||||
</div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
							
								
								
									
										1
									
								
								dlibrary/templates/utils.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										1
									
								
								dlibrary/templates/utils.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1 @@
 | 
			
		|||
{% macro root() %}{% for i in range(depth) %}../{% endfor %}{% endmacro %}
 | 
			
		||||
							
								
								
									
										21
									
								
								dlibrary/templates/viewer.html
									
										
									
									
									
										Normal file
									
								
							
							
						
						
									
										21
									
								
								dlibrary/templates/viewer.html
									
										
									
									
									
										Normal file
									
								
							| 
						 | 
				
			
			@ -0,0 +1,21 @@
 | 
			
		|||
{% extends 'base.html' %}
 | 
			
		||||
{% from 'utils.html' import root with context %}
 | 
			
		||||
{% block head %}
 | 
			
		||||
<link rel="stylesheet" type="text/css" href="{{ root() }}static/viewer.css">
 | 
			
		||||
<script>
 | 
			
		||||
  const WORK_ID = "{{ work['id'] }}";
 | 
			
		||||
  const ROOT = "{{ root() }}";
 | 
			
		||||
</script>
 | 
			
		||||
<script src="{{ root() }}static/viewer.js"></script>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
{% block body %}
 | 
			
		||||
<div id="viewer-images">
 | 
			
		||||
  {% for filename in images %}
 | 
			
		||||
  <img src="{{ root() }}images/{{ work['id'] }}/{{ filename }}" class="viewer-image">
 | 
			
		||||
  {% endfor %}
 | 
			
		||||
</div>
 | 
			
		||||
<div id="progress"></div>
 | 
			
		||||
<div id="page-num"></div>
 | 
			
		||||
<div id="duration"></div>
 | 
			
		||||
<div id="image-container"></div>
 | 
			
		||||
{% endblock %}
 | 
			
		||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue