| 1 | Index: wp-content/themes/twentytwelve/functions.php |
|---|
| 2 | =================================================================== |
|---|
| 3 | --- wp-content/themes/twentytwelve/functions.php (revision 21350) |
|---|
| 4 | +++ wp-content/themes/twentytwelve/functions.php (working copy) |
|---|
| 5 | @@ -56,11 +56,16 @@ |
|---|
| 6 | // Load up our theme options page and related code. |
|---|
| 7 | require( get_template_directory() . '/inc/theme-options.php' ); |
|---|
| 8 | $twentytwelve_options = new Twenty_Twelve_Options(); |
|---|
| 9 | - |
|---|
| 10 | - // You can define support for an editor stylesheet here; Twenty Twelve doesn't have a default one. |
|---|
| 11 | - // Then, create a CSS file called editor-style.css and place it in your theme directory. |
|---|
| 12 | + |
|---|
| 13 | + // Some awesome comment that explains why we have to add another editor style |
|---|
| 14 | + $options = $twentytwelve_options->get_theme_options(); |
|---|
| 15 | + if ( $options['enable_fonts'] ) |
|---|
| 16 | + add_editor_style( 'editor-font.css' ); |
|---|
| 17 | + |
|---|
| 18 | + // This theme styles the visual editor with editor-style.css to match the theme style. |
|---|
| 19 | add_editor_style(); |
|---|
| 20 | - |
|---|
| 21 | + |
|---|
| 22 | + |
|---|
| 23 | // Add default posts and comments RSS feed links to <head>. |
|---|
| 24 | add_theme_support( 'automatic-feed-links' ); |
|---|
| 25 | |
|---|
| 26 | Index: wp-content/themes/twentytwelve/editor-font.css |
|---|
| 27 | =================================================================== |
|---|
| 28 | --- wp-content/themes/twentytwelve/editor-font.css (revision 0) |
|---|
| 29 | +++ wp-content/themes/twentytwelve/editor-font.css (revision 0) |
|---|
| 30 | @@ -0,0 +1 @@ |
|---|
| 31 | +@import url("http://fonts.googleapis.com/css?family=Open+Sans:400italic,700italic,400,700"); |
|---|
| 32 | \ No newline at end of file |
|---|
| 33 | Index: wp-content/themes/twentytwelve/editor-style.css |
|---|
| 34 | =================================================================== |
|---|
| 35 | --- wp-content/themes/twentytwelve/editor-style.css (revision 0) |
|---|
| 36 | +++ wp-content/themes/twentytwelve/editor-style.css (revision 0) |
|---|
| 37 | @@ -0,0 +1,304 @@ |
|---|
| 38 | +/* |
|---|
| 39 | +Theme Name: Twenty Twelve |
|---|
| 40 | +Description: Used to style the TinyMCE editor. |
|---|
| 41 | +*/ |
|---|
| 42 | + |
|---|
| 43 | +html { |
|---|
| 44 | + font-size: 87.5%; |
|---|
| 45 | +} |
|---|
| 46 | +html .mceContentBody { |
|---|
| 47 | + max-width: 625px; |
|---|
| 48 | +} |
|---|
| 49 | +body { |
|---|
| 50 | + color: #444; |
|---|
| 51 | + font-family: "Open Sans", Helvetica, Arial, sans-serif; |
|---|
| 52 | + font-size: 14px; |
|---|
| 53 | + font-size: 1rem; |
|---|
| 54 | + line-height: 1; |
|---|
| 55 | + text-rendering: optimizeLegibility; |
|---|
| 56 | + vertical-align: baseline; |
|---|
| 57 | +} |
|---|
| 58 | + |
|---|
| 59 | +/* Headings */ |
|---|
| 60 | +h1, h2, h3, h4, h5, h6 { |
|---|
| 61 | + clear: both; |
|---|
| 62 | + line-height: 1.846153846; |
|---|
| 63 | + margin: 24px 0; |
|---|
| 64 | + margin: 1.714285714rem 0; |
|---|
| 65 | +} |
|---|
| 66 | +h1 { |
|---|
| 67 | + font-size: 21px; |
|---|
| 68 | + font-size: 1.5rem; |
|---|
| 69 | + line-height: 1.5; |
|---|
| 70 | +} |
|---|
| 71 | +h2 { |
|---|
| 72 | + font-size: 18px; |
|---|
| 73 | + font-size: 1.285714286rem; |
|---|
| 74 | + line-height: 1.6; |
|---|
| 75 | +} |
|---|
| 76 | +h3 { |
|---|
| 77 | + font-size: 16px; |
|---|
| 78 | + font-size: 1.142857143rem; |
|---|
| 79 | +} |
|---|
| 80 | +h4 { |
|---|
| 81 | + font-size: 14px; |
|---|
| 82 | + font-size: 1rem; |
|---|
| 83 | +} |
|---|
| 84 | +h5 { |
|---|
| 85 | + font-size: 13px; |
|---|
| 86 | + font-size: 0.928571429rem; |
|---|
| 87 | +} |
|---|
| 88 | +h6 { |
|---|
| 89 | + font-size: 12px; |
|---|
| 90 | + font-size: 0.857142857rem; |
|---|
| 91 | +} |
|---|
| 92 | +hr { |
|---|
| 93 | + /* TODO */ |
|---|
| 94 | +} |
|---|
| 95 | + |
|---|
| 96 | +/* Text elements */ |
|---|
| 97 | +p { |
|---|
| 98 | + margin: 0 0 24px; |
|---|
| 99 | + margin: 0 0 1.714285714rem; |
|---|
| 100 | + line-height: 1.714285714; |
|---|
| 101 | +} |
|---|
| 102 | +ul, ol { |
|---|
| 103 | + margin: 0 0 24px; |
|---|
| 104 | + margin: 0 0 1.714285714rem; |
|---|
| 105 | + line-height: 1.714285714; |
|---|
| 106 | + padding: 0; |
|---|
| 107 | +} |
|---|
| 108 | +ul { |
|---|
| 109 | + list-style: disc outside; |
|---|
| 110 | +} |
|---|
| 111 | +ol { |
|---|
| 112 | + list-style: decimal outside; |
|---|
| 113 | +} |
|---|
| 114 | +ul ul, ol ol, ul ol, ol ul { |
|---|
| 115 | + margin-bottom: 0; |
|---|
| 116 | +} |
|---|
| 117 | +li { |
|---|
| 118 | + margin: 0 0 0 24px; |
|---|
| 119 | + margin: 0 0 0 1.714285714rem; |
|---|
| 120 | +} |
|---|
| 121 | +dl { |
|---|
| 122 | + margin: 0 24px; |
|---|
| 123 | + margin: 0 1.714285714rem; |
|---|
| 124 | +} |
|---|
| 125 | +dt { |
|---|
| 126 | + font-weight: bold; |
|---|
| 127 | + margin-bottom: 24px; |
|---|
| 128 | + margin-bottom: 1.714285714rem; |
|---|
| 129 | +} |
|---|
| 130 | +dd { |
|---|
| 131 | + line-height: 1.714285714; |
|---|
| 132 | + margin: 0 0 24px; |
|---|
| 133 | + margin: 0 0 1.714285714rem; |
|---|
| 134 | +} |
|---|
| 135 | +strong { |
|---|
| 136 | + font-weight: bold; |
|---|
| 137 | +} |
|---|
| 138 | +cite, em, i { |
|---|
| 139 | + font-style: italic; |
|---|
| 140 | +} |
|---|
| 141 | +cite { |
|---|
| 142 | + border: none; |
|---|
| 143 | +} |
|---|
| 144 | + |
|---|
| 145 | +big { |
|---|
| 146 | + /* TODO */ |
|---|
| 147 | +} |
|---|
| 148 | +.mceContentBody blockquote { |
|---|
| 149 | + font-style: italic !important; |
|---|
| 150 | + font-weight: normal; |
|---|
| 151 | + margin: 0; |
|---|
| 152 | + padding: 24px; |
|---|
| 153 | + padding: 1.714285714rem; |
|---|
| 154 | +} |
|---|
| 155 | +pre { |
|---|
| 156 | + border: 1px solid #ededed; |
|---|
| 157 | + color: #666; |
|---|
| 158 | + font-family: Consolas, Monaco, Lucida Console, monospace; |
|---|
| 159 | + font-size: 12px; |
|---|
| 160 | + font-size: 0.857142857rem; |
|---|
| 161 | + line-height: 1.714285714; |
|---|
| 162 | + margin: 24px 0; |
|---|
| 163 | + margin: 1.714285714rem 0; |
|---|
| 164 | + overflow: auto; |
|---|
| 165 | + padding: 24px; |
|---|
| 166 | + padding: 1.714285714rem; |
|---|
| 167 | +} |
|---|
| 168 | +code, kbd, samp, var { |
|---|
| 169 | + font-family: Consolas, Monaco, Lucida Console, monospace; |
|---|
| 170 | + font-size: 12px; |
|---|
| 171 | + font-size: 0.857142857rem; |
|---|
| 172 | + line-height: 2; |
|---|
| 173 | +} |
|---|
| 174 | +abbr, acronym, dfn { |
|---|
| 175 | + border-bottom: 1px dotted #666; |
|---|
| 176 | + cursor: help; |
|---|
| 177 | +} |
|---|
| 178 | +address { |
|---|
| 179 | + display: block; |
|---|
| 180 | + line-height: 1.714285714; |
|---|
| 181 | + margin: 0 0 24px; |
|---|
| 182 | + margin: 0 0 1.714285714rem; |
|---|
| 183 | +} |
|---|
| 184 | +del { |
|---|
| 185 | + /* TODO */ |
|---|
| 186 | +} |
|---|
| 187 | +ins { |
|---|
| 188 | + /* TODO */ |
|---|
| 189 | +} |
|---|
| 190 | +sup, |
|---|
| 191 | +sub { |
|---|
| 192 | + font-size: 75%; |
|---|
| 193 | + line-height: 0; |
|---|
| 194 | + position: relative; |
|---|
| 195 | + vertical-align: baseline; |
|---|
| 196 | +} |
|---|
| 197 | +sup { |
|---|
| 198 | + top: -0.5em; |
|---|
| 199 | +} |
|---|
| 200 | +sub { |
|---|
| 201 | + bottom: -0.25em; |
|---|
| 202 | +} |
|---|
| 203 | +input[type=text] { |
|---|
| 204 | + border: 1px solid #ccc; |
|---|
| 205 | + border-radius: 3px; |
|---|
| 206 | + font-family: inherit; |
|---|
| 207 | + padding: 6px; |
|---|
| 208 | + padding: 0.428571429rem; |
|---|
| 209 | +} |
|---|
| 210 | +textarea { |
|---|
| 211 | + border: 1px solid #d5d2ca; |
|---|
| 212 | + border-radius: 3px; |
|---|
| 213 | + font-family: inherit; |
|---|
| 214 | + font-size: 12px; |
|---|
| 215 | + font-size: 0.857142857rem; |
|---|
| 216 | + line-height: 1.714285714; |
|---|
| 217 | + padding: 10px; |
|---|
| 218 | + padding: 0.714285714rem; |
|---|
| 219 | + width: 96%; |
|---|
| 220 | +} |
|---|
| 221 | + |
|---|
| 222 | +/* Links */ |
|---|
| 223 | +a, |
|---|
| 224 | +a em, |
|---|
| 225 | +a strong { |
|---|
| 226 | + outline: none; |
|---|
| 227 | + color: #21759b; |
|---|
| 228 | +} |
|---|
| 229 | +a:focus, |
|---|
| 230 | +a:active, |
|---|
| 231 | +a:hover { |
|---|
| 232 | + color: #0f3647; |
|---|
| 233 | +} |
|---|
| 234 | + |
|---|
| 235 | +/* Alignment */ |
|---|
| 236 | +.alignleft { |
|---|
| 237 | + display: inline; |
|---|
| 238 | + float: left; |
|---|
| 239 | +} |
|---|
| 240 | +.alignright { |
|---|
| 241 | + display: inline; |
|---|
| 242 | + float: right; |
|---|
| 243 | + margin: 12px 0 12px 24px; |
|---|
| 244 | + margin: 0.857142857rem 0 0.857142857rem 1.714285714rem; |
|---|
| 245 | +} |
|---|
| 246 | +.aligncenter { |
|---|
| 247 | + clear: both; |
|---|
| 248 | + display: block; |
|---|
| 249 | + margin-top: 12px; |
|---|
| 250 | + margin-top: 0.857142857rem; |
|---|
| 251 | + margin-bottom: 12px; |
|---|
| 252 | + margin-bottom: 0.857142857rem; |
|---|
| 253 | +} |
|---|
| 254 | + |
|---|
| 255 | +/* Tables */ |
|---|
| 256 | +table { |
|---|
| 257 | + border-bottom: 1px solid #ededed; |
|---|
| 258 | + border-collapse: collapse; |
|---|
| 259 | + border-spacing: 0; |
|---|
| 260 | + color: #777; |
|---|
| 261 | + font-size: 12px; |
|---|
| 262 | + font-size: 0.857142857rem; |
|---|
| 263 | + line-height: 2; |
|---|
| 264 | + margin: 0 0 24px; |
|---|
| 265 | + margin: 0 0 1.714285714rem; |
|---|
| 266 | + width: 100%; |
|---|
| 267 | +} |
|---|
| 268 | +tr th { |
|---|
| 269 | + color: #636363; |
|---|
| 270 | + font-size: 11px; |
|---|
| 271 | + font-size: 0.785714286rem; |
|---|
| 272 | + font-weight: bold; |
|---|
| 273 | + line-height: 2.181818182; |
|---|
| 274 | + text-align: left; |
|---|
| 275 | + text-transform: uppercase; |
|---|
| 276 | +} |
|---|
| 277 | +td { |
|---|
| 278 | + border-top: 1px solid #ededed !important; |
|---|
| 279 | + color: #777; |
|---|
| 280 | + font-size: inherit; |
|---|
| 281 | + font-weight: normal; |
|---|
| 282 | + text-align: left; |
|---|
| 283 | + padding: 6px 10px 6px 0; |
|---|
| 284 | +} |
|---|
| 285 | + |
|---|
| 286 | +/* Images */ |
|---|
| 287 | +img { |
|---|
| 288 | + border: 0; |
|---|
| 289 | + border-radius: 3px; |
|---|
| 290 | + box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2); |
|---|
| 291 | + max-width: 100%; |
|---|
| 292 | +} |
|---|
| 293 | +img.size-full { |
|---|
| 294 | + width: auto/9; /* Prevent stretching of full-size images in IE8 */ |
|---|
| 295 | +} |
|---|
| 296 | +img[class*="wp-image-"] { |
|---|
| 297 | + height: auto; |
|---|
| 298 | + max-width: 100%; |
|---|
| 299 | +} |
|---|
| 300 | + |
|---|
| 301 | +img.alignleft { |
|---|
| 302 | + margin: 12px 24px 12px 0; |
|---|
| 303 | + margin: 0.857142857rem 1.714285714rem 0.857142857rem 0; |
|---|
| 304 | +} |
|---|
| 305 | +img[class*="align"], |
|---|
| 306 | +img[class*="wp-image-"], |
|---|
| 307 | +img[class*="attachment-"] { |
|---|
| 308 | + height: auto; /* Make sure images with WordPress-added height and width attributes are scaled correctly */ |
|---|
| 309 | +} |
|---|
| 310 | +img.mceWPnextpage { |
|---|
| 311 | + border-radius: 0; |
|---|
| 312 | + box-shadow: none; |
|---|
| 313 | +} |
|---|
| 314 | +img.wp-smiley { |
|---|
| 315 | + border: 0; |
|---|
| 316 | + border-radius: 0; |
|---|
| 317 | + box-shadow: none; |
|---|
| 318 | + margin-bottom: 0; |
|---|
| 319 | + margin-top: 0; |
|---|
| 320 | + padding: 0; |
|---|
| 321 | +} |
|---|
| 322 | +.wp-caption { |
|---|
| 323 | + background: transparent; |
|---|
| 324 | + border: none; |
|---|
| 325 | + margin: 0; |
|---|
| 326 | + padding: 4px; |
|---|
| 327 | + text-align: left; |
|---|
| 328 | +} |
|---|
| 329 | +.wp-caption-dt { |
|---|
| 330 | + margin: 0; |
|---|
| 331 | +} |
|---|
| 332 | +.wp-caption .wp-caption-text, |
|---|
| 333 | +.wp-caption-dd { |
|---|
| 334 | + color: #777; |
|---|
| 335 | + font-style: italic; |
|---|
| 336 | + font-size: 12px; |
|---|
| 337 | + font-size: 0.857142857rem; |
|---|
| 338 | + line-height: 2; |
|---|
| 339 | + margin: 0 0 24px; |
|---|
| 340 | + margin: 0 0 1.71429rem; |
|---|
| 341 | +} |
|---|
| 342 | \ No newline at end of file |
|---|