diff --git a/TODO b/TODO index b472a7d..9e8d91d 100644 --- a/TODO +++ b/TODO @@ -1,5 +1,8 @@ ## GENERAL + * bootstrap 5: + * get rid of font-awesome for svgs (bootstrap icons) + * face locations: START FORM SCRATCH so all images have face_locn data right now GenThumb is in shared, and does width, height as well --> in person.py BUT need this for pa_job_manager diff --git a/shared.py b/shared.py index 15b0416..6b639c4 100644 --- a/shared.py +++ b/shared.py @@ -9,9 +9,9 @@ hostname = socket.gethostname() PROD_HOST="pa_web" ICON={} -ICON["Import"]="fa-file-upload" -ICON["Storage"]="fa-database" -ICON["Bin"]="fa-trash-alt" +ICON["Import"]="import" +ICON["Storage"]="db" +ICON["Bin"]="trash" if hostname == "lappy": PA_JOB_MANAGER_HOST="localhost" @@ -40,8 +40,8 @@ def CreateSelect(name, selected, list, js="", add_class="" ): str += '' return str -def CreateFoldersSelect(selected): - str = f'' # if selected is true, then folders == true, so make this the selected option if( selected ): str += '' diff --git a/templates/files.html b/templates/files.html index bfcf079..4822261 100644 --- a/templates/files.html +++ b/templates/files.html @@ -1,17 +1,62 @@ {% extends "base.html" %} {% block main_content %} - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
@@ -20,28 +65,28 @@ {% endif %}
{% if folders %} -
+
{% if "files_ip" in request.url %} - + {% set tmp_path=cwd | replace( "static/Import", "" ) + "/" %} {% elif "files_sp" in request.url %} - + {% set tmp_path=cwd | replace( "static/Storage", "" ) + "/" %} {% elif "files_rbp" in request.url %} - + {% set tmp_path=cwd | replace( "static/Bin", "" ) + "/" %} {% endif %} {{tmp_path}}
{% endif %} -
+
- {{CreateSelect( "noo", noo, ["Oldest", "Newest","A to Z", "Z to A"], "$('#offset').val(0)", "rounded-start")|safe }} + {{CreateSelect( "noo", noo, ["Oldest", "Newest","A to Z", "Z to A"], "$('#offset').val(0)", "rounded-start py-2")|safe }} {{CreateSelect( "how_many", how_many, ["10", "25", "50", "75", "100", "150", "200", "500"])|safe }} {% if folders %} - {{CreateFoldersSelect( folders )|safe }} + {{CreateFoldersSelect( folders, "rounded-end" )|safe }} {% else %} {{CreateFoldersSelect( folders )|safe }} grouped by: @@ -50,29 +95,35 @@
{% if search_term is defined %} -
+
Searched for: '{{search_term}}'
{% endif %}
- +  {{how_many}} files  {% set nxt_disabled="" %} {% if entry_data|length < how_many|int %} {% set nxt_disabled="disabled" %} {% endif %} - - + + {% if "files_rbp" in request.url %}
-
+
{% if size == "64" %} {% set bt="btn-info text-white" %} @@ -118,44 +169,35 @@ {% endfor %} - -
- +
+
{% set last = namespace(printed=0) %} {# rare event of empty folder, still need to show back button #} {% if folders and entry_data|length == 0 %} {% if cwd != root %} -
- - - - +
+
Back
+ {% else %} - {# create an even lighter-grey, unclickable back button - so folders dont jump around when you go into them #} - - - - +
+ +
{% endif %} {% endif %} {% for obj in entry_data %} {% if loop.index==1 and folders %} {% if cwd != root %} -
- - - - -
Back
+
+ +
Back
{% else %} {# create an even lighter-grey, unclickable back button - so folders dont jump around when you go into them #} - - - - +
+ +
{% endif %} {% endif %} {% if not folders and obj.type.name == "Directory" %} @@ -179,13 +221,13 @@ {% endif %} {% if obj.type.name != "Directory" %} {% if (not folders) or ((obj.in_dir.in_path.path_prefix+'/'+obj.in_dir.rel_path+'/'+obj.name) | TopLevelFolderOf(cwd)) %} -
+
{% if obj.type.name=="Image" %}
{% if search_term is defined %} -
- +
+
{% endif %}
{% endif %} {% else %} @@ -217,10 +258,11 @@ {% endif %} {# if this dir is the toplevel of the cwd, show the folder icon #} {% if dirname| TopLevelFolderOf(cwd) %} -
- -
{{obj.name}}
+
+ +
{{obj.name}}
+ {% endif %} {% endif %} {% endif %} @@ -232,9 +274,13 @@
- +  {{how_many}} files  - +
@@ -369,8 +415,9 @@ function MoveDBox() yr=$('.highlight').first().attr('yr') dt=$('.highlight').first().attr('date') div+=` -
- +
+ + ` sps={{StoragePathNames()|safe}} if( sps.length > 1 ) { @@ -385,12 +432,12 @@ function MoveDBox() } div+=` - - +

@@ -410,9 +457,9 @@ function ChangeSize(clicked_button,sz) $('.thumb').attr( {height: sz, style: 'font-size:'+sz+'px' } ) $('#size').val(sz) sz=sz-22 - $('.fa-folder').attr( {style: 'font-size:'+sz+'px' } ) - sz=sz/2 - $('.fa-stack').attr( {style: 'color:grey;font-size:'+sz+'px'} ) + $('.svg').height(sz); + $('.svg').width(sz); + $('.svg_cap').width(sz); } // e == event (can see if shift/ctrl held down while left-clicking diff --git a/templates/viewer.html b/templates/viewer.html index 2060fb2..18fcb78 100644 --- a/templates/viewer.html +++ b/templates/viewer.html @@ -1,4 +1,63 @@ {% extends "base.html" %} {% block main_content %} + + + + + + + + + + + + + + + +