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
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -44,3 +44,6 @@ testem.log
# System Files
.DS_Store
Thumbs.db

# Vite
*.local
134 changes: 0 additions & 134 deletions angular.json

This file was deleted.

12 changes: 0 additions & 12 deletions browserslist

This file was deleted.

75 changes: 75 additions & 0 deletions index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Angular 2 HN</title>

<meta name="description" content="A Hacker News client built with Angular CLI, RxJS and Webpack"/>

<meta name="twitter:card" content="summary">
<meta name="twitter:site" content="@hdjirdeh">
<meta name="twitter:title" content="Angular 2 HN">
<meta name="twitter:description" content="A Hacker News client built with Angular CLI, RxJS and Webpack">
<meta name="twitter:creator" content="@hdjirdeh">
<meta name="twitter:image" content="/assets/images/logo-loading.png">

<meta property="og:title" content="Angular 2 HN"/>
<meta property="og:type" content="website"/>
<meta property="og:url" content="https://angular2-hn.firebaseapp.com/"/>
<meta property="og:image" content="/assets/images/logo-loading.png"/>
<meta property="og:description" content="A Hacker News client built with Angular CLI, RxJS and Webpack"/>
<meta property="og:site_name" content="Angular 2 HN"/>
<meta property="fb:admins" content="10202985971279760"/>

<meta name="viewport" content="width=device-width, initial-scale=1">

<meta name="theme-color" content="#b92b27">

<meta name="msapplication-TileColor" content="#b92b27">
<meta name="msapplication-TileImage" content="/assets/icons/mstile-150x150.png">
<meta name="msapplication-config" content="/assets/icons/browserconfig.xml">

<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">

<link rel="manifest" href="/manifest.json">
<link rel="mask-icon" href="/assets/icons/safari-pinned-tab.svg" color="#b92b27">

<link rel="icon" type="image/x-icon" href="/favicon.ico">
<link rel="icon" type="image/png" href="/assets/icons/favicon-32x32.png" sizes="32x32">
<link rel="icon" type="image/png" href="/assets/icons/favicon-16x16.png" sizes="16x16">

<link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-touch-icon.png">
<link rel="apple-touch-icon" sizes="120x120" href="/assets/icons/apple-touch-icon-120x120.png">
<link rel="apple-touch-icon" sizes="152x152" href="/assets/icons/apple-touch-icon-152x152.png">
<link rel="apple-touch-icon" sizes="180x180" href="/assets/icons/apple-touch-icon-180x180.png">

<style>
#skip a { position:absolute; left:-10000px; top:auto; width:1px; height:1px; overflow:hidden; }
#skip a:focus { position:static; width:auto; height:auto; }
</style>
</head>
<body>
<div id="skip"><a href="#content">skip to navigation</a></div>
<div id="root"></div>

<div class="app-loader" id="content">
<img class="logo" src="/assets/images/logo.svg" alt="Logo">
<noscript>
<h4 style="font-family: 'HelveticaNeue-Light', 'Helvetica Neue Light', 'Helvetica Neue', Helvetica;">
Sorry, JavaScript needs to be enabled in order to run this application.
</h4>
</noscript>
</div>
Comment on lines +54 to +63

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚩 Loading spinner CSS selector is broken after migration from to

The existing src/styles.scss:37-40 defines app-root:empty + .app-loader { opacity: 1; z-index: 100; } which showed the loading spinner while Angular bootstrapped. The new index.html:54 uses <div id="root"></div> instead of <app-root></app-root>, so this CSS selector never matches. The .app-loader default style (opacity: 0; z-index: -1 at src/styles.scss:22-23,28) keeps the loader permanently hidden. This means: (1) no loading indicator displays while React initializes, and (2) the <noscript> message at index.html:58-62 is invisible in production builds where the bundled CSS is loaded via a <link> tag even without JS. Consider updating the CSS selector to #root:empty + .app-loader or removing the .app-loader div entirely if the loading state is no longer needed.

Open in Devin Review

Was this helpful? React with 👍 or 👎 to provide feedback.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch. Fixed in ee71d5d — updated the selector to #root:empty + .app-loader to match the React mount point.


<script>
(function(i,s,o,g,r,a,m){i['GoogleAnalyticsObject']=r;i[r]=i[r]||function(){
(i[r].q=i[r].q||[]).push(arguments)},i[r].l=1*new Date();a=s.createElement(o),
m=s.getElementsByTagName(o)[0];a.async=1;a.src=g;m.parentNode.insertBefore(a,m)
})(window,document,'script','https://www.google-analytics.com/analytics.js','ga');

ga('create', 'UA-66348622-3', 'auto');
</script>
<script type="module" src="/src/main.tsx"></script>
</body>
</html>
32 changes: 0 additions & 32 deletions karma.conf.js

This file was deleted.

29 changes: 0 additions & 29 deletions ngsw-config.json

This file was deleted.

Loading