├── .gitignore ├── LICENSE ├── README.md ├── assets ├── ItemDetails.PNG ├── ItemsListing.PNG └── UserDetails.PNG ├── docs ├── 404.html ├── css │ ├── bootstrap │ │ ├── bootstrap.min.css │ │ └── bootstrap.min.css.map │ ├── open-iconic │ │ ├── FONT-LICENSE │ │ ├── ICON-LICENSE │ │ ├── README.md │ │ └── font │ │ │ ├── css │ │ │ └── open-iconic-bootstrap.min.css │ │ │ └── fonts │ │ │ ├── open-iconic.eot │ │ │ ├── open-iconic.otf │ │ │ ├── open-iconic.svg │ │ │ ├── open-iconic.ttf │ │ │ └── open-iconic.woff │ └── site.css ├── framework │ ├── asmjs │ │ ├── mono.asm.js │ │ ├── mono.js │ │ └── mono.js.mem │ ├── blazor.js │ └── wasm │ │ ├── mono.js │ │ └── mono.wasm └── index.html └── src ├── BlazorHackerNewsClone.sln └── BlazorHackerNewsClone ├── App.cshtml ├── BlazorHackerNewsClone.csproj ├── Models ├── FeedItem.cs └── HNUser.cs ├── Pages ├── Item │ ├── Item.cshtml │ ├── Item.cshtml.cs │ ├── ItemComment.cshtml │ ├── ItemMeta.cshtml │ └── ItemTitle.cshtml ├── List │ ├── FeedListItemMeta.cshtml │ ├── FeedListItemTitle.cshtml │ ├── Index.cshtml │ ├── Index.cshtml.cs │ └── Pager.cshtml ├── User │ ├── User.cshtml │ └── User.cshtml.cs └── _ViewImports.cshtml ├── Program.cs ├── Services └── HackerNewsServiceClient.cs ├── Shared ├── HtmlView.cshtml ├── MainLayout.cshtml └── NavMenu.cshtml ├── _ViewImports.cshtml ├── package.json └── wwwroot ├── css ├── bootstrap │ ├── bootstrap.min.css │ └── bootstrap.min.css.map ├── open-iconic │ ├── FONT-LICENSE │ ├── ICON-LICENSE │ ├── README.md │ └── font │ │ ├── css │ │ └── open-iconic-bootstrap.min.css │ │ └── fonts │ │ ├── open-iconic.eot │ │ ├── open-iconic.otf │ │ ├── open-iconic.svg │ │ ├── open-iconic.ttf │ │ └── open-iconic.woff └── site.css └── index.html /.gitignore: -------------------------------------------------------------------------------- 1 | ## Ignore Visual Studio temporary files, build results, and 2 | ## files generated by popular Visual Studio add-ons. 3 | ## 4 | ## Get latest from https://github.com/github/gitignore/blob/master/VisualStudio.gitignore 5 | 6 | # User-specific files 7 | *.suo 8 | *.user 9 | *.userosscache 10 | *.sln.docstates 11 | 12 | # User-specific files (MonoDevelop/Xamarin Studio) 13 | *.userprefs 14 | 15 | # Build results 16 | [Dd]ebug/ 17 | [Dd]ebugPublic/ 18 | [Rr]elease/ 19 | [Rr]eleases/ 20 | x64/ 21 | x86/ 22 | bld/ 23 | [Bb]in/ 24 | [Oo]bj/ 25 | [Ll]og/ 26 | 27 | # Visual Studio 2015 cache/options directory 28 | .vs/ 29 | # Uncomment if you have tasks that create the project's static files in wwwroot 30 | #wwwroot/ 31 | 32 | # MSTest test Results 33 | [Tt]est[Rr]esult*/ 34 | [Bb]uild[Ll]og.* 35 | 36 | # NUNIT 37 | *.VisualState.xml 38 | TestResult.xml 39 | 40 | # Build Results of an ATL Project 41 | [Dd]ebugPS/ 42 | [Rr]eleasePS/ 43 | dlldata.c 44 | 45 | # .NET Core 46 | project.lock.json 47 | project.fragment.lock.json 48 | artifacts/ 49 | **/Properties/launchSettings.json 50 | 51 | *_i.c 52 | *_p.c 53 | *_i.h 54 | *.ilk 55 | *.meta 56 | *.obj 57 | *.pch 58 | *.pdb 59 | *.pgc 60 | *.pgd 61 | *.rsp 62 | *.sbr 63 | *.tlb 64 | *.tli 65 | *.tlh 66 | *.tmp 67 | *.tmp_proj 68 | *.log 69 | *.vspscc 70 | *.vssscc 71 | .builds 72 | *.pidb 73 | *.svclog 74 | *.scc 75 | 76 | # Chutzpah Test files 77 | _Chutzpah* 78 | 79 | # Visual C++ cache files 80 | ipch/ 81 | *.aps 82 | *.ncb 83 | *.opendb 84 | *.opensdf 85 | *.sdf 86 | *.cachefile 87 | *.VC.db 88 | *.VC.VC.opendb 89 | 90 | # Visual Studio profiler 91 | *.psess 92 | *.vsp 93 | *.vspx 94 | *.sap 95 | 96 | # TFS 2012 Local Workspace 97 | $tf/ 98 | 99 | # Guidance Automation Toolkit 100 | *.gpState 101 | 102 | # ReSharper is a .NET coding add-in 103 | _ReSharper*/ 104 | *.[Rr]e[Ss]harper 105 | *.DotSettings.user 106 | 107 | # JustCode is a .NET coding add-in 108 | .JustCode 109 | 110 | # TeamCity is a build add-in 111 | _TeamCity* 112 | 113 | # DotCover is a Code Coverage Tool 114 | *.dotCover 115 | 116 | # Visual Studio code coverage results 117 | *.coverage 118 | *.coveragexml 119 | 120 | # NCrunch 121 | _NCrunch_* 122 | .*crunch*.local.xml 123 | nCrunchTemp_* 124 | 125 | # MightyMoose 126 | *.mm.* 127 | AutoTest.Net/ 128 | 129 | # Web workbench (sass) 130 | .sass-cache/ 131 | 132 | # Installshield output folder 133 | [Ee]xpress/ 134 | 135 | # DocProject is a documentation generator add-in 136 | DocProject/buildhelp/ 137 | DocProject/Help/*.HxT 138 | DocProject/Help/*.HxC 139 | DocProject/Help/*.hhc 140 | DocProject/Help/*.hhk 141 | DocProject/Help/*.hhp 142 | DocProject/Help/Html2 143 | DocProject/Help/html 144 | 145 | # Click-Once directory 146 | publish/ 147 | 148 | # Publish Web Output 149 | *.[Pp]ublish.xml 150 | *.azurePubxml 151 | # TODO: Comment the next line if you want to checkin your web deploy settings 152 | # but database connection strings (with potential passwords) will be unencrypted 153 | *.pubxml 154 | *.publishproj 155 | 156 | # Microsoft Azure Web App publish settings. Comment the next line if you want to 157 | # checkin your Azure Web App publish settings, but sensitive information contained 158 | # in these scripts will be unencrypted 159 | PublishScripts/ 160 | 161 | # NuGet Packages 162 | *.nupkg 163 | # The packages folder can be ignored because of Package Restore 164 | **/packages/* 165 | # except build/, which is used as an MSBuild target. 166 | !**/packages/build/ 167 | # Uncomment if necessary however generally it will be regenerated when needed 168 | #!**/packages/repositories.config 169 | # NuGet v3's project.json files produces more ignorable files 170 | *.nuget.props 171 | *.nuget.targets 172 | 173 | # Microsoft Azure Build Output 174 | csx/ 175 | *.build.csdef 176 | 177 | # Microsoft Azure Emulator 178 | ecf/ 179 | rcf/ 180 | 181 | # Windows Store app package directories and files 182 | AppPackages/ 183 | BundleArtifacts/ 184 | Package.StoreAssociation.xml 185 | _pkginfo.txt 186 | 187 | # Visual Studio cache files 188 | # files ending in .cache can be ignored 189 | *.[Cc]ache 190 | # but keep track of directories ending in .cache 191 | !*.[Cc]ache/ 192 | 193 | # Others 194 | ClientBin/ 195 | ~$* 196 | *~ 197 | *.dbmdl 198 | *.dbproj.schemaview 199 | *.jfm 200 | *.pfx 201 | *.publishsettings 202 | orleans.codegen.cs 203 | 204 | # Since there are multiple workflows, uncomment next line to ignore bower_components 205 | # (https://github.com/github/gitignore/pull/1529#issuecomment-104372622) 206 | #bower_components/ 207 | 208 | # RIA/Silverlight projects 209 | Generated_Code/ 210 | 211 | # Backup & report files from converting an old project file 212 | # to a newer Visual Studio version. Backup files are not needed, 213 | # because we have git ;-) 214 | _UpgradeReport_Files/ 215 | Backup*/ 216 | UpgradeLog*.XML 217 | UpgradeLog*.htm 218 | 219 | # SQL Server files 220 | *.mdf 221 | *.ldf 222 | *.ndf 223 | 224 | # Business Intelligence projects 225 | *.rdl.data 226 | *.bim.layout 227 | *.bim_*.settings 228 | 229 | # Microsoft Fakes 230 | FakesAssemblies/ 231 | 232 | # GhostDoc plugin setting file 233 | *.GhostDoc.xml 234 | 235 | # Node.js Tools for Visual Studio 236 | .ntvs_analysis.dat 237 | node_modules/ 238 | 239 | # Typescript v1 declaration files 240 | typings/ 241 | 242 | # Visual Studio 6 build log 243 | *.plg 244 | 245 | # Visual Studio 6 workspace options file 246 | *.opt 247 | 248 | # Visual Studio 6 auto-generated workspace file (contains which files were open etc.) 249 | *.vbw 250 | 251 | # Visual Studio LightSwitch build output 252 | **/*.HTMLClient/GeneratedArtifacts 253 | **/*.DesktopClient/GeneratedArtifacts 254 | **/*.DesktopClient/ModelManifest.xml 255 | **/*.Server/GeneratedArtifacts 256 | **/*.Server/ModelManifest.xml 257 | _Pvt_Extensions 258 | 259 | # Paket dependency manager 260 | .paket/paket.exe 261 | paket-files/ 262 | 263 | # FAKE - F# Make 264 | .fake/ 265 | 266 | # JetBrains Rider 267 | .idea/ 268 | *.sln.iml 269 | 270 | # CodeRush 271 | .cr/ 272 | 273 | # Python Tools for Visual Studio (PTVS) 274 | __pycache__/ 275 | *.pyc 276 | 277 | # Cake - Uncomment if you are using it 278 | # tools/** 279 | # !tools/packages.config 280 | 281 | # Telerik's JustMock configuration file 282 | *.jmconfig 283 | 284 | # BizTalk build output 285 | *.btp.cs 286 | *.btm.cs 287 | *.odx.cs 288 | *.xsd.cs 289 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | MIT License 2 | 3 | Copyright (c) 2018 Lohith 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # blazor-hackernews-clone 2 | Hacker News Clone built using Blazor (0.3.0). 3 | 4 | Live site here : [http://blazorhackernews.surge.sh/](http://blazorhackernews.surge.sh/) 5 | 6 | # Pre-requisites 7 | 8 | Blazor Hacker News Clone is built with Blazor 0.7.0. You will need to first make sure you have Blazor 0.7.0 is installed. Follow below instructions to set up Blazor 0.7.0: 9 | 10 | 1. Install [.NET Core 2.1 SDK](https://go.microsoft.com/fwlink/?linkid=873092) (2.1.500 or later). 11 | 2. Install [Visual Studio 2017](https://go.microsoft.com/fwlink/?linkid=873093) (15.9 or later) with the ASP.NET and web development workload selected. 12 | 3. Install the latest [Blazor Language Services extension](https://go.microsoft.com/fwlink/?linkid=870389) extension from the Visual Studio Marketplace. 13 | 4. On command line, Install the Blazor templates with below command 14 | ``` 15 | 16 | dotnet new -i Microsoft.AspNetCore.Blazor.Templates 17 | 18 | ``` 19 | 20 | # Using the code 21 | 22 | 1. Clone this repo 23 | 2. Open src/BlazorHackerNewsClone.sln 24 | 3. Run the application 25 | 26 | # Screenshots 27 | 28 | Item Listing: 29 | ![Item Listing](https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/master/assets/ItemsListing.PNG "Item Listing") 30 | 31 | Item Details: 32 | ![Item Details](https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/master/assets/ItemDetails.PNG "Item Details") 33 | 34 | User Details: 35 | ![User Details](https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/master/assets/UserDetails.PNG "User Details") 36 | -------------------------------------------------------------------------------- /assets/ItemDetails.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/assets/ItemDetails.PNG -------------------------------------------------------------------------------- /assets/ItemsListing.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/assets/ItemsListing.PNG -------------------------------------------------------------------------------- /assets/UserDetails.PNG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/assets/UserDetails.PNG -------------------------------------------------------------------------------- /docs/404.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | Single Page Apps for GitHub Pages 6 | 35 | 36 | 37 | 38 | -------------------------------------------------------------------------------- /docs/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /docs/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /docs/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /docs/css/open-iconic/font/css/open-iconic-bootstrap.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} -------------------------------------------------------------------------------- /docs/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/docs/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /docs/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/docs/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /docs/css/open-iconic/font/fonts/open-iconic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 9 | By P.J. Onori 10 | Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) 11 | 12 | 13 | 14 | 27 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 45 | 47 | 49 | 51 | 53 | 55 | 57 | 59 | 61 | 63 | 65 | 67 | 69 | 71 | 74 | 76 | 79 | 81 | 84 | 86 | 88 | 91 | 93 | 95 | 98 | 100 | 102 | 104 | 106 | 109 | 112 | 115 | 117 | 121 | 123 | 125 | 127 | 130 | 132 | 134 | 136 | 138 | 141 | 143 | 145 | 147 | 149 | 151 | 153 | 155 | 157 | 159 | 162 | 165 | 167 | 169 | 172 | 174 | 177 | 179 | 181 | 183 | 185 | 189 | 191 | 194 | 196 | 198 | 200 | 202 | 205 | 207 | 209 | 211 | 213 | 215 | 218 | 220 | 222 | 224 | 226 | 228 | 230 | 232 | 234 | 236 | 238 | 241 | 243 | 245 | 247 | 249 | 251 | 253 | 256 | 259 | 261 | 263 | 265 | 267 | 269 | 272 | 274 | 276 | 280 | 282 | 285 | 287 | 289 | 292 | 295 | 298 | 300 | 302 | 304 | 306 | 309 | 312 | 314 | 316 | 318 | 320 | 322 | 324 | 326 | 330 | 334 | 338 | 340 | 343 | 345 | 347 | 349 | 351 | 353 | 355 | 358 | 360 | 363 | 365 | 367 | 369 | 371 | 373 | 375 | 377 | 379 | 381 | 383 | 386 | 388 | 390 | 392 | 394 | 396 | 399 | 401 | 404 | 406 | 408 | 410 | 412 | 414 | 416 | 419 | 421 | 423 | 425 | 428 | 431 | 435 | 438 | 440 | 442 | 444 | 446 | 448 | 451 | 453 | 455 | 457 | 460 | 462 | 464 | 466 | 468 | 471 | 473 | 477 | 479 | 481 | 483 | 486 | 488 | 490 | 492 | 494 | 496 | 499 | 501 | 504 | 506 | 509 | 512 | 515 | 517 | 520 | 522 | 524 | 526 | 529 | 532 | 534 | 536 | 539 | 542 | 543 | 544 | -------------------------------------------------------------------------------- /docs/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/docs/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /docs/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/docs/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /docs/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | body { 4 | margin-top: 50px; 5 | } 6 | 7 | .hn-background { 8 | background-color: rgb(246, 246, 239); 9 | min-height:90vh; 10 | } 11 | 12 | .splash { 13 | text-align: center; 14 | margin: 10% 0 0 0; 15 | box-sizing: border-box; 16 | } 17 | 18 | .meta-icon{ 19 | font-size:0.7rem; 20 | opacity:0.5; 21 | } 22 | 23 | /*html, body { 24 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 25 | } 26 | 27 | app { 28 | position: relative; 29 | display: flex; 30 | flex-direction: column; 31 | } 32 | 33 | .top-row { 34 | height: 3.5rem; 35 | display: flex; 36 | align-items: center; 37 | } 38 | 39 | .main { 40 | flex: 1; 41 | } 42 | 43 | .main .top-row { 44 | background-color: #e6e6e6; 45 | border-bottom: 1px solid #d6d5d5; 46 | } 47 | 48 | .sidebar { 49 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 50 | } 51 | 52 | .sidebar .top-row { 53 | background-color: rgba(0,0,0,0.4); 54 | } 55 | 56 | .sidebar .navbar-brand { 57 | font-size: 1.1rem; 58 | } 59 | 60 | .sidebar .oi { 61 | width: 2rem; 62 | font-size: 1.1rem; 63 | vertical-align: text-top; 64 | top: -2px; 65 | } 66 | 67 | .nav-item { 68 | font-size: 0.9rem; 69 | padding-bottom: 0.5rem; 70 | } 71 | 72 | .nav-item:first-of-type { 73 | padding-top: 1rem; 74 | } 75 | 76 | .nav-item:last-of-type { 77 | padding-bottom: 1rem; 78 | } 79 | 80 | .nav-item a { 81 | color: #d7d7d7; 82 | border-radius: 4px; 83 | height: 3rem; 84 | display: flex; 85 | align-items: center; 86 | line-height: 3rem; 87 | } 88 | 89 | .nav-item a.active { 90 | background-color: rgba(255,255,255,0.25); 91 | color: white; 92 | } 93 | 94 | .nav-item a:hover { 95 | background-color: rgba(255,255,255,0.1); 96 | color: white; 97 | } 98 | 99 | .content { 100 | padding-top: 1.1rem; 101 | } 102 | 103 | .navbar-toggler { 104 | background-color: rgba(255, 255, 255, 0.1); 105 | } 106 | 107 | @media (max-width: 767.98px) { 108 | .main .top-row { 109 | display: none; 110 | } 111 | } 112 | 113 | @media (min-width: 768px) { 114 | app { 115 | flex-direction: row; 116 | } 117 | 118 | .sidebar { 119 | width: 250px; 120 | height: 100vh; 121 | position: sticky; 122 | top: 0; 123 | } 124 | 125 | .main .top-row { 126 | position: sticky; 127 | top: 0; 128 | } 129 | 130 | .main > div { 131 | padding-left: 2rem !important; 132 | padding-right: 1.5rem !important; 133 | } 134 | 135 | .navbar-toggler { 136 | display: none; 137 | } 138 | 139 | .sidebar .collapse { 140 | display: block; 141 | } 142 | }*/ 143 | -------------------------------------------------------------------------------- /docs/framework/asmjs/mono.js.mem: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/docs/framework/asmjs/mono.js.mem -------------------------------------------------------------------------------- /docs/framework/wasm/mono.wasm: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/docs/framework/wasm/mono.wasm -------------------------------------------------------------------------------- /docs/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | BlazorHackerNewsClone 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |

