diff --git a/app/css/main.css b/app/css/main.css index 78a4f5e..74e1631 100644 --- a/app/css/main.css +++ b/app/css/main.css @@ -10,7 +10,11 @@ */ + +.context-main-bg { + background-color: #f7f7f7; +} /* Base styles for the switch container */ .material-switch { position: relative; diff --git a/app/js/main.js b/app/js/main.js index 377b259..a41ce06 100644 --- a/app/js/main.js +++ b/app/js/main.js @@ -86,22 +86,34 @@ $(document).ready(function() { // with the dynamic footer, you need to adjust the content padding to make sure the footer doesn't overlap the content document.addEventListener('DOMContentLoaded', function () { const toggleButton = document.getElementById('dark-mode-toggle'); + const enableButton = document.getElementById('dark-mode-toggle-button'); const darkModeStylesheet = document.getElementById('dark-mode-stylesheet'); - console.error( 'DOMContentLoaded'); // Check if dark mode is saved in localStorage if (localStorage.getItem('darkMode') === 'enabled') { darkModeStylesheet.disabled = false; toggleButton.checked = true; - console.error( 'darkMode enabled'); - } else { - - console.error( 'darkMode disabled'); + if ( enableButton ) { + enableButton.innerText = 'Disable Now'; + } + } + + if ( enableButton ) { + enableButton.addEventListener('click', function () { + if (darkModeStylesheet.disabled) { + darkModeStylesheet.disabled = false; + localStorage.setItem('darkMode', 'enabled'); + enableButton.innerText = 'Disable Now'; + } else { + darkModeStylesheet.disabled = true; + localStorage.setItem('darkMode', 'disabled'); + enableButton.innerText = 'Enable Now'; + } + }); } toggleButton.addEventListener('click', function () { - console.error( 'addEventListener'); if (darkModeStylesheet.disabled) { darkModeStylesheet.disabled = false; localStorage.setItem('darkMode', 'enabled'); @@ -110,4 +122,4 @@ $(document).ready(function() { localStorage.setItem('darkMode', 'disabled'); } }); - }); \ No newline at end of file + }); diff --git a/app/plugins/blog/templates/blog.inc.php b/app/plugins/blog/templates/blog.inc.php index 35c19b6..714bf5f 100644 --- a/app/plugins/blog/templates/blog.inc.php +++ b/app/plugins/blog/templates/blog.inc.php @@ -30,6 +30,7 @@ class BlogLoader extends DefaultLoader { Components::set('SIDEBAR', Views::simpleView('blog.sidebar', $posts->recent(5))); Components::set('SIDEBAR2', Views::simpleView('blog.sidebar2', $posts->archive())); Components::set('SIDEBARABOUT', Views::simpleView('blog.about')); + Components::set('BLOGFEATURES', ''); Navigation::setCrumbComponent( 'BLOG_BREADCRUMBS', Input::get( 'url' ) ); Components::set( 'BLOG_TEMPLATE_URL', Template::parse( '{ROOT_URL}app/plugins/comments/' ) ); $this->addCss( '' ); diff --git a/app/plugins/blog/templates/blog.tpl b/app/plugins/blog/templates/blog.tpl index c404cf9..1444ac6 100644 --- a/app/plugins/blog/templates/blog.tpl +++ b/app/plugins/blog/templates/blog.tpl @@ -74,57 +74,11 @@
Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.
- -This is a wider card with supporting text below as a natural lead-in to additional content.
- Continue reading -This is a wider card with supporting text below as a natural lead-in to additional content.
- Continue reading -The blog is mostly here to serve ass a simple way to link to long-form content on the site. There won't be any breaking news or tell-all stories here. Just good ole fashioned boring crap no one wants to read. diff --git a/app/plugins/blog/views/largeFeature.html b/app/plugins/blog/views/largeFeature.html new file mode 100644 index 0000000..e533c50 --- /dev/null +++ b/app/plugins/blog/views/largeFeature.html @@ -0,0 +1,7 @@ +
Multiple lines of text that form the lede, informing new readers quickly and efficiently about what’s most interesting in this post’s contents.
+ +This is a wider card with supporting text below as a natural lead-in to additional content.
+ Continue reading +This is a wider card with supporting text below as a natural lead-in to additional content.
+ Continue reading +