Browse Source

Options to switch smolrss themes

Bob Mottram 6 years ago
parent
commit
708e0b45ea
1 changed files with 17 additions and 2 deletions
  1. 17
    2
      src/freedombone-app-smolrss

+ 17
- 2
src/freedombone-app-smolrss View File

@@ -155,14 +155,17 @@ function smolrss_remove_feed {
155 155
 function configure_interactive_smolrss {
156 156
     W=(1 $"Add an RSS feed"
157 157
        2 $"Remove an RSS feed"
158
-       3 $'Edit all feeds')
158
+       3 $'Edit all feeds'
159
+       4 $'Light theme'
160
+       5 $'Dark theme')
159 161
 
160 162
     read_config_param SMOLRSS_DOMAIN_NAME
161 163
 
162 164
     while true
163 165
     do
166
+
164 167
         # shellcheck disable=SC2068
165
-        selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Smol RSS" --menu $"Choose an operation, or ESC for main menu:" 12 70 3 "${W[@]}" 3>&2 2>&1 1>&3)
168
+        selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Smol RSS" --menu $"Choose an operation, or ESC for main menu:" 14 70 5 "${W[@]}" 3>&2 2>&1 1>&3)
166 169
 
167 170
         if [ ! "$selection" ]; then
168 171
             break
@@ -177,6 +180,18 @@ function configure_interactive_smolrss {
177 180
                ./create_feeds feeds.txt > feeds.xml
178 181
                chown www-data:www-data feeds.txt
179 182
                ;;
183
+            4) cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || break
184
+               cp style.light.css style.css
185
+               chown www-data:www-data style.css
186
+               dialog --title $"Smol RSS theme" \
187
+                      --msgbox $"Switched theme to light" 6 50
188
+               ;;
189
+            5) cd "/var/www/$SMOLRSS_DOMAIN_NAME/htdocs" || break
190
+               cp style.dark.css style.css
191
+               chown www-data:www-data style.css
192
+               dialog --title $"Smol RSS theme" \
193
+                      --msgbox $"Switched theme to dark" 6 50
194
+               ;;
180 195
         esac
181 196
     done
182 197
 }