michaelkri commited on
Commit
068f946
·
1 Parent(s): ac34fec

Improved design

Browse files
Files changed (1) hide show
  1. app/templates/index.html +24 -19
app/templates/index.html CHANGED
@@ -24,7 +24,7 @@
24
  <div class="px-3 py-3 lg:px-5 lg:pl-3">
25
  <div class="flex items-center justify-between">
26
  <div class="flex items-center justify-start rtl:justify-end">
27
- <button data-drawer-target="logo-sidebar" data-drawer-toggle="logo-sidebar"
28
  aria-controls="logo-sidebar" type="button"
29
  class="inline-flex items-center p-2 text-sm text-gray-500 rounded-lg hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600">
30
  <span class="sr-only">Open sidebar</span>
@@ -34,7 +34,7 @@
34
  d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 10.5a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM2 10a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10z">
35
  </path>
36
  </svg>
37
- </button>
38
  <a href="#" class="flex ms-2 md:me-24">
39
  <span
40
  class="self-center text-xl font-semibold sm:text-2xl whitespace-nowrap dark:text-white">Focal</span>
@@ -58,9 +58,9 @@
58
  </nav>
59
 
60
  <aside id="logo-sidebar"
61
- class="fixed top-0 left-0 z-40 w-64 h-screen pt-20 transition-transform -translate-x-full bg-white border-r border-gray-300 sm:translate-x-0 dark:bg-gray-800 dark:border-gray-700"
62
  aria-label="Sidebar">
63
- <div class="flex flex-col justify-between h-full px-3 pb-4 overflow-y-auto bg-white dark:bg-gray-800">
64
  <ul class="space-y-2 font-medium">
65
  {% for category in categorized_articles.keys() %}
66
  <li>
@@ -74,9 +74,9 @@
74
 
75
  <div class="flex justify-center">
76
  <div
77
- class="inline-flex items-center space-x-3 py-2 px-5 bg-white border border-gray-300 rounded-full shadow-sm">
78
  {% if update_time == -1 %}
79
- <svg class="animate-spin h-4 w-4 text-primary" xmlns="http://www.w3.org/2000/svg" fill="none"
80
  viewBox="0 0 24 24">
81
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4">
82
  </circle>
@@ -84,24 +84,28 @@
84
  d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">
85
  </path>
86
  </svg>
87
- <span class="font-medium text-sm text-gray-700">Updating articles...</span>
88
- {% elif update_time < 1 %} <span class="relative flex h-2.5 w-2.5">
 
89
  <span
90
  class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
91
- <span class="relative inline-flex rounded-full h-2.5 w-2.5 bg-emerald-500"></span>
92
  </span>
93
- <span class="font-medium text-sm text-gray-700">Updated less than an hour ago</span>
94
- {% elif update_time >= 1 and update_time <= 4 %} <span class="relative flex h-2.5 w-2.5">
95
- <span class="relative inline-flex rounded-full h-2.5 w-2.5 bg-amber-500"></span>
 
96
  </span>
97
- <span class="font-medium text-sm text-gray-700">Updated {{ update_time }} hours
98
- ago</span>
 
99
  {% else %}
100
- <span class="relative flex h-2.5 w-2.5">
101
- <span class="relative inline-flex rounded-full h-2.5 w-2.5 bg-gray-400"></span>
102
  </span>
103
- <span class="font-medium text-sm text-gray-700">Updated {{ update_time }} hours
104
- ago</span>
 
105
  {% endif %}
106
  </div>
107
  </div>
@@ -110,7 +114,8 @@
110
 
111
  <div class="p-8 sm:ml-64 mt-14">
112
  {% for category, articles in categorized_articles.items() %}
113
- <div id="{{ category }}" class="block w-full mb-8 rounded-lg border border-gray-300 border-l-4 border-l-blue-500 bg-white p-6">
 
114
  <h1 class="text-2xl font-semibold tracking-tight text-gray-900">{{ category | capitalize }}</h1>
115
 
116
  {% for article in articles %}
 
24
  <div class="px-3 py-3 lg:px-5 lg:pl-3">
25
  <div class="flex items-center justify-between">
26
  <div class="flex items-center justify-start rtl:justify-end">
