added news updates ui
This commit is contained in:
@@ -1,14 +1,14 @@
|
||||
(function() {
|
||||
Danbooru.News = {};
|
||||
Danbooru.NewsUpdate = {};
|
||||
|
||||
Danbooru.News.initialize = function() {
|
||||
var key = $("#news-ticker").data("updated-at");
|
||||
Danbooru.NewsUpdate.initialize = function() {
|
||||
var key = $("#news-updates").data("updated-at");
|
||||
|
||||
if (Danbooru.Cookie.get("news-ticker") === key) {
|
||||
$("#news-ticker").hide();
|
||||
$("#news-updates").hide();
|
||||
} else {
|
||||
$("#close-news-ticker-link").click(function(e) {
|
||||
$("#news-ticker").hide();
|
||||
$("#news-updates").hide();
|
||||
Danbooru.Cookie.put("news-ticker", key);
|
||||
|
||||
// need to reset the more link
|
||||
@@ -20,6 +20,6 @@
|
||||
}
|
||||
|
||||
$(function() {
|
||||
Danbooru.News.initialize();
|
||||
Danbooru.NewsUpdate.initialize();
|
||||
});
|
||||
})();
|
||||
@@ -1,4 +1,4 @@
|
||||
div#news-ticker {
|
||||
div#news-updates {
|
||||
padding: 5px;
|
||||
background: #EEE;
|
||||
border-bottom: 2px solid #666;
|
||||
|
||||
4
app/assets/stylesheets/news_updates.css
Normal file
4
app/assets/stylesheets/news_updates.css
Normal file
@@ -0,0 +1,4 @@
|
||||
/*
|
||||
Place all the styles related to the matching controller here.
|
||||
They will automatically be included in application.css.
|
||||
*/
|
||||
Reference in New Issue
Block a user