';
156 | } else if (modal.file.endsWith('youtube')) {
157 | modal.open = '
';
158 | modal.html = '
';
159 | }
160 |
161 | M.modal_body.html(modal.open + modal.html + modal.close);
162 | Modal.setMeta(modal);
163 | },
164 |
165 | setTextModal: function(el) {
166 | var modal = {
167 | open: '
',
168 | close: '
',
169 | file: el.attr("href"),
170 | uri: el.get(0).href,
171 | size: el.data("size")
172 | };
173 |
174 | if (!modal.file) return;
175 |
176 | Modal.setMeta(modal);
177 | M.modal_body.html(modal.open, modal.close);
178 | $("#text").load(modal.file);
179 | },
180 |
181 | setSourceModal: function(el) {
182 | var ext = el.attr("href")[0].split(".").pop();
183 |
184 | var modal = {
185 | open: '
',
186 | close: '
',
187 | file: el.attr("href"),
188 | uri: el.get(0).href,
189 | size: el.data("size")
190 | };
191 |
192 | if (!modal.file) return;
193 |
194 | Modal.setMeta(modal);
195 | M.modal_body.html(modal.open, modal.close);
196 |
197 | $("#source").load(modal.file, function() {
198 | // Fire auto-highlighter
199 | $("#source").each(function(i, block) {
200 | if(typeof(hljs) !== 'undefined') hljs.highlightBlock(block);
201 | // adjust pre background-color
202 | var background = $("code").css("background-color");
203 | $("pre").css("background-color", background);
204 | });
205 | });
206 | },
207 |
208 | setMeta: function(modal) {
209 | // Set meta
210 | M.full_view.attr("href", modal.file);
211 |
212 | // Set title
213 | M.modal_title.text(decodeFile(modal.file));
214 |
215 | // Set size
216 | meta = typeof modal.size !== 'undefined' ? modal.size : null;
217 | M.file_meta.text(meta);
218 |
219 | // Populate Dropbox drop-in
220 | M.dropbox.attr("href", modal.file);
221 |
222 | // Populate share buttons
223 | M.email.attr("href", "mailto:?body=" + modal.uri);
224 | M.twitter.attr("href", "http://twitter.com/share?url=" + modal.uri);
225 | M.facebook.attr("href", "http://www.facebook.com/sharer/sharer.php?u=" + modal.uri);
226 | M.google.attr("href", "https://plus.google.com/share?url=" + modal.uri);
227 | },
228 |
229 | // Stop HTML5 player
230 | stopPlayer: function() {
231 | var player = document.getElementById("player");
232 |
233 | if (player) {
234 | // soft pause
235 | player.pause();
236 |
237 | // hard pause
238 | player.src = "";
239 | }
240 | },
241 |
242 | reset: function() {
243 | var loader = sessionStorage.getItem("ListrLoader");
244 |
245 | // Empty modal body to stop playback in Firefox
246 | M.modal_body.html(loader);
247 | }
248 | };
--------------------------------------------------------------------------------
/src/js/search.js:
--------------------------------------------------------------------------------
1 | var S,
2 | Search = {
3 |
4 | elements: {
5 | input: $('#listr-search'),
6 | table: $("#listr-table")
7 | },
8 |
9 | init: function() {
10 | S = this.elements;
11 | this.events();
12 |
13 | // Set selector for jQuery.searcher
14 | $(S.table).searcher({
15 | inputSelector: "#listr-search"
16 | });
17 | },
18 |
19 | events: function() {
20 | $(S.input).keyup(function(event){
21 | Search.clearInput();
22 | });
23 | },
24 |
25 | // Clears input when pressing Esc-key
26 | clearInput: function() {
27 | if(event.keyCode == 27) {
28 | if (S.input.val() === '') {
29 | S.input.blur();
30 | } else {
31 | S.input.val('');
32 | }
33 | }
34 | }
35 | };
36 |
--------------------------------------------------------------------------------
/src/js/table.js:
--------------------------------------------------------------------------------
1 | if(jQuery().stupidtable) {
2 | var table = $("#listr-table").stupidtable();
3 | }
--------------------------------------------------------------------------------
/src/l10n/de_DE/LC_MESSAGES/messages.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idleberg/Bootstrap-Listr/cc1ec614b69f5bd4570586b6717aadff9cbf8779/src/l10n/de_DE/LC_MESSAGES/messages.mo
--------------------------------------------------------------------------------
/src/l10n/de_DE/LC_MESSAGES/messages.po:
--------------------------------------------------------------------------------
1 | # META
2 | msgid ""
3 | msgstr ""
4 | "Project-Id-Version: Bootstrap Listr 2.3.0\n"
5 | "Last Translator: Jan T. Sott\n"
6 | "Language: de\n"
7 | "MIME-Version: 1.0\n"
8 | "Content-Type: text/plain; charset=UTF-8\n"
9 | "Content-Transfer-Encoding: 8bit\n"
10 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
11 |
12 | # LABELS
13 | msgid "Index of %1$s"
14 | msgstr "Inhalt von %1$s"
15 |
16 | msgid "Name"
17 | msgstr "Name"
18 |
19 | msgid "Size"
20 | msgstr "Größe"
21 |
22 | msgid "Modified"
23 | msgstr "Geändert"
24 |
25 | # TIME
26 | msgid "%d second ago"
27 | msgstr "vor einer Sekunde"
28 |
29 | msgid_plural "%d seconds ago"
30 | msgstr "vor %d Sekunden"
31 |
32 | msgid "%d minute ago"
33 | msgstr "vor einer Minute"
34 |
35 | msgid "%d minutes ago"
36 | msgstr "vor %d Minuten"
37 |
38 | msgid "%d hour ago"
39 | msgstr "vor einer Stunde"
40 |
41 | msgid "%d hours ago"
42 | msgstr "vor %d Stunden"
43 |
44 | msgid "%d day ago"
45 | msgstr "vor einem Tag"
46 |
47 | msgid "%d days ago"
48 | msgstr "vor %d Tagen"
49 |
50 | msgid "%d week ago"
51 | msgstr "vor einer Woche"
52 |
53 | msgid "%d weeks ago"
54 | msgstr "vor %d Wochen"
55 |
56 | msgid "%d month ago"
57 | msgstr "vor einem Monat"
58 |
59 | msgid "%d months ago"
60 | msgstr "vor %d Monaten"
61 |
62 | msgid "%d year ago"
63 | msgstr "vor einem Jahr"
64 |
65 | msgid "%d years ago"
66 | msgstr "vor %d Jahren"
67 |
68 | msgid "%d decade ago"
69 | msgstr "vor einem Jahrzehnt"
70 |
71 | msgid "%d decades ago"
72 | msgstr "vor %d Jahrzehnten"
73 |
74 | # UNITS
75 | # bytes
76 | msgid "bytes"
77 | msgstr "Byte"
78 |
79 | # kilobytes (acronym)
80 | msgid "KB"
81 | msgstr "KB"
82 |
83 | # megabytes (acronym)
84 | msgid "MB"
85 | msgstr "MB"
86 |
87 | # gigabytes (acronym)
88 | msgid "GB"
89 | msgstr "GB"
90 |
91 | # terabytes (acronym)
92 | msgid "TB"
93 | msgstr "TB"
94 |
95 | # petabytes (acronym)
96 | msgid "PB"
97 | msgstr "PB"
98 |
99 | # exabytes (acronym)
100 | msgid "EB"
101 | msgstr "EB"
102 |
103 | # zettabytes (acronym)
104 | msgid "ZB"
105 | msgstr "ZB"
106 |
107 | # yottabytes (acronym)
108 | msgid "YB"
109 | msgstr "YB"
110 |
111 | msgid "empty folder"
112 | msgstr "leerer Ordner"
113 |
114 | # SUMMARY
115 | msgid "%1$s folder"
116 | msgstr "%1$s Ordner"
117 |
118 | msgid "%1$s folders"
119 | msgstr "%1$s Ordner"
120 |
121 | msgid "%1$s file, %2$s %3$s in total"
122 | msgstr "%1$s Datei, %2$s %3$s insgesamt"
123 |
124 | msgid "%1$s files, %2$s %3$s in total"
125 | msgstr "%1$s Dateien, %2$s %3$s insgesamt"
126 |
127 | msgid "%1$s folder and %2$s file, %3$s %4$s in total"
128 | msgstr "%1$s Ordner und %2$s Datei, %3$s %4$s insgesamt"
129 |
130 | msgid "%1$s folder and %2$s files, %3$s %4$s in total"
131 | msgstr "%1$s Ordner und %2$s Dateien, %3$s %4$s insgesamt"
132 |
133 | msgid "%1$s folders and %2$s file, %3$s %4$s in total"
134 | msgstr "%1$s Ordner und %2$s Datei, %3$s %4$s insgesamt"
135 |
136 | msgid "%1$s folders and %2$s files, %3$s %4$s in total"
137 | msgstr "%1$s Ordner und %2$s Dateien, %3$s %4$s insgesamt"
138 |
139 | # MODAL
140 | msgid "Apply syntax highlighting"
141 | msgstr "Syntaxhervorhebung anwenden"
142 |
143 | msgid "View"
144 | msgstr "Ansehen"
145 |
146 | msgid "Listen"
147 | msgstr "Anhören"
148 |
149 | msgid "Download"
150 | msgstr "Herunterladen"
151 |
152 | msgid "Open"
153 | msgstr "Öffnen"
154 |
155 | msgid "Close"
156 | msgstr "Schließen"
157 |
158 | msgid "Search"
159 | msgstr "Suche"
160 |
161 | msgid "Loading"
162 | msgstr "Lade"
163 |
164 | msgid "Save to Dropbox"
165 | msgstr "In Dropbox speichern"
166 |
167 | # ALERT
168 | msgid "Error 404: Not found"
169 | msgstr "Fehler 404: Nicht gefunden"
170 |
171 | msgid "The file "%1$s" was not found on this server. You have been automatically forwarded to the start page."
172 | msgstr "Die Datei "%1$s" konnte nicht auf dem Server gefunden werden. Wird haben Sie deshalb automatisch auf die Startseite weitergeleitet."
173 |
174 | # KUDOS
175 | msgid "Fork me on GitHub"
176 | msgstr "Fork’ mich auf GitHub"
177 |
--------------------------------------------------------------------------------
/src/l10n/es_ES/LC_MESSAGES/messages.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idleberg/Bootstrap-Listr/cc1ec614b69f5bd4570586b6717aadff9cbf8779/src/l10n/es_ES/LC_MESSAGES/messages.mo
--------------------------------------------------------------------------------
/src/l10n/es_ES/LC_MESSAGES/messages.po:
--------------------------------------------------------------------------------
1 | # META
2 | msgid ""
3 | msgstr ""
4 | "Project-Id-Version: Bootstrap Listr 2.0.1\n"
5 | "Last Translator: Gengo.com/Translator #96897\n"
6 | "Language: es\n"
7 | "MIME-Version: 1.0\n"
8 | "Content-Type: text/plain; charset=UTF-8\n"
9 | "Content-Transfer-Encoding: 8bit\n"
10 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
11 |
12 | # LABELS
13 | msgid "Index of %1$s%2$s"
14 | msgstr "Índice de %1$s%2$s"
15 |
16 | msgid "Name"
17 | msgstr "Nombre"
18 |
19 | msgid "Size"
20 | msgstr "Tamaño"
21 |
22 | msgid "Modified"
23 | msgstr "Modificado"
24 |
25 | # TIME
26 | msgid "%d second ago"
27 | msgstr "hace un segundo"
28 |
29 | msgid_plural "%d seconds ago"
30 | msgstr "hace %d segundos"
31 |
32 | msgid "%d minute ago"
33 | msgstr "hace un minuto"
34 |
35 | msgid "%d minutes ago"
36 | msgstr "hace %d minutos"
37 |
38 | msgid "%d hour ago"
39 | msgstr "hace un hora"
40 |
41 | msgid "%d hours ago"
42 | msgstr "hace %d horas"
43 |
44 | msgid "%d day ago"
45 | msgstr "hace un día"
46 |
47 | msgid "%d days ago"
48 | msgstr "hace %d días"
49 |
50 | msgid "%d week ago"
51 | msgstr "hace un semana"
52 |
53 | msgid "%d weeks ago"
54 | msgstr "hace %d semanas"
55 |
56 | msgid "%d month ago"
57 | msgstr "hace un mes"
58 |
59 | msgid "%d months ago"
60 | msgstr "hace %d meses"
61 |
62 | msgid "%d year ago"
63 | msgstr "hace un año"
64 |
65 | msgid "%d years ago"
66 | msgstr "hace %d años"
67 |
68 | msgid "%d decade ago"
69 | msgstr "hace un década"
70 |
71 | msgid "%d decades ago"
72 | msgstr "hace %d décadas"
73 |
74 | # UNITS
75 | # bytes
76 | msgid "bytes"
77 | msgstr "bytes"
78 |
79 | # kilobytes (acronym)
80 | msgid "KB"
81 | msgstr "KB"
82 |
83 | # megabytes (acronym)
84 | msgid "MB"
85 | msgstr "MB"
86 |
87 | # gigabytes (acronym)
88 | msgid "GB"
89 | msgstr "GB"
90 |
91 | # terabytes (acronym)
92 | msgid "TB"
93 | msgstr "TB"
94 |
95 | # petabytes (acronym)
96 | msgid "PB"
97 | msgstr "PB"
98 |
99 | # exabytes (acronym)
100 | msgid "EB"
101 | msgstr "EB"
102 |
103 | # zettabytes (acronym)
104 | msgid "ZB"
105 | msgstr "ZB"
106 |
107 | # yottabytes (acronym)
108 | msgid "YB"
109 | msgstr "YB"
110 |
111 | msgid "empty folder"
112 | msgstr "vaciar carpeta"
113 |
114 | # summary
115 | msgid "%1$s folder and %2$s file, %3$s %4$s in total"
116 | msgstr "%1$s carpeta y %2$s archivo, %3$s %4$s en total"
117 |
118 | msgid "%1$s folder and %2$s files, %3$s %4$s in total"
119 | msgstr "%1$s carpeta y %2$s archivos, %3$s %4$s en total"
120 |
121 | msgid "%1$s folders and %2$s file, %3$s %4$s in total"
122 | msgstr "%1$s carpetas y %2$s archivo, %3$s %4$s en total"
123 |
124 | msgid "%1$s folders and %2$s files, %3$s %4$s in total"
125 | msgstr "%1$s carpetas y %2$s archivos, %3$s %4$s en total"
126 |
127 | msgid "%1$s folder"
128 | msgstr "%1$s carpeta"
129 |
130 | msgid "%1$s folders"
131 | msgstr "%1$s carpetas"
132 |
133 | msgid "%1$s file, %2$s %3$s in total"
134 | msgstr "%1$s archivo, %2$s %3$s en total"
135 |
136 | msgid "%1$s files, %2$s %3$s in total"
137 | msgstr "%1$s archivos, %2$s %3$s en total"
138 |
139 | msgid "Apply syntax highlighting"
140 | msgstr "Aplicar coloreado de sintaxis"
141 |
142 | msgid "View"
143 | msgstr "Ver"
144 |
145 | msgid "Listen"
146 | msgstr "Escuchar"
147 |
148 | msgid "Download"
149 | msgstr "Descarga"
150 |
151 | msgid "Open"
152 | msgstr "Abrir"
153 |
154 | msgid "Close"
155 | msgstr "Cerrar"
156 |
157 | msgid "Search"
158 | msgstr "Buscar"
159 |
160 | msgid "Loading"
161 | msgstr "Cargando"
162 |
163 | msgid "Guardar en Dropbox"
164 | msgstr "Enregistrer sur Dropbox"
165 |
166 | # ALERT
167 | msgid "Error 404: Not found"
168 | msgstr "Error 404: No encontrado"
169 |
170 | msgid "The file "%1$s" was not found on this server. You have been automatically forwarded to the start page."
171 | msgstr "El archivo "%1$s" no se ha encontrado en este servidor. Serás automáticamente redirigido a la página de inicio"
172 |
173 | # GITHUB
174 | msgid "Fork me on GitHub"
175 | msgstr "Encontrame en GitHub"
--------------------------------------------------------------------------------
/src/l10n/fr_FR/LC_MESSAGES/messages.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idleberg/Bootstrap-Listr/cc1ec614b69f5bd4570586b6717aadff9cbf8779/src/l10n/fr_FR/LC_MESSAGES/messages.mo
--------------------------------------------------------------------------------
/src/l10n/fr_FR/LC_MESSAGES/messages.po:
--------------------------------------------------------------------------------
1 | # META
2 | msgid ""
3 | msgstr ""
4 | "Project-Id-Version: Bootstrap Listr 2.3.0\n"
5 | "Last Translator: Gengo.com/Translator #6377\n"
6 | "Language: fr\n"
7 | "MIME-Version: 1.0\n"
8 | "Content-Type: text/plain; charset=UTF-8\n"
9 | "Content-Transfer-Encoding: 8bit\n"
10 | "Plural-Forms: nplurals=2; plural=(n > 1);\n"
11 |
12 | # LABELS
13 | msgid "Index of %1$s%2$s"
14 | msgstr "Indice de %1$s%2$s"
15 |
16 | msgid "Name"
17 | msgstr "Nom"
18 |
19 | msgid "Size"
20 | msgstr "Taille"
21 |
22 | msgid "Modified"
23 | msgstr "Modifié"
24 |
25 | # TIME
26 | msgid "%d second ago"
27 | msgstr "il y a une seconde"
28 |
29 | msgid_plural "%d seconds ago"
30 | msgstr "il y a %d secondes"
31 |
32 | msgid "%d minute ago"
33 | msgstr "il y a une minute"
34 |
35 | msgid "%d minutes ago"
36 | msgstr "il y a %d minutes"
37 |
38 | msgid "%d hour ago"
39 | msgstr "il y a une heure"
40 |
41 | msgid "%d hours ago"
42 | msgstr "il y a %d heures"
43 |
44 | msgid "%d day ago"
45 | msgstr "il y a une jour"
46 |
47 | msgid "%d days ago"
48 | msgstr "il y a %d jours"
49 |
50 | msgid "%d week ago"
51 | msgstr "il y a une semaine"
52 |
53 | msgid "%d weeks ago"
54 | msgstr "il y a %d semaines"
55 |
56 | msgid "%d month ago"
57 | msgstr "il y a une mois"
58 |
59 | msgid "%d months ago"
60 | msgstr "il y a %d mois"
61 |
62 | msgid "%d year ago"
63 | msgstr "il y a une année"
64 |
65 | msgid "%d years ago"
66 | msgstr "il y a %d années"
67 |
68 | msgid "%d decade ago"
69 | msgstr "il y a une décade"
70 |
71 | msgid "%d decades ago"
72 | msgstr "il y a %d décades"
73 |
74 | # UNITS
75 | # bytes
76 | msgid "bytes"
77 | msgstr "octets"
78 |
79 | # kilobytes (acronym)
80 | msgid "KB"
81 | msgstr "Ko"
82 |
83 | # megabytes (acronym)
84 | msgid "MB"
85 | msgstr "Mo"
86 |
87 | # gigabytes (acronym)
88 | msgid "GB"
89 | msgstr "Go"
90 |
91 | # terabytes (acronym)
92 | msgid "TB"
93 | msgstr "To"
94 |
95 | # petabytes (acronym)
96 | msgid "PB"
97 | msgstr "Po"
98 |
99 | # exabytes (acronym)
100 | msgid "EB"
101 | msgstr "Eo"
102 |
103 | # zettabytes (acronym)
104 | msgid "ZB"
105 | msgstr "Zo"
106 |
107 | # yottabytes (acronym)
108 | msgid "YB"
109 | msgstr "Yo"
110 |
111 | msgid "empty folder"
112 | msgstr "répertoire vide"
113 |
114 | # summary
115 | msgid "%1$s folder and %2$s file, %3$s %4$s in total"
116 | msgstr "%1$s répertoire et %2$s fichier, %3$s %4$s au total"
117 |
118 | msgid "%1$s folder and %2$s files, %3$s %4$s in total"
119 | msgstr "%1$s répertoire et %2$s fichiers, %3$s %4$s au total"
120 |
121 | msgid "%1$s folders and %2$s file, %3$s %4$s in total"
122 | msgstr "%1$s répertoires et %2$s fichier, %3$s %4$s au total"
123 |
124 | msgid "%1$s folders and %2$s files, %3$s %4$s in total"
125 | msgstr "%1$s répertoires et %2$s fichiers, %3$s %4$s au total"
126 |
127 | msgid "%1$s folder"
128 | msgstr "%1$s répertoire"
129 |
130 | msgid "%1$s folders"
131 | msgstr "%1$s répertoires"
132 |
133 | msgid "%1$s file, %2$s %3$s in total"
134 | msgstr "%1$s fichier, %2$s %3$s au total"
135 |
136 | msgid "%1$s files, %2$s %3$s in total"
137 | msgstr "%1$s fichiers, %2$s %3$s au total"
138 |
139 | msgid "Apply syntax highlighting"
140 | msgstr "Appliquer la coloration syntaxique"
141 |
142 | msgid "View"
143 | msgstr "Voir"
144 |
145 | msgid "Listen"
146 | msgstr "Écouter"
147 |
148 | msgid "Download"
149 | msgstr "Télécharger"
150 |
151 | msgid "Open"
152 | msgstr "Ouvrir"
153 |
154 | msgid "Close"
155 | msgstr "Fermer"
156 |
157 | msgid "Search"
158 | msgstr "Rechercher"
159 |
160 | msgid "Loading"
161 | msgstr "Chargement"
162 |
163 | msgid "Save to Dropbox"
164 | msgstr "Enregistrer sur Dropbox"
165 |
166 | # ALERT
167 | msgid "Error 404: Not found"
168 | msgstr "Erreur 404: Introuvable"
169 |
170 | msgid "The file "%1$s" was not found on this server. You have been automatically forwarded to the start page."
171 | msgstr "Le fichier "%1$s" est introuvable sur ce serveur. Vous avez été automatiquement redirigé vers la page d'accueil."
172 |
173 | # GITHUB
174 | msgid "Fork me on GitHub"
175 | msgstr "Faire un fork sur GitHub"
176 |
--------------------------------------------------------------------------------
/src/l10n/nl_NL/LC_MESSAGES/messages.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idleberg/Bootstrap-Listr/cc1ec614b69f5bd4570586b6717aadff9cbf8779/src/l10n/nl_NL/LC_MESSAGES/messages.mo
--------------------------------------------------------------------------------
/src/l10n/nl_NL/LC_MESSAGES/messages.po:
--------------------------------------------------------------------------------
1 | # META
2 | msgid ""
3 | msgstr ""
4 | "Project-Id-Version: Bootstrap Listr 2.3.0\n"
5 | "Last Translator: Maarten van Eeden\n"
6 | "Language: nl\n"
7 | "MIME-Version: 1.0\n"
8 | "Content-Type: text/plain; charset=UTF-8\n"
9 | "Content-Transfer-Encoding: 8bit\n"
10 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
11 |
12 | # LABELS
13 | msgid "Index of %1$s%2$s"
14 | msgstr "Inhoud van %1$s%2$s"
15 |
16 | msgid "Name"
17 | msgstr "Naam"
18 |
19 | msgid "Size"
20 | msgstr "Grootte"
21 |
22 | msgid "Modified"
23 | msgstr "Gewijzigd"
24 |
25 | # TIME
26 | msgid "%d second ago"
27 | msgstr "%d seconde geleden"
28 |
29 | msgid_plural "%d seconds ago"
30 | msgstr "%d seconden geleden"
31 |
32 | msgid "%d minute ago"
33 | msgstr "%d minuut geleden"
34 |
35 | msgid "%d minutes ago"
36 | msgstr "%d minuten geleden"
37 |
38 | msgid "%d hour ago"
39 | msgstr "%d uur geleden"
40 |
41 | msgid "%d hours ago"
42 | msgstr "%d uur geleden"
43 |
44 | msgid "%d day ago"
45 | msgstr "%d dag geleden"
46 |
47 | msgid "%d days ago"
48 | msgstr "%d dagen geleden"
49 |
50 | msgid "%d week ago"
51 | msgstr "%d week geleden"
52 |
53 | msgid "%d weeks ago"
54 | msgstr "%d weken geleden"
55 |
56 | msgid "%d month ago"
57 | msgstr "%d maand geleden"
58 |
59 | msgid "%d months ago"
60 | msgstr "%d maanden geleden"
61 |
62 | msgid "%d year ago"
63 | msgstr "%d jaar geleden"
64 |
65 | msgid "%d years ago"
66 | msgstr "%d jaar geleden"
67 |
68 | msgid "%d decade ago"
69 | msgstr "tiental geleden"
70 |
71 | msgid "%d decades ago"
72 | msgstr "%d tiental geleden"
73 |
74 | # UNITS
75 | # bytes
76 | msgid "bytes"
77 | msgstr "Byte"
78 |
79 | # kilobytes (acronym)
80 | msgid "KB"
81 | msgstr "KB"
82 |
83 | # megabytes (acronym)
84 | msgid "MB"
85 | msgstr "MB"
86 |
87 | # gigabytes (acronym)
88 | msgid "GB"
89 | msgstr "GB"
90 |
91 | # terabytes (acronym)
92 | msgid "TB"
93 | msgstr "TB"
94 |
95 | # petabytes (acronym)
96 | msgid "PB"
97 | msgstr "PB"
98 |
99 | # exabytes (acronym)
100 | msgid "EB"
101 | msgstr "EB"
102 |
103 | # zettabytes (acronym)
104 | msgid "ZB"
105 | msgstr "ZB"
106 |
107 | # yottabytes (acronym)
108 | msgid "YB"
109 | msgstr "YB"
110 |
111 | msgid "empty folder"
112 | msgstr "lege map"
113 |
114 | # SUMMARY
115 | msgid "%1$s folder"
116 | msgstr "%1$s map"
117 |
118 | msgid "%1$s folders"
119 | msgstr "%1$s mappen"
120 |
121 | msgid "%1$s file, %2$s %3$s in total"
122 | msgstr "%1$s bestand, %2$s %3$s in totaal"
123 |
124 | msgid "%1$s files, %2$s %3$s in total"
125 | msgstr "%1$s bestanden, %2$s %3$s in totaal"
126 |
127 | msgid "%1$s folder and %2$s file, %3$s %4$s in total"
128 | msgstr "%1$s map en %2$s bestand, %3$s %4$s in totaal"
129 |
130 | msgid "%1$s folder and %2$s files, %3$s %4$s in total"
131 | msgstr "%1$s map en %2$s bestanden, %3$s %4$s in totaal"
132 |
133 | msgid "%1$s folders and %2$s file, %3$s %4$s in total"
134 | msgstr "%1$s mappen en %2$s bestand, %3$s %4$s in totaal"
135 |
136 | msgid "%1$s folders and %2$s files, %3$s %4$s in total"
137 | msgstr "%1$s mappen en %2$s bestanden, %3$s %4$s in totaal"
138 |
139 | # MODAL
140 | msgid "Apply syntax highlighting"
141 | msgstr "Accentuering toepassen"
142 |
143 | msgid "View"
144 | msgstr "Bekijken"
145 |
146 | msgid "Listen"
147 | msgstr "Luisteren"
148 |
149 | msgid "Download"
150 | msgstr "Downloaden"
151 |
152 | msgid "Open"
153 | msgstr "Openen"
154 |
155 | msgid "Close"
156 | msgstr "Sluiten"
157 |
158 | msgid "Search"
159 | msgstr "Zoeken"
160 |
161 | msgid "Loading"
162 | msgstr "Bezig met laden"
163 |
164 | msgid "Save to Dropbox"
165 | msgstr "In Dropbox opslaan"
166 |
167 | # ALERT
168 | msgid "Error 404: Not found"
169 | msgstr "Fout 404: Niet gevonden"
170 |
171 | msgid "The file "%1$s" was not found on this server. You have been automatically forwarded to the start page."
172 | msgstr "Het bestand "%1$s" is niet gevonden op deze server. Je werd automatisch doorverwezen naar de startpagina."
173 |
174 | # KUDOS
175 | msgid "Fork me on GitHub"
176 | msgstr "Fork mij op Github"
177 |
--------------------------------------------------------------------------------
/src/l10n/pt_PT/LC_MESSAGES/messages.mo:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/idleberg/Bootstrap-Listr/cc1ec614b69f5bd4570586b6717aadff9cbf8779/src/l10n/pt_PT/LC_MESSAGES/messages.mo
--------------------------------------------------------------------------------
/src/l10n/pt_PT/LC_MESSAGES/messages.po:
--------------------------------------------------------------------------------
1 | # META
2 | msgid ""
3 | msgstr ""
4 | "Project-Id-Version: Bootstrap Listr 2.3.0\n"
5 | "Last Translator: Gengo.com/Translators #48973 & #48869\n"
6 | "Language: pt\n"
7 | "MIME-Version: 1.0\n"
8 | "Content-Type: text/plain; charset=UTF-8\n"
9 | "Content-Transfer-Encoding: 8bit\n"
10 | "Plural-Forms: nplurals=2; plural=(n != 1);\n"
11 |
12 | # LABELS
13 | msgid "Index of %1$s%2$s"
14 | msgstr "Índice do %1$s%2$s"
15 |
16 | msgid "Name"
17 | msgstr "Nome"
18 |
19 | msgid "Size"
20 | msgstr "Tamanho"
21 |
22 | msgid "Modified"
23 | msgstr "Modificado"
24 |
25 | # TIME
26 | msgid "%d second ago"
27 | msgstr "há um segundo"
28 |
29 | msgid_plural "%d seconds ago"
30 | msgstr "há %d segundos"
31 |
32 | msgid "%d minute ago"
33 | msgstr "há um minuto"
34 |
35 | msgid "%d minutes ago"
36 | msgstr "há %d minutos"
37 |
38 | msgid "%d hour ago"
39 | msgstr "há um hora"
40 |
41 | msgid "%d hours ago"
42 | msgstr "há %d horas"
43 |
44 | msgid "%d day ago"
45 | msgstr "há um dia"
46 |
47 | msgid "%d days ago"
48 | msgstr "há %d dias"
49 |
50 | msgid "%d week ago"
51 | msgstr "há um semana"
52 |
53 | msgid "%d weeks ago"
54 | msgstr "há %d semanas"
55 |
56 | msgid "%d month ago"
57 | msgstr "há um mes"
58 |
59 | msgid "%d months ago"
60 | msgstr "há %d meses"
61 |
62 | msgid "%d year ago"
63 | msgstr "há um ano"
64 |
65 | msgid "%d years ago"
66 | msgstr "há %d anos"
67 |
68 | msgid "%d decade ago"
69 | msgstr "há um década"
70 |
71 | msgid "%d decades ago"
72 | msgstr "há %d décadas"
73 |
74 | # UNITS
75 | # bytes
76 | msgid "bytes"
77 | msgstr "bytes"
78 |
79 | # kilobytes (acronym)
80 | msgid "KB"
81 | msgstr "KB"
82 |
83 | # megabytes (acronym)
84 | msgid "MB"
85 | msgstr "MB"
86 |
87 | # gigabytes (acronym)
88 | msgid "GB"
89 | msgstr "GB"
90 |
91 | # terabytes (acronym)
92 | msgid "TB"
93 | msgstr "TB"
94 |
95 | # petabytes (acronym)
96 | msgid "PB"
97 | msgstr "PB"
98 |
99 | # exabytes (acronym)
100 | msgid "EB"
101 | msgstr "EB"
102 |
103 | # zettabytes (acronym)
104 | msgid "ZB"
105 | msgstr "ZB"
106 |
107 | # yottabytes (acronym)
108 | msgid "YB"
109 | msgstr "YB"
110 |
111 | msgid "empty folder"
112 | msgstr "pasta vazia"
113 |
114 | # summary
115 | msgid "%1$s folder and %2$s file, %3$s %4$s in total"
116 | msgstr "%1$s pasta e %2$s ficheiro, %3$s %4$s no total"
117 |
118 | msgid "%1$s folder and %2$s files, %3$s %4$s in total"
119 | msgstr "%1$s pasta e %2$s ficheiros, %3$s %4$s no total"
120 |
121 | msgid "%1$s folders and %2$s file, %3$s %4$s in total"
122 | msgstr "%1$s pastas e %2$s ficheiro, %3$s %4$s no total"
123 |
124 | msgid "%1$s folders and %2$s files, %3$s %4$s in total"
125 | msgstr "%1$s pastas e %2$s ficheiros, %3$s %4$s no total"
126 |
127 | msgid "%1$s folder"
128 | msgstr "%1$s pasta"
129 |
130 | msgid "%1$s folders"
131 | msgstr "%1$s pastas"
132 |
133 | msgid "%1$s file, %2$s %3$s in total"
134 | msgstr "%1$s ficheiro, %2$s %3$s no total"
135 |
136 | msgid "%1$s files, %2$s %3$s in total"
137 | msgstr "%1$s ficheiros, %2$s %3$s no total"
138 |
139 | msgid "Apply syntax highlighting"
140 | msgstr "Aplicar destaque de sintaxe"
141 |
142 | msgid "View"
143 | msgstr "Ver"
144 |
145 | msgid "Listen"
146 | msgstr "Ouvir"
147 |
148 | msgid "Download"
149 | msgstr "Baixar"
150 |
151 | msgid "Open"
152 | msgstr "Abrir"
153 |
154 | msgid "Close"
155 | msgstr "Fechar"
156 |
157 | msgid "Search"
158 | msgstr "Procurar"
159 |
160 | msgid "Loading"
161 | msgstr "Carregar"
162 |
163 | msgid "Guardar en Dropbox"
164 | msgstr "Gravar na Dropbox"
165 |
166 | # ALERT
167 | msgid "Error 404: Not found"
168 | msgstr "Erro 404: Não Encontrado"
169 |
170 | msgid "The file "%1$s" was not found on this server. You have been automatically forwarded to the start page."
171 | msgstr "O ficheiro "%1$s" não foi encontrado neste servidor. Foi direcionado automaticamente para a página inicial."
172 |
173 | # GITHUB
174 | msgid "Fork me on GitHub"
175 | msgstr "Encontra-me no GitHub"
--------------------------------------------------------------------------------
/src/listr-functions.php:
--------------------------------------------------------------------------------
1 | " . PHP_EOL;
33 | $header .= "
" . PHP_EOL;
34 | $header .= "
" . PHP_EOL;
35 | $header .= "
" . PHP_EOL;
36 | $header .= "
".$index."" . PHP_EOL;
37 |
38 | // Set iOS touch icon sizes (https://developer.apple.com/library/ios/documentation/UserExperience/Conceptual/MobileHIG/IconMatrix.html)
39 | $size_iphone = "57x57";
40 | $size_ipad = "72x72";
41 | $size_iphone_retina = "114x114";
42 | $size_ipad_retina = "144x144";
43 |
44 | if ($options['icons']['fav_icon']) $header .= "
" . PHP_EOL;
45 | if ($options['icons']['iphone']) $header .= "
" . PHP_EOL;
46 | if ($options['icons']['ipad']) $header .= "
" . PHP_EOL;
47 | if ($options['icons']['iphone_retina']) $header .= "
" . PHP_EOL;
48 | if ($options['icons']['ipad_retina']) $header .= "
" . PHP_EOL;
49 | if ($options['icons']['metro_tile_color']) $header .= "
" . PHP_EOL;
50 | if ($options['icons']['metro_tile_image']) $header .= "
" . PHP_EOL;
51 | if ($options['opengraph']['title']) $header .= "
" . PHP_EOL;
52 | if ($options['opengraph']['description']) $header .= "
" . PHP_EOL;
53 | if ($options['opengraph']['site_name']) $header .= "
" . PHP_EOL;
54 |
55 | if ($options['keys']['google_analytics'] !== null ) {
56 | $header .= " " . PHP_EOL;
57 | }
58 |
59 | $protocol = get_protocol();
60 | $server = get_server();
61 |
62 | if ($options['general']['concat_assets'] === true) {
63 | $header .= "
" . PHP_EOL;
64 | } else {
65 |
66 | // Font Awesome CSS
67 | if ( $options['bootstrap']['icons'] == 'fontawesome' || $options['bootstrap']['icons'] == 'fa' || $options['bootstrap']['icons'] == 'fa-files' ) {
68 | $header .= "
". PHP_EOL;
69 | } else if ($options['bootstrap']['icons'] == 'github') {
70 | $header .= "
". PHP_EOL;
71 | }
72 |
73 | // Bootstrap CSS
74 | $header .= "
" . PHP_EOL;
75 |
76 | // Highlight.js CSS
77 | if ( ($options['general']['enable_viewer']) && ($options['general']['enable_highlight'] === true) ) {
78 | $highlight_css = str_replace("%theme%",$options['highlight']['theme'],$options['assets']['highlight_css']);
79 | $header .= "
" . PHP_EOL;
80 | }
81 |
82 | // Listr CSS
83 | $header .= "
" . PHP_EOL;
84 | }
85 |
86 | // Prepend JS
87 | foreach($options['assets']['prepend_js'] as $prepend_js) {
88 | if (is_array($prepend_js)) {
89 | $footer .= " " . PHP_EOL;
90 | } else if ($prepend_js !== null) {
91 | $footer .= " " . PHP_EOL;
92 | }
93 | }
94 |
95 | // Append CSS
96 | foreach($options['assets']['append_css'] as $append_css) {
97 | if ($append_css !== null) {
98 | $header .= "
" . PHP_EOL;
99 | }
100 | }
101 |
102 | if ($options['assets']['google_font']) {
103 | $header .= "
" . PHP_EOL;
104 | }
105 |
106 | return $header;
107 |
108 | }
109 |
110 | // Set HTML footer
111 | function set_footer(){
112 |
113 | $footer = null;
114 | global $options;
115 |
116 | $server = get_server();
117 |
118 | // jQuery
119 | if ( ($options['general']['enable_sort']) || ($options['general']['enable_viewer']) ) {
120 | $footer .= " " . PHP_EOL;
121 | }
122 |
123 | // Dropbox Dropins
124 | if( ($options['general']['enable_viewer']) && ($options['general']['share_button']) && ($options['keys']['dropbox'] !== null ) ){
125 | $footer .= " " . PHP_EOL;
126 | }
127 |
128 | $protocol = get_protocol();
129 |
130 | if ($options['general']['concat_assets'] === true) {
131 | if ($options['general']['enable_viewer'] === true) {
132 | $footer .= " " . PHP_EOL;
133 | }
134 | $footer .= " " . PHP_EOL;
135 | } else {
136 |
137 | // Stupid Table
138 | if ( ($options['general']['enable_sort'] === true) && ($options['assets']['stupid_table']) ) {
139 | $footer .= " " . PHP_EOL;
140 | }
141 |
142 | // jQuery Searcher
143 | if ( ($options['general']['enable_search'] === true) && ($options['assets']['jquery_searcher']) ) {
144 | $footer .= " " . PHP_EOL;
145 | }
146 |
147 | // Modal Viewer
148 | if ($options['general']['enable_viewer'] === true) {
149 | $footer .= " " . PHP_EOL;
150 |
151 | // Highlighter.js
152 | if ( ($options['general']['enable_highlight'] === true) && ($options['assets']['highlight_css']) && ($options['assets']['highlight_js']) ) {
153 | $footer .= " " . PHP_EOL;
154 | }
155 | }
156 |
157 | $footer .= " " . PHP_EOL;
158 | }
159 |
160 | // Append JS
161 | foreach($options['assets']['append_js'] as $append_js) {
162 | if (is_array($append_js)) {
163 | $footer .= " " . PHP_EOL;
164 | } else if ($append_js !== null) {
165 | $footer .= " " . PHP_EOL;
166 | }
167 | }
168 |
169 | // Bootlint
170 | if ($options['debug']['bootlint'] === true) {
171 | $footer .= " " . PHP_EOL;
172 | }
173 |
174 | return $footer;
175 | }
176 |
177 | function get_protocol() {
178 | if ($_SERVER['HTTPS']) {
179 | return "https://";
180 | } else {
181 | return "http://";
182 | }
183 | }
184 |
185 | function get_server() {
186 |
187 | global $options;
188 |
189 | $protocol = get_protocol();
190 |
191 | if ($options['general']['local_assets'] === true) {
192 | return $protocol.$_SERVER['SERVER_NAME'].dirname($_SERVER['PHP_SELF'])."/";
193 | }
194 | return null;
195 | }
196 |
197 | function load_iconset($input = "fa") {
198 |
199 | // Allow icon aliases
200 | if ( $input === 'fontawesome' || $input === 'font-awesome' ) {
201 | $input = "fa";
202 | }
203 |
204 | // Does icon set exist?
205 | if( file_exists('themes/'.$input.'.json')) {
206 | $iconset = json_decode(file_get_contents('themes/'.$input.'.json'), true);
207 | return $iconset;
208 | } else {
209 | throw new Exception($input.'.json not found');
210 | }
211 | }
212 |
213 | function set_404_error($root_dir, $file, $http = "1.1") {
214 | $file = htmlentities(rawurlencode($file));
215 | header("Location: " . $root_dir."?404=".$file);
216 | exit;
217 | }
218 |
219 | function is_error() {
220 | if ($options['bootstrap']['alert_404'] !== null) {
221 | $alert_404 = $options['bootstrap']['alert_404'];
222 | } else {
223 | $alert_404 = "alert-warning";
224 | }
225 |
226 | if ($_GET["404"]) {
227 | $close = _("Close");
228 | $error_title = _("Error 404: Not found");
229 | $error_detail = sprintf(_('The file "%1$s" was not found on this server. You have been automatically forwarded to the start page.'), $_GET["404"]);
230 |
231 | echo "
".PHP_EOL;
232 | echo " ".PHP_EOL;
233 | echo " $error_title
$error_detail".PHP_EOL;
234 | echo "
".PHP_EOL;
235 | }
236 | }
237 |
238 | function utf8ify($str) {
239 | if (is_file(!utf8_decode($str))) {
240 | return utf8_encode($str);
241 | } else {
242 | return $str;
243 | }
244 | }
245 |
246 | /**
247 | * @ http://php.net/manual/en/function.usort.php#116264
248 | */
249 | function natural_sort( &$data_array, $keys, $reverse=false, $ignorecase=false ) {
250 | // make sure $keys is an array
251 | if (!is_array($keys)) $keys = array($keys);
252 | usort($data_array, sort_compare($keys, $reverse, $ignorecase) );
253 | }
254 |
255 | function sort_compare($keys, $reverse=false, $ignorecase=false) {
256 | return function ($a, $b) use ($keys, $reverse, $ignorecase) {
257 | $cnt=0;
258 | // check each key in the order specified
259 | foreach ( $keys as $key ) {
260 | // check the value for ignorecase and do natural compare accordingly
261 | $ignore = is_array($ignorecase) ? $ignorecase[$cnt] : $ignorecase;
262 | $result = $ignore ? strnatcasecmp ($a[$key], $b[$key]) : strnatcmp($a[$key], $b[$key]);
263 | // check the value for reverse and reverse the sort order accordingly
264 | $revcmp = is_array($reverse) ? $reverse[$cnt] : $reverse;
265 | $result = $revcmp ? ($result * -1) : $result;
266 | // the first key that results in a non-zero comparison determines
267 | // the order of the elements
268 | if ( $result != 0 ) break;
269 | $cnt++;
270 | }
271 | return $result;
272 | };
273 | }
274 |
275 | /**
276 | * @ http://us3.php.net/manual/en/function.filesize.php#84652
277 | */
278 | function bytes_to_string($size, $precision = 0) {
279 | $sizes = array(_('YB'), _('ZB'), _('EB'), _('PB'), _('TB'), _('GB'), _('MB'), _('KB'), _('bytes'));
280 | $total = count($sizes);
281 | while($total-- && $size > 1024) $size /= 1024;
282 | $return['num'] = round($size, $precision);
283 | $return['str'] = $sizes[$total];
284 | return $return;
285 | }
286 |
287 | /**
288 | * @ http://css-tricks.com/snippets/php/time-ago-function/
289 | */
290 | function time_ago($tm,$rcs = 0) {
291 | $cur_tm = time(); $dif = $cur_tm-$tm;
292 | $pds = array('second','minute','hour','day','week','month','year','decade');
293 | $lngh = array(1,60,3600,86400,604800,2630880,31570560,315705600);
294 | for($v = sizeof($lngh)-1; ($v >= 0)&&(($no = $dif/$lngh[$v])<=1); $v--); if($v < 0) $v = 0; $_tm = $cur_tm-($dif%$lngh[$v]);
295 |
296 | $no = floor($no); if($no <> 1) $pds[$v] .='s';
297 | $x=sprintf(_(sprintf('%%d %s ago', $pds[$v])), $no);
298 | if(($rcs == 1)&&($v >= 1)&&(($cur_tm-$_tm) > 0)) $x .= time_ago($_tm);
299 | return $x;
300 | }
301 |
302 | /**
303 | * @ http://teddy.fr/2007/11/28/how-serve-big-files-through-php/
304 | */
305 |
306 | // Read a file and display its content chunk by chunk
307 | function readfile_chunked($filename, $retbytes = TRUE) {
308 | $chunksize = 1024*1024;
309 | $buffer = '';
310 | $count =0;
311 | $handle = fopen($filename, 'rb');
312 | if ($handle === false) {
313 | return false;
314 | }
315 | while (!feof($handle)) {
316 | $buffer = fread($handle, $chunksize);
317 | echo $buffer;
318 | ob_flush();
319 | flush();
320 | if ($retbytes) {
321 | $count += strlen($buffer);
322 | }
323 | }
324 | $status = fclose($handle);
325 | if ($retbytes && $status) {
326 | return $count; // return num. bytes delivered like readfile() does.
327 | }
328 | return $status;
329 | }
330 |
331 | function in_array_regex($string, $filters) {
332 | foreach ($filters as $filter) {
333 | // does contain wildcard?
334 | if (strpos($filter, "*") !== false) {
335 | $filter = str_replace( '\*', '.*?', preg_quote( $filter, '/' ) );
336 | preg_match( '/^' . $filter . '$/i', $string, $result );
337 | if ($result[0] !== null) {
338 | return true;
339 | }
340 | } else {
341 | if (in_array($string, $filters)) {
342 | return true;
343 | }
344 | }
345 |
346 | }
347 | return false;
348 | }
349 |
350 | ?>
--------------------------------------------------------------------------------
/src/listr-l10n.php:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/src/listr-template.php:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | >
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 | |
27 |
28 |
29 |
30 |
31 |
32 |
74 |
75 |
76 |
77 |
78 |
79 |
--------------------------------------------------------------------------------
/src/public.htaccess:
--------------------------------------------------------------------------------
1 | deny from all
--------------------------------------------------------------------------------
/src/robots.txt:
--------------------------------------------------------------------------------
1 | User-agent: *
2 | Disallow: /
--------------------------------------------------------------------------------
/src/root.htaccess:
--------------------------------------------------------------------------------
1 | # Bootstrap Listr
2 | RewriteEngine On
3 | # RewriteBase /
4 | RewriteCond %{REQUEST_FILENAME} !-d
5 | RewriteCond %{REQUEST_FILENAME} !-f
6 | RewriteCond %{REQUEST_FILENAME} !-l
7 | RewriteRule ^(.+)$ index.php?path=$1 [QSA,L,B]
8 |
--------------------------------------------------------------------------------
/src/scss/basic.scss:
--------------------------------------------------------------------------------
1 | body {
2 | overflow-y: scroll;
3 | }
4 |
5 | .breadcrumb-item+.breadcrumb-item::before {
6 | content: '\f105';
7 | font-family: fontawesome;
8 | }
9 |
--------------------------------------------------------------------------------
/src/scss/bootstrap-listr.scss:
--------------------------------------------------------------------------------
1 | // Core variables and mixins
2 | @import 'node_modules/bootstrap/scss/variables';
3 | @import 'node_modules/bootstrap/scss/mixins';
4 | @import 'node_modules/bootstrap/scss/custom';
5 |
6 | // Reset and dependencies
7 | @import 'node_modules/bootstrap/scss/normalize';
8 | @import 'node_modules/bootstrap/scss/print';
9 |
10 | // Core CSS
11 | @import 'node_modules/bootstrap/scss/reboot';
12 | @import 'node_modules/bootstrap/scss/type';
13 | @import 'node_modules/bootstrap/scss/images';
14 | @import 'node_modules/bootstrap/scss/code';
15 | @import 'node_modules/bootstrap/scss/grid';
16 | @import 'node_modules/bootstrap/scss/tables';
17 | @import 'node_modules/bootstrap/scss/forms';
18 | @import 'node_modules/bootstrap/scss/buttons';
19 |
20 | // Components
21 | @import 'node_modules/bootstrap/scss/transitions';
22 | @import 'node_modules/bootstrap/scss/dropdown';
23 | // @import 'node_modules/bootstrap/scss/button-group';
24 | // @import 'node_modules/bootstrap/scss/input-group';
25 | @import 'node_modules/bootstrap/scss/custom-forms';
26 | // @import 'node_modules/bootstrap/scss/nav';
27 | // @import 'node_modules/bootstrap/scss/navbar';
28 | // @import 'node_modules/bootstrap/scss/card';
29 | @import 'node_modules/bootstrap/scss/breadcrumb';
30 | // @import 'node_modules/bootstrap/scss/pagination';
31 | // @import 'node_modules/bootstrap/scss/badge';
32 | // @import 'node_modules/bootstrap/scss/jumbotron';
33 | @import 'node_modules/bootstrap/scss/alert';
34 | // @import 'node_modules/bootstrap/scss/progress';
35 | @import 'node_modules/bootstrap/scss/media';
36 | // @import 'node_modules/bootstrap/scss/list-group';
37 | @import 'node_modules/bootstrap/scss/responsive-embed';
38 | @import 'node_modules/bootstrap/scss/close';
39 |
40 | // Components w/ JavaScript
41 | @import 'node_modules/bootstrap/scss/modal';
42 | // @import 'node_modules/bootstrap/scss/tooltip';
43 | // @import 'node_modules/bootstrap/scss/popover';
44 | // @import 'node_modules/bootstrap/scss/carousel';
45 |
46 | // Utility classes
47 | @import 'node_modules/bootstrap/scss/utilities';
48 |
49 | // Listr
50 | @import 'basic';
51 | @import 'modal';
52 | @import 'table';
53 |
--------------------------------------------------------------------------------
/src/scss/github-markdown.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: octicons-link;
3 | src: url(data:font/woff;charset=utf-8;base64,d09GRgABAAAAAAZwABAAAAAACFQAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAABEU0lHAAAGaAAAAAgAAAAIAAAAAUdTVUIAAAZcAAAACgAAAAoAAQAAT1MvMgAAAyQAAABJAAAAYFYEU3RjbWFwAAADcAAAAEUAAACAAJThvmN2dCAAAATkAAAABAAAAAQAAAAAZnBnbQAAA7gAAACyAAABCUM+8IhnYXNwAAAGTAAAABAAAAAQABoAI2dseWYAAAFsAAABPAAAAZwcEq9taGVhZAAAAsgAAAA0AAAANgh4a91oaGVhAAADCAAAABoAAAAkCA8DRGhtdHgAAAL8AAAADAAAAAwGAACfbG9jYQAAAsAAAAAIAAAACABiATBtYXhwAAACqAAAABgAAAAgAA8ASm5hbWUAAAToAAABQgAAAlXu73sOcG9zdAAABiwAAAAeAAAAME3QpOBwcmVwAAAEbAAAAHYAAAB/aFGpk3jaTY6xa8JAGMW/O62BDi0tJLYQincXEypYIiGJjSgHniQ6umTsUEyLm5BV6NDBP8Tpts6F0v+k/0an2i+itHDw3v2+9+DBKTzsJNnWJNTgHEy4BgG3EMI9DCEDOGEXzDADU5hBKMIgNPZqoD3SilVaXZCER3/I7AtxEJLtzzuZfI+VVkprxTlXShWKb3TBecG11rwoNlmmn1P2WYcJczl32etSpKnziC7lQyWe1smVPy/Lt7Kc+0vWY/gAgIIEqAN9we0pwKXreiMasxvabDQMM4riO+qxM2ogwDGOZTXxwxDiycQIcoYFBLj5K3EIaSctAq2kTYiw+ymhce7vwM9jSqO8JyVd5RH9gyTt2+J/yUmYlIR0s04n6+7Vm1ozezUeLEaUjhaDSuXHwVRgvLJn1tQ7xiuVv/ocTRF42mNgZGBgYGbwZOBiAAFGJBIMAAizAFoAAABiAGIAznjaY2BkYGAA4in8zwXi+W2+MjCzMIDApSwvXzC97Z4Ig8N/BxYGZgcgl52BCSQKAA3jCV8CAABfAAAAAAQAAEB42mNgZGBg4f3vACQZQABIMjKgAmYAKEgBXgAAeNpjYGY6wTiBgZWBg2kmUxoDA4MPhGZMYzBi1AHygVLYQUCaawqDA4PChxhmh/8ODDEsvAwHgMKMIDnGL0x7gJQCAwMAJd4MFwAAAHjaY2BgYGaA4DAGRgYQkAHyGMF8NgYrIM3JIAGVYYDT+AEjAwuDFpBmA9KMDEwMCh9i/v8H8sH0/4dQc1iAmAkALaUKLgAAAHjaTY9LDsIgEIbtgqHUPpDi3gPoBVyRTmTddOmqTXThEXqrob2gQ1FjwpDvfwCBdmdXC5AVKFu3e5MfNFJ29KTQT48Ob9/lqYwOGZxeUelN2U2R6+cArgtCJpauW7UQBqnFkUsjAY/kOU1cP+DAgvxwn1chZDwUbd6CFimGXwzwF6tPbFIcjEl+vvmM/byA48e6tWrKArm4ZJlCbdsrxksL1AwWn/yBSJKpYbq8AXaaTb8AAHja28jAwOC00ZrBeQNDQOWO//sdBBgYGRiYWYAEELEwMTE4uzo5Zzo5b2BxdnFOcALxNjA6b2ByTswC8jYwg0VlNuoCTWAMqNzMzsoK1rEhNqByEyerg5PMJlYuVueETKcd/89uBpnpvIEVomeHLoMsAAe1Id4AAAAAAAB42oWQT07CQBTGv0JBhagk7HQzKxca2sJCE1hDt4QF+9JOS0nbaaYDCQfwCJ7Au3AHj+LO13FMmm6cl7785vven0kBjHCBhfpYuNa5Ph1c0e2Xu3jEvWG7UdPDLZ4N92nOm+EBXuAbHmIMSRMs+4aUEd4Nd3CHD8NdvOLTsA2GL8M9PODbcL+hD7C1xoaHeLJSEao0FEW14ckxC+TU8TxvsY6X0eLPmRhry2WVioLpkrbp84LLQPGI7c6sOiUzpWIWS5GzlSgUzzLBSikOPFTOXqly7rqx0Z1Q5BAIoZBSFihQYQOOBEdkCOgXTOHA07HAGjGWiIjaPZNW13/+lm6S9FT7rLHFJ6fQbkATOG1j2OFMucKJJsxIVfQORl+9Jyda6Sl1dUYhSCm1dyClfoeDve4qMYdLEbfqHf3O/AdDumsjAAB42mNgYoAAZQYjBmyAGYQZmdhL8zLdDEydARfoAqIAAAABAAMABwAKABMAB///AA8AAQAAAAAAAAAAAAAAAAABAAAAAA==) format('woff');
4 | }
5 |
6 | .markdown-body {
7 | -webkit-text-size-adjust: 100%;
8 | text-size-adjust: 100%;
9 | color: #333;
10 | font-family: 'Helvetica Neue', Helvetica, 'Segoe UI', Arial, freesans, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
11 | font-size: 16px;
12 | line-height: 1.6;
13 | word-wrap: break-word;
14 |
15 | a {
16 | background-color: transparent;
17 | &:active, &:hover {
18 | outline: 0;
19 | }
20 | }
21 |
22 | strong {
23 | font-weight: bold;
24 | }
25 |
26 | h1 {
27 | font-size: 2em;
28 | margin: 0.67em 0;
29 | }
30 |
31 | img {
32 | border: 0;
33 | }
34 |
35 | hr {
36 | box-sizing: content-box;
37 | height: 0;
38 | }
39 |
40 | pre {
41 | overflow: auto;
42 | }
43 |
44 | code, kbd, pre {
45 | font-family: monospace, monospace;
46 | font-size: 1em;
47 | }
48 |
49 | input {
50 | color: inherit;
51 | font: inherit;
52 | margin: 0;
53 | }
54 |
55 | html input[disabled] {
56 | cursor: default;
57 | }
58 |
59 | input {
60 | line-height: normal;
61 | &[type='checkbox'] {
62 | box-sizing: border-box;
63 | padding: 0;
64 | }
65 | }
66 |
67 | table {
68 | border-collapse: collapse;
69 | border-spacing: 0;
70 | }
71 |
72 | td, th {
73 | padding: 0;
74 | }
75 |
76 | * {
77 | box-sizing: border-box;
78 | }
79 |
80 | input {
81 | font: 13px / 1.4 Helvetica, arial, nimbussansl, liberationsans, freesans, clean, sans-serif, 'Apple Color Emoji', 'Segoe UI Emoji', 'Segoe UI Symbol';
82 | }
83 |
84 | a {
85 | color: #4078c0;
86 | text-decoration: none;
87 | &:hover, &:active {
88 | text-decoration: underline;
89 | }
90 | }
91 |
92 | hr {
93 | height: 0;
94 | margin: 15px 0;
95 | overflow: hidden;
96 | background: transparent;
97 | border: 0;
98 | border-bottom: 1px solid #ddd;
99 | &:before {
100 | display: table;
101 | content: ';
102 | }
103 | &:after {
104 | display: table;
105 | clear: both;
106 | content: ';
107 | }
108 | }
109 |
110 | h1, h2, h3, h4, h5, h6 {
111 | margin-top: 15px;
112 | margin-bottom: 15px;
113 | line-height: 1.1;
114 | }
115 |
116 | h1 {
117 | font-size: 30px;
118 | }
119 |
120 | h2 {
121 | font-size: 21px;
122 | }
123 |
124 | h3 {
125 | font-size: 16px;
126 | }
127 |
128 | h4 {
129 | font-size: 14px;
130 | }
131 |
132 | h5 {
133 | font-size: 12px;
134 | }
135 |
136 | h6 {
137 | font-size: 11px;
138 | }
139 |
140 | blockquote {
141 | margin: 0;
142 | }
143 |
144 | ul {
145 | padding: 0;
146 | margin-top: 0;
147 | margin-bottom: 0;
148 | }
149 |
150 | ol {
151 | padding: 0;
152 | margin-top: 0;
153 | margin-bottom: 0;
154 | ol {
155 | list-style-type: lower-roman;
156 | }
157 | }
158 |
159 | ul {
160 | ol {
161 | list-style-type: lower-roman;
162 | }
163 | ul ol, ol ol {
164 | list-style-type: lower-alpha;
165 | }
166 | }
167 |
168 | ol {
169 | ul ol, ol ol {
170 | list-style-type: lower-alpha;
171 | }
172 | }
173 |
174 | dd {
175 | margin-left: 0;
176 | }
177 |
178 | code {
179 | font-family: Consolas, 'Liberation Mono', Menlo, Courier, monospace;
180 | font-size: 12px;
181 | }
182 |
183 | pre {
184 | margin-top: 0;
185 | margin-bottom: 0;
186 | font: 12px Consolas, 'Liberation Mono', Menlo, Courier, monospace;
187 | }
188 |
189 | .select::-ms-expand {
190 | opacity: 0;
191 | }
192 |
193 | .octicon {
194 | font: normal normal normal 16px/1 octicons-link;
195 | display: inline-block;
196 | text-decoration: none;
197 | text-rendering: auto;
198 | -webkit-font-smoothing: antialiased;
199 | -moz-osx-font-smoothing: grayscale;
200 | -webkit-user-select: none;
201 | -moz-user-select: none;
202 | -ms-user-select: none;
203 | user-select: none;
204 | }
205 |
206 | .octicon-link:before {
207 | content: '\f05c';
208 | }
209 |
210 | &:before {
211 | display: table;
212 | content: '';
213 | }
214 |
215 | &:after {
216 | display: table;
217 | clear: both;
218 | content: '';
219 | }
220 |
221 | > * {
222 | &:first-child {
223 | margin-top: 0 !important;
224 | }
225 | &:last-child {
226 | margin-bottom: 0 !important;
227 | }
228 | }
229 |
230 | a:not([href]) {
231 | color: inherit;
232 | text-decoration: none;
233 | }
234 |
235 | .anchor {
236 | display: inline-block;
237 | padding-right: 2px;
238 | margin-left: -18px;
239 | &:focus {
240 | outline: none;
241 | }
242 | }
243 |
244 | h1, h2, h3, h4, h5, h6 {
245 | margin-top: 1em;
246 | margin-bottom: 16px;
247 | font-weight: bold;
248 | line-height: 1.4;
249 | }
250 |
251 | h1 .octicon-link, h2 .octicon-link, h3 .octicon-link, h4 .octicon-link, h5 .octicon-link, h6 .octicon-link {
252 | color: #000;
253 | vertical-align: middle;
254 | visibility: hidden;
255 | }
256 |
257 | h1:hover .anchor, h2:hover .anchor, h3:hover .anchor, h4:hover .anchor, h5:hover .anchor, h6:hover .anchor {
258 | text-decoration: none;
259 | }
260 |
261 | h1:hover .anchor .octicon-link, h2:hover .anchor .octicon-link, h3:hover .anchor .octicon-link, h4:hover .anchor .octicon-link, h5:hover .anchor .octicon-link, h6:hover .anchor .octicon-link {
262 | visibility: visible;
263 | }
264 |
265 | h1 {
266 | padding-bottom: 0.3em;
267 | font-size: 2.25em;
268 | line-height: 1.2;
269 | border-bottom: 1px solid #eee;
270 | .anchor {
271 | line-height: 1;
272 | }
273 | }
274 |
275 | h2 {
276 | padding-bottom: 0.3em;
277 | font-size: 1.75em;
278 | line-height: 1.225;
279 | border-bottom: 1px solid #eee;
280 | .anchor {
281 | line-height: 1;
282 | }
283 | }
284 |
285 | h3 {
286 | font-size: 1.5em;
287 | line-height: 1.43;
288 | .anchor {
289 | line-height: 1.2;
290 | }
291 | }
292 |
293 | h4 {
294 | font-size: 1.25em;
295 | .anchor {
296 | line-height: 1.2;
297 | }
298 | }
299 |
300 | h5 {
301 | font-size: 1em;
302 | .anchor {
303 | line-height: 1.1;
304 | }
305 | }
306 |
307 | h6 {
308 | font-size: 1em;
309 | color: #777;
310 | .anchor {
311 | line-height: 1.1;
312 | }
313 | }
314 |
315 | p, blockquote, ul, ol, dl, table, pre {
316 | margin-top: 0;
317 | margin-bottom: 16px;
318 | }
319 |
320 | hr {
321 | height: 4px;
322 | padding: 0;
323 | margin: 16px 0;
324 | background-color: #e7e7e7;
325 | border: 0 none;
326 | }
327 |
328 | ul, ol {
329 | padding-left: 2em;
330 | }
331 |
332 | ul {
333 | ul, ol {
334 | margin-top: 0;
335 | margin-bottom: 0;
336 | }
337 | }
338 |
339 | ol {
340 | ol, ul {
341 | margin-top: 0;
342 | margin-bottom: 0;
343 | }
344 | }
345 |
346 | li > p {
347 | margin-top: 16px;
348 | }
349 |
350 | dl {
351 | padding: 0;
352 | dt {
353 | padding: 0;
354 | margin-top: 16px;
355 | font-size: 1em;
356 | font-style: italic;
357 | font-weight: bold;
358 | }
359 |
360 | dd {
361 | padding: 0 16px;
362 | margin-bottom: 16px;
363 | }
364 | }
365 |
366 | blockquote {
367 | padding: 0 15px;
368 | color: #777;
369 | border-left: 4px solid #ddd;
370 | > {
371 | :first-child {
372 | margin-top: 0;
373 | }
374 | :last-child {
375 | margin-bottom: 0;
376 | }
377 | }
378 | }
379 |
380 | table {
381 | display: block;
382 | width: 100%;
383 | overflow: auto;
384 | word-break: normal;
385 | word-break: keep-all;
386 |
387 | th {
388 | font-weight: bold;
389 | padding: 6px 13px;
390 | border: 1px solid #ddd;
391 | }
392 |
393 | td {
394 | padding: 6px 13px;
395 | border: 1px solid #ddd;
396 | }
397 | tr {
398 | background-color: #fff;
399 | border-top: 1px solid #ccc;
400 | &:nth-child(2n) {
401 | background-color: #f8f8f8;
402 | }
403 | }
404 | }
405 | img {
406 | max-width: 100%;
407 | box-sizing: content-box;
408 | background-color: #fff;
409 | }
410 | code {
411 | padding: 0;
412 | padding-top: 0.2em;
413 | padding-bottom: 0.2em;
414 | margin: 0;
415 | font-size: 85%;
416 | background-color: rgba(0, 0, 0, 0.04);
417 | border-radius: 3px;
418 | &:before, &:after {
419 | letter-spacing: -0.2em;
420 | content: '\00a0';
421 | }
422 | }
423 | pre > code {
424 | padding: 0;
425 | margin: 0;
426 | font-size: 100%;
427 | word-break: normal;
428 | white-space: pre;
429 | background: transparent;
430 | border: 0;
431 | }
432 | .highlight {
433 | margin-bottom: 16px;
434 | pre {
435 | padding: 16px;
436 | overflow: auto;
437 | font-size: 85%;
438 | line-height: 1.45;
439 | background-color: #f7f7f7;
440 | border-radius: 3px;
441 | }
442 | }
443 | pre {
444 | padding: 16px;
445 | overflow: auto;
446 | font-size: 85%;
447 | line-height: 1.45;
448 | background-color: #f7f7f7;
449 | border-radius: 3px;
450 | }
451 | .highlight pre {
452 | margin-bottom: 0;
453 | word-break: normal;
454 | }
455 | pre {
456 | word-wrap: normal;
457 | code {
458 | display: inline;
459 | max-width: initial;
460 | padding: 0;
461 | margin: 0;
462 | overflow: initial;
463 | line-height: inherit;
464 | word-wrap: normal;
465 | background-color: transparent;
466 | border: 0;
467 | &:before, &:after {
468 | content: normal;
469 | }
470 | }
471 | }
472 | kbd {
473 | display: inline-block;
474 | padding: 3px 5px;
475 | font-size: 11px;
476 | line-height: 10px;
477 | color: #555;
478 | vertical-align: middle;
479 | background-color: #fcfcfc;
480 | border: solid 1px #ccc;
481 | border-bottom-color: #bbb;
482 | border-radius: 3px;
483 | box-shadow: inset 0 -1px 0 #bbb;
484 | }
485 | .pl-c {
486 | color: #969896;
487 | }
488 | .pl-c1, .pl-s .pl-v {
489 | color: #0086b3;
490 | }
491 | .pl-e, .pl-en {
492 | color: #795da3;
493 | }
494 | .pl-s .pl-s1, .pl-smi {
495 | color: #333;
496 | }
497 | .pl-ent {
498 | color: #63a35c;
499 | }
500 | .pl-k {
501 | color: #a71d5d;
502 | }
503 | .pl-pds {
504 | color: #183691;
505 | }
506 | .pl-s {
507 | color: #183691;
508 | .pl-pse .pl-s1 {
509 | color: #183691;
510 | }
511 | }
512 | .pl-sr {
513 | color: #183691;
514 | .pl-cce, .pl-sra, .pl-sre {
515 | color: #183691;
516 | }
517 | }
518 | .pl-v {
519 | color: #ed6a43;
520 | }
521 | .pl-id {
522 | color: #b52a1d;
523 | }
524 | .pl-ii {
525 | background-color: #b52a1d;
526 | color: #f8f8f8;
527 | }
528 | .pl-sr .pl-cce {
529 | color: #63a35c;
530 | font-weight: bold;
531 | }
532 | .pl-ml {
533 | color: #693a17;
534 | }
535 | .pl-mh {
536 | color: #1d3e81;
537 | font-weight: bold;
538 | .pl-en {
539 | color: #1d3e81;
540 | font-weight: bold;
541 | }
542 | }
543 | .pl-ms {
544 | color: #1d3e81;
545 | font-weight: bold;
546 | }
547 | .pl-mq {
548 | color: #008080;
549 | }
550 | .pl-mi {
551 | color: #333;
552 | font-style: italic;
553 | }
554 | .pl-mb {
555 | color: #333;
556 | font-weight: bold;
557 | }
558 | .pl-md {
559 | background-color: #ffecec;
560 | color: #bd2c00;
561 | }
562 | .pl-mi1 {
563 | background-color: #eaffea;
564 | color: #55a532;
565 | }
566 | .pl-mdr {
567 | color: #795da3;
568 | font-weight: bold;
569 | }
570 | .pl-mo {
571 | color: #1d3e81;
572 | }
573 | kbd {
574 | display: inline-block;
575 | padding: 3px 5px;
576 | font: 11px Consolas, 'Liberation Mono', Menlo, Courier, monospace;
577 | line-height: 10px;
578 | color: #555;
579 | vertical-align: middle;
580 | background-color: #fcfcfc;
581 | border: solid 1px #ccc;
582 | border-bottom-color: #bbb;
583 | border-radius: 3px;
584 | box-shadow: inset 0 -1px 0 #bbb;
585 | }
586 | .task-list-item {
587 | list-style-type: none;
588 | + .task-list-item {
589 | margin-top: 3px;
590 | }
591 | input {
592 | margin: 0 0.35em 0.25em -1.6em;
593 | vertical-align: middle;
594 | }
595 | }
596 | :checked + .radio-label {
597 | z-index: 1;
598 | position: relative;
599 | border-color: #4078c0;
600 | }
601 | }
--------------------------------------------------------------------------------
/src/scss/modal.scss:
--------------------------------------------------------------------------------
1 | pre code {
2 | word-break: normal;
3 | }
4 |
5 | .modal {
6 |
7 | iframe {
8 | border-width: 1px;
9 | }
10 |
11 | img {
12 | display: block;
13 | margin: 0 auto;
14 | max-width: 100%;
15 | }
16 |
17 | video,
18 | audio {
19 | width: 100%;
20 | }
21 | }
22 |
23 | .embed-responsive-1by1 {
24 | padding-bottom: 100%;
25 | }
26 |
--------------------------------------------------------------------------------
/src/scss/table.scss:
--------------------------------------------------------------------------------
1 | @import '../../node_modules/bootstrap/scss/_variables';
2 |
3 |
4 | // Table pseudo-styles
5 | .table {
6 |
7 | tr::before {
8 | border-top: 1px solid $table-border-color;
9 | }
10 |
11 | tbody tr:first-child::before {
12 | border-top: 2px solid $table-border-color;
13 | }
14 | }
15 |
16 | .table-inverse {
17 |
18 | tr::before {
19 | border-top: 1px solid $gray;
20 | }
21 |
22 | tbody tr:first-child::before {
23 | border-top: 2px solid $gray;
24 | }
25 | }
26 |
27 |
28 | // Table styles
29 | th {
30 | cursor: pointer;
31 | }
32 |
33 | tr::before {
34 | display: table-cell;
35 | line-height: $line-height-base;
36 | padding: $table-cell-padding;
37 | text-align: right;
38 | vertical-align: top;
39 | width: 1rem;
40 | }
41 |
42 | tfoot {
43 |
44 | tr::before {
45 | border-top-width: 1px;
46 | content: '';
47 | }
48 | }
49 |
50 | // Row counter
51 | thead {
52 | tr::before {
53 | content: '#';
54 | font-weight: bold;
55 | }
56 | }
57 |
58 | tbody {
59 | counter-reset: listr-rows;
60 |
61 | tr {
62 | counter-increment: listr-rows;
63 | }
64 |
65 | tr::before {
66 | color: $text-muted;
67 | content: counter(listr-rows);
68 | }
69 |
70 | }
71 |
--------------------------------------------------------------------------------
/src/themes/fa-files.json:
--------------------------------------------------------------------------------
1 | {
2 | "tag": "i",
3 | "default": "fa-file-o",
4 | "folder": "fa-folder",
5 | "home": "fa-home",
6 | "search": "fa-search",
7 | "load": "fa-refresh",
8 | "share_icons": {
9 | "dropbox": "fa-dropbox fa-fw",
10 | "email": "fa-envelope fa-fw",
11 | "facebook": "fa-facebook fa-fw",
12 | "google_plus": "fa-google-plus fa-fw",
13 | "twitter": "fa-twitter fa-fw"
14 | },
15 | "files": [
16 | {
17 | "archive": {
18 | "extensions": [
19 | "7z",
20 | "ace",
21 | "adf",
22 | "air",
23 | "apk",
24 | "arj",
25 | "asar",
26 | "bz2",
27 | "bzip",
28 | "cab",
29 | "d64",
30 | "dmg",
31 | "git",
32 | "hdf",
33 | "ipf",
34 | "iso",
35 | "fdi",
36 | "gz",
37 | "jar",
38 | "lha",
39 | "lzh",
40 | "lz",
41 | "lzma",
42 | "nupkg",
43 | "pak",
44 | "phar",
45 | "pkg",
46 | "pimp",
47 | "rar",
48 | "safariextz",
49 | "sfx",
50 | "sit",
51 | "sitx",
52 | "sqx",
53 | "sublime-package",
54 | "swm",
55 | "tar",
56 | "tgz",
57 | "vsix",
58 | "wim",
59 | "wsz",
60 | "xar",
61 | "zip"
62 | ],
63 | "icon": "fa-archive-o"
64 | },
65 | "audio": {
66 | "extensions": [
67 | "aac",
68 | "ac3",
69 | "aif",
70 | "aiff",
71 | "au",
72 | "caf",
73 | "flac",
74 | "it",
75 | "m4a",
76 | "m4p",
77 | "med",
78 | "mid",
79 | "mo3",
80 | "mod",
81 | "mp1",
82 | "mp2",
83 | "mp3",
84 | "mpc",
85 | "ned",
86 | "ra",
87 | "ram",
88 | "oga",
89 | "ogg",
90 | "oma",
91 | "opus",
92 | "s3m",
93 | "sid",
94 | "soundcloud",
95 | "umx",
96 | "wav",
97 | "webma",
98 | "wv",
99 | "xm"
100 | ],
101 | "icon": "fa-file-audio-o"
102 | },
103 | "excel": {
104 | "extensions": [
105 | "xls",
106 | "xlsm",
107 | "xlss",
108 | "xlsx",
109 | "numbers"
110 | ],
111 | "icon": "fa-file-excel-o"
112 | },
113 | "image": {
114 | "extensions": [
115 | "ai",
116 | "bmp",
117 | "cdr",
118 | "emf",
119 | "eps",
120 | "flickr",
121 | "gif",
122 | "icns",
123 | "ico",
124 | "jp2",
125 | "jpe",
126 | "jpeg",
127 | "jpg",
128 | "jpx",
129 | "pcx",
130 | "pict",
131 | "png",
132 | "psd",
133 | "psp",
134 | "svg",
135 | "tga",
136 | "tif",
137 | "tiff",
138 | "webp",
139 | "wmf"
140 | ],
141 | "icon": "fa-file-image-o"
142 | },
143 | "pdf": {
144 | "extensions": [
145 | "pdf"
146 | ],
147 | "icon": "fa-file-pdf-o"
148 | },
149 | "powerpoint": {
150 | "extensions": [
151 | "pot",
152 | "ppt",
153 | "pptm",
154 | "ppts",
155 | "pptx",
156 | "key"
157 | ],
158 | "icon": "fa-file-powerpoint-o"
159 | },
160 | "script": {
161 | "extensions": [
162 | "ahk",
163 | "as",
164 | "asp",
165 | "aspx",
166 | "babel",
167 | "bat",
168 | "c",
169 | "cfm",
170 | "cjsx",
171 | "clj",
172 | "cmd",
173 | "coffee",
174 | "cpp",
175 | "cson",
176 | "css",
177 | "el",
178 | "erb",
179 | "g",
180 | "hml",
181 | "java",
182 | "js",
183 | "json",
184 | "json5",
185 | "jsp",
186 | "jsx",
187 | "ls",
188 | "less",
189 | "nsh",
190 | "nsi",
191 | "php",
192 | "php3",
193 | "pl",
194 | "ps1",
195 | "py",
196 | "rb",
197 | "rhtml",
198 | "sass",
199 | "scala",
200 | "scm",
201 | "scpt",
202 | "scptd",
203 | "scss",
204 | "sh",
205 | "shtml",
206 | "styl",
207 | "sublime-build",
208 | "sublime-commands",
209 | "sublime-completions",
210 | "sublime-keymap",
211 | "sublime-macro",
212 | "sublime-menu",
213 | "sublime-mousemap",
214 | "sublime-settings",
215 | "sublime-snippet",
216 | "sublime-syntax",
217 | "sublime-theme",
218 | "ts",
219 | "wsh",
220 | "xml",
221 | "yml"
222 | ],
223 | "icon": "fa-file-code-o"
224 | },
225 | "text": {
226 | "extensions": [
227 | "ans",
228 | "asc",
229 | "ascii",
230 | "csv",
231 | "diz",
232 | "latex",
233 | "log",
234 | "markdown",
235 | "md",
236 | "nfo",
237 | "rst",
238 | "rtf",
239 | "tex",
240 | "text",
241 | "txt"
242 | ],
243 | "icon": "fa-file-text-o"
244 | },
245 | "video": {
246 | "extensions": [
247 | "3g2",
248 | "3gp",
249 | "3gp2",
250 | "3gpp",
251 | "asf",
252 | "avi",
253 | "bik",
254 | "bup",
255 | "divx",
256 | "flv",
257 | "ifo",
258 | "m4v",
259 | "mkv",
260 | "mkv",
261 | "mov",
262 | "mp4",
263 | "mpeg",
264 | "mpg",
265 | "rm",
266 | "rv",
267 | "ogv",
268 | "qt",
269 | "smk",
270 | "swf",
271 | "vimeo",
272 | "vob",
273 | "webm",
274 | "wmv",
275 | "xvid",
276 | "youtube"
277 | ],
278 | "icon": "fa-file-video-o"
279 | },
280 | "word": {
281 | "extensions": [
282 | "doc",
283 | "docm",
284 | "docs",
285 | "docx",
286 | "dot",
287 | "pages"
288 | ],
289 | "icon": "fa-file-word-o"
290 | }
291 | }
292 | ]
293 | }
--------------------------------------------------------------------------------
/src/themes/fa.json:
--------------------------------------------------------------------------------
1 | {
2 | "tag": "i",
3 | "default": "fa-file-o",
4 | "folder": "fa-folder",
5 | "home": "fa-home",
6 | "search": "fa-search",
7 | "load": "fa-refresh",
8 | "share_icons": {
9 | "dropbox": "fa-dropbox fa-fw",
10 | "email": "fa-envelope fa-fw",
11 | "facebook": "fa-facebook fa-fw",
12 | "google_plus": "fa-google-plus fa-fw",
13 | "twitter": "fa-twitter fa-fw"
14 | },
15 | "files": [
16 | {
17 | "archive": {
18 | "extensions": [
19 | "7z",
20 | "ace",
21 | "adf",
22 | "air",
23 | "apk",
24 | "arj",
25 | "asar",
26 | "bz2",
27 | "bzip",
28 | "cab",
29 | "d64",
30 | "dmg",
31 | "git",
32 | "hdf",
33 | "ipf",
34 | "iso",
35 | "fdi",
36 | "gz",
37 | "jar",
38 | "lha",
39 | "lzh",
40 | "lz",
41 | "lzma",
42 | "nupkg",
43 | "pak",
44 | "phar",
45 | "pkg",
46 | "pimp",
47 | "rar",
48 | "safariextz",
49 | "sfx",
50 | "sit",
51 | "sitx",
52 | "sqx",
53 | "sublime-package",
54 | "swm",
55 | "tar",
56 | "tgz",
57 | "vsix",
58 | "wim",
59 | "wsz",
60 | "xar",
61 | "zip"
62 | ],
63 | "icon": "fa-archive"
64 | },
65 | "apple": {
66 | "extensions": [
67 | "app",
68 | "ipa",
69 | "ipsw",
70 | "saver"
71 | ],
72 | "icon": "fa-apple"
73 | },
74 | "audio": {
75 | "extensions": [
76 | "aac",
77 | "ac3",
78 | "aif",
79 | "aiff",
80 | "au",
81 | "caf",
82 | "flac",
83 | "it",
84 | "m4a",
85 | "m4p",
86 | "med",
87 | "mid",
88 | "mo3",
89 | "mod",
90 | "mp1",
91 | "mp2",
92 | "mp3",
93 | "mpc",
94 | "ned",
95 | "ra",
96 | "ram",
97 | "oga",
98 | "ogg",
99 | "oma",
100 | "opus",
101 | "s3m",
102 | "sid",
103 | "umx",
104 | "wav",
105 | "webma",
106 | "wv",
107 | "xm"
108 | ],
109 | "icon": "fa-music"
110 | },
111 | "calendar": {
112 | "extensions": [
113 | "icbu",
114 | "ics"
115 | ],
116 | "icon": "fa-calendar"
117 | },
118 | "config": {
119 | "extensions": [
120 | "cfg",
121 | "conf",
122 | "ini",
123 | "htaccess",
124 | "htpasswd",
125 | "plist",
126 | "sublime-settings",
127 | "xpy"
128 | ],
129 | "icon": "fa-cogs"
130 | },
131 | "contact": {
132 | "extensions": [
133 | "abbu",
134 | "contact",
135 | "oab",
136 | "pab",
137 | "vcard",
138 | "vcf"
139 | ],
140 | "icon": "fa-address-card-o"
141 | },
142 | "database": {
143 | "extensions": [
144 | "bde",
145 | "bson",
146 | "crp",
147 | "db",
148 | "db2",
149 | "db3",
150 | "dbb",
151 | "dbf",
152 | "dbk",
153 | "dbs",
154 | "dbx",
155 | "edb",
156 | "fdb",
157 | "frm",
158 | "fw",
159 | "fw2",
160 | "fw3",
161 | "gdb",
162 | "itdb",
163 | "mdb",
164 | "ndb",
165 | "nsf",
166 | "rdb",
167 | "sas7mdb",
168 | "sql",
169 | "sqlite",
170 | "tdb",
171 | "wdb"
172 | ],
173 | "icon": "fa-database"
174 | },
175 | "document": {
176 | "extensions": [
177 | "abw",
178 | "doc",
179 | "docm",
180 | "docs",
181 | "docx",
182 | "dot",
183 | "key",
184 | "numbers",
185 | "odb",
186 | "odf",
187 | "odg",
188 | "odp",
189 | "odt",
190 | "ods",
191 | "otg",
192 | "otp",
193 | "ots",
194 | "ott",
195 | "pages",
196 | "pdf",
197 | "pot",
198 | "ppt",
199 | "pptm",
200 | "ppts",
201 | "pptx",
202 | "sdb",
203 | "sdc",
204 | "sdd",
205 | "sdw",
206 | "sxi",
207 | "wp",
208 | "wp4",
209 | "wp5",
210 | "wp6",
211 | "wp7",
212 | "wpd",
213 | "xls",
214 | "xlsm",
215 | "xlss",
216 | "xlsx",
217 | "xps"
218 | ],
219 | "icon": "fa-file-text"
220 | },
221 | "downloads": {
222 | "extensions": [
223 | "!bt",
224 | "!qb",
225 | "!ut",
226 | "appdownload",
227 | "crdownload",
228 | "download",
229 | "opdownload",
230 | "part"
231 | ],
232 | "icon": "fa-cloud-download"
233 | },
234 | "ebook": {
235 | "extensions": [
236 | "aeh",
237 | "azw",
238 | "ceb",
239 | "chm",
240 | "epub",
241 | "fb2",
242 | "ibooks",
243 | "kf8",
244 | "lit",
245 | "lrf",
246 | "lrx",
247 | "mobi",
248 | "pdb",
249 | "pdg",
250 | "prc",
251 | "xeb"
252 | ],
253 | "icon": "fa-book"
254 | },
255 | "email": {
256 | "extensions": [
257 | "eml",
258 | "emlx",
259 | "mbox",
260 | "msg",
261 | "pst"
262 | ],
263 | "icon": "fa-envelope"
264 | },
265 | "feed": {
266 | "extensions": [
267 | "atom",
268 | "rss"
269 | ],
270 | "icon": "fa-rss"
271 | },
272 | "flash": {
273 | "extensions": [
274 | "fla",
275 | "flv",
276 | "swf"
277 | ],
278 | "icon": "fa-bolt"
279 | },
280 | "flickr": {
281 | "extensions": [
282 | "flickr"
283 | ],
284 | "icon": "fa-flickr"
285 | },
286 | "font": {
287 | "extensions": [
288 | "eot",
289 | "fon",
290 | "otf",
291 | "pfm",
292 | "ttf",
293 | "woff",
294 | "woff2"
295 | ],
296 | "icon": "fa-font"
297 | },
298 | "image": {
299 | "extensions": [
300 | "ai",
301 | "bmp",
302 | "cdr",
303 | "emf",
304 | "eps",
305 | "gif",
306 | "icns",
307 | "ico",
308 | "jp2",
309 | "jpe",
310 | "jpeg",
311 | "jpg",
312 | "jpx",
313 | "pcx",
314 | "pict",
315 | "png",
316 | "psd",
317 | "psp",
318 | "svg",
319 | "tga",
320 | "tif",
321 | "tiff",
322 | "webp",
323 | "wmf"
324 | ],
325 | "icon": "fa-picture-o"
326 | },
327 | "link": {
328 | "extensions": [
329 | "lnk",
330 | "url",
331 | "webloc"
332 | ],
333 | "icon": "fa-link"
334 | },
335 | "linux": {
336 | "extensions": [
337 | "bin",
338 | "deb",
339 | "rpm"
340 | ],
341 | "icon": "fa-linux"
342 | },
343 | "map": {
344 | "extensions": [
345 | "fug",
346 | "gpx",
347 | "kml",
348 | "nmea",
349 | "osm"
350 | ],
351 | "icon": "fa-map-o"
352 | },
353 | "palette": {
354 | "extensions": [
355 | "ase",
356 | "clm",
357 | "clr",
358 | "gpl"
359 | ],
360 | "icon": "fa-tasks"
361 | },
362 | "raw": {
363 | "extensions": [
364 | "3fr",
365 | "ari",
366 | "arw",
367 | "bay",
368 | "cap",
369 | "cr2",
370 | "crw",
371 | "dcs",
372 | "dcr",
373 | "dnf",
374 | "dng",
375 | "eip",
376 | "erf",
377 | "fff",
378 | "iiq",
379 | "k25",
380 | "kdc",
381 | "mdc",
382 | "mef",
383 | "mof",
384 | "mrw",
385 | "nef",
386 | "nrw",
387 | "obm",
388 | "orf",
389 | "pef",
390 | "ptx",
391 | "pxn",
392 | "r3d",
393 | "raf",
394 | "raw",
395 | "rwl",
396 | "rw2",
397 | "rwz",
398 | "sr2",
399 | "srf",
400 | "srw",
401 | "x3f"
402 | ],
403 | "icon": "fa-camera"
404 | },
405 | "script": {
406 | "extensions": [
407 | "ahk",
408 | "as",
409 | "asp",
410 | "aspx",
411 | "babel",
412 | "bat",
413 | "c",
414 | "cfm",
415 | "cjsx",
416 | "clj",
417 | "cmd",
418 | "coffee",
419 | "cpp",
420 | "cson",
421 | "css",
422 | "el",
423 | "erb",
424 | "g",
425 | "hml",
426 | "java",
427 | "js",
428 | "json",
429 | "json5",
430 | "jsp",
431 | "jsx",
432 | "ls",
433 | "less",
434 | "nsh",
435 | "nsi",
436 | "php",
437 | "php3",
438 | "pl",
439 | "ps1",
440 | "py",
441 | "rb",
442 | "rhtml",
443 | "sass",
444 | "scala",
445 | "scm",
446 | "scpt",
447 | "scptd",
448 | "scss",
449 | "sh",
450 | "shtml",
451 | "styl",
452 | "sublime-build",
453 | "sublime-commands",
454 | "sublime-completions",
455 | "sublime-keymap",
456 | "sublime-macro",
457 | "sublime-menu",
458 | "sublime-mousemap",
459 | "sublime-settings",
460 | "sublime-snippet",
461 | "sublime-syntax",
462 | "sublime-theme",
463 | "ts",
464 | "wsh",
465 | "xml",
466 | "yml"
467 | ],
468 | "icon": "fa-code"
469 | },
470 | "soundcloud": {
471 | "extensions": [
472 | "soundcloud"
473 | ],
474 | "icon": "fa-soundcloud"
475 | },
476 | "text": {
477 | "extensions": [
478 | "ans",
479 | "asc",
480 | "ascii",
481 | "csv",
482 | "diz",
483 | "latex",
484 | "log",
485 | "markdown",
486 | "md",
487 | "nfo",
488 | "rst",
489 | "rtf",
490 | "tex",
491 | "text",
492 | "txt"
493 | ],
494 | "icon": "fa-file-text-o"
495 | },
496 | "ticket": {
497 | "extensions": [
498 | "pkpass"
499 | ],
500 | "icon": "fa-ticket"
501 | },
502 | "video": {
503 | "extensions": [
504 | "3g2",
505 | "3gp",
506 | "3gp2",
507 | "3gpp",
508 | "asf",
509 | "avi",
510 | "bik",
511 | "bup",
512 | "divx",
513 | "ifo",
514 | "m4v",
515 | "mkv",
516 | "mkv",
517 | "mov",
518 | "mp4",
519 | "mpeg",
520 | "mpg",
521 | "rm",
522 | "rv",
523 | "ogv",
524 | "qt",
525 | "smk",
526 | "vob",
527 | "webm",
528 | "wmv",
529 | "xvid"
530 | ],
531 | "icon": "fa-film"
532 | },
533 | "vimeo": {
534 | "extensions": [
535 | "vimeo"
536 | ],
537 | "icon": "fa-vimeo-square"
538 | },
539 | "virtual": {
540 | "extensions": [
541 | "ova",
542 | "pvm",
543 | "pvs",
544 | "vdi",
545 | "vhd",
546 | "vmdk"
547 | ],
548 | "icon": "fa-cube"
549 | },
550 | "website": {
551 | "extensions": [
552 | "htm",
553 | "html",
554 | "mhtml",
555 | "mht",
556 | "xht",
557 | "xhtml"
558 | ],
559 | "icon": "fa-globe"
560 | },
561 | "windows": {
562 | "extensions": [
563 | "dll",
564 | "exe",
565 | "msi",
566 | "pif",
567 | "scr",
568 | "sys"
569 | ],
570 | "icon": "fa-windows"
571 | },
572 | "youtube": {
573 | "extensions": [
574 | "youtube"
575 | ],
576 | "icon": "fa-youtube-play"
577 | }
578 | }
579 | ]
580 | }
581 |
--------------------------------------------------------------------------------
/src/themes/github.json:
--------------------------------------------------------------------------------
1 | {
2 | "tag": "span",
3 | "default": "octicon-file",
4 | "folder": "octicon-file-directory text-primary",
5 | "home": "octicon-globe",
6 | "load": "octicon-sync",
7 | "search": "octicon-search",
8 | "files": [
9 | {
10 | "apple": {
11 | "extensions": [
12 | "app",
13 | "ipa",
14 | "ipsw",
15 | "saver"
16 | ],
17 | "icon": "octicon-file-binary"
18 | },
19 | "archive": {
20 | "extensions": [
21 | "7z",
22 | "ace",
23 | "adf",
24 | "air",
25 | "apk",
26 | "arj",
27 | "asar",
28 | "bz2",
29 | "bzip",
30 | "cab",
31 | "d64",
32 | "dmg",
33 | "git",
34 | "hdf",
35 | "ipf",
36 | "iso",
37 | "fdi",
38 | "gz",
39 | "jar",
40 | "lha",
41 | "lzh",
42 | "lz",
43 | "lzma",
44 | "nupkg",
45 | "pak",
46 | "phar",
47 | "pkg",
48 | "pimp",
49 | "rar",
50 | "safariextz",
51 | "sfx",
52 | "sit",
53 | "sitx",
54 | "sqx",
55 | "sublime-package",
56 | "swm",
57 | "tar",
58 | "tgz",
59 | "vsix",
60 | "wim",
61 | "wsz",
62 | "xar",
63 | "zip"
64 | ],
65 | "icon": "octicon-file-zip"
66 | },
67 | "document": {
68 | "extensions": [
69 | "pdf"
70 | ],
71 | "icon": "octicon-file-pdf"
72 | },
73 | "flickr": {
74 | "extensions": [
75 | "flickr"
76 | ],
77 | "icon": "octicon-file-symlink-file"
78 | },
79 | "image": {
80 | "extensions": [
81 | "ai",
82 | "bmp",
83 | "cdr",
84 | "emf",
85 | "eps",
86 | "gif",
87 | "icns",
88 | "ico",
89 | "jp2",
90 | "jpe",
91 | "jpeg",
92 | "jpg",
93 | "jpx",
94 | "pcx",
95 | "pict",
96 | "png",
97 | "psd",
98 | "psp",
99 | "svg",
100 | "tga",
101 | "tif",
102 | "tiff",
103 | "webp",
104 | "wmf"
105 | ],
106 | "icon": "octicon-file-media"
107 | },
108 | "linux": {
109 | "extensions": [
110 | "bin",
111 | "deb",
112 | "rpm"
113 | ],
114 | "icon": "octicon-file-binary"
115 | },
116 | "script": {
117 | "extensions": [
118 | "ahk",
119 | "as",
120 | "asp",
121 | "aspx",
122 | "babel",
123 | "bat",
124 | "c",
125 | "cfm",
126 | "cjsx",
127 | "clj",
128 | "cmd",
129 | "coffee",
130 | "cpp",
131 | "cson",
132 | "css",
133 | "el",
134 | "erb",
135 | "g",
136 | "hml",
137 | "java",
138 | "js",
139 | "json",
140 | "json5",
141 | "jsp",
142 | "jsx",
143 | "ls",
144 | "less",
145 | "nsh",
146 | "nsi",
147 | "php",
148 | "php3",
149 | "pl",
150 | "ps1",
151 | "py",
152 | "rb",
153 | "rhtml",
154 | "sass",
155 | "scala",
156 | "scm",
157 | "scpt",
158 | "scptd",
159 | "scss",
160 | "sh",
161 | "shtml",
162 | "styl",
163 | "sublime-build",
164 | "sublime-commands",
165 | "sublime-completions",
166 | "sublime-keymap",
167 | "sublime-macro",
168 | "sublime-menu",
169 | "sublime-mousemap",
170 | "sublime-settings",
171 | "sublime-snippet",
172 | "sublime-syntax",
173 | "sublime-theme",
174 | "ts",
175 | "wsh",
176 | "xml",
177 | "yml"
178 | ],
179 | "icon": "octicon-file-code"
180 | },
181 | "soundcloud": {
182 | "extensions": [
183 | "soundcloud"
184 | ],
185 | "icon": "octicon-file-symlink-file"
186 | },
187 | "vimeo": {
188 | "extensions": [
189 | "vimeo"
190 | ],
191 | "icon": "octicon-file-symlink-file"
192 | },
193 | "windows": {
194 | "extensions": [
195 | "dll",
196 | "exe",
197 | "msi",
198 | "pif",
199 | "scr",
200 | "sys"
201 | ],
202 | "icon": "octicon-file-binary"
203 | },
204 | "youtube": {
205 | "extensions": [
206 | "youtube"
207 | ],
208 | "icon": "octicon-file-symlink-file"
209 | }
210 | }
211 | ]
212 | }
--------------------------------------------------------------------------------
/tasks/clean.js:
--------------------------------------------------------------------------------
1 | const del = require('del');
2 | const gulp = require('gulp');
3 |
4 | // Clean dist folder
5 | gulp.task('clean', function () {
6 | console.log('Cleaning up…\n')
7 | return del([
8 | './build/'
9 | ]);
10 | });
11 |
12 | gulp.task('clean:pack', function () {
13 | return del([
14 | 'build/assets/css/listr.pack.css',
15 | 'build/assets/js/listr.pack.js'
16 | ]);
17 | });
--------------------------------------------------------------------------------
/tasks/copy-files.js:
--------------------------------------------------------------------------------
1 | const concat = require('gulp-concat');
2 | const gulp = require('gulp');
3 | const jsonmin = require('gulp-jsonmin');
4 |
5 | gulp.task('copy', ['copy:config', 'copy:css', 'copy:fonts', 'copy:htaccess', 'copy:js', 'copy:l10n', 'copy:php', 'copy:themes']);
6 |
7 | // Copy PHP
8 | gulp.task('copy:php', function() {
9 |
10 | gulp.src([
11 | './src/index.php',
12 | './src/listr-functions.php',
13 | './src/listr-l10n.php',
14 | './src/listr-template.php'
15 | ])
16 | .pipe(gulp.dest('build/'));
17 |
18 | });
19 |
20 | // Copy Parsedown
21 | gulp.task('copy:php-parsedown', function() {
22 |
23 | gulp.src([
24 | './src/parsedown/Parsedown.php',
25 | ])
26 | .pipe(gulp.dest('build/parsedown'));
27 |
28 | });
29 |
30 | // Copy localization files
31 | gulp.task('copy:l10n', function() {
32 |
33 | gulp.src([
34 | './src/l10n/**/*'
35 | ])
36 | .pipe(gulp.dest('build/l10n/'));
37 |
38 | });
39 |
40 | // Copy icon themes
41 | gulp.task('copy:themes', function() {
42 |
43 | gulp.src([
44 | './src/themes/*.json'
45 | ])
46 | .pipe(jsonmin())
47 | .pipe(gulp.dest('build/themes/'));
48 |
49 | });
50 |
51 | // Copy config.json
52 | gulp.task('copy:config', function() {
53 |
54 | gulp.src([
55 | 'src/config.json'
56 | ])
57 | .pipe(gulp.dest('build/'));
58 |
59 | });
60 |
61 | // Copy .htaccess files
62 | gulp.task('copy:htaccess', function() {
63 |
64 | gulp.src([
65 | 'src/root.htaccess'
66 | ])
67 | .pipe(concat('.htaccess'))
68 | .pipe(gulp.dest('build/'));
69 |
70 | gulp.src([
71 | 'src/public.htaccess'
72 | ])
73 | .pipe(concat('.htaccess'))
74 | .pipe(gulp.dest('build/_public/'));
75 |
76 | });
77 |
78 | // Copy JavaScript
79 | gulp.task('copy:js', ['make:js'], function() {
80 |
81 | gulp.src([
82 | 'node_modules/bootstrap/dist/js/bootstrap.min.js',
83 | 'node_modules/highlight.js/dist/highlight.min.js',
84 | 'node_modules/jquery-stupid-table/stupidtable.min.js',
85 | 'node_modules/jquery/dist/jquery.min.js',
86 | 'node_modules/jquery-searcher/dist/jquery.searcher.min.js'
87 | ])
88 | .pipe(gulp.dest('build/assets/js/'));
89 |
90 | gulp.src([
91 | 'node_modules/highlight.js/build/highlight.pack.js',
92 | ])
93 | .pipe(concat('highlight.min.js'))
94 | .pipe(gulp.dest('build/assets/js/'));
95 |
96 | });
97 |
98 | // Copy style-sheets
99 | gulp.task('copy:css', ['make:scss'], function() {
100 | gulp.src([
101 | 'node_modules/font-awesome/css/font-awesome.min.css'
102 | ])
103 | .pipe(gulp.dest('build/assets/css/'));
104 |
105 | gulp.src('node_modules/highlight.js/src/styles/github.css')
106 | .pipe(concat('highlight.min.css'))
107 | .pipe(gulp.dest('build/assets/css/'));
108 |
109 | });
110 | // Copy Font Awesome
111 | gulp.task('copy:fonts', function() {
112 |
113 | gulp.src('node_modules/font-awesome/fonts/fontawesome-webfont.*')
114 | .pipe(gulp.dest('build/assets/fonts/'));
115 |
116 | });
--------------------------------------------------------------------------------
/tasks/help.js:
--------------------------------------------------------------------------------
1 | const gulp = require('gulp');
2 | const meta = require('../package.json');
3 |
4 | // A handy repeat function
5 | var repeat = function (s, n, d) {
6 | return --n ? s + (d || "") + repeat(s, n, d) : "" + s;
7 | };
8 |
9 | // Help dialog
10 | gulp.task('help', function() {
11 | let title_length = meta.name + ' v' + meta.version;
12 |
13 | console.log('\n' + meta.name + ' v' + meta.version);
14 | console.log(repeat('=', title_length.length));
15 | console.log('\nAvailable tasks:');
16 | console.log(' help - This dialog');
17 | console.log(' clean - Delete dist-folder');
18 | console.log(' debug - Add Bootlint and jQuery source map');
19 | console.log(' depends - Specify the source for all dependencies');
20 | console.log(' init - Create dist-folder and copy required files');
21 | console.log(' jsmin - Minify config.json');
22 | console.log(' lint - Run tasks to lint all CSS and JavaScript');
23 | console.log(' make - Minify all CSS and JavaScript files');
24 | console.log(' setup - Run a full setup');
25 | console.log(' hjs - Specify default Highlighter.js style-sheet');
26 | console.log('\nVisit our GitHub repository:');
27 | console.log(meta.homepage);
28 |
29 | } );
--------------------------------------------------------------------------------
/tasks/highlighter.js:
--------------------------------------------------------------------------------
1 | const argv = require('yargs').alias('s', 'self').argv;
2 | const concat = require('gulp-concat');
3 | const cssmin = require('gulp-cssmin');
4 | const fs = require("fs");
5 | const gulp = require('gulp');
6 | const jeditor = require('gulp-json-editor');
7 | const prompt = require('gulp-prompt');
8 |
9 | var hjs = [];
10 |
11 | function getBasename(file) {
12 | if(file.substr(file.lastIndexOf('.')+1) == 'css') {
13 | hjs.push( file.substring(0, file.lastIndexOf(".")) );
14 | }
15 | }
16 |
17 | // Build Highlight.js (via https://github.com/kilianc/rtail/blob/develop/gulpfile.js#L69)
18 | gulp.task('build:highlighter', function (done) {
19 |
20 | let languages = ['tools/build.js'];
21 | let config = require(__dirname + '/../src/config.json').highlight.languages;
22 | config.forEach(function(item) {
23 | languages.push(item);
24 | });
25 |
26 | let spawn = require('child_process').spawn;
27 | let opts = {
28 | cwd: 'node_modules/highlight.js'
29 | };
30 |
31 | let npmInstall = spawn('npm', ['install'], opts);
32 | npmInstall.stdout.pipe(process.stdout);
33 | npmInstall.stderr.pipe(process.stderr);
34 |
35 | npmInstall.on('close', function (code) {
36 | if (0 !== code) throw new Error('npm install exited with ' + code);
37 |
38 | let build = spawn('node', languages, opts);
39 | build.stdout.pipe(process.stdout);
40 | build.stderr.pipe(process.stderr);
41 |
42 | build.on('close', function (code) {
43 | if (0 !== code) throw new Error('node tools/build.js exited with ' + code);
44 | done();
45 | });
46 | });
47 | });
48 |
49 | // Choose a highlight.js theme
50 | gulp.task('select:highlighter', function(){
51 |
52 | let source_dir = 'node_modules/highlight.js/src/styles/';
53 |
54 | css = fs.readdirSync(source_dir);
55 | css.forEach(getBasename);
56 |
57 | hjs.sort();
58 | hjs = hjs.concat(hjs.splice(0,hjs.indexOf('github')));
59 |
60 | return gulp.src('./')
61 | .pipe(prompt.prompt({
62 | type: 'list',
63 | name: 'theme',
64 | message: 'Choose a highlight.js theme',
65 | choices: hjs,
66 | }, function(res){
67 |
68 | let source_dir = 'node_modules/highlight.js/src/styles/';
69 |
70 | // Set default theme
71 | console.log('Minifying highlight.js theme “'+res.theme+'”…');
72 | gulp.src(source_dir+res.theme+'.css')
73 | .pipe(concat('highlight.min.css'))
74 | .pipe(cssmin())
75 | .pipe(gulp.dest('build/assets/css/'));
76 |
77 | gulp.src("build/config.json")
78 | .pipe(jeditor({
79 | 'highlight': {
80 | 'theme': res.theme
81 | }
82 | }))
83 | .pipe(gulp.dest("build/"));
84 |
85 | // Special cases
86 | if (res.theme == 'brown_paper') {
87 | console.log ('Copying extra-file brown_papersq.png');
88 | gulp.src(source_dir+'brown_papersq.png')
89 | .pipe(gulp.dest('build/assets/css/'));
90 | } else if (res.theme == 'pojoaque') {
91 | console.log ('Copying extra-file pojoaque.jpg');
92 | gulp.src(source_dir+'pojoaque.jpg')
93 | .pipe(gulp.dest('build/assets/css/'));
94 | } else if (res.theme == 'school_book') {
95 | console.log ('Copying extra-file school_book.png');
96 | gulp.src(source_dir+'school_book.png')
97 | .pipe(gulp.dest('build/assets/css/'));
98 | }
99 | }));
100 | });
--------------------------------------------------------------------------------
/tasks/jshint.js:
--------------------------------------------------------------------------------
1 | const argv = require('yargs').alias('s', 'self').argv;
2 | const cached = require('gulp-cached');
3 | const debug = require('gulp-debug');
4 | const gulp = require('gulp');
5 | const jshint = require('gulp-jshint');
6 |
7 | gulp.task('lint:js', function() {
8 |
9 | if (argv.self) {
10 | src = ['gulpfile.js', 'src/js/*.js'];
11 | } else {
12 | src = 'src/js/*.js';
13 | }
14 |
15 | gulp.src(src)
16 | .pipe(cached('lint:js'))
17 | .pipe(debug())
18 | .pipe(jshint())
19 | .pipe(jshint.reporter());
20 | });
--------------------------------------------------------------------------------
/tasks/jsonlint.js:
--------------------------------------------------------------------------------
1 | const argv = require('yargs') .alias('s', 'self') .argv;
2 | const cached = require('gulp-cached');
3 | const debug = require('gulp-debug');
4 | const gulp = require('gulp');
5 | const jsonlint = require('gulp-json-lint');
6 |
7 | gulp.task('lint:json', function() {
8 |
9 | if (argv.self) {
10 | src = ['package.json', 'src/config.json'];
11 | } else {
12 | src = 'src/config.json';
13 | }
14 |
15 | gulp.src(src)
16 | .pipe(cached('lint:json'))
17 | .pipe(debug())
18 | .pipe(jsonlint())
19 | .pipe(jsonlint.report('verbose'));
20 | });
--------------------------------------------------------------------------------
/tasks/merge.js:
--------------------------------------------------------------------------------
1 | const concat = require('gulp-concat');
2 | const concatCss = require('gulp-concat-css');
3 | const cssmin = require('gulp-cssmin');
4 | const del = require('del');
5 | const gulp = require('gulp');
6 | const jeditor = require('gulp-json-editor');
7 | const prompt = require('gulp-prompt');
8 | const sequence = require('run-sequence');
9 | const queue = require('streamqueue');
10 | const uglify = require('gulp-uglify');
11 |
12 | const meta = require('../package.json');
13 |
14 | // Merge sequence
15 | gulp.task('merge', function(callback) {
16 |
17 | gulp.src('build/assets')
18 | console.log('Merging assets…');
19 |
20 | sequence(
21 | ['merge:js', 'merge:css'],
22 | 'post-merge',
23 | callback
24 | );
25 |
26 | gulp
27 | .src("build/config.json")
28 | .pipe(jeditor({
29 | 'general': {
30 | 'concat_assets': true
31 | }
32 | }))
33 | .pipe(gulp.dest("build/"));
34 |
35 | });
36 |
37 |
38 | // Merge JS files
39 | gulp.task('merge:js', function(){
40 |
41 | return queue({ objectMode: true },
42 | // gulp.src('build/assets/js/jquery.min.js'),
43 | // gulp.src('build/assets/js/bootstrap.min.js'),
44 | gulp.src('build/assets/js/highlight.min.js'),
45 | gulp.src('build/assets/js/jquery.searcher.min.js'),
46 | gulp.src('build/assets/js/stupidtable.min.js'),
47 | gulp.src('build/assets/js/listr.min.js')
48 | )
49 | .pipe(concat('listr.pack.js'))
50 | .pipe(uglify())
51 | .pipe(gulp.dest('build/assets/js/'));
52 | });
53 |
54 |
55 | // Merge CSS files
56 | gulp.task('merge:css', function(){
57 | return gulp.src([
58 | 'build/assets/css/font-awesome.min.css',
59 | 'build/assets/css/bootstrap.min.css',
60 | 'build/assets/css/highlight.min.css',
61 | 'build/assets/css/listr.min.css'
62 | ])
63 | .pipe(concatCss('listr.pack.css'))
64 | .pipe(cssmin())
65 | .pipe(gulp.dest('build/assets/css/'));
66 | });
67 |
68 |
69 | // Clean up after merge
70 | gulp.task('post-merge', function() {
71 | return del([
72 | 'build/assets/css/*.css',
73 | '!build/assets/css/listr.pack.css',
74 | 'build/assets/js/*.js',
75 | '!build/assets/js/bootlint.js',
76 | '!build/assets/js/bootstrap.min.js',
77 | '!build/assets/js/jquery.min.js',
78 | '!build/assets/js/listr.pack.js'
79 | ]);
80 | });
--------------------------------------------------------------------------------
/tasks/phplint.js:
--------------------------------------------------------------------------------
1 | const gulp = require('gulp');
2 | const phplint = require('phplint').lint;
3 |
4 | gulp.task('lint:php', function(cb) {
5 | phplint(['src/*.php'], {limit: 10}, function (err, stdout, stderr) {
6 | if (err) {
7 | cb(err);
8 | process.exit(1);
9 | }
10 | cb();
11 | });
12 | });
--------------------------------------------------------------------------------
/tasks/scss.js:
--------------------------------------------------------------------------------
1 | const argv = require('yargs').alias('f', 'full').argv;
2 | const cached = require('gulp-cached');
3 | const concat = require('gulp-concat');
4 | const cssmin = require('gulp-cssmin');
5 | const gulp = require('gulp');
6 | const prompt = require('gulp-prompt');
7 | const sass = require('gulp-sass');
8 |
9 | let bootstrap_scss;
10 | if (argv.full) {
11 | bootstrap_scss = 'node_modules/bootstrap/scss/bootstrap.scss';
12 | } else {
13 | bootstrap_scss = 'src/scss/bootstrap-listr.scss';
14 | }
15 |
16 | // Select Bootstrap theme
17 | gulp.task('make:scss', function(){
18 | gulp.src(bootstrap_scss)
19 | .pipe(cached('make:scss'))
20 | .pipe(sass().on('error', sass.logError))
21 | .pipe(concat('bootstrap.min.css'))
22 | .pipe(cssmin())
23 | .pipe(gulp.dest('build/assets/css/'));
24 |
25 | gulp.src([
26 | 'src/scss/basic.scss',
27 | 'src/scss/modal.scss',
28 | 'src/scss/table.scss'
29 | // 'src/scss/github-markdown.scss'
30 | ])
31 | .pipe(sass().on('error', sass.logError))
32 | .pipe(concat('listr.min.css'))
33 | .pipe(cssmin())
34 | .pipe(gulp.dest('build/assets/css/'));
35 |
36 | });
--------------------------------------------------------------------------------
/tasks/scsslint.js:
--------------------------------------------------------------------------------
1 | const gulp = require('gulp');
2 | const scsslint = require('gulp-scss-lint');
3 |
4 | gulp.task('lint:scss', function() {
5 | return gulp.src([
6 | '!src/scss/github-markdown.scss',
7 | 'src/scss/*.scss'
8 | ])
9 | .pipe(scsslint());
10 | });
--------------------------------------------------------------------------------
/tasks/setup.js:
--------------------------------------------------------------------------------
1 | const argv = require('yargs').alias('d', 'debug').argv;
2 | const concat = require('gulp-concat');
3 | const cssmin = require('gulp-cssmin');
4 | const debug = require('gulp-debug');
5 | const gulp = require('gulp');
6 | const jeditor = require('gulp-json-editor');
7 | const prompt = require('gulp-prompt');
8 | const sequence = require('run-sequence');
9 | const uglify = require('gulp-uglify');
10 | const meta = require('../package.json');
11 |
12 | // Setup sequence
13 | gulp.task('setup', function(callback) {
14 |
15 | sequence(
16 | 'depends',
17 | 'select',
18 | callback
19 | );
20 | });
21 |
22 |
23 | // Specify default asset location
24 | gulp.task('depends', function() {
25 | return gulp.src('./')
26 | .pipe(prompt.prompt({
27 | type: 'list',
28 | name: 'dependencies',
29 | message: 'Choose how to load app dependencies',
30 | choices: [
31 | {
32 | name: 'From your server',
33 | value: 'local'
34 | },
35 | {
36 | name: 'Use content delivery networks (CDN)',
37 | value: 'cdn'
38 | }
39 | ]
40 | }, function(res){
41 | let assets;
42 |
43 | if (res.dependencies === 'local') {
44 |
45 | assets = {
46 | 'general': {
47 | 'local_assets': true
48 | },
49 | 'assets': {
50 | 'jquery_js': "assets/js/jquery.min.js",
51 | 'jquery_map': "assets/js/jquery.min.map",
52 | 'jquery_searcher': "assets/js/jquery.searcher.min.js",
53 | 'bootstrap_css': "assets/css/bootstrap.min.css",
54 | 'bootstrap_js': "assets/js/bootstrap.min.js",
55 | 'font_awesome': "assets/css/font-awesome.min.css",
56 | 'stupid_table': "assets/js/stupidtable.min.js",
57 | 'highlight_js': "assets/js/highlight.min.js",
58 | 'highlight_css': "assets/css/highlight.min.css",
59 | 'bootlint': "assets/js/bootlint.min.js"
60 | }
61 | };
62 |
63 | } else {
64 |
65 | // Read src/config.json
66 | let config = require('../src/config.json');
67 |
68 | assets = {
69 | 'general': {
70 | 'local_assets': false
71 | },
72 | 'assets': {
73 | 'jquery_js': config.assets.jquery_js,
74 | 'jquery_map': config.assets.jquery_map,
75 | 'jquery_searcher': config.assets.jquery_searcher,
76 | 'bootstrap_css': config.assets.bootstrap_css,
77 | 'bootstrap_js': config.assets.bootstrap_js,
78 | 'font_awesome': config.assets.font_awesome,
79 | 'stupid_table': config.assets.stupid_table,
80 | 'highlight_js': config.assets.highlight_js,
81 | 'highlight_css': config.assets.highlight_css, //.replace('%theme%', config.highlight.theme),
82 | 'bootlint': config.assets.bootlint
83 | }
84 | };
85 | }
86 |
87 | gulp.src("build/config.json")
88 | .pipe(jeditor(
89 | assets
90 | ))
91 | .pipe(gulp.dest("build/"));
92 | }));
93 | });
94 |
95 |
96 | // Feature selection
97 | gulp.task('select', function(callback){
98 |
99 | // Set defaults
100 | let enable_viewer = false;
101 | let enable_search = false;
102 | let enable_highlight = false;
103 | let default_icons = 'fa';
104 | let include_bootlint = false;
105 |
106 | // check debug features
107 | if (argv.debug) {
108 | debug_check = true;
109 | } else {
110 | debug_check = false;
111 | }
112 |
113 | let features = [
114 | { name: 'Viewer Modal', value: 'viewer' , checked: true },
115 | { name: 'Search Box', value: 'search' , checked: true },
116 | { name: 'Syntax Highlighter', value: 'highlighter' , checked: true },
117 | { name: 'H5BP Apache Server Config', value: 'htaccess' , checked: true },
118 | { name: 'robots.txt', value: 'robots' , checked: true },
119 | { name: 'DEBUG: Bootlint', value: 'bootlint' ,checked: debug_check },
120 | { name: 'DEBUG: jQuery Source Map', value: 'jquery_map', checked: debug_check }
121 | ];
122 |
123 | // uncheck all features
124 | if (argv.minimum) {
125 | for (let i = 0; i < 6; i++) {
126 | features[i].checked = false;
127 | }
128 | }
129 |
130 | if (argv.full) {
131 | bootstrap_js = 'node_modules/bootstrap/build/js/bootstrap.js';
132 | } else {
133 | bootstrap_js = [
134 | 'node_modules/bootstrap/js/umd/alert.js',
135 | 'node_modules/bootstrap/js/umd/util.js',
136 | 'node_modules/bootstrap/js/umd/dropdown.js',
137 | 'node_modules/bootstrap/js/umd/modal.js'
138 | ];
139 | }
140 |
141 | // Setup dialog
142 | return gulp.src('./')
143 | .pipe(prompt.prompt({
144 | type: 'checkbox',
145 | name: 'feature',
146 | message: 'Which features would you like to use?',
147 | choices: features,
148 | }, function(res){
149 |
150 | tasks = [];
151 |
152 | // Enable search box
153 | if (res.feature.indexOf('search') > -1 ) {
154 | console.info('Including search box assets…');
155 |
156 | gulp
157 | .src([
158 | 'node_modules/jquery-searcher/build/jquery.searcher.min.js'
159 | ])
160 | .pipe(gulp.dest('build/assets/js/'));
161 |
162 | enable_search = true;
163 | }
164 |
165 | // Enable Viewer Modal modal
166 | if (res.feature.indexOf('viewer') > -1) {
167 | console.log('Compiling Bootstrap scripts…');
168 |
169 | gulp
170 | .src(bootstrap_js)
171 | .pipe(concat('bootstrap.min.js'))
172 | .pipe(uglify())
173 | .pipe(gulp.dest('build/assets/js/'));
174 |
175 | enable_viewer = true;
176 | }
177 |
178 | // Include syntax highlighter
179 | if (res.feature.indexOf('highlighter') > -1) {
180 | console.log('Including syntax highlighter assets…');
181 |
182 | gulp
183 | .src('node_modules/highlight.js/build/highlight.pack.js')
184 | .pipe(concat('highlight.min.js'))
185 | .pipe(uglify())
186 | .pipe(gulp.dest('build/assets/js/'));
187 |
188 | enable_highlight = true;
189 |
190 | gulp
191 | .src([
192 | 'node_modules/highlight.js/src/styles/github.css'
193 | ])
194 | .pipe(concat('highlight.min.css'))
195 | .pipe(cssmin())
196 | .pipe(gulp.dest('build/assets/css/'));
197 |
198 | gulp.start('select:highlighter');
199 | }
200 |
201 | // Set default icons to Font Awesome
202 | if (res.feature.indexOf('font_awesome') > -1) {
203 | console.log('Including Font Awesome assets…');
204 |
205 | gulp
206 | .src('node_modules/font-awesome/css/font-awesome.min.css')
207 | .pipe(gulp.dest('build/assets/css/'));
208 |
209 | gulp
210 | .src('node_modules/font-awesome/fonts/fontawesome-webfont.*')
211 | .pipe(gulp.dest('build/assets/fonts/'));
212 |
213 | default_icons = 'fontawesome';
214 | }
215 |
216 | // Include H5BP Apache Config
217 | if (res.feature.indexOf('htaccess') > -1) {
218 | console.log('Appending H5BP Apache server configuration…');
219 |
220 | gulp
221 | .src([
222 | 'src/root.htaccess',
223 | 'node_modules/apache-server-configs/dist/.htaccess'
224 | ])
225 | .pipe(concat('.htaccess'))
226 | .pipe(gulp.dest('build/'));
227 | }
228 |
229 | // Include robots.txt
230 | if (res.feature.indexOf('robots') > -1) {
231 | console.log('Including robots.txt…');
232 |
233 | gulp
234 | .src('src/robots.txt')
235 | .pipe(gulp.dest('build/'));
236 | }
237 |
238 | // Include Bootlint for debugging
239 | if (res.feature.indexOf('bootlint') > -1) {
240 |
241 | gulp
242 | .src('node_modules/bootlint/build/browser/bootlint.js')
243 | .pipe(gulp.dest('build/assets/js/'));
244 |
245 | include_bootlint = true;
246 | }
247 |
248 | // Include jQuery map for debugging
249 | if (res.feature.indexOf('jquery_map') > -1) {
250 |
251 | gulp
252 | .src([
253 | 'node_modules/jquery/build/jquery.min.js',
254 | 'node_modules/jquery/build/jquery.min.map'
255 | ])
256 | .pipe(gulp.dest('build/assets/js/'));
257 | }
258 |
259 | // Write settings to config.json
260 | gulp.src("build/config.json")
261 | .pipe(jeditor({
262 | 'general': {
263 | 'enable_search': enable_search,
264 | 'enable_viewer': enable_viewer,
265 | 'enable_highlight': enable_highlight
266 | },
267 | 'bootstrap': {
268 | 'icons': default_icons
269 | },
270 | 'debug': {
271 | 'bootlint': include_bootlint
272 | }
273 | }))
274 | .pipe(gulp.dest("build/"));
275 |
276 | }));
277 | });
--------------------------------------------------------------------------------
/tasks/uglify.js:
--------------------------------------------------------------------------------
1 | const argv = require('yargs').alias('s', 'self');
2 | const cached = require('gulp-cached');
3 | const concat = require('gulp-concat');
4 | const debug = require('gulp-debug');
5 | const gulp = require('gulp');
6 | const queue = require('streamqueue');
7 | const uglify = require('gulp-uglify');
8 |
9 | gulp.task('make:js', function() {
10 | console.log('Uglifying Listr JavaScript…');
11 |
12 | return queue({ objectMode: true },
13 | gulp.src('./src/js/functions.js'),
14 | gulp.src('./src/js/dropbox.js'),
15 | gulp.src('./src/js/keyboard.js'),
16 | gulp.src('./src/js/modal.js'),
17 | gulp.src('./src/js/search.js'),
18 | gulp.src('./src/js/table.js'),
19 | gulp.src('./src/js/init.js')
20 | )
21 | .pipe(concat('listr.min.js'))
22 | .pipe(uglify())
23 | .pipe(gulp.dest('build/assets/js/'));
24 | });
25 |
26 | gulp.task('make:bootstrap', function() {
27 | console.log('Uglifying Bootstrap JavaScript…');
28 |
29 | return queue({ objectMode: true },
30 | // gulp.src('./node_modules/bootstrap/js/src/util.js'),
31 | gulp.src('./node_modules/bootstrap/js/src/alert.js'),
32 | gulp.src('./node_modules/bootstrap/js/src/button.js'),
33 | gulp.src('./node_modules/bootstrap/js/src/dropdown.js'),
34 | gulp.src('./node_modules/bootstrap/js/src/modal.js')
35 | )
36 | .pipe(concat('bootstrap.min.js'))
37 | // .pipe(uglify())
38 | .pipe(gulp.dest('build/assets/js/'));
39 | });
40 |
--------------------------------------------------------------------------------
/tasks/watch.js:
--------------------------------------------------------------------------------
1 | const gulp = require('gulp');
2 | const watch = require('gulp-watch');
3 |
4 | // Watch task
5 | gulp.task('watch', function () {
6 | gulp.watch([
7 | 'gulpfile.js',
8 | 'package.json',
9 | 'src/config.json',
10 | 'src/js/*.js',
11 | 'src/css/*.css'
12 | ],
13 | ['lint']
14 | );
15 | });
16 |
17 | // Watch JS
18 | gulp.task('watch:js', function () {
19 | gulp.watch([
20 | 'src/js/*.js'
21 | ],
22 | ['uglify']);
23 | });
24 |
25 | // Watch CSS
26 | gulp.task('watch:scss', function () {
27 | gulp.watch([
28 | 'src/scss/*.scss'
29 | ],
30 | ['scssmin']);
31 | });
--------------------------------------------------------------------------------