27
+ <!-- <button data-drawer-target="logo-sidebar" data-drawer-toggle="logo-sidebar"
28
  aria-controls="logo-sidebar" type="button"
29
  class="inline-flex items-center p-2 text-sm text-gray-500 rounded-lg hover:bg-gray-100 focus:outline-none focus:ring-2 focus:ring-gray-200 dark:text-gray-400 dark:hover:bg-gray-700 dark:focus:ring-gray-600">
30
  <span class="sr-only">Open sidebar</span>
 
34
  d="M2 4.75A.75.75 0 012.75 4h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 4.75zm0 10.5a.75.75 0 01.75-.75h7.5a.75.75 0 010 1.5h-7.5a.75.75 0 01-.75-.75zM2 10a.75.75 0 01.75-.75h14.5a.75.75 0 010 1.5H2.75A.75.75 0 012 10z">
35
  </path>
36
  </svg>
37
+ </button> -->
38
  <a href="#" class="flex ms-2 md:me-24">
39
  <span
40
  class="self-center text-xl font-semibold sm:text-2xl whitespace-nowrap dark:text-white">Focal</span>
 
58
  </nav>
59
 
60
  <aside id="logo-sidebar"
61
+ class="fixed top-0 left-0 z-40 w-64 h-screen pt-20 transition-transform -translate-x-full bg-gray-50 border-r border-gray-300 sm:translate-x-0 dark:bg-gray-800 dark:border-gray-700"
62
  aria-label="Sidebar">
63
+ <div class="flex flex-col justify-between h-full px-3 pb-4 overflow-y-auto bg-gray-50 dark:bg-gray-800">
64
  <ul class="space-y-2 font-medium">
65
  {% for category in categorized_articles.keys() %}
66
  <li>
 
74
 
75
  <div class="flex justify-center">
76
  <div
77
+ class="flex items-center space-x-2 px-3 py-1.5 bg-gray-100 dark:bg-gray-700 rounded-lg border border-gray-200 dark:border-gray-600">
78
  {% if update_time == -1 %}
79
+ <svg class="text-blue-600 h-3 w-3 animate-spin" xmlns="http://www.w3.org/2000/svg" fill="none"
80
  viewBox="0 0 24 24">
81
  <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4">
82
  </circle>
 
84
  d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z">
85
  </path>
86
  </svg>
87
+ <span class="text-xs font-semibold whitespace-nowrap text-gray-700 dark:text-gray-300">Updating
88
+ articles...</span>
89
+ {% elif update_time < 1 %} <span class="relative flex h-2 w-2">
90
  <span
91
  class="animate-ping absolute inline-flex h-full w-full rounded-full bg-emerald-400 opacity-75"></span>
92
+ <span class="relative inline-flex rounded-full h-2 w-2 bg-emerald-500"></span>
93
  </span>
94
+ <span class="font-semibold text-xs text-gray-700 dark:text-gray-300 whitespace-nowrap">Updated
95
+ now</span>
96
+ {% elif update_time >= 1 and update_time <= 4 %} <span class="relative flex h-2 w-2">
97
+ <span class="relative inline-flex rounded-full h-2 w-2 bg-amber-500"></span>
98
  </span>
99
+ <span
100
+ class="font-semibold text-xs text-gray-700 dark:text-gray-300 whitespace-nowrap">Updated
101
+ {{ update_time }} hour{{ 's' if update_time > 1 else '' }} ago</span>
102
  {% else %}
103
+ <span class="relative flex h-2 w-2">
104
+ <span class="relative inline-flex rounded-full h-2 w-2 bg-gray-400"></span>
105
  </span>
106
+ <span
107
+ class="font-semibold text-xs text-gray-700 dark:text-gray-300 whitespace-nowrap">Updated
108
+ {{ update_time }} hours ago</span>
109
  {% endif %}
110
  </div>
111
  </div>
 
114
 
115
  <div class="p-8 sm:ml-64 mt-14">
116
  {% for category, articles in categorized_articles.items() %}
117
+ <div id="{{ category }}"
118
+ class="block w-full mb-8 rounded-lg border border-gray-300 border-l-4 border-l-blue-500 bg-white p-6">
119
  <h1 class="text-2xl font-semibold tracking-tight text-gray-900">{{ category | capitalize }}</h1>
120
 
121
  {% for article in articles %}