Blazor Hacker News Clone

16 |
17 |
18 |
19 | 20 | 49 | 50 | 51 | 52 | 53 | 54 | 66 | 67 | 68 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.27701.1 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "BlazorHackerNewsClone", "BlazorHackerNewsClone\BlazorHackerNewsClone.csproj", "{52507EA2-89FF-433F-A3C8-458E9CC573CF}" 7 | EndProject 8 | Global 9 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 10 | Debug|Any CPU = Debug|Any CPU 11 | Release|Any CPU = Release|Any CPU 12 | EndGlobalSection 13 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 14 | {52507EA2-89FF-433F-A3C8-458E9CC573CF}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 15 | {52507EA2-89FF-433F-A3C8-458E9CC573CF}.Debug|Any CPU.Build.0 = Debug|Any CPU 16 | {52507EA2-89FF-433F-A3C8-458E9CC573CF}.Release|Any CPU.ActiveCfg = Release|Any CPU 17 | {52507EA2-89FF-433F-A3C8-458E9CC573CF}.Release|Any CPU.Build.0 = Release|Any CPU 18 | EndGlobalSection 19 | GlobalSection(SolutionProperties) = preSolution 20 | HideSolutionNode = FALSE 21 | EndGlobalSection 22 | GlobalSection(ExtensibilityGlobals) = postSolution 23 | SolutionGuid = {97AACA74-AF4D-4E23-956E-7E3AB2366930} 24 | EndGlobalSection 25 | EndGlobal 26 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/App.cshtml: -------------------------------------------------------------------------------- 1 |  5 | 6 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/BlazorHackerNewsClone.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | netstandard2.0 5 | dotnet 6 | blazor serve 7 | 7.3 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | Always 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Models/FeedItem.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorHackerNewsClone.Models 7 | { 8 | public class FeedItem 9 | { 10 | public int id { get; set; } 11 | public string title { get; set; } 12 | public int points { get; set; } 13 | public string user { get; set; } 14 | public int time { get; set; } 15 | public string time_ago { get; set; } 16 | public string type { get; set; } 17 | public string url { get; set; } 18 | public string domain { get; set; } 19 | public Comment[] comments { get; set; } 20 | public int comments_count { get; set; } 21 | } 22 | 23 | public class Comment 24 | { 25 | public int id { get; set; } 26 | public int level { get; set; } 27 | public string user { get; set; } 28 | public int time { get; set; } 29 | public string time_ago { get; set; } 30 | public string content { get; set; } 31 | public Comment[] comments { get; set; } 32 | public bool deleted { get; set; } 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Models/HNUser.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorHackerNewsClone.Models 7 | { 8 | public class HNUser 9 | { 10 | public string id { get; set; } 11 | public int created_time { get; set; } 12 | public string created { get; set; } 13 | public int karma { get; set; } 14 | public object avg { get; set; } 15 | public string about { get; set; } 16 | 17 | } 18 | } 19 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/Item/Item.cshtml: -------------------------------------------------------------------------------- 1 | @page "/item/{ItemId}" 2 | 3 | @inherits ItemModel 4 | 5 | @if (Item == null) 6 | { 7 |
Loading...
8 | } 9 | else 10 | { 11 |
12 | 13 | 15 |
16 |
17 |
18 |
19 |
20 | @foreach (var comment in Item.comments) 21 | { 22 | 23 | } 24 |
25 | 26 | } 27 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/Item/Item.cshtml.cs: -------------------------------------------------------------------------------- 1 | using BlazorHackerNewsClone.Models; 2 | using BlazorHackerNewsClone.Services; 3 | using Microsoft.AspNetCore.Blazor.Components; 4 | using System.Threading.Tasks; 5 | 6 | namespace BlazorHackerNewsClone.Pages.Item 7 | { 8 | public class ItemModel : BlazorComponent 9 | { 10 | [Parameter] 11 | string ItemId { get; set; } 12 | 13 | [Inject()] 14 | private HackerNewsServiceClient Client { get; set; } 15 | 16 | protected FeedItem Item = null; 17 | 18 | protected override async Task OnInitAsync() 19 | { 20 | Item = await Client.GetItem(ItemId); 21 | StateHasChanged(); 22 | } 23 | } 24 | } -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/Item/ItemComment.cshtml: -------------------------------------------------------------------------------- 1 | 
2 |
@Comment.user @Comment.time_ago
3 |
4 | 5 | 6 | 7 | @foreach (var comment in Comment.comments) 8 | { 9 |
10 | 11 |
12 | } 13 |
14 | @if (Level == 1) 15 | { 16 |
17 | } 18 |
19 | 20 | @functions { 21 | [Parameter] 22 | Comment Comment { get; set; } 23 | [Parameter] 24 | int Level { get; set; } 25 | } -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/Item/ItemMeta.cshtml: -------------------------------------------------------------------------------- 1 |  2 | @Points points 3 | @User 4 | @TimeAgo 5 | | 6 | past 7 | | 8 | web 9 | | 10 | @CommentsCount comments 11 | 12 | @functions{ 13 | [Parameter] 14 | int Points { get; set; } 15 | [Parameter] 16 | int CommentsCount { get; set; } 17 | [Parameter] 18 | string User { get; set; } 19 | [Parameter] 20 | int Id { get; set; } 21 | [Parameter] 22 | string TimeAgo { get; set; } 23 | [Parameter] 24 | string Title { get; set; } 25 | } -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/Item/ItemTitle.cshtml: -------------------------------------------------------------------------------- 1 | 

2 | @Title 3 | @if (!string.IsNullOrEmpty(Domain)) 4 | { 5 | (@Domain) 6 | } 7 |

8 | @functions { 9 | [Parameter] 10 | string Title { get; set; } 11 | [Parameter] 12 | string Domain { get; set; } 13 | } -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/List/FeedListItemMeta.cshtml: -------------------------------------------------------------------------------- 1 | 
2 | 3 | @Points points 4 | @User 5 | @TimeAgo 6 | @CommentsCount comments 7 | 8 |
9 | @functions{ 10 | [Parameter] 11 | int Points { get; set; } 12 | [Parameter] 13 | string User { get; set; } 14 | [Parameter] 15 | int Id { get; set; } 16 | [Parameter] 17 | string TimeAgo { get; set; } 18 | [Parameter] 19 | int CommentsCount { get; set; } 20 | } -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/List/FeedListItemTitle.cshtml: -------------------------------------------------------------------------------- 1 |  2 | @Title 3 | @if (!string.IsNullOrEmpty(Domain)) 4 | { 5 | (@Domain) 6 | } 7 | 8 | @functions{ 9 | [Parameter] 10 | string Url { get; set; } 11 | [Parameter] 12 | string Title { get; set; } 13 | [Parameter] 14 | string Domain { get; set; } 15 | } 16 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/List/Index.cshtml: -------------------------------------------------------------------------------- 1 | @page "/" 2 | @page "/{Feed}" 3 | @inherits IndexModel 4 | 5 |
6 |
7 | @if (FeedItems != null) 8 | { 9 | 12 | } 13 |
14 |
15 | @if (IsBusy) 16 | { 17 |
Loading items...
18 | } 19 |
20 |
21 | @if (FeedItems != null) 22 | { 23 |
24 |
    25 | @foreach (var item in FeedItems) 26 | { 27 |
  1. 28 | 29 | 32 |
    33 |
  2. 34 | } 35 |
36 |
37 | } 38 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/List/Index.cshtml.cs: -------------------------------------------------------------------------------- 1 | using BlazorHackerNewsClone.Models; 2 | using BlazorHackerNewsClone.Services; 3 | using Microsoft.AspNetCore.Blazor.Components; 4 | using Microsoft.AspNetCore.Blazor.Services; 5 | using System.Collections.Generic; 6 | using System.Diagnostics; 7 | using System.Threading.Tasks; 8 | 9 | namespace BlazorHackerNewsClone.Pages 10 | { 11 | public class IndexModel : BlazorComponent 12 | { 13 | [Inject] 14 | IUriHelper UriHelper { get; set; } 15 | 16 | [Inject] 17 | HackerNewsServiceClient Client { get; set; } 18 | 19 | [Parameter] 20 | string Feed { get; set; } = "news"; 21 | 22 | public List FeedItems { get; set; } = null; 23 | 24 | protected bool IsBusy = false; 25 | 26 | protected int Page { get; set; } = 1; 27 | 28 | protected readonly int PageSize = 30; 29 | 30 | protected override async Task OnInitAsync() 31 | { 32 | UriHelper.OnLocationChanged += OnLocationChanged; 33 | await LoadFeed(Feed, Page); 34 | } 35 | 36 | private async Task LoadFeed(string topic, int page) 37 | { 38 | IsBusy = true; 39 | StateHasChanged(); 40 | FeedItems = await Client.GetFeed(topic, page); 41 | Page = page; 42 | IsBusy = false; 43 | StateHasChanged(); 44 | } 45 | 46 | private async void OnLocationChanged(object sender, string e) 47 | { 48 | Debug.WriteLine($"Feed:{Feed}"); 49 | Debug.WriteLine($"e:{e}"); 50 | await LoadFeed(Feed, 1); 51 | } 52 | 53 | public async Task OnMoreClick() 54 | { 55 | await LoadFeed(Feed, Page + 1); 56 | } 57 | 58 | public async Task OnPrevClick() 59 | { 60 | await LoadFeed(Feed, Page - 1); 61 | } 62 | 63 | public void Dispose() => UriHelper.OnLocationChanged -= OnLocationChanged; 64 | } 65 | } 66 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/List/Pager.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | @functions{ 5 | [Parameter] 6 | Action OnPreviousClick { get; set; } 7 | [Parameter] 8 | Action OnNextClick { get; set; } 9 | [Parameter] 10 | int CurrentPage { get; set; } 11 | [Parameter] 12 | int ItemCount { get; set; } 13 | } -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/User/User.cshtml: -------------------------------------------------------------------------------- 1 | @page "/user/{UserId}" 2 | 3 | @inherits UserModel 4 | 5 | @if (CurrentUser != null) 6 | { 7 |
8 |

User: @CurrentUser.id

9 |
10 |
11 |
Created: @CurrentUser.created
12 |
13 |
14 |
Karma: @CurrentUser.karma
15 |
16 |
17 |
About:
18 |
19 |
20 | submissions
21 | comments
22 | favorites 23 |
24 | } 25 | else 26 | { 27 |
Loading...
28 | } -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/User/User.cshtml.cs: -------------------------------------------------------------------------------- 1 | using System.Threading.Tasks; 2 | using BlazorHackerNewsClone.Models; 3 | using BlazorHackerNewsClone.Services; 4 | using Microsoft.AspNetCore.Blazor.Components; 5 | 6 | namespace BlazorHackerNewsClone.Pages 7 | { 8 | public class UserModel : BlazorComponent 9 | { 10 | [Parameter] 11 | string UserId { get; set; } 12 | 13 | [Inject()] 14 | HackerNewsServiceClient Client { get; set; } 15 | 16 | public HNUser CurrentUser; 17 | 18 | protected override async Task OnInitAsync() 19 | { 20 | CurrentUser = await Client.GetUser(UserId); 21 | } 22 | } 23 | } -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Pages/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @layout MainLayout 2 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Program.cs: -------------------------------------------------------------------------------- 1 | using BlazorHackerNewsClone.Services; 2 | using Microsoft.AspNetCore.Blazor.Browser.Rendering; 3 | using Microsoft.AspNetCore.Blazor.Browser.Services; 4 | using Microsoft.Extensions.DependencyInjection; 5 | using System; 6 | 7 | namespace BlazorHackerNewsClone 8 | { 9 | public class Program 10 | { 11 | static void Main(string[] args) 12 | { 13 | var serviceProvider = new BrowserServiceProvider(services => 14 | { 15 | services.AddSingleton(); 16 | }); 17 | 18 | new BrowserRenderer(serviceProvider).AddComponent("app"); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Services/HackerNewsServiceClient.cs: -------------------------------------------------------------------------------- 1 | using BlazorHackerNewsClone.Models; 2 | using System; 3 | using System.Collections.Generic; 4 | using System.Linq; 5 | using System.Net.Http; 6 | using System.Threading.Tasks; 7 | using Microsoft.AspNetCore.Blazor; 8 | 9 | namespace BlazorHackerNewsClone.Services 10 | { 11 | public class HackerNewsServiceClient 12 | { 13 | private string baseUrl = "https://node-hnapi.herokuapp.com"; 14 | private HttpClient _client=null; 15 | 16 | public HackerNewsServiceClient(HttpClient httpClient) 17 | { 18 | _client = httpClient; 19 | } 20 | 21 | public async Task> GetFeed(string topic, int page) 22 | { 23 | var feedUrl = GetFeedUrl(topic, page); 24 | var items = await _client.GetJsonAsync>(feedUrl); 25 | return items; 26 | } 27 | public async Task GetUser(string userId) 28 | { 29 | var userDataUrl = $"{baseUrl}/user/{userId}"; 30 | var items = await _client.GetJsonAsync(userDataUrl); 31 | return items; 32 | } 33 | 34 | public async Task GetItem(string itemId) 35 | { 36 | var itemDataUrl = $"{baseUrl}/item/{itemId}"; 37 | var item = await _client.GetJsonAsync(itemDataUrl); 38 | return item; 39 | } 40 | 41 | private string GetFeedUrl(string topic, int page) 42 | { 43 | var feedUrl = $"{baseUrl}/{topic}"; 44 | if (page > 1) 45 | { 46 | feedUrl = $"{feedUrl}?page={page}"; 47 | } 48 | return feedUrl; 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Shared/HtmlView.cshtml: -------------------------------------------------------------------------------- 1 |  2 | 3 | @functions{ 4 | [Parameter] string Content { get; set; } 5 | private ElementRef Span; 6 | 7 | protected override void OnAfterRender() 8 | { 9 | if (!string.IsNullOrEmpty(Content)) 10 | { 11 | JSRuntime.Current.InvokeAsync("blazorHackerNewsCloneFunctions.RawHtml", Span, Content); 12 | } 13 | } 14 | } -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Shared/MainLayout.cshtml: -------------------------------------------------------------------------------- 1 | @inherits BlazorLayoutComponent 2 | 3 | 4 | 5 |
6 | @Body 7 |
8 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/Shared/NavMenu.cshtml: -------------------------------------------------------------------------------- 1 |  38 | @* 44 | 45 |
46 | 63 |
64 | 65 | @functions { 66 | bool collapseNavMenu = true; 67 | 68 | void ToggleNavMenu() 69 | { 70 | collapseNavMenu = !collapseNavMenu; 71 | } 72 | }*@ 73 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/_ViewImports.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Net.Http 2 | @using Microsoft.AspNetCore.Blazor 3 | @using Microsoft.AspNetCore.Blazor.Components 4 | @using Microsoft.AspNetCore.Blazor.Layouts 5 | @using Microsoft.AspNetCore.Blazor.Routing 6 | @using BlazorHackerNewsClone.Pages 7 | @using BlazorHackerNewsClone.Shared 8 | @using BlazorHackerNewsClone.Models 9 | @using BlazorHackerNewsClone.Services 10 | @using Microsoft.JSInterop 11 | 12 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "blazorhackernewsclone", 3 | "version": "1.0.0", 4 | "description": "Blazor Hacker News Clone", 5 | "author": "kashyapa", 6 | "license": "MIT", 7 | "devDependencies": { 8 | "surge": "0.20.1" 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/open-iconic/FONT-LICENSE: -------------------------------------------------------------------------------- 1 | SIL OPEN FONT LICENSE Version 1.1 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | PREAMBLE 6 | The goals of the Open Font License (OFL) are to stimulate worldwide 7 | development of collaborative font projects, to support the font creation 8 | efforts of academic and linguistic communities, and to provide a free and 9 | open framework in which fonts may be shared and improved in partnership 10 | with others. 11 | 12 | The OFL allows the licensed fonts to be used, studied, modified and 13 | redistributed freely as long as they are not sold by themselves. The 14 | fonts, including any derivative works, can be bundled, embedded, 15 | redistributed and/or sold with any software provided that any reserved 16 | names are not used by derivative works. The fonts and derivatives, 17 | however, cannot be released under any other type of license. The 18 | requirement for fonts to remain under this license does not apply 19 | to any document created using the fonts or their derivatives. 20 | 21 | DEFINITIONS 22 | "Font Software" refers to the set of files released by the Copyright 23 | Holder(s) under this license and clearly marked as such. This may 24 | include source files, build scripts and documentation. 25 | 26 | "Reserved Font Name" refers to any names specified as such after the 27 | copyright statement(s). 28 | 29 | "Original Version" refers to the collection of Font Software components as 30 | distributed by the Copyright Holder(s). 31 | 32 | "Modified Version" refers to any derivative made by adding to, deleting, 33 | or substituting -- in part or in whole -- any of the components of the 34 | Original Version, by changing formats or by porting the Font Software to a 35 | new environment. 36 | 37 | "Author" refers to any designer, engineer, programmer, technical 38 | writer or other person who contributed to the Font Software. 39 | 40 | PERMISSION & CONDITIONS 41 | Permission is hereby granted, free of charge, to any person obtaining 42 | a copy of the Font Software, to use, study, copy, merge, embed, modify, 43 | redistribute, and sell modified and unmodified copies of the Font 44 | Software, subject to the following conditions: 45 | 46 | 1) Neither the Font Software nor any of its individual components, 47 | in Original or Modified Versions, may be sold by itself. 48 | 49 | 2) Original or Modified Versions of the Font Software may be bundled, 50 | redistributed and/or sold with any software, provided that each copy 51 | contains the above copyright notice and this license. These can be 52 | included either as stand-alone text files, human-readable headers or 53 | in the appropriate machine-readable metadata fields within text or 54 | binary files as long as those fields can be easily viewed by the user. 55 | 56 | 3) No Modified Version of the Font Software may use the Reserved Font 57 | Name(s) unless explicit written permission is granted by the corresponding 58 | Copyright Holder. This restriction only applies to the primary font name as 59 | presented to the users. 60 | 61 | 4) The name(s) of the Copyright Holder(s) or the Author(s) of the Font 62 | Software shall not be used to promote, endorse or advertise any 63 | Modified Version, except to acknowledge the contribution(s) of the 64 | Copyright Holder(s) and the Author(s) or with their explicit written 65 | permission. 66 | 67 | 5) The Font Software, modified or unmodified, in part or in whole, 68 | must be distributed entirely under this license, and must not be 69 | distributed under any other license. The requirement for fonts to 70 | remain under this license does not apply to any document created 71 | using the Font Software. 72 | 73 | TERMINATION 74 | This license becomes null and void if any of the above conditions are 75 | not met. 76 | 77 | DISCLAIMER 78 | THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 79 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO ANY WARRANTIES OF 80 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT 81 | OF COPYRIGHT, PATENT, TRADEMARK, OR OTHER RIGHT. IN NO EVENT SHALL THE 82 | COPYRIGHT HOLDER BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 83 | INCLUDING ANY GENERAL, SPECIAL, INDIRECT, INCIDENTAL, OR CONSEQUENTIAL 84 | DAMAGES, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING 85 | FROM, OUT OF THE USE OR INABILITY TO USE THE FONT SOFTWARE OR FROM 86 | OTHER DEALINGS IN THE FONT SOFTWARE. 87 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/open-iconic/ICON-LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2014 Waybury 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in 13 | all copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 21 | THE SOFTWARE. -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/open-iconic/README.md: -------------------------------------------------------------------------------- 1 | [Open Iconic v1.1.1](http://useiconic.com/open) 2 | =========== 3 | 4 | ### Open Iconic is the open source sibling of [Iconic](http://useiconic.com). It is a hyper-legible collection of 223 icons with a tiny footprint—ready to use with Bootstrap and Foundation. [View the collection](http://useiconic.com/open#icons) 5 | 6 | 7 | 8 | ## What's in Open Iconic? 9 | 10 | * 223 icons designed to be legible down to 8 pixels 11 | * Super-light SVG files - 61.8 for the entire set 12 | * SVG sprite—the modern replacement for icon fonts 13 | * Webfont (EOT, OTF, SVG, TTF, WOFF), PNG and WebP formats 14 | * Webfont stylesheets (including versions for Bootstrap and Foundation) in CSS, LESS, SCSS and Stylus formats 15 | * PNG and WebP raster images in 8px, 16px, 24px, 32px, 48px and 64px. 16 | 17 | 18 | ## Getting Started 19 | 20 | #### For code samples and everything else you need to get started with Open Iconic, check out our [Icons](http://useiconic.com/open#icons) and [Reference](http://useiconic.com/open#reference) sections. 21 | 22 | ### General Usage 23 | 24 | #### Using Open Iconic's SVGs 25 | 26 | We like SVGs and we think they're the way to display icons on the web. Since Open Iconic are just basic SVGs, we suggest you display them like you would any other image (don't forget the `alt` attribute). 27 | 28 | ``` 29 | icon name 30 | ``` 31 | 32 | #### Using Open Iconic's SVG Sprite 33 | 34 | Open Iconic also comes in a SVG sprite which allows you to display all the icons in the set with a single request. It's like an icon font, without being a hack. 35 | 36 | Adding an icon from an SVG sprite is a little different than what you're used to, but it's still a piece of cake. *Tip: To make your icons easily style able, we suggest adding a general class to the* `` *tag and a unique class name for each different icon in the* `` *tag.* 37 | 38 | ``` 39 | 40 | 41 | 42 | ``` 43 | 44 | Sizing icons only needs basic CSS. All the icons are in a square format, so just set the `` tag with equal width and height dimensions. 45 | 46 | ``` 47 | .icon { 48 | width: 16px; 49 | height: 16px; 50 | } 51 | ``` 52 | 53 | Coloring icons is even easier. All you need to do is set the `fill` rule on the `` tag. 54 | 55 | ``` 56 | .icon-account-login { 57 | fill: #f00; 58 | } 59 | ``` 60 | 61 | To learn more about SVG Sprites, read [Chris Coyier's guide](http://css-tricks.com/svg-sprites-use-better-icon-fonts/). 62 | 63 | #### Using Open Iconic's Icon Font... 64 | 65 | 66 | ##### …with Bootstrap 67 | 68 | You can find our Bootstrap stylesheets in `font/css/open-iconic-bootstrap.{css, less, scss, styl}` 69 | 70 | 71 | ``` 72 | 73 | ``` 74 | 75 | 76 | ``` 77 | 78 | ``` 79 | 80 | ##### …with Foundation 81 | 82 | You can find our Foundation stylesheets in `font/css/open-iconic-foundation.{css, less, scss, styl}` 83 | 84 | ``` 85 | 86 | ``` 87 | 88 | 89 | ``` 90 | 91 | ``` 92 | 93 | ##### …on its own 94 | 95 | You can find our default stylesheets in `font/css/open-iconic.{css, less, scss, styl}` 96 | 97 | ``` 98 | 99 | ``` 100 | 101 | ``` 102 | 103 | ``` 104 | 105 | 106 | ## License 107 | 108 | ### Icons 109 | 110 | All code (including SVG markup) is under the [MIT License](http://opensource.org/licenses/MIT). 111 | 112 | ### Fonts 113 | 114 | All fonts are under the [SIL Licensed](http://scripts.sil.org/cms/scripts/page.php?item_id=OFL_web). 115 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/css/open-iconic-bootstrap.min.css: -------------------------------------------------------------------------------- 1 | @font-face{font-family:Icons;src:url(../fonts/open-iconic.eot);src:url(../fonts/open-iconic.eot?#iconic-sm) format('embedded-opentype'),url(../fonts/open-iconic.woff) format('woff'),url(../fonts/open-iconic.ttf) format('truetype'),url(../fonts/open-iconic.otf) format('opentype'),url(../fonts/open-iconic.svg#iconic-sm) format('svg');font-weight:400;font-style:normal}.oi{position:relative;top:1px;display:inline-block;speak:none;font-family:Icons;font-style:normal;font-weight:400;line-height:1;-webkit-font-smoothing:antialiased;-moz-osx-font-smoothing:grayscale}.oi:empty:before{width:1em;text-align:center;box-sizing:content-box}.oi.oi-align-center:before{text-align:center}.oi.oi-align-left:before{text-align:left}.oi.oi-align-right:before{text-align:right}.oi.oi-flip-horizontal:before{-webkit-transform:scale(-1,1);-ms-transform:scale(-1,1);transform:scale(-1,1)}.oi.oi-flip-vertical:before{-webkit-transform:scale(1,-1);-ms-transform:scale(-1,1);transform:scale(1,-1)}.oi.oi-flip-horizontal-vertical:before{-webkit-transform:scale(-1,-1);-ms-transform:scale(-1,1);transform:scale(-1,-1)}.oi-account-login:before{content:'\e000'}.oi-account-logout:before{content:'\e001'}.oi-action-redo:before{content:'\e002'}.oi-action-undo:before{content:'\e003'}.oi-align-center:before{content:'\e004'}.oi-align-left:before{content:'\e005'}.oi-align-right:before{content:'\e006'}.oi-aperture:before{content:'\e007'}.oi-arrow-bottom:before{content:'\e008'}.oi-arrow-circle-bottom:before{content:'\e009'}.oi-arrow-circle-left:before{content:'\e00a'}.oi-arrow-circle-right:before{content:'\e00b'}.oi-arrow-circle-top:before{content:'\e00c'}.oi-arrow-left:before{content:'\e00d'}.oi-arrow-right:before{content:'\e00e'}.oi-arrow-thick-bottom:before{content:'\e00f'}.oi-arrow-thick-left:before{content:'\e010'}.oi-arrow-thick-right:before{content:'\e011'}.oi-arrow-thick-top:before{content:'\e012'}.oi-arrow-top:before{content:'\e013'}.oi-audio-spectrum:before{content:'\e014'}.oi-audio:before{content:'\e015'}.oi-badge:before{content:'\e016'}.oi-ban:before{content:'\e017'}.oi-bar-chart:before{content:'\e018'}.oi-basket:before{content:'\e019'}.oi-battery-empty:before{content:'\e01a'}.oi-battery-full:before{content:'\e01b'}.oi-beaker:before{content:'\e01c'}.oi-bell:before{content:'\e01d'}.oi-bluetooth:before{content:'\e01e'}.oi-bold:before{content:'\e01f'}.oi-bolt:before{content:'\e020'}.oi-book:before{content:'\e021'}.oi-bookmark:before{content:'\e022'}.oi-box:before{content:'\e023'}.oi-briefcase:before{content:'\e024'}.oi-british-pound:before{content:'\e025'}.oi-browser:before{content:'\e026'}.oi-brush:before{content:'\e027'}.oi-bug:before{content:'\e028'}.oi-bullhorn:before{content:'\e029'}.oi-calculator:before{content:'\e02a'}.oi-calendar:before{content:'\e02b'}.oi-camera-slr:before{content:'\e02c'}.oi-caret-bottom:before{content:'\e02d'}.oi-caret-left:before{content:'\e02e'}.oi-caret-right:before{content:'\e02f'}.oi-caret-top:before{content:'\e030'}.oi-cart:before{content:'\e031'}.oi-chat:before{content:'\e032'}.oi-check:before{content:'\e033'}.oi-chevron-bottom:before{content:'\e034'}.oi-chevron-left:before{content:'\e035'}.oi-chevron-right:before{content:'\e036'}.oi-chevron-top:before{content:'\e037'}.oi-circle-check:before{content:'\e038'}.oi-circle-x:before{content:'\e039'}.oi-clipboard:before{content:'\e03a'}.oi-clock:before{content:'\e03b'}.oi-cloud-download:before{content:'\e03c'}.oi-cloud-upload:before{content:'\e03d'}.oi-cloud:before{content:'\e03e'}.oi-cloudy:before{content:'\e03f'}.oi-code:before{content:'\e040'}.oi-cog:before{content:'\e041'}.oi-collapse-down:before{content:'\e042'}.oi-collapse-left:before{content:'\e043'}.oi-collapse-right:before{content:'\e044'}.oi-collapse-up:before{content:'\e045'}.oi-command:before{content:'\e046'}.oi-comment-square:before{content:'\e047'}.oi-compass:before{content:'\e048'}.oi-contrast:before{content:'\e049'}.oi-copywriting:before{content:'\e04a'}.oi-credit-card:before{content:'\e04b'}.oi-crop:before{content:'\e04c'}.oi-dashboard:before{content:'\e04d'}.oi-data-transfer-download:before{content:'\e04e'}.oi-data-transfer-upload:before{content:'\e04f'}.oi-delete:before{content:'\e050'}.oi-dial:before{content:'\e051'}.oi-document:before{content:'\e052'}.oi-dollar:before{content:'\e053'}.oi-double-quote-sans-left:before{content:'\e054'}.oi-double-quote-sans-right:before{content:'\e055'}.oi-double-quote-serif-left:before{content:'\e056'}.oi-double-quote-serif-right:before{content:'\e057'}.oi-droplet:before{content:'\e058'}.oi-eject:before{content:'\e059'}.oi-elevator:before{content:'\e05a'}.oi-ellipses:before{content:'\e05b'}.oi-envelope-closed:before{content:'\e05c'}.oi-envelope-open:before{content:'\e05d'}.oi-euro:before{content:'\e05e'}.oi-excerpt:before{content:'\e05f'}.oi-expand-down:before{content:'\e060'}.oi-expand-left:before{content:'\e061'}.oi-expand-right:before{content:'\e062'}.oi-expand-up:before{content:'\e063'}.oi-external-link:before{content:'\e064'}.oi-eye:before{content:'\e065'}.oi-eyedropper:before{content:'\e066'}.oi-file:before{content:'\e067'}.oi-fire:before{content:'\e068'}.oi-flag:before{content:'\e069'}.oi-flash:before{content:'\e06a'}.oi-folder:before{content:'\e06b'}.oi-fork:before{content:'\e06c'}.oi-fullscreen-enter:before{content:'\e06d'}.oi-fullscreen-exit:before{content:'\e06e'}.oi-globe:before{content:'\e06f'}.oi-graph:before{content:'\e070'}.oi-grid-four-up:before{content:'\e071'}.oi-grid-three-up:before{content:'\e072'}.oi-grid-two-up:before{content:'\e073'}.oi-hard-drive:before{content:'\e074'}.oi-header:before{content:'\e075'}.oi-headphones:before{content:'\e076'}.oi-heart:before{content:'\e077'}.oi-home:before{content:'\e078'}.oi-image:before{content:'\e079'}.oi-inbox:before{content:'\e07a'}.oi-infinity:before{content:'\e07b'}.oi-info:before{content:'\e07c'}.oi-italic:before{content:'\e07d'}.oi-justify-center:before{content:'\e07e'}.oi-justify-left:before{content:'\e07f'}.oi-justify-right:before{content:'\e080'}.oi-key:before{content:'\e081'}.oi-laptop:before{content:'\e082'}.oi-layers:before{content:'\e083'}.oi-lightbulb:before{content:'\e084'}.oi-link-broken:before{content:'\e085'}.oi-link-intact:before{content:'\e086'}.oi-list-rich:before{content:'\e087'}.oi-list:before{content:'\e088'}.oi-location:before{content:'\e089'}.oi-lock-locked:before{content:'\e08a'}.oi-lock-unlocked:before{content:'\e08b'}.oi-loop-circular:before{content:'\e08c'}.oi-loop-square:before{content:'\e08d'}.oi-loop:before{content:'\e08e'}.oi-magnifying-glass:before{content:'\e08f'}.oi-map-marker:before{content:'\e090'}.oi-map:before{content:'\e091'}.oi-media-pause:before{content:'\e092'}.oi-media-play:before{content:'\e093'}.oi-media-record:before{content:'\e094'}.oi-media-skip-backward:before{content:'\e095'}.oi-media-skip-forward:before{content:'\e096'}.oi-media-step-backward:before{content:'\e097'}.oi-media-step-forward:before{content:'\e098'}.oi-media-stop:before{content:'\e099'}.oi-medical-cross:before{content:'\e09a'}.oi-menu:before{content:'\e09b'}.oi-microphone:before{content:'\e09c'}.oi-minus:before{content:'\e09d'}.oi-monitor:before{content:'\e09e'}.oi-moon:before{content:'\e09f'}.oi-move:before{content:'\e0a0'}.oi-musical-note:before{content:'\e0a1'}.oi-paperclip:before{content:'\e0a2'}.oi-pencil:before{content:'\e0a3'}.oi-people:before{content:'\e0a4'}.oi-person:before{content:'\e0a5'}.oi-phone:before{content:'\e0a6'}.oi-pie-chart:before{content:'\e0a7'}.oi-pin:before{content:'\e0a8'}.oi-play-circle:before{content:'\e0a9'}.oi-plus:before{content:'\e0aa'}.oi-power-standby:before{content:'\e0ab'}.oi-print:before{content:'\e0ac'}.oi-project:before{content:'\e0ad'}.oi-pulse:before{content:'\e0ae'}.oi-puzzle-piece:before{content:'\e0af'}.oi-question-mark:before{content:'\e0b0'}.oi-rain:before{content:'\e0b1'}.oi-random:before{content:'\e0b2'}.oi-reload:before{content:'\e0b3'}.oi-resize-both:before{content:'\e0b4'}.oi-resize-height:before{content:'\e0b5'}.oi-resize-width:before{content:'\e0b6'}.oi-rss-alt:before{content:'\e0b7'}.oi-rss:before{content:'\e0b8'}.oi-script:before{content:'\e0b9'}.oi-share-boxed:before{content:'\e0ba'}.oi-share:before{content:'\e0bb'}.oi-shield:before{content:'\e0bc'}.oi-signal:before{content:'\e0bd'}.oi-signpost:before{content:'\e0be'}.oi-sort-ascending:before{content:'\e0bf'}.oi-sort-descending:before{content:'\e0c0'}.oi-spreadsheet:before{content:'\e0c1'}.oi-star:before{content:'\e0c2'}.oi-sun:before{content:'\e0c3'}.oi-tablet:before{content:'\e0c4'}.oi-tag:before{content:'\e0c5'}.oi-tags:before{content:'\e0c6'}.oi-target:before{content:'\e0c7'}.oi-task:before{content:'\e0c8'}.oi-terminal:before{content:'\e0c9'}.oi-text:before{content:'\e0ca'}.oi-thumb-down:before{content:'\e0cb'}.oi-thumb-up:before{content:'\e0cc'}.oi-timer:before{content:'\e0cd'}.oi-transfer:before{content:'\e0ce'}.oi-trash:before{content:'\e0cf'}.oi-underline:before{content:'\e0d0'}.oi-vertical-align-bottom:before{content:'\e0d1'}.oi-vertical-align-center:before{content:'\e0d2'}.oi-vertical-align-top:before{content:'\e0d3'}.oi-video:before{content:'\e0d4'}.oi-volume-high:before{content:'\e0d5'}.oi-volume-low:before{content:'\e0d6'}.oi-volume-off:before{content:'\e0d7'}.oi-warning:before{content:'\e0d8'}.oi-wifi:before{content:'\e0d9'}.oi-wrench:before{content:'\e0da'}.oi-x:before{content:'\e0db'}.oi-yen:before{content:'\e0dc'}.oi-zoom-in:before{content:'\e0dd'}.oi-zoom-out:before{content:'\e0de'} -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/fonts/open-iconic.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/fonts/open-iconic.eot -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/fonts/open-iconic.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/fonts/open-iconic.otf -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/fonts/open-iconic.svg: -------------------------------------------------------------------------------- 1 | 2 | 3 | 6 | 7 | 8 | Created by FontForge 20120731 at Tue Jul 1 20:39:22 2014 9 | By P.J. Onori 10 | Created by P.J. Onori with FontForge 2.0 (http://fontforge.sf.net) 11 | 12 | 13 | 14 | 27 | 28 | 30 | 32 | 34 | 36 | 38 | 40 | 42 | 45 | 47 | 49 | 51 | 53 | 55 | 57 | 59 | 61 | 63 | 65 | 67 | 69 | 71 | 74 | 76 | 79 | 81 | 84 | 86 | 88 | 91 | 93 | 95 | 98 | 100 | 102 | 104 | 106 | 109 | 112 | 115 | 117 | 121 | 123 | 125 | 127 | 130 | 132 | 134 | 136 | 138 | 141 | 143 | 145 | 147 | 149 | 151 | 153 | 155 | 157 | 159 | 162 | 165 | 167 | 169 | 172 | 174 | 177 | 179 | 181 | 183 | 185 | 189 | 191 | 194 | 196 | 198 | 200 | 202 | 205 | 207 | 209 | 211 | 213 | 215 | 218 | 220 | 222 | 224 | 226 | 228 | 230 | 232 | 234 | 236 | 238 | 241 | 243 | 245 | 247 | 249 | 251 | 253 | 256 | 259 | 261 | 263 | 265 | 267 | 269 | 272 | 274 | 276 | 280 | 282 | 285 | 287 | 289 | 292 | 295 | 298 | 300 | 302 | 304 | 306 | 309 | 312 | 314 | 316 | 318 | 320 | 322 | 324 | 326 | 330 | 334 | 338 | 340 | 343 | 345 | 347 | 349 | 351 | 353 | 355 | 358 | 360 | 363 | 365 | 367 | 369 | 371 | 373 | 375 | 377 | 379 | 381 | 383 | 386 | 388 | 390 | 392 | 394 | 396 | 399 | 401 | 404 | 406 | 408 | 410 | 412 | 414 | 416 | 419 | 421 | 423 | 425 | 428 | 431 | 435 | 438 | 440 | 442 | 444 | 446 | 448 | 451 | 453 | 455 | 457 | 460 | 462 | 464 | 466 | 468 | 471 | 473 | 477 | 479 | 481 | 483 | 486 | 488 | 490 | 492 | 494 | 496 | 499 | 501 | 504 | 506 | 509 | 512 | 515 | 517 | 520 | 522 | 524 | 526 | 529 | 532 | 534 | 536 | 539 | 542 | 543 | 544 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/fonts/open-iconic.ttf -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/fonts/open-iconic.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lohithgn/blazor-hackernews-clone/f33619744deca3aa53daf0fb33976ada8c08937d/src/BlazorHackerNewsClone/wwwroot/css/open-iconic/font/fonts/open-iconic.woff -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/css/site.css: -------------------------------------------------------------------------------- 1 | @import url('open-iconic/font/css/open-iconic-bootstrap.min.css'); 2 | 3 | body { 4 | margin-top: 50px; 5 | } 6 | 7 | .hn-background { 8 | background-color: rgb(246, 246, 239); 9 | min-height:90vh; 10 | } 11 | 12 | .splash { 13 | text-align: center; 14 | margin: 10% 0 0 0; 15 | box-sizing: border-box; 16 | } 17 | 18 | .meta-icon{ 19 | font-size:0.7rem; 20 | opacity:0.5; 21 | } 22 | 23 | /*html, body { 24 | font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif; 25 | } 26 | 27 | app { 28 | position: relative; 29 | display: flex; 30 | flex-direction: column; 31 | } 32 | 33 | .top-row { 34 | height: 3.5rem; 35 | display: flex; 36 | align-items: center; 37 | } 38 | 39 | .main { 40 | flex: 1; 41 | } 42 | 43 | .main .top-row { 44 | background-color: #e6e6e6; 45 | border-bottom: 1px solid #d6d5d5; 46 | } 47 | 48 | .sidebar { 49 | background-image: linear-gradient(180deg, rgb(5, 39, 103) 0%, #3a0647 70%); 50 | } 51 | 52 | .sidebar .top-row { 53 | background-color: rgba(0,0,0,0.4); 54 | } 55 | 56 | .sidebar .navbar-brand { 57 | font-size: 1.1rem; 58 | } 59 | 60 | .sidebar .oi { 61 | width: 2rem; 62 | font-size: 1.1rem; 63 | vertical-align: text-top; 64 | top: -2px; 65 | } 66 | 67 | .nav-item { 68 | font-size: 0.9rem; 69 | padding-bottom: 0.5rem; 70 | } 71 | 72 | .nav-item:first-of-type { 73 | padding-top: 1rem; 74 | } 75 | 76 | .nav-item:last-of-type { 77 | padding-bottom: 1rem; 78 | } 79 | 80 | .nav-item a { 81 | color: #d7d7d7; 82 | border-radius: 4px; 83 | height: 3rem; 84 | display: flex; 85 | align-items: center; 86 | line-height: 3rem; 87 | } 88 | 89 | .nav-item a.active { 90 | background-color: rgba(255,255,255,0.25); 91 | color: white; 92 | } 93 | 94 | .nav-item a:hover { 95 | background-color: rgba(255,255,255,0.1); 96 | color: white; 97 | } 98 | 99 | .content { 100 | padding-top: 1.1rem; 101 | } 102 | 103 | .navbar-toggler { 104 | background-color: rgba(255, 255, 255, 0.1); 105 | } 106 | 107 | @media (max-width: 767.98px) { 108 | .main .top-row { 109 | display: none; 110 | } 111 | } 112 | 113 | @media (min-width: 768px) { 114 | app { 115 | flex-direction: row; 116 | } 117 | 118 | .sidebar { 119 | width: 250px; 120 | height: 100vh; 121 | position: sticky; 122 | top: 0; 123 | } 124 | 125 | .main .top-row { 126 | position: sticky; 127 | top: 0; 128 | } 129 | 130 | .main > div { 131 | padding-left: 2rem !important; 132 | padding-right: 1.5rem !important; 133 | } 134 | 135 | .navbar-toggler { 136 | display: none; 137 | } 138 | 139 | .sidebar .collapse { 140 | display: block; 141 | } 142 | }*/ 143 | -------------------------------------------------------------------------------- /src/BlazorHackerNewsClone/wwwroot/index.html: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | BlazorHackerNewsClone 7 | 8 | 9 | 10 | 11 | 12 | 13 |
14 |
15 |
16 |

17 | B 18 | Hacker News 19 |

20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
29 | 30 | 31 | 45 | 46 | 47 | --------------------------------------------------------------------------------