Parcourir la source

oscar template: using less to generate oscar.min.css

Thomas Pointhuber il y a 10 ans
Parent
révision
f4457da0a1

+ 1
- 0
Makefile Voir le fichier

@@ -46,6 +46,7 @@ minimal: bin/buildout minimal.cfg setup.py
46 46
 styles:
47 47
 	@lessc -x searx/static/default/less/style.less > searx/static/default/css/style.css
48 48
 	@lessc -x searx/static/oscar/less/bootstrap/bootstrap.less > searx/static/oscar/css/bootstrap.min.css
49
+	@lessc -x searx/static/oscar/less/oscar/oscar.less > searx/static/oscar/css/oscar.min.css
49 50
 
50 51
 locales:
51 52
 	@pybabel compile -d searx/translations

+ 0
- 71
searx/static/oscar/css/oscar.css Voir le fichier

@@ -1,71 +0,0 @@
1
-/* Sticky footer styles
2
--------------------------------------------------- */
3
-
4
-html {
5
-  position: relative;
6
-  min-height: 100%;
7
-}
8
-body {
9
-  /* Margin bottom by footer height */
10
-  margin-bottom: 80px;
11
-}
12
-
13
-.footer {
14
-  position: absolute;
15
-  bottom: 0;
16
-  width: 100%;
17
-  /* Set the fixed height of the footer here */
18
-  height: 60px;
19
-}
20
-
21
-input[type=checkbox]:checked ~ .label_hide_if_checked {
22
-  display:none;
23
-}
24
-
25
-input[type=checkbox]:not(:checked) ~ .label_hide_if_not_checked {
26
-  display:none;
27
-}
28
-
29
-.search_categories {
30
-  margin:10px 0;
31
-  text-transform: capitalize;
32
-}
33
-
34
-.result-default {
35
-    clear: both;
36
-}
37
-
38
-.result-images {
39
-    float: left !important;
40
-}
41
-
42
-.result-videos {
43
-    clear: both;
44
-}
45
-
46
-.result-torrents {
47
-    clear: both;
48
-}
49
-
50
-.img-thumbnail {
51
-    margin: 5px;
52
-    max-height: 128px;
53
-    min-height: 128px;
54
-}
55
-
56
-.suggestion_item {
57
-    margin: 2px 5px;
58
-}
59
-
60
-.result_download {
61
-    margin-right: 5px;
62
-}
63
-
64
-#pagination {
65
-    margin-top: 30px;
66
-    padding-bottom: 50px;
67
-}
68
-
69
-.cursor-text {
70
-    cursor: text !important;
71
-}

+ 15
- 0
searx/static/oscar/css/oscar.min.css Voir le fichier

@@ -0,0 +1,15 @@
1
+html{position:relative;min-height:100%}
2
+body{margin-bottom:80px}
3
+.footer{position:absolute;bottom:0;width:100%;height:60px}
4
+input[type=checkbox]:checked~.label_hide_if_checked{display:none}
5
+input[type=checkbox]:not(:checked)~.label_hide_if_not_checked{display:none}
6
+.result-default{clear:both}
7
+.result-images{float:left !important}
8
+.img-thumbnail{margin:5px;max-height:128px;min-height:128px}
9
+.result-videos{clear:both}
10
+.result-torrents{clear:both}
11
+.suggestion_item{margin:2px 5px}
12
+.result_download{margin-right:5px}
13
+#pagination{margin-top:30px;padding-bottom:50px}
14
+.search_categories{margin:10px 0;text-transform:capitalize}
15
+.cursor-text{cursor:text !important}

+ 9
- 0
searx/static/oscar/less/oscar/checkbox.less Voir le fichier

@@ -0,0 +1,9 @@
1
+// Hide element if checkbox is checked
2
+input[type=checkbox]:checked ~ .label_hide_if_checked {
3
+  display:none;
4
+}
5
+
6
+// Hide element if checkbox is not checked
7
+input[type=checkbox]:not(:checked) ~ .label_hide_if_not_checked {
8
+  display:none;
9
+}

+ 4
- 0
searx/static/oscar/less/oscar/cursor.less Voir le fichier

@@ -0,0 +1,4 @@
1
+// display cursor
2
+.cursor-text {
3
+    cursor: text !important;
4
+}

+ 19
- 0
searx/static/oscar/less/oscar/footer.less Voir le fichier

@@ -0,0 +1,19 @@
1
+// Sticky footer styles
2
+
3
+html {
4
+  position: relative;
5
+  min-height: 100%;
6
+}
7
+
8
+body {
9
+  /* Margin bottom by footer height */
10
+  margin-bottom: 80px;
11
+}
12
+
13
+.footer {
14
+  position: absolute;
15
+  bottom: 0;
16
+  width: 100%;
17
+  /* Set the fixed height of the footer here */
18
+  height: 60px;
19
+}

+ 9
- 0
searx/static/oscar/less/oscar/oscar.less Voir le fichier

@@ -0,0 +1,9 @@
1
+@import "footer.less";
2
+
3
+@import "checkbox.less";
4
+
5
+@import "results.less";
6
+
7
+@import "search.less";
8
+
9
+@import "cursor.less";

+ 41
- 0
searx/static/oscar/less/oscar/results.less Voir le fichier

@@ -0,0 +1,41 @@
1
+// default formating of results
2
+.result-default {
3
+    clear: both;
4
+}
5
+
6
+// image formating of results
7
+.result-images {
8
+    float: left !important;
9
+}
10
+
11
+.img-thumbnail {
12
+    margin: 5px;
13
+    max-height: 128px;
14
+    min-height: 128px;
15
+}
16
+
17
+// video formating of results
18
+.result-videos {
19
+    clear: both;
20
+}
21
+
22
+// torrent formating of results
23
+.result-torrents {
24
+    clear: both;
25
+}
26
+
27
+// suggestion
28
+.suggestion_item {
29
+    margin: 2px 5px;
30
+}
31
+
32
+// download result
33
+.result_download {
34
+    margin-right: 5px;
35
+}
36
+
37
+// page forward, backward
38
+#pagination {
39
+    margin-top: 30px;
40
+    padding-bottom: 50px;
41
+}

+ 4
- 0
searx/static/oscar/less/oscar/search.less Voir le fichier

@@ -0,0 +1,4 @@
1
+.search_categories {
2
+  margin:10px 0;
3
+  text-transform: capitalize;
4
+}

+ 1
- 1
searx/templates/oscar/base.html Voir le fichier

@@ -10,7 +10,7 @@
10 10
     
11 11
     <link rel="stylesheet" href="{{ url_for('static', filename='css/bootstrap.min.css') }}" type="text/css" />
12 12
     {% if autocomplete %}<link rel="stylesheet" href="{{ url_for('static', filename='css/typeahead.css') }}" type="text/css" />{% endif %}
13
-    <link rel="stylesheet" href="{{ url_for('static', filename='css/oscar.css') }}" type="text/css" />  
13
+    <link rel="stylesheet" href="{{ url_for('static', filename='css/oscar.min.css') }}" type="text/css" />  
14 14
     
15 15
     <!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
16 16
     <!--[if lt IE 9]>