Revision c2f02e8f
Added by Andreas Kohlbecker over 10 years ago
.gitattributes | ||
---|---|---|
1648 | 1648 |
7.x/themes/zen_dataportal/screenshot.png -text svneol=unset#unset |
1649 | 1649 |
7.x/themes/zen_dataportal/template.php -text |
1650 | 1650 |
7.x/themes/zen_dataportal/templates/README.txt -text |
1651 |
7.x/themes/zen_dataportal/templates/html.tpl.php -text |
|
1652 |
7.x/themes/zen_dataportal/templates/page.tpl.php -text |
|
1651 | 1653 |
7.x/themes/zen_dataportal/theme-settings.php -text |
1652 | 1654 |
7.x/themes/zen_dataportal/zen_dataportal.info -text |
7.x/themes/zen_dataportal/css/pages.css | ||
---|---|---|
26 | 26 |
-moz-box-shadow: 0px 5px 20px black; |
27 | 27 |
box-shadow: 0px 5px 20px black; |
28 | 28 |
padding-top: 20px; |
29 |
background-color: #fff; |
|
29 | 30 |
} |
30 | 31 |
|
31 | 32 |
/* |
32 | 33 |
* The skip-link link will be completely hidden until a user tabs to the link. |
33 | 34 |
* See the element-focusable rule in system.base.css. |
34 | 35 |
*/ |
35 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000337}}
|
|
36 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000338}}
|
|
36 | 37 |
#skip-link { |
37 | 38 |
margin: 0; |
38 | 39 |
} |
39 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000341}}
|
|
40 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000342}}
|
|
40 | 41 |
#skip-link a, |
41 | 42 |
#skip-link a:visited { |
42 | 43 |
display: block; |
... | ... | |
50 | 51 |
/* |
51 | 52 |
* Header |
52 | 53 |
*/ |
53 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000355}}
|
|
54 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000356}}
|
|
54 | 55 |
#header { |
55 | 56 |
margin-bottom: 10px; |
56 | 57 |
} |
57 | 58 |
|
58 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000359}}
|
|
59 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000360}}
|
|
59 | 60 |
#logo { |
60 | 61 |
/* Wrapping link for logo */ |
61 | 62 |
float: left; |
... | ... | |
64 | 65 |
margin-right: 10px; |
65 | 66 |
padding: 0; |
66 | 67 |
} |
67 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000365}}
|
|
68 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000366}}
|
|
68 | 69 |
#logo img { |
69 | 70 |
vertical-align: bottom; |
70 | 71 |
} |
71 | 72 |
|
72 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000370}}
|
|
73 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000371}}
|
|
73 | 74 |
#name-and-slogan { |
74 | 75 |
/* Wrapper for website name and slogan */ |
75 | 76 |
float: left; |
76 | 77 |
margin-right: 10px; |
77 | 78 |
} |
78 | 79 |
|
79 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000375}}
|
|
80 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000376}}
|
|
80 | 81 |
#site-name { |
81 | 82 |
/* The name of the website */ |
82 | 83 |
margin: 0; |
83 | 84 |
font-size: 2em; |
84 | 85 |
line-height: 1.5em; |
85 | 86 |
} |
86 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000381}}
|
|
87 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000382}}
|
|
87 | 88 |
#site-name a:link, |
88 | 89 |
#site-name a:visited { |
89 | 90 |
color: #000; |
90 | 91 |
text-decoration: none; |
91 | 92 |
} |
92 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000387}}
|
|
93 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000388}}
|
|
93 | 94 |
#site-name a:hover, |
94 | 95 |
#site-name a:focus { |
95 | 96 |
text-decoration: underline; |
96 | 97 |
} |
97 | 98 |
|
98 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000392}}
|
|
99 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000393}}
|
|
99 | 100 |
#site-slogan { |
100 | 101 |
/* The slogan (or tagline) of a website */ |
101 | 102 |
margin: 0; |
102 | 103 |
font-size: 1em; |
103 | 104 |
} |
104 | 105 |
|
105 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000397}}
|
|
106 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\0000398}}
|
|
106 | 107 |
.region-header { |
107 | 108 |
/* Wrapper for any blocks placed in the header region */ |
108 | 109 |
clear: both; |
... | ... | |
115 | 116 |
/* |
116 | 117 |
* Content |
117 | 118 |
*/ |
118 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003119}}
|
|
119 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003120}}
|
|
119 | 120 |
.breadcrumb { |
120 | 121 |
/* The path to the current page in the form of a list of links */ |
121 | 122 |
} |
122 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003120}}
|
|
123 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003121}}
|
|
123 | 124 |
.breadcrumb ol { |
124 | 125 |
margin: 0; |
125 | 126 |
padding: 0; |
126 | 127 |
} |
127 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003124}}
|
|
128 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003125}}
|
|
128 | 129 |
.breadcrumb li { |
129 | 130 |
display: inline; |
130 | 131 |
list-style-type: none; |
... | ... | |
132 | 133 |
padding: 0; |
133 | 134 |
} |
134 | 135 |
|
135 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003137}}
|
|
136 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003138}}
|
|
136 | 137 |
h1.title, |
137 | 138 |
h2.node-title, |
138 | 139 |
h2.block-title, |
... | ... | |
143 | 144 |
margin: 0; |
144 | 145 |
} |
145 | 146 |
|
146 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003141}}
|
|
147 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003142}}
|
|
147 | 148 |
tr.even { |
148 | 149 |
/* Some tables have rows marked even or odd. */ |
149 | 150 |
/* background-color: #eee; */ |
150 | 151 |
/* Drupal core uses a #eee background */ |
151 | 152 |
} |
152 | 153 |
|
153 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003145}}
|
|
154 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003146}}
|
|
154 | 155 |
tr.odd { |
155 | 156 |
/* background-color: #eee; */ |
156 | 157 |
/* Drupal core uses a #eee background */ |
157 | 158 |
} |
158 | 159 |
|
159 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003149}}
|
|
160 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003150}}
|
|
160 | 161 |
div.messages { |
161 | 162 |
/* Important messages (status, warning, and error) for the user. See also the declarations in messages.css. */ |
162 | 163 |
margin: 1.5em 0; |
163 | 164 |
/* Drupal core uses "6px 0" margin */ |
164 | 165 |
} |
165 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003152}}
|
|
166 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003153}}
|
|
166 | 167 |
div.messages ul { |
167 | 168 |
margin-top: 0; |
168 | 169 |
margin-bottom: 0; |
169 | 170 |
} |
170 | 171 |
|
171 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003158}}
|
|
172 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003159}}
|
|
172 | 173 |
div.status { |
173 | 174 |
/* Normal priority messages */ |
174 | 175 |
} |
175 | 176 |
|
176 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003162}}
|
|
177 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003163}}
|
|
177 | 178 |
div.warning, |
178 | 179 |
tr.warning { |
179 | 180 |
/* Medium priority messages */ |
... | ... | |
181 | 182 |
/* Drupal core uses: 1px solid #f0c020 */ |
182 | 183 |
} |
183 | 184 |
|
184 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003167}}
|
|
185 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003168}}
|
|
185 | 186 |
div.error, |
186 | 187 |
tr.error { |
187 | 188 |
/* High priority messages. See also the .error declaration below. */ |
188 | 189 |
} |
189 | 190 |
|
190 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003170}}
|
|
191 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003171}}
|
|
191 | 192 |
.error { |
192 | 193 |
/* Errors that are separate from div.messages status messages. */ |
193 | 194 |
/* color: #e55; */ |
194 | 195 |
/* Drupal core uses a #e55 background */ |
195 | 196 |
} |
196 | 197 |
|
197 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003174}}
|
|
198 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003175}}
|
|
198 | 199 |
.warning { |
199 | 200 |
/* Warnings that are separate from div.messages status messages. */ |
200 | 201 |
/* color: #e09010; */ |
201 | 202 |
/* Drupal core uses a #e09010 background */ |
202 | 203 |
} |
203 | 204 |
|
204 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003178}}
|
|
205 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003179}}
|
|
205 | 206 |
.tabs { |
206 | 207 |
/* See also the tabs.css file. */ |
207 | 208 |
} |
208 | 209 |
|
209 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003181}}
|
|
210 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003182}}
|
|
210 | 211 |
.region-help { |
211 | 212 |
/* Help text on a page */ |
212 | 213 |
} |
213 | 214 |
|
214 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003184}}
|
|
215 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003185}}
|
|
215 | 216 |
.more-help-link { |
216 | 217 |
/* Link to more help */ |
217 | 218 |
} |
218 | 219 |
|
219 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003187}}
|
|
220 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003188}}
|
|
220 | 221 |
.region-content { |
221 | 222 |
/* Wrapper for the actual page content */ |
222 | 223 |
} |
223 | 224 |
|
224 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003190}}
|
|
225 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003191}}
|
|
225 | 226 |
ul.inline { |
226 | 227 |
/* List of links generated by theme_links() */ |
227 | 228 |
display: inline; |
228 | 229 |
padding: 0; |
229 | 230 |
} |
230 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003194}}
|
|
231 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003195}}
|
|
231 | 232 |
ul.inline li { |
232 | 233 |
display: inline; |
233 | 234 |
list-style-type: none; |
... | ... | |
235 | 236 |
/* LTR */ |
236 | 237 |
} |
237 | 238 |
|
238 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003200}}
|
|
239 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003201}}
|
|
239 | 240 |
span.field-label { |
240 | 241 |
/* The inline field label used by the Fences module */ |
241 | 242 |
padding: 0 1em 0 0; |
242 | 243 |
/* LTR */ |
243 | 244 |
} |
244 | 245 |
|
245 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003204}}
|
|
246 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003205}}
|
|
246 | 247 |
.item-list .pager { |
247 | 248 |
/* A list of page numbers when more than 1 page of content is available */ |
248 | 249 |
padding: 0; |
249 | 250 |
} |
250 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003207}}
|
|
251 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003208}}
|
|
251 | 252 |
.item-list .pager li { |
252 | 253 |
/* Each page number in the pager list */ |
253 | 254 |
padding: 0 0.5em; |
254 | 255 |
} |
255 | 256 |
|
256 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003212}}
|
|
257 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003213}}
|
|
257 | 258 |
.feed-icon { |
258 | 259 |
/* The link to the RSS or Atom feed for the current list of content */ |
259 | 260 |
} |
260 | 261 |
|
261 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003215}}
|
|
262 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003216}}
|
|
262 | 263 |
.more-link { |
263 | 264 |
/* Aggregator, blog, and forum more link */ |
264 | 265 |
} |
... | ... | |
281 | 282 |
/* |
282 | 283 |
* Page bottom |
283 | 284 |
*/ |
284 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003249}}
|
|
285 |
@media -sass-debug-info{filename{font-family:file\:\/\/\/home\/andreas\/workspaces\/www\/drupal-7\.16\/sites\/all\/themes\/zen_dataportal\/sass\/pages\.scss}line{font-family:\00003250}}
|
|
285 | 286 |
.region-bottom { |
286 | 287 |
/* Wrapper for any blocks placed in the page bottom region */ |
287 | 288 |
} |
7.x/themes/zen_dataportal/sass/pages.scss | ||
---|---|---|
27 | 27 |
// single-box-shadow($color, $hoff, $voff, $blur, $spread, $inset) |
28 | 28 |
@include single-box-shadow(black, 0px, 5px, 20px); |
29 | 29 |
padding-top: $zen-gutter-width; |
30 |
background-color: #fff; |
|
30 | 31 |
} |
31 | 32 |
|
32 | 33 |
/* |
7.x/themes/zen_dataportal/template.php | ||
---|---|---|
101 | 101 |
* http://drupal.org/node/223440 and http://drupal.org/node/1089656 |
102 | 102 |
*/ |
103 | 103 |
|
104 |
/** |
|
105 |
* @param $which_image |
|
106 |
* name of the image, see _zen_dataportal_imagenames() for possible values |
|
107 |
* @param $variables |
|
108 |
* An array of variables to pass to the theme template. |
|
109 |
* @param $attributes_key |
|
110 |
* |
|
111 |
* @param $background_style |
|
112 |
* |
|
113 |
* @see _zen_dataportal_imagenames() for possible values |
|
114 |
*/ |
|
115 |
function _set_image_url($which_image, &$variables, $attributes_key = NULL, $background_style = 'scroll repeat') { |
|
116 |
|
|
117 |
if($attributes_key) { |
|
118 |
$variables[$attributes_key] = ''; |
|
119 |
} |
|
120 |
|
|
121 |
if (!theme_get_setting('default_' . $which_image)) { |
|
122 |
$path = theme_get_setting($which_image . '_path'); |
|
123 |
if(isset($path)){ |
|
124 |
if (file_uri_scheme($path) == 'public') { |
|
125 |
$url = file_create_url($path); |
|
126 |
} |
|
127 |
if(isset($url)) { |
|
128 |
$variables[$which_image . '_url'] = $url; |
|
129 |
if($attributes_key) { |
|
130 |
// FIXME is not save only works if no other style given e.g. html.php $attributes |
|
131 |
$variables[$attributes_key] = ' style="background: white url(' . $url .') ' . $background_style . ';"'; |
|
132 |
} |
|
133 |
} |
|
134 |
|
|
135 |
} |
|
136 |
} |
|
137 |
} |
|
138 |
/** |
|
139 |
* |
|
140 |
*/ |
|
141 |
function _add_inline_styles(&$variables) { |
|
142 |
|
|
143 |
$css = array(); |
|
144 |
$variables['inline_styles'] = ''; |
|
145 |
|
|
146 |
// site_name |
|
147 |
if(theme_get_setting('site_name_color')) { |
|
148 |
$css[] = "#site-name a span {color:" . theme_get_setting('site_name_color') . ';}'; |
|
149 |
} |
|
150 |
|
|
151 |
$variables['inline_styles'] = '<style type="text/css">'. "\n" . implode("\n", $css) . '</style>'; |
|
152 |
} |
|
153 |
|
|
104 | 154 |
|
105 | 155 |
/** |
106 | 156 |
* Override or insert variables into the maintenance page template. |
... | ... | |
128 | 178 |
* @param $hook |
129 | 179 |
* The name of the template being rendered ("html" in this case.) |
130 | 180 |
*/ |
131 |
/* -- Delete this line if you want to use this function |
|
132 |
function STARTERKIT_preprocess_html(&$variables, $hook) { |
|
133 |
$variables['sample_variable'] = t('Lorem ipsum.'); |
|
134 |
|
|
135 |
// The body tag's classes are controlled by the $classes_array variable. To |
|
136 |
// remove a class from $classes_array, use array_diff(). |
|
137 |
//$variables['classes_array'] = array_diff($variables['classes_array'], array('class-to-remove')); |
|
181 |
function zen_dataportal_preprocess_html(&$variables, $hook) { |
|
182 |
_set_image_url('body_background', $variables, 'attributes'); |
|
183 |
_add_inline_styles($variables); |
|
138 | 184 |
} |
139 |
// */ |
|
140 | 185 |
|
141 | 186 |
/** |
142 | 187 |
* Override or insert variables into the page templates. |
... | ... | |
146 | 191 |
* @param $hook |
147 | 192 |
* The name of the template being rendered ("page" in this case.) |
148 | 193 |
*/ |
149 |
/* -- Delete this line if you want to use this function
|
|
150 |
function STARTERKIT_preprocess_page(&$variables, $hook) {
|
|
151 |
$variables['sample_variable'] = t('Lorem ipsum.');
|
|
194 |
function zen_dataportal_preprocess_page(&$variables, $hook) {
|
|
195 |
_set_image_url('banner', $variables, 'banner_attributes', 'scroll no-repeat content-box');
|
|
196 |
_set_image_url('page_background', $variables, 'page_attributes');
|
|
152 | 197 |
} |
153 |
// */ |
|
154 | 198 |
|
155 | 199 |
/** |
156 | 200 |
* Override or insert variables into the node templates. |
7.x/themes/zen_dataportal/templates/html.tpl.php | ||
---|---|---|
1 |
<?php |
|
2 |
/** |
|
3 |
* @file |
|
4 |
* Zen theme's implementation to display the basic html structure of a single |
|
5 |
* Drupal page. |
|
6 |
* |
|
7 |
* Variables: |
|
8 |
* - $css: An array of CSS files for the current page. |
|
9 |
* - $language: (object) The language the site is being displayed in. |
|
10 |
* $language->language contains its textual representation. $language->dir |
|
11 |
* contains the language direction. It will either be 'ltr' or 'rtl'. |
|
12 |
* - $html_attributes: String of attributes for the html element. It can be |
|
13 |
* manipulated through the variable $html_attributes_array from preprocess |
|
14 |
* functions. |
|
15 |
* - $html_attributes_array: Array of html attribute values. It is flattened |
|
16 |
* into a string within the variable $html_attributes. |
|
17 |
* - $rdf_namespaces: All the RDF namespace prefixes used in the HTML document. |
|
18 |
* - $grddl_profile: A GRDDL profile allowing agents to extract the RDF data. |
|
19 |
* - $head_title: A modified version of the page title, for use in the TITLE |
|
20 |
* tag. |
|
21 |
* - $head_title_array: (array) An associative array containing the string parts |
|
22 |
* that were used to generate the $head_title variable, already prepared to be |
|
23 |
* output as TITLE tag. The key/value pairs may contain one or more of the |
|
24 |
* following, depending on conditions: |
|
25 |
* - title: The title of the current page, if any. |
|
26 |
* - name: The name of the site. |
|
27 |
* - slogan: The slogan of the site, if any, and if there is no title. |
|
28 |
* - $head: Markup for the HEAD section (including meta tags, keyword tags, and |
|
29 |
* so on). |
|
30 |
* - $default_mobile_metatags: TRUE if default mobile metatags for responsive |
|
31 |
* design should be displayed. |
|
32 |
* - $styles: Style tags necessary to import all CSS files for the page. |
|
33 |
* - $scripts: Script tags necessary to load the JavaScript files and settings |
|
34 |
* for the page. |
|
35 |
* - $skip_link_anchor: The HTML ID of the element that the "skip link" should |
|
36 |
* link to. Defaults to "main-menu". |
|
37 |
* - $skip_link_text: The text for the "skip link". Defaults to "Jump to |
|
38 |
* Navigation". |
|
39 |
* - $page_top: Initial markup from any modules that have altered the |
|
40 |
* page. This variable should always be output first, before all other dynamic |
|
41 |
* content. |
|
42 |
* - $page: The rendered page content. |
|
43 |
* - $page_bottom: Final closing markup from any modules that have altered the |
|
44 |
* page. This variable should always be output last, after all other dynamic |
|
45 |
* content. |
|
46 |
* - $classes: String of classes that can be used to style contextually through |
|
47 |
* CSS. It should be placed within the <body> tag. When selecting through CSS |
|
48 |
* it's recommended that you use the body tag, e.g., "body.front". It can be |
|
49 |
* manipulated through the variable $classes_array from preprocess functions. |
|
50 |
* The default values can contain one or more of the following: |
|
51 |
* - front: Page is the home page. |
|
52 |
* - not-front: Page is not the home page. |
|
53 |
* - logged-in: The current viewer is logged in. |
|
54 |
* - not-logged-in: The current viewer is not logged in. |
|
55 |
* - node-type-[node type]: When viewing a single node, the type of that node. |
|
56 |
* For example, if the node is a Blog entry, this would be "node-type-blog". |
|
57 |
* Note that the machine name of the content type will often be in a short |
|
58 |
* form of the human readable label. |
|
59 |
* The following only apply with the default sidebar_first and sidebar_second |
|
60 |
* block regions: |
|
61 |
* - two-sidebars: When both sidebars have content. |
|
62 |
* - no-sidebars: When no sidebar content exists. |
|
63 |
* - one-sidebar and sidebar-first or sidebar-second: A combination of the |
|
64 |
* two classes when only one of the two sidebars have content. |
|
65 |
* - $body_background_url: from zen_dataportal theme-settings.php |
|
66 |
* - $inline_styles: custom styles for specific elements from zen_dataportal |
|
67 |
* theme-settings.php |
|
68 |
* |
|
69 |
* @see template_preprocess() |
|
70 |
* @see template_preprocess_html() |
|
71 |
* @see zen_preprocess_html() |
|
72 |
* @see template_process() |
|
73 |
*/ |
|
74 |
?><!DOCTYPE html> |
|
75 |
<!--[if IEMobile 7]><html class="iem7" <?php print $html_attributes; ?>><![endif]--> |
|
76 |
<!--[if lte IE 6]><html class="lt-ie9 lt-ie8 lt-ie7" <?php print $html_attributes; ?>><![endif]--> |
|
77 |
<!--[if (IE 7)&(!IEMobile)]><html class="lt-ie9 lt-ie8" <?php print $html_attributes; ?>><![endif]--> |
|
78 |
<!--[if IE 8]><html class="lt-ie9" <?php print $html_attributes; ?>><![endif]--> |
|
79 |
<!--[if (gte IE 9)|(gt IEMobile 7)]><!--><html <?php print $html_attributes . $rdf_namespaces; ?>><!--<![endif]--> |
|
80 |
|
|
81 |
<head profile="<?php print $grddl_profile; ?>"> |
|
82 |
<?php print $head; ?> |
|
83 |
<title><?php print $head_title; ?></title> |
|
84 |
|
|
85 |
<?php if ($default_mobile_metatags): ?> |
|
86 |
<meta name="MobileOptimized" content="width"> |
|
87 |
<meta name="HandheldFriendly" content="true"> |
|
88 |
<meta name="viewport" content="width=device-width"> |
|
89 |
<?php endif; ?> |
|
90 |
<meta http-equiv="cleartype" content="on"> |
|
91 |
|
|
92 |
<?php print $styles; ?> |
|
93 |
<?php print $inline_styles; ?> |
|
94 |
<?php print $scripts; ?> |
|
95 |
<?php if ($add_respond_js): ?> |
|
96 |
<!--[if lt IE 9]> |
|
97 |
<script src="<?php print $base_path . $path_to_zen; ?>/js/html5-respond.js"></script> |
|
98 |
<![endif]--> |
|
99 |
<?php elseif ($add_html5_shim): ?> |
|
100 |
<!--[if lt IE 9]> |
|
101 |
<script src="<?php print $base_path . $path_to_zen; ?>/js/html5.js"></script> |
|
102 |
<![endif]--> |
|
103 |
<?php endif; ?> |
|
104 |
</head> |
|
105 |
<?php |
|
106 |
// FIXME is not save only works if no other style given |
|
107 |
// if (isset($body_background_url)){ |
|
108 |
// $attributes .= ' style="background: white url(' . $body_background_url .') fixed repeat;"'; |
|
109 |
// } |
|
110 |
?> |
|
111 |
<body class="<?php print $classes; ?>" <?php print $attributes;?>> |
|
112 |
<?php if ($skip_link_text && $skip_link_anchor): ?> |
|
113 |
<p id="skip-link"> |
|
114 |
<a href="#<?php print $skip_link_anchor; ?>" class="element-invisible element-focusable"><?php print $skip_link_text; ?></a> |
|
115 |
</p> |
|
116 |
<?php endif; ?> |
|
117 |
<?php print $page_top; ?> |
|
118 |
<?php print $page; ?> |
|
119 |
<?php print $page_bottom; ?> |
|
120 |
</body> |
|
121 |
</html> |
7.x/themes/zen_dataportal/templates/page.tpl.php | ||
---|---|---|
1 |
<?php |
|
2 |
/** |
|
3 |
* @file |
|
4 |
* Zen theme's implementation to display a single Drupal page. |
|
5 |
* |
|
6 |
* Available variables: |
|
7 |
* |
|
8 |
* General utility variables: |
|
9 |
* - $base_path: The base URL path of the Drupal installation. At the very |
|
10 |
* least, this will always default to /. |
|
11 |
* - $directory: The directory the template is located in, e.g. modules/system |
|
12 |
* or themes/bartik. |
|
13 |
* - $is_front: TRUE if the current page is the front page. |
|
14 |
* - $logged_in: TRUE if the user is registered and signed in. |
|
15 |
* - $is_admin: TRUE if the user has permission to access administration pages. |
|
16 |
* |
|
17 |
* Site identity: |
|
18 |
* - $front_page: The URL of the front page. Use this instead of $base_path, |
|
19 |
* when linking to the front page. This includes the language domain or |
|
20 |
* prefix. |
|
21 |
* - $logo: The path to the logo image, as defined in theme configuration. |
|
22 |
* - $site_name: The name of the site, empty when display has been disabled |
|
23 |
* in theme settings. |
|
24 |
* - $site_slogan: The slogan of the site, empty when display has been disabled |
|
25 |
* in theme settings. |
|
26 |
* |
|
27 |
* Navigation: |
|
28 |
* - $main_menu (array): An array containing the Main menu links for the |
|
29 |
* site, if they have been configured. |
|
30 |
* - $secondary_menu (array): An array containing the Secondary menu links for |
|
31 |
* the site, if they have been configured. |
|
32 |
* - $secondary_menu_heading: The title of the menu used by the secondary links. |
|
33 |
* - $breadcrumb: The breadcrumb trail for the current page. |
|
34 |
* |
|
35 |
* Page content (in order of occurrence in the default page.tpl.php): |
|
36 |
* - $title_prefix (array): An array containing additional output populated by |
|
37 |
* modules, intended to be displayed in front of the main title tag that |
|
38 |
* appears in the template. |
|
39 |
* - $title: The page title, for use in the actual HTML content. |
|
40 |
* - $title_suffix (array): An array containing additional output populated by |
|
41 |
* modules, intended to be displayed after the main title tag that appears in |
|
42 |
* the template. |
|
43 |
* - $messages: HTML for status and error messages. Should be displayed |
|
44 |
* prominently. |
|
45 |
* - $tabs (array): Tabs linking to any sub-pages beneath the current page |
|
46 |
* (e.g., the view and edit tabs when displaying a node). |
|
47 |
* - $action_links (array): Actions local to the page, such as 'Add menu' on the |
|
48 |
* menu administration interface. |
|
49 |
* - $feed_icons: A string of all feed icons for the current page. |
|
50 |
* - $node: The node object, if there is an automatically-loaded node |
|
51 |
* associated with the page, and the node ID is the second argument |
|
52 |
* in the page's path (e.g. node/12345 and node/12345/revisions, but not |
|
53 |
* comment/reply/12345). |
|
54 |
* - $banner_url: from zen_dataportal theme-settings.php |
|
55 |
* - $page_background_url: from zen_dataportal theme-settings.php |
|
56 |
* - $page_attributes: will contain style with $page_background_url |
|
57 |
* - $header_attributes: will contain style with $page_background_url |
|
58 |
* |
|
59 |
* Regions: |
|
60 |
* - $page['header']: Items for the header region. |
|
61 |
* - $page['navigation']: Items for the navigation region, below the main menu (if any). |
|
62 |
* - $page['help']: Dynamic help text, mostly for admin pages. |
|
63 |
* - $page['highlighted']: Items for the highlighted content region. |
|
64 |
* - $page['content']: The main content of the current page. |
|
65 |
* - $page['sidebar_first']: Items for the first sidebar. |
|
66 |
* - $page['sidebar_second']: Items for the second sidebar. |
|
67 |
* - $page['footer']: Items for the footer region. |
|
68 |
* - $page['bottom']: Items to appear at the bottom of the page below the footer. |
|
69 |
* |
|
70 |
* @see template_preprocess() |
|
71 |
* @see template_preprocess_page() |
|
72 |
* @see zen_preprocess_page() |
|
73 |
* @see template_process() |
|
74 |
*/ |
|
75 |
?> |
|
76 |
|
|
77 |
<div id="page" <?php print $page_attributes; ?> > |
|
78 |
|
|
79 |
<header id="header" role="banner" <?php print $banner_attributes; ?>> |
|
80 |
<?php if ($logo): ?> |
|
81 |
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home" id="logo"><img src="<?php print $logo; ?>" alt="<?php print t('Home'); ?>" /></a> |
|
82 |
<?php endif; ?> |
|
83 |
|
|
84 |
<?php if ($site_name || $site_slogan): ?> |
|
85 |
<hgroup id="name-and-slogan"> |
|
86 |
<?php if ($site_name): ?> |
|
87 |
<h1 id="site-name"> |
|
88 |
<a href="<?php print $front_page; ?>" title="<?php print t('Home'); ?>" rel="home"><span><?php print $site_name; ?></span></a> |
|
89 |
</h1> |
|
90 |
<?php endif; ?> |
|
91 |
|
|
92 |
<?php if ($site_slogan): ?> |
|
93 |
<h2 id="site-slogan"><?php print $site_slogan; ?></h2> |
|
94 |
<?php endif; ?> |
|
95 |
</hgroup><!-- /#name-and-slogan --> |
|
96 |
<?php endif; ?> |
|
97 |
|
|
98 |
<?php if ($secondary_menu): ?> |
|
99 |
<nav id="secondary-menu" role="navigation"> |
|
100 |
<?php print theme('links__system_secondary_menu', array( |
|
101 |
'links' => $secondary_menu, |
|
102 |
'attributes' => array( |
|
103 |
'class' => array('links', 'inline', 'clearfix'), |
|
104 |
), |
|
105 |
'heading' => array( |
|
106 |
'text' => $secondary_menu_heading, |
|
107 |
'level' => 'h2', |
|
108 |
'class' => array('element-invisible'), |
|
109 |
), |
|
110 |
)); ?> |
|
111 |
</nav> |
|
112 |
<?php endif; ?> |
|
113 |
|
|
114 |
<?php print render($page['header']); ?> |
|
115 |
</header> |
|
116 |
|
|
117 |
<div id="main"> |
|
118 |
|
|
119 |
<div id="content" class="column" role="main"> |
|
120 |
<?php print render($page['highlighted']); ?> |
|
121 |
<?php print $breadcrumb; ?> |
|
122 |
<a id="main-content"></a> |
|
123 |
<?php print render($title_prefix); ?> |
|
124 |
<?php if ($title): ?> |
|
125 |
<h1 class="title" id="page-title"><?php print $title; ?></h1> |
|
126 |
<?php endif; ?> |
|
127 |
<?php print render($title_suffix); ?> |
|
128 |
<?php print $messages; ?> |
|
129 |
<?php print render($tabs); ?> |
|
130 |
<?php print render($page['help']); ?> |
|
131 |
<?php if ($action_links): ?> |
|
132 |
<ul class="action-links"><?php print render($action_links); ?></ul> |
|
133 |
<?php endif; ?> |
|
134 |
<?php print render($page['content']); ?> |
|
135 |
<?php print $feed_icons; ?> |
|
136 |
</div><!-- /#content --> |
|
137 |
|
|
138 |
<div id="navigation"> |
|
139 |
|
|
140 |
<?php if ($main_menu): ?> |
|
141 |
<nav id="main-menu" role="navigation"> |
|
142 |
<?php |
|
143 |
// This code snippet is hard to modify. We recommend turning off the |
|
144 |
// "Main menu" on your sub-theme's settings form, deleting this PHP |
|
145 |
// code block, and, instead, using the "Menu block" module. |
|
146 |
// @see http://drupal.org/project/menu_block |
|
147 |
print theme('links__system_main_menu', array( |
|
148 |
'links' => $main_menu, |
|
149 |
'attributes' => array( |
|
150 |
'class' => array('links', 'inline', 'clearfix'), |
|
151 |
), |
|
152 |
'heading' => array( |
|
153 |
'text' => t('Main menu'), |
|
154 |
'level' => 'h2', |
|
155 |
'class' => array('element-invisible'), |
|
156 |
), |
|
157 |
)); ?> |
|
158 |
</nav> |
|
159 |
<?php endif; ?> |
|
160 |
|
|
161 |
<?php print render($page['navigation']); ?> |
|
162 |
|
|
163 |
</div><!-- /#navigation --> |
|
164 |
|
|
165 |
<?php |
|
166 |
// Render the sidebars to see if there's anything in them. |
|
167 |
$sidebar_first = render($page['sidebar_first']); |
|
168 |
$sidebar_second = render($page['sidebar_second']); |
|
169 |
?> |
|
170 |
|
|
171 |
<?php if ($sidebar_first || $sidebar_second): ?> |
|
172 |
<aside class="sidebars"> |
|
173 |
<?php print $sidebar_first; ?> |
|
174 |
<?php print $sidebar_second; ?> |
|
175 |
</aside><!-- /.sidebars --> |
|
176 |
<?php endif; ?> |
|
177 |
|
|
178 |
</div><!-- /#main --> |
|
179 |
|
|
180 |
<?php print render($page['footer']); ?> |
|
181 |
|
|
182 |
</div><!-- /#page --> |
|
183 |
|
|
184 |
<?php print render($page['bottom']); ?> |
7.x/themes/zen_dataportal/theme-settings.php | ||
---|---|---|
1 | 1 |
<?php |
2 |
|
|
3 |
/** |
|
4 |
* Provides the image names which can be configured in the theme settings to all |
|
5 |
* theme setting functions. |
|
6 |
* |
|
7 |
* @return multitype:string |
|
8 |
* the list of image names which can be configured in the theme settings |
|
9 |
*/ |
|
10 |
function _zen_dataportal_imagenames() { |
|
11 |
static $image_list = array('banner', 'body_background', 'page_background'); |
|
12 |
return $image_list; |
|
13 |
} |
|
14 |
|
|
2 | 15 |
/** |
3 | 16 |
* Implements hook_form_system_theme_settings_alter(). |
4 | 17 |
* |
... | ... | |
13 | 26 |
return; |
14 | 27 |
} |
15 | 28 |
|
16 |
// Create the form using Forms API: http://api.drupal.org/api/7 |
|
17 |
|
|
18 |
$which_image = "banner"; |
|
19 |
$form['zen_dataportal'] = array( |
|
20 |
'#type' => 'fieldset', |
|
21 |
'#title' => t($which_image) . ' ' . t('image settings'), |
|
22 |
'#description' => t('If toggled on, the following image will be displayed.'), |
|
23 |
'#attributes' => array('class' => array('theme-settings-bottom')), |
|
24 |
); |
|
25 |
$form['zen_dataportal']['default_' . $which_image] = array( |
|
26 |
'#type' => 'checkbox', |
|
27 |
'#title' => t('Use the default') . t($which_image), |
|
28 |
'#default_value' => theme_get_setting('default_' . $which_image), |
|
29 |
'#tree' => FALSE, |
|
30 |
'#description' => t('Check here if you want the theme to use the image supplied with it.') |
|
31 |
); |
|
32 |
$form['zen_dataportal']['settings'] = array( |
|
33 |
'#type' => 'container', |
|
34 |
'#states' => array( |
|
35 |
// Hide the logo settings when using the default logo. |
|
36 |
'invisible' => array( |
|
37 |
'input[name="default_' . $which_image . '"]' => array('checked' => TRUE), |
|
29 |
$form['zen_dataportal_colors'] = array( |
|
30 |
'#type' => 'fieldset', |
|
31 |
'#title' => t('Colors'), |
|
32 |
'#description' => t('Configure colors where.'), |
|
33 |
'#attributes' => array('class' => array('theme-settings-bottom')), |
|
34 |
); |
|
35 |
$form['zen_dataportal_colors']['site_name_color'] = array( |
|
36 |
'#type' => 'textfield', |
|
37 |
'#title' => t('Site name color'), |
|
38 |
'#default_value' => theme_get_setting('site_name_color'), |
|
39 |
'#description' => t('Set the color of the site name which is shown in the header. Must be a css color value like: #000000'), |
|
40 |
); |
|
41 |
|
|
42 |
// |
|
43 |
// custom images for banner, body and page backgrounds |
|
44 |
// |
|
45 |
foreach(_zen_dataportal_imagenames() as $which_image) { |
|
46 |
$image_label = str_replace('_', ' ', $which_image); |
|
47 |
$form['zen_dataportal_' . $which_image] = array( |
|
48 |
'#type' => 'fieldset', |
|
49 |
'#title' => ucfirst(t($image_label)) . ' ' . t('image settings'), |
|
50 |
'#description' => t('If toggled on, the following image will be displayed.'), |
|
51 |
'#attributes' => array('class' => array('theme-settings-bottom')), |
|
52 |
); |
|
53 |
$form['zen_dataportal_' . $which_image]['default_' . $which_image] = array( |
|
54 |
'#type' => 'checkbox', |
|
55 |
'#title' => t('Use the default') . t($which_image), |
|
56 |
'#default_value' => theme_get_setting('default_' . $which_image), |
|
57 |
'#tree' => FALSE, |
|
58 |
'#description' => t('Check here if you want the theme to use the image supplied with it.') |
|
59 |
); |
|
60 |
$form['zen_dataportal_' . $which_image]['settings'] = array( |
|
61 |
'#type' => 'container', |
|
62 |
'#states' => array( |
|
63 |
// Hide the logo settings when using the default logo. |
|
64 |
'invisible' => array( |
|
65 |
'input[name="default_' . $which_image . '"]' => array('checked' => TRUE), |
|
66 |
), |
|
38 | 67 |
), |
39 |
), |
|
40 |
); |
|
41 |
|
|
42 |
// If $path is a public:// URI, display the path relative to the files |
|
43 |
// directory; stream wrappers are not end-user friendly. |
|
44 |
$path = theme_get_setting($which_image . '_path'); |
|
45 |
$image = ''; |
|
46 |
if (file_uri_scheme($path) == 'public') { |
|
47 |
$url = file_create_url($path); |
|
48 |
$path = file_uri_target($path); |
|
49 |
$form['zen_dataportal']['settings'][$which_image . '_preview'] = array( |
|
50 |
'#type' => 'item', |
|
51 |
'#title' => t('Preview'), |
|
52 |
'#markup' => '<div class="image-preview"><img src="' . $url . '"/></div>', |
|
53 | 68 |
); |
54 |
} |
|
55 |
$form['zen_dataportal']['settings'][$which_image . '_path'] = array( |
|
56 |
'#type' => 'textfield', |
|
57 |
'#title' => t('Path to custom') . ' ' . t($which_image), |
|
58 |
'#description' => t('The path to the file you would like to use as your') . ' ' . t($which_image), |
|
59 |
'#default_value' => $path, |
|
60 |
); |
|
61 |
$form['zen_dataportal']['settings'][$which_image . '_upload'] = array( |
|
62 |
'#type' => 'file', |
|
63 |
'#title' => t('Upload') . ' ' . t($which_image), |
|
64 |
'#maxlength' => 40, |
|
65 |
'#description' => t("If you don't have direct file access to the server, use this field to upload your image.") |
|
66 |
); |
|
69 |
|
|
70 |
// If $path is a public:// URI, display the path relative to the files |
|
71 |
// directory; stream wrappers are not end-user friendly. |
|
72 |
$path = theme_get_setting($which_image . '_path'); |
|
73 |
$image = ''; |
|
74 |
if (file_uri_scheme($path) == 'public') { |
|
75 |
$url = file_create_url($path); |
|
76 |
$path = file_uri_target($path); |
|
77 |
$form['zen_dataportal_' . $which_image]['settings'][$which_image . '_preview'] = array( |
|
78 |
'#type' => 'item', |
|
79 |
'#title' => t('Preview'), |
|
80 |
'#markup' => '<div class="image-preview"><img src="' . $url . '"/></div>', |
|
81 |
); |
|
82 |
} |
|
83 |
$form['zen_dataportal_' . $which_image]['settings'][$which_image . '_path'] = array( |
|
84 |
'#type' => 'textfield', |
|
85 |
'#title' => t('Path to custom') . ' ' . t($image_label), |
|
86 |
'#description' => t('The path to the file you would like to use as your') . ' ' . t($image_label), |
|
87 |
'#default_value' => $path, |
|
88 |
); |
|
89 |
$form['zen_dataportal_' . $which_image]['settings'][$which_image . '_upload'] = array( |
|
90 |
'#type' => 'file', |
|
91 |
'#title' => t('Upload') . ' ' . t($image_label) . t(' image'), |
|
92 |
'#maxlength' => 40, |
|
93 |
'#description' => t("If you don't have direct file access to the server, use this field to upload your image.") |
|
94 |
); |
|
95 |
} // END of loop over image names |
|
67 | 96 |
|
68 | 97 |
|
69 | 98 |
$form['#validate'][] = 'zen_dataportal_theme_settings_validate'; |
... | ... | |
75 | 104 |
|
76 | 105 |
/** |
77 | 106 |
* Process zen_dataportal admin form submissions. |
107 |
* @param $form |
|
108 |
* Nested array of form elements that comprise the form. |
|
109 |
* @param $form_state |
|
110 |
* A keyed array containing the current state of the form. |
|
78 | 111 |
*/ |
79 | 112 |
function zen_dataportal_theme_settings_submit($form, &$form_state) { |
80 | 113 |
|
81 | 114 |
$values = &$form_state['values']; |
82 | 115 |
|
83 |
// If the user uploaded a new image, save it to a permanent location |
|
84 |
// and use it in place of the default theme-provided file. |
|
85 |
$which_image = "banner"; |
|
86 |
if ($file = $values[$which_image . '_upload']) { |
|
87 |
unset($values[$which_image . '_upload']); |
|
88 |
$filename = file_unmanaged_copy($file->uri); |
|
89 |
$values['default_' .$which_image ] = 0; |
|
90 |
$values[$which_image . '_path'] = $filename; |
|
91 |
$values['toggle_' . $which_image] = 1; |
|
92 |
} |
|
93 |
if (!empty($values[$which_image . '_path'])) { |
|
94 |
$values[$which_image . '_path'] = _system_theme_settings_validate_path($values[$which_image . '_path']); |
|
95 |
} |
|
116 |
foreach(_zen_dataportal_imagenames() as $which_image) { |
|
117 |
// If the user uploaded a new image, save it to a permanent location |
|
118 |
// and use it in place of the default theme-provided file. |
|
119 |
if ($file = $values[$which_image . '_upload']) { |
|
120 |
unset($values[$which_image . '_upload']); |
|
121 |
$filename = file_unmanaged_copy($file->uri); |
|
122 |
$values['default_' .$which_image ] = 0; |
|
123 |
$values[$which_image . '_path'] = $filename; |
|
124 |
$values['toggle_' . $which_image] = 1; |
|
125 |
} |
|
126 |
if (!empty($values[$which_image . '_path'])) { |
|
127 |
$values[$which_image . '_path'] = _system_theme_settings_validate_path($values[$which_image . '_path']); |
|
128 |
} |
|
129 |
|
|
130 |
} // END of loop over image names |
|
96 | 131 |
|
97 | 132 |
/* |
98 | 133 |
* Ok, we are done here the $values will be saved in the theme |
99 | 134 |
* variable by system_theme_settings_submit($form, &$form_state) |
135 |
* in modules/system/system.admin.inc |
|
100 | 136 |
*/ |
101 | 137 |
|
102 | 138 |
} |
103 | 139 |
|
104 | 140 |
/** |
105 | 141 |
* Validator for the system_theme_settings() form. |
142 |
* @param $form |
|
143 |
* Nested array of form elements that comprise the form. |
|
144 |
* @param $form_state |
|
145 |
* A keyed array containing the current state of the form. |
|
106 | 146 |
*/ |
107 | 147 |
function zen_dataportal_theme_settings_validate($form, &$form_state) { |
108 | 148 |
|
109 | 149 |
$validators = array('file_validate_is_image' => array()); |
110 | 150 |
|
111 |
$which_image = "banner"; |
|
112 |
// Check for a new uploaded logo. |
|
113 |
$file = file_save_upload($which_image . '_upload', $validators); |
|
114 |
if (isset($file)) { |
|
115 |
// File upload was attempted. |
|
116 |
if ($file) { |
|
117 |
// Put the temporary file in form_values so we can save it on submit. |
|
118 |
$form_state['values'][$which_image . '_upload'] = $file; |
|
119 |
} |
|
120 |
else { |
|
121 |
// File upload failed. |
|
122 |
form_set_error($which_image . '_upload', t('The image could not be uploaded.')); |
|
151 |
foreach(_zen_dataportal_imagenames() as $which_image) { |
|
152 |
// Check for a new uploaded logo. |
|
153 |
$file = file_save_upload($which_image . '_upload', $validators); |
|
154 |
if (isset($file)) { |
|
155 |
// File upload was attempted. |
|
156 |
if ($file) { |
|
157 |
// Put the temporary file in form_values so we can save it on submit. |
|
158 |
$form_state['values'][$which_image . '_upload'] = $file; |
|
159 |
} |
|
160 |
else { |
|
161 |
// File upload failed. |
|
162 |
form_set_error($which_image . '_upload', t('The image could not be uploaded.')); |
|
163 |
} |
|
123 | 164 |
} |
124 |
} |
|
165 |
} // END of loop over image names
|
|
125 | 166 |
} |
Also available in: Unified diff
colors configurable