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