Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion inc/theme-init.php
Original file line number Diff line number Diff line change
Expand Up @@ -15,4 +15,9 @@ function wp_theme_frontend_assets() {

wp_enqueue_script('wp-theme-frontend-js', WP_THEME_URI . '/assets/css/frontend' . $build_prefix . '.css', [], WP_THEME_VERSION);
}
add_action('wp_enqueue_scripts', 'wp_theme_frontend_assets');
add_action('wp_enqueue_scripts', 'wp_theme_frontend_assets', 50);

function wp_theme_setup_theme() {
load_child_theme_textdomain('wp-theme', get_stylesheet_directory() . '/languages');
}
add_action('after_setup_theme', 'wp_theme_setup_theme');
9 changes: 0 additions & 9 deletions index.php

This file was deleted.

Empty file added languages/.gitkeep
Empty file.
14 changes: 9 additions & 5 deletions src/js/components/back-to-top.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { throttle } from 'lib/utils'
const OFFSET = 200
const VISIBLE_CLASS = 'is-visible'

export default el => {
export default (el) => {
const update = () => {
if (getScrollTop() > OFFSET) {
addClass(VISIBLE_CLASS, el)
Expand All @@ -13,11 +13,15 @@ export default el => {
}
}

on('click', e => {
e.preventDefault()
on(
'click',
(e) => {
e.preventDefault()

window.scrollTo(0, 0)
}, el)
window.scrollTo(0, 0)
},
el
)

on('load', throttle(update, 300), window)
}
5 changes: 3 additions & 2 deletions style.css
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
/**
Theme Name: CT Torus
Theme Name: WP Theme
Author: Code Tot JSC
Author URI: https://codetot.com
Text Domain: ct-torus
Text Domain: wp-theme
Template: ct-bones
Version: 0.0.1
*/