Various reworks. Removed VH units from CSS.
This commit is contained in:
@@ -41,7 +41,6 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
|
|
||||||
# Project apps.
|
# Project apps.
|
||||||
'home',
|
|
||||||
'viewer'
|
'viewer'
|
||||||
]
|
]
|
||||||
|
|
||||||
|
|||||||
@@ -21,8 +21,7 @@ from django.conf.urls.static import static
|
|||||||
from django.urls import (path,
|
from django.urls import (path,
|
||||||
include)
|
include)
|
||||||
|
|
||||||
# Project imports
|
from viewer.views import index
|
||||||
from home.views import index
|
|
||||||
|
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
# URL Patterns. #
|
# URL Patterns. #
|
||||||
|
|||||||
@@ -1,6 +0,0 @@
|
|||||||
from django.apps import AppConfig
|
|
||||||
|
|
||||||
|
|
||||||
class HomeConfig(AppConfig):
|
|
||||||
default_auto_field = 'django.db.models.BigAutoField'
|
|
||||||
name = 'home'
|
|
||||||
@@ -1,5 +0,0 @@
|
|||||||
from django.shortcuts import redirect
|
|
||||||
|
|
||||||
# Create your views here.
|
|
||||||
def index(request):
|
|
||||||
return redirect('gallery_view_root')
|
|
||||||
@@ -1,3 +1,12 @@
|
|||||||
|
html {
|
||||||
|
height:100%;
|
||||||
|
}
|
||||||
|
|
||||||
|
body {
|
||||||
|
height: 100%;
|
||||||
|
margin: 0px;
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Containers. *
|
* Containers. *
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
@@ -13,19 +22,37 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.image-container {
|
.image-container {
|
||||||
height: 75vh;
|
position: relative;
|
||||||
|
height: 100%;
|
||||||
|
width: 100%;
|
||||||
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fc {
|
.fc {
|
||||||
width: fit-content;
|
width: fit-content;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.h90 {
|
||||||
|
height: 90%;
|
||||||
|
}
|
||||||
|
|
||||||
|
.full-width {
|
||||||
|
width: 100%;
|
||||||
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
* Content. *
|
* Content. *
|
||||||
****************************************************************************/
|
****************************************************************************/
|
||||||
|
|
||||||
.image {
|
.image-container img {
|
||||||
|
position: absolute;
|
||||||
|
top: 0;
|
||||||
|
left: 0;
|
||||||
|
bottom: 0;
|
||||||
|
right: 0;
|
||||||
height: 100%;
|
height: 100%;
|
||||||
|
width: auto;
|
||||||
|
margin: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.mauto {
|
.mauto {
|
||||||
@@ -58,7 +85,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.search-box {
|
.search-box {
|
||||||
height: 2em;
|
height: 2.5em;
|
||||||
}
|
}
|
||||||
|
|
||||||
/****************************************************************************
|
/****************************************************************************
|
||||||
|
|||||||
@@ -65,7 +65,7 @@
|
|||||||
|
|
||||||
<!-- Search bar. -->
|
<!-- Search bar. -->
|
||||||
<td>
|
<td>
|
||||||
<input type="text" name="search" class="search-box">
|
<input type="search" name="search" class="search-box">
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Search submit. -->
|
<!-- Search submit. -->
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
{% load static %}
|
{% load static %}
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html style="height:100%;">
|
<html>
|
||||||
<head>
|
<head>
|
||||||
<meta name="viewport" content="width=device-width, height=device-height" />
|
<meta name="viewport" content="width=device-width, height=device-height" />
|
||||||
<title>
|
<title>
|
||||||
@@ -30,7 +30,7 @@
|
|||||||
</table>
|
</table>
|
||||||
|
|
||||||
<!-- Image view. -->
|
<!-- Image view. -->
|
||||||
<table class="fc mauto">
|
<table class="fc mauto h90">
|
||||||
<tr>
|
<tr>
|
||||||
<!-- Previous image. -->
|
<!-- Previous image. -->
|
||||||
<td>
|
<td>
|
||||||
@@ -42,12 +42,12 @@
|
|||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Current image. -->
|
<!-- Current image. -->
|
||||||
<td>
|
<td class="full-width">
|
||||||
<div class="image-container">
|
<a href="{{image_path}}" target="_blank">
|
||||||
<a href="{{image_path}}" target="_blank">
|
<div class="image-container">
|
||||||
<img src="{{image_path}}" class="image">
|
<img src="{{image_path}}" class="image">
|
||||||
</a>
|
</div>
|
||||||
</div>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
|
||||||
<!-- Next image. -->
|
<!-- Next image. -->
|
||||||
|
|||||||
@@ -27,6 +27,9 @@ IMAGES_PER_PAGE = CELLS_PER_ROW * ROWS_PER_PAGE
|
|||||||
# View functions. #
|
# View functions. #
|
||||||
###########################################################################################
|
###########################################################################################
|
||||||
|
|
||||||
|
def index(request):
|
||||||
|
return redirect('gallery_view_root')
|
||||||
|
|
||||||
def do_recursive_search(start_path, query):
|
def do_recursive_search(start_path, query):
|
||||||
"""
|
"""
|
||||||
Gets all images and sub-directories inside the start_path whose name matches the given query,
|
Gets all images and sub-directories inside the start_path whose name matches the given query,
|
||||||
|
|||||||
Reference in New Issue
Block a user