実現したいこと
web制作初心者です
cursorを使用してwebサイトを制作しました。
エックスサーバーのファイルマネージャーにHTMLとCSSフォルダ、画像フォルダをpublic htmlに入れました。
しかし、サイトを見てみるとCSSと画像が全て反映されていません。
FTP接続でファイルを保存しようとしましたが、サーバーにも接続出来ない状況です。
パスは間違ってないと思いますが、反映されない原因が分かる方、よろしければ教えて頂きたいです。
よろしくお願い致します。
発生している問題・分からないこと
該当のソースコード
<!DOCTYPE html> <html lang="ja"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"><link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Lexend:wght@100..900&family=Noto+Sans+JP:wght@100..900&display=swap" rel="stylesheet"> <!-- font awesome--> <link rel="stylesheet" href="https://use.fontawesome.com/releases/v5.15.4/css/all.css"> <!-- jQuery本体 --> <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script> <!-- kv_title / kv_txt アニメーション --> <script> $(document).ready(function () { // 最初に非表示 $('.kv_title, .kv_txt p').css('visibility', 'hidden'); function animateText($element, baseDelay = 0, onComplete = null) { const originalHtml = $element.html(); const container = $('<div>').html(originalHtml); let index = 0; function wrap(node) { if (node.nodeType === 3) { return node.nodeValue.split('').map(char => { const delay = index * 50 + baseDelay; const span = $('<span>').text(char).attr('style', `opacity:0; display:inline-block; transform:translateY(20px); transition:all 0.5s ease ${delay}ms;` ); index++; return span[0].outerHTML; }).join(''); } else if (node.nodeType === 1) { const tag = node.tagName.toLowerCase(); const classAttr = node.className ? ` class="${node.className}"` : ''; const inner = Array.from(node.childNodes).map(child => wrap(child)).join(''); return `<${tag}${classAttr}>${inner}</${tag}>`; } return ''; } const newHtml = Array.from(container[0].childNodes).map(node => wrap(node)).join(''); $element.html(newHtml); setTimeout(() => { $element.find('span').each(function () { $(this).css({ opacity: 1, transform: 'translateY(0)' }); }); const totalDelay = index * 50 + baseDelay; if (typeof onComplete === 'function') { setTimeout(onComplete, totalDelay); } }, baseDelay); } // ① kv_title を先にアニメーション $('.kv_title').css('visibility', 'visible'); animateText($('.kv_title'), 0, function () { // ② 完了後に kv_txt p をアニメーション $('.kv_txt p').css('visibility', 'visible'); animateText($('.kv_txt p'), 0); }); }); </script> <script> $(document).ready(function () { function showOnScroll() { $('.work-item').each(function () { const top = $(this).offset().top; const scroll = $(window).scrollTop(); const windowHeight = $(window).height(); if (scroll + windowHeight > top + 50) { $(this).addClass('show'); } }); } $(window).on('scroll', showOnScroll); $(window).on('load', showOnScroll); }); </script> <!-- jQueryハンバーガー --> <script> $(function(){ const $btn = $('.hamburger'); const $drawer = $('#global-drawer'); const $backdrop = $('.drawer-backdrop'); const $focusable = 'a, button, input, select, textarea, [tabindex]:not([tabindex="-1"])'; let lastFocused = null; function openDrawer() { lastFocused = document.activeElement; $btn.addClass('is-active').attr('aria-expanded', 'true'); $drawer.addClass('is-open').attr('aria-hidden', 'false'); $backdrop.addClass('is-open'); $('body').addClass('no-scroll'); // 最初のフォーカス const $first = $drawer.find($focusable).first(); if ($first.length) { $first.focus(); } } function closeDrawer() { $btn.removeClass('is-active').attr('aria-expanded', 'false'); $drawer.removeClass('is-open').attr('aria-hidden', 'true'); $backdrop.removeClass('is-open'); $('body').removeClass('no-scroll'); // 元の場所へフォーカス戻す if (lastFocused) { $(lastFocused).focus(); } } $btn.on('click', function(){ const expanded = $(this).attr('aria-expanded') === 'true'; if (expanded) { closeDrawer(); } else { openDrawer(); } }); // オーバーレイ/リンククリックで閉じる $backdrop.on('click', closeDrawer); $('#global-drawer .drawer-link, #global-drawer .drawer-cta').on('click', closeDrawer); // 閉じるボタンでも閉じる $('.drawer-close').on('click', closeDrawer); // ESCで閉じる $(document).on('keydown', function(e){ if (e.key === 'Escape' && $drawer.hasClass('is-open')) { e.preventDefault(); closeDrawer(); } }); }); </script> </head><title>portfolio</title> <!-- リセットCSS 読み込み --> <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/destyle.css@3.0.2/destyle.css"> <!-- style.css 読み込み --> <link rel="stylesheet" href="./css/style.css"> <!--google fonts 読み込み--> <link rel="preconnect" href="https://fonts.googleapis.com">
試したこと・調べたこと
- teratailやGoogle等で検索した
- ソースコードを自分なりに変更した
- 知人に聞いた
- その他
上記の詳細・結果
Googleで色々と調べてやっていますが分かりません
補足
特になし
