mirror of
https://gitlab.com/buildfeed/BuildFeed.git
synced 2024-03-22 21:10:34 +08:00
parent
93d8560e32
commit
f316fe856f
|
@ -20,7 +20,7 @@
|
|||
<add assembly="System.Runtime, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a" />
|
||||
</assemblies>
|
||||
</compilation>
|
||||
<httpRuntime targetFramework="4.6" enableVersionHeader="false" />
|
||||
<httpRuntime targetFramework="4.7" enableVersionHeader="false" />
|
||||
<globalization culture="auto:en" uiCulture="auto:en" />
|
||||
<trace enabled="true" requestLimit="40" pageOutput="false" />
|
||||
<sessionState cookieless="UseCookies" />
|
||||
|
|
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
|
@ -105,7 +105,7 @@ table
|
|||
|
||||
.container
|
||||
{
|
||||
width: 1340px;
|
||||
width: $container-width;
|
||||
max-width: 80%;
|
||||
margin: 0 auto;
|
||||
position: relative;
|
||||
|
@ -194,7 +194,7 @@ nav#page-navigation
|
|||
> a
|
||||
{
|
||||
display: block;
|
||||
padding: 15px 10px;
|
||||
padding: 14px 14px 11px;
|
||||
|
||||
&:hover,
|
||||
&:active,
|
||||
|
@ -227,7 +227,7 @@ nav#page-navigation
|
|||
position: absolute;
|
||||
left: -15px;
|
||||
right: -15px;
|
||||
max-width: 1270px;
|
||||
max-width: #{($container-width + 30px)};
|
||||
padding: 15px 15px 0;
|
||||
text-align: left;
|
||||
z-index: 10;
|
||||
|
@ -334,6 +334,16 @@ article
|
|||
margin: 1em 0 0;
|
||||
}
|
||||
|
||||
ul
|
||||
{
|
||||
margin-bottom: 1em;
|
||||
|
||||
> li
|
||||
{
|
||||
margin-bottom: 0.5em;
|
||||
}
|
||||
}
|
||||
|
||||
.build-group-listing
|
||||
{
|
||||
display: flex;
|
||||
|
@ -477,8 +487,9 @@ article
|
|||
.latest-flex-build
|
||||
{
|
||||
font-size: #{(7em / 3)};
|
||||
margin: #{(1em / 3)} 0 #{(1em / 6)};
|
||||
margin: #{(1em / 2)} 0 0;
|
||||
font-weight: normal;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.latest-flex-lab
|
||||
|
@ -669,10 +680,10 @@ article
|
|||
margin-left: 0;
|
||||
}
|
||||
|
||||
dd + dt
|
||||
{
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
dd + dt
|
||||
{
|
||||
margin-top: 1.5em;
|
||||
}
|
||||
}
|
||||
|
||||
ul.pagination
|
||||
|
|
|
@ -1 +1,2 @@
|
|||
$border-size: 2px;
|
||||
$container-width: 1340px;
|
||||
$border-size: 2px;
|
|
@ -1,4 +1,4 @@
|
|||
Copyright (c) 2016, Thomas Hounsell.
|
||||
Copyright © 2017, Thomas Hounsell.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
|
|
127
README.md
127
README.md
|
@ -1,6 +1,125 @@
|
|||
# BuildFeed #
|
||||
----------
|
||||
# BuildFeed
|
||||
|
||||
BuildFeed is a website for tracking Windows build numbers. The website itself is hosted at [https://buildfeed.net/](https://buildfeed.net/).
|
||||
BuildFeed is a website for tracking Windows build numbers. The canonical version is hosted at [https://buildfeed.net/](https://buildfeed.net/).
|
||||
|
||||
It is built using ASP.NET MVC, with a MongoDB database used for storing data.
|
||||
## Using
|
||||
|
||||
### Hosting
|
||||
|
||||
Current versions of BuildFeed require the following:
|
||||
* IIS 7.0 or greater
|
||||
* IIS URL Rewriting module
|
||||
* .NET Framework 4.7
|
||||
* MongoDB v2.4 or newer
|
||||
|
||||
There are a few configuration files missing from the Git repository. You will need to add these to your local copy.
|
||||
|
||||
**smtp.config**
|
||||
|
||||
This file is responsible for configuring SMTP. Without these details in place, sending emails, such as registration emails, will fail.
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<smtp deliveryMethod="Network" from="from@email.com">
|
||||
<network host="smtp.email.com" port="465" userName="from@email.com" password="password" enableSsl="true" />
|
||||
</smtp>
|
||||
```
|
||||
|
||||
**settings.config**
|
||||
|
||||
This file contains sensitive configuration data:
|
||||
|
||||
* `data:SecretKey` is a string used when generating some hashes for use in URLs. Primarily, it's used to ensure that the hash in an email validation link cannot be predicted without knowledge of this secret key.
|
||||
|
||||
* `data:MongoUser` and `data:MongoPass` are the Username and Password for MongoDB. If you are running without authentication, such as in a local testing environment, you should omit these two settings.
|
||||
|
||||
* `push:OneSignalApiKey` and `push:AppId` are used by the OneSignal push notification system. These two properties can be obtained from within the OneSignal configuration panel.
|
||||
|
||||
```xml
|
||||
<?xml version="1.0"?>
|
||||
|
||||
<appSettings>
|
||||
<add key="data:SecretKey" value="[Secret Key]" />
|
||||
|
||||
<add key="data:MongoUser" value="username" />
|
||||
<add key="data:MongoPass" value="password" />
|
||||
<add key="push:OneSignalApiKey" value="[API Key]" />
|
||||
<add key="push:AppId" value="[App ID]" />
|
||||
</appSettings>
|
||||
```
|
||||
|
||||
### Developing
|
||||
|
||||
The following will be required to develop BuildFeed:
|
||||
* Visual Studio 2017 (Community will be sufficient)
|
||||
* .NET Framework 4.7 (inc. Targeting Pack via VS 2017 installer)
|
||||
* MongoDB 2.4 or newer
|
||||
* Node support within Visual Studio 2017.
|
||||
|
||||
You will need to follow the instructions under hosting for restoring the files missing from the repository.
|
||||
|
||||
The website is split up into three main projects.
|
||||
|
||||
**BuildFeed**
|
||||
|
||||
This is the main website, built using ASP.NET MVC.
|
||||
|
||||
Styling is provided under `~/res/css/` as SASS files. These are then compiled into CSS using gulp. This recompilation will run automatically on a file change normally, but can also be ran on-demand using the Task Runner Explorer in Visual Studio. There are four SASS files:
|
||||
* `default.scss` - the styling in this file is common to the entire site.
|
||||
* `dark.scss` - the styling in this file is applied when the Dark theme is active.
|
||||
* `light.scss` - the styling in this file is applied when the Light theme is active.
|
||||
* `rtl.scss` - the styling in this file is applied when a Right-to-Left language is active.
|
||||
|
||||
Scripting is provided under `~/res/ts/` as a Typescript file. We don't use Visual Studio's built-in TypeScript compiler, it's disabled in the project file. Instead, we use gulp along with the Node TypeScript compiler directly. Recompilation will run automatically on a file change normally, but can also be ran on-demand using the Task Runner Explorer in Visual Studio. Mostly, this script is just pure ECMAScript and DOM, but two external javascript libraries are referenced:
|
||||
* `jsrender` - this is used to render the search results in the search dialog after fetching the data via an AJAX request.
|
||||
* `google.analytics` - used to channel search terms to Site Search in Google Analytics via the use of Virtual Page Views.
|
||||
|
||||
Other files of note include:
|
||||
* `manifest.json` - contains the configuration data for BuildFeed as a Progressive Web Application.
|
||||
* `gulpfile.js` - contains the gulp tasks and configuration/
|
||||
* `package.json` - contains the Node packages used within the gulp system.
|
||||
* `tsconfig.json` - contains the configuration data for TypeScript. Used here to exclude typings from producing syntax warnings.
|
||||
* `browserconfig.xml` - contains the Internet Explorer web application description.
|
||||
* `Controllers/apiController.cs` - contains the controller for the BuildFeed API.
|
||||
|
||||
**BuildFeed.Local**
|
||||
|
||||
This contains the many translations that BuildFeed maintains. `VariantTerms.resx` contains the authoritative, and fallback, English translation. `VariantTerms.qps-ploc.resx` is included for reference, but not used as non-Windows environments do not support the `qps-ploc` locale.
|
||||
|
||||
The only other file in this project is `InvariantTerms.cs`, which includes some common terms used throughout the site, but do not change for each language, in a single place for easy adjustment.
|
||||
|
||||
**BuildFeed.Model**
|
||||
|
||||
This project contains all code that interacts with the data store. Many files in the root folder are simple MongoDB document models. There's a couple of important exceptions:
|
||||
|
||||
* `BuildRepository.cs` is the class which allows you to easily interact with the database - it contains all methods that carry out the various CRUD tasks for the Build models. This is also split out into a number of `BuildRepository-{function}.cs` files, where methods relating to specific common functions are grouped together.
|
||||
* `MongoConfig.cs` is responsible for managing the configuration and connection to MongoDB.
|
||||
|
||||
There are two main subfolders that you should take note of:
|
||||
|
||||
* `Api` contains the models used exclusively within the BuildFeed API.
|
||||
* `View` contains the models used exclusively within Views in the MVC website.
|
||||
|
||||
### Other
|
||||
|
||||
There's also two further projects contained within the solution.
|
||||
|
||||
* **Mobile/BuildFeedApp-Westminster** - A Project Westminster UWP application that essentially wraps the website into an application that can be submitted in the Windows store. This is effectively abandoned and will be replaced with a more robust, purpose-developed mobile application in the future.
|
||||
* **Authentication/MongoAuth** - This is a custom Membership and Role Provider designed to store the Users and Roles for BuildFeed within MongoDB.
|
||||
|
||||
## License
|
||||
|
||||
Copyright © 2017, Thomas Hounsell.
|
||||
|
||||
All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
|
||||
|
||||
1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
|
||||
|
||||
2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
|
||||
|
||||
3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
|
||||
|
||||
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
Loading…
Reference in New Issue
Block a user