diff --git a/app.py b/app.py index d675f5d..59bd97e 100644 --- a/app.py +++ b/app.py @@ -34,6 +34,7 @@ def index(): if request.method == 'POST': set_num = request.form.get('set_num') + index = request.form.get('index') minif = request.form.get('minif') scheck = request.form.get('scheck') scol = request.form.get('scol') @@ -41,12 +42,12 @@ def index(): with open('./info/'+set_num+'.json') as info: json_file = json.loads(info.read()) if minif != None: - json_file['Minifigs Collected'] = minif + json_file['unit'][int(index)]['Minifigs Collected'] = minif if scheck != None: - json_file['Set Checked'] = scheck + json_file['unit'][int(index)]['Set Checked'] = scheck if scol != None: - json_file['Set Collected'] = scol - + json_file['unit'][int(index)]['Set Collected'] = scol + with open('./info/'+set_num+'.json', 'w') as dump_file: json.dump(json_file,dump_file) return ('', 204) diff --git a/templates/frontpage.html b/templates/frontpage.html index 57bcf36..31037c2 100644 --- a/templates/frontpage.html +++ b/templates/frontpage.html @@ -33,15 +33,14 @@ body { .grid-container { display: grid; - grid-template-columns: repeat(auto-fit, minmax(20%, 32%)); /* Between 33% and 50% width */ + grid-template-columns: repeat(auto-fit, minmax(10%, 48%)); /* Between 33% and 50% width */ /* grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); */ gap: 10px; padding: 10px; } .grid-item { - height: 300px; - display: flex; + height:auto; } .card { @@ -49,7 +48,7 @@ body { border: 1px solid #ccc; padding: 10px; box-sizing: border-box; - padding-bottom:40px; /* Height of the footer */ + padding-bottom:30px; /* Height of the footer */ } /* Adjust height for smaller screens */ @@ -68,7 +67,6 @@ body { .grid-item img { max-width: 100%; - height: auto; display: block; } @@ -79,7 +77,7 @@ body { position:absolute; bottom:0; width:90%; - height:40px; /* Height of the footer */ + height:30px; /* Height of the footer */ } .button { @@ -107,6 +105,7 @@ body { + @@ -114,49 +113,50 @@ body {
- {{ i['theme_id'] }} ({{ i['year'] }}) -
-- {{ j }} -
-Set #{{ loop.index }}
+