diff --git a/css/style.css b/css/style.css index 6601b99995..00248f1e86 100644 --- a/css/style.css +++ b/css/style.css @@ -482,15 +482,7 @@ body.dcompiler dt a.anchor:hover:before .notice { - display: block; - padding: 0.5em; - text-align: center; - font-weight: bold; margin-bottom: 0.5em; - box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); - text-decoration: none; - background-color: white; - border: 1px dotted #633; } a.notice:hover @@ -498,6 +490,41 @@ a.notice:hover background: inherit; /* $(menu_bg_hover) */ } +.notice, table.notice-table td +{ + background-color: white; + box-shadow: 0 2px 5px 0 rgba(0, 0, 0, 0.16), 0 2px 10px 0 rgba(0, 0, 0, 0.12); + border: 1px dotted #633; + text-align: center; + padding: 0.5em; +} + +.notice, table.notice-table td a +{ + text-decoration: none; + font-weight: bold; + display: block; +} + +table.notice-table +{ + border: none; + width: 100%; +} + +table.notice-table td +{ + vertical-align: middle; +} + +/* padding between left and right cell */ +table.notice-table td:nth-child(2) +{ + visibility: hidden; + border: 0; + padding: 0.25em; +} + /* These are different kinds of
 sections */
 .bnf /* grammar */
 {
diff --git a/doc.ddoc b/doc.ddoc
index 15f9e30599..135eb27095 100644
--- a/doc.ddoc
+++ b/doc.ddoc
@@ -3,8 +3,6 @@ ROOT = .
 SELF_PATH =
 BODYCLASS = doc
 PROJECT = dlang.org
-LAYOUT_SUFFIX=
-$(SCRIPTLOAD $(ROOT_DIR)js/run-main-website.js)
 _=
 
 NAVIGATION=
diff --git a/index.dd b/index.dd
index 88921a851d..dde6741aac 100644
--- a/index.dd
+++ b/index.dd
@@ -5,7 +5,11 @@ $(D_S D Programming Language,
 $(SECTION1 The D Programming Language$(BR) $(SPANC slogan, Modern convenience. Modeling power. Native efficiency.),
 
 $(NOTICE DMD $(LATEST) Released$(BR)Download · Changelog)
-$(NOTICE_L http://dconf.org/2015/schedule/index.html, Videos and Slides from DConf 2015)
+$(TABLEC notice-table, $(TR $(TD
+$(WEB arsdnet.net/this-week-in-d/, This Week in D)
+)$(TD)$(TD
+$(WEB dconf.org/2015/schedule/index.html, Videos and Slides from DConf 2015)
+)))
 
@@ -646,5 +650,8 @@ Macros: ) ) + LAYOUT_SUFFIX= + $(SCRIPTLOAD $(ROOT_DIR)js/run-main-website.js) + $(SCRIPTLOAD http://arsdnet.net/this-week-in-d/twid-latest.js) LAYOUT_TITLE= _= diff --git a/js/dlang.js b/js/dlang.js index 1deabe6083..64a10866a0 100644 --- a/js/dlang.js +++ b/js/dlang.js @@ -76,3 +76,16 @@ } }); })(jQuery); + +// "This Week in D" integration +// setTwid is called from http://arsdnet.net/this-week-in-d/twid-latest.js +// which is included in index.html +function setTwid(url, title, description) { + $('table.notice-table td:first-child').html( + $('') + .attr('href', url) + .append($('').text(title + ':')) + .append($('
')) + .append($('').text(description)) + ); +}