mirror of
https://github.com/bitwarden/help
synced 2026-02-14 15:23:29 +00:00
added VS solution and formatting
This commit is contained in:
3
.gitignore
vendored
3
.gitignore
vendored
@@ -1,3 +1,6 @@
|
||||
.vs
|
||||
node_modules
|
||||
npm-debug.log
|
||||
_site/
|
||||
.sass-cache/
|
||||
.jekyll-metadata
|
||||
|
||||
@@ -9,4 +9,3 @@ collections:
|
||||
articles:
|
||||
output: true
|
||||
permalink: /:path/
|
||||
|
||||
@@ -5,10 +5,10 @@ layout: default
|
||||
<div class="container">
|
||||
<h1>{{page.title}}</h1>
|
||||
<ol>
|
||||
{% for article in site.articles %}
|
||||
{% if article.category == page.title %}
|
||||
{% for article in site.articles %}
|
||||
{% if article.category == page.title %}
|
||||
<li><a href="{{article.url}}">{{article.title}}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ol>
|
||||
</div>
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
<!DOCTYPE html>
|
||||
<!DOCTYPE html>
|
||||
<html lang="en">
|
||||
<head>
|
||||
<meta charset="utf-8">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
|
||||
<title>{% if page.title %} {{ page.title }} | {% endif %}bitwarden</title>
|
||||
<title>{% if page.title %}{{page.title}} | {% endif %}bitwarden Help & Support</title>
|
||||
|
||||
<link rel="stylesheet" href="//maxcdn.bootstrapcdn.com/bootstrap/3.3.7/css/bootstrap.min.css" />
|
||||
<meta name="x-stylesheet-test-bs" content="" class="invisible" />
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
<link href="//fonts.googleapis.com/css?family=Open+Sans:300,400,600,700,300italic,400italic,600italic%7CLato:400,700,400italic" rel="stylesheet" type="text/css">
|
||||
<link href="/css/styles.css" rel="stylesheet" type="text/css">
|
||||
|
||||
|
||||
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
@@ -51,7 +51,7 @@
|
||||
{{content}}
|
||||
|
||||
<footer class="text-center">
|
||||
© Copyright 2015 - {{ 'now' | date: "%Y" }}, 8bit Solutions LLC
|
||||
© Copyright 2015 - {{'now' | date: "%Y"}}, 8bit Solutions LLC
|
||||
</footer>
|
||||
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.4/jquery.min.js"></script>
|
||||
|
||||
38
bitwarden-help.sln
Normal file
38
bitwarden-help.sln
Normal file
@@ -0,0 +1,38 @@
|
||||
|
||||
Microsoft Visual Studio Solution File, Format Version 12.00
|
||||
# Visual Studio 14
|
||||
VisualStudioVersion = 14.0.25420.1
|
||||
MinimumVisualStudioVersion = 10.0.40219.1
|
||||
Project("{E24C65DC-7377-472B-9ABA-BC803B73C61A}") = "bitwarden-help", ".", "{A4DE5293-DB47-41D1-8890-7C67B83F663C}"
|
||||
ProjectSection(WebsiteProperties) = preProject
|
||||
TargetFrameworkMoniker = ".NETFramework,Version%3Dv4.0"
|
||||
Debug.AspNetCompiler.VirtualPath = "/localhost_4408"
|
||||
Debug.AspNetCompiler.PhysicalPath = "."
|
||||
Debug.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_4405\"
|
||||
Debug.AspNetCompiler.Updateable = "true"
|
||||
Debug.AspNetCompiler.ForceOverwrite = "true"
|
||||
Debug.AspNetCompiler.FixedNames = "false"
|
||||
Debug.AspNetCompiler.Debug = "True"
|
||||
Release.AspNetCompiler.VirtualPath = "/localhost_4408"
|
||||
Release.AspNetCompiler.PhysicalPath = "."
|
||||
Release.AspNetCompiler.TargetPath = "PrecompiledWeb\localhost_4408\"
|
||||
Release.AspNetCompiler.Updateable = "true"
|
||||
Release.AspNetCompiler.ForceOverwrite = "true"
|
||||
Release.AspNetCompiler.FixedNames = "false"
|
||||
Release.AspNetCompiler.Debug = "False"
|
||||
VWDPort = "4405"
|
||||
SlnRelativePath = "."
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(ProjectConfigurationPlatforms) = postSolution
|
||||
{A4DE5293-DB47-41D1-8890-7C67B83F663C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A4DE5293-DB47-41D1-8890-7C67B83F663C}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
@@ -22,5 +22,5 @@ footer {
|
||||
bottom: 0;
|
||||
width: 100%;
|
||||
height: 60px;
|
||||
background-color: #black;
|
||||
background-color: lightgray;
|
||||
}
|
||||
|
||||
80
index.html
80
index.html
@@ -4,52 +4,52 @@ title: Help, FAQ, and Support
|
||||
---
|
||||
|
||||
<div class="search-header">
|
||||
<div class="container">
|
||||
<form action="/search/" method="get">
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control" placeholder="Type your problem here..." name="q">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">Search</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
<div class="container">
|
||||
<form action="/search/" method="get">
|
||||
<div class="input-group">
|
||||
<input type="search" class="form-control" placeholder="Type your problem here..." name="q">
|
||||
<span class="input-group-btn">
|
||||
<button class="btn btn-default" type="submit">Search</button>
|
||||
</span>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<div class="container">
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
{% for category in site.categories %}
|
||||
{% if category.featured == true %}
|
||||
<div class="col-md-6">
|
||||
<h3>{{category.title}}</h3>
|
||||
<ul>
|
||||
{% for article in site.articles %}
|
||||
{% if article.category == category.title and article.featured == true %}
|
||||
<li><a href="{{article.url}}">{{article.title}}</a></li>
|
||||
<div class="row">
|
||||
<div class="col-md-8">
|
||||
<div class="row">
|
||||
{% for category in site.categories %}
|
||||
{% if category.featured == true %}
|
||||
<div class="col-md-6">
|
||||
<h3>{{category.title}}</h3>
|
||||
<ul>
|
||||
{% for article in site.articles %}
|
||||
{% if article.category == category.title and article.featured == true %}
|
||||
<li><a href="{{article.url}}">{{article.title}}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h3>Categories</h3>
|
||||
<ul>
|
||||
{% for category in site.categories %}
|
||||
<li><a href="{{category.url}}">{{category.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h3>Popular</h3>
|
||||
<ul>
|
||||
{% for article in site.articles %}
|
||||
{% if article.popular == true %}
|
||||
<li><a href="{{article.url}}">{{article.title}}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4">
|
||||
<h3>Categories</h3>
|
||||
<ul>
|
||||
{% for category in site.categories %}
|
||||
<li><a href="{{category.url}}">{{category.title}}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
<h3>Popular</h3>
|
||||
<ul>
|
||||
{% for article in site.articles %}
|
||||
{% if article.popular == true %}
|
||||
<li><a href="{{article.url}}">{{article.title}}</a></li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -11,74 +11,74 @@ title: Search Results
|
||||
<script>
|
||||
window.store = {
|
||||
{% for article in site.articles %}
|
||||
"{{ article.url | slugify }}": {
|
||||
"title": "{{ article.title | xml_escape }}",
|
||||
"category": "{{ article.category | xml_escape }}",
|
||||
"content": {{ article.content | strip_html | strip_newlines | jsonify }},
|
||||
"url": "{{ article.url | xml_escape }}"
|
||||
"{{article.url | slugify}}": {
|
||||
"title": "{{article.title | xml_escape}}",
|
||||
"category": "{{article.category | xml_escape}}",
|
||||
"content": {{article.content | strip_html | strip_newlines | jsonify}},
|
||||
"url": "{{article.url | xml_escape}}"
|
||||
}
|
||||
{% unless forloop.last %},{% endunless %}
|
||||
{% unless forloop.last %},{% endunless %}
|
||||
{% endfor %}
|
||||
};
|
||||
|
||||
(function() {
|
||||
function displaySearchResults(results, store) {
|
||||
var searchResults = document.getElementById('search-results');
|
||||
function displaySearchResults(results, store) {
|
||||
var searchResults = document.getElementById('search-results');
|
||||
|
||||
if (results.length) { // Are there any results?
|
||||
var appendString = '';
|
||||
if (results.length) { // Are there any results?
|
||||
var appendString = '';
|
||||
|
||||
for (var i = 0; i < results.length; i++) { // Iterate over the results
|
||||
var item = store[results[i].ref];
|
||||
appendString += '<li><a href="' + item.url + '"><h3>' + item.title + '</h3></a>';
|
||||
appendString += '<p>' + item.content.substring(0, 150) + '...</p></li>';
|
||||
}
|
||||
for (var i = 0; i < results.length; i++) { // Iterate over the results
|
||||
var item = store[results[i].ref];
|
||||
appendString += '<li><a href="' + item.url + '"><h3>' + item.title + '</h3></a>';
|
||||
appendString += '<p>' + item.content.substring(0, 150) + '...</p></li>';
|
||||
}
|
||||
|
||||
searchResults.innerHTML = appendString;
|
||||
searchResults.innerHTML = appendString;
|
||||
}
|
||||
else {
|
||||
searchResults.innerHTML = '<li>No results found</li>';
|
||||
}
|
||||
}
|
||||
else {
|
||||
searchResults.innerHTML = '<li>No results found</li>';
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split('&');
|
||||
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split('=');
|
||||
|
||||
if (pair[0] === variable) {
|
||||
return decodeURIComponent(pair[1].replace(/\+/g, '%20'));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
function getQueryVariable(variable) {
|
||||
var query = window.location.search.substring(1);
|
||||
var vars = query.split('&');
|
||||
var searchTerm = getQueryVariable('q');
|
||||
|
||||
for (var i = 0; i < vars.length; i++) {
|
||||
var pair = vars[i].split('=');
|
||||
if (searchTerm) {
|
||||
//document.getElementById('search-box').setAttribute("value", searchTerm);
|
||||
|
||||
if (pair[0] === variable) {
|
||||
return decodeURIComponent(pair[1].replace(/\+/g, '%20'));
|
||||
}
|
||||
// Initalize lunr with the fields it will be searching on. I've given title
|
||||
// a boost of 10 to indicate matches on this field are more important.
|
||||
var idx = lunr(function () {
|
||||
this.field('id');
|
||||
this.field('title', { boost: 10 });
|
||||
this.field('category');
|
||||
this.field('content');
|
||||
});
|
||||
|
||||
for (var key in window.store) { // Add the data to lunr
|
||||
idx.add({
|
||||
'id': key,
|
||||
'title': window.store[key].title,
|
||||
'category': window.store[key].category,
|
||||
'content': window.store[key].content
|
||||
});
|
||||
|
||||
var results = idx.search(searchTerm); // Get lunr to perform a search
|
||||
displaySearchResults(results, window.store); // We'll write this in the next section
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var searchTerm = getQueryVariable('q');
|
||||
|
||||
if (searchTerm) {
|
||||
//document.getElementById('search-box').setAttribute("value", searchTerm);
|
||||
|
||||
// Initalize lunr with the fields it will be searching on. I've given title
|
||||
// a boost of 10 to indicate matches on this field are more important.
|
||||
var idx = lunr(function () {
|
||||
this.field('id');
|
||||
this.field('title', { boost: 10 });
|
||||
this.field('category');
|
||||
this.field('content');
|
||||
});
|
||||
|
||||
for (var key in window.store) { // Add the data to lunr
|
||||
idx.add({
|
||||
'id': key,
|
||||
'title': window.store[key].title,
|
||||
'category': window.store[key].category,
|
||||
'content': window.store[key].content
|
||||
});
|
||||
|
||||
var results = idx.search(searchTerm); // Get lunr to perform a search
|
||||
displaySearchResults(results, window.store); // We'll write this in the next section
|
||||
}
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user