diff --git a/assets/images/st-logo.png b/assets/images/st-logo.png new file mode 100644 index 0000000..f4c4ffa Binary files /dev/null and b/assets/images/st-logo.png differ diff --git a/assets/js/st-nav.js b/assets/js/st-nav.js new file mode 100644 index 0000000..c721121 --- /dev/null +++ b/assets/js/st-nav.js @@ -0,0 +1,19 @@ +const nav = document.querySelector('.st-nav'); +const openButton = document.querySelector('.st-open-nav'); +const closeButton = document.querySelector('.st-close-nav'); + +openButton.addEventListener('click', () => { + nav.classList.add('st-nav-is-open'); +}); + +closeButton.addEventListener('click', () => { + nav.classList.remove('st-nav-is-open'); +}); + +let lastScrollPosition = 0; + +window.addEventListener('scroll', function(event) { + const scrollPosition = window.scrollY; + console.log(scrollPosition); + lastScrollPosition = scrollPosition; +}); \ No newline at end of file diff --git a/footer.php b/footer.php new file mode 100644 index 0000000..c07c0fa --- /dev/null +++ b/footer.php @@ -0,0 +1,7 @@ + + + + + \ No newline at end of file diff --git a/front-page.php b/front-page.php new file mode 100644 index 0000000..6cbbab3 --- /dev/null +++ b/front-page.php @@ -0,0 +1,60 @@ + + +
+
+

Latest

+ post_author ); + ?> + + + 5, + 'offset' => 1, + 'orderby' => 'post_date', + 'order' => 'DESC', + 'post_type' => 'post', + 'post_status' => 'publish' + ); + query_posts($post_section_two_args); + if (have_posts()) : while (have_posts()) : the_post(); + $category = get_the_category()[0]; + $author = get_userdata( $post->post_author ); + ?> + + +
+
+ + \ No newline at end of file diff --git a/functions.php b/functions.php index a3a5526..3c75884 100644 --- a/functions.php +++ b/functions.php @@ -1,11 +1,20 @@ get('version'), 'all'); + wp_enqueue_style( 'rubik font', 'https://fonts.googleapis.com/css2?family=Rubik:ital,wght@0,300..900;1,300..900&display=swap' ); + wp_enqueue_script( 'slowtwitch-nav-script', get_template_directory_uri() . '/assets/js/st-nav.js', NULL, NULL, true ); } // set up menu areas diff --git a/header.php b/header.php new file mode 100644 index 0000000..aa81c8f --- /dev/null +++ b/header.php @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + +
+ +
+ forum + join + + + +
+ +

Slowtwitch

+ + + + +
+ +
+
diff --git a/style.css b/style.css index f9b154a..1a93996 100644 --- a/style.css +++ b/style.css @@ -3,4 +3,272 @@ Text Domain: Slowtwitch Version: 1.0.0 Author: Ross Trottier -*/ \ No newline at end of file +*/ + +/* +============================ +CSS RESETS + GLOBALS +============================ +*/ + +* { + box-sizing: border-box; +} + +body { + margin: 0; + font-size: 1.25rem; + font-family: "Rubik", sans-serif; + line-height: 1.6; +} + +input, button, textarea, select { + font: inherit; +} + +/* +============================ +TYPOGRAPHY +============================ +*/ + +h1 { + font-size: 3rem; +} + +.st-site-title { + text-transform: uppercase; + color: #0b4fa0; + text-align: center; + margin-top: 0; + font-size: 3.3rem; +} + +/* +============================ +LAYOUT +============================ +*/ + +.st-main-grid { + display: grid; + grid-template-columns: minmax(1em, 1fr) minmax(260px, 500px) minmax(1em, 1fr); +} + +.st-main-grid > * { + grid-column: 2; +} + +/* +============================ +SECTIONS +============================ +*/ + +/* header bar */ + +.st-header-icon-bar { + display: flex; + justify-content: space-between; + color: black; + margin-top: .25em; +} + +.st-header-logo { + width: 100%; +} + +.st-header-icon { + text-decoration: none; + cursor: pointer; + color: black; +} + +/* nav */ + +.st-nav { + position: absolute; + background: #fff; + width: 100%; + top: 0; + right: 0; + bottom: 0; + left: -100%; + transform: translateX(0); + transition: transform ease-in-out 250ms; + grid-template-rows: minmax(2.25rem, 3rem) 1fr; +} + +.st-nav-sticky { + +} + +.st-nav-is-open { + transform: translateX(100%); +} + +.st-nav-btn { + background: 0; + border: 0; + font-size: 1.25rem; + cursor: pointer; +} + +.st-nav-links { + padding: 0; + margin-top: 0; +} + +.st-nav-links, +.st-nav-links ul { + list-style: none; +} + +.st-nav-links .menu-item a { + text-decoration: none; + cursor: pointer; + font-size: 2rem; + text-transform: uppercase; + margin-bottom: 1em; + letter-spacing: 1px; + color: #0b4fa0; +} + +.st-nav-links .menu-item a:hover, +.st-nav-links .menu-item a:hover:active { + color: #d3d3d3; +} + +.st-close-nav { + text-align: right; + font-size: 2rem; + height: 3rem; +} + +/* +============================ +COMPONENTS +============================ +*/ +/* main article card */ + +.st-article-section-title { + display: flex; + justify-content: space-between; + margin-top: 0; + margin-bottom: .5em; + color: black; + font-weight: 800; +} + +.st-article-section-title > a { + text-decoration: none; + color: black; +} + +.st-article-section-main-article__image-link img { + width: 100%; + object-fit: cover; + border-radius: 10px; +} + +.st-article-section-main-article__category-link { + text-decoration: none; + color: #fff; + padding: .3em .75em; + background: #0b4fa0; + font-size: .8rem; + text-transform: uppercase; + letter-spacing: 1px; +} + +.st-article-section-main-article__title { + text-decoration: none; + color: #454545; + font-size: 1.2rem; + line-height: 1.2; +} + +.st-article-section-main-article__title h3 { + margin: .25em 0; +} + +.st-article-section-main-article__excerpt { + font-size: .75em; + margin: 0; +} + +.st-article-section-main-article__author-link { + text-decoration: none; + color: #8b8680; + font-size: .5em; +} + +.st-article-section-main-article__datetime { + color: #8b8680; + font-size: .5em; +} + +/* sub article card */ + +.st-article-section-sub-article { + display: flex; + flex-direction: row; + margin-top: 1em; +} + +.st-article-section-sub-article__image-link img { + width: 160px; + height: auto; + aspect-ratio: 1.5; + object-fit: cover; + object-position: bottom right; + border-radius: 4px; +} + +.st-article-section-sub-article__category-link { + text-decoration: none; + color: #fff; + padding: .3em .75em; + background: #0b4fa0; + font-size: .6rem; + text-transform: uppercase; + letter-spacing: 1px; +} + +.st-article-section-sub-article__text-container { + display: flex; + flex-direction: column; + align-items: flex-start; + margin-left: .5em; +} + +.st-article-section-sub-article__title { + font-size: .75rem; + text-decoration: none; + color: #454545; + font-weight: 500; +} + +.st-article-section-sub-article__title h3 { + margin-top: .2em; +} + +/* chips */ + +.st-chip { + padding: .25em .75em; + font-size: 1rem; + text-decoration: none; + cursor: pointer; + border-radius: 100px; + color: white; +} + +.st-chip-primary { + background: #0b4fa0; +} + +.st-chip-secondary { + background: #A05C0B; +} \ No newline at end of file