diff --git a/.gitignore b/.gitignore index b226e91..8b71606 100644 --- a/.gitignore +++ b/.gitignore @@ -364,4 +364,9 @@ healthchecksdb segments_2i # Generated files -**/Client/dist/* \ No newline at end of file +**/Client/dist/* + +**/CMSModules/WebFarm/* + +# Lucene Search +**/App_Data/LuceneSearch/* \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json new file mode 100644 index 0000000..9907c04 --- /dev/null +++ b/.vscode/launch.json @@ -0,0 +1,33 @@ +{ + // Use IntelliSense to learn about possible attributes. + // Hover to view descriptions of existing attributes. + // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 + "version": "0.2.0", + "configurations": [ + { + "name": ".NET Core Launch (web)", + "type": "coreclr", + "request": "launch", + "preLaunchTask": "build", + "program": "${workspaceFolder}/src/Kentico.Xperience.Lucene.Sample/bin/Debug/net6.0/DancingGoat.dll", + "args": [], + "cwd": "${workspaceFolder}/src/Kentico.Xperience.Lucene.Sample", + "stopAtEntry": false, + "serverReadyAction": { + "action": "openExternally", + "pattern": "\\bNow listening on:\\s+(https?://\\S+)" + }, + "env": { + "ASPNETCORE_ENVIRONMENT": "Development" + }, + "sourceFileMap": { + "/Views": "${workspaceFolder}/Views" + } + }, + { + "name": ".NET Core Attach", + "type": "coreclr", + "request": "attach" + } + ] +} \ No newline at end of file diff --git a/.vscode/tasks.json b/.vscode/tasks.json index 4697dd3..481b4fd 100644 --- a/.vscode/tasks.json +++ b/.vscode/tasks.json @@ -49,6 +49,13 @@ "problemMatcher": [], "label": "npm: start - src/Kentico.Xperience.Lucene/Admin/Client", "detail": "webpack serve --mode development" + }, + { + "type": "dotnet", + "task": "watch DancingGoat", + "file": "d:\\dev\\kentico\\community\\xperience-by-kentico-lucene\\src\\Kentico.Xperience.Lucene.Sample\\DancingGoat.csproj", + "problemMatcher": ["$msCompile"], + "label": "dotnet: watch DancingGoat" } ] } diff --git a/Kentico.Xperience.Lucene.sln b/Kentico.Xperience.Lucene.sln index 41cb143..a03543c 100644 --- a/Kentico.Xperience.Lucene.sln +++ b/Kentico.Xperience.Lucene.sln @@ -5,7 +5,9 @@ VisualStudioVersion = 17.5.33516.290 MinimumVisualStudioVersion = 10.0.40219.1 Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Kentico.Xperience.Lucene", "src\Kentico.Xperience.Lucene\Kentico.Xperience.Lucene.csproj", "{52F11256-9F81-4FC1-A2EF-37B113A8F242}" EndProject -Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Kentico.Xperience.Lucene.Examples", "src\Kentico.Xperience.Lucene.Examples\Kentico.Xperience.Lucene.Examples.csproj", "{61CA4DBA-2ECD-4F51-BF8A-140190070A8C}" +Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "src", "src", "{A94EE676-9ABE-44EA-BF9E-22004E9D54C9}" +EndProject +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DancingGoat", "src\Kentico.Xperience.Lucene.Sample\DancingGoat.csproj", "{F1CA0C86-BC78-491F-A57A-8CF91C2B514B}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution @@ -17,14 +19,18 @@ Global {52F11256-9F81-4FC1-A2EF-37B113A8F242}.Debug|Any CPU.Build.0 = Debug|Any CPU {52F11256-9F81-4FC1-A2EF-37B113A8F242}.Release|Any CPU.ActiveCfg = Release|Any CPU {52F11256-9F81-4FC1-A2EF-37B113A8F242}.Release|Any CPU.Build.0 = Release|Any CPU - {61CA4DBA-2ECD-4F51-BF8A-140190070A8C}.Debug|Any CPU.ActiveCfg = Debug|Any CPU - {61CA4DBA-2ECD-4F51-BF8A-140190070A8C}.Debug|Any CPU.Build.0 = Debug|Any CPU - {61CA4DBA-2ECD-4F51-BF8A-140190070A8C}.Release|Any CPU.ActiveCfg = Release|Any CPU - {61CA4DBA-2ECD-4F51-BF8A-140190070A8C}.Release|Any CPU.Build.0 = Release|Any CPU + {F1CA0C86-BC78-491F-A57A-8CF91C2B514B}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {F1CA0C86-BC78-491F-A57A-8CF91C2B514B}.Debug|Any CPU.Build.0 = Debug|Any CPU + {F1CA0C86-BC78-491F-A57A-8CF91C2B514B}.Release|Any CPU.ActiveCfg = Release|Any CPU + {F1CA0C86-BC78-491F-A57A-8CF91C2B514B}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE EndGlobalSection + GlobalSection(NestedProjects) = preSolution + {52F11256-9F81-4FC1-A2EF-37B113A8F242} = {A94EE676-9ABE-44EA-BF9E-22004E9D54C9} + {F1CA0C86-BC78-491F-A57A-8CF91C2B514B} = {A94EE676-9ABE-44EA-BF9E-22004E9D54C9} + EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {1B2A20BC-F57B-4AAE-B1C2-E4DC52EFCAC5} EndGlobalSection diff --git a/README.md b/README.md index 4cb9a79..2968310 100644 --- a/README.md +++ b/README.md @@ -8,6 +8,8 @@ Helps with indexing and searching data with Lucene .NET. > Current version is PRE RELEASE !!! +![](./images/dancing-goat-search-results.jpg) + ## Getting Started ### Prerequisites @@ -27,7 +29,7 @@ dotnet add package Kentico.Xperience.Lucene ```csharp builder.Services.AddKentico(); // ... other registrations -builder.Services.AddLucene(builder.Configuration, new[] +builder.Services.AddLucene(new[] { // use your own index definition new LuceneIndex( @@ -41,6 +43,10 @@ builder.Services.AddLucene(builder.Configuration, new[] ## Usage +- Review the "Search" functionality in the `src\Kentico.Xperience.Lucene.Sample` Dancing Goat project to see how to implement search. +- Read the Lucene.NET [introduction](https://lucenenet.apache.org/) or [full documentation](https://lucenenet.apache.org/docs/4.8.0-beta00016/) to explore the core library's APIs and functionality. +- Explore the [Lucene.NET source on GitHub](https://github.com/apache/lucenenet) + ## Contributing - .NET SDK >= 7.0.109 @@ -52,7 +58,7 @@ builder.Services.AddLucene(builder.Configuration, new[] - - -For Contributing please see [`CONTRIBUTING.md`](https://github.com/Kentico/.github/blob/main/CONTRIBUTING.md) for more information. +For Contributing please see [`CONTRIBUTING.md`](https://github.com/Kentico/.github/blob/main/CONTRIBUTING.md) for more information and follow the [`CODE_OF_CONDUCT`](https://github.com/Kentico/.github/blob/main/CODE_OF_CONDUCT.md). ## License diff --git a/images/dancing-goat-search-results.jpg b/images/dancing-goat-search-results.jpg new file mode 100644 index 0000000..446ec82 Binary files /dev/null and b/images/dancing-goat-search-results.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsLuceneIndexingStrategy.cs b/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsLuceneIndexingStrategy.cs deleted file mode 100644 index 346462b..0000000 --- a/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsLuceneIndexingStrategy.cs +++ /dev/null @@ -1,28 +0,0 @@ -using CMS.Core; -using CMS.DocumentEngine; -using Kentico.Xperience.Lucene.Examples.KBankNews; -using Kentico.Xperience.Lucene.Examples.Utils; - -namespace Kentico.Xperience.Lucene.Services.Implementations; - -public class KBankNewsLuceneIndexingStrategy : DefaultLuceneIndexingStrategy -{ - private static readonly string[] contentFields = new string[] { - nameof(KBankNewsSearchModel.Title), - nameof(KBankNewsSearchModel.Summary), - nameof(KBankNewsSearchModel.NewsText), - }; - public override Task OnIndexingProperty(TreeNode node, string propertyName, string usedColumn, object? foundValue) - { - object? result = foundValue; - if (propertyName == nameof(KBankNewsSearchModel.AllContent)) - { - var htmlSanitizer = Service.Resolve(); - result = string.Join(" ", contentFields - .Select(f => node.GetStringValue(f, "")) - .Select(s => htmlSanitizer.SanitizeHtmlFragment(s)) - ); - } - return Task.FromResult(result); - } -} diff --git a/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsSearchFacade.cs b/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsSearchFacade.cs deleted file mode 100644 index 4a2fee1..0000000 --- a/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsSearchFacade.cs +++ /dev/null @@ -1,77 +0,0 @@ -using Kentico.Xperience.Lucene.Models; -using Kentico.Xperience.Lucene.Services; -using Lucene.Net.Documents; -using Lucene.Net.Search; -using Lucene.Net.Util; -namespace Kentico.Xperience.Lucene.Examples.KBankNews; - -public class KBankNewsSearchFacade -{ - private const int PHRASE_SLOP = 3; - private const int MAX_RESULTS = 1000; - - private readonly ILuceneIndexService luceneIndexService; - - public KBankNewsSearchFacade(ILuceneIndexService luceneIndexService) => this.luceneIndexService = luceneIndexService; - public LuceneSearchResultModel Search(string searchText, int pageSize = 20, int page = 1) - { - var index = IndexStore.Instance.GetIndex(KBankNewsSearchModel.IndexName) ?? throw new Exception($"Index {KBankNewsSearchModel.IndexName} was not found!!!"); - pageSize = Math.Max(1, pageSize); - page = Math.Max(1, page); - int offset = pageSize * (page - 1); - int limit = pageSize; - - var queryBuilder = new QueryBuilder(index.Analyzer); - - var titlePhrase = queryBuilder.CreatePhraseQuery(nameof(KBankNewsSearchModel.Title), searchText, PHRASE_SLOP); - titlePhrase.Boost = 5; - var summaryPhrase = queryBuilder.CreatePhraseQuery(nameof(KBankNewsSearchModel.Summary), searchText, PHRASE_SLOP); - summaryPhrase.Boost = 2; - var contentPhrase = queryBuilder.CreatePhraseQuery(nameof(KBankNewsSearchModel.AllContent), searchText, PHRASE_SLOP); - contentPhrase.Boost = 1; - var titleShould = queryBuilder.CreateBooleanQuery(nameof(KBankNewsSearchModel.AllContent), searchText, Occur.SHOULD); - titleShould.Boost = 0.5f; - var contentShould = queryBuilder.CreateBooleanQuery(nameof(KBankNewsSearchModel.AllContent), searchText, Occur.SHOULD); - contentShould.Boost = 0.1f; - var query = new BooleanQuery - { - { titlePhrase, Occur.SHOULD }, - { summaryPhrase, Occur.SHOULD }, - { contentPhrase, Occur.SHOULD }, - { titleShould, Occur.SHOULD }, - { contentShould, Occur.SHOULD }, - }; - - var result = luceneIndexService.UseSearcher( - index, - (searcher) => - { - var topDocs = searcher.Search(query, MAX_RESULTS); - - - return new LuceneSearchResultModel() - { - Page = page, - PageSize = pageSize, - TotalPages = topDocs.TotalHits <= 0 ? 0 : ((topDocs.TotalHits - 1) / pageSize) + 1, - TotalHits = topDocs.TotalHits, - Hits = topDocs.ScoreDocs - .Skip(offset) - .Take(limit) - .Select(d => MapToResultItem(searcher.Doc(d.Doc))) - .ToList(), - }; - } - ); - - return result; - } - - private KBankNewsSearchResultItemModel MapToResultItem(Document doc) => new() - { - Title = doc.Get(nameof(KBankNewsSearchModel.Title)), - Summary = doc.Get(nameof(KBankNewsSearchModel.Summary)), - NewsType = doc.Get(nameof(KBankNewsSearchModel.NewsType)), - Url = doc.Get(nameof(KBankNewsSearchModel.Url)), - }; -} diff --git a/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsSearchModel.cs b/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsSearchModel.cs deleted file mode 100644 index 174f812..0000000 --- a/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsSearchModel.cs +++ /dev/null @@ -1,31 +0,0 @@ -using CMS.DocumentEngine; -using Kentico.Xperience.Lucene.Attributes; -using Kentico.Xperience.Lucene.Models; - -namespace Kentico.Xperience.Lucene.Examples.KBankNews; - - -// [IncludedPath("/news/%", ContentTypes = new string[] { NewsPage.CLASS_NAME })] -[IncludedPath("/%", ContentTypes = new string[] { NewsPage_CLASS_NAME })] -public class KBankNewsSearchModel : LuceneSearchModel -{ - public const string IndexName = "KBank-News"; - private const string NewsPage_CLASS_NAME = "Kentico.NewsPage"; - - [TextField(true)] - //[ Source(new string[] { nameof(NewsPage.Title), nameof(TreeNode.DocumentName) })] - [Source(new string[] { nameof(Title), nameof(TreeNode.DocumentName) })] - public string? Title { get; set; } - - [TextField(true)] - public string? Summary { get; set; } - - [TextField(false)] - public string? NewsText { get; set; } - - [TextField(false)] - public string? AllContent { get; set; } - - [StringField(true)] - public string? NewsType { get; set; } -} diff --git a/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsSearchResultItemModel.cs b/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsSearchResultItemModel.cs deleted file mode 100644 index 8e1cce7..0000000 --- a/src/Kentico.Xperience.Lucene.Examples/KBankNews/KBankNewsSearchResultItemModel.cs +++ /dev/null @@ -1,9 +0,0 @@ -namespace Kentico.Xperience.Lucene.Examples.KBankNews; - -public class KBankNewsSearchResultItemModel -{ - public string? Title { get; set; } - public string? Summary { get; set; } - public string? NewsType { get; set; } - public string? Url { get; set; } -} diff --git a/src/Kentico.Xperience.Lucene.Examples/KBankNews/README.md b/src/Kentico.Xperience.Lucene.Examples/KBankNews/README.md deleted file mode 100644 index ea3c9f4..0000000 --- a/src/Kentico.Xperience.Lucene.Examples/KBankNews/README.md +++ /dev/null @@ -1,19 +0,0 @@ -# KBankNews search example - - -## Register index - -Add following code to Program.cs - - -```cs - builder.Services.AddLucene(builder.Configuration, new[] - { - // ... other index definitions - new LuceneIndex( - typeof(KBankNewsSearchModel), - new StandardAnalyzer(Lucene.Net.Util.LuceneVersion.LUCENE_48), - KBankNewsSearchModel.IndexName - ), - }); -``` \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Examples/Kentico.Xperience.Lucene.Examples.csproj b/src/Kentico.Xperience.Lucene.Examples/Kentico.Xperience.Lucene.Examples.csproj deleted file mode 100644 index 82349bf..0000000 --- a/src/Kentico.Xperience.Lucene.Examples/Kentico.Xperience.Lucene.Examples.csproj +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/src/Kentico.Xperience.Lucene.Sample/.config/dotnet-tools.json b/src/Kentico.Xperience.Lucene.Sample/.config/dotnet-tools.json new file mode 100644 index 0000000..f93b35f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/.config/dotnet-tools.json @@ -0,0 +1,14 @@ +{ + "version": 1, + "isRoot": true, + "tools": { + "kentico.xperience.dbmanager": { + "version": "26.4.0", + "commands": [ + "kentico-xperience-dbmanager" + ] + } + } +} + + diff --git a/src/Kentico.Xperience.Lucene.Sample/AdminComponents/Apps/SampleDataGenerator/SampleDataGeneratorApplication.cs b/src/Kentico.Xperience.Lucene.Sample/AdminComponents/Apps/SampleDataGenerator/SampleDataGeneratorApplication.cs new file mode 100644 index 0000000..46add6f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/AdminComponents/Apps/SampleDataGenerator/SampleDataGeneratorApplication.cs @@ -0,0 +1,210 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +using CMS.Base; +using CMS.Core; +using CMS.DataEngine; +using CMS.EmailLibrary; +using CMS.Membership; + +using Kentico.Forms.Web.Mvc.Internal; +using Kentico.Xperience.Admin.Base; +using Kentico.Xperience.Admin.Base.UIPages; + +using DancingGoat.AdminComponents; +using DancingGoat.Helpers.Generator; + +[assembly: UIApplication(SampleDataGeneratorApplication.IDENTIFIER, typeof(SampleDataGeneratorApplication), "sample-data-generator", "Sample data generator", BaseApplicationCategories.CONFIGURATION, Icons.CogwheelSquare, TemplateNames.OVERVIEW)] + +namespace DancingGoat.AdminComponents +{ + /// + /// Represents an application for sample data generation. + /// + [UIPermission(SystemPermissions.VIEW)] + public class SampleDataGeneratorApplication : OverviewPageBase + { + /// + /// Unique identifier of application. + /// + public const string IDENTIFIER = "Kentico.Xperience.Application.SampleDataGenerator"; + + + private const string FORM_NAME = "DancingGoatCoreCoffeeSampleList"; + private const string FORM_FIELD_NAME = "Consent"; + private const string DATA_PROTECTION_SETTINGS_KEY = "DataProtectionSamplesEnabled"; + private readonly ISiteService siteService; + private readonly IFormBuilderConfigurationSerializer formBuilderConfigurationSerializer; + private readonly IEventLogService eventLogService; + + + public SampleDataGeneratorApplication(ISiteService siteService, + IFormBuilderConfigurationSerializer formBuilderConfigurationSerializer, + IEventLogService eventLogService) + { + this.siteService = siteService; + this.formBuilderConfigurationSerializer = formBuilderConfigurationSerializer; + this.eventLogService = eventLogService; + } + + + public override Task ConfigurePage() + { + var gdprCard = new OverviewCard + { + Headline = "Set up data protection (GDPR) demo", + Actions = new[] + { + new Kentico.Xperience.Admin.Base.Action(ActionType.Command) + { + Label = "Generate", + Parameter = nameof(GenerateGdprSampleData) + } + }, + Components = new List() + { + new StringContentCardComponent + { + Content = @"Generates data and enables demonstration of giving consents, personal data portability, right to access, and right to be forgotten features. +Once enabled, the demo functionality cannot be disabled. Use on demo instances only." + } + } + }; + + var emailStatisticsCard = new OverviewCard + { + Headline = "Email statistics sample data", + Actions = new[] + { + new Kentico.Xperience.Admin.Base.Action(ActionType.Command) + { + Label = "Generate sample data", + Parameter = nameof(GenerateEmailStatisticsSampleData) + }, + new Kentico.Xperience.Admin.Base.Action(ActionType.Command) + { + Label = "Recalculate statistics", + Parameter = nameof(RecalculateStatistics) + } + }, + Components = new List() + { + new StringContentCardComponent + { + Content = "Generates emails and a recipient list containing contacts, together with realistically looking email statistics. To immediately see the statistics in the Emails application, select the 'Generate sample data' button and then 'Recalculate statistics'." + } + } + }; + PageConfiguration.CardGroups.AddCardGroup().AddCard(gdprCard); + PageConfiguration.CardGroups.AddCardGroup().AddCard(emailStatisticsCard); + + PageConfiguration.Caption = "Generator"; + + return base.ConfigurePage(); + } + + + [PageCommand(Permission = SystemPermissions.VIEW)] + public Task GenerateGdprSampleData() + { + try + { + var site = siteService.CurrentSite; + + new TrackingConsentGenerator(site).Generate(); + new FormConsentGenerator(site, formBuilderConfigurationSerializer).Generate(FORM_NAME, FORM_FIELD_NAME); + new FormContactGroupGenerator().Generate(); + + EnableDataProtectionSamples(); + } + catch (Exception ex) + { + eventLogService.LogException("SampleDataGenerator", "GDPR", ex); + + return Task.FromResult(Response() + .AddErrorMessage("GDPR sample data generator failed. See event log for more details")); + } + + return Task.FromResult(Response() + .AddSuccessMessage("Generating data finished successfully.")); + } + + + [PageCommand(Permission = SystemPermissions.VIEW)] + public async Task GenerateEmailStatisticsSampleData() + { + try + { + await new EmailLibrarySampleGenerator(siteService.CurrentSite).GenerateDancingGoatMailSample(); + + return Response() + .AddSuccessMessage("Email statistics sample data generated successfully."); + } + catch (Exception ex) + { + eventLogService.LogException("SampleDataGenerator", "EmailStatistics", ex); + + return Response() + .AddErrorMessage("Email statistics sample data generator failed. See event log for more details"); + } + } + + + [PageCommand(Permission = SystemPermissions.VIEW)] + public async Task RecalculateStatistics() + { + try + { + var configurations = EmailConfigurationInfo.Provider.Get() + .WhereContains(nameof(EmailConfigurationInfo.EmailConfigurationName), EmailLibrarySampleGenerator.GeneratedInfoCodeNameSuffix) + .ToArray(); + + foreach (var configuration in configurations) + { + await ConnectionHelper.ExecuteNonQueryAsync( + $"{EmailStatisticsInfo.TYPEINFO.ObjectClassName}.RecalculateEmailStatistics", + CancellationToken.None, + new QueryDataParameters { new("@EmailConfigurationID", configuration.EmailConfigurationID) }); + } + + ProviderHelper.ClearHashtables(EmailStatisticsInfo.OBJECT_TYPE, true); + + return Response() + .AddSuccessMessage("Email statistics have been recalculated successfully."); + } + catch (Exception ex) + { + eventLogService.LogException("SampleDataGenerator", "EmailStatisticsRecalculation", ex); + + return Response() + .AddErrorMessage("Email statistics recalculation failed. See event log for more details"); + } + } + + + private void EnableDataProtectionSamples() + { + var dataProtectionSamplesEnabledSettingsKey = SettingsKeyInfoProvider.GetSettingsKeyInfo(DATA_PROTECTION_SETTINGS_KEY); + if (dataProtectionSamplesEnabledSettingsKey?.KeyValue.ToBoolean(false) ?? false) + { + return; + } + + var keyInfo = new SettingsKeyInfo + { + KeyName = DATA_PROTECTION_SETTINGS_KEY, + KeyDisplayName = DATA_PROTECTION_SETTINGS_KEY, + KeyType = "boolean", + KeyValue = "True", + KeyDefaultValue = "False", + KeyIsGlobal = true, + KeyIsHidden = true + }; + + SettingsKeyInfoProvider.SetSettingsKeyInfo(keyInfo); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ComponentIdentifiers.cs b/src/Kentico.Xperience.Lucene.Sample/Components/ComponentIdentifiers.cs new file mode 100644 index 0000000..a413465 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ComponentIdentifiers.cs @@ -0,0 +1,25 @@ +namespace DancingGoat +{ + /// + /// Encapsulated identifiers of components. + /// + public static class ComponentIdentifiers + { + // Widgets + public const string CTA_BUTTON_WIDGET = "DancingGoat.General.CTAButtonWidget"; + public const string TESTIMONIAL_WIDGET = "DancingGoat.LandingPage.TestimonialWidget"; + + // Sections + public const string SINGLE_COLUMN_SECTION = "DancingGoat.SingleColumnSection"; + public const string TWO_COLUMN_SECTION = "DancingGoat.TwoColumnSection"; + public const string THREE_COLUMN_SECTION = "DancingGoat.ThreeColumnSection"; + public const string SECTION_75_25 = "DancingGoat.Section_75_25"; + public const string SECTION_25_75 = "DancingGoat.Section_25_75"; + + // Page templates + public const string LANDING_PAGE_SINGLE_COLUMN_TEMPLATE = "DancingGoat.LandingPageSingleColumn"; + public const string ARTICLE_TEMPLATE = "DancingGoat.Article"; + public const string ARTICLE_WITH_SIDEBAR_TEMPLATE = "DancingGoat.ArticleWithSidebar"; + public const string SUBSCRIPTION_TEMPLATE = "DancingGoat.Subscription"; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/FormBuilderComponentRegister.cs b/src/Kentico.Xperience.Lucene.Sample/Components/FormBuilderComponentRegister.cs new file mode 100644 index 0000000..24f4781 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/FormBuilderComponentRegister.cs @@ -0,0 +1,5 @@ +using DancingGoat.Components.FormSections.TitledSection; + +using Kentico.Forms.Web.Mvc; + +[assembly: RegisterFormSection("DancingGoat.TitledSection", "Section with title", "~/Components/FormSections/TitledSection/_TitledSection.cshtml", Description = "Single-column section with one zone and an editable title", IconClass = "icon-rectangle-a", PropertiesType = typeof(TitledSectionProperties))] \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/FormSections/TitledSection/TitledSectionProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/FormSections/TitledSection/TitledSectionProperties.cs new file mode 100644 index 0000000..760416f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/FormSections/TitledSection/TitledSectionProperties.cs @@ -0,0 +1,12 @@ +using Kentico.Forms.Web.Mvc; + +using Kentico.Xperience.Admin.Base.FormAnnotations; + +namespace DancingGoat.Components.FormSections.TitledSection +{ + public class TitledSectionProperties : IFormSectionProperties + { + [RichTextEditorComponent(Label = "Title")] + public string Title { get; set; } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/FormSections/TitledSection/_TitledSection.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/FormSections/TitledSection/_TitledSection.cshtml new file mode 100644 index 0000000..78a7a37 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/FormSections/TitledSection/_TitledSection.cshtml @@ -0,0 +1,18 @@ +@using Kentico.Forms.Web.Mvc +@using DancingGoat.Components.FormSections.TitledSection + + +@model FormSectionViewModel + +@if (!string.IsNullOrEmpty(Model?.Properties?.Title)) +{ +
+ @Html.Raw(Html.Kentico().ResolveRichText(Model.Properties.Title)) +
+} + +
+
+ @await Html.Kentico().FormZoneAsync() +
+
diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/ColorPickerEditor/ColorPickerEditorViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/ColorPickerEditor/ColorPickerEditorViewModel.cs new file mode 100644 index 0000000..8293a82 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/ColorPickerEditor/ColorPickerEditorViewModel.cs @@ -0,0 +1,13 @@ +namespace DancingGoat.InlineEditors +{ + /// + /// View model for Color picker editor. + /// + public sealed class ColorPickerEditorViewModel : InlineEditorViewModel + { + /// + /// Color CSS class. + /// + public string ColorCssClass { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/ColorPickerEditor/_ColorPickerEditor.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/ColorPickerEditor/_ColorPickerEditor.cshtml new file mode 100644 index 0000000..bf7a665 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/ColorPickerEditor/_ColorPickerEditor.cshtml @@ -0,0 +1,24 @@ +@model DancingGoat.InlineEditors.ColorPickerEditorViewModel + +@using (Html.Kentico().BeginInlineEditor("color-picker-editor", Model.PropertyName, new { @class = "color-picker-editor" })) +{ +
+
    +
  • + +
  • +
  • + +
  • +
  • + +
  • +
+
+} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/InlineEditorViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/InlineEditorViewModel.cs new file mode 100644 index 0000000..e12fe37 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/InlineEditorViewModel.cs @@ -0,0 +1,13 @@ +namespace DancingGoat.InlineEditors +{ + /// + /// Base class for inline editor view models. + /// + public abstract class InlineEditorViewModel + { + /// + /// Name of the widget property to edit. + /// + public string PropertyName { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/SpinnerEditor/SpinnerEditorViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/SpinnerEditor/SpinnerEditorViewModel.cs new file mode 100644 index 0000000..bfef253 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/SpinnerEditor/SpinnerEditorViewModel.cs @@ -0,0 +1,13 @@ +namespace DancingGoat.InlineEditors +{ + /// + /// View model for Spinner editor. + /// + public sealed class SpinnerEditorViewModel : InlineEditorViewModel + { + /// + /// Number of items to show. + /// + public int Count { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/SpinnerEditor/_SpinnerEditor.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/SpinnerEditor/_SpinnerEditor.cshtml new file mode 100644 index 0000000..d4268c0 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/SpinnerEditor/_SpinnerEditor.cshtml @@ -0,0 +1,12 @@ +@model DancingGoat.InlineEditors.SpinnerEditorViewModel + +@using (Html.Kentico().BeginInlineEditor("spinner-editor", Model.PropertyName, new { @class = "spinner-editor" })) +{ +
+
    +
  • +
  • +
  • +
+
+} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/TextEditor/TextEditorViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/TextEditor/TextEditorViewModel.cs new file mode 100644 index 0000000..bafe5d9 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/TextEditor/TextEditorViewModel.cs @@ -0,0 +1,19 @@ +namespace DancingGoat.InlineEditors +{ + /// + /// View model for Text editor. + /// + public sealed class TextEditorViewModel : InlineEditorViewModel + { + /// + /// Editor text. + /// + public string Text { get; set; } + + + /// + /// Placeholder text. + /// + public string PlaceholderText { get; set; } = "Type your text"; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/TextEditor/_TextEditor.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/TextEditor/_TextEditor.cshtml new file mode 100644 index 0000000..0c8747b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/InlineEditors/TextEditor/_TextEditor.cshtml @@ -0,0 +1,12 @@ +@model DancingGoat.InlineEditors.TextEditorViewModel + +@using (Html.Kentico().BeginInlineEditor("text-editor", Model.PropertyName, + new + { + @class = "text-editor", + contenteditable = "true", + data_placeholder_text = Model.PlaceholderText + })) +{ + @Model.Text +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/PageBuilderComponentRegister.cs b/src/Kentico.Xperience.Lucene.Sample/Components/PageBuilderComponentRegister.cs new file mode 100644 index 0000000..8dcfc1e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/PageBuilderComponentRegister.cs @@ -0,0 +1,24 @@ +using DancingGoat; +using DancingGoat.PageTemplates; +using DancingGoat.Sections; +using DancingGoat.Widgets; + +using Kentico.PageBuilder.Web.Mvc; +using Kentico.PageBuilder.Web.Mvc.PageTemplates; + +// Widgets +[assembly: RegisterWidget(ComponentIdentifiers.TESTIMONIAL_WIDGET, "Testimonial", typeof(TestimonialWidgetProperties), "~/Components/Widgets/TestimonialWidget/_DancingGoat_LandingPage_TestimonialWidget.cshtml", Description = "Displays a quotation with its author.", IconClass = "icon-right-double-quotation-mark")] +[assembly: RegisterWidget(ComponentIdentifiers.CTA_BUTTON_WIDGET, "CTA button", typeof(CTAButtonWidgetProperties), "~/Components/Widgets/CTAButton/_DancingGoat_General_CTAButtonWidget.cshtml", Description = "Call to action button with configurable target page.", IconClass = "icon-rectangle-a")] + +// Sections +[assembly: RegisterSection(ComponentIdentifiers.SINGLE_COLUMN_SECTION, "1 column", typeof(ThemeSectionProperties), "~/Components/Sections/_DancingGoat_SingleColumnSection.cshtml", Description = "Single-column section with one full-width zone.", IconClass = "icon-square")] +[assembly: RegisterSection(ComponentIdentifiers.TWO_COLUMN_SECTION, "2 columns - 50/50", typeof(ThemeSectionProperties), "~/Components/Sections/_DancingGoat_TwoColumnSection.cshtml", Description = "Two-column section with zones layout 50% + 50%.", IconClass = "icon-l-cols-2")] +[assembly: RegisterSection(ComponentIdentifiers.THREE_COLUMN_SECTION, "3 columns - 33/33/33", typeof(ThreeColumnSectionProperties), "~/Components/Sections/ThreeColumnSection/_DancingGoat_ThreeColumnSection.cshtml", Description = "Three-column section with zones layout 33% + 33% + 33%.", IconClass = "icon-l-cols-3")] +[assembly: RegisterSection(ComponentIdentifiers.SECTION_75_25, "2 columns - 75/25", typeof(ThemeSectionProperties), "~/Components/Sections/_DancingGoat_Section_75_25.cshtml", Description = "Two-column section with zones layout 75% + 25%.", IconClass = "icon-l-cols-70-30")] +[assembly: RegisterSection(ComponentIdentifiers.SECTION_25_75, "2 columns - 25/75", typeof(ThemeSectionProperties), "~/Components/Sections/_DancingGoat_Section_25_75.cshtml", Description = "Two-column section with zones layout 25% + 75%.", IconClass = "icon-l-cols-30-70")] + +// Page templates +[assembly: RegisterPageTemplate(ComponentIdentifiers.LANDING_PAGE_SINGLE_COLUMN_TEMPLATE, "Single column landing page", propertiesType: typeof(LandingPageSingleColumnProperties), customViewName: "~/PageTemplates/LandingPage/_DancingGoat_LandingPageSingleColumn.cshtml", Description = "A default single column page template with two sections differentiated by a background color.", IconClass = "xp-l-header-text")] +[assembly: RegisterPageTemplate(ComponentIdentifiers.ARTICLE_TEMPLATE, "Article detail", customViewName: "~/PageTemplates/Article/_Article.cshtml", Description = "Displays an article detail with related articles underneath.", IconClass = "xp-l-text")] +[assembly: RegisterPageTemplate(ComponentIdentifiers.ARTICLE_WITH_SIDEBAR_TEMPLATE, "Article detail with sidebar", customViewName: "~/PageTemplates/Article/_ArticleWithSidebar.cshtml", Description = "Displays an article detail with sidebar.", IconClass = "xp-l-text-col")] +[assembly: RegisterPageTemplate(ComponentIdentifiers.SUBSCRIPTION_TEMPLATE, "After (un)subscription confirmation", customViewName: "~/PageTemplates/Subscription/_Subscription.cshtml", Description = "Displays a confirmation of email (un)subscription", IconClass = "xp-l-text-col")] diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Personalization/ConditionTypes/IsInContactGroup/IsInContactGroupConditionType.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Personalization/ConditionTypes/IsInContactGroup/IsInContactGroupConditionType.cs new file mode 100644 index 0000000..9fbf186 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Personalization/ConditionTypes/IsInContactGroup/IsInContactGroupConditionType.cs @@ -0,0 +1,49 @@ +using System.Collections.Generic; +using System.Linq; + +using CMS.ContactManagement; +using CMS.DataEngine; + +using DancingGoat.Personalization; + +using Kentico.PageBuilder.Web.Mvc.Personalization; +using Kentico.Xperience.Admin.Base.FormAnnotations; +using Kentico.Xperience.Admin.Base.Forms; + +[assembly: RegisterPersonalizationConditionType("DancingGoat.Personalization.IsInContactGroup", typeof(IsInContactGroupConditionType), "Is in contact group", Description = "Evaluates if the current contact is in one of the contact groups.", IconClass = "icon-app-contact-groups", Hint = "Display to visitors who match at least one of the selected contact groups:")] + +namespace DancingGoat.Personalization +{ + /// + /// Personalization condition type based on contact group. + /// + public class IsInContactGroupConditionType : ConditionType + { + /// + /// Selected contact group code names. + /// + [ObjectSelectorComponent(PredefinedObjectType.CONTACTGROUP, Label = "Contact groups", Order = 0, MaximumItems = 0)] + public IEnumerable SelectedContactGroups { get; set; } + + + /// + /// Evaluate condition type. + /// + /// Returns true if implemented condition is met. + public override bool Evaluate() + { + var contact = ContactManagementContext.GetCurrentContact(); + if (contact == null) + { + return false; + } + + if (SelectedContactGroups == null || !SelectedContactGroups.Any()) + { + return contact.ContactGroups.Count == 0; + } + + return contact.IsInAnyContactGroup(SelectedContactGroups.Select(c => c.ObjectCodeName).ToArray()); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ThemeSectionProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ThemeSectionProperties.cs new file mode 100644 index 0000000..2fa7bb6 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ThemeSectionProperties.cs @@ -0,0 +1,17 @@ +using Kentico.PageBuilder.Web.Mvc; +using Kentico.Xperience.Admin.Base.FormAnnotations; + +namespace DancingGoat.Sections +{ + /// + /// Section properties to define the theme. + /// + public class ThemeSectionProperties : ISectionProperties + { + /// + /// Theme of the section. + /// + [DropDownComponent(Label = "Color scheme", Order = 1, Options = ";None\nsection-white;Flat white\nsection-cappuccino;Cappuccino")] + public string Theme { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ThreeColumnSection/ThreeColumnSectionProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ThreeColumnSection/ThreeColumnSectionProperties.cs new file mode 100644 index 0000000..99dc9b6 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ThreeColumnSection/ThreeColumnSectionProperties.cs @@ -0,0 +1,16 @@ +using Kentico.Xperience.Admin.Base.FormAnnotations; + +namespace DancingGoat.Sections +{ + /// + /// Section properties for the 'Three column section'. + /// + public class ThreeColumnSectionProperties : ThemeSectionProperties + { + /// + /// Title of the section. + /// + [TextInputComponent(Label = "Title", Order = 1)] + public string Title { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ThreeColumnSection/_DancingGoat_ThreeColumnSection.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ThreeColumnSection/_DancingGoat_ThreeColumnSection.cshtml new file mode 100644 index 0000000..400a786 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ThreeColumnSection/_DancingGoat_ThreeColumnSection.cshtml @@ -0,0 +1,23 @@ +@using DancingGoat.Sections + +@model ComponentViewModel + +@if (!string.IsNullOrWhiteSpace(Model.Properties.Title)) +{ +
+
+

@Model.Properties.Title

+
+
+} +
+
+ +
+
+ +
+
+ +
+
diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ZoneRestrictions.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ZoneRestrictions.cs new file mode 100644 index 0000000..770bac6 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/ZoneRestrictions.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using System.Linq; + +using Kentico.PageBuilder.Web.Mvc; + +using DancingGoat.Widgets; + +namespace DancingGoat.Sections +{ + /// + /// Provides filter methods to restrict the list of allowed widgets for widget zones. + /// + public static class ZoneRestrictions + { + /// + /// The main content widget zone name. + /// + public const string MAIN_ZONE_NAME = "main"; + + /// + /// The side panel widget zone name. + /// + public const string SIDE_PANEL_ZONE_NAME = "side-panel"; + + + /// + /// Gets list of widget identifiers allowed for narrow widget zones (25%, 33%, 50%). + /// + public static IEnumerable GetNarrowZoneRestrictions() + { + var restrictedWidgets = new List { + BannerWidgetViewComponent.IDENTIFIER, + HeroImageWidgetViewComponent.IDENTIFIER, + ArticlesWidgetViewComponent.IDENTIFIER + }; + + return GetWidgetsIdentifiers() + .Where(id => !restrictedWidgets.Contains(id)); + } + + + /// + /// Gets list of widget identifiers allowed for wide widget zones (75%). + /// + public static IEnumerable GetWideZoneRestrictions() + { + var restrictedWidgets = new List { + CafeCardWidgetViewComponent.IDENTIFIER, + CardWidgetViewComponent.IDENTIFIER, + }; + + return GetWidgetsIdentifiers() + .Where(id => !restrictedWidgets.Contains(id)); + } + + + private static IEnumerable GetWidgetsIdentifiers() + { + return new ComponentDefinitionProvider() + .GetAll() + .Select(definition => definition.Identifier); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_Section_25_75.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_Section_25_75.cshtml new file mode 100644 index 0000000..3f73de3 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_Section_25_75.cshtml @@ -0,0 +1,14 @@ +@using DancingGoat.Sections + +@model Kentico.PageBuilder.Web.Mvc.ComponentViewModel + +
+
+ +
+
+ +
+
diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_Section_75_25.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_Section_75_25.cshtml new file mode 100644 index 0000000..0204c12 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_Section_75_25.cshtml @@ -0,0 +1,16 @@ +@using DancingGoat.Sections + +@model Kentico.PageBuilder.Web.Mvc.ComponentViewModel + +
+
+ +
+
+ +
+
+ + diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_SingleColumnSection.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_SingleColumnSection.cshtml new file mode 100644 index 0000000..d47fd34 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_SingleColumnSection.cshtml @@ -0,0 +1,9 @@ +@using DancingGoat.Sections + +@model Kentico.PageBuilder.Web.Mvc.ComponentViewModel + +
+
+ +
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_TwoColumnSection.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_TwoColumnSection.cshtml new file mode 100644 index 0000000..bd7c0a9 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Sections/_DancingGoat_TwoColumnSection.cshtml @@ -0,0 +1,12 @@ +@using DancingGoat.Sections + +@model Kentico.PageBuilder.Web.Mvc.ComponentViewModel + +
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/CompanyAddress/CompanyAddressViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/CompanyAddress/CompanyAddressViewComponent.cs new file mode 100644 index 0000000..1d70861 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/CompanyAddress/CompanyAddressViewComponent.cs @@ -0,0 +1,30 @@ +using DancingGoat.Models; + +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Localization; + +namespace DancingGoat.ViewComponents +{ + public class CompanyAddressViewComponent : ViewComponent + { + private readonly ContactRepository contactRepository; + private readonly IStringLocalizer localizer; + + + public CompanyAddressViewComponent(ContactRepository contactRepository, + IStringLocalizer localizer) + { + this.contactRepository = contactRepository; + this.localizer = localizer; + } + + + public IViewComponentResult Invoke() + { + var contact = contactRepository.GetCompanyContact(); + var model = ContactViewModel.GetViewModel(contact, localizer); + + return View("~/Components/ViewComponents/CompanyAddress/Default.cshtml", model); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/CompanyAddress/Default.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/CompanyAddress/Default.cshtml new file mode 100644 index 0000000..07c6181 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/CompanyAddress/Default.cshtml @@ -0,0 +1,11 @@ +@using System.Web + +@model DancingGoat.Models.ContactViewModel + +
+ @Model.Phone
+ @HttpUtility.HtmlEncode(Model.Email)
+ @Model.Name

+ @Model.Street @Model.City,
+ @Model.ZIP, @Model.Country +
diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/MediaGallery/Default.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/MediaGallery/Default.cshtml new file mode 100644 index 0000000..f8908c0 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/MediaGallery/Default.cshtml @@ -0,0 +1,19 @@ +@model DancingGoat.Models.MediaGalleryViewModel +@{ + int index = 0; +} + + \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/MediaGallery/MediaGalleryViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/MediaGallery/MediaGalleryViewComponent.cs new file mode 100644 index 0000000..7f510b7 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/MediaGallery/MediaGalleryViewComponent.cs @@ -0,0 +1,42 @@ +using System.Linq; + +using DancingGoat.Models; + +using Kentico.Content.Web.Mvc; + +using Microsoft.AspNetCore.Mvc; + +namespace DancingGoat.ViewComponents +{ + public class MediaGalleryViewComponent : ViewComponent + { + private const string MEDIA_LIBRARY_NAME = "CoffeeGallery"; + + private readonly MediaFileRepository mediaFileRepository; + private readonly IMediaFileUrlRetriever fileUrlRetriever; + + + public MediaGalleryViewComponent(MediaFileRepository mediaFileRepository, IMediaFileUrlRetriever fileUrlRetriever) + { + this.mediaFileRepository = mediaFileRepository; + this.fileUrlRetriever = fileUrlRetriever; + } + + + public IViewComponentResult Invoke() + { + var mediaLibary = mediaFileRepository.GetByName(MEDIA_LIBRARY_NAME); + + if (mediaLibary == null) + { + return Content(string.Empty); + } + + var mediaFiles = mediaFileRepository.GetMediaFiles(MEDIA_LIBRARY_NAME); + var mediaGallery = new MediaGalleryViewModel(mediaLibary.LibraryDisplayName); + mediaGallery.MediaFiles = mediaFiles.Select(file => MediaFileViewModel.GetViewModel(file, fileUrlRetriever)); + + return View("~/Components/ViewComponents/MediaGallery/Default.cshtml", mediaGallery); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/NavigationMenu/NavigationMenu.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/NavigationMenu/NavigationMenu.cshtml new file mode 100644 index 0000000..41bfb6d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/NavigationMenu/NavigationMenu.cshtml @@ -0,0 +1,12 @@ +@using DancingGoat.Models + +@model IEnumerable + + \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/NavigationMenu/NavigationMenuViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/NavigationMenu/NavigationMenuViewComponent.cs new file mode 100644 index 0000000..1e16f4e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/NavigationMenu/NavigationMenuViewComponent.cs @@ -0,0 +1,27 @@ +using System.Threading.Tasks; + +using DancingGoat.Models; + +using Microsoft.AspNetCore.Mvc; + +namespace DancingGoat.Controllers +{ + public class NavigationMenuViewComponent : ViewComponent + { + private readonly NavigationService navigationService; + + + public NavigationMenuViewComponent(NavigationService navigationService) + { + this.navigationService = navigationService; + } + + + public async Task InvokeAsync() + { + var navigationItems = await navigationService.GetNavigationItems(); + + return View($"~/Components/ViewComponents/NavigationMenu/NavigationMenu.cshtml", navigationItems); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/SocialLinks/Default.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/SocialLinks/Default.cshtml new file mode 100644 index 0000000..19693c0 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/SocialLinks/Default.cshtml @@ -0,0 +1,10 @@ +@model IEnumerable + + \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/SocialLinks/SocialLinksViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/SocialLinks/SocialLinksViewComponent.cs new file mode 100644 index 0000000..0c1fdb2 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/SocialLinks/SocialLinksViewComponent.cs @@ -0,0 +1,33 @@ +using System.Collections.Generic; +using System.Threading.Tasks; + +using DancingGoat.Models; + +using Microsoft.AspNetCore.Mvc; + +namespace DancingGoat.ViewComponents +{ + public class SocialLinksViewComponent : ViewComponent + { + private readonly SocialLinkRepository socialLinkRepository; + + public SocialLinksViewComponent(SocialLinkRepository socialLinkRepository) + { + this.socialLinkRepository = socialLinkRepository; + } + + + public async Task InvokeAsync() + { + var socialLinks = await socialLinkRepository.GetSocialLinks(HttpContext.RequestAborted); + var socialLinksModel = new List(); + + foreach (var link in socialLinks) + { + socialLinksModel.Add(SocialLinkViewModel.GetViewModel(link)); + } + + return View("~/Components/ViewComponents/SocialLinks/Default.cshtml", socialLinksModel); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/TrackingConsent/TrackingConsentViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/TrackingConsent/TrackingConsentViewComponent.cs new file mode 100644 index 0000000..b84fcbd --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/TrackingConsent/TrackingConsentViewComponent.cs @@ -0,0 +1,46 @@ +using CMS.DataProtection; + +using DancingGoat.Helpers.Generator; +using DancingGoat.Models; + +using Microsoft.AspNetCore.Mvc; + +namespace DancingGoat.ViewComponents +{ + public class TrackingConsentViewComponent : ViewComponent + { + private readonly IConsentInfoProvider consentInfoProvider; + private readonly IConsentAgreementService consentAgreementService; + + + public TrackingConsentViewComponent(IConsentInfoProvider consentInfoProvider, IConsentAgreementService consentAgreementService) + { + this.consentInfoProvider = consentInfoProvider; + this.consentAgreementService = consentAgreementService; + } + + + public IViewComponentResult Invoke() + { + var consent = consentInfoProvider.Get(TrackingConsentGenerator.CONSENT_NAME); + + if (consent != null) + { + var consentModel = new ConsentViewModel + { + ConsentShortText = consent.GetConsentText(System.Threading.Thread.CurrentThread.CurrentUICulture.Name).ShortText + }; + + var contact = CMS.ContactManagement.ContactManagementContext.CurrentContact; + if ((contact != null) && consentAgreementService.IsAgreed(contact, consent)) + { + consentModel.IsConsentAgreed = true; + } + + return View("~/Components/ViewComponents/TrackingConsent/_TrackingConsent.cshtml", consentModel); + } + + return Content(string.Empty); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/TrackingConsent/_TrackingConsent.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/TrackingConsent/_TrackingConsent.cshtml new file mode 100644 index 0000000..09306fd --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/ViewComponents/TrackingConsent/_TrackingConsent.cshtml @@ -0,0 +1,42 @@ +@using CMS.DocumentEngine; + +@model DancingGoat.Models.ConsentViewModel + +@inject IPageDataContextRetriever pageDataContextRetriever + +@{ + string GetReturnUrl() + { + // Get URL for pages handled by content tree-based router, otherwise get path from the context + return pageDataContextRetriever.TryRetrieve(out var _) ? + Url.Kentico().CurrentPageUrl() : + (Context.Request.PathBase + Context.Request.Path).Value; + } +} + + diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/ArticlesWidgetProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/ArticlesWidgetProperties.cs new file mode 100644 index 0000000..8cbc45c --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/ArticlesWidgetProperties.cs @@ -0,0 +1,15 @@ +using Kentico.PageBuilder.Web.Mvc; + +namespace DancingGoat.Widgets +{ + /// + /// Properties for Articles widget. + /// + public class ArticlesWidgetProperties : IWidgetProperties + { + /// + /// Number of articles to show. + /// + public int Count { get; set; } = 5; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/ArticlesWidgetViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/ArticlesWidgetViewComponent.cs new file mode 100644 index 0000000..231544c --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/ArticlesWidgetViewComponent.cs @@ -0,0 +1,72 @@ +using System; +using System.Collections.Generic; +using System.Threading.Tasks; + +using DancingGoat.Models; +using DancingGoat.Widgets; + +using Kentico.Content.Web.Mvc; +using Kentico.PageBuilder.Web.Mvc; + +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ViewComponents; + +[assembly: RegisterWidget(ArticlesWidgetViewComponent.IDENTIFIER, typeof(ArticlesWidgetViewComponent), "Latest articles", typeof(ArticlesWidgetProperties), Description = "Displays the latest articles from the Dancing Goat sample site.", IconClass = "icon-l-list-article", AllowCache = true)] + +namespace DancingGoat.Widgets +{ + /// + /// Controller for article widget. + /// + public class ArticlesWidgetViewComponent : ViewComponent + { + /// + /// Widget identifier. + /// + public const string IDENTIFIER = "DancingGoat.HomePage.ArticlesWidget"; + + private static string[] dependency_keys = new[] { "node|dancinggoatcore|/articles|childnodes" }; + + private readonly ArticleRepository repository; + private readonly IPageUrlRetriever pageUrlRetriever; + + + /// + /// Creates an instance of class. + /// /// + /// Article repository. + /// Retriever for page URLs. + /// Media file URL helper. + public ArticlesWidgetViewComponent(ArticleRepository repository, IPageUrlRetriever pageUrlRetriever) + { + this.repository = repository; + this.pageUrlRetriever = pageUrlRetriever; + } + + + /// + /// Returns the model used by widgets' view. + /// + /// Widget properties. + public async Task InvokeAsync(ComponentViewModel viewModel) + { + if (viewModel is null) + { + throw new ArgumentNullException(nameof(viewModel)); + } + + viewModel.CacheDependencies.CacheKeys = dependency_keys; + + var articles = await repository.GetArticles(ContentItemIdentifiers.ARTICLES, viewModel.Properties.Count); + + var articlesModel = new List(); + + foreach (var article in articles) + { + articlesModel.Add(ArticleViewModel.GetViewModel(article, pageUrlRetriever)); + } + + return View("~/Components/Widgets/Articles/_ArticlesWidget.cshtml", new ArticlesWidgetViewModel { Articles = articlesModel, Count = viewModel.Properties.Count }); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/ArticlesWidgetViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/ArticlesWidgetViewModel.cs new file mode 100644 index 0000000..0f9e3a1 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/ArticlesWidgetViewModel.cs @@ -0,0 +1,23 @@ +using System.Collections.Generic; + +using DancingGoat.Models; + +namespace DancingGoat.Widgets +{ + /// + /// View model for Articles widget. + /// + public class ArticlesWidgetViewModel + { + /// + /// Latest articles to display. + /// + public IEnumerable Articles { get; set; } + + + /// + /// Number of articles to show. + /// + public int Count { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/_ArticlesWidget.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/_ArticlesWidget.cshtml new file mode 100644 index 0000000..0517933 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/Articles/_ArticlesWidget.cshtml @@ -0,0 +1,104 @@ +@using DancingGoat.InlineEditors +@using DancingGoat.Widgets + +@model ArticlesWidgetViewModel + +@{ + var i = 1; +} + +@if (Context.Kentico().PageBuilder().EditMode) +{ + +} + +
+
+
+

@HtmlLocalizer["Latest article"]

+
+ @{ var first = true; } + @foreach (var article in Model.Articles) + { + if (first) + { + first = false; +
+
+
+ @if (article.TeaserPath != null) + { + + @article.TeaserShortDescription + + } +
+
+
+ @article.PublicationDate.ToString("m") +
+
+

+ @article.Title +

+

+ @article.Summary +

+
+
+
+
+ } + else + { + var lastInRow = ""; + if (i % 4 == 0) + { + lastInRow = "last"; + } + +
+
+ @if (article.TeaserPath != null) + { + + @article.TeaserShortDescription + + } +
+
+ @article.PublicationDate.ToString("m") +
+
+

+ @article.Title +

+

+ @article.Summary +

+
+
+
+
+ if (i % 4 == 0) + { +
+ } + i++; + } + } +
+ + +
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/BannerWidgetProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/BannerWidgetProperties.cs new file mode 100644 index 0000000..dae22fd --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/BannerWidgetProperties.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; + +using CMS.DocumentEngine; + +using Kentico.PageBuilder.Web.Mvc; +using Kentico.Xperience.Admin.Base.FormAnnotations; +using Kentico.Xperience.Admin.Content.FormAnnotations; + +namespace DancingGoat.Widgets +{ + /// + /// Banner widget properties. + /// + public class BannerWidgetProperties : IWidgetProperties + { + /// + /// Image to be displayed. + /// + [ContentItemSelectorComponent("DancingGoatCore.Media", Label = "Background image", Order = 1)] + public IEnumerable Image { get; set; } = new List(); + + + /// + /// Text to be displayed. + /// + public string Text { get; set; } + + + /// + /// Gets or sets URL to which a visitor is redirected after clicking on the . + /// + [UrlSelectorComponent(Label = "Link URL", Order = 2)] + public string LinkUrl { get; set; } + + + /// + /// Gets or sets a title for a link defined by . + /// + /// + /// If URL targets a page in the site then URL is stored in a given format '~/en-us/article'. + /// + [TextInputComponent(Label = "Link title", Order = 3)] + [VisibleIfNotEmpty(nameof(LinkUrl))] + public string LinkTitle { get; set; } = String.Empty; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/BannerWidgetViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/BannerWidgetViewComponent.cs new file mode 100644 index 0000000..3f754a3 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/BannerWidgetViewComponent.cs @@ -0,0 +1,67 @@ +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Models; +using DancingGoat.Widgets; + +using Kentico.PageBuilder.Web.Mvc; + +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ViewComponents; + +[assembly: RegisterWidget(BannerWidgetViewComponent.IDENTIFIER, typeof(BannerWidgetViewComponent), "Banner", typeof(BannerWidgetProperties), Description = "Displays the text and image.", IconClass = "icon-ribbon")] + +namespace DancingGoat.Widgets +{ + /// + /// Banner widget service. + /// + public class BannerWidgetViewComponent : ViewComponent + { + /// + /// Widget identifier. + /// + public const string IDENTIFIER = "DancingGoat.HomePage.BannerWidget"; + + + private readonly MediaRepository mediaRepository; + + + /// + /// Initializes a new instance of the class. + /// + /// Repository for media files. + public BannerWidgetViewComponent(MediaRepository mediaRepository) + { + this.mediaRepository = mediaRepository; + } + + + public ViewViewComponentResult Invoke(BannerWidgetProperties properties) + { + var image = GetImage(properties); + + return View("~/Components/Widgets/BannerWidget/_BannerWidget.cshtml", new BannerWidgetModel + { + ImagePath = image?.Fields.File.Url, + Text = properties.Text, + LinkUrl = properties.LinkUrl, + LinkTitle = properties.LinkTitle + }); + } + + + private Media GetImage(BannerWidgetProperties properties) + { + var image = properties.Image.FirstOrDefault(); + + if (image == null) + { + return null; + } + + return mediaRepository.GetMediaFile(image.ItemId); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/BannerWidgetViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/BannerWidgetViewModel.cs new file mode 100644 index 0000000..38bc646 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/BannerWidgetViewModel.cs @@ -0,0 +1,33 @@ +using CMS.MediaLibrary; + +namespace DancingGoat.Widgets +{ + /// + /// View model for Banner widget. + /// + public class BannerWidgetModel + { + /// + /// Banner background image path. + /// + public string ImagePath { get; set; } + + + /// + /// Banner text. + /// + public string Text { get; set; } + + + /// + /// Gets or sets a title for a link defined by . + /// + public string LinkTitle { get; set; } + + + /// + /// Gets or sets URL to which the visitor is redirected after clicking on the . + /// + public string LinkUrl { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/_BannerWidget.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/_BannerWidget.cshtml new file mode 100644 index 0000000..bf9b3fd --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/BannerWidget/_BannerWidget.cshtml @@ -0,0 +1,51 @@ +@using DancingGoat.InlineEditors +@using DancingGoat.Widgets + +@model BannerWidgetModel + +@{ + string styleAttribute = null; + if (!string.IsNullOrEmpty(Model.ImagePath)) + { + styleAttribute = $"style=\"background-image: url('{Url.Content(Model.ImagePath)}');\""; + } + + bool editMode = Context.Kentico().PageBuilder().EditMode; + bool displayLink = !editMode && !String.IsNullOrEmpty(Model.LinkUrl); +} + +@{ + async Task RenderBanner() + { + + } +} + + +@if (displayLink) +{ + +} +else +{ + await RenderBanner(); +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CTAButton/CTAButtonWidgetProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CTAButton/CTAButtonWidgetProperties.cs new file mode 100644 index 0000000..3b6f3a0 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CTAButton/CTAButtonWidgetProperties.cs @@ -0,0 +1,32 @@ +using Kentico.Forms.Web.Mvc; +using Kentico.PageBuilder.Web.Mvc; +using Kentico.Xperience.Admin.Base.FormAnnotations; +using Kentico.Xperience.Admin.Content.FormAnnotations; + +namespace DancingGoat.Widgets +{ + /// + /// CTA button widget properties. + /// + public class CTAButtonWidgetProperties : IWidgetProperties + { + /// + /// Button text. + /// + public string Text { get; set; } + + + /// + /// Page where the button points to. + /// + [UrlSelectorComponent(Label = "Link URL", Order = 1)] + public string LinkUrl { get; set; } + + + /// + /// Indicates if link should be opened in a new tab. + /// + [CheckBoxComponent(Label = "Open in a new tab", Order = 2)] + public bool OpenInNewTab { get; set; } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CTAButton/CTAButtonWidgetViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CTAButton/CTAButtonWidgetViewModel.cs new file mode 100644 index 0000000..e4666ff --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CTAButton/CTAButtonWidgetViewModel.cs @@ -0,0 +1,25 @@ +namespace DancingGoat.Widgets +{ + /// + /// View model for the CTA Button widget. + /// + public class CTAButtonWidgetViewModel + { + /// + /// Text of the button. + /// + public string Text { get; set; } + + + /// + /// URL where the button points to. + /// + public string Url { get; set; } + + + /// + /// Indicates if link should be opened in a new tab. + /// + public bool OpenInNewTab { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CTAButton/_DancingGoat_General_CTAButtonWidget.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CTAButton/_DancingGoat_General_CTAButtonWidget.cshtml new file mode 100644 index 0000000..c13b842 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CTAButton/_DancingGoat_General_CTAButtonWidget.cshtml @@ -0,0 +1,24 @@ +@using DancingGoat.InlineEditors +@using DancingGoat.Widgets + +@model ComponentViewModel + +
+ @if (Context.Kentico().PageBuilder().EditMode) + { +
+ +
+ } + else + { + + @Model.Properties.Text + + } +
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/CafeCardProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/CafeCardProperties.cs new file mode 100644 index 0000000..fa7eb6d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/CafeCardProperties.cs @@ -0,0 +1,22 @@ +using System.Collections.Generic; + +using CMS.DocumentEngine; + +using Kentico.PageBuilder.Web.Mvc; +using Kentico.Xperience.Admin.Base.FormAnnotations; + +namespace DancingGoat.Widgets +{ + /// + /// Cafe card widget properties. + /// + public class CafeCardProperties : IWidgetProperties + { + /// + /// Selected cafes. + /// + [ContentItemSelectorComponent("DancingGoatCore.Cafe", Order = 1, Label = "Cafe")] + [RequiredValidationRule] + public IEnumerable SelectedCafes { get; set; } = new List(); + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/CafeCardViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/CafeCardViewModel.cs new file mode 100644 index 0000000..e99447b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/CafeCardViewModel.cs @@ -0,0 +1,48 @@ +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +namespace DancingGoat.Widgets +{ + /// + /// View model for Cafe card widget. + /// + public class CafeCardViewModel + { + /// + /// Cafe name. + /// + public string Name { get; set; } + + + /// + /// Cafe background image path. + /// + public string PhotoPath { get; set; } + + + /// + /// Cafe background image short description. + /// + public string PhotoShortDescription { get; set; } + + + /// + /// Gets ViewModel for . + /// + /// Cafe. + /// Hydrated view model. + public static CafeCardViewModel GetViewModel(Cafe cafe) + { + var cafeMedia = cafe?.Fields.Photo.FirstOrDefault() as Media; + return cafe == null + ? new CafeCardViewModel() + : new CafeCardViewModel + { + Name = cafe.DocumentName, + PhotoPath = cafeMedia?.Fields.File.Url, + PhotoShortDescription = cafeMedia?.Fields.ShortDescription ?? string.Empty + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/CafeCardWidgetViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/CafeCardWidgetViewComponent.cs new file mode 100644 index 0000000..6d2a4ab --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/CafeCardWidgetViewComponent.cs @@ -0,0 +1,47 @@ +using System.Linq; + +using DancingGoat.Models; +using DancingGoat.Widgets; + +using Kentico.PageBuilder.Web.Mvc; + +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ViewComponents; + +[assembly: RegisterWidget(CafeCardWidgetViewComponent.IDENTIFIER, typeof(CafeCardWidgetViewComponent), "Cafe", typeof(CafeCardProperties), Description = "Displays a cafe with its background image.", IconClass = "icon-cup")] + +namespace DancingGoat.Widgets +{ + /// + /// Controller for cafe card widget. + /// + public class CafeCardWidgetViewComponent : ViewComponent + { + /// + /// Widget identifier. + /// + public const string IDENTIFIER = "DancingGoat.HomePage.CafeCardWidget"; + + + private readonly CafeRepository repository; + + /// + /// Initializes an instance of class. + /// + public CafeCardWidgetViewComponent( + CafeRepository repository) + { + this.repository = repository; + } + + + public ViewViewComponentResult Invoke(CafeCardProperties properties) + { + var selectedPage = properties.SelectedCafes.FirstOrDefault(); + var cafe = (selectedPage != null) ? repository.GetCafeByNodeId(selectedPage.ItemId) : null; + var cafeModel = CafeCardViewModel.GetViewModel(cafe); + + return View("~/Components/Widgets/CafeCardWidget/_CafeCardWidget.cshtml", cafeModel); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/_CafeCardWidget.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/_CafeCardWidget.cshtml new file mode 100644 index 0000000..ec49765 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CafeCardWidget/_CafeCardWidget.cshtml @@ -0,0 +1,19 @@ +@model DancingGoat.Widgets.CafeCardViewModel + +
+ @if (String.IsNullOrEmpty(Model.Name) && string.IsNullOrEmpty(Model.PhotoPath)) + { +

@HtmlLocalizer["No cafe selected"]

+ } + else + { + +

@Model.Name

+ + @if (!string.IsNullOrEmpty(Model.PhotoPath)) + { + @Model.PhotoShortDescription + } +
+ } +
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/CardWidgetProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/CardWidgetProperties.cs new file mode 100644 index 0000000..358a167 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/CardWidgetProperties.cs @@ -0,0 +1,26 @@ +using System.Collections.Generic; + +using CMS.DocumentEngine; + +using Kentico.PageBuilder.Web.Mvc; +using Kentico.Xperience.Admin.Base.FormAnnotations; + +namespace DancingGoat.Widgets +{ + /// + /// Card widget properties. + /// + public class CardWidgetProperties : IWidgetProperties + { + /// + /// Image to be displayed. + /// + [ContentItemSelectorComponent("DancingGoatCore.Media", Label = "Image", Order = 1)] + public IEnumerable Image { get; set; } = new List(); + + /// + /// Text to be displayed. + /// + public string Text { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/CardWidgetViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/CardWidgetViewComponent.cs new file mode 100644 index 0000000..80d14ab --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/CardWidgetViewComponent.cs @@ -0,0 +1,63 @@ +using System.Linq; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Models; +using DancingGoat.Widgets; + +using Kentico.PageBuilder.Web.Mvc; + +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ViewComponents; + +[assembly: RegisterWidget(CardWidgetViewComponent.IDENTIFIER, typeof(CardWidgetViewComponent), "Card", typeof(CardWidgetProperties), Description = "Displays an image with a centered text.", IconClass = "icon-rectangle-paragraph")] + +namespace DancingGoat.Widgets +{ + /// + /// Controller for card widget. + /// + public class CardWidgetViewComponent : ViewComponent + { + /// + /// Widget identifier. + /// + public const string IDENTIFIER = "DancingGoat.LandingPage.CardWidget"; + + + private readonly MediaRepository mediaRepository; + + /// + /// Creates an instance of class. + /// + /// Repository for media files. + public CardWidgetViewComponent(MediaRepository mediaRepository) + { + this.mediaRepository = mediaRepository; + } + + + public ViewViewComponentResult Invoke(CardWidgetProperties properties) + { + var image = GetImage(properties); + + return View("~/Components/Widgets/CardWidget/_CardWidget.cshtml", new CardWidgetViewModel + { + ImagePath = image?.Fields.File.Url, + Text = properties.Text + }); + } + + + private Media GetImage(CardWidgetProperties properties) + { + var image = properties.Image.FirstOrDefault(); + + if (image == null) + { + return null; + } + + return mediaRepository.GetMediaFile(image.ItemId); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/CardWidgetViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/CardWidgetViewModel.cs new file mode 100644 index 0000000..3bf1c5e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/CardWidgetViewModel.cs @@ -0,0 +1,21 @@ +using CMS.MediaLibrary; + +namespace DancingGoat.Widgets +{ + /// + /// View model for Card widget. + /// + public class CardWidgetViewModel + { + /// + /// Card background image path. + /// + public string ImagePath { get; set; } + + + /// + /// Card text. + /// + public string Text { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/_CardWidget.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/_CardWidget.cshtml new file mode 100644 index 0000000..7c79c5f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/CardWidget/_CardWidget.cshtml @@ -0,0 +1,32 @@ +@using DancingGoat.InlineEditors +@using DancingGoat.Widgets + +@model DancingGoat.Widgets.CardWidgetViewModel + +@{ + string styleAttribute = null; + if (!string.IsNullOrEmpty(Model.ImagePath)) + { + styleAttribute = $"style=\"background-image: url('{Url.Content(Model.ImagePath)}');\""; + } +} + +
+
+
+ @if (Context.Kentico().PageBuilder().EditMode) + { + + } + else + { + @Model.Text + } +
+
+
diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/HeroImageWidgetProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/HeroImageWidgetProperties.cs new file mode 100644 index 0000000..61ab9f7 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/HeroImageWidgetProperties.cs @@ -0,0 +1,48 @@ +using System.Collections.Generic; + +using CMS.DocumentEngine; + +using Kentico.Forms.Web.Mvc; +using Kentico.PageBuilder.Web.Mvc; +using Kentico.Xperience.Admin.Base.FormAnnotations; + +namespace DancingGoat.Widgets +{ + /// + /// Hero image widget properties. + /// + public class HeroImageWidgetProperties : IWidgetProperties + { + /// + /// Background image. + /// + [ContentItemSelectorComponent("DancingGoatCore.Media", Label = "Background image", Order = 1)] + public IEnumerable Image { get; set; } = new List(); + + + /// + /// Text to be displayed. + /// + public string Text { get; set; } + + + /// + /// Button text. + /// + public string ButtonText { get; set; } + + + /// + /// Target of button link. + /// + [TextInputComponent(Label = "Button target", Order = 2)] + public string ButtonTarget { get; set; } + + + /// + /// Theme of the widget. + /// + [DropDownComponent(Label = "Color scheme", Order = 3, Options = "light;Light\ndark;Dark")] + public string Theme { get; set; } = "dark"; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/HeroImageWidgetViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/HeroImageWidgetViewComponent.cs new file mode 100644 index 0000000..ed6906e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/HeroImageWidgetViewComponent.cs @@ -0,0 +1,66 @@ +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Models; +using DancingGoat.Widgets; + +using Kentico.PageBuilder.Web.Mvc; + +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ViewComponents; + +[assembly: RegisterWidget(HeroImageWidgetViewComponent.IDENTIFIER, typeof(HeroImageWidgetViewComponent), "Hero image", typeof(HeroImageWidgetProperties), Description = "Displays an image, text, and a CTA button.", IconClass = "icon-badge")] + +namespace DancingGoat.Widgets +{ + /// + /// Controller for hero image widget. + /// + public class HeroImageWidgetViewComponent : ViewComponent + { + /// + /// Widget identifier. + /// + public const string IDENTIFIER = "DancingGoat.LandingPage.HeroImage"; + + + private readonly MediaRepository mediaRepository; + + /// + /// Creates an instance of class. + /// + /// Repository for media files. + public HeroImageWidgetViewComponent(MediaRepository mediaRepository) + { + this.mediaRepository = mediaRepository; + } + + + public ViewViewComponentResult Invoke(HeroImageWidgetProperties properties) + { + var image = GetImage(properties); + + return View("~/Components/Widgets/HeroImageWidget/_HeroImageWidget.cshtml", new HeroImageWidgetViewModel + { + ImagePath = image?.Fields.File.Url, + Text = properties.Text, + ButtonText = properties.ButtonText, + ButtonTarget = properties.ButtonTarget, + Theme = properties.Theme + }); + } + + private Media GetImage(HeroImageWidgetProperties properties) + { + var image = properties.Image.FirstOrDefault(); + + if (image == null) + { + return null; + } + + return mediaRepository.GetMediaFile(image.ItemId); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/HeroImageWidgetViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/HeroImageWidgetViewModel.cs new file mode 100644 index 0000000..84f095a --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/HeroImageWidgetViewModel.cs @@ -0,0 +1,37 @@ +namespace DancingGoat.Widgets +{ + /// + /// View model for Hero image widget. + /// + public class HeroImageWidgetViewModel + { + /// + /// Background image path. + /// + public string ImagePath { get; set; } + + + /// + /// Text. + /// + public string Text { get; set; } + + + /// + /// Button text. + /// + public string ButtonText { get; set; } + + + /// + /// Target of button link. + /// + public string ButtonTarget { get; set; } + + + /// + /// Theme of the widget. + /// + public string Theme { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/_HeroImageWidget.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/_HeroImageWidget.cshtml new file mode 100644 index 0000000..9498ff9 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/HeroImageWidget/_HeroImageWidget.cshtml @@ -0,0 +1,51 @@ +@using DancingGoat.InlineEditors +@using DancingGoat.Widgets + +@model HeroImageWidgetViewModel + +@{ + string styleAttribute = null; + if (!string.IsNullOrEmpty(Model.ImagePath)) + { + styleAttribute = $"style=\"background-image: url('{Url.Content(Model.ImagePath)}');\""; + } +} + +
+
+
+ @if (Context.Kentico().PageBuilder().EditMode) + { + + } + else + { + @Model.Text + } +
+ @if (Context.Kentico().PageBuilder().EditMode) + { +
+ @{ + + } +
+ } + else + { + + @Model.ButtonText + + } +
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardListViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardListViewModel.cs new file mode 100644 index 0000000..896ef76 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardListViewModel.cs @@ -0,0 +1,40 @@ +using System.Collections.Generic; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +namespace DancingGoat.Widgets +{ + /// + /// View model for Product card widget. + /// + public class ProductCardListViewModel + { + /// + /// Collection of products. + /// + public IEnumerable Products { get; set; } + + + /// + /// Gets ViewModels for . + /// + /// Collection of products. + /// Hydrated ViewModel. + public static ProductCardListViewModel GetViewModel(IEnumerable products) + { + var productModels = new List(); + + foreach (var product in products.Where(product => product != null)) + { + var productModel = ProductCardViewModel.GetViewModel(product); + productModels.Add(productModel); + } + + return new ProductCardListViewModel + { + Products = productModels + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardProperties.cs new file mode 100644 index 0000000..9d33a67 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardProperties.cs @@ -0,0 +1,21 @@ +using System.Collections.Generic; + +using CMS.DocumentEngine; + +using Kentico.PageBuilder.Web.Mvc; +using Kentico.Xperience.Admin.Base.FormAnnotations; + +namespace DancingGoat.Widgets +{ + /// + /// Product card widget properties. + /// + public class ProductCardProperties : IWidgetProperties + { + /// + /// Selected products. + /// + [ContentItemSelectorComponent("DancingGoatCore.Coffee", Label = "Selected products", Order = 1)] + public IEnumerable SelectedProducts { get; set; } = new List(); + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardViewModel.cs new file mode 100644 index 0000000..1e31ed6 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardViewModel.cs @@ -0,0 +1,50 @@ +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +namespace DancingGoat.Widgets +{ + /// + /// View model for Product card widget. + /// + public class ProductCardViewModel + { + /// + /// Card heading. + /// + public string Heading { get; set; } + + + /// + /// Card background image path. + /// + public string ImagePath { get; set; } + + + /// + /// Card text. + /// + public string Text { get; set; } + + + /// + /// Gets ViewModel for . + /// + /// Product. + /// Hydrated ViewModel. + public static ProductCardViewModel GetViewModel(Coffee product) + { + if (product == null) + { + return null; + } + + return new ProductCardViewModel + { + Heading = product.DocumentName, + ImagePath = (product.Fields.Image.FirstOrDefault() as Media)?.Fields.File?.Url, + Text = product.CoffeeShortDescription + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardWidgetViewComponent.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardWidgetViewComponent.cs new file mode 100644 index 0000000..7cb5c6b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/ProductCardWidgetViewComponent.cs @@ -0,0 +1,51 @@ +using System.Collections.Generic; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Models; +using DancingGoat.Widgets; + +using Kentico.PageBuilder.Web.Mvc; + +using Microsoft.AspNetCore.Mvc; +using Microsoft.AspNetCore.Mvc.ViewComponents; + +[assembly: RegisterWidget(ProductCardWidgetViewComponent.IDENTIFIER, typeof(ProductCardWidgetViewComponent), "Product cards", typeof(ProductCardProperties), Description = "Displays products.", IconClass = "icon-box")] + +namespace DancingGoat.Widgets +{ + /// + /// Controller for product card widget. + /// + public class ProductCardWidgetViewComponent : ViewComponent + { + /// + /// Widget identifier. + /// + public const string IDENTIFIER = "DancingGoat.LandingPage.ProductCardWidget"; + + + private readonly CoffeeRepository repository; + + + /// + /// Creates an instance of class. + /// + /// Repository for retrieving products. + public ProductCardWidgetViewComponent(CoffeeRepository repository) + { + this.repository = repository; + } + + + public ViewViewComponentResult Invoke(ProductCardProperties properties) + { + var selectedProductIds = properties.SelectedProducts.Select(i => i.ItemId).ToList(); + IEnumerable products = repository.Get(selectedProductIds) + .OrderBy(p => selectedProductIds.IndexOf(p.CoffeeID)); + var model = ProductCardListViewModel.GetViewModel(products); + return View("~/Components/Widgets/ProductCardWidget/_ProductCardWidget.cshtml", model); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/_ProductCardWidget.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/_ProductCardWidget.cshtml new file mode 100644 index 0000000..fc2ab7a --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/ProductCardWidget/_ProductCardWidget.cshtml @@ -0,0 +1,32 @@ +@model DancingGoat.Widgets.ProductCardListViewModel + +
+ @if (@Model.Products.Count() == 0) + { +

Please select a product.

+ } + else + { +
+ @foreach (var product in Model.Products) + { +
+
+
+ @if (!string.IsNullOrEmpty(@product.ImagePath)) + { + @product.Heading + } +

@product.Heading

+ + @if (!string.IsNullOrEmpty(product.Text)) + { +

@Html.Raw(@product.Text)

+ } +
+
+
+ } +
+ } +
diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/TestimonialWidget/TestimonialWidgetProperties.cs b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/TestimonialWidget/TestimonialWidgetProperties.cs new file mode 100644 index 0000000..3decca3 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/TestimonialWidget/TestimonialWidgetProperties.cs @@ -0,0 +1,27 @@ +using Kentico.PageBuilder.Web.Mvc; + +namespace DancingGoat.Widgets +{ + /// + /// Properties for Testimonial widget. + /// + public class TestimonialWidgetProperties : IWidgetProperties + { + /// + /// Quotation text. + /// + public string QuotationText { get; set; } + + + /// + /// Author text. + /// + public string AuthorText { get; set; } + + + /// + /// Background color CSS class. + /// + public string ColorCssClass { get; set; } = "first-color"; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/TestimonialWidget/_DancingGoat_LandingPage_TestimonialWidget.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/TestimonialWidget/_DancingGoat_LandingPage_TestimonialWidget.cshtml new file mode 100644 index 0000000..5b2df45 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/Widgets/TestimonialWidget/_DancingGoat_LandingPage_TestimonialWidget.cshtml @@ -0,0 +1,52 @@ +@using DancingGoat.InlineEditors +@using DancingGoat.Widgets + +@model ComponentViewModel + +@{ + var editMode = Context.Kentico().PageBuilder().EditMode; +} + +
+ @if (editMode) + { + + } +

+ @if (editMode) + { + + } + else + { + @Model.Properties.QuotationText + } +

+
+

+ @if (editMode) + { + + } + else + { + @Model.Properties.AuthorText + } +

+
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Components/_ViewImports.cshtml b/src/Kentico.Xperience.Lucene.Sample/Components/_ViewImports.cshtml new file mode 100644 index 0000000..d0f38c6 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Components/_ViewImports.cshtml @@ -0,0 +1,14 @@ +@using DancingGoat + +@using CMS.Helpers + +@using Kentico.Web.Mvc +@using Kentico.Content.Web.Mvc +@using Kentico.PageBuilder.Web.Mvc + +@using Microsoft.AspNetCore.Mvc.Localization + +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Kentico.Content.Web.Mvc +@addTagHelper *, DancingGoat +@inject IHtmlLocalizer HtmlLocalizer \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/ContentItemIdentifiers.cs b/src/Kentico.Xperience.Lucene.Sample/ContentItemIdentifiers.cs new file mode 100644 index 0000000..e26d99e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/ContentItemIdentifiers.cs @@ -0,0 +1,18 @@ +namespace DancingGoat +{ + /// + /// Encapsulates content item identifiers. + /// + public static class ContentItemIdentifiers + { + public const string MANUFACTURERS = "/Manufacturers"; + public const string HOME = "/Home"; + public const string CONTACTS = "/Contacts"; + public const string ARTICLES = "/Articles"; + public const string ABOUT = "/About-Us"; + public const string COFFEES = "/Coffees"; + public const string CAFES = "/Cafes"; + public const string PRIVACY = "/Specials/Privacy"; + public const string LANDINGPAGE_COFFEESAMPLES = "/Landing-pages/Coffee-samples"; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/AboutController.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/AboutController.cs new file mode 100644 index 0000000..332714a --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/AboutController.cs @@ -0,0 +1,79 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Controllers; +using DancingGoat.Infrastructure; +using DancingGoat.Models; + +using Kentico.Content.Web.Mvc; +using Kentico.Content.Web.Mvc.Routing; + +using Microsoft.AspNetCore.Mvc; + +[assembly: RegisterPageRoute(AboutUs.CLASS_NAME, typeof(AboutController))] + +namespace DancingGoat.Controllers +{ + public class AboutController : Controller + { + private readonly IPageDataContextRetriever pageDataContextRetriever; + private readonly RepositoryCacheHelper repositoryCacheHelper; + + + public AboutController(IPageDataContextRetriever pageDataContextRetriever, + RepositoryCacheHelper repositoryCacheHelper) + { + this.pageDataContextRetriever = pageDataContextRetriever; + this.repositoryCacheHelper = repositoryCacheHelper; + } + + + public async Task Index(CancellationToken cancellationToken) + { + var viewModel = await GetAboutUsViewModel(cancellationToken); + + return View(viewModel); + } + + + private async Task GetAboutUsViewModel(CancellationToken cancellationToken) + { + var aboutUs = pageDataContextRetriever.Retrieve().Page; + + return await repositoryCacheHelper.CacheData(async cancellationToken => + { + var aboutUsFields = (await aboutUs.WithLinkedItems(1, cancellationToken)).Fields; + var sections = GetSections(aboutUsFields.Sections.OfType()); + var reference = aboutUsFields.Reference.FirstOrDefault() as Reference; + + return new AboutUsViewModel + { + Sections = sections, + Reference = ReferenceViewModel.GetViewModel(reference) + }; + }, + cancellationToken, + $"{nameof(AboutController)}|{nameof(GetAboutUsViewModel)}", + () => aboutUs.GetLinkedItemsCacheDependencyKeys(3, cancellationToken)); + } + + + private List GetSections(IEnumerable sideStories) + { + var sections = new List(); + + foreach (var sideStory in sideStories) + { + var section = AboutUsSectionViewModel.GetViewModel(sideStory); + sections.Add(section); + } + + return sections; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/AccountController.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/AccountController.cs new file mode 100644 index 0000000..03ea92a --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/AccountController.cs @@ -0,0 +1,155 @@ +using System; +using System.Net; +using System.Threading.Tasks; + +using CMS.Core; + +using DancingGoat.Models; + +using Kentico.Content.Web.Mvc; +using Kentico.Membership; +using Kentico.Web.Mvc; + +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Localization; + +using SignInResult = Microsoft.AspNetCore.Identity.SignInResult; + + +namespace DancingGoat.Controllers +{ + public class AccountController : Controller + { + private readonly IStringLocalizer localizer; + private readonly IEventLogService eventLogService; + private readonly UserManager userManager; + private readonly SignInManager signInManager; + + public AccountController(UserManager userManager, + SignInManager signInManager, + IStringLocalizer localizer, + IEventLogService eventLogService) + { + this.userManager = userManager; + this.signInManager = signInManager; + this.localizer = localizer; + this.eventLogService = eventLogService; + } + + + // GET: Account/Login + [HttpGet] + [AllowAnonymous] + public ActionResult Login() + { + return View(); + } + + + // POST: Account/Login + [HttpPost] + [AllowAnonymous] + [ValidateAntiForgeryToken] + public async Task Login(LoginViewModel model, string returnUrl) + { + if (!ModelState.IsValid) + { + return View(model); + } + + var signInResult = SignInResult.Failed; + + try + { + signInResult = await signInManager.PasswordSignInAsync(model.UserName, model.Password, model.StaySignedIn, false); + } + catch (Exception ex) + { + eventLogService.LogException("AccountController", "Login", ex); + } + + if (signInResult.Succeeded) + { + var decodedReturnUrl = WebUtility.UrlDecode(returnUrl); + if (!string.IsNullOrEmpty(decodedReturnUrl) && Url.IsLocalUrl(decodedReturnUrl)) + { + return Redirect(decodedReturnUrl); + } + + return Redirect(Url.Kentico().PageUrl(ContentItemIdentifiers.HOME)); + } + + ModelState.AddModelError(string.Empty, localizer["Your sign-in attempt was not successful. Please try again."].ToString()); + + return View(model); + } + + + // POST: Account/Logout + [Authorize] + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Logout() + { + signInManager.SignOutAsync(); + return Redirect(Url.Kentico().PageUrl(ContentItemIdentifiers.HOME)); + } + + + // GET: Account/Register + public ActionResult Register() + { + return View(); + } + + + // POST: Account/Register + [HttpPost] + [ValidateAntiForgeryToken] + public async Task Register(RegisterViewModel model) + { + if (!ModelState.IsValid) + { + return View(model); + } + + var member = new ApplicationUser + { + UserName = model.UserName, + Email = model.Email, + Enabled = true + }; + + var registerResult = new IdentityResult(); + + try + { + registerResult = await userManager.CreateAsync(member, model.Password); + } + catch (Exception ex) + { + eventLogService.LogException("AccountController", "Register", ex); + ModelState.AddModelError(string.Empty, localizer["Your registration was not successful."]); + } + + if (registerResult.Succeeded) + { + var signInResult = await signInManager.PasswordSignInAsync(member, model.Password, true, false); + + if (signInResult.Succeeded) + { + return Redirect(Url.Kentico().PageUrl(ContentItemIdentifiers.HOME)); + } + } + + foreach (var error in registerResult.Errors) + { + ModelState.AddModelError(string.Empty, error.Description); + } + + return View(model); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/ArticlesController.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/ArticlesController.cs new file mode 100644 index 0000000..e1a5c4b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/ArticlesController.cs @@ -0,0 +1,57 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Controllers; +using DancingGoat.Models; + +using Kentico.Content.Web.Mvc; +using Kentico.Content.Web.Mvc.Routing; +using Kentico.PageBuilder.Web.Mvc.PageTemplates; + +using Microsoft.AspNetCore.Mvc; + +[assembly: RegisterPageRoute(ArticleSection.CLASS_NAME, typeof(ArticlesController))] +[assembly: RegisterPageRoute(Article.CLASS_NAME, typeof(ArticlesController), ActionName = "Detail")] + +namespace DancingGoat.Controllers +{ + public class ArticlesController : Controller + { + private readonly ArticleRepository articleRepository; + + public ArticlesController(ArticleRepository articleRepository) + { + this.articleRepository = articleRepository; + } + + + public async Task Index([FromServices] IPageDataContextRetriever dataContextRetriever, + [FromServices] IPageUrlRetriever pageUrlRetriever, + CancellationToken cancellationToken) + { + var section = dataContextRetriever.Retrieve().Page; + var articles = await articleRepository.GetArticles(section.NodeAliasPath, cancellationToken: cancellationToken); + + var articlesModel = new List(); + + foreach (var article in articles) + { + articlesModel.Add(ArticleViewModel.GetViewModel(article, pageUrlRetriever)); + } + + return View(articlesModel); + } + + + public async Task Detail([FromServices] ArticleRepository articleRepository, CancellationToken cancellationToken) + { + var article = await articleRepository.GetCurrent(2, cancellationToken); + + return new TemplateResult(article); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/CafesController.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/CafesController.cs new file mode 100644 index 0000000..6f1a922 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/CafesController.cs @@ -0,0 +1,89 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Controllers; +using DancingGoat.Models; + +using Kentico.Content.Web.Mvc; +using Kentico.Content.Web.Mvc.Routing; + +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Localization; + +[assembly: RegisterPageRoute(CafeSection.CLASS_NAME, typeof(CafesController))] + +namespace DancingGoat.Controllers +{ + public class CafesController : Controller + { + private readonly IPageDataContextRetriever dataContextRetriever; + private readonly CafeRepository cafeRepository; + private readonly IStringLocalizer localizer; + + + public CafesController(IPageDataContextRetriever dataContextRetriever, + CafeRepository cafeRepository, + IStringLocalizer localizer) + { + this.dataContextRetriever = dataContextRetriever; + this.cafeRepository = cafeRepository; + this.localizer = localizer; + } + + + public async Task Index(CancellationToken cancellationToken) + { + var section = dataContextRetriever.Retrieve().Page; + var companyCafes = await cafeRepository.GetCompanyCafes(section.NodeAliasPath, 4); + var partnerCafes = cafeRepository.GetPartnerCafes(section.NodeAliasPath); + + var model = new CafesIndexViewModel + { + CompanyCafes = GetCompanyCafesModel(companyCafes), + PartnerCafes = GetPartnerCafesModel(partnerCafes) + }; + + return View(model); + } + + + private Dictionary> GetPartnerCafesModel(IEnumerable cafes) + { + var cityCafes = new Dictionary>(); + + // Group partner cafes by their location + foreach (var cafe in cafes) + { + var city = cafe.City.ToLowerInvariant(); + var contact = ContactViewModel.GetViewModel(cafe, localizer); + + if (cityCafes.ContainsKey(city)) + { + cityCafes[city].Add(contact); + } + else + { + cityCafes.Add(city, new List {contact}); + } + } + + return cityCafes; + } + + + private IEnumerable GetCompanyCafesModel(IEnumerable cafes) + { + var cafesModel = new List(); + foreach (var cafe in cafes) + { + cafesModel.Add(CafeViewModel.GetViewModel(cafe, localizer)); + } + + return cafesModel; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/CoffeesControler.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/CoffeesControler.cs new file mode 100644 index 0000000..1b6f988 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/CoffeesControler.cs @@ -0,0 +1,67 @@ +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Controllers; +using DancingGoat.Models; + +using Kentico.Content.Web.Mvc; +using Kentico.Content.Web.Mvc.Routing; + +using Microsoft.AspNetCore.Mvc; + +[assembly: RegisterPageRoute(CoffeeSection.CLASS_NAME, typeof(CoffeesController))] +[assembly: RegisterPageRoute(Coffee.CLASS_NAME, typeof(CoffeesController), ActionName = "Detail")] + +namespace DancingGoat.Controllers +{ + public class CoffeesController : Controller + { + private readonly IPageUrlRetriever pageUrlRetriever; + private readonly CoffeeRepository coffeeRepository; + + + public CoffeesController(IPageUrlRetriever pageUrlRetriever, + CoffeeRepository coffeeRepository) + { + this.pageUrlRetriever = pageUrlRetriever; + this.coffeeRepository = coffeeRepository; + } + + + public async Task Index([FromServices] IPageDataContextRetriever pageDataContextRetriever, CancellationToken cancellationToken) + { + var section = pageDataContextRetriever.Retrieve().Page; + var coffees = await coffeeRepository.Get(section.NodeAliasPath, cancellationToken: cancellationToken); + + var viewModels = coffees.Select(coffee => new CoffeeViewModel + { + Name = coffee.DocumentName, + Description = coffee.CoffeeDescription, + ImagePath = (coffee.Fields.Image.FirstOrDefault() as Media)?.Fields.File?.Url, + Url = pageUrlRetriever.Retrieve(coffee).RelativePath + }); + + return View(viewModels); + } + + + public async Task Detail(CancellationToken cancellationToken) + { + var coffee = await coffeeRepository.GetCurrent(3, cancellationToken); + + var media = coffee.Fields.Image.FirstOrDefault() as Media; + + return View(new CoffeeViewModel + { + Description = coffee.CoffeeDescription, + ImagePath = media?.Fields.File?.Url, + Name = coffee.DocumentName, + Url = pageUrlRetriever.Retrieve(coffee).RelativePath + }); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/ConsentController.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/ConsentController.cs new file mode 100644 index 0000000..ddf8359 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/ConsentController.cs @@ -0,0 +1,50 @@ +using CMS.ContactManagement; +using CMS.DataProtection; +using CMS.Helpers; + +using DancingGoat.Helpers.Generator; + +using Microsoft.AspNetCore.Http; +using Microsoft.AspNetCore.Mvc; + +namespace DancingGoat.Controllers +{ + public class ConsentController : Controller + { + private readonly ICurrentCookieLevelProvider cookieLevelProvider; + private readonly IConsentAgreementService consentAgreementService; + private readonly IConsentInfoProvider consentInfoProvider; + + + public ConsentController(ICurrentCookieLevelProvider cookieLevelProvider, IConsentAgreementService consentAgreementService, IConsentInfoProvider consentInfoProvider) + { + this.cookieLevelProvider = cookieLevelProvider; + this.consentAgreementService = consentAgreementService; + this.consentInfoProvider = consentInfoProvider; + } + + + // POST: Consent/Agree + [HttpPost] + [ValidateAntiForgeryToken] + public ActionResult Agree(string returnUrl) + { + var consent = consentInfoProvider.Get(TrackingConsentGenerator.CONSENT_NAME); + + if (consent != null) + { + cookieLevelProvider.SetCurrentCookieLevel(CookieLevel.All); + + var contact = ContactManagementContext.CurrentContact; + if (contact != null) + { + consentAgreementService.Agree(contact, consent); + } + + return Redirect(returnUrl); + } + + return new StatusCodeResult(StatusCodes.Status400BadRequest); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/ContactsController.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/ContactsController.cs new file mode 100644 index 0000000..e543b60 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/ContactsController.cs @@ -0,0 +1,68 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Controllers; +using DancingGoat.Models; + +using Kentico.Content.Web.Mvc.Routing; + +using Microsoft.AspNetCore.Mvc; +using Microsoft.Extensions.Localization; + +[assembly: RegisterPageRoute(Contacts.CLASS_NAME, typeof(ContactsController))] + +namespace DancingGoat.Controllers +{ + public class ContactsController : Controller + { + private readonly ContactRepository contactRepository; + private readonly CafeRepository cafeRepository; + private readonly IStringLocalizer localizer; + + + public ContactsController(ContactRepository contactRepository, + CafeRepository cafeRepository, + IStringLocalizer localizer) + { + this.contactRepository = contactRepository; + this.cafeRepository = cafeRepository; + this.localizer = localizer; + } + + + public async Task Index(CancellationToken cancellationToken) + { + var model = await GetIndexViewModel(cancellationToken); + + return View(model); + } + + + private async Task GetIndexViewModel(CancellationToken cancellationToken) + { + var cafes = await cafeRepository.GetCompanyCafes(ContentItemIdentifiers.CAFES, 4, cancellationToken); + + return new ContactsIndexViewModel + { + CompanyContact = GetCompanyContactModel(), + CompanyCafes = GetCompanyCafesModel(cafes) + }; + } + + + private ContactViewModel GetCompanyContactModel() + { + return ContactViewModel.GetViewModel(contactRepository.GetCompanyContact(), localizer); + } + + + private List GetCompanyCafesModel(IEnumerable cafes) + { + return cafes.Select(cafe => ContactViewModel.GetViewModel(cafe, localizer)).ToList(); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/HomeController.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/HomeController.cs new file mode 100644 index 0000000..d9d3d75 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/HomeController.cs @@ -0,0 +1,66 @@ +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Controllers; +using DancingGoat.Infrastructure; +using DancingGoat.Models; + +using Kentico.Content.Web.Mvc; +using Kentico.Content.Web.Mvc.Routing; + +using Microsoft.AspNetCore.Mvc; + +[assembly: RegisterPageRoute(Home.CLASS_NAME, typeof(HomeController))] + +namespace DancingGoat.Controllers +{ + public class HomeController : Controller + { + private readonly IPageDataContextRetriever pageDataContextRetriever; + private readonly RepositoryCacheHelper repositoryCacheHelper; + + + public HomeController(IPageDataContextRetriever pageDataContextRetriever, + RepositoryCacheHelper repositoryCacheHelper) + { + this.pageDataContextRetriever = pageDataContextRetriever; + this.repositoryCacheHelper = repositoryCacheHelper; + } + + + public async Task Index(CancellationToken cancellationToken) + { + var viewModel = await GetHomeViewModel(cancellationToken); + + return View(viewModel); + } + + + private async Task GetHomeViewModel(CancellationToken cancellationToken) + { + var home = pageDataContextRetriever.Retrieve().Page; + + return await repositoryCacheHelper.CacheData(async cancellationToken => + { + var homeFields = (await home.WithLinkedItems(3, cancellationToken)).Fields; + var homeSections = homeFields.Sections.OfType(); + var reference = homeFields.Reference.FirstOrDefault() as Reference; + var cuppingEvent = homeFields.Event.OfType().OrderByDescending(e => e.EventDate).FirstOrDefault(); + + return new HomeIndexViewModel + { + HomeSections = homeSections.Select(section => HomeSectionViewModel.GetViewModel(section)), + Reference = ReferenceViewModel.GetViewModel(reference), + Event = EventViewModel.GetViewModel(cuppingEvent) + }; + }, + cancellationToken, + $"{nameof(HomeController)}|{nameof(GetHomeViewModel)}", + () => home.GetLinkedItemsCacheDependencyKeys(3, cancellationToken)); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/HttpErrorsController.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/HttpErrorsController.cs new file mode 100644 index 0000000..06b2b2c --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/HttpErrorsController.cs @@ -0,0 +1,17 @@ +using Microsoft.AspNetCore.Mvc; + +namespace DancingGoat.Controllers +{ + public class HttpErrorsController : Controller + { + public IActionResult Error(int code) + { + if (code == 404) + { + return View("NotFound"); + } + + return StatusCode(code); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Controllers/PrivacyController.cs b/src/Kentico.Xperience.Lucene.Sample/Controllers/PrivacyController.cs new file mode 100644 index 0000000..8c8f35f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Controllers/PrivacyController.cs @@ -0,0 +1,115 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading; + +using CMS.ContactManagement; +using CMS.DataProtection; +using CMS.DocumentEngine.Types.DancingGoatCore; +using CMS.Membership; + +using DancingGoat.Controllers; +using DancingGoat.Helpers.Generator; +using DancingGoat.Models; + +using Kentico.Content.Web.Mvc; +using Kentico.Content.Web.Mvc.Routing; +using Kentico.Web.Mvc; + +using Microsoft.AspNetCore.Mvc; + +[assembly: RegisterPageRoute(Privacy.CLASS_NAME, typeof(PrivacyController))] + +namespace DancingGoat.Controllers +{ + public class PrivacyController : Controller + { + private readonly IConsentAgreementService consentAgreementService; + private readonly IConsentInfoProvider consentInfoProvider; + private ContactInfo currentContact; + + private const string SUCCESS_RESULT = "success"; + private const string ERROR_RESULT = "error"; + + + private ContactInfo CurrentContact + { + get + { + if (currentContact == null) + { + // Try to get contact from cookie + currentContact = ContactManagementContext.CurrentContact; + } + + return currentContact; + } + } + + + public PrivacyController(IConsentAgreementService consentAgreementService, IConsentInfoProvider consentInfoProvider) + { + this.consentAgreementService = consentAgreementService; + this.consentInfoProvider = consentInfoProvider; + } + + + public ActionResult Index() + { + var model = new PrivacyViewModel(); + + if (!IsDemoEnabled()) + { + model.DemoDisabled = true; + } + else if (CurrentContact != null) + { + model.Constents = GetAgreedConsentsForCurrentContact(); + } + + model.ShowSavedMessage = TempData[SUCCESS_RESULT] != null; + model.ShowErrorMessage = TempData[ERROR_RESULT] != null; + + return View(model); + } + + + [HttpPost] + [ValidateAntiForgeryToken] + [Route("Privacy/Revoke")] + public ActionResult Revoke(string consentName) + { + var consentToRevoke = consentInfoProvider.Get(consentName); + + if (consentToRevoke != null && CurrentContact != null) + { + consentAgreementService.Revoke(CurrentContact, consentToRevoke); + + TempData[SUCCESS_RESULT] = true; + } + else + { + TempData[ERROR_RESULT] = true; + } + + return Redirect(Url.Kentico().PageUrl(ContentItemIdentifiers.PRIVACY)); + } + + + private IEnumerable GetAgreedConsentsForCurrentContact() + { + return consentAgreementService.GetAgreedConsents(CurrentContact) + .Select(consent => new PrivacyConsentViewModel + { + Name = consent.Name, + Title = consent.DisplayName, + Text = consent.GetConsentText(Thread.CurrentThread.CurrentCulture.Name).ShortText + }); + } + + + private bool IsDemoEnabled() + { + return consentInfoProvider.Get(TrackingConsentGenerator.CONSENT_NAME) != null; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DancingGoat.csproj b/src/Kentico.Xperience.Lucene.Sample/DancingGoat.csproj new file mode 100644 index 0000000..f69dbed --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DancingGoat.csproj @@ -0,0 +1,35 @@ + + + DancingGoat + disable + + 79c858af-5444-4954-8d08-6592a961e82a + false + $(NoWarn);CS1572;CS1573;S2259;S3358;S101;S3925;S4136;S1144;S4487 + + + + + + + PreserveNewest + + + + + + + + $(DefineConstants);SEPARATED_ADMIN + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Data/Template.zip b/src/Kentico.Xperience.Lucene.Sample/Data/Template.zip new file mode 100644 index 0000000..e6b411b Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/Data/Template.zip differ diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/DancingGoatSamplesModule.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/DancingGoatSamplesModule.cs new file mode 100644 index 0000000..942b9b5 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/DancingGoatSamplesModule.cs @@ -0,0 +1,116 @@ +using System; +using System.Collections.Generic; + +using CMS; +using CMS.Base; +using CMS.ContactManagement; +using CMS.Core; +using CMS.DataEngine; +using CMS.DataProtection; +using CMS.Helpers; + +using Samples.DancingGoat; + +[assembly: RegisterModule(typeof(DancingGoatSamplesModule))] + +namespace Samples.DancingGoat +{ + /// + /// Represents module with DataProtection sample code. + /// + internal class DancingGoatSamplesModule : Module + { + private const string DATA_PROTECTION_SAMPLES_ENABLED_SETTINGS_KEY_NAME = "DataProtectionSamplesEnabled"; + + + /// + /// Initializes a new instance of the class. + /// + public DancingGoatSamplesModule() + : base("DancingGoatSamplesModule") + { + } + + + /// + /// Initializes the module. + /// + protected override void OnInit() + { + base.OnInit(); + + InitializeSamples(); + } + + + /// + /// Registers sample personal data collectors immediately or attaches an event handler to register the collectors upon dedicated key insertion. + /// Disabling or toggling registration of the sample collectors is not supported. + /// + private void InitializeSamples() + { + var dataProtectionSamplesEnabledSettingsKey = SettingsKeyInfoProvider.GetSettingsKeyInfo(DATA_PROTECTION_SAMPLES_ENABLED_SETTINGS_KEY_NAME); + if (dataProtectionSamplesEnabledSettingsKey?.KeyValue.ToBoolean(false) ?? false) + { + RegisterSamples(); + } + else + { + SettingsKeyInfoProvider.OnSettingsKeyChanged += (sender, eventArgs) => + { + if (eventArgs.KeyName.Equals(DATA_PROTECTION_SAMPLES_ENABLED_SETTINGS_KEY_NAME, StringComparison.OrdinalIgnoreCase) && + (eventArgs.Action == SettingsKeyActionEnum.Insert) && eventArgs.KeyValue.ToBoolean(false)) + { + RegisterSamples(); + } + }; + } + } + + + internal static void RegisterSamples() + { + IdentityCollectorRegister.Instance.Add(new SampleContactInfoIdentityCollector()); + IdentityCollectorRegister.Instance.Add(new SampleMemberInfoIdentityCollector()); + + PersonalDataCollectorRegister.Instance.Add(new SampleContactDataCollector()); + PersonalDataCollectorRegister.Instance.Add(new SampleMemberDataCollector()); + + PersonalDataEraserRegister.Instance.Add(new SampleContactPersonalDataEraser()); + PersonalDataEraserRegister.Instance.Add(new SampleMemberPersonalDataEraser()); + + RegisterConsentRevokeHandler(); + } + + + internal static void DeleteContactActivities(ContactInfo contact) + { + var configuration = new Dictionary + { + { "deleteActivities", true } + }; + + new SampleContactPersonalDataEraser().Erase(new[] { contact }, configuration); + } + + + private static void RegisterConsentRevokeHandler() + { + DataProtectionEvents.RevokeConsentAgreement.Execute += (sender, args) => + { + if (args.Consent.ConsentName.Equals("DancingGoatTracking", StringComparison.Ordinal)) + { + DeleteContactActivities(args.Contact); + + // Remove cookies used for contact tracking + CookieHelper.Remove(CookieName.CurrentContact); + CookieHelper.Remove(CookieName.CrossSiteContact); + + // Set the cookie level to default + var cookieLevelProvider = Service.Resolve(); + cookieLevelProvider.SetCurrentCookieLevel(cookieLevelProvider.GetDefaultCookieLevel()); + } + }; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/IdentityCollectors/SampleContactInfoIdentityCollector.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/IdentityCollectors/SampleContactInfoIdentityCollector.cs new file mode 100644 index 0000000..9a9e020 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/IdentityCollectors/SampleContactInfoIdentityCollector.cs @@ -0,0 +1,46 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using CMS.ContactManagement; +using CMS.DataEngine; +using CMS.DataProtection; + +namespace Samples.DancingGoat +{ + /// + /// Sample implementation of for collecting s by an email address. + /// + internal class SampleContactInfoIdentityCollector : IIdentityCollector + { + /// + /// Collects all the s and adds them to the collection. + /// + /// + /// Contacts are collected by their email address. + /// Duplicate customers are not added. + /// + /// Key value collection containing data subject's information that identifies it. + /// List of already collected identities. + public void Collect(IDictionary dataSubjectIdentifiersFilter, List identities) + { + if (!dataSubjectIdentifiersFilter.ContainsKey("email")) + { + return; + } + + var email = dataSubjectIdentifiersFilter["email"] as string; + if (String.IsNullOrWhiteSpace(email)) + { + return; + } + + // Find contacts that used the same email and distinct them + var contacts = ContactInfo.Provider.Get() + .WhereEquals(nameof(ContactInfo.ContactEmail), email) + .ToList(); + + identities.AddRange(contacts); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/IdentityCollectors/SampleMemberInfoIdentityCollector.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/IdentityCollectors/SampleMemberInfoIdentityCollector.cs new file mode 100644 index 0000000..03b788d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/IdentityCollectors/SampleMemberInfoIdentityCollector.cs @@ -0,0 +1,45 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using CMS.DataEngine; +using CMS.DataProtection; +using CMS.Membership; + +namespace Samples.DancingGoat +{ + /// + /// Sample implementation of for collecting s by an email address. + /// + internal class SampleMemberInfoIdentityCollector : IIdentityCollector + { + /// + /// Collects all the s and adds them to the collection. + /// + /// + /// Members are collected by their email address. + /// + /// Key value collection containing data subject's information that identifies it. + /// List of already collected identities. + public void Collect(IDictionary dataSubjectIdentifiersFilter, List identities) + { + if (!dataSubjectIdentifiersFilter.ContainsKey("email")) + { + return; + } + + var email = dataSubjectIdentifiersFilter["email"] as string; + if (String.IsNullOrWhiteSpace(email)) + { + return; + } + + // Find members that used the same email and distinct them + var members = MemberInfo.Provider.Get() + .WhereEquals(nameof(MemberInfo.MemberEmail), email) + .ToList(); + + identities.AddRange(members); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/CollectedColumn.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/CollectedColumn.cs new file mode 100644 index 0000000..77cafa7 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/CollectedColumn.cs @@ -0,0 +1,37 @@ +namespace Samples.DancingGoat +{ + /// + /// Represents a column collected by personal data collector. + /// + internal class CollectedColumn + { + /// + /// Gets the name of the column. + /// + public string Name + { + get; + } + + + /// + /// Gets the display name of the column. + /// + public string DisplayName + { + get; + } + + + /// + /// Initializes a new instance of the class from given name and display name. + /// + /// Name of the column. + /// Display name of the column. + public CollectedColumn(string name, string displayName) + { + Name = name; + DisplayName = displayName; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleContactDataCollector.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleContactDataCollector.cs new file mode 100644 index 0000000..94bc08e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleContactDataCollector.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; + +using CMS.DataEngine; +using CMS.DataProtection; + +namespace Samples.DancingGoat +{ + /// + /// Sample implementation of interface for collecting contact's personal data. + /// + internal class SampleContactDataCollector : IPersonalDataCollector + { + /// + /// Collects personal data based on given . + /// + /// Collection of identities representing a data subject. + /// Defines an output format for the result. + /// containing personal data. + public PersonalDataCollectorResult Collect(IEnumerable identities, string outputFormat) + { + using (var writer = CreateWriter(outputFormat)) + { + var dataCollector = new SampleContactDataCollectorCore(writer); + return new PersonalDataCollectorResult + { + Text = dataCollector.CollectData(identities) + }; + } + } + + + private IPersonalDataWriter CreateWriter(string outputFormat) + { + switch (outputFormat.ToLowerInvariant()) + { + case PersonalDataFormat.MACHINE_READABLE: + return new XmlPersonalDataWriter(); + + case PersonalDataFormat.HUMAN_READABLE: + default: + return new HumanReadablePersonalDataWriter(); + } + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleContactDataCollectorCore.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleContactDataCollectorCore.cs new file mode 100644 index 0000000..e1b2c1f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleContactDataCollectorCore.cs @@ -0,0 +1,717 @@ +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; +using System.Xml; + +using CMS.Activities; +using CMS.ContactManagement; +using CMS.DataEngine; +using CMS.DataProtection; +using CMS.Globalization; +using CMS.Helpers; +using CMS.OnlineForms; + +namespace Samples.DancingGoat +{ + /// + /// Class responsible for retrieving contact's personal data. + /// + internal class SampleContactDataCollectorCore + { + // Lists store Tuples of database column names and their corresponding display names. + private readonly List contactInfoColumns = new List { + new CollectedColumn("ContactFirstName", "First name"), + new CollectedColumn("ContactMiddleName", "Middle name"), + new CollectedColumn("ContactLastName", "Last name"), + new CollectedColumn("ContactJobTitle", "Job title"), + new CollectedColumn("ContactAddress1", "Address"), + new CollectedColumn("ContactCity", "City"), + new CollectedColumn("ContactZIP", "ZIP"), + new CollectedColumn("ContactStateID", ""), + new CollectedColumn("ContactCountryID", ""), + new CollectedColumn("ContactMobilePhone", "Mobile phone"), + new CollectedColumn("ContactBusinessPhone", "Business phone"), + new CollectedColumn("ContactEmail", "Email"), + new CollectedColumn("ContactBirthday", "Birthday"), + new CollectedColumn("ContactGender", "Gender"), + new CollectedColumn("ContactNotes", "Notes"), + new CollectedColumn("ContactGUID", "GUID"), + new CollectedColumn("ContactLastModified", "Last modified"), + new CollectedColumn("ContactCreated", "Created"), + new CollectedColumn("ContactCampaign", "Campaign"), + new CollectedColumn("ContactCompanyName", "Company name") + }; + + + private readonly List consentAgreementInfoColumns = new List { + new CollectedColumn("ConsentAgreementGuid", "GUID"), + new CollectedColumn("ConsentAgreementRevoked", "Consent action"), + new CollectedColumn("ConsentAgreementTime", "Performed on") + }; + + + private readonly List consentInfoColumns = new List { + new CollectedColumn("ConsentGUID", "GUID"), + new CollectedColumn("ConsentDisplayName", "Consent name"), + new CollectedColumn("ConsentContent", "Full text") + }; + + + private readonly List consentArchiveInfoColumns = new List { + new CollectedColumn("ConsentArchiveGUID", "GUID"), + new CollectedColumn("ConsentArchiveContent", "Full text") + }; + + + private readonly List activityInfoColumns = new List { + new CollectedColumn("ActivityId", "ID"), + new CollectedColumn("ActivityCreated", "Created"), + new CollectedColumn("ActivityType", "Type"), + new CollectedColumn("ActivityUrl", "URL"), + new CollectedColumn("ActivityTitle", "Title"), + new CollectedColumn("ActivityItemId", "") + }; + + + private readonly List accountInfoColumns = new List { + new CollectedColumn("AccountName", "Name"), + new CollectedColumn("AccountAddress1", "Address"), + new CollectedColumn("AccountAddress2", "Address 2"), + new CollectedColumn("AccountCity", "City"), + new CollectedColumn("AccountZip", "ZIP"), + new CollectedColumn("AccountWebSite", "Web site"), + new CollectedColumn("AccountEmail", "Email"), + new CollectedColumn("AccountPhone", "Phone"), + new CollectedColumn("AccountFax", "Fax"), + new CollectedColumn("AccountNotes", "Notes"), + new CollectedColumn("AccountGUID", "GUID") + }; + + + private readonly List countryInfoColumns = new List { + new CollectedColumn("CountryDisplayName", "Country") + }; + + + private readonly List stateInfoColumns = new List { + new CollectedColumn("StateDisplayName", "State") + }; + + + private readonly List contactGroupInfoColumns = new List { + new CollectedColumn("ContactGroupGUID", "GUID"), + new CollectedColumn("ContactGroupName", "Contact group name"), + new CollectedColumn("ContactGroupDescription", "Contact group description") + }; + + + /// + /// Defines form's columns containing personal data. + /// + private sealed class FormDefinition + { + /// + /// The form's column name that contains the user's consent agreement. + /// + public const string FORM_CONSENT_COLUMN_NAME = "Consent"; + + + /// + /// Gets the email column name. + /// + public string EmailColumn { get; } + + + /// + /// Gets the code name and the display name of form fields. + /// + public List FormColumns { get; } + + + /// + /// Initializes . + /// + public FormDefinition(string emailColumn, List formColumns) + { + EmailColumn = emailColumn; + FormColumns = formColumns; + } + } + + + private readonly IPersonalDataWriter writer; + + + // Dancing Goat specific forms definitions + // GUIDs are used to select only specific forms on the Dancing Goat sample site + private readonly Dictionary dancingGoatForms = new Dictionary() + { + { + // BusinessCustomerRegistration + new Guid("0A5ACBBF-48B9-40DA-B431-53491588CDA7"), + new FormDefinition( + "Email", + new List + { + new CollectedColumn("CompanyName", "Company name"), + new CollectedColumn("FirstName", "First name"), + new CollectedColumn("LastName", "Last name"), + new CollectedColumn("Phone", "Phone"), + new CollectedColumn("BecomePartner", "Become partner"), + new CollectedColumn("FormInserted", "Form inserted"), + new CollectedColumn("FormUpdated", "Form updated") + } + ) + }, + { + // ContactUs + new Guid("C7A6E59B-50F7-4039-ADEA-42164054E5EF"), + new FormDefinition( + "UserEmail", + new List + { + new CollectedColumn("UserFirstName", "First name"), + new CollectedColumn("UserLastName", "Last name"), + new CollectedColumn("UserMessage", "Message"), + new CollectedColumn("FormInserted", "Form inserted"), + new CollectedColumn("FormUpdated", "Form updated") + } + ) + }, + { + // MachineRental + new Guid("8D0A178A-0CD1-4E95-8B37-B0B63CD28BFE"), + new FormDefinition( + "Email", + new List + { + new CollectedColumn("Machine", "Machine"), + new CollectedColumn("RentalPeriod", "Rental period"), + new CollectedColumn("Details", "Details"), + new CollectedColumn("FormInserted", "Form inserted"), + new CollectedColumn("FormUpdated", "Form updated") + } + ) + }, + { + // TryAFreeSample + new Guid("4BE995DD-7675-4004-8BEF-0CF3971CBA9B"), + new FormDefinition( + "EmailAddress", + new List + { + new CollectedColumn("FormInserted", "Form inserted"), + new CollectedColumn("FormUpdated", "Form updated"), + new CollectedColumn("FirstName", "First name"), + new CollectedColumn("LastName", "Last name"), + new CollectedColumn("Address", "Address"), + new CollectedColumn("City", "City"), + new CollectedColumn("ZIPCode", "ZIP Code"), + new CollectedColumn("Country", "Country"), + new CollectedColumn("State", "State") + } + ) + }, + // MVC Dancing Goat + { + // ContactUsNew MVC + new Guid("F8C649F9-47DA-4C46-8ABF-A228D593A807"), + new FormDefinition( + "UserEmail", + new List + { + new CollectedColumn("UserFirstName", "First name"), + new CollectedColumn("UserLastName", "Last name"), + new CollectedColumn("UserMessage", "Message"), + new CollectedColumn("FormInserted", "Form inserted"), + new CollectedColumn("FormUpdated", "Form updated") + } + ) + }, + { + // SampleList MVC + new Guid("E03EFE11-8C46-413E-B450-431CD1809979"), + new FormDefinition( + "Email", + new List + { + new CollectedColumn("FormInserted", "Form inserted"), + new CollectedColumn("FormUpdated", "Form updated"), + new CollectedColumn("FirstName", "First name"), + new CollectedColumn("LastName", "Last name"), + new CollectedColumn("Address", "Address"), + new CollectedColumn("City", "City"), + new CollectedColumn("ZIPCode", "ZIP Code"), + new CollectedColumn("Country", "Country"), + new CollectedColumn("State", "State") + } + ) + } + }; + + + private object TransformGenderValue(string columnName, object columnValue) + { + if (columnName.Equals("ContactGender", StringComparison.InvariantCultureIgnoreCase)) + { + var gender = columnValue as int?; + switch (gender) + { + case 1: + return "male"; + case 2: + return "female"; + case 0: + default: + return "undefined"; + } + } + + return columnValue; + } + + + private object TransfromConsentText(string columnName, object columnValue) + { + if (columnName.Equals("ConsentContent", StringComparison.InvariantCultureIgnoreCase) || + columnName.Equals("ConsentArchiveContent", StringComparison.InvariantCultureIgnoreCase)) + { + var consentXml = new XmlDocument(); + consentXml.LoadXml((columnValue as string) ?? String.Empty); + + // Select the first node + var xmlNode = consentXml.SelectSingleNode("/ConsentContent/ConsentLanguageVersions/ConsentLanguageVersion/FullText"); + + // Strip HTML tags + var result = HTMLHelper.StripTags(xmlNode?.InnerText); + + return result; + } + + return columnValue; + } + + + private object TransformConsentAction(string columnName, object columnValue) + { + if (columnName.Equals("ConsentAgreementRevoked", StringComparison.InvariantCultureIgnoreCase)) + { + var revoked = (bool)columnValue; + + return revoked ? "Revoked" : "Agreed"; + } + + return columnValue; + } + + + /// + /// Constructs a new instance of the . + /// + /// Writer to format output data. + public SampleContactDataCollectorCore(IPersonalDataWriter writer) + { + this.writer = writer; + } + + + /// + /// Collect and format all on-line marketing related personal data about given . + /// Returns null if no data was found. + /// + /// Identities to collect data about. + /// Formatted personal data. + public string CollectData(IEnumerable identities) + { + var contacts = identities.OfType().ToList(); + if (!contacts.Any()) + { + return null; + } + + var contactIDs = contacts.Select(c => c.ContactID).ToList(); + var contactEmails = contacts.Select(c => c.ContactEmail).ToList(); + + var contactActivities = ActivityInfo.Provider.Get() + .Columns(activityInfoColumns.Select(t => t.Name)) + .WhereIn("ActivityContactID", contactIDs).ToList(); + + // Gets distinct contact groups for data subject represented by its identities + var contactContactGroups = contacts + .SelectMany(c => c.ContactGroups) + .GroupBy(c => c.ContactGroupID) + .Select(group => group.First()); + + writer.WriteStartSection("OnlineMarketingData", "Online marketing data"); + + WriteContacts(contacts); + WriteConsents(contactIDs); + WriteContactActivities(contactActivities); + WriteContactAccounts(contactIDs); + WriteContactGroups(contactContactGroups); + WriteDancingGoatSubmittedFormsData(contactEmails, contactIDs); + + writer.WriteEndSection(); + + return writer.GetResult(); + } + + + /// + /// Writes all contacts. + /// + /// Container of contacts. + private void WriteContacts(IEnumerable contacts) + { + foreach (var contactInfo in contacts) + { + writer.WriteStartSection(ContactInfo.OBJECT_TYPE, "Contact"); + writer.WriteBaseInfo(contactInfo, contactInfoColumns, TransformGenderValue); + + var countryID = contactInfo.ContactCountryID; + var stateID = contactInfo.ContactStateID; + if (countryID != 0) + { + writer.WriteBaseInfo(CountryInfo.Provider.Get(countryID), countryInfoColumns); + } + if (stateID != 0) + { + writer.WriteBaseInfo(StateInfo.Provider.Get(stateID), stateInfoColumns); + } + + writer.WriteEndSection(); + } + } + + + /// + /// Writes data subject's consents. + /// + /// List of contact IDs. + private void WriteConsents(ICollection contactIDs) + { + var consentsData = ConsentAgreementInfo.Provider.Get() + .Source(s => s.Join("CMS_ConsentAgreement.ConsentAgreementConsentID", "ConsentID")) + .Source(s => s.LeftJoin("CMS_ConsentAgreement.ConsentAgreementConsentHash", "ConsentArchiveHash")) + .WhereIn("ConsentAgreementContactID", contactIDs) + .OrderBy("ConsentID") + .OrderByDescending("ConsentAgreementTime") + .Result; + + if (DataHelper.DataSourceIsEmpty(consentsData)) + { + return; + } + + // The consents and consentRevocations are specific for given consent, indexed by ConsentID + var consents = new Dictionary(); + var consentRevocations = new Dictionary>(); + + // The consentContentArchives and consentContentAgreements are specific for consent content, indexed by consent hash + var consentContentArchives = new Dictionary(StringComparer.OrdinalIgnoreCase); + var consentContentAgreements = new Dictionary>(StringComparer.OrdinalIgnoreCase); + + foreach (var row in consentsData.Tables[0].AsEnumerable()) + { + var consentAgreementInfo = new ConsentAgreementInfo(row); + + ConsentInfo consentInfo; + if (!consents.TryGetValue(consentAgreementInfo.ConsentAgreementConsentID, out consentInfo)) + { + consentInfo = new ConsentInfo(row); + consents.Add(consentAgreementInfo.ConsentAgreementConsentID, consentInfo); + } + + if (consentAgreementInfo.ConsentAgreementRevoked) + { + var revocationsOfSameConsent = GetRevocationsOfSameConsent(consentRevocations, consentAgreementInfo.ConsentAgreementConsentID); + revocationsOfSameConsent.Add(consentAgreementInfo); + } + else + { + var agreementsOfSameConsentContent = GetAgreementsOfSameConsentContent(consentContentAgreements, consentAgreementInfo.ConsentAgreementConsentHash); + agreementsOfSameConsentContent.Add(consentAgreementInfo); + + if (IsAgreementOfDifferentConsentContent(consentAgreementInfo, consentInfo) && !consentContentArchives.ContainsKey(consentAgreementInfo.ConsentAgreementConsentHash)) + { + consentContentArchives.Add(consentAgreementInfo.ConsentAgreementConsentHash, new ConsentArchiveInfo(row)); + } + } + } + + WriteConsents(consents, consentContentArchives, consentContentAgreements, consentRevocations); + } + + + /// + /// Gets list of revocations of same consent from given if presented in the dictionary. + /// Otherwise creates new empty list and inserts it into dictionary under key. + /// + /// Dictionary with consents revocations indexed by ConsentID. + /// Consent ID. + private static List GetRevocationsOfSameConsent(Dictionary> consentRevocations, int consentId) + { + List revocationsOfSameConsent; + if (!consentRevocations.TryGetValue(consentId, out revocationsOfSameConsent)) + { + revocationsOfSameConsent = new List(); + consentRevocations.Add(consentId, revocationsOfSameConsent); + } + + return revocationsOfSameConsent; + } + + + /// + /// Gets list of agreements of same consent content from given if presented in the dictionary. + /// Otherwise creates new empty list and inserts it into dictionary under key. + /// + /// Dictionary with consent agreements indexed by consent hash. + /// Consent hash. + private static List GetAgreementsOfSameConsentContent(Dictionary> consentContentAgreements, string consentHash) + { + List agreementsOfSameConsent; + if (!consentContentAgreements.TryGetValue(consentHash, out agreementsOfSameConsent)) + { + agreementsOfSameConsent = new List(); + consentContentAgreements.Add(consentHash, agreementsOfSameConsent); + } + + return agreementsOfSameConsent; + } + + + /// + /// Returns true if is agreement of given , otherwise false. + /// + /// Consent agreement. + /// Consent. + private static bool IsAgreementOfDifferentConsentContent(ConsentAgreementInfo consentAgreementInfo, ConsentInfo consentInfo) + { + return consentAgreementInfo.ConsentAgreementConsentHash != consentInfo.ConsentHash; + } + + + /// + /// Writes data subject's consents. + /// + /// Dictionary with consents indexed by ConsentID. + /// Dictionary with consent archive items indexed by consent hash. + /// Dictionary with consent agreements indexed by consent hash. + /// Dictionary with consent revocation indexed by ConsentID. + private void WriteConsents(Dictionary consents, Dictionary consentContentArchives, + Dictionary> consentContentAgreements, Dictionary> consentRevocations) + { + foreach (var agreementsOfSameConsentContent in consentContentAgreements.Values) + { + var consentAgreement = agreementsOfSameConsentContent.FirstOrDefault(); + + var consentInfo = consents[consentAgreement.ConsentAgreementConsentID]; + + ConsentArchiveInfo consentArchiveInfo; + consentContentArchives.TryGetValue(consentAgreement.ConsentAgreementConsentHash, out consentArchiveInfo); + + List revocationsOfSameConsent; + consentRevocations.TryGetValue(consentAgreement.ConsentAgreementConsentID, out revocationsOfSameConsent); + + WriteConsent(consentInfo, consentArchiveInfo, agreementsOfSameConsentContent, revocationsOfSameConsent); + } + } + + + /// + /// Writes section with Consent. + /// + /// Consent. + /// Consent archive. Can be null if archive item for given does not exist. + /// Agreements of given . + /// Revocations of given . Can be null if no revocations for given have been given. + private void WriteConsent(ConsentInfo consentInfo, ConsentArchiveInfo consentArchiveInfo, IEnumerable consentAgreements, + IEnumerable consentRevocations) + { + writer.WriteStartSection(ConsentInfo.OBJECT_TYPE, "Consent"); + + var agreedConsentLastModified = consentArchiveInfo?.ConsentArchiveLastModified ?? consentInfo.ConsentLastModified; + + WriteConsentContent(consentInfo, consentArchiveInfo); + WriteConsentAgreements(consentAgreements); + WriteConsentRevocations(consentRevocations?.Where(cr => cr.ConsentAgreementTime > agreedConsentLastModified)); + + writer.WriteEndSection(); + } + + + /// + /// Writes consent content. + /// + /// Consent. + /// Consent archive. Can be null if archive item for given does not exist. + private void WriteConsentContent(ConsentInfo consentInfo, ConsentArchiveInfo consentArchiveInfo) + { + if (consentArchiveInfo == null) + { + writer.WriteBaseInfo(consentInfo, consentInfoColumns, TransfromConsentText); + } + else + { + writer.WriteSectionValue("ConsentDisplayName", "Consent name", consentInfo.ConsentDisplayName); + writer.WriteBaseInfo(consentArchiveInfo, consentArchiveInfoColumns, TransfromConsentText); + } + } + + + /// + /// Writes consent agreements. + /// + /// Consent agreements. + private void WriteConsentAgreements(IEnumerable consentAgreements) + { + foreach (var consentAgreement in consentAgreements) + { + writer.WriteBaseInfo(consentAgreement, consentAgreementInfoColumns, TransformConsentAction); + } + } + + + /// + /// Writes consent revocations. + /// + /// Consent revocations. Can be null if no revocations have been given. + private void WriteConsentRevocations(IEnumerable consentRevocations) + { + if (consentRevocations == null) + { + return; + } + + foreach (var consentRevocation in consentRevocations) + { + writer.WriteBaseInfo(consentRevocation, consentAgreementInfoColumns, TransformConsentAction); + } + } + + + /// + /// Writes all contact activities. + /// + /// List of contact activities. + private void WriteContactActivities(IEnumerable contactActivities) + { + foreach (var contactActivityInfo in contactActivities) + { + writer.WriteStartSection(ActivityInfo.OBJECT_TYPE, "Activity"); + + writer.WriteBaseInfo(contactActivityInfo, activityInfoColumns); + + writer.WriteEndSection(); + } + } + + + /// + /// Gets and writes all contact accounts for specified . + /// + /// List of contact IDs. + private void WriteContactAccounts(ICollection contactIDs) + { + var accountIDs = AccountContactInfo.Provider.Get() + .WhereIn("ContactID", contactIDs) + .Column("AccountID") + .Distinct(); + var accountInfos = AccountInfo.Provider.Get() + .Columns(accountInfoColumns.Select(t => t.Name)) + .WhereIn("AccountID", accountIDs) + .ToList(); + + var countryInfos = CountryInfo.Provider.Get() + .WhereIn("CountryID", accountInfos.Select(r => r.AccountCountryID).ToList()) + .ToDictionary(ci => ci.CountryID); + var stateInfos = StateInfo.Provider.Get() + .WhereIn("StateID", accountInfos.Select(r => r.AccountStateID).ToList()) + .ToDictionary(si => si.StateID); + + foreach (var accountInfo in accountInfos) + { + CountryInfo countryInfo; + StateInfo stateInfo; + countryInfos.TryGetValue(accountInfo.AccountCountryID, out countryInfo); + stateInfos.TryGetValue(accountInfo.AccountStateID, out stateInfo); + + writer.WriteStartSection(AccountInfo.OBJECT_TYPE, "Account"); + + writer.WriteBaseInfo(accountInfo, accountInfoColumns); + + if (countryInfo != null) + { + writer.WriteBaseInfo(countryInfo, countryInfoColumns); + } + + if (stateInfo != null) + { + writer.WriteBaseInfo(stateInfo, stateInfoColumns); + } + + writer.WriteEndSection(); + } + } + + + /// + /// Writes all contact groups. + /// + /// Contact groups of a specified contact. + private void WriteContactGroups(IEnumerable contactContactGroups) + { + foreach (var contactGroupInfo in contactContactGroups) + { + writer.WriteStartSection(ContactGroupInfo.OBJECT_TYPE, "Contact group"); + writer.WriteBaseInfo(contactGroupInfo, contactGroupInfoColumns); + writer.WriteEndSection(); + } + } + + + /// + /// Gets and writes all submitted forms with data on Dancing Goat site for specified and . + /// + private void WriteDancingGoatSubmittedFormsData(ICollection emails, ICollection contactIDs) + { + var consentAgreementGuids = ConsentAgreementInfo.Provider.Get() + .Columns("ConsentAgreementGuid") + .WhereIn("ConsentAgreementContactID", contactIDs); + + var formClasses = BizFormInfo.Provider.Get() + .Source(s => s.InnerJoin("CMS_Form.FormClassID", "ClassID")) + .WhereIn("FormGUID", dancingGoatForms.Keys); + + formClasses.ForEachRow(row => + { + var bizForm = new BizFormInfo(row); + var formClass = new DataClassInfo(row); + var formDefinition = dancingGoatForms[bizForm.FormGUID]; + + var bizFormItems = BizFormItemProvider.GetItems(formClass.ClassName) + .Columns(formDefinition.FormColumns.Select(t => t.Name)) + .WhereIn(formDefinition.EmailColumn, emails); + + // Expand query if the current form contains column with consents + if (formClass.ClassFormDefinition.Contains(FormDefinition.FORM_CONSENT_COLUMN_NAME)) + { + bizFormItems.Or().WhereIn(FormDefinition.FORM_CONSENT_COLUMN_NAME, consentAgreementGuids); + } + + foreach (var bizFormItem in bizFormItems) + { + writer.WriteStartSection("SubmittedForm", "Submitted form"); + + writer.WriteSectionValue("FormDisplayName", "Form display name", bizForm.FormDisplayName); + writer.WriteSectionValue("FormGUID", "Form GUID", bizForm.FormGUID.ToString()); + writer.WriteBaseInfo(bizFormItem, formDefinition.FormColumns); + + writer.WriteEndSection(); + } + }); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleMemberDataCollector.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleMemberDataCollector.cs new file mode 100644 index 0000000..ee7ed55 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleMemberDataCollector.cs @@ -0,0 +1,45 @@ +using System.Collections.Generic; + +using CMS.DataEngine; +using CMS.DataProtection; + +namespace Samples.DancingGoat +{ + /// + /// Sample implementation of interface for collecting members's personal data. + /// + internal class SampleMemberDataCollector : IPersonalDataCollector + { + /// + /// Collects personal data based on given . + /// + /// Collection of identities representing a data subject. + /// Defines an output format for the result. + /// containing personal data. + public PersonalDataCollectorResult Collect(IEnumerable identities, string outputFormat) + { + using (var writer = CreateWriter(outputFormat)) + { + var dataCollector = new SampleMemberDataCollectorCore(writer); + return new PersonalDataCollectorResult + { + Text = dataCollector.CollectData(identities) + }; + } + } + + + private IPersonalDataWriter CreateWriter(string outputFormat) + { + switch (outputFormat.ToLowerInvariant()) + { + case PersonalDataFormat.MACHINE_READABLE: + return new XmlPersonalDataWriter(); + + case PersonalDataFormat.HUMAN_READABLE: + default: + return new HumanReadablePersonalDataWriter(); + } + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleMemberDataCollectorCore.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleMemberDataCollectorCore.cs new file mode 100644 index 0000000..9a05f05 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/SampleMemberDataCollectorCore.cs @@ -0,0 +1,75 @@ +using System.Collections.Generic; +using System.Linq; + +using CMS.DataEngine; +using CMS.Membership; + +namespace Samples.DancingGoat +{ + /// + /// Class responsible for retrieving members's personal data. + /// + internal class SampleMemberDataCollectorCore + { + // Lists store Tuples of database column names and their corresponding display names. + private readonly List memberInfoColumns = new List { + new CollectedColumn("MemberName", "Name"), + new CollectedColumn("MemberIsExternal", "Is external"), + new CollectedColumn("MemberEmail", "Email"), + new CollectedColumn("MemberEnabled", "Enabled"), + new CollectedColumn("MemberCreated", "Created"), + new CollectedColumn("MemberID", "ID"), + }; + + + private readonly IPersonalDataWriter writer; + + + /// + /// Constructs a new instance of the . + /// + /// Writer to format output data. + public SampleMemberDataCollectorCore(IPersonalDataWriter writer) + { + this.writer = writer; + } + + + /// + /// Collect and format all member personal data about given . + /// Returns null if no data was found. + /// + /// Identities to collect data about. + /// Formatted personal data. + public string CollectData(IEnumerable identities) + { + var memberInfos = identities.OfType().ToList(); + if (!memberInfos.Any()) + { + return null; + } + + writer.WriteStartSection("MemberData", "Member data"); + + foreach (var memberInfo in memberInfos) + { + WriteMemberInfo(memberInfo); + } + + writer.WriteEndSection(); + + return writer.GetResult(); + } + + + /// + /// Writes base info for given member to the current writer. + /// + private void WriteMemberInfo(MemberInfo memberInfo) + { + writer.WriteStartSection(MemberInfo.OBJECT_TYPE, "Member"); + writer.WriteBaseInfo(memberInfo, memberInfoColumns); + writer.WriteEndSection(); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/Writers/HumanReadablePersonalDataWriter.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/Writers/HumanReadablePersonalDataWriter.cs new file mode 100644 index 0000000..d9f9d16 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/Writers/HumanReadablePersonalDataWriter.cs @@ -0,0 +1,184 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Text; + +using CMS.Base; +using CMS.DataEngine; + +namespace Samples.DancingGoat +{ + /// + /// Class used to transform data into human readable format. + /// + internal sealed class HumanReadablePersonalDataWriter : IPersonalDataWriter + { + private readonly StringBuilder stringBuilder; + private int indentationLevel; + private bool ignoreNewLine; + + private static readonly string DECIMAL_PRECISION = new string('#', 26); + private static readonly string DECIMAL_FORMAT = "{0:0.00" + DECIMAL_PRECISION + "}"; + + /// + /// Culture used to format values. + /// + public CultureInfo Culture + { + get; + set; + } = new CultureInfo(SystemContext.SYSTEM_CULTURE_NAME); + + + /// + /// Initializes instance of + /// + public HumanReadablePersonalDataWriter() + { + stringBuilder = new StringBuilder(); + indentationLevel = 0; + ignoreNewLine = false; + } + + + /// + /// Writes start of a section using followed by colon and increments indentation. + /// + /// Name of the section in machine readable format. This parameter is ignored. + /// Name of the section in human readable format. + public void WriteStartSection(string sectionName, string sectionDisplayName) + { + ignoreNewLine = false; + Indent(); + + stringBuilder.AppendLine(sectionDisplayName + ": "); + indentationLevel++; + } + + + /// + /// Writes appropriate indentation. + /// + private void Indent() + { + stringBuilder.Append('\t', indentationLevel); + } + + + /// + /// Writes data out of 's specified . + /// + /// + /// Omits columns with missing human readable name, ID and GUID columns. + /// + /// instance to write. + /// Columns to write 's data from. + /// Use this parameter to transform values from database. + /// Thrown when is null. + public void WriteBaseInfo(BaseInfo baseInfo, List columns, Func valueTransformationFunction = null) + { + if (baseInfo == null) + { + throw new ArgumentNullException(nameof(baseInfo)); + } + + foreach (var column in columns) + { + var columnName = column.Name; + var columnDisplayName = column.DisplayName; + if (String.IsNullOrWhiteSpace(columnDisplayName) || columnName.Equals(baseInfo.TypeInfo.IDColumn, StringComparison.Ordinal) || columnName.Equals(baseInfo.TypeInfo.GUIDColumn, StringComparison.Ordinal)) + { + continue; + } + + object value = baseInfo.GetValue(columnName); + if (value == null) + { + continue; + } + + if (valueTransformationFunction != null) + { + value = valueTransformationFunction(columnName, value); + } + + WriteKeyValue(columnDisplayName, value); + } + } + + + /// + /// Writes section with value on one line, enclosed in start and end section elements. + /// + /// Name of the section in machine readable format. + /// Name of the section in human readable format. + /// Value of element. + public void WriteSectionValue(string sectionName, string sectionDisplayName, string value) + { + Indent(); + stringBuilder.AppendFormat("{0}: {1}", sectionDisplayName, value); + stringBuilder.AppendLine(); + } + + + /// + /// Writes in-line key name followed by column and value. + /// + /// Key name to write. + /// Value associated with key. + private void WriteKeyValue(string keyName, object value) + { + Indent(); + stringBuilder.AppendFormat("{0}: ", keyName); + + string format = "{0}"; + + if (value is decimal) + { + format = DECIMAL_FORMAT; + } + + stringBuilder.AppendFormat(Culture, format, value); + stringBuilder.AppendLine(); + + ignoreNewLine = true; + } + + + /// + /// Ends section with new line, decreases indentation level. + /// + /// + /// Does not write new line if the last written character was new line. + /// + public void WriteEndSection() + { + indentationLevel--; + if (!ignoreNewLine) + { + Indent(); + stringBuilder.AppendLine(); + ignoreNewLine = true; + } + } + + + /// + /// Gets result of previous write calls. + /// + /// String containing formatted data. + public string GetResult() + { + return stringBuilder.ToString(); + } + + + /// + /// Releases all resources used by the current instance of the class. + /// + /// + /// This is a void action in as the class uses no disposable resources. + /// + public void Dispose() { /* No op */ } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/Writers/IPersonalDataWriter.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/Writers/IPersonalDataWriter.cs new file mode 100644 index 0000000..697484d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/Writers/IPersonalDataWriter.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; + +using CMS.DataEngine; + +namespace Samples.DancingGoat +{ + /// + /// Defines interface of a writer used to format personal data. + /// + internal interface IPersonalDataWriter : IDisposable + { + /// + /// Writes start of a section. + /// + /// Name of the section in machine readable format. + /// Name of the section in human readable format. + void WriteStartSection(string sectionName, string sectionDisplayName); + + + /// + /// Writes data out of 's specified . + /// + /// instance to write. + /// 's columns to write data from. + /// Use this function to transform values from database. + void WriteBaseInfo(BaseInfo baseInfo, List columns, Func valueTransformationFunction = null); + + + /// + /// Writes section with value on one line, enclosed in start and end section elements. + /// + /// Name of the section in machine readable format. + /// Name of the section in human readable format. + /// Value of element. + void WriteSectionValue(string sectionName, string sectionDisplayName, string value); + + + /// + /// Writes end of a section. + /// + void WriteEndSection(); + + + /// + /// Gets result of previous write calls. + /// + /// String containing formatted data. + string GetResult(); + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/Writers/XmlPersonalDataWriter.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/Writers/XmlPersonalDataWriter.cs new file mode 100644 index 0000000..6ba6b3d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataCollectors/Writers/XmlPersonalDataWriter.cs @@ -0,0 +1,138 @@ +using System; +using System.Collections.Generic; +using System.Text; +using System.Xml; + +using CMS.DataEngine; +using CMS.Helpers; + +namespace Samples.DancingGoat +{ + /// + /// Writer used to transform data into XML format. + /// + internal sealed class XmlPersonalDataWriter : IPersonalDataWriter + { + private readonly StringBuilder stringBuilder; + private readonly XmlWriter xmlWriter; + + + /// + /// Initializes instance of + /// + public XmlPersonalDataWriter() + { + stringBuilder = new StringBuilder(); + xmlWriter = XmlWriter.Create(stringBuilder, new XmlWriterSettings { Indent = true, OmitXmlDeclaration = true }); + } + + + /// + /// Writes XML start tag. + /// + /// Name of the section in machine readable format. Represents name of the tag. + /// Name of the section in human readable format. This parameter is ignored. + public void WriteStartSection(string sectionName, string sectionDisplayName) + { + xmlWriter.WriteStartElement(TransformElementName(sectionName)); + } + + + /// + /// Replaces underscore in object names with dot. + /// + /// Name to transform. + /// Transformed name. + private string TransformElementName(string originalName) + { + return originalName.Replace('.', '_'); + } + + + /// + /// Writes data out of 's specified . + /// + /// + /// Omits columns with missing human readable name. + /// + /// instance to write. + /// Columns to write 's data from. + /// Use this parameter to transform values from database. + /// Thrown when is null. + public void WriteBaseInfo(BaseInfo baseInfo, List columns, Func valueTransformationFunction = null) + { + if (baseInfo == null) + { + throw new ArgumentNullException(nameof(baseInfo)); + } + + foreach (var columnTuple in columns) + { + var columnName = columnTuple.Name; + if (string.IsNullOrWhiteSpace(columnTuple.DisplayName)) + { + continue; + } + + var value = baseInfo.GetValue(columnName); + if (value == null) + { + continue; + } + + if (valueTransformationFunction != null) + { + value = valueTransformationFunction(columnName, value); + } + + xmlWriter.WriteStartElement(columnName); + xmlWriter.WriteValue(XmlHelper.ConvertToString(value, value.GetType())); + xmlWriter.WriteEndElement(); + } + } + + + /// + /// Writes section with value on one line, enclosed in start and end section elements. + /// + /// Name of the section in machine readable format. + /// Name of the section in human readable format. + /// Value of element. + public void WriteSectionValue(string sectionName, string sectionDisplayName, string value) + { + xmlWriter.WriteStartElement(sectionName); + xmlWriter.WriteString(value); + xmlWriter.WriteEndElement(); + } + + + /// + /// Writes XML end tag. + /// + public void WriteEndSection() + { + xmlWriter.WriteEndElement(); + } + + + /// + /// Gets result of previous write calls. + /// + /// XML string containing formatted data. + public string GetResult() + { + xmlWriter.Flush(); + + return stringBuilder.ToString(); + } + + + /// + /// Releases all resources used by the current instance of the class. + /// + public void Dispose() + { + xmlWriter.Dispose(); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataErasers/SampleContactPersonalDataEraser.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataErasers/SampleContactPersonalDataEraser.cs new file mode 100644 index 0000000..447db4d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataErasers/SampleContactPersonalDataEraser.cs @@ -0,0 +1,195 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using CMS.Activities; +using CMS.Base; +using CMS.ContactManagement; +using CMS.DataEngine; +using CMS.DataProtection; +using CMS.Helpers; +using CMS.OnlineForms; + +namespace Samples.DancingGoat +{ + /// + /// Sample implementation of interface for erasing contact's personal data. + /// + internal class SampleContactPersonalDataEraser : IPersonalDataEraser + { + /// + /// Defines forms to delete personal data from and name of the column where data subject's email be found. + /// + /// + /// GUIDs are used to select only specific forms on the Dancing Goat sample sites. + /// + private readonly Dictionary dancingGoatForms = new Dictionary + { + // DancingGoatCoreContactUsNew - CORE + { new Guid("129D9CED-D72F-407E-A604-7FFDE2B638EA"), "UserEmail" }, + // DancingGoatCoreCoffeeSampleList - CORE + { new Guid("ED48BCBB-953A-4177-B1D2-C3512BBAB4A5"), "Email" } + }; + + /// + /// The form's column name that contains the user's consent agreement. + /// + private const string DANCING_GOAT_FORMS_CONSENT_COLUMN_NAME = "Consent"; + + + /// + /// Erases personal data based on given and . + /// + /// Collection of identities representing a data subject. + /// Configures which personal data should be erased. + /// + /// The erasure process can be configured via the following parameters: + /// + /// + /// DeleteContacts + /// Flag indicating whether contact(s) contained in are to be deleted. + /// + /// + /// deleteContactFromAccounts + /// Flag indicating whether contact's association with accounts is to be deleted. + /// + /// + /// DeleteActivities + /// Flag indicating whether activities of contact are to be deleted. + /// + /// + /// DeleteSubmittedFormsActivities + /// Flag indicating whether form activities of contact are to be deleted. + /// + /// + /// + public void Erase(IEnumerable identities, IDictionary configuration) + { + var contacts = identities.OfType(); + if (!contacts.Any()) + { + return; + } + + var contactIds = contacts.Select(c => c.ContactID).ToList(); + var contactEmails = contacts.Select(c => c.ContactEmail).ToList(); + + DeleteSubmittedFormsActivities(contactIds, configuration); + + DeleteActivities(contactIds, configuration); + + DeleteContactFromAccounts(contactIds, configuration); + + DeleteContacts(contacts, configuration); + + DeleteDancingGoatSubmittedFormsData(contactEmails, contactIds, configuration); + } + + + /// + /// Deletes contact's submitted forms activities based on 's DeleteSubmittedFormsActivities flag. + /// + /// Activities are deleted via bulk operation, considering the amount of activities for a contact. + private void DeleteSubmittedFormsActivities(ICollection contactIds, IDictionary configuration) + { + object deleteSubmittedFormsActivities; + if (configuration.TryGetValue("DeleteSubmittedFormsActivities", out deleteSubmittedFormsActivities) + && ValidationHelper.GetBoolean(deleteSubmittedFormsActivities, false)) + { + ActivityInfoProvider.ProviderObject.BulkDelete(new WhereCondition().WhereEquals("ActivityType", PredefinedActivityType.BIZFORM_SUBMIT) + .WhereIn("ActivityContactID", contactIds)); + } + } + + + /// + /// Deletes all DancingGoat submitted forms data for and , based on 's DeleteSubmittedFormsData flag. + /// + private void DeleteDancingGoatSubmittedFormsData(ICollection emails, ICollection contactIDs, IDictionary configuration) + { + object deleteSubmittedForms; + if (configuration.TryGetValue("DeleteSubmittedFormsData", out deleteSubmittedForms) + && ValidationHelper.GetBoolean(deleteSubmittedForms, false)) + { + var consentAgreementGuids = ConsentAgreementInfo.Provider.Get() + .Columns("ConsentAgreementGuid") + .WhereIn("ConsentAgreementContactID", contactIDs); + + var formClasses = BizFormInfo.Provider.Get() + .Source(s => s.LeftJoin("CMS_Form.FormClassID", "ClassID")) + .WhereIn("FormGUID", dancingGoatForms.Keys); + + formClasses.ForEachRow(row => + { + var bizForm = new BizFormInfo(row); + var formClass = new DataClassInfo(row); + string emailColumn = dancingGoatForms[bizForm.FormGUID]; + + var bizFormItems = BizFormItemProvider.GetItems(formClass.ClassName) + .WhereIn(emailColumn, emails); + + if (formClass.ClassFormDefinition.Contains(DANCING_GOAT_FORMS_CONSENT_COLUMN_NAME)) + { + bizFormItems.Or().WhereIn(DANCING_GOAT_FORMS_CONSENT_COLUMN_NAME, consentAgreementGuids); + } + + foreach (var bizFormItem in bizFormItems) + { + bizFormItem.Delete(); + } + }); + } + } + + + /// + /// Deletes contact's activities based on 's DeleteActivities flag. + /// + /// Activities are deleted via bulk operation, considering the amount of activities for a contact. + private void DeleteActivities(List contactIds, IDictionary configuration) + { + object deleteActivities; + if (configuration.TryGetValue("DeleteActivities", out deleteActivities) + && ValidationHelper.GetBoolean(deleteActivities, false)) + { + ActivityInfoProvider.ProviderObject.BulkDelete(new WhereCondition().WhereIn("ActivityContactID", contactIds)); + } + } + + + /// + /// Deletes contact from accounts based on 's deleteContactFromAccounts flag. + /// + private void DeleteContactFromAccounts(ICollection contactIds, IDictionary configuration) + { + object deleteContactFromAccounts; + if (configuration.TryGetValue("deleteContactFromAccounts", out deleteContactFromAccounts) + && ValidationHelper.GetBoolean(deleteContactFromAccounts, false)) + { + var accounts = AccountContactInfo.Provider.Get() + .WhereIn("ContactID", contactIds); + + foreach (var account in accounts) + { + account.Delete(); + } + } + } + + + /// + /// Deletes based on 's DeleteContacts flag. + /// + private static void DeleteContacts(IEnumerable contacts, IDictionary configuration) + { + object deleteContacts; + if (configuration.TryGetValue("DeleteContacts", out deleteContacts) && ValidationHelper.GetBoolean(deleteContacts, false)) + { + foreach (var contact in contacts) + { + ContactInfo.Provider.Delete(contact); + } + } + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataErasers/SampleMemberPersonalDataEraser.cs b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataErasers/SampleMemberPersonalDataEraser.cs new file mode 100644 index 0000000..6837450 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/DataProtectionSamples/PersonalDataErasers/SampleMemberPersonalDataEraser.cs @@ -0,0 +1,53 @@ +using System.Collections.Generic; +using System.Linq; + +using CMS.DataEngine; +using CMS.DataProtection; +using CMS.Helpers; +using CMS.Membership; + +namespace Samples.DancingGoat +{ + /// + /// Sample implementation of interface for erasing members's personal data. + /// + internal class SampleMemberPersonalDataEraser : IPersonalDataEraser + { + /// + /// Erases personal data based on given and . + /// + /// Collection of identities representing a data subject. + /// Configures which personal data should be erased. + /// + /// The erasure process can be configured via the following parameters: + /// + /// + /// DeleteMembers + /// Flag indicating whether member(s) contained in are to be deleted. + /// + /// + /// + public void Erase(IEnumerable identities, IDictionary configuration) + { + var members = identities.OfType().ToList(); + + DeleteMembers(members, configuration); + } + + + /// + /// Deletes all members, based on 's DeleteMembers flag. + /// + private static void DeleteMembers(List members, IDictionary configuration) + { + if (configuration.TryGetValue("deleteMembers", out object deleteMembers) + && ValidationHelper.GetBoolean(deleteMembers, false)) + { + foreach (var member in members) + { + MemberInfo.Provider.Delete(member); + } + } + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Gruntfile.js b/src/Kentico.Xperience.Lucene.Sample/Gruntfile.js new file mode 100644 index 0000000..62ee848 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Gruntfile.js @@ -0,0 +1,94 @@ +module.exports = function (grunt) { + + grunt.initConfig({ + clean: { + formBuilder: ['wwwroot/Content/Bundles/Public/formComponents.css', 'wwwroot/Content/Bundles/Public/formComponents.min.css', 'wwwroot/Content/Bundles/Admin/formComponents.css', 'wwwroot/Content/Bundles/Admin/formComponents.min.css', + 'wwwroot/Content/Bundles/Public/formComponents.js', 'wwwroot/Content/Bundles/Public/formComponents.min.js'], + pageBuilder: ['wwwroot/Content/Bundles/Public/pageComponents.css', 'wwwroot/Content/Bundles/Public/pageComponents.min.css', 'wwwroot/Content/Bundles/Admin/pageComponents.css', 'wwwroot/Content/Bundles/Admin/pageComponents.min.css', + 'wwwroot/Content/Bundles/Public/pageComponents.js', 'wwwroot/Content/Bundles/Public/pageComponents.min.js', 'wwwroot/Content/Bundles/Admin/pageComponents.js', 'wwwroot/Content/Bundles/Admin/pageComponents.min.js'] + }, + + concat: { + formBuilder: { + files: { + // Styles - live site + 'wwwroot/Content/Bundles/Public/formComponents.css': ['wwwroot/FormBuilder/Public/**/*.css'], + // Styles - admin + 'wwwroot/Content/Bundles/Admin/formComponents.css': ['wwwroot/FormBuilder/Admin/**/*.css'], + // Scripts - live site and admin + 'wwwroot/Content/Bundles/Public/formComponents.js': ['wwwroot/FormBuilder/Public/**/*.js'] + } + }, + pageBuilder: { + files: { + // Styles - live site + 'wwwroot/Content/Bundles/Public/pageComponents.css': ['wwwroot/PageBuilder/Public/**/*.css'], + // Styles - admin + 'wwwroot/Content/Bundles/Admin/pageComponents.css': ['wwwroot/PageBuilder/Admin/**/*.css'], + // Scripts - live site + 'wwwroot/Content/Bundles/Public/pageComponents.js': ['wwwroot/PageBuilder/Public/**/*.js'], + // Scripts - admin + 'wwwroot/Content/Bundles/Admin/pageComponents.js': ['wwwroot/PageBuilder/Admin/**/*.js'] + } + } + }, + + cssmin: { + formBuilder: { + files: { + 'wwwroot/Content/Bundles/Public/formComponents.min.css': 'wwwroot/Content/Bundles/Public/formComponents.css', + 'wwwroot/Content/Bundles/Admin/formComponents.min.css': 'wwwroot/Content/Bundles/Admin/formComponents.css' + } + }, + pageBuilder: { + files: { + 'wwwroot/Content/Bundles/Public/pageComponents.min.css': ['wwwroot/Content/Bundles/Public/pageComponents.css'], + 'wwwroot/Content/Bundles/Admin/pageComponents.min.css': ['wwwroot/Content/Bundles/Admin/pageComponents.css'] + } + } + }, + + terser: { + formBuilder: { + files: { + 'wwwroot/Content/Bundles/Public/formComponents.min.js': ['wwwroot/Content/Bundles/Public/formComponents.js'] + } + }, + pageBuilder: { + files: { + 'wwwroot/Content/Bundles/Public/pageComponents.min.js': ['wwwroot/Content/Bundles/Public/pageComponents.js'], + 'wwwroot/Content/Bundles/Admin/pageComponents.min.js': ['wwwroot/Content/Bundles/Admin/pageComponents.js'] + } + } + }, + + less: { + development: { + files: { + 'wwwroot/Content/Styles/Site.css': 'wwwroot/Content/Styles/Site.less', + 'wwwroot/Content/Styles/Landing-page.css': 'wwwroot/Content/Styles/Landing-page.less' + } + } + }, + watch: { + styles: { + files: ['wwwroot/Content/Styles/**/*.less'], + tasks: ['less'], + options: { + nospawn: true + } + } + } + }); + + grunt.loadNpmTasks('grunt-contrib-clean'); + grunt.loadNpmTasks('grunt-contrib-concat'); + grunt.loadNpmTasks('grunt-contrib-cssmin'); + grunt.loadNpmTasks('grunt-contrib-watch'); + grunt.loadNpmTasks('grunt-contrib-less'); + grunt.loadNpmTasks('grunt-terser'); + + grunt.registerTask('formBuilder', ['clean:formBuilder', 'concat:formBuilder', 'cssmin:formBuilder', 'terser:formBuilder']); + grunt.registerTask('pageBuilder', ['clean:pageBuilder', 'concat:pageBuilder', 'cssmin:pageBuilder', 'terser:pageBuilder']); + grunt.registerTask('default', ['less']); +}; \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/AreaRestrictionHelper.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/AreaRestrictionHelper.cs new file mode 100644 index 0000000..f454d15 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/AreaRestrictionHelper.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using Kentico.PageBuilder.Web.Mvc; + +namespace DancingGoat.Helpers +{ + /// + /// Provides filter methods to restrict the list of allowed widgets for editable areas. + /// + public static class AreaRestrictionHelper + { + /// + /// Gets list of widget identifiers allowed for landing page. + /// + public static string[] GetLandingPageRestrictions() + { + var allowedScopes = new[] { "Kentico.", "DancingGoat.General.", "DancingGoat.LandingPage." }; + + return GetWidgetsIdentifiers() + .Where(id => Array.Exists(allowedScopes, scope => id.StartsWith(scope, StringComparison.OrdinalIgnoreCase))) + .ToArray(); + } + + + /// + /// Gets list of widget identifiers allowed for home page. + /// + public static string[] GetHomePageRestrictions() + { + var deniedScopes = new[] { "DancingGoat.LandingPage." }; + + return GetWidgetsIdentifiers() + .Where(id => Array.Exists(deniedScopes, scope => !id.StartsWith(scope, StringComparison.OrdinalIgnoreCase))) + .ToArray(); + } + + + private static IEnumerable GetWidgetsIdentifiers() + { + return new ComponentDefinitionProvider() + .GetAll() + .Select(definition => definition.Identifier); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DancingGoatEmailLibrarySampleGeneratorExtensions.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DancingGoatEmailLibrarySampleGeneratorExtensions.cs new file mode 100644 index 0000000..d8c0103 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DancingGoatEmailLibrarySampleGeneratorExtensions.cs @@ -0,0 +1,64 @@ +using System; +using System.Linq; +using System.Threading.Tasks; + +using CMS.EmailLibrary; + +namespace DancingGoat.Helpers.Generator +{ + public static class DancingGoatEmailLibrarySampleGeneratorExtensions + { + private static readonly Guid AfterSubscriptionConfigurationPageGuid = Guid.Parse("F43AE10A-DA93-4A2F-99A6-D1B5E60AFBE6"); + private static readonly Guid AfterUnsubscriptionConfigurationPageGuid = Guid.Parse("9CC38A16-F679-4C51-AE27-F5176A6849B0"); + + + /// + /// Generates an email sample for testing and debugging the Dancing Goat site. + /// + public static async Task GenerateDancingGoatMailSample(this EmailLibrarySampleGenerator generator) + { + var contactsThatSubmittedSubscriptionForm = generator.GenerateContacts(47).ToList(); + var contactsThatConfirmedSubscription = contactsThatSubmittedSubscriptionForm.SkipLast(2).ToList(); + + var activeContacts = contactsThatConfirmedSubscription.Take(30).ToList(); + var softBouncedContacts = contactsThatConfirmedSubscription.Skip(30).Take(10).ToList(); + var hardBouncedContacts = contactsThatConfirmedSubscription.Skip(40).ToList(); + + var autoresponderTemplate = await generator.GenerateTemplateAsync(EmailType.FormAutoresponder); + var confirmationTemplate = await generator.GenerateTemplateAsync(EmailType.Confirmation); + var regularTemplate = await generator.GenerateTemplateAsync(EmailType.Regular); + + var subscriptionFormAutoresponder = await generator.GenerateConfigurationAsync(autoresponderTemplate); + var subscriptionConfirmation = await generator.GenerateConfigurationAsync(confirmationTemplate, "Subscription Confirmation"); + var unsubscriptionConfirmation = await generator.GenerateConfigurationAsync(confirmationTemplate, "Unsubscription Confirmation"); + var regularEmail = await generator.GenerateConfigurationAsync(regularTemplate); + + var recipientList = await generator.GenerateRecipientListAsync(subscriptionConfirmation, AfterSubscriptionConfigurationPageGuid, + unsubscriptionConfirmation, AfterUnsubscriptionConfigurationPageGuid); + + var autoresponderEmails = await generator.SimulateEmailSend(subscriptionFormAutoresponder, contactsThatSubmittedSubscriptionForm, recipientList); + + // It's intentionally called twice with slightly different numbers to create non-unique hits. + generator.GenerateEmailStatisticsHits(autoresponderEmails.SkipLast(1), autoresponderEmails.SkipLast(2)); + generator.GenerateEmailStatisticsHits(autoresponderEmails.SkipLast(2), autoresponderEmails.SkipLast(3)); + + generator.AddContactsToRecipientList(contactsThatConfirmedSubscription, recipientList); + + var confirmationEmails = await generator.SimulateEmailSend(subscriptionConfirmation, contactsThatConfirmedSubscription, recipientList); + generator.GenerateEmailStatisticsHits(confirmationEmails.SkipLast(1)); + generator.GenerateEmailStatisticsHits(confirmationEmails.SkipLast(2)); + + var deliveredRegularEmails = await generator.SimulateEmailSend(regularEmail, activeContacts, recipientList); + generator.GenerateEmailStatisticsHits(deliveredRegularEmails.SkipLast(1).Concat(deliveredRegularEmails.SkipLast(2)), + deliveredRegularEmails.SkipLast(2).Concat(deliveredRegularEmails.SkipLast(3))); + generator.GenerateEmailStatisticsHits(deliveredRegularEmails.SkipLast(2).Concat(deliveredRegularEmails.SkipLast(3)), + deliveredRegularEmails.SkipLast(3).Concat(deliveredRegularEmails.SkipLast(4))); + + // Generate sent hits for soft bounced contacts and no hits for hard bounced + await generator.SimulateEmailSend(regularEmail, softBouncedContacts, recipientList); + await generator.SimulateEmailSend(regularEmail, hardBouncedContacts, recipientList); + generator.GenerateSoftEmailBounces(regularEmail, softBouncedContacts); + generator.GenerateHardEmailBounces(regularEmail, hardBouncedContacts); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DataProtection/FormConsentContactGroupGenerator.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DataProtection/FormConsentContactGroupGenerator.cs new file mode 100644 index 0000000..6338d56 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DataProtection/FormConsentContactGroupGenerator.cs @@ -0,0 +1,47 @@ +using CMS.ContactManagement; +using CMS.MacroEngine; +using CMS.Membership; + +namespace DancingGoat.Helpers.Generator +{ + public class FormContactGroupGenerator + { + private const string CONTACT_GROUP_DISPLAY_NAME = "Coffee samples applicants"; + private const string CONTACT_GROUP_NAME = "CoffeeSamplesApplicants"; + + + public void Generate() + { + CreateContactGroupWithFormConsentAgreementRule(); + } + + + private void CreateContactGroupWithFormConsentAgreementRule() + { + if (ContactGroupInfo.Provider.Get(CONTACT_GROUP_NAME) != null) + { + return; + } + + var contactGroup = new ContactGroupInfo + { + ContactGroupDisplayName = CONTACT_GROUP_DISPLAY_NAME, + ContactGroupName = CONTACT_GROUP_NAME, + ContactGroupDynamicCondition = GetFormConsentMacroRule(), + ContactGroupEnabled = true + }; + + ContactGroupInfo.Provider.Set(contactGroup); + } + + + private string GetFormConsentMacroRule() + { + var rule = $@"{{%Rule(""(Contact.AgreedWithConsent(""{FormConsentGenerator.CONSENT_NAME}""))"", "" +

{FormConsentGenerator.CONSENT_DISPLAY_NAME}{FormConsentGenerator.CONSENT_NAME}0select consenttext0

+

has0select operationtext0

"")%}}"; + + return MacroSecurityProcessor.AddSecurityParameters(rule, MacroIdentityOption.FromUserInfo(UserInfoProvider.AdministratorUser), null); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DataProtection/FormConsentGenerator.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DataProtection/FormConsentGenerator.cs new file mode 100644 index 0000000..d7744c3 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DataProtection/FormConsentGenerator.cs @@ -0,0 +1,129 @@ +using System; +using System.Linq; + +using CMS.Base; +using CMS.DataEngine; +using CMS.DataProtection; +using CMS.FormEngine; +using CMS.OnlineForms; + +using Kentico.Forms.Web.Mvc; +using Kentico.Forms.Web.Mvc.Internal; + +namespace DancingGoat.Helpers.Generator +{ + /// + /// Contains methods for generating sample data for the Campaign module. + /// + public class FormConsentGenerator + { + private readonly ISiteInfo mSite; + private readonly IFormBuilderConfigurationSerializer mFormBuilderConfigurationSerializer; + + public const string CONSENT_NAME = "DancingGoatCoffeeSampleListForm"; + internal const string CONSENT_DISPLAY_NAME = "Dancing Goat - Coffee sample list form"; + private const string CONSENT_SHORT_TEXT_EN = "I hereby accept that these provided information can be used for marketing purposes and targeted website content."; + private const string CONSENT_SHORT_TEXT_ES = "Por lo presente acepto que esta información proporcionada puede ser utilizada con fines de marketing y contenido de sitios web dirigidos."; + private const string CONSENT_LONG_TEXT_EN = @"This is a sample consent declaration used for demonstration purposes only. + We strongly recommend forming a consent declaration suited for your website and consulting it with a lawyer."; + private const string CONSENT_LONG_TEXT_ES = @"Esta es una declaración de consentimiento de muestra que se usa sólo para fines de demostración. + Recomendamos encarecidamente formar una declaración de consentimiento adecuada para su sitio web y consultarla con un abogado."; + + + /// + /// Constructor. + /// + /// Site the form consent will be generated for + public FormConsentGenerator(ISiteInfo site, IFormBuilderConfigurationSerializer formBuilderConfigurationSerializer) + { + mSite = site; + mFormBuilderConfigurationSerializer = formBuilderConfigurationSerializer; + } + + + /// + /// Generates sample form consent data. Suitable only for Dancing Goat demo site. + /// + public void Generate(string formName, string formFieldName) + { + CreateConsent(); + UpdateForm(formName, formFieldName); + } + + + private void CreateConsent() + { + if (ConsentInfo.Provider.Get(CONSENT_NAME) != null) + { + return; + } + + var consent = new ConsentInfo + { + ConsentName = CONSENT_NAME, + ConsentDisplayName = CONSENT_DISPLAY_NAME, + }; + + consent.UpsertConsentText("en-US", CONSENT_SHORT_TEXT_EN, CONSENT_LONG_TEXT_EN); + consent.UpsertConsentText("es-ES", CONSENT_SHORT_TEXT_ES, CONSENT_LONG_TEXT_ES); + + ConsentInfo.Provider.Set(consent); + } + + + private void UpdateForm(string formName, string formFieldName) + { + var formClassInfo = DataClassInfoProvider.GetDataClassInfo($"BizForm.{formName}"); + if (formClassInfo == null) + { + return; + } + + var formInfo = FormHelper.GetFormInfo(formClassInfo.ClassName, true); + if (formInfo.FieldExists(formFieldName)) + { + return; + } + + // Update ClassFormDefinition + var field = CreateFormField(formFieldName); + formInfo.AddFormItem(field); + formClassInfo.ClassFormDefinition = formInfo.GetXmlDefinition(); + formClassInfo.Update(); + + // Update Form builder JSON + var contactUsForm = BizFormInfo.Provider.Get(formName, mSite.SiteID); + var formBuilderConfiguration = mFormBuilderConfigurationSerializer.Deserialize(contactUsForm.FormBuilderLayout); + formBuilderConfiguration.EditableAreas.LastOrDefault() + .Sections.LastOrDefault() + .Zones.LastOrDefault() + .FormComponents + .Add(new FormComponentConfiguration { Properties = new ConsentAgreementProperties() { Guid = field.Guid } }); + contactUsForm.FormBuilderLayout = mFormBuilderConfigurationSerializer.Serialize(formBuilderConfiguration, true); + contactUsForm.Update(); + } + + + private static FormFieldInfo CreateFormField(string formFieldName) + { + var field = new FormFieldInfo + { + Name = formFieldName, + DataType = FieldDataType.Guid, + System = false, + Visible = true, + AllowEmpty = true, + Guid = Guid.NewGuid() + }; + + field.Settings["componentidentifier"] = ConsentAgreementComponent.IDENTIFIER; + field.Settings[nameof(ConsentAgreementProperties.ConsentCodeName)] = CONSENT_NAME; + + field.SetPropertyValue(FormFieldPropertyEnum.FieldCaption, String.Empty); + field.SetPropertyValue(FormFieldPropertyEnum.DefaultValue, String.Empty); + field.SetPropertyValue(FormFieldPropertyEnum.FieldDescription, String.Empty); + + return field; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DataProtection/TrackingConsentGenerator.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DataProtection/TrackingConsentGenerator.cs new file mode 100644 index 0000000..bc8fbf9 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/DataProtection/TrackingConsentGenerator.cs @@ -0,0 +1,75 @@ +using CMS.Base; +using CMS.DataEngine; +using CMS.DataProtection; + +namespace DancingGoat.Helpers.Generator +{ + public class TrackingConsentGenerator + { + private readonly ISiteInfo mSite; + + internal const string CONSENT_NAME = "DancingGoatTracking"; + private const string CONSENT_DISPLAY_NAME = "Dancing Goat - Tracking"; + private const string CONSENT_SHORT_TEXT_EN = @"At Dancing Goat, we have exciting offers and news about our products and services + that we hope you'd like to hear about. To present you the offers that suit you the most, we need to know a few personal + details about you. We will gather some of your activities on our website (such as which pages you've visited, etc.) and + use them to personalize the website content and improve analytics about our visitors. In addition, we will store small + piecies of data in your browser cookies. We promise we will treat your data with respect, store it in a secured storage, + and won't release it to any third parties."; + + private const string CONSENT_SHORT_TEXT_ES = @"En Dancing Goat, tenemos noticias y ofertas interesantes sobre nuestros productos y + servicios de los que esperamos que le gustaría escuchar. Para presentarle las ofertas que más le convengan, necesitamos + conocer algunos detalles personales sobre usted. Reuniremos algunas de sus actividades en nuestro sitio web (como las + páginas que visitó, etc.) y las usaremos para personalizar el contenido del sitio web y mejorar el análisis de nuestros + visitantes. Además, almacenaremos pequeñas cantidades de datos en las cookies del navegador. Nos comprometemos a tratar + sus datos con respeto, almacenarlo en un almacenamiento seguro, y no lo lanzará a terceros."; + + private const string CONSENT_LONG_TEXT_EN = @"This is a sample consent declaration used for demonstration purposes only. + We strongly recommend forming a consent declaration suited for your website and consulting it with a lawyer."; + private const string CONSENT_LONG_TEXT_ES = @"Esta es una declaración de consentimiento de muestra que se usa sólo para fines de demostración. + Recomendamos encarecidamente formar una declaración de consentimiento adecuada para su sitio web y consultarla con un abogado."; + + + /// + /// Constructor. + /// + /// Site the data protection sample data will be generated for. + public TrackingConsentGenerator(ISiteInfo site) + { + mSite = site; + } + + + public void Generate() + { + CreateConsent(); + SetDefaultCookieLevel(mSite.SiteID); + } + + + private void CreateConsent() + { + if (ConsentInfo.Provider.Get(CONSENT_NAME) != null) + { + return; + } + + var consent = new ConsentInfo + { + ConsentName = CONSENT_NAME, + ConsentDisplayName = CONSENT_DISPLAY_NAME, + }; + + consent.UpsertConsentText("en-US", CONSENT_SHORT_TEXT_EN, CONSENT_LONG_TEXT_EN); + consent.UpsertConsentText("es-ES", CONSENT_SHORT_TEXT_ES, CONSENT_LONG_TEXT_ES); + + ConsentInfo.Provider.Set(consent); + } + + + private void SetDefaultCookieLevel(int siteID) + { + SettingsKeyInfoProvider.SetValue("CMSDefaultCookieLevel", siteID, "essential"); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/EmailLibrarySampleGenerator.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/EmailLibrarySampleGenerator.cs new file mode 100644 index 0000000..3f1bb1b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/EmailLibrarySampleGenerator.cs @@ -0,0 +1,490 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +using CMS.Base; +using CMS.ContactManagement; +using CMS.EmailLibrary; +using CMS.EmailMarketing; +using CMS.Helpers; + +namespace DancingGoat.Helpers.Generator +{ + /// + /// Generates emails with real-like dependencies. + /// + public class EmailLibrarySampleGenerator + { + private const string GeneratedLabel = "Generated"; + private const string EmptyHash = "0000000000000000000000000000000000000000000000000000000000000000"; + private const string SenderAddress = $"{nameof(EmailLibrarySampleGenerator)}@localhost.local"; + + public const string GeneratedInfoCodeNameSuffix = "273efa91-79e0-4b2c-8cc4-f868cd9f9f54"; + private readonly ISiteInfo site; + + + /// + /// Creates a new instance of . + /// + /// A site the sample belongs to. + public EmailLibrarySampleGenerator(ISiteInfo site) + { + this.site = site; + } + + + /// + /// Gets or creates the given number of contacts. + /// + /// The number of contacts to generate. + public List GenerateContacts(int quantity) + { + var contacts = new List(); + + for (var i = 0; i < quantity; i++) + { + var firstName = $"Name-{i}"; + var lastName = $"Surname-{i}"; + var email = $"{firstName}.{GeneratedLabel}.{lastName}@localhost.local"; + + var contact = ContactInfoProvider.GetContactInfo(email); + + if (contact is null) + { + contact = new ContactInfo + { + ContactEmail = email, + ContactFirstName = firstName, + ContactLastName = lastName, + ContactMiddleName = GeneratedLabel + }; + + ContactInfo.Provider.Set(contact); + } + + contacts.Add(contact); + } + + return contacts; + } + + + /// + /// Gets or creates a recipient list. + /// + /// The configuration used to generate subscription confirmation email. + /// The page to link in the subscription confirmation email. + /// The configuration used to generate unsubscription confirmation email. + /// The page to link in the unsubscription confirmation email. + public async Task GenerateRecipientListAsync(EmailConfigurationInfo subscribeConfiguration = null, + Guid? subscribePage = null, EmailConfigurationInfo unsubscribeConfiguration = null, Guid? unsubscribePage = null) + { + var (displayName, codeName) = GetNames("Generated Recipient List"); + + var info = await ContactGroupInfo.Provider.GetAsync(codeName); + if (info is null) + { + info = new ContactGroupInfo + { + ContactGroupDisplayName = displayName, + ContactGroupDescription = GeneratedLabel, + ContactGroupName = codeName, + ContactGroupEnabled = true, + ContactGroupStatus = ContactGroupStatusEnum.Ready, + ContactGroupIsRecipientList = true + }; + + info.Insert(); + } + + GenerateRecipientListSettings(info, subscribeConfiguration, subscribePage, unsubscribeConfiguration, unsubscribePage); + return info; + } + + + /// + /// Adds given contacts to the given recipient list and generates appropriate subscription confirmation records. + /// + /// Email recipients. + /// A recipient list the contacts should be listed in. + public void AddContactsToRecipientList(IEnumerable contacts, ContactGroupInfo recipientList) + { + foreach (var contact in contacts) + { + GenerateSubscriptionConfirmation(contact, recipientList); + EnsureRecipientListMember(contact, recipientList); + } + } + + /// + /// Get or creates an email template. + /// + /// The type of the email. + /// + public async Task GenerateTemplateAsync(EmailType type) + { + var (displayName, codeName) = GetNames(type.ToString()); + + var template = await EmailTemplateInfoProvider.ProviderObject.GetAsync(codeName, site.SiteID); + if (template is null) + { + var templateCode = type switch + { + EmailType.Regular => "
$$content$$
$$unsubscribeurl$$
", + _ => "
$$content$$
" + }; + + template = new EmailTemplateInfo + { + EmailTemplateName = codeName, + EmailTemplateDisplayName = displayName, + EmailTemplateDescription = "A generated template to give a sample of email statistics.", + EmailTemplateCode = $"{templateCode}", + EmailTemplateSiteID = site.SiteID, + EmailTemplateType = type + }; + + template.Insert(); + } + + return template; + } + + + /// + /// Gets or creates email configuration. + /// + /// A display name. Serves as a base for code name generation. + /// The email template. + public async Task GenerateConfigurationAsync(EmailTemplateInfo template, string name = null) + { + var (displayName, codeName) = GetNames(name ?? template.EmailTemplateType.ToString()); + + var configuration = await EmailConfigurationInfo.Provider.GetAsync(codeName, site.SiteID); + if (configuration is null) + { + configuration = new EmailConfigurationInfo + { + EmailConfigurationName = codeName, + EmailConfigurationDisplayName = displayName, + EmailConfigurationSubject = "This is a generated email.", + EmailConfigurationSenderName = nameof(EmailLibrarySampleGenerator), + EmailConfigurationSenderEmail = SenderAddress, + EmailConfigurationEmailTemplateID = template.EmailTemplateID, + EmailConfigurationContent = GeneratedLabel, + EmailConfigurationSiteID = site.SiteID, + EmailConfigurationPlainText = "", + EmailConfigurationType = template.EmailTemplateType + }; + + configuration.Insert(); + } + + return configuration; + } + + + /// + /// Creates email statistics hits. + /// + /// The emails that should be recorded as opened. + /// The emails that should be recorded as clicked. + public void GenerateEmailStatisticsHits(IEnumerable emailsToOpen = null, + IEnumerable emailsToClick = null) + { + if (emailsToOpen is not null) + { + GenerateEmailStatisticsHits(EmailStatisticsHitsType.Open, emailsToOpen); + } + + if (emailsToClick is not null) + { + GenerateEmailStatisticsHits(EmailStatisticsHitsType.Click, emailsToClick); + } + } + + + /// + /// Simulate sending emails to given contacts and generates related sent hits. + /// + /// The configuration to send. + /// Email recipients. + /// Recipient list. + public async Task SimulateEmailSend(EmailConfigurationInfo configuration, IEnumerable contacts, + ContactGroupInfo recipientList) + { + if (configuration.EmailConfigurationType == EmailType.Regular) + { + await GenerateSendConfigurationAsync(configuration, recipientList); + } + + var emails = contacts + .Select(contact => new SampleEmailContext(configuration, recipientList, contact)) + .ToArray(); + InjectLinks(configuration, emails); + GenerateEmailStatisticsHits(EmailStatisticsHitsType.Sent, emails); + return emails; + } + + + /// + /// Marks e-mail addresses of given contacts as soft-bounced with number of bounces in interval 1-5 + /// and generates corresponding hits with hit type. + /// + /// The configuration to send. + /// Mail recipients to be marked as soft-bounced. + public void GenerateSoftEmailBounces(EmailConfigurationInfo configuration, IEnumerable contacts) + { + var emails = new List(); + var bounceCounter = 0; + foreach (var contact in contacts) + { + emails.Add(new SampleEmailContext(configuration, null, contact)); + + var contactBounceCount = 1 + (bounceCounter % 5); + + var emailBounce = EmailBounceInfo.Provider.Get() + .WhereEquals(nameof(EmailBounceInfo.EmailBounceEmailAddress), contact.ContactEmail) + .TopN(1) + .FirstOrDefault(); + + if (emailBounce is null) + { + emailBounce = new EmailBounceInfo + { + EmailBounceEmailAddress = contact.ContactEmail, + EmailBounceIsHardBounce = false, + EmailBounceSoftBounceCount = contactBounceCount + }; + } + else + { + emailBounce.EmailBounceIsHardBounce = false; + emailBounce.EmailBounceSoftBounceCount = contactBounceCount; + } + + EmailBounceInfo.Provider.Set(emailBounce); + + bounceCounter++; + } + + GenerateEmailStatisticsHits(EmailStatisticsHitsType.SoftBounce, emails); + } + + + /// + /// Marks e-mail addresses of given contacts as hard-bounced and generates corresponding hits with hit type. + /// + /// The configuration to send. + /// Mail recipients to be marked as hard-bounced. + public void GenerateHardEmailBounces(EmailConfigurationInfo configuration, IEnumerable contacts) + { + var emails = new List(); + foreach (var contact in contacts) + { + emails.Add(new SampleEmailContext(configuration, null, contact)); + + var emailBounce = EmailBounceInfo.Provider.Get() + .WhereEquals(nameof(EmailBounceInfo.EmailBounceEmailAddress), contact.ContactEmail) + .TopN(1) + .FirstOrDefault(); + + if (emailBounce is null) + { + emailBounce = new EmailBounceInfo + { + EmailBounceEmailAddress = contact.ContactEmail, + EmailBounceIsHardBounce = true, + EmailBounceSoftBounceCount = 0 + }; + } + else + { + emailBounce.EmailBounceIsHardBounce = true; + emailBounce.EmailBounceSoftBounceCount = 0; + } + + EmailBounceInfo.Provider.Set(emailBounce); + } + + GenerateEmailStatisticsHits(EmailStatisticsHitsType.HardBounce, emails); + } + + + private static (string, string) GetNames(string value) + { + if (!value.StartsWith(GeneratedLabel)) + { + value = $"{GeneratedLabel} {value}"; + } + + var codeName = ValidationHelper.GetCodeName( + value.EndsWith(GeneratedInfoCodeNameSuffix) ? value : $"{value}_{GeneratedInfoCodeNameSuffix}"); + + return (value, codeName); + } + + + private static async Task GenerateSendConfigurationAsync(EmailConfigurationInfo configuration, + ContactGroupInfo recipientList) + { + var info = await SendConfigurationInfo.Provider.GetByEmailConfigurationIdAsync(configuration.EmailConfigurationID); + if (info is null) + { + new SendConfigurationInfo + { + SendConfigurationEmailConfigurationID = configuration.EmailConfigurationID, + SendConfigurationRecipientListID = recipientList.ContactGroupID, + SendConfigurationScheduledTime = DateTime.Now - TimeSpan.FromHours(1), + SendConfigurationStatus = SendConfigurationStatus.Sent + }.Insert(); + } + } + + + private static void InjectLinks(EmailConfigurationInfo configuration, IEnumerable emails) + { + var infos = EmailLinkInfo.Provider.Get() + .WhereEquals(nameof(EmailLinkInfo.EmailLinkEmailConfigurationID), configuration.EmailConfigurationID) + .WhereEquals(nameof(EmailLinkInfo.EmailLinkDescription), GeneratedLabel) + .ToArray(); + + foreach (var email in emails) + { + var target = configuration.EmailConfigurationType switch + { + EmailType.FormAutoresponder => $"~/Kentico.Emails/{configuration.EmailConfigurationName}?contactEmail={email.Contact.ContactEmail}&recipientListID={email.RecipientList.ContactGroupID}&hash={EmptyHash}", + EmailType.Regular => $"~/Kentico.Redirect/?href=localhost.local%2Fhome&contactEmail={email.Contact.ContactEmail}&hash={EmptyHash}", + _ => null + }; + + if (target is null) + { + continue; + } + + var link = Array.Find(infos, x => x.EmailLinkTarget == target); + if (link is null) + { + link = new EmailLinkInfo + { + EmailLinkEmailConfigurationID = configuration.EmailConfigurationID, + EmailLinkTarget = target, + EmailLinkDescription = GeneratedLabel, + }; + + link.Insert(); + } + + email.Links.Add(link); + } + } + + + private static void GenerateEmailStatisticsHits(EmailStatisticsHitsType type, IEnumerable emails) + { + foreach (var email in emails) + { + var hit = new EmailStatisticsHitsInfo + { + EmailStatisticsHitsEmailConfigurationID = email.Configuration.EmailConfigurationID, + EmailStatisticsHitsType = type, + EmailStatisticsHitsTime = DateTime.Now, + EmailStatisticsHitsMailoutGUID = email.EmailGuid + }; + + var linkId = email.Links.FirstOrDefault()?.EmailLinkID; + if (linkId.HasValue) + { + hit.EmailStatisticsHitsEmailLinkID = linkId.Value; + } + + hit.Insert(); + } + } + + + private static void GenerateSubscriptionConfirmation(ContactInfo contact, ContactGroupInfo recipientList) + { + var subscriptionConfirmation = EmailSubscriptionConfirmationInfo.Provider.Get() + .WhereEquals(nameof(EmailSubscriptionConfirmationInfo.EmailSubscriptionConfirmationContactID), contact.ContactID) + .WhereEquals(nameof(EmailSubscriptionConfirmationInfo.EmailSubscriptionConfirmationRecipientListID), recipientList.ContactGroupID) + .TopN(1) + .FirstOrDefault(); + + if (subscriptionConfirmation is null) + { + new EmailSubscriptionConfirmationInfo + { + EmailSubscriptionConfirmationContactID = contact.ContactID, + EmailSubscriptionConfirmationRecipientListID = recipientList.ContactGroupID, + EmailSubscriptionConfirmationDate = DateTime.Today, + EmailSubscriptionConfirmationIsApproved = true, + }.Insert(); + } + } + + + private static void EnsureRecipientListMember(ContactInfo contact, ContactGroupInfo recipientList) + { + var info = ContactGroupMemberInfo.Provider.Get(recipientList.ContactGroupID, contact.ContactID, + ContactGroupMemberTypeEnum.Contact); + + if (info is null) + { + info = new ContactGroupMemberInfo + { + ContactGroupMemberType = ContactGroupMemberTypeEnum.Contact, + ContactGroupMemberContactGroupID = recipientList.ContactGroupID, + ContactGroupMemberRelatedID = contact.ContactID, + ContactGroupMemberFromManual = true + }; + + info.Insert(); + } + } + + + private void GenerateRecipientListSettings(ContactGroupInfo recipientList, EmailConfigurationInfo subscribeConfiguration = null, + Guid? subscribePage = null, EmailConfigurationInfo unsubscribeConfiguration = null, Guid? unsubscribePage = null) + { + var info = RecipientListSettingsInfo.Provider.Get() + .WhereEquals(nameof(RecipientListSettingsInfo.RecipientListSettingsRecipientListID), recipientList.ContactGroupID) + .TopN(1) + .FirstOrDefault(); + + if (info is null) + { + info = new RecipientListSettingsInfo + { + RecipientListSettingsRecipientListID = recipientList.ContactGroupID, + RecipientListSettingsSendSubscriptionConfirmationEmail = false, + RecipientListSettingsSendUnsubscriptionConfirmationEmail = false + }; + + if (subscribeConfiguration is not null) + { + info.RecipientListSettingsSendSubscriptionConfirmationEmail = true; + info.RecipientListSettingsSubscriptionConfirmationEmailID = subscribeConfiguration.EmailConfigurationID; + if (subscribePage.HasValue) + { + info.RecipientListSettingsAfterConfirmationPage = subscribePage.Value; + } + } + + if (unsubscribeConfiguration is not null) + { + info.RecipientListSettingsSendUnsubscriptionConfirmationEmail = true; + info.RecipientListSettingsUnsubscriptionConfirmationEmailID = unsubscribeConfiguration.EmailConfigurationID; + if (unsubscribePage.HasValue) + { + info.RecipientListSettingsAfterUnsubscriptionPage = unsubscribePage.Value; + } + } + + info.Insert(); + } + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/SampleEmailContext.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/SampleEmailContext.cs new file mode 100644 index 0000000..6983436 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/Generator/SampleEmailContext.cs @@ -0,0 +1,51 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using CMS.ContactManagement; +using CMS.EmailLibrary; + +namespace DancingGoat.Helpers.Generator +{ + public class SampleEmailContext + { + /// + /// Represents email guid to uniquely identify each email. + /// + public Guid EmailGuid { get; } + + + /// + /// A recipient of the email. + /// + public ContactInfo Contact { get; } + + + /// + /// A contact group the email should be send to. + /// + public ContactGroupInfo RecipientList { get; } + + + /// + /// The email configuration of the email. + /// + public EmailConfigurationInfo Configuration { get; } + + + /// + /// The links to be injected in the email. + /// + public List Links { get; } + + + public SampleEmailContext(EmailConfigurationInfo configuration, ContactGroupInfo recipientList, ContactInfo contact) + { + EmailGuid = Guid.NewGuid(); + Configuration = configuration; + Links = new List(); + RecipientList = recipientList; + Contact = contact; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/HttpRequestExtensions.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/HttpRequestExtensions.cs new file mode 100644 index 0000000..3b3b697 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/HttpRequestExtensions.cs @@ -0,0 +1,25 @@ + +using System; + +using Microsoft.AspNetCore.Http; + +namespace DancingGoat.Helpers +{ + public static class HttpRequestExtensions + { + public static bool IsAjaxRequest(this HttpRequest request) + { + if (request == null) + { + throw new ArgumentNullException(nameof(request)); + } + + if (request.Headers != null && request.Headers["X-Requested-With"] == "XMLHttpRequest") + { + return true; + } + + return false; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/IServiceCollectionExtensions.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/IServiceCollectionExtensions.cs new file mode 100644 index 0000000..342098a --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/IServiceCollectionExtensions.cs @@ -0,0 +1,40 @@ +using DancingGoat.Helpers; +using DancingGoat.Infrastructure; +using DancingGoat.Models; +using DancingGoat.PageTemplates; + +using Microsoft.Extensions.DependencyInjection; + +namespace DancingGoat +{ + public static class IServiceCollectionExtensions + { + public static void AddDancingGoatServices(this IServiceCollection services) + { + AddViewComponentServices(services); + + AddRepositories(services); + + services.AddSingleton(); + + services.AddSingleton(); + } + + private static void AddRepositories(IServiceCollection services) + { + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + services.AddSingleton(); + } + + private static void AddViewComponentServices(IServiceCollection services) + { + services.AddSingleton(); + services.AddSingleton(); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/MediaFileUrlCollection.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/MediaFileUrlCollection.cs new file mode 100644 index 0000000..752b5c5 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/MediaFileUrlCollection.cs @@ -0,0 +1,38 @@ +using CMS.MediaLibrary; + +using Kentico.Content.Web.Mvc; + +using System; +using System.Collections.Generic; + +namespace DancingGoat.Helpers +{ + /// + /// Represents a collection of media file URLs accessible by asset identifiers. + /// + public sealed class MediaFileUrlCollection + { + private readonly IDictionary mediaFileUrlCollection; + + + /// + /// Creates new version of . + /// + /// Source collection of file URLs. + /// + public MediaFileUrlCollection(IDictionary mediaFileUrlCollection) + { + this.mediaFileUrlCollection = mediaFileUrlCollection ?? throw new ArgumentNullException(nameof(mediaFileUrlCollection)); + } + + + /// + /// Returns a relative path of the asset for specified asset model. + /// + /// Asset selector function. + public IMediaFileUrl GetFileUrl(Func assetSelector) + { + return mediaFileUrlCollection.TryGetValue(assetSelector()?.Identifier ?? Guid.Empty, out var fileUrl) ? fileUrl : default; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/MediaFileUrlHelper.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/MediaFileUrlHelper.cs new file mode 100644 index 0000000..83baf29 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/MediaFileUrlHelper.cs @@ -0,0 +1,63 @@ +using CMS.Base; +using CMS.MediaLibrary; + +using Kentico.Content.Web.Mvc; + +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +namespace DancingGoat.Helpers +{ + /// + /// Helper methods for media file URL retrieval from asset collection. + /// + public sealed class MediaFileUrlHelper + { + private readonly ISiteService siteService; + private readonly IMediaFileInfoProvider mediaFileInfoProvider; + private readonly IMediaFileUrlRetriever mediaFileUrlRetriever; + + + /// + /// Creates new instance of . + /// + /// Site service. + /// Media file info provider. + /// Media file URL retriever. + /// Progressive cache service. + public MediaFileUrlHelper(ISiteService siteService, IMediaFileInfoProvider mediaFileInfoProvider, IMediaFileUrlRetriever mediaFileUrlRetriever) + { + this.siteService = siteService; + this.mediaFileInfoProvider = mediaFileInfoProvider; + this.mediaFileUrlRetriever = mediaFileUrlRetriever; + } + + + /// + /// Returns media file URL for the first asset in the collection. + /// + /// Assets collection. + /// Cancellation token. + public async Task GetMediaFileUrl(IEnumerable assets, CancellationToken cancellationToken = default) + { + var assetId = assets.FirstOrDefault()?.Identifier ?? Guid.Empty; + if (assetId == Guid.Empty) + { + return null; + } + + var mediaFile = await mediaFileInfoProvider + .GetAsync(assetId, siteService.CurrentSite.SiteID, cancellationToken); + + if (mediaFile == null) + { + return null; + } + + return mediaFileUrlRetriever.Retrieve(mediaFile); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Helpers/TagHelpers/EmailTagHelper.cs b/src/Kentico.Xperience.Lucene.Sample/Helpers/TagHelpers/EmailTagHelper.cs new file mode 100644 index 0000000..768aaaa --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Helpers/TagHelpers/EmailTagHelper.cs @@ -0,0 +1,26 @@ +using System.Web; + +using Microsoft.AspNetCore.Razor.TagHelpers; + +namespace DancingGoat.Helpers +{ + public class EmailTagHelper : TagHelper + { + public string Address { get; set; } + + + public override void Process(TagHelperContext context, TagHelperOutput output) + { + if (string.IsNullOrEmpty(Address)) + { + output.TagName = null; + return; + } + + output.TagName = "a"; + output.Attributes.SetAttribute("href", "mailto:" + HttpUtility.HtmlAttributeEncode(Address)); + output.Content.SetContent(HttpUtility.HtmlEncode(Address)); + output.TagMode = TagMode.StartTagAndEndTag; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Infrastructure/CacheDependencyKeyProvider.cs b/src/Kentico.Xperience.Lucene.Sample/Infrastructure/CacheDependencyKeyProvider.cs new file mode 100644 index 0000000..290702d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Infrastructure/CacheDependencyKeyProvider.cs @@ -0,0 +1,44 @@ +using System; + +using CMS.DocumentEngine; +using CMS.Helpers; + +namespace DancingGoat.Infrastructure +{ + /// + /// Provides methods to format cache dependencies. + /// + public static class CacheDependencyKeyProvider + { + /// + /// Gets dependency cache key for all pages of given page type. + /// + /// Site name. + /// Class name representing a page type. + /// If class name not provided, dependency key for all pages is returned. + public static string GetDependencyCacheKeyForPageType(string siteName, string className) + { + if (string.IsNullOrEmpty(className)) + { + return DocumentDependencyCacheKeysBuilder.GetChildNodesDependencyCacheKey(siteName, "/"); + } + + return DocumentDependencyCacheKeysBuilder.GetAllNodesCacheKey(siteName, className); + } + + + /// + /// Gets dependency cache key for given object type. + /// + /// Object type. + public static string GetDependencyCacheKeyForObjectType(string objectType) + { + if (string.IsNullOrEmpty(objectType)) + { + throw new NotSupportedException("The object type needs to be provided."); + } + + return CacheHelper.GetCacheItemName(null, objectType, "all"); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Infrastructure/ICacheKey.cs b/src/Kentico.Xperience.Lucene.Sample/Infrastructure/ICacheKey.cs new file mode 100644 index 0000000..f591d1b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Infrastructure/ICacheKey.cs @@ -0,0 +1,13 @@ +namespace DancingGoat.Infrastructure +{ + /// + /// Defines a method to get a cache key for the current state of the instance. + /// + public interface ICacheKey + { + /// + /// Returns a cache key which represents the current state of the instance. + /// + string GetCacheKey(); + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Infrastructure/RepositoryCacheHelper.cs b/src/Kentico.Xperience.Lucene.Sample/Infrastructure/RepositoryCacheHelper.cs new file mode 100644 index 0000000..b75b959 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Infrastructure/RepositoryCacheHelper.cs @@ -0,0 +1,256 @@ +using System; +using System.Collections.Generic; +using System.Globalization; +using System.Linq; +using System.Text; +using System.Threading; +using System.Threading.Tasks; + +using CMS.Base; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.Helpers; + +using Kentico.Content.Web.Mvc; +using Kentico.Web.Mvc; + +using Microsoft.AspNetCore.Http; + +namespace DancingGoat.Infrastructure +{ + public class RepositoryCacheHelper + { + private readonly IHttpContextAccessor httpContextAccessor; + private readonly IProgressiveCache cache; + private readonly ISiteService siteService; + + + public RepositoryCacheHelper(IHttpContextAccessor httpContextAccessor, IProgressiveCache cache, ISiteService siteService) + { + this.httpContextAccessor = httpContextAccessor; + this.cache = cache; + this.siteService = siteService; + } + + + public IEnumerable CacheObjects(Func> getData, string baseCacheKey, string[] dependencyCacheKeys = null) + where TObjectType : BaseInfo + { + if (!IsCacheEnabled()) + { + return getData?.Invoke(); + } + + Func> provideData = (cacheSettings) => + { + var result = getData?.Invoke(); + if (result == null || !result.Any()) + { + cacheSettings.CacheMinutes = 0; + return result; + } + + var objects = result.ToList(); + cacheSettings.CacheDependency = GetCacheDependency(dependencyCacheKeys, objects); + return objects; + }; + + var cacheKey = GetCacheItemKey(baseCacheKey); + var cacheSettings = CreateCacheSettings(cacheKey); + return cache.Load(provideData, cacheSettings); + } + + + public TObjectType CacheObject(Func getData, string baseCacheKey, string[] dependencyCacheKeys = null) + where TObjectType : BaseInfo + { + if (!IsCacheEnabled()) + { + return getData?.Invoke(); + } + + Func provideData = (cacheSettings) => + { + var result = getData?.Invoke(); + if (result == null) + { + cacheSettings.CacheMinutes = 0; + return null; + } + + cacheSettings.CacheDependency = GetCacheDependency(dependencyCacheKeys, new[] { result }); + return result; + }; + + var cacheKey = GetCacheItemKey(baseCacheKey); + var cacheSettings = CreateCacheSettings(cacheKey); + return cache.Load(provideData, cacheSettings); + } + + + public Task CacheData(Func> getData, CancellationToken cancellationToken, string baseCacheKey, Func> getDependencyCacheKeys = null) + where TData : class + { + if (!IsCacheEnabled()) + { + return getData?.Invoke(cancellationToken); + } + + Func> provideData = async (cacheSettings, cancellationToken) => + { + var result = await getData?.Invoke(cancellationToken); + if (result == null) + { + cacheSettings.CacheMinutes = 0; + return null; + } + + cacheSettings.CacheDependency = CacheHelper.GetCacheDependency(await getDependencyCacheKeys?.Invoke()); + return result; + }; + + var cacheKey = GetCacheItemKey(baseCacheKey); + var cacheSettings = CreateCacheSettings(cacheKey); + return cache.LoadAsync(provideData, cacheSettings, cancellationToken); + } + + + public TPageType CachePage(Func getData, string baseCacheKey, string[] dependencyCacheKeys = null) + where TPageType : TreeNode + { + if (!IsCacheEnabled()) + { + return getData?.Invoke(); + } + + Func provideData = (cacheSettings) => + { + var result = getData?.Invoke(); + if (result == null) + { + cacheSettings.CacheMinutes = 0; + return null; + } + + cacheSettings.CacheMinutes = GetMinutes(result.DocumentPublishTo, cacheSettings.CacheMinutes); + cacheSettings.CacheDependency = GetPagesCacheDependency(dependencyCacheKeys, new[] { result }); + return result; + }; + + var cacheKey = GetCacheItemKey(baseCacheKey); + var cacheSettings = CreateCacheSettings(cacheKey); + return cache.Load(provideData, cacheSettings); + } + + + public IEnumerable CachePages(Func> getData, string baseCacheKey, string[] dependencyCacheKeys = null) + where TPageType : TreeNode + { + if (!IsCacheEnabled()) + { + return getData?.Invoke(); + } + + + Func> provideData = (cacheSettings) => + { + var result = getData?.Invoke(); + if (result == null || !result.Any()) + { + cacheSettings.CacheMinutes = 0; + return result; + } + + var pages = result.ToList(); + var earliestPublishTo = pages + .Where(treeNode => treeNode.DocumentPublishTo >= DateTime.Now) + .Min(treeNode => treeNode.DocumentPublishTo); + + cacheSettings.CacheMinutes = GetMinutes(earliestPublishTo, cacheSettings.CacheMinutes); + cacheSettings.CacheDependency = GetPagesCacheDependency(dependencyCacheKeys, pages); + return pages; + }; + + var cacheKey = GetCacheItemKey(baseCacheKey); + var cacheSettings = CreateCacheSettings(cacheKey); + return cache.Load(provideData, cacheSettings); + } + + + private CMSCacheDependency GetCacheDependency(string[] dependencyCacheKeys, IEnumerable objects) + { + var objectType = objects.First().TypeInfo.ObjectType; + dependencyCacheKeys = dependencyCacheKeys ?? new[] + { + CacheDependencyKeyProvider.GetDependencyCacheKeyForObjectType(objectType) } + ; + + return CacheHelper.GetCacheDependency(dependencyCacheKeys); + } + + + private CMSCacheDependency GetPagesCacheDependency(string[] dependencyCacheKeys, IEnumerable pages) + { + var className = pages.First().ClassName; + dependencyCacheKeys = dependencyCacheKeys ?? new[] + { + CacheDependencyKeyProvider.GetDependencyCacheKeyForPageType(siteService.CurrentSite?.SiteName, className), + CacheDependencyKeyProvider.GetDependencyCacheKeyForObjectType(className) + }; + + var keys = new HashSet(dependencyCacheKeys, StringComparer.OrdinalIgnoreCase); + var pathKeys = pages.Where(page => page.HasUrl()) + .Select(page => page.NodeAliasPath) + .SelectMany(path => DocumentDependencyCacheKeysBuilder.GetParentPathsDependencyCacheKeys(siteService.CurrentSite?.SiteName, path)) + .Distinct(); + + foreach (var pathKey in pathKeys) + { + keys.Add(pathKey); + } + + return CacheHelper.GetCacheDependency(keys); + } + + + private double GetMinutes(DateTime publishTo, double minutes) + { + if (publishTo == DateTime.MaxValue || publishTo < DateTime.Now) + { + return minutes; + } + + var minutesToInvalidation = (publishTo - DateTime.Now).TotalMinutes; + return Math.Min(minutesToInvalidation, minutes); + } + + + private string GetCacheItemKey(string baseCacheKey) + { + var builder = new StringBuilder(127) + .Append(baseCacheKey) + .Append("|").Append(siteService.CurrentSite?.SiteName) + .Append("|").Append(CultureInfo.CurrentCulture.Name); + + return builder.ToString(); + } + + + private CacheSettings CreateCacheSettings(string cacheKey) + { + return new CacheSettings(CacheHelper.CacheMinutes(siteService.CurrentSite?.SiteName), cacheKey); + } + + + private bool IsCacheEnabled() + { + return !IsPreviewEnabled(); + } + + + private bool IsPreviewEnabled() + { + return httpContextAccessor.HttpContext.Kentico().Preview().Enabled; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/AboutUs/AboutUs.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/AboutUs/AboutUs.generated.cs new file mode 100644 index 0000000..b69848b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/AboutUs/AboutUs.generated.cs @@ -0,0 +1,155 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(AboutUs.CLASS_NAME, typeof(AboutUs))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type AboutUs. + /// + public partial class AboutUs : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.AboutUs"; + + + /// + /// The instance of the class that provides extended API for working with AboutUs fields. + /// + private readonly AboutUsFields mFields; + + #endregion + + + #region "Properties" + + /// + /// AboutUsID. + /// + [DatabaseIDField] + public int AboutUsID + { + get + { + return ValidationHelper.GetInteger(GetValue("AboutUsID"), 0); + } + set + { + SetValue("AboutUsID", value); + } + } + + + /// + /// Gets an object that provides extended API for working with AboutUs fields. + /// + [RegisterProperty] + public AboutUsFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with AboutUs fields. + /// + [RegisterAllProperties] + public partial class AboutUsFields : AbstractHierarchicalObject + { + /// + /// The content item of type AboutUs that is a target of the extended API. + /// + private readonly AboutUs mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type AboutUs. + /// + /// The content item of type AboutUs that is a target of the extended API. + public AboutUsFields(AboutUs instance) + { + mInstance = instance; + } + + + /// + /// AboutUsID. + /// + public int ID + { + get + { + return mInstance.AboutUsID; + } + set + { + mInstance.AboutUsID = value; + } + } + + + /// + /// AboutUsSections. + /// + public IEnumerable Sections + { + get + { + return (mInstance.LinkedContentItems["AboutUsSections"]); + } + } + + + /// + /// AboutUsReference. + /// + public IEnumerable Reference + { + get + { + return (mInstance.LinkedContentItems["AboutUsReference"]); + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public AboutUs() : base(CLASS_NAME) + { + mFields = new AboutUsFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/AboutUs/AboutUsViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/AboutUs/AboutUsViewModel.cs new file mode 100644 index 0000000..b015b9e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/AboutUs/AboutUsViewModel.cs @@ -0,0 +1,11 @@ +using System.Collections.Generic; + +namespace DancingGoat.Models +{ + public class AboutUsViewModel + { + public List Sections { get; set; } + + public ReferenceViewModel Reference {get; set;} + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/AboutUsSection/AboutUsSection.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/AboutUsSection/AboutUsSection.generated.cs new file mode 100644 index 0000000..0997744 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/AboutUsSection/AboutUsSection.generated.cs @@ -0,0 +1,176 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(AboutUsSection.CLASS_NAME, typeof(AboutUsSection))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type AboutUsSection. + /// + public partial class AboutUsSection : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.AboutUsSection"; + + + /// + /// The instance of the class that provides extended API for working with AboutUsSection fields. + /// + private readonly AboutUsSectionFields mFields; + + #endregion + + + #region "Properties" + + /// + /// AboutUsSectionID. + /// + [DatabaseIDField] + public int AboutUsSectionID + { + get + { + return ValidationHelper.GetInteger(GetValue("AboutUsSectionID"), 0); + } + set + { + SetValue("AboutUsSectionID", value); + } + } + + + /// + /// AboutUsSectionText. + /// + [DatabaseField] + public string AboutUsSectionText + { + get + { + return ValidationHelper.GetString(GetValue("AboutUsSectionText"), @""); + } + set + { + SetValue("AboutUsSectionText", value); + } + } + + + /// + /// Gets an object that provides extended API for working with AboutUsSection fields. + /// + [RegisterProperty] + public AboutUsSectionFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with AboutUsSection fields. + /// + [RegisterAllProperties] + public partial class AboutUsSectionFields : AbstractHierarchicalObject + { + /// + /// The content item of type AboutUsSection that is a target of the extended API. + /// + private readonly AboutUsSection mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type AboutUsSection. + /// + /// The content item of type AboutUsSection that is a target of the extended API. + public AboutUsSectionFields(AboutUsSection instance) + { + mInstance = instance; + } + + + /// + /// AboutUsSectionID. + /// + public int ID + { + get + { + return mInstance.AboutUsSectionID; + } + set + { + mInstance.AboutUsSectionID = value; + } + } + + + /// + /// AboutUsSectionImage. + /// + public IEnumerable Image + { + get + { + return (mInstance.LinkedContentItems["AboutUsSectionImage"]); + } + } + + + /// + /// AboutUsSectionText. + /// + public string Text + { + get + { + return mInstance.AboutUsSectionText; + } + set + { + mInstance.AboutUsSectionText = value; + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public AboutUsSection() : base(CLASS_NAME) + { + mFields = new AboutUsSectionFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/AboutUsSection/AboutUsSectionViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/AboutUsSection/AboutUsSectionViewModel.cs new file mode 100644 index 0000000..a4dadc1 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/AboutUsSection/AboutUsSectionViewModel.cs @@ -0,0 +1,28 @@ +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +namespace DancingGoat.Models +{ + public class AboutUsSectionViewModel + { + public string Heading { get; set; } + + + public string Text { get; set; } + + + public string ImagePath { get; set; } + + + public static AboutUsSectionViewModel GetViewModel(AboutUsSection aboutUsSection) + { + return new AboutUsSectionViewModel + { + Heading = aboutUsSection.DocumentName, + Text = aboutUsSection.Fields.Text, + ImagePath = (aboutUsSection.Fields.Image.FirstOrDefault() as Media)?.Fields.File?.Url + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Account/LoginViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Account/LoginViewModel.cs new file mode 100644 index 0000000..2127246 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Account/LoginViewModel.cs @@ -0,0 +1,23 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace DancingGoat.Models +{ + public class LoginViewModel + { + [Required(ErrorMessage = "Please enter your user name")] + [DisplayName("User name")] + [MaxLength(100, ErrorMessage = "Maximum allowed length of the input text is {1}")] + public string UserName { get; set; } + + + [DataType(DataType.Password)] + [DisplayName("Password")] + [MaxLength(100, ErrorMessage = "Maximum allowed length of the input text is {1}")] + public string Password { get; set; } + + + [DisplayName("Stay signed in")] + public bool StaySignedIn { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Account/RegisterViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Account/RegisterViewModel.cs new file mode 100644 index 0000000..ada5add --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Account/RegisterViewModel.cs @@ -0,0 +1,38 @@ +using System.ComponentModel; +using System.ComponentModel.DataAnnotations; + +namespace DancingGoat.Models +{ + public class RegisterViewModel + { + [DataType(DataType.Text)] + [Required(ErrorMessage = "Please enter your username")] + [DisplayName("User name")] + [RegularExpression("^[a-zA-Z0-9_\\-\\.]+$", ErrorMessage = "Please enter a valid username")] + [MaxLength(100, ErrorMessage = "Maximum allowed length of the input text is {1}")] + public string UserName { get; set; } + + + [DataType(DataType.EmailAddress)] + [Required(ErrorMessage = "Please enter your email")] + [DisplayName("Email")] + [EmailAddress(ErrorMessage = "Please enter a valid email address")] + [MaxLength(100, ErrorMessage = "Maximum allowed length of the input text is {1}")] + public string Email { get; set; } + + + [DataType(DataType.Password)] + [DisplayName("Password")] + [Required(ErrorMessage = "Please enter your password")] + [MaxLength(100, ErrorMessage = "Maximum allowed length of the input text is {1}")] + public string Password { get; set; } + + + [DataType(DataType.Password)] + [DisplayName("Confirm your password")] + [Required(ErrorMessage = "Please confirm your password")] + [MaxLength(100, ErrorMessage = "Maximum allowed length of the input text is {1}")] + [Compare("Password", ErrorMessage = "Password does not match the confirmation password")] + public string PasswordConfirmation { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Article/Article.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Article/Article.cs new file mode 100644 index 0000000..e8578ce --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Article/Article.cs @@ -0,0 +1,18 @@ +using System; + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Custom Article members. + /// + public partial class Article + { + public DateTime PublicationDate + { + get + { + return GetDateTimeValue("DocumentPublishFrom", GetDateTimeValue("DocumentCreatedWhen", DateTime.MinValue)); + } + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Article/Article.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Article/Article.generated.cs new file mode 100644 index 0000000..1450da9 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Article/Article.generated.cs @@ -0,0 +1,209 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Article.CLASS_NAME, typeof(Article))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Article. + /// + public partial class Article : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Article"; + + + /// + /// The instance of the class that provides extended API for working with Article fields. + /// + private readonly ArticleFields mFields; + + #endregion + + + #region "Properties" + + /// + /// ArticleID. + /// + [DatabaseIDField] + public int ArticleID + { + get + { + return ValidationHelper.GetInteger(GetValue("ArticleID"), 0); + } + set + { + SetValue("ArticleID", value); + } + } + + + /// + /// ArticleSummary. + /// + [DatabaseField] + public string ArticleSummary + { + get + { + return ValidationHelper.GetString(GetValue("ArticleSummary"), @""); + } + set + { + SetValue("ArticleSummary", value); + } + } + + + /// + /// ArticleText. + /// + [DatabaseField] + public string ArticleText + { + get + { + return ValidationHelper.GetString(GetValue("ArticleText"), @""); + } + set + { + SetValue("ArticleText", value); + } + } + + + /// + /// Gets an object that provides extended API for working with Article fields. + /// + [RegisterProperty] + public ArticleFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Article fields. + /// + [RegisterAllProperties] + public partial class ArticleFields : AbstractHierarchicalObject + { + /// + /// The content item of type Article that is a target of the extended API. + /// + private readonly Article mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Article. + /// + /// The content item of type Article that is a target of the extended API. + public ArticleFields(Article instance) + { + mInstance = instance; + } + + + /// + /// ArticleID. + /// + public int ID + { + get + { + return mInstance.ArticleID; + } + set + { + mInstance.ArticleID = value; + } + } + + + /// + /// ArticleTeaser. + /// + public IEnumerable Teaser + { + get + { + return (mInstance.LinkedContentItems["ArticleTeaser"]); + } + } + + + /// + /// ArticleSummary. + /// + public string Summary + { + get + { + return mInstance.ArticleSummary; + } + set + { + mInstance.ArticleSummary = value; + } + } + + + /// + /// ArticleText. + /// + public string Text + { + get + { + return mInstance.ArticleText; + } + set + { + mInstance.ArticleText = value; + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Article() : base(CLASS_NAME) + { + mFields = new ArticleFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Article/ArticleRepository.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Article/ArticleRepository.cs new file mode 100644 index 0000000..4876f33 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Article/ArticleRepository.cs @@ -0,0 +1,92 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Infrastructure; + +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.Models +{ + /// + /// Provides methods for retrieving pages of type Article. + /// + public class ArticleRepository + { + private readonly IPageRetriever pageRetriever; + private readonly IPageDataContextRetriever pageDataContextRetriever; + private readonly RepositoryCacheHelper repositoryCacheHelper; + + + /// + /// Initializes a new instance of the class. + /// + /// The pages retriever. + /// Cache helper for repositories making working with cache easier. + public ArticleRepository(IPageRetriever pageRetriever, IPageDataContextRetriever pageDataContextRetriever, RepositoryCacheHelper repositoryCacheHelper) + { + this.pageRetriever = pageRetriever; + this.pageDataContextRetriever = pageDataContextRetriever; + this.repositoryCacheHelper = repositoryCacheHelper; + } + + + /// + /// Returns an enumerable collection of articles ordered by the date of publication. The most recent articles come first. + /// + /// The node alias path of the articles section in the content tree. + /// The number of articles to return. Use 0 as value to return all records. + /// Cancellation token. + public async Task> GetArticles(string nodeAliasPath, int count = 0, CancellationToken? cancellationToken = null) + { + const int maxLevel = 2; + + var articles = pageRetriever.Retrieve
( + query => query + .Path(nodeAliasPath, PathTypeEnum.Children) + .TopN(count) + .OrderByDescending("DocumentPublishFrom"), + cache => cache + .Key($"{nameof(ArticleRepository)}|{nameof(GetArticles)}|{nodeAliasPath}|{count}") + // Include path dependency to flush cache when a new child page is created. + .Dependencies((_, builder) => builder.PagePath(nodeAliasPath, PathTypeEnum.Children))); + + return await repositoryCacheHelper.CacheData(async cancellationToken => + { + var articlesWithLinkedItems = new List
(); + + foreach (var article in articles) + { + articlesWithLinkedItems.Add(await article.WithLinkedItems(maxLevel, cancellationToken)); + } + + return articlesWithLinkedItems; + }, cancellationToken ?? CancellationToken.None, $"{nameof(ArticleRepository)}|{nameof(GetArticles)}|WithLinkedItems|{nodeAliasPath}|{count}", + () => articles.GetLinkedItemsCacheDependencyKeys(maxLevel, cancellationToken) + ); + + } + + + /// + /// Returns current article. + /// + /// Maximum level of retrieved linked content items. + /// Cancellation token. + public async virtual Task
GetCurrent(int maxLevel = 1, CancellationToken? cancellationToken = null) + { + var page = pageDataContextRetriever.Retrieve
().Page; + + return await repositoryCacheHelper.CacheData( + async cancellationToken => await page.WithLinkedItems(maxLevel, cancellationToken), + cancellationToken ?? CancellationToken.None, + $"{nameof(ArticleRepository)}|{nameof(GetCurrent)}|WithLinkedItems|{page.NodeID}", + () => page.GetLinkedItemsCacheDependencyKeys(maxLevel, cancellationToken) + ); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Article/ArticleViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Article/ArticleViewModel.cs new file mode 100644 index 0000000..3dcadb2 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Article/ArticleViewModel.cs @@ -0,0 +1,53 @@ +using System; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.Models +{ + public class ArticleViewModel + { + public string TeaserPath{ get; set; } + + + public string TeaserShortDescription { get; set; } + + + public string Title { get; set; } + + + public DateTime PublicationDate { get; set; } + + + public string Summary { get; set; } + + + public string Text { get; set; } + + + public string Url { get; set; } + + + public bool IsSecured { get; set; } + + + public static ArticleViewModel GetViewModel(Article article, IPageUrlRetriever pageUrlRetriever) + { + var articleMedia = article?.Fields.Teaser.FirstOrDefault() as Media; + + return new ArticleViewModel + { + PublicationDate = article.PublicationDate, + Summary = article.Fields.Summary, + TeaserPath = articleMedia?.Fields.File.Url, + TeaserShortDescription = articleMedia?.Fields.ShortDescription ?? string.Empty, + Text = article.Fields.Text, + Title = article.DocumentName, + Url = pageUrlRetriever.Retrieve(article).RelativePath, + IsSecured = article.NodeIsSecured + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/ArticleSection/ArticleSection.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/ArticleSection/ArticleSection.generated.cs new file mode 100644 index 0000000..7e95195 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/ArticleSection/ArticleSection.generated.cs @@ -0,0 +1,98 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(ArticleSection.CLASS_NAME, typeof(ArticleSection))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type ArticleSection. + /// + public partial class ArticleSection : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.ArticleSection"; + + + /// + /// The instance of the class that provides extended API for working with ArticleSection fields. + /// + private readonly ArticleSectionFields mFields; + + #endregion + + + #region "Properties" + + /// + /// Gets an object that provides extended API for working with ArticleSection fields. + /// + [RegisterProperty] + public ArticleSectionFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with ArticleSection fields. + /// + [RegisterAllProperties] + public partial class ArticleSectionFields : AbstractHierarchicalObject + { + /// + /// The content item of type ArticleSection that is a target of the extended API. + /// + private readonly ArticleSection mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type ArticleSection. + /// + /// The content item of type ArticleSection that is a target of the extended API. + public ArticleSectionFields(ArticleSection instance) + { + mInstance = instance; + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public ArticleSection() : base(CLASS_NAME) + { + mFields = new ArticleSectionFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/Cafe.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/Cafe.cs new file mode 100644 index 0000000..848ff49 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/Cafe.cs @@ -0,0 +1,72 @@ +using DancingGoat.Models; + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Specification of Cafe members and IContact interface relationship. + /// + public partial class Cafe : IContact + { + public string Name + { + get + { + return DocumentName; + } + } + + + public string Phone + { + get + { + return Fields.Phone; + } + } + + + public string Email + { + get + { + return ""; + } + } + + + public string ZIP + { + get + { + return Fields.ZipCode; + } + } + + + public string Street + { + get + { + return Fields.Street; + } + } + + + public string City + { + get + { + return Fields.City; + } + } + + + public string Country + { + get + { + return Fields.Country; + } + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/Cafe.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/Cafe.generated.cs new file mode 100644 index 0000000..1f4142a --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/Cafe.generated.cs @@ -0,0 +1,386 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Cafe.CLASS_NAME, typeof(Cafe))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Cafe. + /// + public partial class Cafe : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Cafe"; + + + /// + /// The instance of the class that provides extended API for working with Cafe fields. + /// + private readonly CafeFields mFields; + + #endregion + + + #region "Properties" + + /// + /// CafeID. + /// + [DatabaseIDField] + public int CafeID + { + get + { + return ValidationHelper.GetInteger(GetValue("CafeID"), 0); + } + set + { + SetValue("CafeID", value); + } + } + + + /// + /// CafeIsCompanyCafe. + /// + [DatabaseField] + public bool CafeIsCompanyCafe + { + get + { + return ValidationHelper.GetBoolean(GetValue("CafeIsCompanyCafe"), false); + } + set + { + SetValue("CafeIsCompanyCafe", value); + } + } + + + /// + /// CafeStreet. + /// + [DatabaseField] + public string CafeStreet + { + get + { + return ValidationHelper.GetString(GetValue("CafeStreet"), @""); + } + set + { + SetValue("CafeStreet", value); + } + } + + + /// + /// CafeCity. + /// + [DatabaseField] + public string CafeCity + { + get + { + return ValidationHelper.GetString(GetValue("CafeCity"), @""); + } + set + { + SetValue("CafeCity", value); + } + } + + + /// + /// CafeCountry. + /// + [DatabaseField] + public string CafeCountry + { + get + { + return ValidationHelper.GetString(GetValue("CafeCountry"), @"USA"); + } + set + { + SetValue("CafeCountry", value); + } + } + + + /// + /// CafeZipCode. + /// + [DatabaseField] + public string CafeZipCode + { + get + { + return ValidationHelper.GetString(GetValue("CafeZipCode"), @""); + } + set + { + SetValue("CafeZipCode", value); + } + } + + + /// + /// CafePhone. + /// + [DatabaseField] + public string CafePhone + { + get + { + return ValidationHelper.GetString(GetValue("CafePhone"), @""); + } + set + { + SetValue("CafePhone", value); + } + } + + + /// + /// CafeAdditionalNotes. + /// + [DatabaseField] + public string CafeAdditionalNotes + { + get + { + return ValidationHelper.GetString(GetValue("CafeAdditionalNotes"), @""); + } + set + { + SetValue("CafeAdditionalNotes", value); + } + } + + + /// + /// Gets an object that provides extended API for working with Cafe fields. + /// + [RegisterProperty] + public CafeFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Cafe fields. + /// + [RegisterAllProperties] + public partial class CafeFields : AbstractHierarchicalObject + { + /// + /// The content item of type Cafe that is a target of the extended API. + /// + private readonly Cafe mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Cafe. + /// + /// The content item of type Cafe that is a target of the extended API. + public CafeFields(Cafe instance) + { + mInstance = instance; + } + + + /// + /// CafeID. + /// + public int ID + { + get + { + return mInstance.CafeID; + } + set + { + mInstance.CafeID = value; + } + } + + + /// + /// CafeIsCompanyCafe. + /// + public bool IsCompanyCafe + { + get + { + return mInstance.CafeIsCompanyCafe; + } + set + { + mInstance.CafeIsCompanyCafe = value; + } + } + + + /// + /// CafeStreet. + /// + public string Street + { + get + { + return mInstance.CafeStreet; + } + set + { + mInstance.CafeStreet = value; + } + } + + + /// + /// CafeCity. + /// + public string City + { + get + { + return mInstance.CafeCity; + } + set + { + mInstance.CafeCity = value; + } + } + + + /// + /// CafeCountry. + /// + public string Country + { + get + { + return mInstance.CafeCountry; + } + set + { + mInstance.CafeCountry = value; + } + } + + + /// + /// CafeZipCode. + /// + public string ZipCode + { + get + { + return mInstance.CafeZipCode; + } + set + { + mInstance.CafeZipCode = value; + } + } + + + /// + /// CafePhone. + /// + public string Phone + { + get + { + return mInstance.CafePhone; + } + set + { + mInstance.CafePhone = value; + } + } + + + /// + /// CafePhoto. + /// + public IEnumerable Photo + { + get + { + return (mInstance.LinkedContentItems["CafePhoto"]); + } + } + + + /// + /// CafeAdditionalNotes. + /// + public string AdditionalNotes + { + get + { + return mInstance.CafeAdditionalNotes; + } + set + { + mInstance.CafeAdditionalNotes = value; + } + } + + + /// + /// CafeCuppingOffer. + /// + public IEnumerable CuppingOffer + { + get + { + return (mInstance.LinkedContentItems["CafeCuppingOffer"]); + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Cafe() : base(CLASS_NAME) + { + mFields = new CafeFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/CafeRepository.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/CafeRepository.cs new file mode 100644 index 0000000..db0e68f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/CafeRepository.cs @@ -0,0 +1,107 @@ +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Infrastructure; + +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.Models +{ + /// + /// Represents a collection of cafes. + /// + public partial class CafeRepository + { + private readonly IPageRetriever pageRetriever; + private readonly RepositoryCacheHelper repositoryCacheHelper; + + + /// + /// Initializes a new instance of the class that returns cafes. + /// + /// Retriever for pages based on given parameters. + /// Cache helper for repositories making working with cache easier. + public CafeRepository(IPageRetriever pageRetriever, RepositoryCacheHelper repositoryCacheHelper) + { + this.pageRetriever = pageRetriever; + this.repositoryCacheHelper = repositoryCacheHelper; + } + + + /// + /// Returns an enumerable collection of company cafes ordered by a position in the content tree. + /// + /// The node alias path of the articles section in the content tree. + /// The number of cafes to return. Use 0 as value to return all records. + /// Cancellation token. + public async Task> GetCompanyCafes(string nodeAliasPath, int count = 0, CancellationToken? cancellationToken = null) + { + const int maxLevel = 2; + + var cafes = pageRetriever.Retrieve( + query => query + .Path(nodeAliasPath, PathTypeEnum.Children) + .TopN(count) + .WhereTrue("CafeIsCompanyCafe") + .OrderBy("NodeOrder"), + cache => cache + .Key($"{nameof(CafeRepository)}|{nameof(GetCompanyCafes)}|{nodeAliasPath}|{count}") + // Include path dependency to flush cache when a new child page is created or page order is changed. + .Dependencies((_, builder) => builder.PagePath(nodeAliasPath, PathTypeEnum.Children).PageOrder())); + + + return await repositoryCacheHelper.CacheData(async cancellationToken => + { + var cafesWithLinkedItems = new List(); + + foreach (var cafe in cafes) + { + cafesWithLinkedItems.Add(await cafe.WithLinkedItems(maxLevel, cancellationToken)); + } + + return cafesWithLinkedItems; + }, cancellationToken ?? CancellationToken.None, + $"{nameof(CafeRepository)}|{nameof(GetCompanyCafes)}|WithLinkedItems|{nodeAliasPath}|{count}", + () => cafes.GetLinkedItemsCacheDependencyKeys(2, cancellationToken)); + } + + + /// + /// Returns a single cafe for the given . + /// + /// Node ID. + public Cafe GetCafeByNodeId(int nodeId) + { + return pageRetriever.Retrieve( + query => query + .WhereEquals("NodeID", nodeId) + .TopN(1), + cache => cache + .Key($"{nameof(CafeRepository)}|{nameof(GetCafeByNodeId)}|{nodeId}")) + .FirstOrDefault(); + } + + + /// + /// Returns an enumerable collection of partner cafes ordered by a position in the content tree. + /// + /// The node alias path of the articles section in the content tree. + public IEnumerable GetPartnerCafes(string nodeAliasPath) + { + return pageRetriever.Retrieve( + query => query + .Path(nodeAliasPath, PathTypeEnum.Children) + .WhereFalse("CafeIsCompanyCafe") + .OrderBy("NodeOrder"), + cache => cache + .Key($"{nameof(CafeRepository)}|{nameof(GetPartnerCafes)}|{nodeAliasPath}") + // Include path dependency to flush cache when a new child page is created or page order is changed. + .Dependencies((_, builder) => builder.PagePath(nodeAliasPath, PathTypeEnum.Children).PageOrder())); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/CafeViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/CafeViewModel.cs new file mode 100644 index 0000000..91d71ed --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/CafeViewModel.cs @@ -0,0 +1,30 @@ +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using Microsoft.Extensions.Localization; + +namespace DancingGoat.Models +{ + public class CafeViewModel + { + public string PhotoPath { get; set; } + + + public string Note { get; set; } + + + public ContactViewModel Contact { get; set; } + + + public static CafeViewModel GetViewModel(Cafe cafe, IStringLocalizer localizer) + { + return new CafeViewModel + { + PhotoPath = (cafe.Fields.Photo.FirstOrDefault() as Media)?.Fields.File?.Url, + Note = cafe.Fields.AdditionalNotes, + Contact = ContactViewModel.GetViewModel(cafe, localizer) + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/CafesIndexViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/CafesIndexViewModel.cs new file mode 100644 index 0000000..a40e8b1 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Cafe/CafesIndexViewModel.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace DancingGoat.Models +{ + public class CafesIndexViewModel + { + public IEnumerable CompanyCafes { get; set; } + + + public Dictionary> PartnerCafes { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/CafeSection/CafeSection.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/CafeSection/CafeSection.generated.cs new file mode 100644 index 0000000..1bcc487 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/CafeSection/CafeSection.generated.cs @@ -0,0 +1,98 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(CafeSection.CLASS_NAME, typeof(CafeSection))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type CafeSection. + /// + public partial class CafeSection : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.CafeSection"; + + + /// + /// The instance of the class that provides extended API for working with CafeSection fields. + /// + private readonly CafeSectionFields mFields; + + #endregion + + + #region "Properties" + + /// + /// Gets an object that provides extended API for working with CafeSection fields. + /// + [RegisterProperty] + public CafeSectionFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with CafeSection fields. + /// + [RegisterAllProperties] + public partial class CafeSectionFields : AbstractHierarchicalObject + { + /// + /// The content item of type CafeSection that is a target of the extended API. + /// + private readonly CafeSection mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type CafeSection. + /// + /// The content item of type CafeSection that is a target of the extended API. + public CafeSectionFields(CafeSection instance) + { + mInstance = instance; + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public CafeSection() : base(CLASS_NAME) + { + mFields = new CafeSectionFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Coffee/Coffee.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Coffee/Coffee.generated.cs new file mode 100644 index 0000000..910ba16 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Coffee/Coffee.generated.cs @@ -0,0 +1,209 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Coffee.CLASS_NAME, typeof(Coffee))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Coffee. + /// + public partial class Coffee : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Coffee"; + + + /// + /// The instance of the class that provides extended API for working with Coffee fields. + /// + private readonly CoffeeFields mFields; + + #endregion + + + #region "Properties" + + /// + /// CoffeeID. + /// + [DatabaseIDField] + public int CoffeeID + { + get + { + return ValidationHelper.GetInteger(GetValue("CoffeeID"), 0); + } + set + { + SetValue("CoffeeID", value); + } + } + + + /// + /// CoffeeShortDescription. + /// + [DatabaseField] + public string CoffeeShortDescription + { + get + { + return ValidationHelper.GetString(GetValue("CoffeeShortDescription"), @""); + } + set + { + SetValue("CoffeeShortDescription", value); + } + } + + + /// + /// CoffeeDescription. + /// + [DatabaseField] + public string CoffeeDescription + { + get + { + return ValidationHelper.GetString(GetValue("CoffeeDescription"), @""); + } + set + { + SetValue("CoffeeDescription", value); + } + } + + + /// + /// Gets an object that provides extended API for working with Coffee fields. + /// + [RegisterProperty] + public CoffeeFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Coffee fields. + /// + [RegisterAllProperties] + public partial class CoffeeFields : AbstractHierarchicalObject + { + /// + /// The content item of type Coffee that is a target of the extended API. + /// + private readonly Coffee mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Coffee. + /// + /// The content item of type Coffee that is a target of the extended API. + public CoffeeFields(Coffee instance) + { + mInstance = instance; + } + + + /// + /// CoffeeID. + /// + public int ID + { + get + { + return mInstance.CoffeeID; + } + set + { + mInstance.CoffeeID = value; + } + } + + + /// + /// CoffeeShortDescription. + /// + public string ShortDescription + { + get + { + return mInstance.CoffeeShortDescription; + } + set + { + mInstance.CoffeeShortDescription = value; + } + } + + + /// + /// CoffeeDescription. + /// + public string Description + { + get + { + return mInstance.CoffeeDescription; + } + set + { + mInstance.CoffeeDescription = value; + } + } + + + /// + /// CoffeeImage. + /// + public IEnumerable Image + { + get + { + return (mInstance.LinkedContentItems["CoffeeImage"]); + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Coffee() : base(CLASS_NAME) + { + mFields = new CoffeeFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Coffee/CoffeeRepository.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Coffee/CoffeeRepository.cs new file mode 100644 index 0000000..b68145e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Coffee/CoffeeRepository.cs @@ -0,0 +1,106 @@ +using System; +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Infrastructure; + +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.Models +{ + /// + /// Represents a collection of coffees. + /// + public partial class CoffeeRepository + { + private readonly IPageRetriever pageRetriever; + private readonly IPageDataContextRetriever pageDataContextRetriever; + private readonly RepositoryCacheHelper repositoryCacheHelper; + + + /// + /// Initializes a new instance of the class that returns coffees. + /// + /// Retriever for pages based on given parameters. + /// Cache helper for repositories making working with cache easier. + public CoffeeRepository(IPageRetriever pageRetriever, IPageDataContextRetriever pageDataContextRetriever, RepositoryCacheHelper repositoryCacheHelper) + { + this.pageRetriever = pageRetriever; + this.pageDataContextRetriever = pageDataContextRetriever; + this.repositoryCacheHelper = repositoryCacheHelper; + } + + + /// + /// Returns an enumerable collection of coffees ordered by a position in the content tree. + /// + /// The node alias path of the coffees section in the content tree. + /// The number of coffees to return. Use 0 as value to return all records. + /// Cancellation token. + public async Task> Get(string nodeAliasPath, int count = 0, CancellationToken? cancellationToken = null) + { + const int maxLevel = 2; + + var coffees = await pageRetriever.RetrieveAsync( + query => query + .Path(nodeAliasPath, PathTypeEnum.Children) + .TopN(count) + .OrderBy("NodeOrder"), + cache => cache + .Key($"{nameof(CoffeeRepository)}|{nameof(Get)}|{nodeAliasPath}|{count}") + // Include path dependency to flush cache when a new child page is created or page order is changed. + .Dependencies((_, builder) => builder.PagePath(nodeAliasPath, PathTypeEnum.Children).PageOrder()) + ); + + return await repositoryCacheHelper.CacheData(async cancellationToken => + { + var coffeeWithLinkedItems = new List(); + + foreach (var coffee in coffees) + { + coffeeWithLinkedItems.Add(await coffee.WithLinkedItems(maxLevel, cancellationToken)); + } + + return coffeeWithLinkedItems; + }, cancellationToken ?? CancellationToken.None, + $"{nameof(CoffeeRepository)}|{nameof(Get)}|WithLinkedItems|{nodeAliasPath}|{count}", + () => coffees.GetLinkedItemsCacheDependencyKeys(maxLevel, cancellationToken)); + + } + + + /// + /// Returns an enumerable collection of coffees based on node guid. + /// + /// Collection of the nodes identifiers. + public IEnumerable Get(ICollection nodeIds) + { + return pageRetriever.Retrieve( + query => query.WhereIn("NodeID", nodeIds), + cache => cache + .Key($"{nameof(CoffeeRepository)}|{nameof(Get)}|{String.Join(";", nodeIds)}")); + } + + + /// + /// Returns current coffee article. + /// + /// Maximum level of retrieved linked content items. + /// Cancellation token. + public async virtual Task GetCurrent(int maxLevel = 1, CancellationToken? cancellationToken = null) + { + var page = pageDataContextRetriever.Retrieve().Page; + + return await repositoryCacheHelper.CacheData( + async cancellationToken => await page.WithLinkedItems(maxLevel, cancellationToken), + cancellationToken ?? CancellationToken.None, + $"{nameof(CoffeeRepository)}|{nameof(GetCurrent)}|WithLinkedItems|{page.NodeID}", + () => page.GetLinkedItemsCacheDependencyKeys(maxLevel, cancellationToken) + ); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Coffee/CoffeeViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Coffee/CoffeeViewModel.cs new file mode 100644 index 0000000..b6bd335 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Coffee/CoffeeViewModel.cs @@ -0,0 +1,18 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +namespace DancingGoat.Models +{ + public class CoffeeViewModel + { + public string Name { get; set; } + + public string Description { get; set; } + + public string Url { get; set; } + + public string ImagePath { get; set; } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/CoffeeSection/CoffeeSection.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/CoffeeSection/CoffeeSection.generated.cs new file mode 100644 index 0000000..2b93759 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/CoffeeSection/CoffeeSection.generated.cs @@ -0,0 +1,98 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(CoffeeSection.CLASS_NAME, typeof(CoffeeSection))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type CoffeeSection. + /// + public partial class CoffeeSection : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.CoffeeSection"; + + + /// + /// The instance of the class that provides extended API for working with CoffeeSection fields. + /// + private readonly CoffeeSectionFields mFields; + + #endregion + + + #region "Properties" + + /// + /// Gets an object that provides extended API for working with CoffeeSection fields. + /// + [RegisterProperty] + public CoffeeSectionFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with CoffeeSection fields. + /// + [RegisterAllProperties] + public partial class CoffeeSectionFields : AbstractHierarchicalObject + { + /// + /// The content item of type CoffeeSection that is a target of the extended API. + /// + private readonly CoffeeSection mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type CoffeeSection. + /// + /// The content item of type CoffeeSection that is a target of the extended API. + public CoffeeSectionFields(CoffeeSection instance) + { + mInstance = instance; + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public CoffeeSection() : base(CLASS_NAME) + { + mFields = new CoffeeSectionFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Consent/ConsentViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Consent/ConsentViewModel.cs new file mode 100644 index 0000000..1f26d91 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Consent/ConsentViewModel.cs @@ -0,0 +1,10 @@ +namespace DancingGoat.Models +{ + public class ConsentViewModel + { + public string ConsentShortText { get; set; } + + + public bool IsConsentAgreed { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Contact/Contact.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/Contact.cs new file mode 100644 index 0000000..3097bca --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/Contact.cs @@ -0,0 +1,72 @@ +using DancingGoat.Models; + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Specification of Contact members and IContact interface relationship. + /// + public partial class Contact : IContact + { + public string Name + { + get + { + return DocumentName; + } + } + + + public string Phone + { + get + { + return Fields.Phone; + } + } + + + public string Email + { + get + { + return Fields.Email; + } + } + + + public string ZIP + { + get + { + return Fields.ZipCode; + } + } + + + public string Street + { + get + { + return Fields.Street; + } + } + + + public string City + { + get + { + return Fields.City; + } + } + + + public string Country + { + get + { + return Fields.Country; + } + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Contact/Contact.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/Contact.generated.cs new file mode 100644 index 0000000..45b9538 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/Contact.generated.cs @@ -0,0 +1,329 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Contact.CLASS_NAME, typeof(Contact))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Contact. + /// + public partial class Contact : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Contact"; + + + /// + /// The instance of the class that provides extended API for working with Contact fields. + /// + private readonly ContactFields mFields; + + #endregion + + + #region "Properties" + + /// + /// ContactID. + /// + [DatabaseIDField] + public int ContactID + { + get + { + return ValidationHelper.GetInteger(GetValue("ContactID"), 0); + } + set + { + SetValue("ContactID", value); + } + } + + + /// + /// ContactStreet. + /// + [DatabaseField] + public string ContactStreet + { + get + { + return ValidationHelper.GetString(GetValue("ContactStreet"), @""); + } + set + { + SetValue("ContactStreet", value); + } + } + + + /// + /// ContactCity. + /// + [DatabaseField] + public string ContactCity + { + get + { + return ValidationHelper.GetString(GetValue("ContactCity"), @""); + } + set + { + SetValue("ContactCity", value); + } + } + + + /// + /// ContactCountry. + /// + [DatabaseField] + public string ContactCountry + { + get + { + return ValidationHelper.GetString(GetValue("ContactCountry"), @"USA"); + } + set + { + SetValue("ContactCountry", value); + } + } + + + /// + /// ContactZipCode. + /// + [DatabaseField] + public string ContactZipCode + { + get + { + return ValidationHelper.GetString(GetValue("ContactZipCode"), @""); + } + set + { + SetValue("ContactZipCode", value); + } + } + + + /// + /// ContactPhone. + /// + [DatabaseField] + public string ContactPhone + { + get + { + return ValidationHelper.GetString(GetValue("ContactPhone"), @""); + } + set + { + SetValue("ContactPhone", value); + } + } + + + /// + /// ContactEmail. + /// + [DatabaseField] + public string ContactEmail + { + get + { + return ValidationHelper.GetString(GetValue("ContactEmail"), @""); + } + set + { + SetValue("ContactEmail", value); + } + } + + + /// + /// Gets an object that provides extended API for working with Contact fields. + /// + [RegisterProperty] + public ContactFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Contact fields. + /// + [RegisterAllProperties] + public partial class ContactFields : AbstractHierarchicalObject + { + /// + /// The content item of type Contact that is a target of the extended API. + /// + private readonly Contact mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Contact. + /// + /// The content item of type Contact that is a target of the extended API. + public ContactFields(Contact instance) + { + mInstance = instance; + } + + + /// + /// ContactID. + /// + public int ID + { + get + { + return mInstance.ContactID; + } + set + { + mInstance.ContactID = value; + } + } + + + /// + /// ContactStreet. + /// + public string Street + { + get + { + return mInstance.ContactStreet; + } + set + { + mInstance.ContactStreet = value; + } + } + + + /// + /// ContactCity. + /// + public string City + { + get + { + return mInstance.ContactCity; + } + set + { + mInstance.ContactCity = value; + } + } + + + /// + /// ContactCountry. + /// + public string Country + { + get + { + return mInstance.ContactCountry; + } + set + { + mInstance.ContactCountry = value; + } + } + + + /// + /// ContactZipCode. + /// + public string ZipCode + { + get + { + return mInstance.ContactZipCode; + } + set + { + mInstance.ContactZipCode = value; + } + } + + + /// + /// ContactPhone. + /// + public string Phone + { + get + { + return mInstance.ContactPhone; + } + set + { + mInstance.ContactPhone = value; + } + } + + + /// + /// ContactEmail. + /// + public string Email + { + get + { + return mInstance.ContactEmail; + } + set + { + mInstance.ContactEmail = value; + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Contact() : base(CLASS_NAME) + { + mFields = new ContactFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Contact/ContactRepository.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/ContactRepository.cs new file mode 100644 index 0000000..0a761a6 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/ContactRepository.cs @@ -0,0 +1,40 @@ +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.Models +{ + /// + /// Represents a collection of contact information. + /// + public class ContactRepository + { + private readonly IPageRetriever pageRetriever; + + + /// + /// Initializes a new instance of the class that returns contact information. + /// + /// Retriever for pages based on given parameters. + public ContactRepository(IPageRetriever pageRetriever) + { + this.pageRetriever = pageRetriever; + } + + + /// + /// Returns company's contact information. + /// + public Contact GetCompanyContact() + { + return pageRetriever.Retrieve( + query => query + .TopN(1), + cache => cache + .Key($"{nameof(ContactRepository)}|{nameof(GetCompanyContact)}")) + .FirstOrDefault(); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Contact/ContactViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/ContactViewModel.cs new file mode 100644 index 0000000..ab52854 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/ContactViewModel.cs @@ -0,0 +1,50 @@ +using Microsoft.Extensions.Localization; + +namespace DancingGoat.Models +{ + public class ContactViewModel + { + public string Name { get; set; } + + + public string Phone { get; set; } + + + public string Email { get; set; } + + + public string ZIP { get; set; } + + + public string Street { get; set; } + + + public string City { get; set; } + + + public string Country { get; set; } + + + public ContactViewModel() + { + } + + + public ContactViewModel(IContact contact) + { + Name = contact.Name; + Phone = contact.Phone; + Email = contact.Email; + ZIP = contact.ZIP; + Street = contact.Street; + City = contact.City; + Country = contact.Country; + } + + + public static ContactViewModel GetViewModel(IContact contact, IStringLocalizer localizer) + { + return new ContactViewModel(contact); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Contact/IContact.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/IContact.cs new file mode 100644 index 0000000..3002abb --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Contact/IContact.cs @@ -0,0 +1,25 @@ +namespace DancingGoat.Models +{ + public interface IContact + { + string Name { get; } + + + string Phone { get; } + + + string Email { get; } + + + string ZIP { get; } + + + string Street { get; } + + + string City { get; } + + + string Country { get; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Contacts/Contacts.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Contacts/Contacts.generated.cs new file mode 100644 index 0000000..5e68404 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Contacts/Contacts.generated.cs @@ -0,0 +1,98 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Contacts.CLASS_NAME, typeof(Contacts))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Contacts. + /// + public partial class Contacts : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Contacts"; + + + /// + /// The instance of the class that provides extended API for working with Contacts fields. + /// + private readonly ContactsFields mFields; + + #endregion + + + #region "Properties" + + /// + /// Gets an object that provides extended API for working with Contacts fields. + /// + [RegisterProperty] + public ContactsFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Contacts fields. + /// + [RegisterAllProperties] + public partial class ContactsFields : AbstractHierarchicalObject + { + /// + /// The content item of type Contacts that is a target of the extended API. + /// + private readonly Contacts mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Contacts. + /// + /// The content item of type Contacts that is a target of the extended API. + public ContactsFields(Contacts instance) + { + mInstance = instance; + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Contacts() : base(CLASS_NAME) + { + mFields = new ContactsFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Contacts/ContactsIndexViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Contacts/ContactsIndexViewModel.cs new file mode 100644 index 0000000..a360c41 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Contacts/ContactsIndexViewModel.cs @@ -0,0 +1,12 @@ +using System.Collections.Generic; + +namespace DancingGoat.Models +{ + public class ContactsIndexViewModel + { + public ContactViewModel CompanyContact { get; set; } + + + public List CompanyCafes { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Event/Event.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Event/Event.generated.cs new file mode 100644 index 0000000..4357fa1 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Event/Event.generated.cs @@ -0,0 +1,221 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Event.CLASS_NAME, typeof(Event))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Event. + /// + public partial class Event : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Event"; + + + /// + /// The instance of the class that provides extended API for working with Event fields. + /// + private readonly EventFields mFields; + + #endregion + + + #region "Properties" + + /// + /// EventID. + /// + [DatabaseIDField] + public int EventID + { + get + { + return ValidationHelper.GetInteger(GetValue("EventID"), 0); + } + set + { + SetValue("EventID", value); + } + } + + + /// + /// EventPromoText. + /// + [DatabaseField] + public string EventPromoText + { + get + { + return ValidationHelper.GetString(GetValue("EventPromoText"), @""); + } + set + { + SetValue("EventPromoText", value); + } + } + + + /// + /// EventDate. + /// + [DatabaseField] + public DateTime EventDate + { + get + { + return ValidationHelper.GetDateTime(GetValue("EventDate"), DateTimeHelper.ZERO_TIME); + } + set + { + SetValue("EventDate", value); + } + } + + + /// + /// Gets an object that provides extended API for working with Event fields. + /// + [RegisterProperty] + public EventFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Event fields. + /// + [RegisterAllProperties] + public partial class EventFields : AbstractHierarchicalObject + { + /// + /// The content item of type Event that is a target of the extended API. + /// + private readonly Event mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Event. + /// + /// The content item of type Event that is a target of the extended API. + public EventFields(Event instance) + { + mInstance = instance; + } + + + /// + /// EventID. + /// + public int ID + { + get + { + return mInstance.EventID; + } + set + { + mInstance.EventID = value; + } + } + + + /// + /// EventHeroBannerImage. + /// + public IEnumerable HeroBannerImage + { + get + { + return (mInstance.LinkedContentItems["EventHeroBannerImage"]); + } + } + + + /// + /// EventPromoText. + /// + public string PromoText + { + get + { + return mInstance.EventPromoText; + } + set + { + mInstance.EventPromoText = value; + } + } + + + /// + /// EventDate. + /// + public DateTime Date + { + get + { + return mInstance.EventDate; + } + set + { + mInstance.EventDate = value; + } + } + + + /// + /// EventCafe. + /// + public IEnumerable Cafe + { + get + { + return (mInstance.LinkedContentItems["EventCafe"]); + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Event() : base(CLASS_NAME) + { + mFields = new EventFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Event/EventViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Event/EventViewModel.cs new file mode 100644 index 0000000..865777b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Event/EventViewModel.cs @@ -0,0 +1,48 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +namespace DancingGoat.Models +{ + public class EventViewModel + { + public string Title { get; set; } + + public string PromoText { get; set; } + + public DateTime Date { get; set; } + + public string HeroBannerImagePath { get; set; } + + public string HeroBannerImageShortDescription { get; set; } + + public string Location { get; set; } + + public IEnumerable Coffees { get; set; } + + + public static EventViewModel GetViewModel(Event cuppingEvent) + { + if (cuppingEvent == null) + { + return null; + } + + var cafe = cuppingEvent.Fields.Cafe.FirstOrDefault() as Cafe; + var heroBannerImage = cuppingEvent.Fields.HeroBannerImage.FirstOrDefault() as Media; + + return new EventViewModel + { + Title = cuppingEvent.DocumentName, + Date = cuppingEvent.EventDate, + PromoText = cuppingEvent.EventPromoText, + Location = cafe?.DocumentName, + Coffees = cafe?.Fields.CuppingOffer.Select(p => p.DocumentName), + HeroBannerImagePath = heroBannerImage?.Fields.File?.Url, + HeroBannerImageShortDescription = heroBannerImage?.Fields.ShortDescription ?? string.Empty + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Filter/IRepositoryFilter.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Filter/IRepositoryFilter.cs new file mode 100644 index 0000000..3d45429 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Filter/IRepositoryFilter.cs @@ -0,0 +1,17 @@ +using CMS.DataEngine; + +using DancingGoat.Infrastructure; + +namespace DancingGoat.Models +{ + /// + /// Defines a method to get a representing the filter configuration. + /// + public interface IRepositoryFilter : ICacheKey + { + /// + /// Returns a filter . + /// + WhereCondition GetWhereCondition(); + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Home/Home.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Home/Home.generated.cs new file mode 100644 index 0000000..fdafd84 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Home/Home.generated.cs @@ -0,0 +1,167 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Home.CLASS_NAME, typeof(Home))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Home. + /// + public partial class Home : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Home"; + + + /// + /// The instance of the class that provides extended API for working with Home fields. + /// + private readonly HomeFields mFields; + + #endregion + + + #region "Properties" + + /// + /// HomeID. + /// + [DatabaseIDField] + public int HomeID + { + get + { + return ValidationHelper.GetInteger(GetValue("HomeID"), 0); + } + set + { + SetValue("HomeID", value); + } + } + + + /// + /// Gets an object that provides extended API for working with Home fields. + /// + [RegisterProperty] + public HomeFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Home fields. + /// + [RegisterAllProperties] + public partial class HomeFields : AbstractHierarchicalObject + { + /// + /// The content item of type Home that is a target of the extended API. + /// + private readonly Home mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Home. + /// + /// The content item of type Home that is a target of the extended API. + public HomeFields(Home instance) + { + mInstance = instance; + } + + + /// + /// HomeID. + /// + public int ID + { + get + { + return mInstance.HomeID; + } + set + { + mInstance.HomeID = value; + } + } + + + /// + /// HomeSections. + /// + public IEnumerable Sections + { + get + { + return (mInstance.LinkedContentItems["HomeSections"]); + } + } + + + /// + /// HomeEvent. + /// + public IEnumerable Event + { + get + { + return (mInstance.LinkedContentItems["HomeEvent"]); + } + } + + + /// + /// HomeReference. + /// + public IEnumerable Reference + { + get + { + return (mInstance.LinkedContentItems["HomeReference"]); + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Home() : base(CLASS_NAME) + { + mFields = new HomeFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Home/HomeIndexViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Home/HomeIndexViewModel.cs new file mode 100644 index 0000000..abd805d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Home/HomeIndexViewModel.cs @@ -0,0 +1,13 @@ +using System.Collections.Generic; + +namespace DancingGoat.Models +{ + public class HomeIndexViewModel + { + public IEnumerable HomeSections { get; set; } + + public ReferenceViewModel Reference { get; set; } + + public EventViewModel Event { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/HomeSection/HomeSection.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/HomeSection/HomeSection.generated.cs new file mode 100644 index 0000000..c958d42 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/HomeSection/HomeSection.generated.cs @@ -0,0 +1,197 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(HomeSection.CLASS_NAME, typeof(HomeSection))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type HomeSection. + /// + public partial class HomeSection : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.HomeSection"; + + + /// + /// The instance of the class that provides extended API for working with HomeSection fields. + /// + private readonly HomeSectionFields mFields; + + #endregion + + + #region "Properties" + + /// + /// HomeSectionID. + /// + [DatabaseIDField] + public int HomeSectionID + { + get + { + return ValidationHelper.GetInteger(GetValue("HomeSectionID"), 0); + } + set + { + SetValue("HomeSectionID", value); + } + } + + + /// + /// HomeSectionText. + /// + [DatabaseField] + public string HomeSectionText + { + get + { + return ValidationHelper.GetString(GetValue("HomeSectionText"), @""); + } + set + { + SetValue("HomeSectionText", value); + } + } + + + /// + /// HomeSectionLinkText. + /// + [DatabaseField] + public string HomeSectionLinkText + { + get + { + return ValidationHelper.GetString(GetValue("HomeSectionLinkText"), @""); + } + set + { + SetValue("HomeSectionLinkText", value); + } + } + + + /// + /// Gets an object that provides extended API for working with HomeSection fields. + /// + [RegisterProperty] + public HomeSectionFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with HomeSection fields. + /// + [RegisterAllProperties] + public partial class HomeSectionFields : AbstractHierarchicalObject + { + /// + /// The content item of type HomeSection that is a target of the extended API. + /// + private readonly HomeSection mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type HomeSection. + /// + /// The content item of type HomeSection that is a target of the extended API. + public HomeSectionFields(HomeSection instance) + { + mInstance = instance; + } + + + /// + /// HomeSectionID. + /// + public int ID + { + get + { + return mInstance.HomeSectionID; + } + set + { + mInstance.HomeSectionID = value; + } + } + + + /// + /// HomeSectionText. + /// + public string Text + { + get + { + return mInstance.HomeSectionText; + } + set + { + mInstance.HomeSectionText = value; + } + } + + + /// + /// HomeSectionLinkText. + /// + public string LinkText + { + get + { + return mInstance.HomeSectionLinkText; + } + set + { + mInstance.HomeSectionLinkText = value; + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public HomeSection() : base(CLASS_NAME) + { + mFields = new HomeSectionFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/HomeSection/HomeSectionViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/HomeSection/HomeSectionViewModel.cs new file mode 100644 index 0000000..d902778 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/HomeSection/HomeSectionViewModel.cs @@ -0,0 +1,21 @@ +using CMS.DocumentEngine.Types.DancingGoatCore; + +namespace DancingGoat.Models +{ + public class HomeSectionViewModel + { + public string Heading { get; set; } + public string Text { get; set; } + public string MoreButtonText { get; set; } + + public static HomeSectionViewModel GetViewModel(HomeSection homeSection) + { + return homeSection == null ? null : new HomeSectionViewModel + { + Heading = homeSection.DocumentName, + Text = homeSection.Fields.Text, + MoreButtonText = homeSection.Fields.LinkText, + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/LandingPage/LandingPage.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/LandingPage/LandingPage.generated.cs new file mode 100644 index 0000000..864895e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/LandingPage/LandingPage.generated.cs @@ -0,0 +1,98 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(LandingPage.CLASS_NAME, typeof(LandingPage))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type LandingPage. + /// + public partial class LandingPage : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.LandingPage"; + + + /// + /// The instance of the class that provides extended API for working with LandingPage fields. + /// + private readonly LandingPageFields mFields; + + #endregion + + + #region "Properties" + + /// + /// Gets an object that provides extended API for working with LandingPage fields. + /// + [RegisterProperty] + public LandingPageFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with LandingPage fields. + /// + [RegisterAllProperties] + public partial class LandingPageFields : AbstractHierarchicalObject + { + /// + /// The content item of type LandingPage that is a target of the extended API. + /// + private readonly LandingPage mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type LandingPage. + /// + /// The content item of type LandingPage that is a target of the extended API. + public LandingPageFields(LandingPage instance) + { + mInstance = instance; + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public LandingPage() : base(CLASS_NAME) + { + mFields = new LandingPageFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Media/Media.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Media/Media.generated.cs new file mode 100644 index 0000000..1af0d9f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Media/Media.generated.cs @@ -0,0 +1,193 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Media.CLASS_NAME, typeof(Media))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Media. + /// + public partial class Media : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Media"; + + + /// + /// The instance of the class that provides extended API for working with Media fields. + /// + private readonly MediaFields mFields; + + #endregion + + + #region "Properties" + + /// + /// MediaID. + /// + [DatabaseIDField] + public int MediaID + { + get + { + return ValidationHelper.GetInteger(GetValue("MediaID"), 0); + } + set + { + SetValue("MediaID", value); + } + } + + + /// + /// MediaFile. + /// + [DatabaseField] + public string MediaFile + { + get + { + return ValidationHelper.GetString(GetValue("MediaFile"), ""); + } + set + { + SetValue("MediaFile", value); + } + } + + + /// + /// MediaShortDescription. + /// + [DatabaseField] + public string MediaShortDescription + { + get + { + return ValidationHelper.GetString(GetValue("MediaShortDescription"), @""); + } + set + { + SetValue("MediaShortDescription", value); + } + } + + + /// + /// Gets an object that provides extended API for working with Media fields. + /// + [RegisterProperty] + public MediaFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Media fields. + /// + [RegisterAllProperties] + public partial class MediaFields : AbstractHierarchicalObject + { + /// + /// The content item of type Media that is a target of the extended API. + /// + private readonly Media mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Media. + /// + /// The content item of type Media that is a target of the extended API. + public MediaFields(Media instance) + { + mInstance = instance; + } + + + /// + /// MediaID. + /// + public int ID + { + get + { + return mInstance.MediaID; + } + set + { + mInstance.MediaID = value; + } + } + + + /// + /// MediaFile. + /// + public global::CMS.DocumentEngine.ContentItemAsset File + { + get + { + return global::CMS.DocumentEngine.Internal.ContentItemAssetJsonConverter.ConvertToModel(mInstance, nameof(mInstance.MediaFile)); + } + } + + + /// + /// MediaShortDescription. + /// + public string ShortDescription + { + get + { + return mInstance.MediaShortDescription; + } + set + { + mInstance.MediaShortDescription = value; + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Media() : base(CLASS_NAME) + { + mFields = new MediaFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Media/MediaRepository.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Media/MediaRepository.cs new file mode 100644 index 0000000..29f51ba --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Media/MediaRepository.cs @@ -0,0 +1,40 @@ +using System; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.Models +{ + /// + /// Represents a collection of media files stored in the content hub. + /// + public class MediaRepository + { + private readonly IPageRetriever pageRetriever; + + + /// + /// Initializes a new instance of the class. + /// + /// Retriever for pages based on given parameters. + public MediaRepository(IPageRetriever pageRetriever) + { + this.pageRetriever = pageRetriever; + } + + + /// + /// Returns media file based on given node identifier. + /// + /// Identifier of the node. + public Media GetMediaFile(int nodeId) + { + return pageRetriever.Retrieve( + query => query.WhereEquals("NodeID", nodeId), + cache => cache + .Key($"{nameof(MediaRepository)}|{nameof(GetMediaFile)}|{nodeId}")) + .FirstOrDefault(); + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/MediaGallery/MediaFileRepository.cs b/src/Kentico.Xperience.Lucene.Sample/Models/MediaGallery/MediaFileRepository.cs new file mode 100644 index 0000000..a913c0c --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/MediaGallery/MediaFileRepository.cs @@ -0,0 +1,73 @@ +using System; +using System.Collections.Generic; + +using CMS.Base; +using CMS.MediaLibrary; + +using DancingGoat.Infrastructure; + +namespace DancingGoat.Models +{ + /// + /// Represents a collection of media files. + /// + public class MediaFileRepository + { + private readonly IMediaLibraryInfoProvider mediaLibraryInfoProvider; + private readonly IMediaFileInfoProvider mediaFileInfoProvider; + private readonly RepositoryCacheHelper repositoryCacheHelper; + private readonly ISiteService siteService; + + + /// + /// Initializes a new instance of the class. + /// + /// Provider for management. + /// Provider for management. + /// Handles caching of retrieved objects. + public MediaFileRepository(IMediaLibraryInfoProvider mediaLibraryInfoProvider, + IMediaFileInfoProvider mediaFileInfoProvider, + ISiteService siteService, + RepositoryCacheHelper repositoryCacheHelper) + { + this.mediaLibraryInfoProvider = mediaLibraryInfoProvider; + this.mediaFileInfoProvider = mediaFileInfoProvider; + this.repositoryCacheHelper = repositoryCacheHelper; + this.siteService = siteService; + } + + + /// + /// Returns instance of specified by library name. + /// + /// Name of the media library. + public MediaLibraryInfo GetByName(string mediaLibraryName) + { + return repositoryCacheHelper.CacheObject(() => + { + return mediaLibraryInfoProvider.Get(mediaLibraryName, siteService.CurrentSite?.SiteID ?? 0); + }, $"{nameof(MediaFileRepository)}|{nameof(GetByName)}|{mediaLibraryName}"); + } + + + /// + /// Returns all media files in the media library. + /// + /// Name of the media library. + public IEnumerable GetMediaFiles(string mediaLibraryName) + { + return repositoryCacheHelper.CacheObjects(() => + { + var mediaLibrary = GetByName(mediaLibraryName); + + if (mediaLibrary == null) + { + throw new InvalidOperationException("Media library not found."); + } + + return mediaFileInfoProvider.Get() + .WhereEquals("FileLibraryID", mediaLibrary.LibraryID); + }, $"{nameof(MediaFileRepository)}|{nameof(GetMediaFiles)}|{mediaLibraryName}"); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/MediaGallery/MediaFileViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/MediaGallery/MediaFileViewModel.cs new file mode 100644 index 0000000..d17d5e7 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/MediaGallery/MediaFileViewModel.cs @@ -0,0 +1,28 @@ +using System; + +using CMS.MediaLibrary; + +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.Models +{ + public class MediaFileViewModel + { + public Guid Guid { get; set; } + public string Title { get; set; } + public string Name { get; set; } + public string RelativePath { get; set; } + + + public static MediaFileViewModel GetViewModel(MediaFileInfo mediaFileInfo, IMediaFileUrlRetriever fileUrlRetriever) + { + return new MediaFileViewModel + { + Guid = mediaFileInfo.FileGUID, + Title = mediaFileInfo.FileTitle, + Name = mediaFileInfo.FileName, + RelativePath = fileUrlRetriever.Retrieve(mediaFileInfo).WithSizeConstraint(SizeConstraint.MaxWidthOrHeight(400)).RelativePath + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/MediaGallery/MediaGalleryViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/MediaGallery/MediaGalleryViewModel.cs new file mode 100644 index 0000000..33cb0f8 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/MediaGallery/MediaGalleryViewModel.cs @@ -0,0 +1,16 @@ +using System.Collections.Generic; + +namespace DancingGoat.Models +{ + public class MediaGalleryViewModel + { + public string MediaGalleryName { get; set; } + public IEnumerable MediaFiles { get; set; } = new List(); + + + public MediaGalleryViewModel(string mediaGalleryName) + { + MediaGalleryName = mediaGalleryName; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Navigation/NavigationItem.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Navigation/NavigationItem.generated.cs new file mode 100644 index 0000000..3f4e55b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Navigation/NavigationItem.generated.cs @@ -0,0 +1,160 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(NavigationItem.CLASS_NAME, typeof(NavigationItem))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type NavigationItem. + /// + public partial class NavigationItem : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.NavigationItem"; + + + /// + /// The instance of the class that provides extended API for working with NavigationItem fields. + /// + private readonly NavigationItemFields mFields; + + #endregion + + + #region "Properties" + + /// + /// NavigationItemID. + /// + [DatabaseIDField] + public int NavigationItemID + { + get + { + return ValidationHelper.GetInteger(GetValue("NavigationItemID"), 0); + } + set + { + SetValue("NavigationItemID", value); + } + } + + + /// + /// LinkTo. + /// + [DatabaseField] + public string LinkTo + { + get + { + return ValidationHelper.GetString(GetValue("LinkTo"), ""); + } + set + { + SetValue("LinkTo", value); + } + } + + + /// + /// Gets an object that provides extended API for working with NavigationItem fields. + /// + [RegisterProperty] + public NavigationItemFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with NavigationItem fields. + /// + [RegisterAllProperties] + public partial class NavigationItemFields : AbstractHierarchicalObject + { + /// + /// The content item of type NavigationItem that is a target of the extended API. + /// + private readonly NavigationItem mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type NavigationItem. + /// + /// The content item of type NavigationItem that is a target of the extended API. + public NavigationItemFields(NavigationItem instance) + { + mInstance = instance; + } + + + /// + /// NavigationItemID. + /// + public int ID + { + get + { + return mInstance.NavigationItemID; + } + set + { + mInstance.NavigationItemID = value; + } + } + + + /// + /// LinkTo. + /// + public IEnumerable LinkTo + { + get + { + return DataEngine.Internal.JsonDataTypeConverter.ConvertToModels(mInstance.LinkTo); + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public NavigationItem() : base(CLASS_NAME) + { + mFields = new NavigationItemFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Navigation/NavigationItemViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Navigation/NavigationItemViewModel.cs new file mode 100644 index 0000000..0ad17e4 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Navigation/NavigationItemViewModel.cs @@ -0,0 +1,10 @@ +namespace DancingGoat.Models +{ + public class NavigationItemViewModel + { + public string Caption { get; set; } + + + public string RelativePath { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Navigation/NavigationService.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Navigation/NavigationService.cs new file mode 100644 index 0000000..d975d7d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Navigation/NavigationService.cs @@ -0,0 +1,79 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Infrastructure; + +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.Models +{ + /// + /// A service for retrieving the navigation menu items. + /// + public class NavigationService + { + private const string MENU_PATH = "/Navigation-menu"; + + private readonly IPageRetriever pageRetriever; + private readonly IPageUrlRetriever pageUrlRetriever; + private readonly RepositoryCacheHelper repositoryCacheHelper; + + + /// + /// Initializes a new instance of the class. + /// + /// The page retriever. + /// The page URL retriever. + /// Handles caching of retrieved objects. + public NavigationService(IPageRetriever pageRetriever, IPageUrlRetriever pageUrlRetriever, RepositoryCacheHelper repositoryCacheHelper) + { + this.pageRetriever = pageRetriever; + this.repositoryCacheHelper = repositoryCacheHelper; + this.pageUrlRetriever = pageUrlRetriever; + } + + + /// + /// Returns an enumerable collection of navigation items ordered by the content tree order and level. + /// + public async Task> GetNavigationItems() + { + var navigationItems = await pageRetriever.RetrieveAsync( + query => query + .Path(MENU_PATH, PathTypeEnum.Children) + .OrderByAscending(nameof(TreeNode.NodeOrder)), + cache => cache + .Key($"{nameof(NavigationService)}|{nameof(GetNavigationItems)}|navigationitems|{MENU_PATH}") + // Flushes the cache when a new navigation item is created or page order changed + .Dependencies((pages, builder) => builder.PagePath(MENU_PATH, PathTypeEnum.Children).PageOrder()) + .Expiration(TimeSpan.FromDays(1), useSliding: true)); + + var linkToPages = await pageRetriever.RetrieveAsync( + query => query + .WhereIn(nameof(TreeNode.NodeGUID), navigationItems.Select(i => i.Fields.LinkTo.First().NodeGuid).ToList()) + .GetEnumerableTypedResult(), + cache => cache + .Key($"{nameof(NavigationService)}|{nameof(GetNavigationItems)}|treenodes|{MENU_PATH}") + // Flushes the cache when the page data changes (could contain a URL slug update) + .Dependencies((pages, builder) => builder.Pages(pages).PagePath(MENU_PATH)) + .Expiration(TimeSpan.FromDays(1), useSliding: true) + ); + + var navigationItemViewModels = navigationItems.Join( + linkToPages, + navigationItem => navigationItem.Fields.LinkTo.First().NodeGuid, + treeNode => treeNode.NodeGUID, + (navigationItem, treeNode) => new NavigationItemViewModel + { + Caption = navigationItem.DocumentName, + RelativePath = pageUrlRetriever.Retrieve(treeNode).RelativePath + }); + return navigationItemViewModels; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Privacy/Privacy.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Privacy/Privacy.generated.cs new file mode 100644 index 0000000..ae75473 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Privacy/Privacy.generated.cs @@ -0,0 +1,98 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Privacy.CLASS_NAME, typeof(Privacy))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Privacy. + /// + public partial class Privacy : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Privacy"; + + + /// + /// The instance of the class that provides extended API for working with Privacy fields. + /// + private readonly PrivacyFields mFields; + + #endregion + + + #region "Properties" + + /// + /// Gets an object that provides extended API for working with Privacy fields. + /// + [RegisterProperty] + public PrivacyFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Privacy fields. + /// + [RegisterAllProperties] + public partial class PrivacyFields : AbstractHierarchicalObject + { + /// + /// The content item of type Privacy that is a target of the extended API. + /// + private readonly Privacy mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Privacy. + /// + /// The content item of type Privacy that is a target of the extended API. + public PrivacyFields(Privacy instance) + { + mInstance = instance; + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Privacy() : base(CLASS_NAME) + { + mFields = new PrivacyFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Privacy/PrivacyConsentViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Privacy/PrivacyConsentViewModel.cs new file mode 100644 index 0000000..2dc4a98 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Privacy/PrivacyConsentViewModel.cs @@ -0,0 +1,13 @@ +namespace DancingGoat.Models +{ + public class PrivacyConsentViewModel + { + public string Name { get; set; } + + + public string Title { get; set; } + + + public string Text { get; set; } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Privacy/PrivacyViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Privacy/PrivacyViewModel.cs new file mode 100644 index 0000000..c288bf7 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Privacy/PrivacyViewModel.cs @@ -0,0 +1,19 @@ +using System.Collections.Generic; +using System.Linq; + +namespace DancingGoat.Models +{ + public class PrivacyViewModel + { + public bool DemoDisabled { get; set; } + + + public bool ShowSavedMessage { get; set; } + + + public bool ShowErrorMessage { get; set; } + + + public IEnumerable Constents { get; set; } = Enumerable.Empty(); + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Reference/Reference.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Reference/Reference.generated.cs new file mode 100644 index 0000000..e9ff57e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Reference/Reference.generated.cs @@ -0,0 +1,209 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Reference.CLASS_NAME, typeof(Reference))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Reference. + /// + public partial class Reference : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Reference"; + + + /// + /// The instance of the class that provides extended API for working with Reference fields. + /// + private readonly ReferenceFields mFields; + + #endregion + + + #region "Properties" + + /// + /// ReferenceID. + /// + [DatabaseIDField] + public int ReferenceID + { + get + { + return ValidationHelper.GetInteger(GetValue("ReferenceID"), 0); + } + set + { + SetValue("ReferenceID", value); + } + } + + + /// + /// ReferenceDescription. + /// + [DatabaseField] + public string ReferenceDescription + { + get + { + return ValidationHelper.GetString(GetValue("ReferenceDescription"), @""); + } + set + { + SetValue("ReferenceDescription", value); + } + } + + + /// + /// ReferenceText. + /// + [DatabaseField] + public string ReferenceText + { + get + { + return ValidationHelper.GetString(GetValue("ReferenceText"), @""); + } + set + { + SetValue("ReferenceText", value); + } + } + + + /// + /// Gets an object that provides extended API for working with Reference fields. + /// + [RegisterProperty] + public ReferenceFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Reference fields. + /// + [RegisterAllProperties] + public partial class ReferenceFields : AbstractHierarchicalObject + { + /// + /// The content item of type Reference that is a target of the extended API. + /// + private readonly Reference mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Reference. + /// + /// The content item of type Reference that is a target of the extended API. + public ReferenceFields(Reference instance) + { + mInstance = instance; + } + + + /// + /// ReferenceID. + /// + public int ID + { + get + { + return mInstance.ReferenceID; + } + set + { + mInstance.ReferenceID = value; + } + } + + + /// + /// ReferenceDescription. + /// + public string Description + { + get + { + return mInstance.ReferenceDescription; + } + set + { + mInstance.ReferenceDescription = value; + } + } + + + /// + /// ReferenceText. + /// + public string Text + { + get + { + return mInstance.ReferenceText; + } + set + { + mInstance.ReferenceText = value; + } + } + + + /// + /// ReferenceImage. + /// + public IEnumerable Image + { + get + { + return (mInstance.LinkedContentItems["ReferenceImage"]); + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Reference() : base(CLASS_NAME) + { + mFields = new ReferenceFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Reference/ReferenceViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Reference/ReferenceViewModel.cs new file mode 100644 index 0000000..42dec24 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Reference/ReferenceViewModel.cs @@ -0,0 +1,39 @@ +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +namespace DancingGoat.Models +{ + public class ReferenceViewModel + { + public string Name { get; set; } + + public string Description { get; set; } + + public string Text { get; set; } + + public string ImagePath { get; set; } + + public string ImageShortDescription { get; set; } + + + public static ReferenceViewModel GetViewModel(Reference reference) + { + if (reference == null) + { + return null; + } + + var image = reference.Fields.Image.FirstOrDefault() as Media; + + return new ReferenceViewModel + { + Name = reference.DocumentName, + Description = reference.ReferenceDescription, + Text = reference.ReferenceText, + ImagePath = image?.Fields.File?.Url, + ImageShortDescription = image?.Fields.ShortDescription ?? string.Empty + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/SocialLink/SocialLink.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/SocialLink/SocialLink.generated.cs new file mode 100644 index 0000000..a218d01 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/SocialLink/SocialLink.generated.cs @@ -0,0 +1,209 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(SocialLink.CLASS_NAME, typeof(SocialLink))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type SocialLink. + /// + public partial class SocialLink : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.SocialLink"; + + + /// + /// The instance of the class that provides extended API for working with SocialLink fields. + /// + private readonly SocialLinkFields mFields; + + #endregion + + + #region "Properties" + + /// + /// SocialLinkID. + /// + [DatabaseIDField] + public int SocialLinkID + { + get + { + return ValidationHelper.GetInteger(GetValue("SocialLinkID"), 0); + } + set + { + SetValue("SocialLinkID", value); + } + } + + + /// + /// SocialLinkTitle. + /// + [DatabaseField] + public string SocialLinkTitle + { + get + { + return ValidationHelper.GetString(GetValue("SocialLinkTitle"), @"Follow us"); + } + set + { + SetValue("SocialLinkTitle", value); + } + } + + + /// + /// SocialLinkUrl. + /// + [DatabaseField] + public string SocialLinkUrl + { + get + { + return ValidationHelper.GetString(GetValue("SocialLinkUrl"), @""); + } + set + { + SetValue("SocialLinkUrl", value); + } + } + + + /// + /// Gets an object that provides extended API for working with SocialLink fields. + /// + [RegisterProperty] + public SocialLinkFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with SocialLink fields. + /// + [RegisterAllProperties] + public partial class SocialLinkFields : AbstractHierarchicalObject + { + /// + /// The content item of type SocialLink that is a target of the extended API. + /// + private readonly SocialLink mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type SocialLink. + /// + /// The content item of type SocialLink that is a target of the extended API. + public SocialLinkFields(SocialLink instance) + { + mInstance = instance; + } + + + /// + /// SocialLinkID. + /// + public int ID + { + get + { + return mInstance.SocialLinkID; + } + set + { + mInstance.SocialLinkID = value; + } + } + + + /// + /// SocialLinkTitle. + /// + public string Title + { + get + { + return mInstance.SocialLinkTitle; + } + set + { + mInstance.SocialLinkTitle = value; + } + } + + + /// + /// SocialLinkUrl. + /// + public string Url + { + get + { + return mInstance.SocialLinkUrl; + } + set + { + mInstance.SocialLinkUrl = value; + } + } + + + /// + /// SocialLinkIcon. + /// + public IEnumerable Icon + { + get + { + return (mInstance.LinkedContentItems["SocialLinkIcon"]); + } + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public SocialLink() : base(CLASS_NAME) + { + mFields = new SocialLinkFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/SocialLink/SocialLinkRepository.cs b/src/Kentico.Xperience.Lucene.Sample/Models/SocialLink/SocialLinkRepository.cs new file mode 100644 index 0000000..7a77693 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/SocialLink/SocialLinkRepository.cs @@ -0,0 +1,64 @@ +using System.Collections.Generic; +using System.Threading; +using System.Threading.Tasks; + +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +using DancingGoat.Infrastructure; + +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.Models +{ + /// + /// Represents a collection of links to social networks. + /// + public class SocialLinkRepository + { + private readonly IPageRetriever pageRetriever; + private readonly RepositoryCacheHelper repositoryCacheHelper; + + + /// + /// Initializes a new instance of the class that returns links. + /// + /// Retriever for pages based on given parameters. + public SocialLinkRepository(IPageRetriever pageRetriever, RepositoryCacheHelper repositoryCacheHelper) + { + this.pageRetriever = pageRetriever; + this.repositoryCacheHelper = repositoryCacheHelper; + } + + + /// + /// Returns an enumerable collection of links to social networks ordered by a position in the content tree. + /// + public async Task> GetSocialLinks(CancellationToken? cancellationToken = null) + { + const int maxLevel = 2; + + var socialLinks = pageRetriever.Retrieve( + query => query + .OrderByAscending("NodeOrder"), + cache => cache + .Key($"{nameof(SocialLinkRepository)}|{nameof(GetSocialLinks)}") + // Include path dependency to flush cache when a new child page is created or page order is changed. + .Dependencies((_, builder) => builder.Pages(SocialLink.CLASS_NAME).PageOrder())); + + return await repositoryCacheHelper.CacheData(async cancellationToken => + { + var socialLinksWithLinkedItems = new List(); + + foreach (var socialLink in socialLinks) + { + socialLinksWithLinkedItems.Add(await socialLink.WithLinkedItems(maxLevel, cancellationToken)); + } + + return socialLinksWithLinkedItems; + }, cancellationToken ?? CancellationToken.None, + $"{nameof(SocialLinkRepository)}|{nameof(GetSocialLinks)}|WithLinkedItems", + () => socialLinks.GetLinkedItemsCacheDependencyKeys(maxLevel, cancellationToken)); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/SocialLink/SocialLinkViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/Models/SocialLink/SocialLinkViewModel.cs new file mode 100644 index 0000000..010c285 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/SocialLink/SocialLinkViewModel.cs @@ -0,0 +1,39 @@ +using System; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; +using CMS.Helpers; + +namespace DancingGoat.Models +{ + public class SocialLinkViewModel + { + public string IconPath { get; set; } + + + public string Title { get; set; } + + + public string Url { get; set; } + + + public static SocialLinkViewModel GetViewModel(SocialLink socialLink) + { + if (!string.IsNullOrEmpty(socialLink.Fields.Url)) + { + var protocol = URLHelper.GetProtocol(socialLink.Fields.Url); + if (!string.Equals("http", protocol, StringComparison.OrdinalIgnoreCase) && !string.Equals("https", protocol, StringComparison.OrdinalIgnoreCase)) + { + throw new InvalidOperationException("The link must begin with lowercased 'http://' or 'https://'"); + } + } + + return new SocialLinkViewModel + { + Title = socialLink.Fields.Title, + Url = socialLink.Fields.Url, + IconPath = (socialLink.Fields.Icon.FirstOrDefault() as Media)?.Fields.File?.Url + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Models/Subscription/Subscription.generated.cs b/src/Kentico.Xperience.Lucene.Sample/Models/Subscription/Subscription.generated.cs new file mode 100644 index 0000000..66527d6 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Models/Subscription/Subscription.generated.cs @@ -0,0 +1,98 @@ +//-------------------------------------------------------------------------------------------------- +// +// +// This code was generated by code generator tool. +// +// To customize the code use your own partial class. For more info about how to use and customize +// the generated code see the documentation at https://docs.xperience.io/. +// +// +//-------------------------------------------------------------------------------------------------- + +using System; +using System.Collections.Generic; +using CMS; +using CMS.Base; +using CMS.Helpers; +using CMS.DataEngine; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; + +[assembly: RegisterDocumentType(Subscription.CLASS_NAME, typeof(Subscription))] + +namespace CMS.DocumentEngine.Types.DancingGoatCore +{ + /// + /// Represents a content item of type Subscription. + /// + public partial class Subscription : TreeNode + { + #region "Constants and variables" + + /// + /// The name of the data class. + /// + public const string CLASS_NAME = "DancingGoatCore.Subscription"; + + + /// + /// The instance of the class that provides extended API for working with Subscription fields. + /// + private readonly SubscriptionFields mFields; + + #endregion + + + #region "Properties" + + /// + /// Gets an object that provides extended API for working with Subscription fields. + /// + [RegisterProperty] + public SubscriptionFields Fields + { + get + { + return mFields; + } + } + + + /// + /// Provides extended API for working with Subscription fields. + /// + [RegisterAllProperties] + public partial class SubscriptionFields : AbstractHierarchicalObject + { + /// + /// The content item of type Subscription that is a target of the extended API. + /// + private readonly Subscription mInstance; + + + /// + /// Initializes a new instance of the class with the specified content item of type Subscription. + /// + /// The content item of type Subscription that is a target of the extended API. + public SubscriptionFields(Subscription instance) + { + mInstance = instance; + } + } + + #endregion + + + #region "Constructors" + + /// + /// Initializes a new instance of the class. + /// + public Subscription() : base(CLASS_NAME) + { + mFields = new SubscriptionFields(this); + } + + #endregion + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/ArticlePageTemplateService.cs b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/ArticlePageTemplateService.cs new file mode 100644 index 0000000..e2c3744 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/ArticlePageTemplateService.cs @@ -0,0 +1,24 @@ +using CMS.DocumentEngine.Types.DancingGoatCore; + +using Kentico.Content.Web.Mvc; + +namespace DancingGoat.PageTemplates +{ + public class ArticlePageTemplateService + { + private readonly IPageDataContextRetriever pageDataContextRetriver; + + + public ArticlePageTemplateService(IPageDataContextRetriever pageDataContextRetriver) + { + this.pageDataContextRetriver = pageDataContextRetriver; + } + + + public ArticleViewModel GetTemplateModel() + { + var article = pageDataContextRetriver.Retrieve
().Page; + return ArticleViewModel.GetViewModel(article); + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/ArticleViewModel.cs b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/ArticleViewModel.cs new file mode 100644 index 0000000..b435702 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/ArticleViewModel.cs @@ -0,0 +1,33 @@ +using System; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +namespace DancingGoat.PageTemplates +{ + public class ArticleViewModel + { + public string TeaserPath { get; set; } + + + public string Title { get; set; } + + + public DateTime PublicationDate { get; set; } + + + public string Text { get; set; } + + + public static ArticleViewModel GetViewModel(Article article) + { + return new ArticleViewModel + { + PublicationDate = article.PublicationDate, + TeaserPath = (article.Fields.Teaser.FirstOrDefault() as Media)?.Fields.File?.Url, + Text = article.Fields.Text, + Title = article.DocumentName + }; + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/_Article.cshtml b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/_Article.cshtml new file mode 100644 index 0000000..2390446 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/_Article.cshtml @@ -0,0 +1,37 @@ +@using DancingGoat.PageTemplates + +@model ComponentViewModel + +@inject ArticlePageTemplateService Service + +@{ + var templateModel = Service.GetTemplateModel(); + ViewBag.Title = templateModel.Title; +} + +
+
+
+ @if (!string.IsNullOrEmpty(templateModel.TeaserPath)) + { +
+ @templateModel.Title +
+
+
+ } +
+

@templateModel.Title

+
+ @templateModel.PublicationDate.ToString("D") +
+
+
+
+
+ @Html.Kentico().ResolveUrls(templateModel.Text) +
+
+
+
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/_ArticleWithSidebar.cshtml b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/_ArticleWithSidebar.cshtml new file mode 100644 index 0000000..5fd42f7 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Article/_ArticleWithSidebar.cshtml @@ -0,0 +1,43 @@ +@using DancingGoat.PageTemplates +@using DancingGoat.Widgets + +@model ComponentViewModel + +@inject ArticlePageTemplateService Service + +@{ + var templateModel = Service.GetTemplateModel(); + + // The page's content takes 12 points of width which are divided between the sidebar and the article + var articleWidth = 9; + var sidebardBootstrapWidth = 12 - articleWidth; + + ViewBag.Title = templateModel.Title; +} + +
+
+

@templateModel.Title

+
+ @templateModel.PublicationDate.ToString("D") +
+ @if (!string.IsNullOrEmpty(templateModel.TeaserPath)) + { +
+
+ @templateModel.Title +
+
+ } +
+
+ @Html.Kentico().ResolveUrls(templateModel.Text) +
+
+
+
+ +
+
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/LandingPage/LandingPageSingleColumnProperties.cs b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/LandingPage/LandingPageSingleColumnProperties.cs new file mode 100644 index 0000000..bfa75a2 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/LandingPage/LandingPageSingleColumnProperties.cs @@ -0,0 +1,22 @@ +using Kentico.PageBuilder.Web.Mvc.PageTemplates; +using Kentico.Xperience.Admin.Base.FormAnnotations; + +namespace DancingGoat.PageTemplates +{ + public class LandingPageSingleColumnProperties : IPageTemplateProperties + { + /// + /// Indicates if logo should be shown. + /// + [CheckBoxComponent(Label = "Display logo", Order = 1)] + public bool ShowLogo { get; set; } = true; + + + /// + /// Background color CSS class of the header. + /// + [RequiredValidationRule] + [DropDownComponent(Label = "Background color of header", Order = 2, Options = "first-color;Chocolate\r\nsecond-color;Gold\r\nthird-color;Espresso")] + public string HeaderColorCssClass { get; set; } = "first-color"; + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/LandingPage/_DancingGoat_LandingPageSingleColumn.cshtml b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/LandingPage/_DancingGoat_LandingPageSingleColumn.cshtml new file mode 100644 index 0000000..6d7f588 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/LandingPage/_DancingGoat_LandingPageSingleColumn.cshtml @@ -0,0 +1,34 @@ +@using DancingGoat.PageTemplates +@using DancingGoat.Helpers + +@model ComponentViewModel + +@{ + Layout = "~/Views/Shared/_LandingPageLayout.cshtml"; + ViewBag.Title = HtmlLocalizer["Landing page"].Value; +} + +
+
+ +
+
+ +
+
+ +
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/PageTemplateFilters/ArticlePageTemplatesFilter.cs b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/PageTemplateFilters/ArticlePageTemplatesFilter.cs new file mode 100644 index 0000000..245230d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/PageTemplateFilters/ArticlePageTemplatesFilter.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using Kentico.PageBuilder.Web.Mvc.PageTemplates; + +namespace DancingGoat.PageTemplates +{ + /// + /// Article page template filter. + /// + /// + public class ArticlePageTemplatesFilter : IPageTemplateFilter + { + /// + /// Applies filtering on the given collection based on the given . + /// + /// + /// Returns only those page templates that are allowed for article pages if the given context matches the article page type. + /// + public IEnumerable Filter(IEnumerable pageTemplates, PageTemplateFilterContext context) + { + if (context.PageType.Equals(Article.CLASS_NAME, StringComparison.InvariantCultureIgnoreCase)) + { + return pageTemplates.Where(t => GetArticlePageTemplates().Contains(t.Identifier)); + } + + // Exclude all article page templates from the final collection if the context does not match this filter + return pageTemplates.Where(t => !GetArticlePageTemplates().Contains(t.Identifier)); + } + + + /// + /// Gets all the page templates that are allowed for the article page type. + /// + public IEnumerable GetArticlePageTemplates() => new string[] { ComponentIdentifiers.ARTICLE_TEMPLATE, ComponentIdentifiers.ARTICLE_WITH_SIDEBAR_TEMPLATE }; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/PageTemplateFilters/LandingPageTemplatesFilter.cs b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/PageTemplateFilters/LandingPageTemplatesFilter.cs new file mode 100644 index 0000000..46ffd04 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/PageTemplateFilters/LandingPageTemplatesFilter.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using Kentico.PageBuilder.Web.Mvc.PageTemplates; + +namespace DancingGoat.PageTemplates +{ + /// + /// Landing page template filter. + /// + /// + public class LandingPageTemplatesFilter : IPageTemplateFilter + { + /// + /// Applies filtering on the given collection based on the given . + /// + /// + /// Returns only those page templates that are allowed for landing pages if the given context matches the landing page type. + /// + public IEnumerable Filter(IEnumerable pageTemplates, PageTemplateFilterContext context) + { + if (context.PageType.Equals(LandingPage.CLASS_NAME, StringComparison.InvariantCultureIgnoreCase)) + { + return pageTemplates.Where(t => GetLandingPageTemplates().Contains(t.Identifier)); + } + + // Exclude all landing page templates from the final collection if the context does not match this filter + return pageTemplates.Where(t => !GetLandingPageTemplates().Contains(t.Identifier)); + } + + + /// + /// Gets all the page templates that are allowed for the landing page type. + /// + public IEnumerable GetLandingPageTemplates() => new string[] { ComponentIdentifiers.LANDING_PAGE_SINGLE_COLUMN_TEMPLATE }; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/PageTemplateFilters/SubscriptionPageTemplatesFilter.cs b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/PageTemplateFilters/SubscriptionPageTemplatesFilter.cs new file mode 100644 index 0000000..f26d466 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/PageTemplateFilters/SubscriptionPageTemplatesFilter.cs @@ -0,0 +1,40 @@ +using System; +using System.Collections.Generic; +using System.Linq; + +using CMS.DocumentEngine.Types.DancingGoatCore; + +using Kentico.PageBuilder.Web.Mvc.PageTemplates; + +namespace DancingGoat.PageTemplates +{ + /// + /// Subscription page template filter. + /// + /// + public class SubscriptionPageTemplatesFilter : IPageTemplateFilter + { + /// + /// Applies filtering on the given collection based on the given . + /// + /// + /// Returns only those page templates that are allowed for subscription pages if the given context matches the subscription page type. + /// + public IEnumerable Filter(IEnumerable pageTemplates, PageTemplateFilterContext context) + { + if (context.PageType.Equals(Subscription.CLASS_NAME, StringComparison.InvariantCultureIgnoreCase)) + { + return pageTemplates.Where(t => GetSubscriptionPageTemplates().Contains(t.Identifier)); + } + + // Exclude all subscription page templates from the final collection if the context does not match this filter + return pageTemplates.Where(t => !GetSubscriptionPageTemplates().Contains(t.Identifier)); + } + + + /// + /// Gets all the page templates that are allowed for the subscription page type. + /// + public IEnumerable GetSubscriptionPageTemplates() => new[] { ComponentIdentifiers.SUBSCRIPTION_TEMPLATE }; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Subscription/_Subscription.cshtml b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Subscription/_Subscription.cshtml new file mode 100644 index 0000000..0e1acfc --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/Subscription/_Subscription.cshtml @@ -0,0 +1,21 @@ +@using DancingGoat.Helpers + +
+
+

+
+
+ +
+
+ + diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/_ViewImports.cshtml b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/_ViewImports.cshtml new file mode 100644 index 0000000..3ce9729 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/_ViewImports.cshtml @@ -0,0 +1,14 @@ +@using DancingGoat + +@using CMS.Helpers + +@using Kentico.Web.Mvc +@using Kentico.Content.Web.Mvc +@using Kentico.PageBuilder.Web.Mvc + +@using Microsoft.AspNetCore.Mvc.Localization + +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Kentico.Content.Web.Mvc +@addTagHelper *, DancingGoatCore +@inject IHtmlLocalizer HtmlLocalizer \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/PageTemplates/_ViewStart.cshtml b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/_ViewStart.cshtml new file mode 100644 index 0000000..77b65af --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/PageTemplates/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Program.cs b/src/Kentico.Xperience.Lucene.Sample/Program.cs new file mode 100644 index 0000000..2194efa --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Program.cs @@ -0,0 +1,176 @@ +using CMS.Helpers; + +using DancingGoat; +using DancingGoat.Helpers.Generator; +using DancingGoat.PageTemplates; +using DancingGoat.Search; +using Kentico.Activities.Web.Mvc; +using Kentico.Content.Web.Mvc.Routing; +using Kentico.CrossSiteTracking.Web.Mvc; +using Kentico.Forms.Web.Mvc; +using Kentico.Membership; +using Kentico.OnlineMarketing.Web.Mvc; +using Kentico.PageBuilder.Web.Mvc; +using Kentico.Web.Mvc; +using Kentico.Xperience.GraphQL; +using Kentico.Xperience.Lucene.Models; +using Lucene.Net.Analysis.Standard; +using Microsoft.AspNetCore.Identity; +using Microsoft.AspNetCore.Localization.Routing; + +/*** + This is a route controller constraint for pages not handled by the content tree-based router. + The constraint limits the match to a list of specified controllers for pages not handled by the content tree-based router. + The constraint ensures that broken URLs lead to a "404 page not found" page and are not handled by a controller dedicated to the component or + to a page handled by the content tree-based router (which would lead to an exception). + */ +const string CONSTRAINT_FOR_NON_ROUTER_PAGE_CONTROLLERS = "Account|Consent|Subscription|Coffees|Search"; + +var builder = WebApplication.CreateBuilder(args); + + +builder.Services.AddKentico(features => +{ + features.UsePageBuilder(new PageBuilderOptions + { + DefaultSectionIdentifier = ComponentIdentifiers.SINGLE_COLUMN_SECTION, + RegisterDefaultSection = false + }); + + features.UseActivityTracking(); + + features.UseCrossSiteTracking(new CrossSiteTrackingOptions + { + ConsentSettings = new CrossSiteTrackingConsentOptions + { + // This is a sample consent that can be created via sample data generator application. + // You can replace it by your own consent. + ConsentName = TrackingConsentGenerator.CONSENT_NAME, + AgreeCookieLevel = CookieLevel.All + } + }); + + features.UseEmailStatisticsLogging(); + features.UseEmailMarketing(); + + features.UsePageRouting(); +}); + +builder.Services.AddDancingGoatServices(); + +builder.Services.Configure(options => options.LowercaseUrls = true); + +builder.Services.AddLocalization() + .AddControllersWithViews() + .AddViewLocalization() + .AddDataAnnotationsLocalization(options => + { + options.DataAnnotationLocalizerProvider = (type, factory) => factory.Create(typeof(SharedResources)); + }); + +builder.Services.Configure(options => +{ + options.RequestCultureProviders.Add(new RouteDataRequestCultureProvider + { + RouteDataStringKey = "culture", + UIRouteDataStringKey = "culture" + }); +}); + +builder.Services.Configure(options => +{ + options.JQueryCustomBundleWebRootPath = "Scripts/jquery-3.5.1.min.js"; +}); + +builder.Services.AddKenticoGraphQL(new KenticoGraphQLOptions +{ + UseQueryDebugTool = builder.Environment.IsDevelopment() +}); + +builder.Services.AddLucene(new[] +{ + new LuceneIndex( + typeof(DancingGoatSearchModel), + new StandardAnalyzer(Lucene.Net.Util.LuceneVersion.LUCENE_48), + DancingGoatSearchModel.IndexName, + indexPath: null, + new DancingGoatLuceneIndexingStrategy()), +}); +builder.Services.AddSingleton(); +builder.Services.AddSingleton(); + +ConfigureMembershipServices(builder.Services); +ConfigurePageBuilderFilters(); + +var app = builder.Build(); +app.InitKentico(); + +app.UseStaticFiles(); + +app.UseCookiePolicy(); + +app.UseAuthentication(); + + +app.UseKentico(); + +app.UseStatusCodePagesWithReExecute("/error/{0}"); + +app.UseAuthorization(); + +app.UseKenticoGraphQL(); + +app.Kentico().MapRoutes(); +app.MapControllerRoute( + name: "error", + pattern: "error/{code}", + defaults: new { controller = "HttpErrors", action = "Error" } + ); +app.MapControllerRoute( + name: "default", + pattern: "{controller}/{action=Index}", + constraints: new + { + controller = CONSTRAINT_FOR_NON_ROUTER_PAGE_CONTROLLERS + }); + +app.Run(); + + +static void ConfigureMembershipServices(IServiceCollection services) +{ + services.AddIdentity(options => + { + options.Password.RequireDigit = false; + options.Password.RequireNonAlphanumeric = false; + options.Password.RequiredLength = 0; + options.Password.RequireUppercase = false; + options.Password.RequireLowercase = false; + options.Password.RequiredUniqueChars = 0; + // Ensures, that disabled member cannot sign in. + options.SignIn.RequireConfirmedAccount = true; + }) + .AddUserStore>() + .AddRoleStore() + .AddUserManager>() + .AddSignInManager>(); + + services.ConfigureApplicationCookie(options => + { + options.ExpireTimeSpan = TimeSpan.FromMinutes(14); + options.AccessDeniedPath = new PathString("/account/login"); + }); + + // Sets the validation interval of members security stamp to zero so member's security stamp is validated with each request. + services.Configure(options => options.ValidationInterval = TimeSpan.Zero); + + services.AddAuthorization(); +} + + +static void ConfigurePageBuilderFilters() +{ + PageBuilderFilters.PageTemplates.Add(new ArticlePageTemplatesFilter()); + PageBuilderFilters.PageTemplates.Add(new LandingPageTemplatesFilter()); + PageBuilderFilters.PageTemplates.Add(new SubscriptionPageTemplatesFilter()); +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Properties/launchSettings.json b/src/Kentico.Xperience.Lucene.Sample/Properties/launchSettings.json new file mode 100644 index 0000000..dc0fabd --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Properties/launchSettings.json @@ -0,0 +1,28 @@ +{ + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:41489", + "sslPort": 0 + } + }, + "profiles": { + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "DancingGoat": { + "commandName": "Project", + "launchBrowser": true, + "applicationUrl": "http://localhost:41489", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} + diff --git a/src/Kentico.Xperience.Lucene.Sample/Resources/SharedResources.cs b/src/Kentico.Xperience.Lucene.Sample/Resources/SharedResources.cs new file mode 100644 index 0000000..f70acca --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Resources/SharedResources.cs @@ -0,0 +1,9 @@ +namespace DancingGoat; + +public class SharedResources +{ + public SharedResources() + { + + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Search/DancingGoatSearchModel.cs b/src/Kentico.Xperience.Lucene.Sample/Search/DancingGoatSearchModel.cs new file mode 100644 index 0000000..c1684e6 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Search/DancingGoatSearchModel.cs @@ -0,0 +1,94 @@ +using CMS.Core; +using CMS.DocumentEngine; +using CMS.DocumentEngine.Types.DancingGoatCore; +using Kentico.Xperience.Lucene.Attributes; +using Kentico.Xperience.Lucene.Models; +using Kentico.Xperience.Lucene.Services.Implementations; +using Lucene.Net.Documents; + +namespace DancingGoat.Search; + +[IncludedPath("/%", ContentTypes = new string[] { Article.CLASS_NAME })] +public class DancingGoatSearchModel : LuceneSearchModel +{ + public const string IndexName = "DancingGoat"; + + [TextField(true)] + //[ Source(new string[] { nameof(NewsPage.Title), nameof(TreeNode.DocumentName) })] + [Source(new string[] { nameof(TreeNode.DocumentName) })] + public string Title { get; set; } + + [TextField(true)] + public string ArticleSummary { get; set; } + + [TextField(false)] + public string ArticleText { get; set; } + + [TextField(false)] + public string AllContent { get; set; } + + [StringField(true)] + public string ImagePath { get; set; } + + [Int64Field(true)] + public long PublishedDateTicks { get; set; } + + public DateTime PublishedDate => + new(DateTools.UnixTimeMillisecondsToTicks(PublishedDateTicks), DateTimeKind.Utc); +} + +public class DancingGoatLuceneIndexingStrategy : DefaultLuceneIndexingStrategy +{ + private static readonly string[] contentFields = new string[] + { + nameof(Article.DocumentName), + nameof(Article.ArticleSummary), + nameof(Article.ArticleText), + }; + + public override Task OnIndexingProperty(TreeNode node, string propertyName, string usedColumn, object foundValue) + { + object result = foundValue; + if (propertyName == nameof(DancingGoatSearchModel.AllContent)) + { + var htmlSanitizer = Service.Resolve(); + + result = string.Join(" ", contentFields + .Select(f => node.GetStringValue(f, "")) + .Select(s => htmlSanitizer.SanitizeHtmlFragment(s))); + } + + if (string.Equals(propertyName, nameof(DancingGoatSearchModel.ImagePath)) && node is Article article) + { + result = GetMediaURL(article); + } + + if (string.Equals(propertyName, nameof(DancingGoatSearchModel.PublishedDateTicks))) + { + var date = node.PublishedVersionExists && node.DocumentLastPublished != DateTime.MinValue + ? node.DocumentLastPublished + : node.DocumentModifiedWhen != DateTime.MinValue + ? node.DocumentModifiedWhen + : node.DocumentCreatedWhen; + result = DateTools.TicksToUnixTimeMilliseconds(date.Ticks); + } + + return Task.FromResult(result); + } + + private static string GetMediaURL(Article article) + { + var media = article.Fields.Teaser.OfType().FirstOrDefault(); + + if (media is null) + { + return ""; + } + + var url = media.Fields.File.Url.AsSpan(); + + return url.StartsWith("~") + ? url[1..].ToString() + : url.ToString(); + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Search/DancingGoatSearchService.cs b/src/Kentico.Xperience.Lucene.Sample/Search/DancingGoatSearchService.cs new file mode 100644 index 0000000..ce02714 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Search/DancingGoatSearchService.cs @@ -0,0 +1,109 @@ +using Kentico.Xperience.Lucene; +using Kentico.Xperience.Lucene.Models; +using Kentico.Xperience.Lucene.Services; +using Lucene.Net.Documents; +using Lucene.Net.Search; +using Lucene.Net.Util; + +namespace DancingGoat.Search; + +public class DancingGoatSearchService +{ + private const int PHRASE_SLOP = 3; + private const int MAX_RESULTS = 1000; + + private readonly ILuceneIndexService luceneIndexService; + + public DancingGoatSearchService(ILuceneIndexService luceneIndexService) => this.luceneIndexService = luceneIndexService; + + public LuceneSearchResultModel Search(string searchText, int pageSize = 20, int page = 1) + { + var index = IndexStore.Instance.GetIndex(DancingGoatSearchModel.IndexName) ?? throw new Exception($"Index {DancingGoatSearchModel.IndexName} was not found!!!"); + pageSize = Math.Max(1, pageSize); + page = Math.Max(1, page); + int offset = pageSize * (page - 1); + int limit = pageSize; + + var queryBuilder = new QueryBuilder(index.Analyzer); + + var query = string.IsNullOrWhiteSpace(searchText) + ? new MatchAllDocsQuery() + : GetTermQuery(queryBuilder, searchText); + + var result = luceneIndexService.UseSearcher( + index, + (searcher) => + { + var topDocs = searcher.Search(query, MAX_RESULTS, + new Sort(new SortField( + nameof(DancingGoatSearchModel.PublishedDateTicks), + FieldCache.NUMERIC_UTILS_INT64_PARSER, + true))); + + return new LuceneSearchResultModel() + { + Query = searchText ?? "", + Page = page, + PageSize = pageSize, + TotalPages = topDocs.TotalHits <= 0 ? 0 : ((topDocs.TotalHits - 1) / pageSize) + 1, + TotalHits = topDocs.TotalHits, + Hits = topDocs.ScoreDocs + .Skip(offset) + .Take(limit) + .Select(d => MapToResultItem(searcher.Doc(d.Doc))) + .ToList(), + }; + } + ); + + return result; + } + + private static Query GetDateRangeQuery() + { + long todayTicks = DateTools.TicksToUnixTimeMilliseconds(DateTime.Now.AddDays(1).Ticks); + long lastYearTicks = DateTools.TicksToUnixTimeMilliseconds(DateTime.Now.AddYears(-2).Ticks); + + return NumericRangeQuery.NewInt64Range( + nameof(DancingGoatSearchModel.PublishedDateTicks), + NumericUtils.PRECISION_STEP_DEFAULT, + lastYearTicks, + todayTicks, + true, + true); + } + + private static Query GetTermQuery(QueryBuilder queryBuilder, string searchText) + { + var titlePhrase = queryBuilder.CreatePhraseQuery(nameof(DancingGoatSearchModel.Title), searchText, PHRASE_SLOP); + titlePhrase.Boost = 5; + var summaryPhrase = queryBuilder.CreatePhraseQuery(nameof(DancingGoatSearchModel.ArticleSummary), searchText, PHRASE_SLOP); + summaryPhrase.Boost = 2; + var contentPhrase = queryBuilder.CreatePhraseQuery(nameof(DancingGoatSearchModel.AllContent), searchText, PHRASE_SLOP); + contentPhrase.Boost = 1; + var titleShould = queryBuilder.CreateBooleanQuery(nameof(DancingGoatSearchModel.AllContent), searchText, Occur.SHOULD); + titleShould.Boost = 0.5f; + var contentShould = queryBuilder.CreateBooleanQuery(nameof(DancingGoatSearchModel.AllContent), searchText, Occur.SHOULD); + contentShould.Boost = 0.1f; + + return new BooleanQuery + { + { titlePhrase, Occur.SHOULD }, + { summaryPhrase, Occur.SHOULD }, + { contentPhrase, Occur.SHOULD }, + { titleShould, Occur.SHOULD }, + { contentShould, Occur.SHOULD }, + }; + } + + private DancingGoatSearchModel MapToResultItem(Document doc) => new() + { + Title = doc.Get(nameof(DancingGoatSearchModel.Title)), + ArticleSummary = doc.Get(nameof(DancingGoatSearchModel.ArticleSummary)), + Url = doc.Get(nameof(DancingGoatSearchModel.Url)), + ImagePath = doc.Get(nameof(DancingGoatSearchModel.ImagePath)), + PublishedDateTicks = long.TryParse(doc.Get(nameof(DancingGoatSearchModel.PublishedDateTicks)), out long ticks) + ? ticks + : 0 + }; +} diff --git a/src/Kentico.Xperience.Lucene.Sample/Search/SearchController.cs b/src/Kentico.Xperience.Lucene.Sample/Search/SearchController.cs new file mode 100644 index 0000000..1f39fef --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Search/SearchController.cs @@ -0,0 +1,20 @@ +using Microsoft.AspNetCore.Mvc; + +namespace DancingGoat.Search; + +public class SearchController : Controller +{ + private readonly DancingGoatSearchService searchService; + + public SearchController(DancingGoatSearchService searchService) => this.searchService = searchService; + + [HttpGet] + public IActionResult Index(string query, int pageSize = 10, int page = 1) + { + var results = searchService.Search(query, pageSize, page); + + return View(results); + } +} + +public record SearchRequest(string Query = "", int PageSize = 20, int Page = 1); diff --git a/src/Kentico.Xperience.Lucene.Examples/Utils/WebScraperHtmlSanitizer.cs b/src/Kentico.Xperience.Lucene.Sample/Search/WebScraperHtmlSanitizer.cs similarity index 89% rename from src/Kentico.Xperience.Lucene.Examples/Utils/WebScraperHtmlSanitizer.cs rename to src/Kentico.Xperience.Lucene.Sample/Search/WebScraperHtmlSanitizer.cs index 3305904..b29cc4b 100644 --- a/src/Kentico.Xperience.Lucene.Examples/Utils/WebScraperHtmlSanitizer.cs +++ b/src/Kentico.Xperience.Lucene.Sample/Search/WebScraperHtmlSanitizer.cs @@ -1,13 +1,8 @@ using AngleSharp.Dom; using AngleSharp.Html.Parser; -using CMS; -using CMS.Core; using CMS.Helpers; -using Kentico.Xperience.Lucene.Examples.Utils; -[assembly: RegisterImplementation(typeof(WebScraperHtmlSanitizer), typeof(WebScraperHtmlSanitizer), Lifestyle = Lifestyle.Singleton, Priority = RegistrationPriority.SystemDefault)] - -namespace Kentico.Xperience.Lucene.Examples.Utils; +namespace DancingGoat.Search; public class WebScraperHtmlSanitizer { diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/About/Index.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/About/Index.cshtml new file mode 100644 index 0000000..020e568 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/About/Index.cshtml @@ -0,0 +1,40 @@ +@model DancingGoat.Models.AboutUsViewModel + +@{ + bool DisplayInRight(int sequenceOrder) + { + return sequenceOrder % 2 != 0; + } + + ViewBag.Title = HtmlLocalizer["About us"].Value; +} + + +
+ @for (int i = 0; i < Model.Sections.Count; i++) + { + var aboutSection = Model.Sections[i]; +
+

@aboutSection.Heading

+ +
+
+ @Html.Raw(aboutSection.Text) +
+
+
+ @if (!string.IsNullOrEmpty(aboutSection.ImagePath)) + { + @aboutSection.Heading + } +
+
+ + if (i == 0 && Model.Reference != null) + { + + } + } + + +
diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Account/Login.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Account/Login.cshtml new file mode 100644 index 0000000..f46f3f4 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Account/Login.cshtml @@ -0,0 +1,55 @@ +@model DancingGoat.Models.LoginViewModel + +@{ + ViewBag.Title = HtmlLocalizer["Sign in"].Value; + ViewData["PageClass"] = "inverted"; +} + + diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Account/Register.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Account/Register.cshtml new file mode 100644 index 0000000..8c78280 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Account/Register.cshtml @@ -0,0 +1,73 @@ +@model DancingGoat.Models.RegisterViewModel + +@{ + ViewBag.Title = HtmlLocalizer["Register"].Value; + ViewData["PageClass"] = "inverted"; +} + + diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Articles/Index.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Articles/Index.cshtml new file mode 100644 index 0000000..73bdd53 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Articles/Index.cshtml @@ -0,0 +1,65 @@ +@using Microsoft.AspNetCore.Mvc.Localization + +@model IEnumerable +@{ + ViewBag.Title = HtmlLocalizer["Articles"].Value; + var i = 1; +} +
+
+
+ @foreach (var article in @Model) + { + var lastInRow = ""; + if (i % 4 == 0) + { + lastInRow = "last"; + } + +
+
+ @if (article.TeaserPath != null) + { + + @article.Title + + } +
+
+ @article.PublicationDate.ToString("m") +
+
+

+ + @if (article.IsSecured && !User.Identity.IsAuthenticated) + { + + } + @article.Title + +

+ @if (article.IsSecured && !User.Identity.IsAuthenticated) + { +

+ + @HtmlLocalizer["Sign in to access this article"].Value + + +

+ } +

+ @article.Summary +

+
+
+
+
+ if (i % 4 == 0) + { +
+ } + i++; + } +
+
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Cafes/Index.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Cafes/Index.cshtml new file mode 100644 index 0000000..a685f58 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Cafes/Index.cshtml @@ -0,0 +1,64 @@ +@model DancingGoat.Models.CafesIndexViewModel + +@{ + ViewBag.Title = HtmlLocalizer["Cafes"].Value; +} + +
+

@HtmlLocalizer["Our cafes"]

+
+ @foreach (var cafe in Model.CompanyCafes) + { +
+
+
+ @if (!string.IsNullOrEmpty(cafe.PhotoPath)) + { + @cafe.Contact.Name + } +
+
+

@cafe.Contact.Name

+
+ + @cafe.Contact.Street, @cafe.Contact.City +
+ @cafe.Contact.ZIP, @cafe.Contact.Country +
+
+

@cafe.Contact.Phone

+

@cafe.Note

+
+
+
+ } +
+ +

@HtmlLocalizer["Other places where you can drink our coffee"]

+
+ @foreach (var city in Model.PartnerCafes.Keys) + { + var first = true; + foreach (var contact in Model.PartnerCafes[city]) + { + if (first) + { + var tokens = new string[] { contact.City, contact.Country }; + var address = String.Join(", ", tokens.Where(x => !String.IsNullOrEmpty(x))); +

@address

+ } +

+ @contact.Name, @contact.Street, @contact.Phone +

+ first = false; + } + } +
+ +

@HtmlLocalizer["Find the nearest cafe"]

+
+ + @section Scripts { + + } +
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Coffees/Detail.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Coffees/Detail.cshtml new file mode 100644 index 0000000..2705d89 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Coffees/Detail.cshtml @@ -0,0 +1,24 @@ +@model DancingGoat.Models.CoffeeViewModel +@{ + ViewData["PageClass"] = "inverted"; + ViewBag.Title = Model.Name; +} + +
+
+

@Model.Name

+
+ @if (!string.IsNullOrEmpty(Model.ImagePath)) + { +
+ @Model.Name +
+ } +
+ @Html.Raw(@Model.Description) +
+
+
+
+
+
diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Coffees/Index.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Coffees/Index.cshtml new file mode 100644 index 0000000..47b8c18 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Coffees/Index.cshtml @@ -0,0 +1,42 @@ +@model IEnumerable + +@{ + ViewData["PageClass"] = "inverted"; + ViewBag.Title = HtmlLocalizer["Coffees"].Value; +} + +
+

Our coffes

+ @if (Model.Any()) + { +
+
+
+ @foreach (var coffee in Model) + { + + + } +
+
+ + +
+ } + else + { + + } +
diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Contacts/Index.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Contacts/Index.cshtml new file mode 100644 index 0000000..229b879 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Contacts/Index.cshtml @@ -0,0 +1,59 @@ +@model DancingGoat.Models.ContactsIndexViewModel + +@{ + ViewBag.Title = HtmlLocalizer["Contacts"].Value; +} + +@section scripts { + +} + +
+
+ + +
+
+ +
+
+
+ +

@HtmlLocalizer["Our cafes"]

+
+ @foreach (var cafe in @Model.CompanyCafes) + { +
+
+ +
+
+ } +
+ +

@HtmlLocalizer["Drop in"]

+
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Home/Index.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Home/Index.cshtml new file mode 100644 index 0000000..3864ed8 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Home/Index.cshtml @@ -0,0 +1,89 @@ +@using System.Linq; + +@using DancingGoat.Helpers +@using DancingGoat.Widgets + +@using CMS.DocumentEngine.Types.DancingGoatCore + +@using Kentico.PageBuilder.Web.Mvc + +@{ + ViewData["Title"] = HtmlLocalizer["Home"]; + var cacheEnabled = !Context.Kentico().Preview().Enabled; +} + + + +@if (Model.Event != null) +{ + +} + + + + + + @foreach (var homeSection in Model.HomeSections) + { +
+
+

@homeSection.Heading

+
+
+
+ @Html.Raw(homeSection.Text) +
+
+ + @{ + var text = homeSection.MoreButtonText; + + if ((!string.IsNullOrEmpty(text))) + { +
+ +
+ } + } +
+ } + @{ + var cacheDependencyKeys = new[] { $"nodes|dancinggoatcore|{Home.CLASS_NAME}|all", $"nodes|dancinggoatcore|{HomeSection.CLASS_NAME}|all" }; + } + +
+ +@if (Model.Reference != null) +{ + +} + +
+
+ +
+ +
+
+

@HtmlLocalizer["Taste our coffee"]

+
+ + +
+
diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/HttpErrors/NotFound.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/HttpErrors/NotFound.cshtml new file mode 100644 index 0000000..803e9ef --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/HttpErrors/NotFound.cshtml @@ -0,0 +1,29 @@ +@{ + ViewBag.Title = HtmlLocalizer["Oops! Page not found..."].Value; + ViewData["PageClass"] = "inverted"; +} + +
+
+
+ Page not found +
+
+
+

+ @HtmlLocalizer["Oops! Page not found..."] +

+

@HtmlLocalizer["We are really sorry, something has gone wrong. It seems that page you requested doesn't exist."]

+

+ @HtmlLocalizer["Head back to {0} using the navigation or {1}.", + Html.Raw($"{HtmlLocalizer["homepage"].Value}"), + Html.Raw($"{HtmlLocalizer["contact us"].Value}")] +

+ + @HtmlLocalizer["Back to homepage"] + +
+
+
+
+ diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Privacy/Index.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Privacy/Index.cshtml new file mode 100644 index 0000000..b5cfd59 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Privacy/Index.cshtml @@ -0,0 +1,57 @@ +@model DancingGoat.Models.PrivacyViewModel + +@{ + ViewData["PageClass"] = "inverted no-bg"; + ViewBag.Title = HtmlLocalizer["Privacy"].Value; +} + +
+ @if (Model.DemoDisabled) + { + +

@HtmlLocalizer["Data protection (GDPR) demo must be enabled."]

+ + @HtmlLocalizer["You can enable data protection demo data in the administration interface (Configuration -> Sample data generator)."] + +
+ } + else + { +

@HtmlLocalizer["Your agreed consents"]

+ + if (Model.ShowSavedMessage) + { + @HtmlLocalizer["Consent revocation was successful."] + } + else if (Model.ShowErrorMessage) + { + @HtmlLocalizer["Consent revocation was not successful."] + } + + if (Model.Constents.Any()) + { +
+ @foreach (var consent in Model.Constents) + { + + } +
+ } + else + { + @HtmlLocalizer["There are currently no consents agreed by you."] + } + } +
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Search/Index.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Search/Index.cshtml new file mode 100644 index 0000000..a2e0db2 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Search/Index.cshtml @@ -0,0 +1,108 @@ +@using Kentico.Xperience.Lucene.Models +@using DancingGoat.Search + +@model LuceneSearchResultModel + +@{ + Dictionary GetRouteData(int page) => + new Dictionary() { { "searchText", Model.Query }, { "page", page.ToString() } }; +} + +

Search

+ + + +
+
+
+
+
+
+ +
+ + + +
+
+
+
+ + +
+
+
+ +@if (!Model.Hits.Any()) +{ + if (!String.IsNullOrWhiteSpace(Model.Query)) + { + @HtmlLocalizer["Sorry, no results match {0}", Model.Query] + } + + return; +} + +@foreach (var item in Model.Hits) +{ +
+
+ @if (!string.IsNullOrEmpty(item.ImagePath)) + { + + @item.Title + + } +
+
+

+ @item.Title +

+
@item.PublishedDate
+
+
+} + +
+ +
diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Search/_Search.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Search/_Search.cshtml new file mode 100644 index 0000000..e69de29 diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_Event.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_Event.cshtml new file mode 100644 index 0000000..7772a0a --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_Event.cshtml @@ -0,0 +1,42 @@ +@model DancingGoat.Models.EventViewModel + +
+
+
+
+

@HtmlLocalizer["Events"]

+
+
+
+
+ @Model.HeroBannerImageShortDescription +
+
+
+

+ @Model.Title +

+
+

+ @Model.PromoText +

+
    +
  • When: @Model.Date.ToString("g")
  • +
  • Where: @Model.Location
  • + @if (Model.Coffees is not null){ +
  • + What: @string.Join(", ", @Model.Coffees) +
  • + } +
+
+
+
+
+ @Model.HeroBannerImageShortDescription +
+
+
+
+
+
diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_GoogleMaps.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_GoogleMaps.cshtml new file mode 100644 index 0000000..dc29757 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_GoogleMaps.cshtml @@ -0,0 +1,6 @@ +@using Microsoft.Extensions.Configuration + +@inject IConfiguration Configuration + + + \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_LandingPageLayout.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_LandingPageLayout.cshtml new file mode 100644 index 0000000..16fec4f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_LandingPageLayout.cshtml @@ -0,0 +1,37 @@ +@using Kentico.Activities.Web.Mvc +@using Kentico.OnlineMarketing.Web.Mvc + +@{ + Layout = null; +} + + + + + + + + + @ViewBag.Title - Dancing Goat + + @Html.Kentico().ActivityLoggingAPI() + @Html.Kentico().ActivityLoggingScript() + + +
+ + @RenderBody() +
+ + + + + diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_Layout.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_Layout.cshtml new file mode 100644 index 0000000..be2bb3f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_Layout.cshtml @@ -0,0 +1,124 @@ +@using Kentico.Forms.Web.Mvc.Widgets +@using Kentico.Xperience.Admin.Base.Forms +@using Microsoft.AspNetCore.Mvc.Localization + +@using Kentico.Activities.Web.Mvc +@using Kentico.OnlineMarketing.Web.Mvc + +@using DancingGoat.Helpers +@using DancingGoat.Widgets + +@inject IHtmlLocalizer HtmlLocalizer + +@{ + var subscriptionformWidgetProperties = new FormWidgetProperties() + { + SelectedForm = new List() { new ObjectRelatedItem { ObjectCodeName = "DancingGoatSubscription" } } + }; +} + + + + + + + + + + @ViewBag.Title - Dancing Goat + @RenderSection("styles", required: false) + @Html.Kentico().ActivityLoggingAPI() + @Html.Kentico().ActivityLoggingScript() + + + + +
+ +
+ +
+
+
+ @RenderBody() + +
+
+
+
+ + + + + + + @RenderSection("scripts", required: false) + + + diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_Reference.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_Reference.cshtml new file mode 100644 index 0000000..b1e3bed --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/Shared/_Reference.cshtml @@ -0,0 +1,19 @@ +@model DancingGoat.Models.ReferenceViewModel + +
+
+

@HtmlLocalizer["Reference"]

+
+
+
+ @Model.ImageShortDescription +
+
+
@Html.Raw(Model.Text)
+
+
@Html.Raw(Model.Name)
+
@Html.Raw(Model.Description)
+
+
+
+
\ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/_ViewImports.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/_ViewImports.cshtml new file mode 100644 index 0000000..d14c82f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/_ViewImports.cshtml @@ -0,0 +1,16 @@ +@using DancingGoat + +@using CMS.Helpers + +@using Kentico.Web.Mvc +@using Kentico.Content.Web.Mvc +@using Kentico.PageBuilder.Web.Mvc + +@using Microsoft.AspNetCore.Mvc.Localization + +@addTagHelper *, Microsoft.AspNetCore.Mvc.TagHelpers +@addTagHelper *, Kentico.Content.Web.Mvc +@addTagHelper *, Kentico.Web.Mvc +@addTagHelper *, DancingGoat + +@inject IHtmlLocalizer HtmlLocalizer diff --git a/src/Kentico.Xperience.Lucene.Sample/Views/_ViewStart.cshtml b/src/Kentico.Xperience.Lucene.Sample/Views/_ViewStart.cshtml new file mode 100644 index 0000000..77b65af --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/Views/_ViewStart.cshtml @@ -0,0 +1,3 @@ +@{ + Layout = "_Layout"; +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/appsettings.json b/src/Kentico.Xperience.Lucene.Sample/appsettings.json new file mode 100644 index 0000000..0383d7c --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/appsettings.json @@ -0,0 +1,27 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft": "Warning", + "Microsoft.Hosting.Lifetime": "Information" + }, + "KenticoEventLog": { + "LogLevel": { + "Default": "Error", + "Microsoft.AspNetCore.Server.Kestrel": "None" + } + } + }, + "AllowedHosts": "*", + "ConnectionStrings": { + "CMSConnectionString": "" + }, + "CMSHashStringSalt": "195a79ed-c559-42d8-b801-5857fc07ab1c", + + "CMSAdminClientModuleSettings": { + "kentico-xperience-integrations-lucene": { + "Mode": "Proxy", + "Port": 3009 + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/06/06a01f16-a817-45a6-9471-c005ba654c1f/d58da725-8d1e-4c54-82cf-aa2a982c6db0/11ad015b-b789-455d-80c2-82997d3724b9.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/06/06a01f16-a817-45a6-9471-c005ba654c1f/d58da725-8d1e-4c54-82cf-aa2a982c6db0/11ad015b-b789-455d-80c2-82997d3724b9.jpg new file mode 100644 index 0000000..2a5c62c Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/06/06a01f16-a817-45a6-9471-c005ba654c1f/d58da725-8d1e-4c54-82cf-aa2a982c6db0/11ad015b-b789-455d-80c2-82997d3724b9.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/0a/0adf3bd4-77dc-4681-a1ee-8be2e9427003/d58da725-8d1e-4c54-82cf-aa2a982c6db0/db47ea4f-246a-4cfd-a68d-4221c0099300.png b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/0a/0adf3bd4-77dc-4681-a1ee-8be2e9427003/d58da725-8d1e-4c54-82cf-aa2a982c6db0/db47ea4f-246a-4cfd-a68d-4221c0099300.png new file mode 100644 index 0000000..c619d49 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/0a/0adf3bd4-77dc-4681-a1ee-8be2e9427003/d58da725-8d1e-4c54-82cf-aa2a982c6db0/db47ea4f-246a-4cfd-a68d-4221c0099300.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/0b/0b97ffee-1323-443a-8498-c8aa356d97ba/d58da725-8d1e-4c54-82cf-aa2a982c6db0/b4b03ad2-eb5b-46ff-8917-d474d635d104.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/0b/0b97ffee-1323-443a-8498-c8aa356d97ba/d58da725-8d1e-4c54-82cf-aa2a982c6db0/b4b03ad2-eb5b-46ff-8917-d474d635d104.jpg new file mode 100644 index 0000000..baa3537 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/0b/0b97ffee-1323-443a-8498-c8aa356d97ba/d58da725-8d1e-4c54-82cf-aa2a982c6db0/b4b03ad2-eb5b-46ff-8917-d474d635d104.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/1a/1a2fe633-8069-41e5-a837-9406d06b0d60/d58da725-8d1e-4c54-82cf-aa2a982c6db0/1633f684-08f4-4832-b1fd-4530de4c9aaf.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/1a/1a2fe633-8069-41e5-a837-9406d06b0d60/d58da725-8d1e-4c54-82cf-aa2a982c6db0/1633f684-08f4-4832-b1fd-4530de4c9aaf.jpg new file mode 100644 index 0000000..d758625 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/1a/1a2fe633-8069-41e5-a837-9406d06b0d60/d58da725-8d1e-4c54-82cf-aa2a982c6db0/1633f684-08f4-4832-b1fd-4530de4c9aaf.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/25/257427e7-8365-4bbf-8de6-6780c5e9366e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/a2fe0679-3073-4d58-9d43-41d1df7be350.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/25/257427e7-8365-4bbf-8de6-6780c5e9366e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/a2fe0679-3073-4d58-9d43-41d1df7be350.jpg new file mode 100644 index 0000000..2127146 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/25/257427e7-8365-4bbf-8de6-6780c5e9366e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/a2fe0679-3073-4d58-9d43-41d1df7be350.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/2c/2c3bfbdb-b70f-4c2d-a878-92a86d12c5ab/d58da725-8d1e-4c54-82cf-aa2a982c6db0/eb1bd5cc-19e5-4894-afba-41e0b8dab9cf.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/2c/2c3bfbdb-b70f-4c2d-a878-92a86d12c5ab/d58da725-8d1e-4c54-82cf-aa2a982c6db0/eb1bd5cc-19e5-4894-afba-41e0b8dab9cf.jpg new file mode 100644 index 0000000..e7daa3c Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/2c/2c3bfbdb-b70f-4c2d-a878-92a86d12c5ab/d58da725-8d1e-4c54-82cf-aa2a982c6db0/eb1bd5cc-19e5-4894-afba-41e0b8dab9cf.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/32/32685f04-37ac-49ec-92e6-98d354ff3b0d/d58da725-8d1e-4c54-82cf-aa2a982c6db0/3767c1bc-93f6-42d9-9294-3cc9118c5866.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/32/32685f04-37ac-49ec-92e6-98d354ff3b0d/d58da725-8d1e-4c54-82cf-aa2a982c6db0/3767c1bc-93f6-42d9-9294-3cc9118c5866.jpg new file mode 100644 index 0000000..2072fd5 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/32/32685f04-37ac-49ec-92e6-98d354ff3b0d/d58da725-8d1e-4c54-82cf-aa2a982c6db0/3767c1bc-93f6-42d9-9294-3cc9118c5866.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/38/38a03a8e-469a-46f0-9daf-83b0172c182e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/2b36d60a-1493-4ee5-b61f-06398c943d8c.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/38/38a03a8e-469a-46f0-9daf-83b0172c182e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/2b36d60a-1493-4ee5-b61f-06398c943d8c.jpg new file mode 100644 index 0000000..436d471 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/38/38a03a8e-469a-46f0-9daf-83b0172c182e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/2b36d60a-1493-4ee5-b61f-06398c943d8c.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/3b/3b7aea33-0107-4af8-ba40-3d8e0e8e7dd5/d58da725-8d1e-4c54-82cf-aa2a982c6db0/23585257-4ba1-496b-a4d7-2456d5a335d2.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/3b/3b7aea33-0107-4af8-ba40-3d8e0e8e7dd5/d58da725-8d1e-4c54-82cf-aa2a982c6db0/23585257-4ba1-496b-a4d7-2456d5a335d2.jpg new file mode 100644 index 0000000..df134d1 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/3b/3b7aea33-0107-4af8-ba40-3d8e0e8e7dd5/d58da725-8d1e-4c54-82cf-aa2a982c6db0/23585257-4ba1-496b-a4d7-2456d5a335d2.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/4f/4fefb676-d24c-4f97-8f57-3d5e05df4452/d58da725-8d1e-4c54-82cf-aa2a982c6db0/7f279e3f-b44d-457e-95cc-389030c5ce72.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/4f/4fefb676-d24c-4f97-8f57-3d5e05df4452/d58da725-8d1e-4c54-82cf-aa2a982c6db0/7f279e3f-b44d-457e-95cc-389030c5ce72.jpg new file mode 100644 index 0000000..4c08bb6 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/4f/4fefb676-d24c-4f97-8f57-3d5e05df4452/d58da725-8d1e-4c54-82cf-aa2a982c6db0/7f279e3f-b44d-457e-95cc-389030c5ce72.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/58/58497ad9-0dd4-4dee-a059-577f35fa4762/d58da725-8d1e-4c54-82cf-aa2a982c6db0/f3f5c048-dc3f-4fd3-8390-b04f50f6eed9.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/58/58497ad9-0dd4-4dee-a059-577f35fa4762/d58da725-8d1e-4c54-82cf-aa2a982c6db0/f3f5c048-dc3f-4fd3-8390-b04f50f6eed9.jpg new file mode 100644 index 0000000..c9a056f Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/58/58497ad9-0dd4-4dee-a059-577f35fa4762/d58da725-8d1e-4c54-82cf-aa2a982c6db0/f3f5c048-dc3f-4fd3-8390-b04f50f6eed9.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/5a/5ac12e88-8ba3-49ec-ab03-8cc21c39527e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/49a31f4e-ccf5-4e4d-8548-62c4cf9a1885.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/5a/5ac12e88-8ba3-49ec-ab03-8cc21c39527e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/49a31f4e-ccf5-4e4d-8548-62c4cf9a1885.jpg new file mode 100644 index 0000000..3963ab3 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/5a/5ac12e88-8ba3-49ec-ab03-8cc21c39527e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/49a31f4e-ccf5-4e4d-8548-62c4cf9a1885.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/66/66703159-bb5b-4523-bdc6-a892c6ee1c29/d58da725-8d1e-4c54-82cf-aa2a982c6db0/fa5f507b-b316-4561-a9f7-baf45fb04319.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/66/66703159-bb5b-4523-bdc6-a892c6ee1c29/d58da725-8d1e-4c54-82cf-aa2a982c6db0/fa5f507b-b316-4561-a9f7-baf45fb04319.jpg new file mode 100644 index 0000000..3a63aed Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/66/66703159-bb5b-4523-bdc6-a892c6ee1c29/d58da725-8d1e-4c54-82cf-aa2a982c6db0/fa5f507b-b316-4561-a9f7-baf45fb04319.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/68/68aa9c1b-a429-4cc9-b9c5-d2b530a8ef0a/d58da725-8d1e-4c54-82cf-aa2a982c6db0/23860701-3e90-498a-b97d-648b12f8abc8.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/68/68aa9c1b-a429-4cc9-b9c5-d2b530a8ef0a/d58da725-8d1e-4c54-82cf-aa2a982c6db0/23860701-3e90-498a-b97d-648b12f8abc8.jpg new file mode 100644 index 0000000..948d298 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/68/68aa9c1b-a429-4cc9-b9c5-d2b530a8ef0a/d58da725-8d1e-4c54-82cf-aa2a982c6db0/23860701-3e90-498a-b97d-648b12f8abc8.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/6a/6a079bb1-17c6-4b46-a9a6-44a5818e827b/d58da725-8d1e-4c54-82cf-aa2a982c6db0/ea55088e-1df8-4403-9ff6-fd01d2c3e1f4.png b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/6a/6a079bb1-17c6-4b46-a9a6-44a5818e827b/d58da725-8d1e-4c54-82cf-aa2a982c6db0/ea55088e-1df8-4403-9ff6-fd01d2c3e1f4.png new file mode 100644 index 0000000..bb673b4 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/6a/6a079bb1-17c6-4b46-a9a6-44a5818e827b/d58da725-8d1e-4c54-82cf-aa2a982c6db0/ea55088e-1df8-4403-9ff6-fd01d2c3e1f4.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/73/73e0e47c-3474-4fd0-906a-ae9f02cd878e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/4873af43-ab3a-48db-8821-b70ed5e4a72a.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/73/73e0e47c-3474-4fd0-906a-ae9f02cd878e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/4873af43-ab3a-48db-8821-b70ed5e4a72a.jpg new file mode 100644 index 0000000..5f582b4 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/73/73e0e47c-3474-4fd0-906a-ae9f02cd878e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/4873af43-ab3a-48db-8821-b70ed5e4a72a.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/74/74dec34b-3d72-4de1-9a62-729508126963/d58da725-8d1e-4c54-82cf-aa2a982c6db0/1a6b02c1-0e4a-44f2-a52a-380cd854a33e.png b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/74/74dec34b-3d72-4de1-9a62-729508126963/d58da725-8d1e-4c54-82cf-aa2a982c6db0/1a6b02c1-0e4a-44f2-a52a-380cd854a33e.png new file mode 100644 index 0000000..3d815ec Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/74/74dec34b-3d72-4de1-9a62-729508126963/d58da725-8d1e-4c54-82cf-aa2a982c6db0/1a6b02c1-0e4a-44f2-a52a-380cd854a33e.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/7a/7a3eeac8-faad-46a8-a307-8e0ad3bd4a4e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/c70535ca-eded-4450-8436-4127eaefd98c.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/7a/7a3eeac8-faad-46a8-a307-8e0ad3bd4a4e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/c70535ca-eded-4450-8436-4127eaefd98c.jpg new file mode 100644 index 0000000..7adb3ff Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/7a/7a3eeac8-faad-46a8-a307-8e0ad3bd4a4e/d58da725-8d1e-4c54-82cf-aa2a982c6db0/c70535ca-eded-4450-8436-4127eaefd98c.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/88/8830a959-9d91-4ff2-b527-fd7ccd60c4ad/d58da725-8d1e-4c54-82cf-aa2a982c6db0/1191a4e9-c0af-4022-a706-3290bd886c5e.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/88/8830a959-9d91-4ff2-b527-fd7ccd60c4ad/d58da725-8d1e-4c54-82cf-aa2a982c6db0/1191a4e9-c0af-4022-a706-3290bd886c5e.jpg new file mode 100644 index 0000000..bf5d097 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/88/8830a959-9d91-4ff2-b527-fd7ccd60c4ad/d58da725-8d1e-4c54-82cf-aa2a982c6db0/1191a4e9-c0af-4022-a706-3290bd886c5e.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/92/921991e7-6143-49c5-992f-12f369dbdf4f/d58da725-8d1e-4c54-82cf-aa2a982c6db0/cb22508f-2935-4137-8e41-2db39a79488b.png b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/92/921991e7-6143-49c5-992f-12f369dbdf4f/d58da725-8d1e-4c54-82cf-aa2a982c6db0/cb22508f-2935-4137-8e41-2db39a79488b.png new file mode 100644 index 0000000..ca2d42c Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/92/921991e7-6143-49c5-992f-12f369dbdf4f/d58da725-8d1e-4c54-82cf-aa2a982c6db0/cb22508f-2935-4137-8e41-2db39a79488b.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/96/96997b4e-f321-40ca-989a-b4bbc4b1d085/d58da725-8d1e-4c54-82cf-aa2a982c6db0/08d8f5be-5051-4f28-a6fb-139def3e41de.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/96/96997b4e-f321-40ca-989a-b4bbc4b1d085/d58da725-8d1e-4c54-82cf-aa2a982c6db0/08d8f5be-5051-4f28-a6fb-139def3e41de.jpg new file mode 100644 index 0000000..f8347c1 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/96/96997b4e-f321-40ca-989a-b4bbc4b1d085/d58da725-8d1e-4c54-82cf-aa2a982c6db0/08d8f5be-5051-4f28-a6fb-139def3e41de.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/97/9753564d-7c8b-4f01-b09e-cce699806af6/d58da725-8d1e-4c54-82cf-aa2a982c6db0/0ca5c23f-2f63-4e36-93d7-2f63ea51633a.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/97/9753564d-7c8b-4f01-b09e-cce699806af6/d58da725-8d1e-4c54-82cf-aa2a982c6db0/0ca5c23f-2f63-4e36-93d7-2f63ea51633a.jpg new file mode 100644 index 0000000..eb31e37 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/97/9753564d-7c8b-4f01-b09e-cce699806af6/d58da725-8d1e-4c54-82cf-aa2a982c6db0/0ca5c23f-2f63-4e36-93d7-2f63ea51633a.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/a6/a6e03e15-b513-4e94-b07e-2d7181fa03bd/d58da725-8d1e-4c54-82cf-aa2a982c6db0/f3a7986a-bdf2-4027-9f36-1268543e548d.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/a6/a6e03e15-b513-4e94-b07e-2d7181fa03bd/d58da725-8d1e-4c54-82cf-aa2a982c6db0/f3a7986a-bdf2-4027-9f36-1268543e548d.jpg new file mode 100644 index 0000000..7859d6d Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/a6/a6e03e15-b513-4e94-b07e-2d7181fa03bd/d58da725-8d1e-4c54-82cf-aa2a982c6db0/f3a7986a-bdf2-4027-9f36-1268543e548d.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/b7/b78f0ca2-daae-4fdc-b6c8-c76a45ebe580/d58da725-8d1e-4c54-82cf-aa2a982c6db0/e1d0c1e2-9f1a-4ae4-8110-90aaa91c8b1c.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/b7/b78f0ca2-daae-4fdc-b6c8-c76a45ebe580/d58da725-8d1e-4c54-82cf-aa2a982c6db0/e1d0c1e2-9f1a-4ae4-8110-90aaa91c8b1c.jpg new file mode 100644 index 0000000..90b3ca0 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/b7/b78f0ca2-daae-4fdc-b6c8-c76a45ebe580/d58da725-8d1e-4c54-82cf-aa2a982c6db0/e1d0c1e2-9f1a-4ae4-8110-90aaa91c8b1c.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/bd/bd156b0b-bf94-42df-8427-74249fa09767/d58da725-8d1e-4c54-82cf-aa2a982c6db0/2abecacc-194c-47b5-8a47-49ad99d7ff69.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/bd/bd156b0b-bf94-42df-8427-74249fa09767/d58da725-8d1e-4c54-82cf-aa2a982c6db0/2abecacc-194c-47b5-8a47-49ad99d7ff69.jpg new file mode 100644 index 0000000..6fa839b Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/bd/bd156b0b-bf94-42df-8427-74249fa09767/d58da725-8d1e-4c54-82cf-aa2a982c6db0/2abecacc-194c-47b5-8a47-49ad99d7ff69.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/bf/bf2856c9-3f49-4aa7-88ad-47390dfe1872/d58da725-8d1e-4c54-82cf-aa2a982c6db0/27ede387-5286-45e5-a5ad-4dd6700ba7b4.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/bf/bf2856c9-3f49-4aa7-88ad-47390dfe1872/d58da725-8d1e-4c54-82cf-aa2a982c6db0/27ede387-5286-45e5-a5ad-4dd6700ba7b4.jpg new file mode 100644 index 0000000..e377ed3 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/bf/bf2856c9-3f49-4aa7-88ad-47390dfe1872/d58da725-8d1e-4c54-82cf-aa2a982c6db0/27ede387-5286-45e5-a5ad-4dd6700ba7b4.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/ca/ca088670-d6fa-4ede-8e67-e015c9b002be/d58da725-8d1e-4c54-82cf-aa2a982c6db0/375e9ea5-3d89-4b5f-8a67-5d560dfc1d97.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/ca/ca088670-d6fa-4ede-8e67-e015c9b002be/d58da725-8d1e-4c54-82cf-aa2a982c6db0/375e9ea5-3d89-4b5f-8a67-5d560dfc1d97.jpg new file mode 100644 index 0000000..4b339ad Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/ca/ca088670-d6fa-4ede-8e67-e015c9b002be/d58da725-8d1e-4c54-82cf-aa2a982c6db0/375e9ea5-3d89-4b5f-8a67-5d560dfc1d97.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/d2/d26c20e3-3ccc-4811-b762-3268d306bcd6/d58da725-8d1e-4c54-82cf-aa2a982c6db0/d967204e-1390-4700-bee7-6cbb49b7279f.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/d2/d26c20e3-3ccc-4811-b762-3268d306bcd6/d58da725-8d1e-4c54-82cf-aa2a982c6db0/d967204e-1390-4700-bee7-6cbb49b7279f.jpg new file mode 100644 index 0000000..8ba2735 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/d2/d26c20e3-3ccc-4811-b762-3268d306bcd6/d58da725-8d1e-4c54-82cf-aa2a982c6db0/d967204e-1390-4700-bee7-6cbb49b7279f.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/d3/d3b9494d-6369-4d3d-bf6a-e688c8b3ccd7/d58da725-8d1e-4c54-82cf-aa2a982c6db0/ace5b3f2-4c01-4eb7-b846-e367f803d3dc.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/d3/d3b9494d-6369-4d3d-bf6a-e688c8b3ccd7/d58da725-8d1e-4c54-82cf-aa2a982c6db0/ace5b3f2-4c01-4eb7-b846-e367f803d3dc.jpg new file mode 100644 index 0000000..ff3f0e0 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/d3/d3b9494d-6369-4d3d-bf6a-e688c8b3ccd7/d58da725-8d1e-4c54-82cf-aa2a982c6db0/ace5b3f2-4c01-4eb7-b846-e367f803d3dc.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/d6/d6f990e1-28d8-4d8c-9c76-4d8b6cf8b237/d58da725-8d1e-4c54-82cf-aa2a982c6db0/45748969-ba38-48b3-ae82-77edf47f20a1.png b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/d6/d6f990e1-28d8-4d8c-9c76-4d8b6cf8b237/d58da725-8d1e-4c54-82cf-aa2a982c6db0/45748969-ba38-48b3-ae82-77edf47f20a1.png new file mode 100644 index 0000000..0c224f6 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/d6/d6f990e1-28d8-4d8c-9c76-4d8b6cf8b237/d58da725-8d1e-4c54-82cf-aa2a982c6db0/45748969-ba38-48b3-ae82-77edf47f20a1.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/e0/e0834d4c-32d6-47e3-8698-e1ba447883ba/d58da725-8d1e-4c54-82cf-aa2a982c6db0/4350fb52-0498-4bb4-8a22-1414ccda405e.png b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/e0/e0834d4c-32d6-47e3-8698-e1ba447883ba/d58da725-8d1e-4c54-82cf-aa2a982c6db0/4350fb52-0498-4bb4-8a22-1414ccda405e.png new file mode 100644 index 0000000..3f3d951 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/e0/e0834d4c-32d6-47e3-8698-e1ba447883ba/d58da725-8d1e-4c54-82cf-aa2a982c6db0/4350fb52-0498-4bb4-8a22-1414ccda405e.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/ef/ef9e88b9-a957-4c05-8ac9-c19ee5682567/d58da725-8d1e-4c54-82cf-aa2a982c6db0/34b2cd17-9238-48a8-b69c-b83221f7cbf9.png b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/ef/ef9e88b9-a957-4c05-8ac9-c19ee5682567/d58da725-8d1e-4c54-82cf-aa2a982c6db0/34b2cd17-9238-48a8-b69c-b83221f7cbf9.png new file mode 100644 index 0000000..f5d8612 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/ef/ef9e88b9-a957-4c05-8ac9-c19ee5682567/d58da725-8d1e-4c54-82cf-aa2a982c6db0/34b2cd17-9238-48a8-b69c-b83221f7cbf9.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/ff/ffd44cf0-9afb-44b0-a6be-5c7b693f4397/d58da725-8d1e-4c54-82cf-aa2a982c6db0/5beca165-b97b-4934-8e29-d00976438534.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/ff/ffd44cf0-9afb-44b0-a6be-5c7b693f4397/d58da725-8d1e-4c54-82cf-aa2a982c6db0/5beca165-b97b-4934-8e29-d00976438534.jpg new file mode 100644 index 0000000..11acedc Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/ContentItems/ff/ffd44cf0-9afb-44b0-a6be-5c7b693f4397/d58da725-8d1e-4c54-82cf-aa2a982c6db0/5beca165-b97b-4934-8e29-d00976438534.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Bakery-And-Coffee.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Bakery-And-Coffee.jpg new file mode 100644 index 0000000..2e967b3 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Bakery-And-Coffee.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Brew-Bar.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Brew-Bar.jpg new file mode 100644 index 0000000..582fae2 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Brew-Bar.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Cauca-Farmer.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Cauca-Farmer.jpg new file mode 100644 index 0000000..9fdb727 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Cauca-Farmer.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Cherries.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Cherries.jpg new file mode 100644 index 0000000..a995130 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Cherries.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Region.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Region.jpg new file mode 100644 index 0000000..eea1513 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Region.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Shop.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Shop.jpg new file mode 100644 index 0000000..49d31b1 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Shop.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Triangle.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Triangle.jpg new file mode 100644 index 0000000..3f41195 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Coffee-Triangle.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Colombia-Coffee.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Colombia-Coffee.jpg new file mode 100644 index 0000000..d19ab70 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Colombia-Coffee.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Kona-Coffee.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Kona-Coffee.jpg new file mode 100644 index 0000000..32441f8 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Kona-Coffee.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Robusta.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Robusta.jpg new file mode 100644 index 0000000..38c3396 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Robusta.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/St-Helena-Coffee.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/St-Helena-Coffee.jpg new file mode 100644 index 0000000..42f009d Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/St-Helena-Coffee.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Thailand-Coffee.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Thailand-Coffee.jpg new file mode 100644 index 0000000..36c0ce5 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Thailand-Coffee.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Work-And-Coffee.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Work-And-Coffee.jpg new file mode 100644 index 0000000..5f338de Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/CoffeeGallery/Work-And-Coffee.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/EmailCampaigns/coffee-101-lesson-1.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/EmailCampaigns/coffee-101-lesson-1.jpg new file mode 100644 index 0000000..90cdbde Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/EmailCampaigns/coffee-101-lesson-1.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/EmailCampaigns/coffee-101-lesson-2.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/EmailCampaigns/coffee-101-lesson-2.jpg new file mode 100644 index 0000000..2b6a206 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/EmailCampaigns/coffee-101-lesson-2.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/EmailCampaigns/colombia-coffee-promotion.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/EmailCampaigns/colombia-coffee-promotion.jpg new file mode 100644 index 0000000..7969f49 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/EmailCampaigns/colombia-coffee-promotion.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Logos/logo-dancing-goat.png b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Logos/logo-dancing-goat.png new file mode 100644 index 0000000..9fe35f9 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Logos/logo-dancing-goat.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/Espro.png b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/Espro.png new file mode 100644 index 0000000..72f136c Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/Espro.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/Hario.png b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/Hario.png new file mode 100644 index 0000000..65f267e Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/Hario.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/aerobie.png b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/aerobie.png new file mode 100644 index 0000000..479e7ec Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/aerobie.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/chemex.png b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/chemex.png new file mode 100644 index 0000000..c699b8f Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/Manufacturers/chemex.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/banner-default.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/banner-default.jpg new file mode 100644 index 0000000..7c8def6 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/banner-default.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/banner2.png b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/banner2.png new file mode 100644 index 0000000..19115f7 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/banner2.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/colombia-coffee.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/colombia-coffee.jpg new file mode 100644 index 0000000..c3ac88a Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/colombia-coffee.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/default-image-product.png b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/default-image-product.png new file mode 100644 index 0000000..932e8f0 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/default-image-product.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/hero_image.jpg b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/hero_image.jpg new file mode 100644 index 0000000..318296c Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/assets/DancingGoatCore/media/Graphics/hero_image.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/package.json b/src/Kentico.Xperience.Lucene.Sample/package.json new file mode 100644 index 0000000..20bbab8 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/package.json @@ -0,0 +1,14 @@ +{ + "version": "1.0.0", + "name": "asp.net", + "private": true, + "devDependencies": { + "grunt": "1.6.1", + "grunt-contrib-clean": "2.0.1", + "grunt-contrib-concat": "2.1.0", + "grunt-contrib-cssmin": "4.0.0", + "grunt-contrib-less": "3.0.0", + "grunt-contrib-watch": "1.1.0", + "grunt-terser": "2.0.0" + } +} diff --git a/src/Kentico.Xperience.Lucene.Examples/packages.lock.json b/src/Kentico.Xperience.Lucene.Sample/packages.lock.json similarity index 83% rename from src/Kentico.Xperience.Lucene.Examples/packages.lock.json rename to src/Kentico.Xperience.Lucene.Sample/packages.lock.json index 7467eb9..67720b8 100644 --- a/src/Kentico.Xperience.Lucene.Examples/packages.lock.json +++ b/src/Kentico.Xperience.Lucene.Sample/packages.lock.json @@ -4,24 +4,59 @@ "net6.0": { "Kentico.Xperience.Admin": { "type": "Direct", - "requested": "[26.2.0, )", - "resolved": "26.2.0", - "contentHash": "SaMh3hcCqr58+JTVEbU+TPSOkSvJVjTUp2JQiu3cq/mP8XEW3/8ePCk4jX1HfYjBChdreF+/1gqrEOs4naEQ0g==", + "requested": "[26.4.0, )", + "resolved": "26.4.0", + "contentHash": "SV3xOAFZGyBknqHXrZHtSeUIQKsGHLip8nb4bcErYbovzQ84AsBWmd0FRLA+Da3UOJvGKz0okHsezhNvGntfsQ==", "dependencies": { - "Kentico.Xperience.WebApp": "[26.2.0]", + "Kentico.Xperience.WebApp": "[26.4.0]", "Microsoft.AspNetCore.SpaServices.Extensions": "6.0.15", "Microsoft.Extensions.FileProviders.Embedded": "6.0.15" } }, + "Kentico.Xperience.AzureStorage": { + "type": "Direct", + "requested": "[26.4.0, )", + "resolved": "26.4.0", + "contentHash": "ubWq1JbpIj2WHMgGb7Jpoad0dlQFAr2/r2lvY0BTEK4MNVb02r0EYMvrW1Ofrz78zSwO0fq8E75lHwkNJ2Eeow==", + "dependencies": { + "Azure.Core": "1.30.0", + "Azure.Storage.Blobs": "12.15.0", + "Azure.Storage.Queues": "12.13.0", + "Kentico.Xperience.Core": "26.4.0", + "Newtonsoft.Json": "13.0.3" + } + }, + "Kentico.Xperience.GraphQL": { + "type": "Direct", + "requested": "[26.4.0, )", + "resolved": "26.4.0", + "contentHash": "i4jQWBIlmFwwwB3LhSEZQjqmJ3icgAl/kit9IAG3i2tdOI82TThRejlgjIaLkBy8z+FPgqgmyupbJBm8yv+w7g==", + "dependencies": { + "HotChocolate.AspNetCore": "13.0.5", + "HotChocolate.Data": "13.0.5", + "Kentico.Xperience.Core": "26.4.0" + } + }, + "Kentico.Xperience.ImageProcessing": { + "type": "Direct", + "requested": "[26.4.0, )", + "resolved": "26.4.0", + "contentHash": "Kxa5v/cSA0jFDmtY0wh845+lT27DRUfwLQTWWdhPcYlY9NbZc7dIisb9bCo27zXFTE6a1vB5w+6DM4hAB9FF1Q==", + "dependencies": { + "Kentico.Xperience.Core": "26.4.0", + "SkiaSharp": "2.88.3", + "SkiaSharp.NativeAssets.Linux.NoDependencies": "2.88.3" + } + }, "Kentico.Xperience.WebApp": { "type": "Direct", - "requested": "[26.2.0, )", - "resolved": "26.2.0", - "contentHash": "yqe3qEOsmYm+l6kHNPXcFxkLJ/M50bZZl3HTLIwijEfQB1pI3H6L4gNcTugsDNSNm5b76enHNir5Z6OYB2iF7A==", + "requested": "[26.4.0, )", + "resolved": "26.4.0", + "contentHash": "zZLAGAg58xOSbBTFUp9CDCW9/X2y0zaKMVDxX31hTJVeu2oFib5cZDutmlOcmLOzeGU/kkx+gx2lz0E1qtpH8A==", "dependencies": { "CommandLineParser": "2.9.1", "HtmlSanitizer": "8.0.645", - "Kentico.Xperience.Core": "[26.2.0]", + "Kentico.Xperience.Core": "[26.4.0]", "Microsoft.Extensions.FileProviders.Embedded": "6.0.15", "Microsoft.Extensions.Localization": "6.0.15" } @@ -51,8 +86,8 @@ }, "Azure.Core": { "type": "Transitive", - "resolved": "1.25.0", - "contentHash": "X8Dd4sAggS84KScWIjEbFAdt2U1KDolQopTPoHVubG2y3CM54f9l6asVrP5Uy384NWXjsspPYaJgz5xHc+KvTA==", + "resolved": "1.30.0", + "contentHash": "w5Z2uTASP+EsnG4kqQsYtKTf41x1czIu1CgPuDQdHILxCk+IP2DiXazUcfTqr6kebi7S6ah927mrQx1nT/4bnw==", "dependencies": { "Microsoft.Bcl.AsyncInterfaces": "1.1.1", "System.Diagnostics.DiagnosticSource": "4.6.0", @@ -77,11 +112,283 @@ "System.Threading.Tasks.Extensions": "4.5.4" } }, + "Azure.Storage.Blobs": { + "type": "Transitive", + "resolved": "12.15.0", + "contentHash": "IclKNYNpJGtr8WY9284iJni9yMMoERscRb4Oxc+CF0U45mi749Dbpva1psc7u/R07fa+WgIupVIPczkfo2NQmA==", + "dependencies": { + "Azure.Storage.Common": "12.14.0", + "System.Text.Json": "4.7.2" + } + }, + "Azure.Storage.Common": { + "type": "Transitive", + "resolved": "12.14.0", + "contentHash": "Fd6xg64hJy3NRBBcIijahJgUPyCv3qXaR61RqBnkTsDCywlVrdb8neulFJPd4smj2yvXogFdja0IteVKugr4nw==", + "dependencies": { + "Azure.Core": "1.28.0", + "System.IO.Hashing": "6.0.0" + } + }, + "Azure.Storage.Queues": { + "type": "Transitive", + "resolved": "12.13.0", + "contentHash": "ZJ8TVuqTAVKqAUj3PL5zU6RP+skiqv9y69hPEGVjFjJcy+p+9T6Bg7muodyGwGMjx4m7lEC2Tj1lAdulktUGhA==", + "dependencies": { + "Azure.Storage.Common": "12.14.0", + "System.Memory.Data": "1.0.2", + "System.Text.Json": "4.7.2" + } + }, "CommandLineParser": { "type": "Transitive", "resolved": "2.9.1", "contentHash": "OE0sl1/sQ37bjVsPKKtwQlWDgqaxWgtme3xZz7JssWUzg5JpMIyHgCTY9MVMxOg48fJ1AgGT3tgdH5m/kQ5xhA==" }, + "GreenDonut": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "eIWKcI7cudxfyibIGBtxnR33nbdXlrFlOOXpG/Hhe63aY1Pg5wCk+sKE0UK0SjpMJ4n1O7UMt7lNTduYuszFvQ==", + "dependencies": { + "Microsoft.Extensions.ObjectPool": "3.1.4", + "System.Diagnostics.DiagnosticSource": "4.7.0", + "System.Threading.Tasks.Extensions": "4.5.0" + } + }, + "HotChocolate": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "1l+MiQTe/RQYpG3mDq5cuC/4Mat0HeaJzUH2yMlBY3Y4DwL5qrV8Y/P9Xm4EYeGzMBU3RGmXTOu6p/bObSnotw==", + "dependencies": { + "HotChocolate.Authorization": "13.0.5", + "HotChocolate.Execution": "13.0.5", + "HotChocolate.Fetching": "13.0.5", + "HotChocolate.Types": "13.0.5", + "HotChocolate.Types.CursorPagination": "13.0.5", + "HotChocolate.Types.Mutations": "13.0.5", + "HotChocolate.Types.OffsetPagination": "13.0.5", + "HotChocolate.Validation": "13.0.5" + } + }, + "HotChocolate.Abstractions": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "NRehH4rqLy36MBn7bqhH6SsrCHNTs2UO3m7NenEL5GD7hUaeU74b5fjeXQMSCS63al3/1u7sSZm0K4AwBLbZHQ==", + "dependencies": { + "HotChocolate.Language": "13.0.5", + "Microsoft.Bcl.AsyncInterfaces": "1.1.0", + "System.Collections.Immutable": "1.7.0" + } + }, + "HotChocolate.AspNetCore": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "AEFRh33GyHOzF/bBlPMj5dQvvGRWTl2ubBGTqdXNk8x+1oNeSVLKifb/WtWouacZdnrZMh2S421HUjXESNQDdQ==", + "dependencies": { + "HotChocolate": "13.0.5", + "HotChocolate.Subscriptions.InMemory": "13.0.5", + "HotChocolate.Transport.Sockets": "13.0.5", + "HotChocolate.Types.Scalars.Upload": "13.0.5" + } + }, + "HotChocolate.Authorization": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "4iALAd7LrNIKqT1lsFg8LfGll1hpDmQrKaST25nY7oxnUrpBYrdRLPSBEu/JGwdNHfqlmijIlLu/7HVB0kxeQw==", + "dependencies": { + "HotChocolate.Execution": "13.0.5" + } + }, + "HotChocolate.Data": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "bAciLZRXkAG9aSwjMWHp77oX3EmdlyQL1wEpDBw7M5C5N9K/CSxqR/Vb6dVnlj9VSzUOmAg7fPow5dOvY9QSqg==", + "dependencies": { + "HotChocolate.Execution": "13.0.5", + "HotChocolate.Types.CursorPagination": "13.0.5" + } + }, + "HotChocolate.Execution": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "si9a6ZrdJFH7PCur1Z6Uh1n7p5sJexf5fRFtBpHHVUXfa2apXPABaD9Ta/YxG7lJREVW9hq1by8dsRHf5zf1Qg==", + "dependencies": { + "HotChocolate.Abstractions": "13.0.5", + "HotChocolate.Execution.Abstractions": "13.0.5", + "HotChocolate.Fetching": "13.0.5", + "HotChocolate.Types": "13.0.5", + "HotChocolate.Validation": "13.0.5", + "Microsoft.Extensions.DependencyInjection": "3.1.4", + "Microsoft.Extensions.DiagnosticAdapter": "3.1.4", + "System.Threading.Channels": "4.7.0" + } + }, + "HotChocolate.Execution.Abstractions": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "q6dhV10J8CUEY9q1uRKTmjums/tSQv3TvZH6jzke4K4gsDnEMykwqsUE0IHGtv31L9fgqhhwIF4ul5ka+cPdDw==", + "dependencies": { + "HotChocolate.Abstractions": "13.0.5", + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.4" + } + }, + "HotChocolate.Fetching": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "8qP530q7+7SfBXy3FILrE69+whugkxz3gNG5TFCDOPwwcty71SIeOjQ/T2ycRqhO0GhUEkmA1Jt6t2GWwhVdRA==", + "dependencies": { + "GreenDonut": "13.0.5", + "HotChocolate.Types": "13.0.5" + } + }, + "HotChocolate.Language": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "8voOuwO1Je7KBpYDBt/XDhd6QaI8ls5+f4+u0BPMNm8fCSiXydv+w/x0Vt9DndBuSb5UU24k8DS7Ky46LM/I8g==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "13.0.5", + "HotChocolate.Language.Utf8": "13.0.5", + "HotChocolate.Language.Visitors": "13.0.5", + "HotChocolate.Language.Web": "13.0.5" + } + }, + "HotChocolate.Language.SyntaxTree": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "yfZF1sUlYabmWJQYS9h9YBoEmQGXL8oMSANU8tSS+PslaoVyIzTBYv+daUMQk/S87vSinqg/sfc2+iJm9hhMIA==", + "dependencies": { + "Microsoft.Extensions.ObjectPool": "3.1.4" + } + }, + "HotChocolate.Language.Utf8": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "hd9RxutccF8ESuWzJu4AB3whTPCrK+r7y3KLoBMw2FTk6rN1KUzEn5OmcB9fR/livJOWFKQ7atc4fD+siboHJQ==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "13.0.5" + } + }, + "HotChocolate.Language.Visitors": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "0hE7CFEeFIcxz6iXVpOHuBZ/Fm8/fWk+d8XIbNKQvhZGqqloRUD3yAMkVGApjL9+psi8R3YHZNPx40v4MKhShg==", + "dependencies": { + "HotChocolate.Language.SyntaxTree": "13.0.5" + } + }, + "HotChocolate.Language.Web": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "xciPVsy+EaGnYCgLnSq0EnoyjPDfPglsw05B5TceeWw8WqRQ2njtOcJatvvHGvp/jZrL7NKWVu0+PudXkThk/Q==", + "dependencies": { + "HotChocolate.Language.Utf8": "13.0.5" + } + }, + "HotChocolate.Subscriptions": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "G/i1OTh0h02SAYjD2jFqof0HoXbpRDZOeryL5xCDbXLGy+exJv84El6VM567revoH8m8tva6X0VCJ0n5vmIQRQ==", + "dependencies": { + "HotChocolate.Abstractions": "13.0.5", + "HotChocolate.Execution.Abstractions": "13.0.5" + } + }, + "HotChocolate.Subscriptions.InMemory": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "+kcay6CpsBM5wpdv/ZwFfbULpxxirEzn/p5qvSpiuzwRt/ZdkAt1clBOUWKOZRmGZy8becNsLVv2E6ExJo7Y9g==", + "dependencies": { + "HotChocolate.Execution.Abstractions": "13.0.5", + "HotChocolate.Subscriptions": "13.0.5", + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.4" + } + }, + "HotChocolate.Transport.Sockets": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "z0qkG4ilcGsictatV7FcM7ox7uSEZRjKwTJaMRm1V7k6PTytJq+wGyIvN4MoEV29lM+V9tbWvxrHkZtJcs7WRw==", + "dependencies": { + "System.IO.Pipelines": "4.7.0" + } + }, + "HotChocolate.Types": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "Y9q4uSy8vz7avxJOcmOep89I2l/MjDk5sftcpnLn9MCg5bK+gavKFQ6SbantWZ/nRLybOKx5Z+/S+DwPzLkKcA==", + "dependencies": { + "HotChocolate.Abstractions": "13.0.5", + "HotChocolate.Utilities": "13.0.5", + "HotChocolate.Utilities.Introspection": "13.0.5", + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.4", + "Microsoft.Extensions.ObjectPool": "3.1.4", + "System.ComponentModel.Annotations": "4.7.0", + "System.Text.Json": "6.0.0" + } + }, + "HotChocolate.Types.CursorPagination": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "Y2srrZLg6wK3yp/VV7l+zLpw5mhNdbBbhmLv/0pZACxVD0PEYTStEgxZKFj+nwPXSr1mKsa1892yFIx/yY1SbQ==", + "dependencies": { + "HotChocolate.Execution": "13.0.5", + "HotChocolate.Types": "13.0.5" + } + }, + "HotChocolate.Types.Mutations": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "h99LjKUXSSHOIoewzhgQJLGLMC54wTBZfsIfWU1zjanu4cZfGO56WdZMATCNkXy8WRZWISijUYP+pFUSFq3RfA==", + "dependencies": { + "HotChocolate.Execution": "13.0.5", + "HotChocolate.Types": "13.0.5" + } + }, + "HotChocolate.Types.OffsetPagination": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "ktqsgEChegQJCglXGngczdf50RJT0dtw2Onx+mT3w9fP1HRffde6DQ84OQ9wNXGYXki0svvOE3ua11d5h5EODQ==", + "dependencies": { + "HotChocolate.Execution": "13.0.5", + "HotChocolate.Types": "13.0.5" + } + }, + "HotChocolate.Types.Scalars.Upload": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "WDvbgVde9NmV8y8c58tzE1m0L98rr+SlzF7B6x3HmKNdggPI/44k6N9vu7Iwh/Ly1WG7m1I/zg5D3lnvT7dGag==", + "dependencies": { + "HotChocolate.Types": "13.0.5" + } + }, + "HotChocolate.Utilities": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "sL5N4/rFsaP0/+xNgi+jUzsGe3X160AybNC+EpbUkeIBqGZKVbPgCUtFvxa1cZVBvWdq8CAm2HiaIXjctlTC/g==", + "dependencies": { + "Microsoft.Bcl.AsyncInterfaces": "1.1.0", + "System.Memory": "4.5.4", + "System.Threading.Tasks.Extensions": "4.5.4" + } + }, + "HotChocolate.Utilities.Introspection": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "LUbNyyn3yz+j2npPFFmPmKLSdwJGGOFViaPcYQDGJgXHB1VRf1ad0VuuWGDUn83LQoFzMFrWHwplwqLQZu+33w==", + "dependencies": { + "HotChocolate.Language": "13.0.5", + "System.Text.Json": "4.7.0" + } + }, + "HotChocolate.Validation": { + "type": "Transitive", + "resolved": "13.0.5", + "contentHash": "M/ahERRiu+kj2hBoTqpXlcvxdMrsNFdhyM5OlitJwnca6cWpwpHxaDGYRrrPmOqlVsqW2Yo2xBbxzuw/R8z/oA==", + "dependencies": { + "HotChocolate.Types": "13.0.5", + "Microsoft.Extensions.DependencyInjection.Abstractions": "3.1.4", + "Microsoft.Extensions.Options": "3.1.4" + } + }, "HtmlSanitizer": { "type": "Transitive", "resolved": "8.0.645", @@ -99,8 +406,8 @@ }, "Kentico.Xperience.Core": { "type": "Transitive", - "resolved": "26.2.0", - "contentHash": "wrTRTFsqJsl8jHQbJ8NTDNYEDvD0/niZZDn5yt+ToatpWkEA0ewQJUnZSehExyRjFx4AIxzNQBJd6LSsIYFzog==", + "resolved": "26.4.0", + "contentHash": "79yRlln/4J5naXzGmY2E9v7ujgBbPPUtq52maBeWU3WUPIaJ20ai8dOQuaTR7KKWpeQYpa20goY3QOoe+2Ivtg==", "dependencies": { "AngleSharp": "0.17.1", "Azure.Identity": "1.8.2", @@ -533,6 +840,14 @@ "System.Linq": "4.1.0" } }, + "Microsoft.Extensions.DiagnosticAdapter": { + "type": "Transitive", + "resolved": "3.1.4", + "contentHash": "JiYsxaO6FnH477kGwQLZoj1+XFgwA1ZOjnmypgGhxeLdsmL4o29dP1vfOwmwsU9+nJ5ugtqq4Xs4DcVAGSLt3w==", + "dependencies": { + "System.Diagnostics.DiagnosticSource": "4.7.1" + } + }, "Microsoft.Extensions.FileProviders.Abstractions": { "type": "Transitive", "resolved": "6.0.0", @@ -597,8 +912,8 @@ }, "Microsoft.Extensions.ObjectPool": { "type": "Transitive", - "resolved": "2.2.0", - "contentHash": "gA8H7uQOnM5gb+L0uTNjViHYr+hRDqCdfugheGo/MxQnuHzmhhzCBTIPm19qL1z1Xe0NEMabfcOBGv9QghlZ8g==" + "resolved": "3.1.4", + "contentHash": "ZmgpBTnKA2OSJjtL5A1tNSWAQn8I0ELJMW+oKMZVmVHhjG8IyqlhqkfXT9jxgPp8ddCt4t4oXsKn1HAz+sJO1A==" }, "Microsoft.Extensions.Options": { "type": "Transitive", @@ -949,6 +1264,33 @@ "resolved": "4.3.0", "contentHash": "VB5cn/7OzUfzdnC8tqAIMQciVLiq2epm2NrAm1E9OjNRyG4lVhfR61SMcLizejzQP8R8Uf/0l5qOIbUEi+RdEg==" }, + "SkiaSharp": { + "type": "Transitive", + "resolved": "2.88.3", + "contentHash": "GG8X3EdfwyBfwjl639UIiOVOKEdeoqDgYrz0P1MUCnefXt9cofN+AK8YB/v1+5cLMr03ieWCQdDmPqnFIzSxZw==", + "dependencies": { + "SkiaSharp.NativeAssets.Win32": "2.88.3", + "SkiaSharp.NativeAssets.macOS": "2.88.3" + } + }, + "SkiaSharp.NativeAssets.Linux.NoDependencies": { + "type": "Transitive", + "resolved": "2.88.3", + "contentHash": "jBDBOw1Xwqi+1fRRDLNhBwiREvYMDM1N+A2FvjJ7F1Bg37PFrQIKOfYpf7RKD6vvMzS2oTvSQMC7RN1rfKbMrg==", + "dependencies": { + "SkiaSharp": "2.88.3" + } + }, + "SkiaSharp.NativeAssets.macOS": { + "type": "Transitive", + "resolved": "2.88.3", + "contentHash": "CEbWAXMGFkPV3S1snBKK7jEG3+xud/9kmSAhu0BEUKKtlMdxx+Qal0U9bntQREM9QpqP5xLWZooodi8IlV8MEg==" + }, + "SkiaSharp.NativeAssets.Win32": { + "type": "Transitive", + "resolved": "2.88.3", + "contentHash": "MU4ASL8VAbTv5vSw1PoiWjjjpjtGhWtFYuJnrN4sNHFCePb2ohQij9JhSdqLLxk7RpRtWPdV93fbA53Pt+J0yw==" + }, "System.AppContext": { "type": "Transitive", "resolved": "4.3.0", @@ -1004,8 +1346,8 @@ }, "System.ComponentModel.Annotations": { "type": "Transitive", - "resolved": "4.5.0", - "contentHash": "UxYQ3FGUOtzJ7LfSdnYSFd7+oEv6M8NgUatatIN2HxNtDdlcvFAf+VIq4Of9cDMJEJC0aSRv/x898RYhB4Yppg==" + "resolved": "4.7.0", + "contentHash": "0YFqjhp/mYkDGpU0Ye1GjE53HMp9UVfGN7seGpAMttAC0C40v5gw598jCgpbBLMmCo0E5YRLBv5Z2doypO49ZQ==" }, "System.Configuration.ConfigurationManager": { "type": "Transitive", @@ -1226,6 +1568,16 @@ "System.Runtime": "4.3.0" } }, + "System.IO.Hashing": { + "type": "Transitive", + "resolved": "6.0.0", + "contentHash": "Rfm2jYCaUeGysFEZjDe7j1R4x6Z6BzumS/vUT5a1AA/AWJuGX71PoGB0RmpyX3VmrGqVnAwtfMn39OHR8Y/5+g==" + }, + "System.IO.Pipelines": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "S0L7oyWyQdVzD+5xIvcC8h44Vc+FY+qXDCLRh2+YsuBDORNphcxNX+tXR6ByLMjQ/7jDaXxsYBF6qbAr7ZIaFw==" + }, "System.Linq": { "type": "Transitive", "resolved": "4.3.0", @@ -1731,8 +2083,12 @@ }, "System.Text.Json": { "type": "Transitive", - "resolved": "4.7.2", - "contentHash": "TcMd95wcrubm9nHvJEQs70rC0H/8omiSGGpU4FQ/ZA1URIqD4pjmFJh2Mfv1yH1eHgJDWTi2hMDXwTET+zOOyg==" + "resolved": "6.0.0", + "contentHash": "zaJsHfESQvJ11vbXnNlkrR46IaMULk/gHxYsJphzSF+07kTjPHv+Oc14w6QEOfo3Q4hqLJgStUaYB9DBl0TmWg==", + "dependencies": { + "System.Runtime.CompilerServices.Unsafe": "6.0.0", + "System.Text.Encodings.Web": "6.0.0" + } }, "System.Text.RegularExpressions": { "type": "Transitive", @@ -1751,6 +2107,11 @@ "System.Threading.Tasks": "4.3.0" } }, + "System.Threading.Channels": { + "type": "Transitive", + "resolved": "4.7.0", + "contentHash": "gdOOXBhtt2UpTxYJm1DRmoqNfYg5ypvhzhVt0vxKhzxXFjS81r8yIOSFsJYLRa1Jc14GBAqCnjxJstO3zBN7gg==" + }, "System.Threading.Tasks": { "type": "Transitive", "resolved": "4.3.0", diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.css new file mode 100644 index 0000000..0652946 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.css @@ -0,0 +1,333 @@ +.color-picker-editor div.inline-editor-btn-group { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; + z-index: 10000; + position: absolute; + right: 1em; + top: 1em; + background-color: #262524; + display: table; + box-sizing: border-box; + border: 1px solid #383838; + border-radius: 2px; + opacity: 0.8; + -webkit-transition: background-color .2s ease-in; + transition: background-color .2s ease-in; +} + +.color-picker-editor div.inline-editor-btn-group:hover { + opacity: 1.0; +} + +.color-picker-editor div.inline-editor-btn-group ul { + margin: 0; + padding: 0; +} + +.color-picker-editor div.inline-editor-btn-group li { + float: left; + list-style: none; + margin: 0; + padding: 0; +} + +.color-picker-editor div.inline-editor-btn-group li:first-child button { + border-bottom-left-radius: 2px; + border-top-left-radius: 2px; +} + +.color-picker-editor div.inline-editor-btn-group li:last-child button { + border-bottom-right-radius: 2px; + border-top-right-radius: 2px; +} + +.color-picker-editor div.inline-editor-btn-group li button { + box-sizing: border-box; + cursor: pointer; + display: block; + font-size: 24px; + line-height: 1.33; + margin: 0; + padding: 8px; + text-decoration: none; + color: #fff; + background-color: #262524; + height: 50px; + min-width: 50px; + border: 0; + border-right: 1px solid rgba(255, 255, 255, 0.1); + -webkit-transition: background-color .2s ease-in; + transition: background-color .2s ease-in; +} + +.color-picker-editor div.inline-editor-btn-group li button:hover { + background-color: #383838; +} + +.color-picker-editor .color-btn { + padding: 10px 0; + display: inline-block; + width: 35px; + height: 35px; +} +.image-uploader-editor .uploader-container { + text-align: center; + position: absolute; + width: 100%; + height: 100%; +} + +.image-uploader-editor .uploader-empty-container { + text-align: center; +} + +.image-uploader-editor .uploader-empty-container.absolute { + position: absolute; + width: 100%; + height: 100%; +} + + .image-uploader-editor .uploader-empty-container .uploader { + min-height: 200px; + color: #a3a2a2; + } + + .image-uploader-editor .uploader-empty-container .uploader .dz-clickable, + .image-uploader-editor .uploader-empty-container .uploader a { + color: #2081c3; + } + +.image-uploader-editor .uploader, .image-uploader-editor .uploader * { + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.image-uploader-editor .uploader { + width: 100%; + height: 100%; + color: transparent; +} + +.image-uploader-editor .uploader-container .uploader.dz-drag-hover, +.image-uploader-editor .uploader-empty-container .uploader.dz-drag-hover, +.image-uploader-editor .uploader-empty-container .uploader:hover, +.image-uploader-editor .uploader-container .uploader:hover { + width: 100%; + height: 100%; + color: #fff; + margin: auto; +} + +.image-uploader-editor .uploader-container .uploader.dz-drag-hover, +.image-uploader-editor .uploader-empty-container .uploader.dz-drag-hover { + background-color: rgba(155, 155, 155, .17); +} + +.image-uploader-editor .uploader-empty-container .uploader.dz-drag-hover, +.image-uploader-editor .uploader-empty-container .uploader:hover { + color: #a3a2a2; +} + +.image-uploader-editor .uploader .dz-clickable, +.image-uploader-editor .uploader a { + cursor: pointer; + color: transparent; +} + +.image-uploader-editor .uploader.dz-drag-hover .dz-clickable, +.image-uploader-editor .uploader:hover .dz-clickable, +.image-uploader-editor .uploader.dz-drag-hover a, +.image-uploader-editor .uploader:hover a { + color: #2081c3; +} + +.image-uploader-editor .uploader .dz-clickable * { + cursor: default; +} + +.image-uploader-editor .uploader .dz-clickable .dz-message, .image-uploader-editor .uploader .dz-clickable .dz-message * { + cursor: pointer; +} + +.image-uploader-editor .uploader .dz-message { + position: absolute; + width: 230px; + padding: 10px; + font-size: 14px; +} + +.image-uploader-editor .uploader .dz-message.center { + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +} + +.image-uploader-editor .uploader .dz-message.top { + top: 2.5rem; + left: 50%; + -webkit-transform: translate(-50%, 0); + -ms-transform: translate(-50%, 0); + transform: translate(-50%, 0); +} + +.image-uploader-editor .uploader .dz-message.bottom { + top: calc(100% - 1rem); + left: 50%; + -webkit-transform: translate(-50%, -100%); + -ms-transform: translate(-50%, -100%); + transform: translate(-50%, -100%); +} + +.image-uploader-editor .uploader:hover .dz-message, +.image-uploader-editor .uploader.dz-drag-hover .dz-message { + background-color: rgba(155, 155, 155, .75); + -ms-border-radius: 2px; + border-radius: 2px; + z-index: 2; +} + +.image-uploader-editor .uploader-empty-container .uploader .dz-message { + background-color: inherit; +} + +.image-uploader-editor .uploader .dz-message .icon-arrow-up-line { + font-size: 32px; +} + +.image-uploader-editor .uploader .dz-preview { + color: #fff; + position: relative; + display: inline-block; + width: 230px; + padding: 20px; + margin: 2em; + background-color: #403e3d; + -ms-border-radius: 2px; + border-radius: 2px; + z-index: 1; +} + +.image-uploader-editor .uploader .dz-preview .dz-progress { + display: block; + height: 15px; +} + +.image-uploader-editor .uploader .dz-preview .dz-progress .dz-upload { + display: block; + height: 100%; + width: 0; + background: #2ECC40; +} + +.image-uploader-editor .uploader .dz-preview .dz-error-message { + color: #FF4136; + display: none; +} + +.image-uploader-editor .uploader .dz-preview.dz-error .dz-error-message, .image-uploader-editor .uploader .dz-preview.dz-error .dz-error-mark { + display: block; +} + +.image-uploader-editor .uploader .dz-preview.dz-success .dz-success-mark { + display: block; +} + +.image-uploader-editor .uploader .dz-preview .dz-error-mark, .image-uploader-editor .uploader .dz-preview .dz-success-mark { + position: absolute; + display: none; + left: 30px; + top: 30px; + width: 54px; + height: 58px; + left: 50%; + margin-left: -27px; + -ms-opacity: 0.5; + opacity: 0.5; +} +.spinner-editor div.inline-editor-btn-group { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; + right: 1em; + top: 1em; + position: absolute; + z-index: 10000; + background-color: #262524; + border: 1px solid #383838; + border-radius: 2px; + opacity: 0.8; + -webkit-transition: background-color .2s ease-in; + transition: background-color .2s ease-in; +} + +.spinner-editor div.inline-editor-btn-group:hover { + opacity: 1.0; +} + +.spinner-editor div.inline-editor-btn-group ul { + margin: 0; + padding: 0; +} + +.spinner-editor div.inline-editor-btn-group li { + float: left; + list-style: none; + margin: 0; + padding: 0; +} + +.spinner-editor div.inline-editor-btn-group li:first-child button { + border-bottom-left-radius: 2px; + border-top-left-radius: 2px; +} + +.spinner-editor div.inline-editor-btn-group li:last-child button { + border-bottom-right-radius: 2px; + border-top-right-radius: 2px; +} + +.spinner-editor div.inline-editor-btn-group li button { + box-sizing: border-box; + cursor: pointer; + display: block; + font-size: 14px; + line-height: 1.33; + margin: 0; + padding: 15px; + text-decoration: none; + background-color: #262524; + border: 0; + color: #fff; + height: 50px; + min-width: 50px; + -webkit-transition: background-color .2s ease-in; + transition: background-color .2s ease-in; +} + +.spinner-editor div.inline-editor-btn-group li button:hover { + background-color: #383838; +} + +.spinner-editor div.inline-editor-btn-group li button:disabled { + background-color: #000; + color: #fff; + cursor: default; +} + +.spinner-editor div.inline-editor-btn-group li button:focus { + outline: none; +} +.text-editor { + outline: none; + cursor: text; +} + + .text-editor:empty:before { + content: attr(data-placeholder-text); + color: #d6d9d6; + } + + .text-editor:not(:focus):hover { + background-color: rgba(155, 155, 155, 0.17); + } diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.js new file mode 100644 index 0000000..531f159 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.js @@ -0,0 +1,187 @@ +(function () { + window.kentico.pageBuilder.registerInlineEditor("color-picker-editor", { + init: function (options) { + var editor = options.editor; + var buttons = [ + { button: editor.querySelector("#first-color-btn"), cssClass: "first-color" }, + { button: editor.querySelector("#second-color-btn"), cssClass: "second-color" }, + { button: editor.querySelector("#third-color-btn"), cssClass: "third-color" }, + ]; + + var setColor = function (selectedButton) { + for (var i = 0; i < buttons.length; ++i) { + editor.parentElement.classList.remove(buttons[i].cssClass); + buttons[i].button.children[0].classList.remove("icon-cb-check-sign"); + } + editor.parentElement.classList.add(selectedButton.cssClass); + selectedButton.button.children[0].classList.add("icon-cb-check-sign"); + + var event = new CustomEvent("updateProperty", { + detail: { + value: selectedButton.cssClass, + name: options.propertyName + } + }); + editor.dispatchEvent(event); + } + + for (var i = 0; i < buttons.length; ++i) { + if (options.propertyValue === buttons[i].cssClass) { + buttons[i].button.children[0].classList.add("icon-cb-check-sign"); + } + var click = function(index) { setColor(buttons[index]); }.bind(this, i); + buttons[i].button.addEventListener("click", click); + } + } + }); +})(); + +"use strict";function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function __guard__(a,b){return void 0!==a&&null!==a?b(a):void 0}function __guardMethod__(a,b,c){return void 0!==a&&null!==a&&"function"==typeof a[b]?c(a,b):void 0}var _createClass=function(){function a(a,b){for(var c=0;c1?c-1:0),e=1;e=f.length)break;h=f[g++];h.apply(this,d)}}return this}},{key:"off",value:function(a,b){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var c=this._callbacks[a];if(!c)return this;if(1===arguments.length)return delete this._callbacks[a],this;for(var d=0;d=c.length)break;e=c[d++];var f=e;if(/(^| )dz-message($| )/.test(f.className)){a=f,f.className="dz-message";break}}a||(a=b.createElement('
'),this.element.appendChild(a));var g=a.getElementsByTagName("span")[0];return g&&(null!=g.textContent?g.textContent=this.options.dictFallbackMessage:null!=g.innerText&&(g.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(a,b,c,d){var e={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},f=a.width/a.height;null==b&&null==c?(b=e.srcWidth,c=e.srcHeight):null==b?b=c*f:null==c&&(c=b/f),b=Math.min(b,e.srcWidth),c=Math.min(c,e.srcHeight);var g=b/c;if(e.srcWidth>b||e.srcHeight>c)if("crop"===d)f>g?(e.srcHeight=a.height,e.srcWidth=e.srcHeight*g):(e.srcWidth=a.width,e.srcHeight=e.srcWidth/g);else{if("contain"!==d)throw new Error("Unknown resizeMethod '"+d+"'");f>g?c=b/f:b=c*f}return e.srcX=(a.width-e.srcWidth)/2,e.srcY=(a.height-e.srcHeight)/2,e.trgWidth=b,e.trgHeight=c,e},transformFile:function(a,b){return(this.options.resizeWidth||this.options.resizeHeight)&&a.type.match(/image.*/)?this.resizeImage(a,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,b):b(a)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
',drop:function(a){return this.element.classList.remove("dz-drag-hover")},dragstart:function(a){},dragend:function(a){return this.element.classList.remove("dz-drag-hover")},dragenter:function(a){return this.element.classList.add("dz-drag-hover")},dragover:function(a){return this.element.classList.add("dz-drag-hover")},dragleave:function(a){return this.element.classList.remove("dz-drag-hover")},paste:function(a){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var c=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){a.previewElement=b.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement);for(var d=a.previewElement.querySelectorAll("[data-dz-name]"),e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;g.textContent=a.name}for(var h=a.previewElement.querySelectorAll("[data-dz-size]"),i=0,h=h;!(i>=h.length);)g=h[i++],g.innerHTML=this.filesize(a.size);this.options.addRemoveLinks&&(a._removeLink=b.createElement(''+this.options.dictRemoveFile+""),a.previewElement.appendChild(a._removeLink));for(var j=function(d){return d.preventDefault(),d.stopPropagation(),a.status===b.UPLOADING?b.confirm(c.options.dictCancelUploadConfirmation,function(){return c.removeFile(a)}):c.options.dictRemoveFileConfirmation?b.confirm(c.options.dictRemoveFileConfirmation,function(){return c.removeFile(a)}):c.removeFile(a)},k=a.previewElement.querySelectorAll("[data-dz-remove]"),l=0,k=k;;){var m;if(l>=k.length)break;m=k[l++];m.addEventListener("click",j)}}},removedfile:function(a){return null!=a.previewElement&&null!=a.previewElement.parentNode&&a.previewElement.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){if(a.previewElement){a.previewElement.classList.remove("dz-file-preview");for(var c=a.previewElement.querySelectorAll("[data-dz-thumbnail]"),d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];var f=e;f.alt=a.name,f.src=b}return setTimeout(function(){return a.previewElement.classList.add("dz-image-preview")},1)}},error:function(a,b){if(a.previewElement){a.previewElement.classList.add("dz-error"),"String"!=typeof b&&b.error&&(b=b.error);for(var c=a.previewElement.querySelectorAll("[data-dz-errormessage]"),d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];e.textContent=b}}},errormultiple:function(){},processing:function(a){if(a.previewElement&&(a.previewElement.classList.add("dz-processing"),a._removeLink))return a._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(a,b,c){if(a.previewElement)for(var d=a.previewElement.querySelectorAll("[data-dz-uploadprogress]"),e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;"PROGRESS"===g.nodeName?g.value=b:g.style.width=b+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(a){if(a.previewElement)return a.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(a){return this.emit("error",a,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(a){if(a._removeLink&&(a._removeLink.textContent=this.options.dictRemoveFile),a.previewElement)return a.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d=e.length)break;g=e[f++];var h=g;for(var i in h){var j=h[i];a[i]=j}}return a}}]),_createClass(b,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(a){return a.accepted}).map(function(a){return a})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(a){return!a.accepted}).map(function(a){return a})}},{key:"getFilesWithStatus",value:function(a){return this.files.filter(function(b){return b.status===a}).map(function(a){return a})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(b.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(b.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(b.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(a){return a.status===b.UPLOADING||a.status===b.QUEUED}).map(function(a){return a})}},{key:"init",value:function(){var a=this;if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(b.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length){!function b(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null===a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!==a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!==a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.querySelector(a.options.hiddenInputContainer).appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var c=a.hiddenFileInput.files;if(c.length)for(var d=c,e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;a.addFile(g)}return a.emit("addedfiles",c),b()})}()}this.URL=null!==window.URL?window.URL:window.webkitURL;for(var c=this.events,d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];var f=e;this.on(f,this.options[f])}this.on("uploadprogress",function(){return a.updateTotalUploadProgress()}),this.on("removedfile",function(){return a.updateTotalUploadProgress()}),this.on("canceled",function(b){return a.emit("complete",b)}),this.on("complete",function(b){if(0===a.getAddedFiles().length&&0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length)return setTimeout(function(){return a.emit("queuecomplete")},0)});var g=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(b){return a.emit("dragstart",b)},dragenter:function(b){return g(b),a.emit("dragenter",b)},dragover:function(b){var c=void 0;try{c=b.dataTransfer.effectAllowed}catch(a){}return b.dataTransfer.dropEffect="move"===c||"linkMove"===c?"move":"copy",g(b),a.emit("dragover",b)},dragleave:function(b){return a.emit("dragleave",b)},drop:function(b){return g(b),a.drop(b)},dragend:function(b){return a.emit("dragend",b)}}}],this.clickableElements.forEach(function(c){return a.listeners.push({element:c,events:{click:function(d){return(c!==a.element||d.target===a.element||b.elementInside(d.target,a.element.querySelector(".dz-message")))&&a.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,b.instances.splice(b.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var a=void 0,b=0,c=0;if(this.getActiveFiles().length){for(var d=this.getActiveFiles(),e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;b+=g.upload.bytesSent,c+=g.upload.total}a=100*b/c}else a=100;return this.emit("totaluploadprogress",a,c,b)}},{key:"_getParamName",value:function(a){return"function"==typeof this.options.paramName?this.options.paramName(a):this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")}},{key:"_renameFile",value:function(a){return"function"!=typeof this.options.renameFile?a.name:this.options.renameFile(a)}},{key:"getFallbackForm",value:function(){var a=void 0,c=void 0;if(a=this.getExistingFallback())return a;var d='
';this.options.dictFallbackText&&(d+="

"+this.options.dictFallbackText+"

"),d+='
';var e=b.createElement(d);return"FORM"!==this.element.tagName?(c=b.createElement('
'),c.appendChild(e)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=c?c:e}},{key:"getExistingFallback",value:function(){for(var a=["div","form"],b=0;b=b.length)break;d=b[c++];var e=d;if(/(^| )fallback($| )/.test(e.className))return e}}(this.element.getElementsByTagName(d)))return c}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(a){return function(){var b=[];for(var c in a.events){var d=a.events[c];b.push(a.element.addEventListener(c,d,!1))}return b}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(a){return function(){var b=[];for(var c in a.events){var d=a.events[c];b.push(a.element.removeEventListener(c,d,!1))}return b}()})}},{key:"disable",value:function(){var a=this;return this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(b){return a.cancelUpload(b)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(a){var b=0,c="b";if(a>0){for(var d=["tb","gb","mb","kb","b"],e=0;e=Math.pow(this.options.filesizeBase,4-e)/10){b=a/Math.pow(this.options.filesizeBase,4-e),c=f;break}}b=Math.round(10*b)/10}return""+b+" "+this.options.dictFileSizeUnits[c]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(a){if(a.dataTransfer){this.emit("drop",a);var b=a.dataTransfer.files;if(this.emit("addedfiles",b),b.length){var c=a.dataTransfer.items;c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)}}}},{key:"paste",value:function(a){if(null!=__guard__(null!=a?a.clipboardData:void 0,function(a){return a.items})){this.emit("paste",a);var b=a.clipboardData.items;return b.length?this._addFilesFromItems(b):void 0}}},{key:"handleFiles",value:function(a){for(var b=a,c=0,b=b;;){var d;if(c>=b.length)break;d=b[c++];var e=d;this.addFile(e)}}},{key:"_addFilesFromItems",value:function(a){var b=this;return function(){for(var c=[],d=a,e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g,h=f;null!=h.webkitGetAsEntry&&(g=h.webkitGetAsEntry())?g.isFile?c.push(b.addFile(h.getAsFile())):g.isDirectory?c.push(b._addFilesFromDirectory(g,g.name)):c.push(void 0):null!=h.getAsFile&&(null==h.kind||"file"===h.kind)?c.push(b.addFile(h.getAsFile())):c.push(void 0)}return c}()}},{key:"_addFilesFromDirectory",value:function(a,b){var c=this,d=a.createReader(),e=function(a){return __guardMethod__(console,"log",function(b){return b.log(a)})};return function a(){return d.readEntries(function(d){if(d.length>0){for(var e=d,f=0,e=e;;){var g;if(f>=e.length)break;g=e[f++];var h=g;h.isFile?h.file(function(a){if(!c.options.ignoreHiddenFiles||"."!==a.name.substring(0,1))return a.fullPath=b+"/"+a.name,c.addFile(a)}):h.isDirectory&&c._addFilesFromDirectory(h,b+"/"+h.name)}a()}return null},e)}()}},{key:"accept",value:function(a,c){return a.size>1024*this.options.maxFilesize*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):b.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,c):c(this.options.dictInvalidFileType)}},{key:"addFile",value:function(a){var c=this;return a.upload={uuid:b.uuidv4(),progress:0,total:a.size,bytesSent:0,filename:this._renameFile(a),chunked:this.options.chunking&&(this.options.forceChunking||a.size>this.options.chunkSize),totalChunkCount:Math.ceil(a.size/this.options.chunkSize)},this.files.push(a),a.status=b.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return b?(a.accepted=!1,c._errorProcessing([a],b)):(a.accepted=!0,c.options.autoQueue&&c.enqueueFile(a)),c._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(a){for(var b=a,c=0,b=b;;){var d;if(c>=b.length)break;d=b[c++];var e=d;this.enqueueFile(e)}return null}},{key:"enqueueFile",value:function(a){var c=this;if(a.status!==b.ADDED||!0!==a.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(a.status=b.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return c.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(a){var b=this;if(this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(a),setTimeout(function(){return b._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var a=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var b=this._thumbnailQueue.shift();return this.createThumbnail(b,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(c){return a.emit("thumbnail",b,c),a._processingThumbnail=!1,a._processThumbnailQueue()})}}},{key:"removeFile",value:function(a){if(a.status===b.UPLOADING&&this.cancelUpload(a),this.files=without(this.files,a),this.emit("removedfile",a),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(a){null==a&&(a=!1);for(var c=this.files.slice(),d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];var f=e;(f.status!==b.UPLOADING||a)&&this.removeFile(f)}return null}},{key:"resizeImage",value:function(a,c,d,e,f){var g=this;return this.createThumbnail(a,c,d,e,!1,function(c,d){if(null==d)return f(a);var e=g.options.resizeMimeType;null==e&&(e=a.type);var h=d.toDataURL(e,g.options.resizeQuality);return"image/jpeg"!==e&&"image/jpg"!==e||(h=ExifRestore.restore(a.dataURL,h)),f(b.dataURItoBlob(h))})}},{key:"createThumbnail",value:function(a,b,c,d,e,f){var g=this,h=new FileReader;return h.onload=function(){return a.dataURL=h.result,"image/svg+xml"===a.type?void(null!=f&&f(h.result)):g.createThumbnailFromUrl(a,b,c,d,e,f)},h.readAsDataURL(a)}},{key:"createThumbnailFromUrl",value:function(a,b,c,d,e,f,g){var h=this,i=document.createElement("img");return g&&(i.crossOrigin=g),i.onload=function(){var g=function(a){return a(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&e&&(g=function(a){return EXIF.getData(i,function(){return a(EXIF.getTag(this,"Orientation"))})}),g(function(e){a.width=i.width,a.height=i.height;var g=h.options.resize.call(h,a,b,c,d),j=document.createElement("canvas"),k=j.getContext("2d");switch(j.width=g.trgWidth,j.height=g.trgHeight,e>4&&(j.width=g.trgHeight,j.height=g.trgWidth),e){case 2:k.translate(j.width,0),k.scale(-1,1);break;case 3:k.translate(j.width,j.height),k.rotate(Math.PI);break;case 4:k.translate(0,j.height),k.scale(1,-1);break;case 5:k.rotate(.5*Math.PI),k.scale(1,-1);break;case 6:k.rotate(.5*Math.PI),k.translate(0,-j.height);break;case 7:k.rotate(.5*Math.PI),k.translate(j.width,-j.height),k.scale(-1,1);break;case 8:k.rotate(-.5*Math.PI),k.translate(-j.width,0)}drawImageIOSFix(k,i,null!=g.srcX?g.srcX:0,null!=g.srcY?g.srcY:0,g.srcWidth,g.srcHeight,null!=g.trgX?g.trgX:0,null!=g.trgY?g.trgY:0,g.trgWidth,g.trgHeight);var l=j.toDataURL("image/png");if(null!=f)return f(l,j)})},null!=f&&(i.onerror=f),i.src=a.dataURL}},{key:"processQueue",value:function(){var a=this.options.parallelUploads,b=this.getUploadingFiles().length,c=b;if(!(b>=a)){var d=this.getQueuedFiles();if(d.length>0){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,a-b));for(;c=c.length)break;e=c[d++];var f=e;f.processing=!0,f.status=b.UPLOADING,this.emit("processing",f)}return this.options.uploadMultiple&&this.emit("processingmultiple",a),this.uploadFiles(a)}},{key:"_getFilesWithXhr",value:function(a){return this.files.filter(function(b){return b.xhr===a}).map(function(a){return a})}},{key:"cancelUpload",value:function(a){if(a.status===b.UPLOADING){for(var c=this._getFilesWithXhr(a.xhr),d=c,e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];f.status=b.CANCELED}void 0!==a.xhr&&a.xhr.abort();for(var g=c,h=0,g=g;;){var i;if(h>=g.length)break;i=g[h++];var j=i;this.emit("canceled",j)}this.options.uploadMultiple&&this.emit("canceledmultiple",c)}else a.status!==b.ADDED&&a.status!==b.QUEUED||(a.status=b.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(a){if("function"==typeof a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d=e.upload.totalChunkCount)){g++;var h=d*c.options.chunkSize,i=Math.min(h+c.options.chunkSize,e.size),j={name:c._getParamName(0),data:f.webkitSlice?f.webkitSlice(h,i):f.slice(h,i),filename:e.upload.filename,chunkIndex:d};e.upload.chunks[d]={file:e,index:d,dataBlock:j,status:b.UPLOADING,progress:0,retries:0},c._uploadData(a,[j])}};if(e.upload.finishedChunkUpload=function(d){var f=!0;d.status=b.SUCCESS,d.dataBlock=null;for(var g=0;g=f.length)break;h=f[g++];h.xhr=e}a[0].upload.chunked&&(a[0].upload.chunks[c[0].chunkIndex].xhr=e);var i=this.resolveOption(this.options.method,a),j=this.resolveOption(this.options.url,a);e.open(i,j,!0),e.timeout=this.resolveOption(this.options.timeout,a),e.withCredentials=!!this.options.withCredentials,e.onload=function(b){d._finishedUploading(a,e,b)},e.onerror=function(){d._handleUploadError(a,e)},(null!=e.upload?e.upload:e).onprogress=function(b){return d._updateFilesUploadProgress(a,e,b)};var k={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&b.extend(k,this.options.headers);for(var l in k){var m=k[l];m&&e.setRequestHeader(l,m)}var n=new FormData;if(this.options.params){var o=this.options.params;"function"==typeof o&&(o=o.call(this,a,e,a[0].upload.chunked?this._getChunk(a[0],e):null));for(var p in o){var q=o[p];n.append(p,q)}}for(var r=a,s=0,r=r;;){var t;if(s>=r.length)break;t=r[s++];var u=t;this.emit("sending",u,e,n)}this.options.uploadMultiple&&this.emit("sendingmultiple",a,e,n),this._addFormElementData(n);for(var v=0;v=b.length)break;d=b[c++];var e=d,f=e.getAttribute("name"),g=e.getAttribute("type");if(g&&(g=g.toLowerCase()),void 0!==f&&null!==f)if("SELECT"===e.tagName&&e.hasAttribute("multiple"))for(var h=e.options,i=0,h=h;;){var j;if(i>=h.length)break;j=h[i++];var k=j;k.selected&&a.append(f,k.value)}else(!g||"checkbox"!==g&&"radio"!==g||e.checked)&&a.append(f,e.value)}}},{key:"_updateFilesUploadProgress",value:function(a,b,c){var d=void 0;if(void 0!==c){if(d=100*c.loaded/c.total,a[0].upload.chunked){var e=a[0],f=this._getChunk(e,b);f.progress=d,f.total=c.total,f.bytesSent=c.loaded;e.upload.progress=0,e.upload.total=0,e.upload.bytesSent=0;for(var g=0;g=h.length)break;j=h[i++];var k=j;k.upload.progress=d,k.upload.total=c.total,k.upload.bytesSent=c.loaded}for(var l=a,m=0,l=l;;){var n;if(m>=l.length)break;n=l[m++];var o=n;this.emit("uploadprogress",o,o.upload.progress,o.upload.bytesSent)}}else{var p=!0;d=100;for(var q=a,r=0,q=q;;){var s;if(r>=q.length)break;s=q[r++];var t=s;100===t.upload.progress&&t.upload.bytesSent===t.upload.total||(p=!1),t.upload.progress=d,t.upload.bytesSent=t.upload.total}if(p)return;for(var u=a,v=0,u=u;;){var w;if(v>=u.length)break;w=u[v++];var x=w;this.emit("uploadprogress",x,d,x.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(a,c,d){var e=void 0;if(a[0].status!==b.CANCELED&&4===c.readyState){if("arraybuffer"!==c.responseType&&"blob"!==c.responseType&&(e=c.responseText,c.getResponseHeader("content-type")&&~c.getResponseHeader("content-type").indexOf("application/json")))try{e=JSON.parse(e)}catch(a){d=a,e="Invalid JSON response from server."}this._updateFilesUploadProgress(a),200<=c.status&&c.status<300?a[0].upload.chunked?a[0].upload.finishedChunkUpload(this._getChunk(a[0],c)):this._finished(a,e,d):this._handleUploadError(a,c,e)}}},{key:"_handleUploadError",value:function(a,c,d){if(a[0].status!==b.CANCELED){if(a[0].upload.chunked&&this.options.retryChunks){var e=this._getChunk(a[0],c);if(e.retries++=f.length)break;f[g++];this._errorProcessing(a,d||this.options.dictResponseError.replace("{{statusCode}}",c.status),c)}}}},{key:"submitRequest",value:function(a,b,c){a.send(b)}},{key:"_finished",value:function(a,c,d){for(var e=a,f=0,e=e;;){var g;if(f>=e.length)break;g=e[f++];var h=g;h.status=b.SUCCESS,this.emit("success",h,c,d),this.emit("complete",h)}if(this.options.uploadMultiple&&(this.emit("successmultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(a,c,d){for(var e=a,f=0,e=e;;){var g;if(f>=e.length)break;g=e[f++];var h=g;h.status=b.ERROR,this.emit("error",h,c,d),this.emit("complete",h)}if(this.options.uploadMultiple&&(this.emit("errormultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)})}}]),b}(Emitter);Dropzone.initClass(),Dropzone.version="5.3.1",Dropzone.options={},Dropzone.optionsForElement=function(a){return a.getAttribute("id")?Dropzone.options[camelize(a.getAttribute("id"))]:void 0},Dropzone.instances=[],Dropzone.forElement=function(a){if("string"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return a.dropzone},Dropzone.autoDiscover=!0,Dropzone.discover=function(){var a=void 0;if(document.querySelectorAll)a=document.querySelectorAll(".dropzone");else{a=[];var b=function(b){return function(){for(var c=[],d=b,e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;/(^| )dropzone($| )/.test(g.className)?c.push(a.push(g)):c.push(void 0)}return c}()};b(document.getElementsByTagName("div")),b(document.getElementsByTagName("form"))}return function(){for(var b=[],c=a,d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];var f=e;!1!==Dropzone.optionsForElement(f)?b.push(new Dropzone(f)):b.push(void 0)}return b}()},Dropzone.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],Dropzone.isBrowserSupported=function(){var a=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var b=Dropzone.blacklistedBrowsers,c=0,b=b;;){var d;if(c>=b.length)break;d=b[c++];var e=d;e.test(navigator.userAgent)&&(a=!1)}else a=!1;else a=!1;return a},Dropzone.dataURItoBlob=function(a){for(var b=atob(a.split(",")[1]),c=a.split(",")[0].split(":")[1].split(";")[0],d=new ArrayBuffer(b.length),e=new Uint8Array(d),f=0,g=b.length,h=0<=g;h?f<=g:f>=g;h?f++:f--)e[f]=b.charCodeAt(f);return new Blob([d],{type:c})};var without=function(a,b){return a.filter(function(a){return a!==b}).map(function(a){return a})},camelize=function(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})};Dropzone.createElement=function(a){var b=document.createElement("div");return b.innerHTML=a,b.childNodes[0]},Dropzone.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},Dropzone.getElement=function(a,b){var c=void 0;if("string"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.");return c},Dropzone.getElements=function(a,b){var c=void 0,d=void 0;if(a instanceof Array){d=[];try{for(var e=a,f=0,e=e;!(f>=e.length);)c=e[f++],d.push(this.getElement(c,b))}catch(a){d=null}}else if("string"==typeof a){d=[];for(var g=document.querySelectorAll(a),h=0,g=g;!(h>=g.length);)c=g[h++],d.push(c)}else null!=a.nodeType&&(d=[a]);if(null==d||!d.length)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return d},Dropzone.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},Dropzone.isValidFile=function(a,b){if(!b)return!0;b=b.split(",");for(var c=a.type,d=c.replace(/\/.*$/,""),e=b,f=0,e=e;;){var g;if(f>=e.length)break;g=e[f++];var h=g;if(h=h.trim(),"."===h.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(h.toLowerCase(),a.name.length-h.length))return!0}else if(/\/\*$/.test(h)){if(d===h.replace(/\/.*$/,""))return!0}else if(c===h)return!0}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(a){return this.each(function(){return new Dropzone(this,a)})}),"undefined"!=typeof module&&null!==module?module.exports=Dropzone:window.Dropzone=Dropzone,Dropzone.ADDED="added",Dropzone.QUEUED="queued",Dropzone.ACCEPTED=Dropzone.QUEUED,Dropzone.UPLOADING="uploading",Dropzone.PROCESSING=Dropzone.UPLOADING,Dropzone.CANCELED="canceled",Dropzone.ERROR="error",Dropzone.SUCCESS="success";var detectVerticalSquash=function(a){var b=(a.naturalWidth,a.naturalHeight),c=document.createElement("canvas");c.width=1,c.height=b;var d=c.getContext("2d");d.drawImage(a,0,0);for(var e=d.getImageData(1,0,1,b),f=e.data,g=0,h=b,i=b;i>g;){0===f[4*(i-1)+3]?h=i:g=i,i=h+g>>1}var j=i/b;return 0===j?1:j},drawImageIOSFix=function(a,b,c,d,e,f,g,h,i,j){var k=detectVerticalSquash(b);return a.drawImage(b,c,d,e,f,g,h,i,j/k)},ExifRestore=function(){function a(){_classCallCheck(this,a)}return _createClass(a,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(a){for(var b="",c=void 0,d=void 0,e="",f=void 0,g=void 0,h=void 0,i="",j=0;;)if(c=a[j++],d=a[j++],e=a[j++],f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,isNaN(d)?h=i=64:isNaN(e)&&(i=64),b=b+this.KEY_STR.charAt(f)+this.KEY_STR.charAt(g)+this.KEY_STR.charAt(h)+this.KEY_STR.charAt(i),c=d=e="",f=g=h=i="",!(ja.length)break}return c}},{key:"decode64",value:function(a){var b=void 0,c=void 0,d="",e=void 0,f=void 0,g=void 0,h="",i=0,j=[],k=/[^A-Za-z0-9\+\/\=]/g;for(k.exec(a)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");;)if(e=this.KEY_STR.indexOf(a.charAt(i++)),f=this.KEY_STR.indexOf(a.charAt(i++)),g=this.KEY_STR.indexOf(a.charAt(i++)),h=this.KEY_STR.indexOf(a.charAt(i++)),b=e<<2|f>>4,c=(15&f)<<4|g>>2,d=(3&g)<<6|h,j.push(b),64!==g&&j.push(c),64!==h&&j.push(d),b=c=d="",e=f=g=h="",!(i 0) { + var newFile = selection.items[0]; + if (options.propertyValue && options.propertyValue.length && newFile.fileGuid === options.propertyValue[0].fileGuid) { + return { + closeDialog: true + }; + } + + var event = new CustomEvent("updateProperty", + { + detail: { + value: [{ fileGuid: newFile.fileGuid }], + name: options.propertyName + } + }); + + editor.dispatchEvent(event); + } + + return { + closeDialog: true + }; + } + }; + window.kentico.modalDialog.contentSelector.open(dialogOptions); + }); + } + + var dropZone = new Dropzone(zone, + { + acceptedFiles: ".gif,.png,.jpg,.jpeg", + maxFiles: 1, + url: editor.getAttribute("data-url"), + createImageThumbnails: false, + clickable: clickable, + dictInvalidFileType: options.localizationService.getString( + "You can't upload files of this type.") + }); + + dropZone.on("success", + function (e) { + var content = JSON.parse(e.xhr.response); + + var event = new CustomEvent("updateProperty", + { + detail: { + value: isMediaFile ? [{ fileGuid: content.guid }] : content.guid, + name: options.propertyName + } + }); + + editor.dispatchEvent(event); + }); + }, + + destroy: function (options) { + var dropZone = options.editor.querySelector(".uploader").dropzone; + if (dropZone) { + dropZone.destroy(); + } + } + }); +})(); + +(function () { + window.kentico.pageBuilder.registerInlineEditor("spinner-editor", { + init: function (options) { + var editor = options.editor; + editor.querySelector("#value-placeholder").innerText = options.propertyValue; + + var minusButton = editor.querySelector("#minus-btn"); + if (options.propertyValue < 2) { + minusButton.disabled = true; + } else { + minusButton.addEventListener("click", function () { + var event = new CustomEvent("updateProperty", { + detail: { + value: options.propertyValue - 1, + name: options.propertyName + } + }); + editor.dispatchEvent(event); + }); + } + + editor.querySelector("#plus-btn").addEventListener("click", function () { + var event = new CustomEvent("updateProperty", { + detail: { + value: options.propertyValue + 1, + name: options.propertyName + } + }); + editor.dispatchEvent(event); + }); + } + }); +})(); + +(function () { + window.kentico.pageBuilder.registerInlineEditor("text-editor", { + init: function (options) { + var editor = options.editor; + + editor.addEventListener("input", function () { + if (!this.textContent) { + // Clear the element when text content is empty because Firefox always + // keeps a
element in the contenteditable even when it's empty + // which prevents the css placeholder text from appearing. + this.innerHTML = ""; + } + + var event = new CustomEvent("updateProperty", { + detail: { + name: options.propertyName, + value: this.textContent, + refreshMarkup: false + } + }); + + editor.dispatchEvent(event); + }); + }, + }); +})(); diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.min.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.min.css new file mode 100644 index 0000000..f2bfee1 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.min.css @@ -0,0 +1 @@ +.color-picker-editor div.inline-editor-btn-group{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;z-index:10000;position:absolute;right:1em;top:1em;background-color:#262524;display:table;box-sizing:border-box;border:1px solid #383838;border-radius:2px;opacity:.8;-webkit-transition:background-color .2s ease-in;transition:background-color .2s ease-in}.color-picker-editor div.inline-editor-btn-group:hover{opacity:1}.color-picker-editor div.inline-editor-btn-group ul{margin:0;padding:0}.color-picker-editor div.inline-editor-btn-group li{float:left;list-style:none;margin:0;padding:0}.color-picker-editor div.inline-editor-btn-group li:first-child button{border-bottom-left-radius:2px;border-top-left-radius:2px}.color-picker-editor div.inline-editor-btn-group li:last-child button{border-bottom-right-radius:2px;border-top-right-radius:2px}.color-picker-editor div.inline-editor-btn-group li button{box-sizing:border-box;cursor:pointer;display:block;font-size:24px;line-height:1.33;margin:0;padding:8px;text-decoration:none;color:#fff;background-color:#262524;height:50px;min-width:50px;border:0;border-right:1px solid rgba(255,255,255,.1);-webkit-transition:background-color .2s ease-in;transition:background-color .2s ease-in}.color-picker-editor div.inline-editor-btn-group li button:hover{background-color:#383838}.color-picker-editor .color-btn{padding:10px 0;display:inline-block;width:35px;height:35px}.image-uploader-editor .uploader-container{text-align:center;position:absolute;width:100%;height:100%}.image-uploader-editor .uploader-empty-container{text-align:center}.image-uploader-editor .uploader-empty-container.absolute{position:absolute;width:100%;height:100%}.image-uploader-editor .uploader-empty-container .uploader{min-height:200px;color:#a3a2a2}.image-uploader-editor .uploader-empty-container .uploader .dz-clickable,.image-uploader-editor .uploader-empty-container .uploader a{color:#2081c3}.image-uploader-editor .uploader,.image-uploader-editor .uploader *{-moz-box-sizing:border-box;box-sizing:border-box}.image-uploader-editor .uploader{width:100%;height:100%;color:transparent}.image-uploader-editor .uploader-container .uploader.dz-drag-hover,.image-uploader-editor .uploader-container .uploader:hover,.image-uploader-editor .uploader-empty-container .uploader.dz-drag-hover,.image-uploader-editor .uploader-empty-container .uploader:hover{width:100%;height:100%;color:#fff;margin:auto}.image-uploader-editor .uploader-container .uploader.dz-drag-hover,.image-uploader-editor .uploader-empty-container .uploader.dz-drag-hover{background-color:rgba(155,155,155,.17)}.image-uploader-editor .uploader-empty-container .uploader.dz-drag-hover,.image-uploader-editor .uploader-empty-container .uploader:hover{color:#a3a2a2}.image-uploader-editor .uploader .dz-clickable,.image-uploader-editor .uploader a{cursor:pointer;color:transparent}.image-uploader-editor .uploader.dz-drag-hover .dz-clickable,.image-uploader-editor .uploader.dz-drag-hover a,.image-uploader-editor .uploader:hover .dz-clickable,.image-uploader-editor .uploader:hover a{color:#2081c3}.image-uploader-editor .uploader .dz-clickable *{cursor:default}.image-uploader-editor .uploader .dz-clickable .dz-message,.image-uploader-editor .uploader .dz-clickable .dz-message *{cursor:pointer}.image-uploader-editor .uploader .dz-message{position:absolute;width:230px;padding:10px;font-size:14px}.image-uploader-editor .uploader .dz-message.center{top:50%;left:50%;-webkit-transform:translate(-50%,-50%);-ms-transform:translate(-50%,-50%);transform:translate(-50%,-50%)}.image-uploader-editor .uploader .dz-message.top{top:2.5rem;left:50%;-webkit-transform:translate(-50%,0);-ms-transform:translate(-50%,0);transform:translate(-50%,0)}.image-uploader-editor .uploader .dz-message.bottom{top:calc(100% - 1rem);left:50%;-webkit-transform:translate(-50%,-100%);-ms-transform:translate(-50%,-100%);transform:translate(-50%,-100%)}.image-uploader-editor .uploader.dz-drag-hover .dz-message,.image-uploader-editor .uploader:hover .dz-message{background-color:rgba(155,155,155,.75);-ms-border-radius:2px;border-radius:2px;z-index:2}.image-uploader-editor .uploader-empty-container .uploader .dz-message{background-color:inherit}.image-uploader-editor .uploader .dz-message .icon-arrow-up-line{font-size:32px}.image-uploader-editor .uploader .dz-preview{color:#fff;position:relative;display:inline-block;width:230px;padding:20px;margin:2em;background-color:#403e3d;-ms-border-radius:2px;border-radius:2px;z-index:1}.image-uploader-editor .uploader .dz-preview .dz-progress{display:block;height:15px}.image-uploader-editor .uploader .dz-preview .dz-progress .dz-upload{display:block;height:100%;width:0;background:#2ecc40}.image-uploader-editor .uploader .dz-preview .dz-error-message{color:#ff4136;display:none}.image-uploader-editor .uploader .dz-preview.dz-error .dz-error-mark,.image-uploader-editor .uploader .dz-preview.dz-error .dz-error-message{display:block}.image-uploader-editor .uploader .dz-preview.dz-success .dz-success-mark{display:block}.image-uploader-editor .uploader .dz-preview .dz-error-mark,.image-uploader-editor .uploader .dz-preview .dz-success-mark{position:absolute;display:none;left:30px;top:30px;width:54px;height:58px;left:50%;margin-left:-27px;-ms-opacity:.5;opacity:.5}.spinner-editor div.inline-editor-btn-group{font-family:"Helvetica Neue",Helvetica,Arial,sans-serif;font-size:16px;right:1em;top:1em;position:absolute;z-index:10000;background-color:#262524;border:1px solid #383838;border-radius:2px;opacity:.8;-webkit-transition:background-color .2s ease-in;transition:background-color .2s ease-in}.spinner-editor div.inline-editor-btn-group:hover{opacity:1}.spinner-editor div.inline-editor-btn-group ul{margin:0;padding:0}.spinner-editor div.inline-editor-btn-group li{float:left;list-style:none;margin:0;padding:0}.spinner-editor div.inline-editor-btn-group li:first-child button{border-bottom-left-radius:2px;border-top-left-radius:2px}.spinner-editor div.inline-editor-btn-group li:last-child button{border-bottom-right-radius:2px;border-top-right-radius:2px}.spinner-editor div.inline-editor-btn-group li button{box-sizing:border-box;cursor:pointer;display:block;font-size:14px;line-height:1.33;margin:0;padding:15px;text-decoration:none;background-color:#262524;border:0;color:#fff;height:50px;min-width:50px;-webkit-transition:background-color .2s ease-in;transition:background-color .2s ease-in}.spinner-editor div.inline-editor-btn-group li button:hover{background-color:#383838}.spinner-editor div.inline-editor-btn-group li button:disabled{background-color:#000;color:#fff;cursor:default}.spinner-editor div.inline-editor-btn-group li button:focus{outline:0}.text-editor{outline:0;cursor:text}.text-editor:empty:before{content:attr(data-placeholder-text);color:#d6d9d6}.text-editor:not(:focus):hover{background-color:rgba(155,155,155,.17)} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.min.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.min.js new file mode 100644 index 0000000..ff84f8a --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Admin/pageComponents.min.js @@ -0,0 +1 @@ +function _possibleConstructorReturn(e,t){if(!e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!t||"object"!=typeof t&&"function"!=typeof t?e:t}function _inherits(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function, not "+typeof t);e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}),t&&(Object.setPrototypeOf?Object.setPrototypeOf(e,t):e.__proto__=t)}function _classCallCheck(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}function __guard__(e,t){return null!=e?t(e):void 0}function __guardMethod__(e,t,i){return null!=e&&"function"==typeof e[t]?i(e,t):void 0}window.kentico.pageBuilder.registerInlineEditor("color-picker-editor",{init:function(e){for(var t=e.editor,i=[{button:t.querySelector("#first-color-btn"),cssClass:"first-color"},{button:t.querySelector("#second-color-btn"),cssClass:"second-color"},{button:t.querySelector("#third-color-btn"),cssClass:"third-color"}],n=function(n){for(var r=0;r1?i-1:0),r=1;r=a.length)break;a[o++].apply(this,n)}}return this}},{key:"off",value:function(e,t){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var i=this._callbacks[e];if(!i)return this;if(1===arguments.length)return delete this._callbacks[e],this;for(var n=0;n=n.length)break;var r=n[i++];if(/(^| )dz-message($| )/.test(r.className)){e=r,r.className="dz-message";break}}e||(e=t.createElement('
'),this.element.appendChild(e));var o=e.getElementsByTagName("span")[0];return o&&(null!=o.textContent?o.textContent=this.options.dictFallbackMessage:null!=o.innerText&&(o.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(e,t,i,n){var r={srcX:0,srcY:0,srcWidth:e.width,srcHeight:e.height},o=e.width/e.height;null==t&&null==i?(t=r.srcWidth,i=r.srcHeight):null==t?t=i*o:null==i&&(i=t/o);var a=(t=Math.min(t,r.srcWidth))/(i=Math.min(i,r.srcHeight));if(r.srcWidth>t||r.srcHeight>i)if("crop"===n)o>a?(r.srcHeight=e.height,r.srcWidth=r.srcHeight*a):(r.srcWidth=e.width,r.srcHeight=r.srcWidth/a);else{if("contain"!==n)throw new Error("Unknown resizeMethod '"+n+"'");o>a?i=t/o:t=i*o}return r.srcX=(e.width-r.srcWidth)/2,r.srcY=(e.height-r.srcHeight)/2,r.trgWidth=t,r.trgHeight=i,r},transformFile:function(e,t){return(this.options.resizeWidth||this.options.resizeHeight)&&e.type.match(/image.*/)?this.resizeImage(e,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,t):t(e)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
',drop:function(e){return this.element.classList.remove("dz-drag-hover")},dragstart:function(e){},dragend:function(e){return this.element.classList.remove("dz-drag-hover")},dragenter:function(e){return this.element.classList.add("dz-drag-hover")},dragover:function(e){return this.element.classList.add("dz-drag-hover")},dragleave:function(e){return this.element.classList.remove("dz-drag-hover")},paste:function(e){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(e){var i=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){e.previewElement=t.createElement(this.options.previewTemplate.trim()),e.previewTemplate=e.previewElement,this.previewsContainer.appendChild(e.previewElement);for(var n=0,r=r=e.previewElement.querySelectorAll("[data-dz-name]");;){if(n>=r.length)break;var o=r[n++];o.textContent=e.name}for(var a=0,s=s=e.previewElement.querySelectorAll("[data-dz-size]");!(a>=s.length);)(o=s[a++]).innerHTML=this.filesize(e.size);this.options.addRemoveLinks&&(e._removeLink=t.createElement(''+this.options.dictRemoveFile+""),e.previewElement.appendChild(e._removeLink));for(var l=function(n){return n.preventDefault(),n.stopPropagation(),e.status===t.UPLOADING?t.confirm(i.options.dictCancelUploadConfirmation,(function(){return i.removeFile(e)})):i.options.dictRemoveFileConfirmation?t.confirm(i.options.dictRemoveFileConfirmation,(function(){return i.removeFile(e)})):i.removeFile(e)},u=0,d=d=e.previewElement.querySelectorAll("[data-dz-remove]");;){if(u>=d.length)break;d[u++].addEventListener("click",l)}}},removedfile:function(e){return null!=e.previewElement&&null!=e.previewElement.parentNode&&e.previewElement.parentNode.removeChild(e.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(e,t){if(e.previewElement){e.previewElement.classList.remove("dz-file-preview");for(var i=0,n=n=e.previewElement.querySelectorAll("[data-dz-thumbnail]");;){if(i>=n.length)break;var r=n[i++];r.alt=e.name,r.src=t}return setTimeout((function(){return e.previewElement.classList.add("dz-image-preview")}),1)}},error:function(e,t){if(e.previewElement){e.previewElement.classList.add("dz-error"),"String"!=typeof t&&t.error&&(t=t.error);for(var i=0,n=n=e.previewElement.querySelectorAll("[data-dz-errormessage]");;){if(i>=n.length)break;n[i++].textContent=t}}},errormultiple:function(){},processing:function(e){if(e.previewElement&&(e.previewElement.classList.add("dz-processing"),e._removeLink))return e._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(e,t,i){if(e.previewElement)for(var n=0,r=r=e.previewElement.querySelectorAll("[data-dz-uploadprogress]");;){if(n>=r.length)break;var o=r[n++];"PROGRESS"===o.nodeName?o.value=t:o.style.width=t+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(e){if(e.previewElement)return e.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(e){return this.emit("error",e,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(e){if(e._removeLink&&(e._removeLink.textContent=this.options.dictRemoveFile),e.previewElement)return e.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n=o.length)break;var a=o[r++];for(var s in a){var l=a[s];e[s]=l}}return e}}]),_createClass(t,[{key:"getAcceptedFiles",value:function(){return this.files.filter((function(e){return e.accepted})).map((function(e){return e}))}},{key:"getRejectedFiles",value:function(){return this.files.filter((function(e){return!e.accepted})).map((function(e){return e}))}},{key:"getFilesWithStatus",value:function(e){return this.files.filter((function(t){return t.status===e})).map((function(e){return e}))}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(t.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(t.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(t.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter((function(e){return e.status===t.UPLOADING||e.status===t.QUEUED})).map((function(e){return e}))}},{key:"init",value:function(){var e=this;"form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(t.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length&&function t(){return e.hiddenFileInput&&e.hiddenFileInput.parentNode.removeChild(e.hiddenFileInput),e.hiddenFileInput=document.createElement("input"),e.hiddenFileInput.setAttribute("type","file"),(null===e.options.maxFiles||e.options.maxFiles>1)&&e.hiddenFileInput.setAttribute("multiple","multiple"),e.hiddenFileInput.className="dz-hidden-input",null!==e.options.acceptedFiles&&e.hiddenFileInput.setAttribute("accept",e.options.acceptedFiles),null!==e.options.capture&&e.hiddenFileInput.setAttribute("capture",e.options.capture),e.hiddenFileInput.style.visibility="hidden",e.hiddenFileInput.style.position="absolute",e.hiddenFileInput.style.top="0",e.hiddenFileInput.style.left="0",e.hiddenFileInput.style.height="0",e.hiddenFileInput.style.width="0",document.querySelector(e.options.hiddenInputContainer).appendChild(e.hiddenFileInput),e.hiddenFileInput.addEventListener("change",(function(){var i=e.hiddenFileInput.files;if(i.length)for(var n=0,r=r=i;;){if(n>=r.length)break;var o=r[n++];e.addFile(o)}return e.emit("addedfiles",i),t()}))}(),this.URL=null!==window.URL?window.URL:window.webkitURL;for(var i=0,n=n=this.events;;){if(i>=n.length)break;var r=n[i++];this.on(r,this.options[r])}this.on("uploadprogress",(function(){return e.updateTotalUploadProgress()})),this.on("removedfile",(function(){return e.updateTotalUploadProgress()})),this.on("canceled",(function(t){return e.emit("complete",t)})),this.on("complete",(function(t){if(0===e.getAddedFiles().length&&0===e.getUploadingFiles().length&&0===e.getQueuedFiles().length)return setTimeout((function(){return e.emit("queuecomplete")}),0)}));var o=function(e){return e.stopPropagation(),e.preventDefault?e.preventDefault():e.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(t){return e.emit("dragstart",t)},dragenter:function(t){return o(t),e.emit("dragenter",t)},dragover:function(t){var i=void 0;try{i=t.dataTransfer.effectAllowed}catch(e){}return t.dataTransfer.dropEffect="move"===i||"linkMove"===i?"move":"copy",o(t),e.emit("dragover",t)},dragleave:function(t){return e.emit("dragleave",t)},drop:function(t){return o(t),e.drop(t)},dragend:function(t){return e.emit("dragend",t)}}}],this.clickableElements.forEach((function(i){return e.listeners.push({element:i,events:{click:function(n){return(i!==e.element||n.target===e.element||t.elementInside(n.target,e.element.querySelector(".dz-message")))&&e.hiddenFileInput.click(),!0}}})})),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,t.instances.splice(t.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var e=void 0,t=0,i=0;if(this.getActiveFiles().length){for(var n=0,r=r=this.getActiveFiles();;){if(n>=r.length)break;var o=r[n++];t+=o.upload.bytesSent,i+=o.upload.total}e=100*t/i}else e=100;return this.emit("totaluploadprogress",e,i,t)}},{key:"_getParamName",value:function(e){return"function"==typeof this.options.paramName?this.options.paramName(e):this.options.paramName+(this.options.uploadMultiple?"["+e+"]":"")}},{key:"_renameFile",value:function(e){return"function"!=typeof this.options.renameFile?e.name:this.options.renameFile(e)}},{key:"getFallbackForm",value:function(){var e,i=void 0;if(e=this.getExistingFallback())return e;var n='
';this.options.dictFallbackText&&(n+="

"+this.options.dictFallbackText+"

"),n+='
';var r=t.createElement(n);return"FORM"!==this.element.tagName?(i=t.createElement('
')).appendChild(r):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=i?i:r}},{key:"getExistingFallback",value:function(){for(var e=["div","form"],t=0;t=i.length)break;var n=i[t++];if(/(^| )fallback($| )/.test(n.className))return n}}(this.element.getElementsByTagName(n)))return i}}},{key:"setupEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var i in e.events){var n=e.events[i];t.push(e.element.addEventListener(i,n,!1))}return t}()}))}},{key:"removeEventListeners",value:function(){return this.listeners.map((function(e){return function(){var t=[];for(var i in e.events){var n=e.events[i];t.push(e.element.removeEventListener(i,n,!1))}return t}()}))}},{key:"disable",value:function(){var e=this;return this.clickableElements.forEach((function(e){return e.classList.remove("dz-clickable")})),this.removeEventListeners(),this.disabled=!0,this.files.map((function(t){return e.cancelUpload(t)}))}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach((function(e){return e.classList.add("dz-clickable")})),this.setupEventListeners()}},{key:"filesize",value:function(e){var t=0,i="b";if(e>0){for(var n=["tb","gb","mb","kb","b"],r=0;r=Math.pow(this.options.filesizeBase,4-r)/10){t=e/Math.pow(this.options.filesizeBase,4-r),i=o;break}}t=Math.round(10*t)/10}return""+t+" "+this.options.dictFileSizeUnits[i]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(e){if(e.dataTransfer){this.emit("drop",e);var t=e.dataTransfer.files;if(this.emit("addedfiles",t),t.length){var i=e.dataTransfer.items;i&&i.length&&null!=i[0].webkitGetAsEntry?this._addFilesFromItems(i):this.handleFiles(t)}}}},{key:"paste",value:function(e){if(null!=__guard__(null!=e?e.clipboardData:void 0,(function(e){return e.items}))){this.emit("paste",e);var t=e.clipboardData.items;return t.length?this._addFilesFromItems(t):void 0}}},{key:"handleFiles",value:function(e){for(var t=0,i=i=e;;){if(t>=i.length)break;var n=i[t++];this.addFile(n)}}},{key:"_addFilesFromItems",value:function(e){var t=this;return function(){for(var i=[],n=0,r=r=e;;){if(n>=r.length)break;var o,a=r[n++];null!=a.webkitGetAsEntry&&(o=a.webkitGetAsEntry())?o.isFile?i.push(t.addFile(a.getAsFile())):o.isDirectory?i.push(t._addFilesFromDirectory(o,o.name)):i.push(void 0):null==a.getAsFile||null!=a.kind&&"file"!==a.kind?i.push(void 0):i.push(t.addFile(a.getAsFile()))}return i}()}},{key:"_addFilesFromDirectory",value:function(e,t){var i=this,n=e.createReader(),r=function(e){return __guardMethod__(console,"log",(function(t){return t.log(e)}))};return function e(){return n.readEntries((function(n){if(n.length>0){for(var r=0,o=o=n;;){if(r>=o.length)break;var a=o[r++];a.isFile?a.file((function(e){if(!i.options.ignoreHiddenFiles||"."!==e.name.substring(0,1))return e.fullPath=t+"/"+e.name,i.addFile(e)})):a.isDirectory&&i._addFilesFromDirectory(a,t+"/"+a.name)}e()}return null}),r)}()}},{key:"accept",value:function(e,i){return e.size>1024*this.options.maxFilesize*1024?i(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(e.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):t.isValidFile(e,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(i(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",e)):this.options.accept.call(this,e,i):i(this.options.dictInvalidFileType)}},{key:"addFile",value:function(e){var i=this;return e.upload={uuid:t.uuidv4(),progress:0,total:e.size,bytesSent:0,filename:this._renameFile(e),chunked:this.options.chunking&&(this.options.forceChunking||e.size>this.options.chunkSize),totalChunkCount:Math.ceil(e.size/this.options.chunkSize)},this.files.push(e),e.status=t.ADDED,this.emit("addedfile",e),this._enqueueThumbnail(e),this.accept(e,(function(t){return t?(e.accepted=!1,i._errorProcessing([e],t)):(e.accepted=!0,i.options.autoQueue&&i.enqueueFile(e)),i._updateMaxFilesReachedClass()}))}},{key:"enqueueFiles",value:function(e){for(var t=0,i=i=e;;){if(t>=i.length)break;var n=i[t++];this.enqueueFile(n)}return null}},{key:"enqueueFile",value:function(e){var i=this;if(e.status!==t.ADDED||!0!==e.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(e.status=t.QUEUED,this.options.autoProcessQueue)return setTimeout((function(){return i.processQueue()}),0)}},{key:"_enqueueThumbnail",value:function(e){var t=this;if(this.options.createImageThumbnails&&e.type.match(/image.*/)&&e.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(e),setTimeout((function(){return t._processThumbnailQueue()}),0)}},{key:"_processThumbnailQueue",value:function(){var e=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var t=this._thumbnailQueue.shift();return this.createThumbnail(t,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,(function(i){return e.emit("thumbnail",t,i),e._processingThumbnail=!1,e._processThumbnailQueue()}))}}},{key:"removeFile",value:function(e){if(e.status===t.UPLOADING&&this.cancelUpload(e),this.files=without(this.files,e),this.emit("removedfile",e),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(e){null==e&&(e=!1);for(var i=0,n=n=this.files.slice();;){if(i>=n.length)break;var r=n[i++];(r.status!==t.UPLOADING||e)&&this.removeFile(r)}return null}},{key:"resizeImage",value:function(e,i,n,r,o){var a=this;return this.createThumbnail(e,i,n,r,!1,(function(i,n){if(null==n)return o(e);var r=a.options.resizeMimeType;null==r&&(r=e.type);var s=n.toDataURL(r,a.options.resizeQuality);return"image/jpeg"!==r&&"image/jpg"!==r||(s=ExifRestore.restore(e.dataURL,s)),o(t.dataURItoBlob(s))}))}},{key:"createThumbnail",value:function(e,t,i,n,r,o){var a=this,s=new FileReader;return s.onload=function(){return e.dataURL=s.result,"image/svg+xml"===e.type?void(null!=o&&o(s.result)):a.createThumbnailFromUrl(e,t,i,n,r,o)},s.readAsDataURL(e)}},{key:"createThumbnailFromUrl",value:function(e,t,i,n,r,o,a){var s=this,l=document.createElement("img");return a&&(l.crossOrigin=a),l.onload=function(){var a=function(e){return e(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&r&&(a=function(e){return EXIF.getData(l,(function(){return e(EXIF.getTag(this,"Orientation"))}))}),a((function(r){e.width=l.width,e.height=l.height;var a=s.options.resize.call(s,e,t,i,n),u=document.createElement("canvas"),d=u.getContext("2d");switch(u.width=a.trgWidth,u.height=a.trgHeight,r>4&&(u.width=a.trgHeight,u.height=a.trgWidth),r){case 2:d.translate(u.width,0),d.scale(-1,1);break;case 3:d.translate(u.width,u.height),d.rotate(Math.PI);break;case 4:d.translate(0,u.height),d.scale(1,-1);break;case 5:d.rotate(.5*Math.PI),d.scale(1,-1);break;case 6:d.rotate(.5*Math.PI),d.translate(0,-u.height);break;case 7:d.rotate(.5*Math.PI),d.translate(u.width,-u.height),d.scale(-1,1);break;case 8:d.rotate(-.5*Math.PI),d.translate(-u.width,0)}drawImageIOSFix(d,l,null!=a.srcX?a.srcX:0,null!=a.srcY?a.srcY:0,a.srcWidth,a.srcHeight,null!=a.trgX?a.trgX:0,null!=a.trgY?a.trgY:0,a.trgWidth,a.trgHeight);var c=u.toDataURL("image/png");if(null!=o)return o(c,u)}))},null!=o&&(l.onerror=o),l.src=e.dataURL}},{key:"processQueue",value:function(){var e=this.options.parallelUploads,t=this.getUploadingFiles().length,i=t;if(!(t>=e)){var n=this.getQueuedFiles();if(n.length>0){if(this.options.uploadMultiple)return this.processFiles(n.slice(0,e-t));for(;i=n.length)break;var r=n[i++];r.processing=!0,r.status=t.UPLOADING,this.emit("processing",r)}return this.options.uploadMultiple&&this.emit("processingmultiple",e),this.uploadFiles(e)}},{key:"_getFilesWithXhr",value:function(e){return this.files.filter((function(t){return t.xhr===e})).map((function(e){return e}))}},{key:"cancelUpload",value:function(e){if(e.status===t.UPLOADING){for(var i=this._getFilesWithXhr(e.xhr),n=0,r=r=i;;){if(n>=r.length)break;r[n++].status=t.CANCELED}void 0!==e.xhr&&e.xhr.abort();for(var o=0,a=a=i;;){if(o>=a.length)break;var s=a[o++];this.emit("canceled",s)}this.options.uploadMultiple&&this.emit("canceledmultiple",i)}else e.status!==t.ADDED&&e.status!==t.QUEUED||(e.status=t.CANCELED,this.emit("canceled",e),this.options.uploadMultiple&&this.emit("canceledmultiple",[e]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(e){if("function"==typeof e){for(var t=arguments.length,i=Array(t>1?t-1:0),n=1;n=r.upload.totalChunkCount)){0;var a=n*i.options.chunkSize,s=Math.min(a+i.options.chunkSize,r.size),l={name:i._getParamName(0),data:o.webkitSlice?o.webkitSlice(a,s):o.slice(a,s),filename:r.upload.filename,chunkIndex:n};r.upload.chunks[n]={file:r,index:n,dataBlock:l,status:t.UPLOADING,progress:0,retries:0},i._uploadData(e,[l])}};if(r.upload.finishedChunkUpload=function(n){var o=!0;n.status=t.SUCCESS,n.dataBlock=null;for(var s=0;s=a.length)break;a[o++].xhr=r}e[0].upload.chunked&&(e[0].upload.chunks[i[0].chunkIndex].xhr=r);var s=this.resolveOption(this.options.method,e),l=this.resolveOption(this.options.url,e);r.open(s,l,!0),r.timeout=this.resolveOption(this.options.timeout,e),r.withCredentials=!!this.options.withCredentials,r.onload=function(t){n._finishedUploading(e,r,t)},r.onerror=function(){n._handleUploadError(e,r)},(null!=r.upload?r.upload:r).onprogress=function(t){return n._updateFilesUploadProgress(e,r,t)};var u={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};for(var d in this.options.headers&&t.extend(u,this.options.headers),u){var c=u[d];c&&r.setRequestHeader(d,c)}var p=new FormData;if(this.options.params){var h=this.options.params;for(var f in"function"==typeof h&&(h=h.call(this,e,r,e[0].upload.chunked?this._getChunk(e[0],r):null)),h){var m=h[f];p.append(f,m)}}for(var v=0,g=g=e;;){if(v>=g.length)break;var k=g[v++];this.emit("sending",k,r,p)}this.options.uploadMultiple&&this.emit("sendingmultiple",e,r,p),this._addFormElementData(p);for(var y=0;y=i.length)break;var n=i[t++],r=n.getAttribute("name"),o=n.getAttribute("type");if(o&&(o=o.toLowerCase()),null!=r)if("SELECT"===n.tagName&&n.hasAttribute("multiple"))for(var a=0,s=s=n.options;;){if(a>=s.length)break;var l=s[a++];l.selected&&e.append(r,l.value)}else(!o||"checkbox"!==o&&"radio"!==o||n.checked)&&e.append(r,n.value)}}},{key:"_updateFilesUploadProgress",value:function(e,t,i){var n=void 0;if(void 0!==i){if(n=100*i.loaded/i.total,e[0].upload.chunked){var r=e[0],o=this._getChunk(r,t);o.progress=n,o.total=i.total,o.bytesSent=i.loaded,r.upload.progress=0,r.upload.total=0,r.upload.bytesSent=0;for(var a=0;a=l.length)break;var u=l[s++];u.upload.progress=n,u.upload.total=i.total,u.upload.bytesSent=i.loaded}for(var d=0,c=c=e;;){if(d>=c.length)break;var p=c[d++];this.emit("uploadprogress",p,p.upload.progress,p.upload.bytesSent)}}else{var h=!0;n=100;for(var f=0,m=m=e;;){if(f>=m.length)break;var v=m[f++];100===v.upload.progress&&v.upload.bytesSent===v.upload.total||(h=!1),v.upload.progress=n,v.upload.bytesSent=v.upload.total}if(h)return;for(var g=0,k=k=e;;){if(g>=k.length)break;var y=k[g++];this.emit("uploadprogress",y,n,y.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(e,i,n){var r=void 0;if(e[0].status!==t.CANCELED&&4===i.readyState){if("arraybuffer"!==i.responseType&&"blob"!==i.responseType&&(r=i.responseText,i.getResponseHeader("content-type")&&~i.getResponseHeader("content-type").indexOf("application/json")))try{r=JSON.parse(r)}catch(e){n=e,r="Invalid JSON response from server."}this._updateFilesUploadProgress(e),200<=i.status&&i.status<300?e[0].upload.chunked?e[0].upload.finishedChunkUpload(this._getChunk(e[0],i)):this._finished(e,r,n):this._handleUploadError(e,i,r)}}},{key:"_handleUploadError",value:function(e,i,n){if(e[0].status!==t.CANCELED){if(e[0].upload.chunked&&this.options.retryChunks){var r=this._getChunk(e[0],i);if(r.retries++=a.length);)a[o++],this._errorProcessing(e,n||this.options.dictResponseError.replace("{{statusCode}}",i.status),i)}}},{key:"submitRequest",value:function(e,t,i){e.send(t)}},{key:"_finished",value:function(e,i,n){for(var r=0,o=o=e;;){if(r>=o.length)break;var a=o[r++];a.status=t.SUCCESS,this.emit("success",a,i,n),this.emit("complete",a)}if(this.options.uploadMultiple&&(this.emit("successmultiple",e,i,n),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(e,i,n){for(var r=0,o=o=e;;){if(r>=o.length)break;var a=o[r++];a.status=t.ERROR,this.emit("error",a,i,n),this.emit("complete",a)}if(this.options.uploadMultiple&&(this.emit("errormultiple",e,i,n),this.emit("completemultiple",e)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){var t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}}]),t}();Dropzone.initClass(),Dropzone.version="5.3.1",Dropzone.options={},Dropzone.optionsForElement=function(e){return e.getAttribute("id")?Dropzone.options[camelize(e.getAttribute("id"))]:void 0},Dropzone.instances=[],Dropzone.forElement=function(e){if("string"==typeof e&&(e=document.querySelector(e)),null==(null!=e?e.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return e.dropzone},Dropzone.autoDiscover=!0,Dropzone.discover=function(){var e=void 0;if(document.querySelectorAll)e=document.querySelectorAll(".dropzone");else{e=[];var t=function(t){return function(){for(var i=[],n=0,r=r=t;;){if(n>=r.length)break;var o=r[n++];/(^| )dropzone($| )/.test(o.className)?i.push(e.push(o)):i.push(void 0)}return i}()};t(document.getElementsByTagName("div")),t(document.getElementsByTagName("form"))}return function(){for(var t=[],i=0,n=n=e;;){if(i>=n.length)break;var r=n[i++];!1!==Dropzone.optionsForElement(r)?t.push(new Dropzone(r)):t.push(void 0)}return t}()},Dropzone.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],Dropzone.isBrowserSupported=function(){var e=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var t=0,i=i=Dropzone.blacklistedBrowsers;;){if(t>=i.length)break;i[t++].test(navigator.userAgent)&&(e=!1)}else e=!1;else e=!1;return e},Dropzone.dataURItoBlob=function(e){for(var t=atob(e.split(",")[1]),i=e.split(",")[0].split(":")[1].split(";")[0],n=new ArrayBuffer(t.length),r=new Uint8Array(n),o=0,a=t.length,s=0<=a;s?o<=a:o>=a;s?o++:o--)r[o]=t.charCodeAt(o);return new Blob([n],{type:i})};var without=function(e,t){return e.filter((function(e){return e!==t})).map((function(e){return e}))},camelize=function(e){return e.replace(/[\-_](\w)/g,(function(e){return e.charAt(1).toUpperCase()}))};Dropzone.createElement=function(e){var t=document.createElement("div");return t.innerHTML=e,t.childNodes[0]},Dropzone.elementInside=function(e,t){if(e===t)return!0;for(;e=e.parentNode;)if(e===t)return!0;return!1},Dropzone.getElement=function(e,t){var i=void 0;if("string"==typeof e?i=document.querySelector(e):null!=e.nodeType&&(i=e),null==i)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector or a plain HTML element.");return i},Dropzone.getElements=function(e,t){var i=void 0,n=void 0;if(e instanceof Array){n=[];try{for(var r=0,o=o=e;!(r>=o.length);)i=o[r++],n.push(this.getElement(i,t))}catch(e){n=null}}else if("string"==typeof e){n=[];for(var a=0,s=s=document.querySelectorAll(e);!(a>=s.length);)i=s[a++],n.push(i)}else null!=e.nodeType&&(n=[e]);if(null==n||!n.length)throw new Error("Invalid `"+t+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return n},Dropzone.confirm=function(e,t,i){return window.confirm(e)?t():null!=i?i():void 0},Dropzone.isValidFile=function(e,t){if(!t)return!0;t=t.split(",");for(var i=e.type,n=i.replace(/\/.*$/,""),r=0,o=o=t;;){if(r>=o.length)break;var a=o[r++];if("."===(a=a.trim()).charAt(0)){if(-1!==e.name.toLowerCase().indexOf(a.toLowerCase(),e.name.length-a.length))return!0}else if(/\/\*$/.test(a)){if(n===a.replace(/\/.*$/,""))return!0}else if(i===a)return!0}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(e){return this.each((function(){return new Dropzone(this,e)}))}),"undefined"!=typeof module&&null!==module?module.exports=Dropzone:window.Dropzone=Dropzone,Dropzone.ADDED="added",Dropzone.QUEUED="queued",Dropzone.ACCEPTED=Dropzone.QUEUED,Dropzone.UPLOADING="uploading",Dropzone.PROCESSING=Dropzone.UPLOADING,Dropzone.CANCELED="canceled",Dropzone.ERROR="error",Dropzone.SUCCESS="success";var detectVerticalSquash=function(e){var t=(e.naturalWidth,e.naturalHeight),i=document.createElement("canvas");i.width=1,i.height=t;var n=i.getContext("2d");n.drawImage(e,0,0);for(var r=n.getImageData(1,0,1,t).data,o=0,a=t,s=t;s>o;)0===r[4*(s-1)+3]?a=s:o=s,s=a+o>>1;var l=s/t;return 0===l?1:l},drawImageIOSFix=function(e,t,i,n,r,o,a,s,l,u){var d=detectVerticalSquash(t);return e.drawImage(t,i,n,r,o,a,s,l,u/d)},ExifRestore=function(){function e(){_classCallCheck(this,e)}return _createClass(e,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(e){for(var t="",i=void 0,n=void 0,r="",o=void 0,a=void 0,s=void 0,l="",u=0;o=(i=e[u++])>>2,a=(3&i)<<4|(n=e[u++])>>4,s=(15&n)<<2|(r=e[u++])>>6,l=63&r,isNaN(n)?s=l=64:isNaN(r)&&(l=64),t=t+this.KEY_STR.charAt(o)+this.KEY_STR.charAt(a)+this.KEY_STR.charAt(s)+this.KEY_STR.charAt(l),i=n=r="",o=a=s=l="",ue.length)break}return i}},{key:"decode64",value:function(e){var t=void 0,i=void 0,n="",r=void 0,o=void 0,a="",s=0,l=[];for(/[^A-Za-z0-9\+\/\=]/g.exec(e)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),e=e.replace(/[^A-Za-z0-9\+\/\=]/g,"");t=this.KEY_STR.indexOf(e.charAt(s++))<<2|(r=this.KEY_STR.indexOf(e.charAt(s++)))>>4,i=(15&r)<<4|(o=this.KEY_STR.indexOf(e.charAt(s++)))>>2,n=(3&o)<<6|(a=this.KEY_STR.indexOf(e.charAt(s++))),l.push(t),64!==o&&l.push(i),64!==a&&l.push(n),t=i=n="",r=o=a="",s0){var n=i.items[0];if(e.propertyValue&&e.propertyValue.length&&n.fileGuid===e.propertyValue[0].fileGuid)return{closeDialog:!0};var r=new CustomEvent("updateProperty",{detail:{value:[{fileGuid:n.fileGuid}],name:e.propertyName}});t.dispatchEvent(r)}return{closeDialog:!0}}};window.kentico.modalDialog.contentSelector.open(i)})),new Dropzone(i,{acceptedFiles:".gif,.png,.jpg,.jpeg",maxFiles:1,url:t.getAttribute("data-url"),createImageThumbnails:!1,clickable:n,dictInvalidFileType:e.localizationService.getString("You can't upload files of this type.")}).on("success",(function(i){var n=JSON.parse(i.xhr.response),o=new CustomEvent("updateProperty",{detail:{value:r?[{fileGuid:n.guid}]:n.guid,name:e.propertyName}});t.dispatchEvent(o)}))},destroy:function(e){var t=e.editor.querySelector(".uploader").dropzone;t&&t.destroy()}}),window.kentico.pageBuilder.registerInlineEditor("spinner-editor",{init:function(e){var t=e.editor;t.querySelector("#value-placeholder").innerText=e.propertyValue;var i=t.querySelector("#minus-btn");e.propertyValue<2?i.disabled=!0:i.addEventListener("click",(function(){var i=new CustomEvent("updateProperty",{detail:{value:e.propertyValue-1,name:e.propertyName}});t.dispatchEvent(i)})),t.querySelector("#plus-btn").addEventListener("click",(function(){var i=new CustomEvent("updateProperty",{detail:{value:e.propertyValue+1,name:e.propertyName}});t.dispatchEvent(i)}))}}),window.kentico.pageBuilder.registerInlineEditor("text-editor",{init:function(e){var t=e.editor;t.addEventListener("input",(function(){this.textContent||(this.innerHTML="");var i=new CustomEvent("updateProperty",{detail:{name:e.propertyName,value:this.textContent,refreshMarkup:!1}});t.dispatchEvent(i)}))}}); \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.css new file mode 100644 index 0000000..e69de29 diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.js new file mode 100644 index 0000000..88cf084 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.js @@ -0,0 +1,13 @@ +function replaceForm(event) { + event.preventDefault(); + var form = event.target; + + $.ajax({ + method: "POST", + url: form.action, + data: $(form).serialize(), + success: function (data) { + $(form).replaceWith(data); + } + }); +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.min.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.min.css new file mode 100644 index 0000000..e69de29 diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.min.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.min.js new file mode 100644 index 0000000..c4bf065 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Bundles/Public/pageComponents.min.js @@ -0,0 +1 @@ +function replaceForm(e){e.preventDefault();var a=e.target;$.ajax({method:"POST",url:a.action,data:$(a).serialize(),success:function(e){$(a).replaceWith(e)}})} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.eot b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.eot new file mode 100644 index 0000000..acc027e Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.eot differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.svg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.svg new file mode 100644 index 0000000..a98d4c4 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.svg @@ -0,0 +1,353 @@ + + + +Generated by IcoMoon + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.ttf b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.ttf new file mode 100644 index 0000000..3999b85 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.ttf differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.woff new file mode 100644 index 0000000..562de8a Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/Core-icons.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Bold.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Bold.woff new file mode 100644 index 0000000..a099ae4 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Bold.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Bold.woff2 b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Bold.woff2 new file mode 100644 index 0000000..3845bf6 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Bold.woff2 differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Light.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Light.woff new file mode 100644 index 0000000..4db2186 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Light.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Light.woff2 b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Light.woff2 new file mode 100644 index 0000000..edd41be Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Light.woff2 differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Medium.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Medium.woff new file mode 100644 index 0000000..75f962d Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Medium.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Medium.woff2 b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Medium.woff2 new file mode 100644 index 0000000..e23d21e Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Medium.woff2 differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Regular.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Regular.woff new file mode 100644 index 0000000..b2637e8 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Regular.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Regular.woff2 b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Regular.woff2 new file mode 100644 index 0000000..f1ebea9 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Regular.woff2 differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Thin.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Thin.woff new file mode 100644 index 0000000..3a94d9f Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Thin.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Thin.woff2 b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Thin.woff2 new file mode 100644 index 0000000..a48a266 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/GT-Walsheim-Thin.woff2 differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/PTSerif-Bold.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/PTSerif-Bold.woff new file mode 100644 index 0000000..19c01bd Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/PTSerif-Bold.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/SourceSansPro-Bold.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/SourceSansPro-Bold.woff new file mode 100644 index 0000000..600751c Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/SourceSansPro-Bold.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/SourceSansPro-Light.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/SourceSansPro-Light.woff new file mode 100644 index 0000000..fb26ef3 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/SourceSansPro-Light.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/SourceSansPro-Regular.woff b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/SourceSansPro-Regular.woff new file mode 100644 index 0000000..dbdec39 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Fonts/SourceSansPro-Regular.woff differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/404.jpg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/404.jpg new file mode 100644 index 0000000..8c7bf76 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/404.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/bg.jpg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/bg.jpg new file mode 100644 index 0000000..35cba2d Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/bg.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/cup.png b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/cup.png new file mode 100644 index 0000000..87c78b2 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/cup.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/default-avatar.png b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/default-avatar.png new file mode 100644 index 0000000..9c0a091 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/default-avatar.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/default-image-cafe.jpg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/default-image-cafe.jpg new file mode 100644 index 0000000..78561c6 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/default-image-cafe.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/empty_cup.jpg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/empty_cup.jpg new file mode 100644 index 0000000..1f1a1bf Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/empty_cup.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/favicon.svg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/favicon.svg new file mode 100644 index 0000000..f503d4d --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/favicon.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/icon-magnifier.png b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/icon-magnifier.png new file mode 100644 index 0000000..e34ace3 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/icon-magnifier.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/logo.svg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/logo.svg new file mode 100644 index 0000000..800d583 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/logo.svg @@ -0,0 +1,5 @@ + + + + + diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/magnifier-dark.svg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/magnifier-dark.svg new file mode 100644 index 0000000..5606a73 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/magnifier-dark.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/magnifier.svg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/magnifier.svg new file mode 100644 index 0000000..3ebeb48 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/magnifier.svg @@ -0,0 +1,3 @@ + + + diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/our-story.jpg b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/our-story.jpg new file mode 100644 index 0000000..89d1dc0 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/our-story.jpg differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-1.png b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-1.png new file mode 100644 index 0000000..beb723c Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-1.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-2.png b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-2.png new file mode 100644 index 0000000..1ad7cd1 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-2.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-3.png b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-3.png new file mode 100644 index 0000000..73e76c6 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-3.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-4.png b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-4.png new file mode 100644 index 0000000..3ec8971 Binary files /dev/null and b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Images/plant-4.png differ diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Personalization/ConditionTypes/IsInPersona.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Personalization/ConditionTypes/IsInPersona.css new file mode 100644 index 0000000..bca2c11 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Personalization/ConditionTypes/IsInPersona.css @@ -0,0 +1,34 @@ +.ktc-admin-ui ul.persona-selector-dialog { + margin: 0; + padding: 0; +} + +.ktc-admin-ui ul.persona-selector-dialog li { + list-style: none; + padding: 0 8px; +} + +.ktc-admin-ui ul.persona-selector-dialog li:hover { + background-color: #d0e8ed; +} + +.ktc-admin-ui ul.persona-selector-dialog li .line-wrapper { + padding: 5px 0; + width: 100%; + cursor: pointer; +} + +.ktc-admin-ui ul.persona-selector-dialog .ktc-radio { + position: absolute; + left: 16px; +} + +.ktc-admin-ui ul.persona-selector-dialog .persona-details { + margin-left: 28px; +} + +.ktc-admin-ui .persona-selector-dialog.no-personas { + color: red; + margin: 0 8px; + display: inline-block; +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Buttons.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Buttons.less new file mode 100644 index 0000000..9d03abd --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Buttons.less @@ -0,0 +1,48 @@ +/*# Buttons #*/ +.btn { + padding: .5rem 1rem; + cursor: pointer; + background: #fff; + display: inline-block; + text-decoration: none; + letter-spacing: 2px; + line-height: 2.14286; + color: @color-white; + background-color: @color-darkbrown; + text-transform: uppercase; + font-size: .875rem; + border: none; + + &:hover { + background: rgba(39, 34, 25, 0.8); + } +} + +.btn-primary { + padding: 0.5625rem 1.5rem; +} + +.btn:hover { + background: rgba(39, 34, 25, 0.8); +} + +.btn-more { + margin: 3.5rem 0; + text-transform: uppercase; + font-size: .875rem; +} + +.btn-disabled { + background-color: @color-gray-100; + border-color: @color-gray-90; + + &:hover { + background: @color-gray-100; + } +} + +@media (min-width: 768px) { + .btn-more { + padding: 1rem 2.5rem; + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Controls.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Controls.less new file mode 100644 index 0000000..c54975b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Controls.less @@ -0,0 +1,186 @@ +// Checkboxes and radios +// Uses font-icon for the checkboxes and radio buttons +// +// Common radio and checkbox styles +.radio, +.ktc-radio, +.checkbox, +.ktc-checkbox { + display: block; + + label { + display: inline-block; + cursor: pointer; + position: relative; + padding-left: @base-unit * 1.5; + line-height: @line-height-100; + font-weight: normal; + // Common styles for border and inner icon + &:before, + &:after { + content: ""; + width: @base-unit - 1px; // remove white bg around + height: @base-unit - 1px; // remove white bg around + line-height: @base-unit; + display: inline-block; + box-sizing: border-box; + position: absolute; + left: 0; + top: @base-unit * 0.125; // special alignment + background-color: @color-white; + } + // Inner icon specific + &:after { + background-color: transparent; + } + } + + input { + // Disabled styling + &[disabled], &:active[disabled] { + & + label { + cursor: not-allowed; + + &:before, &:focus:before, &:active:before { + color: @input-bg-disabled; + } + + &:after { + color: @input-color-disabled; + } + } + } + // Hide default inputs + .sr-only; + // Icons + + label:before, + + label:after { + font-family: @icon-font-name; + font-size: @icon-size-80; + text-align: center; + } + + + label:before { + color: @color-gray-130; + } + + + label:after { + color: @color-green-100; + } + // Focus + &:focus + label:before, + &:active + label:before { + color: @color-blue-100; + } + } +} +// Checkbox correction for Safari +&.Safari { + .checkbox, .ktc-checkbox { + label { + &:after { + height: @base-unit; + } + } + } +} +// Checkbox correction for Chrome +&.Chrome { + .checkbox, .ktc-checkbox { + label { + &:before, + &:after { + height: @base-unit; + } + } + } +} + +// Radio specific styles +.radio, +.ktc-radio { + input { + // Border - shown for both selected and unselected + ~ label:before { + content: @icon-rb-uncheck; + } + + &:disabled ~ label:before { + content: @icon-circle; + } + // Inner icon + &:checked ~ label:after { + content: @icon-rb-check-sign; + } + } + // Radio button border radius fix - because of background issue on table hover + label:before { + border-radius: 50%; + } +} + +// Checkbox specific styles +.checkbox, .ktc-checkbox { + input { + // Border - shown for both checked and unchecked + ~ label:before { + content: @icon-cb-uncheck; + } + + &:disabled ~ label:before { + content: @icon-cb-check-disabled; + } + // Inner icon + &:checked ~ label:after { + content: @icon-cb-check-sign; + } + } + + &:not(.checkbox-no-label), &:not(.ktc-checkbox-no-label) { + label { + margin-right: @base-unit * 0.5; + } + } +} + + + +// Vertical radio and checkbox lists +.radio-list-vertical, +.ktc-radio-list-vertical, +.checkbox-list-vertical, +.ktc-checkbox-list-vertical { + margin-top: (@base-unit * 0.25 + @input-border-width); + margin-right: @base-unit * 0.5; + + label:not(:first-of-type), + // When disabled, radio list item gets wrapped with a span + span:not(:first-of-type) label, + .radio + .radio, + .ktc-radio + .ktc-radio, + .checkbox + .checkbox, + .ktc-checkbox + .ktc-checkbox { + margin-top: @base-unit * 0.25; + } + // Use this class when the list is the first thing on the page + &.first-on-page { + margin-top: 0px; + } +} + +// Horizontal radio and checkbox lists +.radio-list-horizontal, +.ktc-radio-list-horizontal, +.checkbox-list-horizontal, +.ktc-checkbox-list-horizontal { + .radio, + .ktc-radio, + .checkbox, + .ktc-checkbox { + display: inline-block; + } + + label { + margin-right: @base-unit; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Fonts.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Fonts.less new file mode 100644 index 0000000..4c0e288 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Fonts.less @@ -0,0 +1,51 @@ +@font-face { + font-family: 'PT Serif'; + font-style: normal; + font-weight: 700; + src: local('PT Serif Bold'), local('PTSerif-Bold'), url(../Fonts/PTSerif-Bold.woff) format('woff'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 300; + src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(../Fonts/SourceSansPro-Light.woff) format('woff'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 400; + src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(../Fonts/SourceSansPro-Regular.woff) format('woff'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 700; + src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(../Fonts/SourceSansPro-Bold.woff) format('woff'); +} +@font-face { + font-family: 'Core-icons'; + src: url('../Fonts/Core-icons.eot'); + src: url('../Fonts/Core-icons.svg#Core-icons') format('svg'), url('../Fonts/Core-icons.eot?#iefix') format('embedded-opentype'), url('../Fonts/Core-icons.woff') format('woff'), url('../Fonts/Core-icons.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 300; + src: url(../Fonts/GT-Walsheim-Thin.woff); +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 400; + src: url(../Fonts/GT-Walsheim-Regular.woff); +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 500; + src: url(../Fonts/GT-Walsheim-Medium.woff); +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 700; + src: url(../Fonts/GT-Walsheim-Bold.woff); +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Form.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Form.less new file mode 100644 index 0000000..e57b875 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Form.less @@ -0,0 +1,126 @@ +/*# Form */ +@import "./variables.less"; + +div.contact-us-form { + .form-field { + margin-bottom: .8rem; + } + + .form-field-label { + margin-bottom: .3rem; + } + + .form-field-label-required:after { + content: "*"; + color: #B4594A; + } + + .input-style { + padding: .4rem; + width: 60%; + } + + .editing-form-control-nested-control input, + .editing-form-control-nested-control textarea { + .input-style(); + } + + .editing-form-control-nested-control textarea { + width: 100%; + height: 6rem; + } + + .field-validation-error { + font-weight: bold; + color: #D12127; + } + + input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; + padding: .6rem 2rem; + cursor: pointer; + color: @color-white; + background-color: @color-darkbrown; + border: none; + display: inline-block; + text-decoration: none; + text-transform: uppercase; + letter-spacing: 2px; + font-size: .875rem; + + &:hover { + background: rgba(39, 34, 25, 0.8); + } + } + + .ktc-file-component-wrapper { + .ktc-uploader-text { + max-width: ~"calc(100% - 26px)"; + text-overflow: ellipsis; + overflow: hidden; + vertical-align: bottom; + white-space: nowrap; + display: inline-block; + } + + .ktc-uploader-icon-button { + font-family: @icon-font-name; + font-size: @base-unit * 1.25; + position: absolute; + right: 8px; + color: @color-gray-80; + line-height: 24px; + } + + .ktc-uploader-icon-button[data-icon="select"]::before { + content: @icon-arrow-up-line; + cursor: pointer; + } + + @keyframes spin { + 0% { + transform: rotate(0deg); + } + + 100% { + transform: rotate(359deg); + } + } + + .ktc-uploader-icon-button[data-icon="loading"]::before { + content: @icon-spinner; + display: inline-block; + animation: spin 1.2s infinite linear; + } + + .ktc-uploader-icon-button[data-icon="remove"] { + cursor: pointer; + + &::before { + content: @icon-bin; + } + } + + .ktc-uploader-replacement { + display: none; + } + + .ktc-uploader-text-button { + display: none; + } + + input[type="file"] { + display: none; + } + + label { + .form-field(); + .input-style(); + display: inline-block; + border: 1px solid #BEBEBE; + position: relative; + cursor: pointer; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Gallery.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Gallery.less new file mode 100644 index 0000000..194ff4f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Gallery.less @@ -0,0 +1,49 @@ +.media-gallery { + margin-top: 2.5rem; + + .cafe-overlay { + background-color: rgba(0, 0, 0, 0.4); + display: block; + height: 100%; + position: absolute; + width: 100%; + z-index: 10; + + .ourcoffee-tile-text { + font-size: 1.375rem; + font-weight: 700; + position: absolute; + top: 50%; + } + } + + .media-item { + span { + visibility: hidden; + } + + &:hover { + span { + visibility: visible; + } + } + + &.col-lg-6 { + margin-top: -1px; + } + } + + .ratio-4-3 { + width: 100%; + position: relative; + background: url() 50% 50% no-repeat; + background-size: cover; + background-clip: content-box; + + &:before { + display: block; + content: ""; + padding-top: 75%; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Grid.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Grid.less new file mode 100644 index 0000000..59616c9 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Grid.less @@ -0,0 +1,1576 @@ +/*! normalize.css v3.0.1 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} + +body { + margin: 0; +} + +article, +aside, +details, +figcaption, +figure, +footer, +header, +main, +nav, +section, +summary { + display: block; +} + +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} + +audio:not([controls]) { + display: none; + height: 0; +} + +[hidden], +template { + display: none; +} + +a { + background: transparent; +} + +a:active, +a:hover { + outline: 0; +} + +abbr[title] { + border-bottom: 1px dotted; +} + +b, +strong { + font-weight: bold; +} + +dfn { + font-style: italic; +} + +h1 { + font-size: 2em; + margin: 0.67em 0; +} + +mark { + background: #ff0; + color: #000; +} + +small { + font-size: 80%; +} + +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} + +sup { + top: -0.5em; +} + +sub { + bottom: -0.25em; +} + +img { + border: 0; +} + +svg:not(:root) { + overflow: hidden; +} + +figure { + margin: 1em 40px; +} + +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} + +pre { + overflow: auto; +} + +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} + +button, +input, +optgroup, +select, +textarea { + color: inherit; + font: inherit; + margin: 0; +} + +button { + overflow: visible; +} + +button, +select { + text-transform: none; +} + +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} + +button[disabled], +html input[disabled] { + cursor: not-allowed; +} + +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} + +input { + line-height: normal; +} + +input[type="text"], +input[type="email"], +textarea { + border: 1px solid #BEBEBE; +} + +input[type="text"]:focus, +input[type="email"]:focus, +textarea:focus { + outline: 0; + box-shadow: 0 0 1px #08768c; + border: 1px solid #08768c; +} + +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; +} + +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} + +input[type="search"] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} + +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} + +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} + +legend { + border: 0; + padding: 0; +} + +textarea { + overflow: auto; +} + +optgroup { + font-weight: bold; +} + +table { + border-collapse: collapse; + border-spacing: 0; +} + +td, +th { + padding: 0; +} + +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +/*# Typography #*/ +body { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; + line-height: 1.4; + color: #1C1C1C; + background-color: #ffffff; +} + +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} + +a { + color: @color-lightbrown; + text-decoration: underline; +} + +a:hover, +a:focus { + text-decoration: none; +} + +h1 a, +.h1 a, +h2 a, +.h2 a, +h3 a, +.h3 a, +h4 a, +.h4 a, +h5 a, +.h5 a{ + text-decoration: none; +} + +h1 a:hover, +h1 a:focus, +.h1 a:hover, +.h1 a:focus, +h2 a:hover, +h2 a:focus, +.h2 a:hover, +.h2 a:focus, +h3 a:hover, +h3 a:focus, +.h3 a:hover, +.h3 a:focus, +h4 a:hover, +h4 a:focus, +.h4 a:hover, +.h4 a:focus, +h5 a:hover, +h5 a:focus, +.h5 a:hover, +.h5 a:focus{ + text-decoration: underline; +} + +h1, +h2, +h3, +.h1, +.h2, +.h3 { + line-height: 1.4; + color: @color-brown; + margin-bottom: 0.7rem; +} + +h1, +.h1 { + font-weight: 400; + font-size: 4rem; +} + +h2, +.h2 { + font-weight: 500; + font-size: 3rem; + margin-top: 3rem; + margin-bottom: 2rem; + line-height: 1; +} + +h3, +.h3 { + font-weight: 500; + font-size: 2rem; +} + +h4, +.h4 { + font-weight: 700; + font-size: 1.375rem; + margin-top: 1rem; + margin-bottom: 0.7rem; + line-height: 1.4; + color: inherit; +} + +h5, +.h5 { + font-weight: 400; + font-size: 1.75rem; + margin-bottom: 1.625rem; + line-height: 1.143; + color: inherit; +} + +p { + margin: 0 0 0.625rem; + margin-bottom: 0.7rem; +} + +.lead-paragraph { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 300; + margin-bottom: 20px; + font-size: 1.375rem; + line-height: 1.4; +} + +/*# Grid #*/ +.container { + margin-right: auto; + margin-left: auto; + padding-left: 8px; + padding-right: 8px; +} + +.row { + margin-left: -0.5px; + margin-right: -0.5px; +} + +.row--with-cols-padding { + padding: 0 3rem; + + @media (max-width: 768px) { + padding: 0 1rem; + } + + > div[class^='col-'], > div[class*=' col-'] { + padding-bottom: 0px; + + &:last-child { + padding-left: 1rem; + + @media (max-width: 768px) { + padding-left: 0; + } + } + + &:first-child { + padding-right: 1rem; + + @media (max-width: 768px) { + padding-right: 0; + } + } + + &:not(:last-child):not(:first-child) { + padding-right: 0.5rem; + padding-left: 0.5rem; + + @media (max-width: 768px) { + padding-right: 0; + padding-left: 0; + } + } + } +} + +.col-xs-1, .col-sm-1, .col-md-1, .col-lg-1, .col-xs-2, .col-sm-2, .col-md-2, .col-lg-2, .col-xs-3, .col-sm-3, .col-md-3, .col-lg-3, .col-xs-4, .col-sm-4, .col-md-4, .col-lg-4, .col-xs-5, .col-sm-5, .col-md-5, .col-lg-5, .col-xs-6, .col-sm-6, .col-md-6, .col-lg-6, .col-xs-7, .col-sm-7, .col-md-7, .col-lg-7, .col-xs-8, .col-sm-8, .col-md-8, .col-lg-8, .col-xs-9, .col-sm-9, .col-md-9, .col-lg-9, .col-xs-10, .col-sm-10, .col-md-10, .col-lg-10, .col-xs-11, .col-sm-11, .col-md-11, .col-lg-11, .col-xs-12, .col-sm-12, .col-md-12, .col-lg-12 { + position: relative; + min-height: 1px; + padding-left: 0.5px; + padding-right: 0.5px; + padding-bottom: 1px; +} + +.col-xs-1, .col-xs-2, .col-xs-3, .col-xs-4, .col-xs-5, .col-xs-6, .col-xs-7, .col-xs-8, .col-xs-9, .col-xs-10, .col-xs-11, .col-xs-12 { + float: left; +} + +.col-xs-12 { + width: 100%; +} + +.col-xs-11 { + width: 91.66666667%; +} + +.col-xs-10 { + width: 83.33333333%; +} + +.col-xs-9 { + width: 75%; +} + +.col-xs-8 { + width: 66.66666667%; +} + +.col-xs-7 { + width: 58.33333333%; +} + +.col-xs-6 { + width: 50%; +} + +.col-xs-5 { + width: 41.66666667%; +} + +.col-xs-4 { + width: 33.33333333%; +} + +.col-xs-3 { + width: 25%; +} + +.col-xs-2 { + width: 16.66666667%; +} + +.col-xs-1 { + width: 8.33333333%; +} + +.col-xs-pull-12 { + right: 100%; +} + +.col-xs-pull-11 { + right: 91.66666667%; +} + +.col-xs-pull-10 { + right: 83.33333333%; +} + +.col-xs-pull-9 { + right: 75%; +} + +.col-xs-pull-8 { + right: 66.66666667%; +} + +.col-xs-pull-7 { + right: 58.33333333%; +} + +.col-xs-pull-6 { + right: 50%; +} + +.col-xs-pull-5 { + right: 41.66666667%; +} + +.col-xs-pull-4 { + right: 33.33333333%; +} + +.col-xs-pull-3 { + right: 25%; +} + +.col-xs-pull-2 { + right: 16.66666667%; +} + +.col-xs-pull-1 { + right: 8.33333333%; +} + +.col-xs-pull-0 { + right: auto; +} + +.col-xs-push-12 { + left: 100%; +} + +.col-xs-push-11 { + left: 91.66666667%; +} + +.col-xs-push-10 { + left: 83.33333333%; +} + +.col-xs-push-9 { + left: 75%; +} + +.col-xs-push-8 { + left: 66.66666667%; +} + +.col-xs-push-7 { + left: 58.33333333%; +} + +.col-xs-push-6 { + left: 50%; +} + +.col-xs-push-5 { + left: 41.66666667%; +} + +.col-xs-push-4 { + left: 33.33333333%; +} + +.col-xs-push-3 { + left: 25%; +} + +.col-xs-push-2 { + left: 16.66666667%; +} + +.col-xs-push-1 { + left: 8.33333333%; +} + +.col-xs-push-0 { + left: auto; +} + +.col-xs-offset-12 { + margin-left: 100%; +} + +.col-xs-offset-11 { + margin-left: 91.66666667%; +} + +.col-xs-offset-10 { + margin-left: 83.33333333%; +} + +.col-xs-offset-9 { + margin-left: 75%; +} + +.col-xs-offset-8 { + margin-left: 66.66666667%; +} + +.col-xs-offset-7 { + margin-left: 58.33333333%; +} + +.col-xs-offset-6 { + margin-left: 50%; +} + +.col-xs-offset-5 { + margin-left: 41.66666667%; +} + +.col-xs-offset-4 { + margin-left: 33.33333333%; +} + +.col-xs-offset-3 { + margin-left: 25%; +} + +.col-xs-offset-2 { + margin-left: 16.66666667%; +} + +.col-xs-offset-1 { + margin-left: 8.33333333%; +} + +.col-xs-offset-0 { + margin-left: 0%; +} + +@media (min-width: 500px) { + .container { + width: 484px; + } + + .col-sm-1, .col-sm-2, .col-sm-3, .col-sm-4, .col-sm-5, .col-sm-6, .col-sm-7, .col-sm-8, .col-sm-9, .col-sm-10, .col-sm-11, .col-sm-12 { + float: left; + } + + .col-sm-12 { + width: 100%; + } + + .col-sm-11 { + width: 91.66666667%; + } + + .col-sm-10 { + width: 83.33333333%; + } + + .col-sm-9 { + width: 75%; + } + + .col-sm-8 { + width: 66.66666667%; + } + + .col-sm-7 { + width: 58.33333333%; + } + + .col-sm-6 { + width: 50%; + } + + .col-sm-5 { + width: 41.66666667%; + } + + .col-sm-4 { + width: 33.33333333%; + } + + .col-sm-3 { + width: 25%; + } + + .col-sm-2 { + width: 16.66666667%; + } + + .col-sm-1 { + width: 8.33333333%; + } + + .col-sm-pull-12 { + right: 100%; + } + + .col-sm-pull-11 { + right: 91.66666667%; + } + + .col-sm-pull-10 { + right: 83.33333333%; + } + + .col-sm-pull-9 { + right: 75%; + } + + .col-sm-pull-8 { + right: 66.66666667%; + } + + .col-sm-pull-7 { + right: 58.33333333%; + } + + .col-sm-pull-6 { + right: 50%; + } + + .col-sm-pull-5 { + right: 41.66666667%; + } + + .col-sm-pull-4 { + right: 33.33333333%; + } + + .col-sm-pull-3 { + right: 25%; + } + + .col-sm-pull-2 { + right: 16.66666667%; + } + + .col-sm-pull-1 { + right: 8.33333333%; + } + + .col-sm-pull-0 { + right: auto; + } + + .col-sm-push-12 { + left: 100%; + } + + .col-sm-push-11 { + left: 91.66666667%; + } + + .col-sm-push-10 { + left: 83.33333333%; + } + + .col-sm-push-9 { + left: 75%; + } + + .col-sm-push-8 { + left: 66.66666667%; + } + + .col-sm-push-7 { + left: 58.33333333%; + } + + .col-sm-push-6 { + left: 50%; + } + + .col-sm-push-5 { + left: 41.66666667%; + } + + .col-sm-push-4 { + left: 33.33333333%; + } + + .col-sm-push-3 { + left: 25%; + } + + .col-sm-push-2 { + left: 16.66666667%; + } + + .col-sm-push-1 { + left: 8.33333333%; + } + + .col-sm-push-0 { + left: auto; + } + + .col-sm-offset-12 { + margin-left: 100%; + } + + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + + .col-sm-offset-9 { + margin-left: 75%; + } + + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + + .col-sm-offset-6 { + margin-left: 50%; + } + + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + + .col-sm-offset-3 { + margin-left: 25%; + } + + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + + .col-sm-offset-0 { + margin-left: 0%; + } +} + +@media (min-width: 768px) { + .container { + width: 752px; + } + + .col-md-1, .col-md-2, .col-md-3, .col-md-4, .col-md-5, .col-md-6, .col-md-7, .col-md-8, .col-md-9, .col-md-10, .col-md-11, .col-md-12 { + float: left; + } + + .col-md-12 { + width: 100%; + } + + .col-md-11 { + width: 91.66666667%; + } + + .col-md-10 { + width: 83.33333333%; + } + + .col-md-9 { + width: 75%; + } + + .col-md-8 { + width: 66.66666667%; + } + + .col-md-7 { + width: 58.33333333%; + } + + .col-md-6 { + width: 50%; + } + + .col-md-5 { + width: 41.66666667%; + } + + .col-md-4 { + width: 33.33333333%; + } + + .col-md-3 { + width: 25%; + } + + .col-md-2 { + width: 16.66666667%; + } + + .col-md-1 { + width: 8.33333333%; + } + + .col-md-pull-12 { + right: 100%; + } + + .col-md-pull-11 { + right: 91.66666667%; + } + + .col-md-pull-10 { + right: 83.33333333%; + } + + .col-md-pull-9 { + right: 75%; + } + + .col-md-pull-8 { + right: 66.66666667%; + } + + .col-md-pull-7 { + right: 58.33333333%; + } + + .col-md-pull-6 { + right: 50%; + } + + .col-md-pull-5 { + right: 41.66666667%; + } + + .col-md-pull-4 { + right: 33.33333333%; + } + + .col-md-pull-3 { + right: 25%; + } + + .col-md-pull-2 { + right: 16.66666667%; + } + + .col-md-pull-1 { + right: 8.33333333%; + } + + .col-md-pull-0 { + right: auto; + } + + .col-md-push-12 { + left: 100%; + } + + .col-md-push-11 { + left: 91.66666667%; + } + + .col-md-push-10 { + left: 83.33333333%; + } + + .col-md-push-9 { + left: 75%; + } + + .col-md-push-8 { + left: 66.66666667%; + } + + .col-md-push-7 { + left: 58.33333333%; + } + + .col-md-push-6 { + left: 50%; + } + + .col-md-push-5 { + left: 41.66666667%; + } + + .col-md-push-4 { + left: 33.33333333%; + } + + .col-md-push-3 { + left: 25%; + } + + .col-md-push-2 { + left: 16.66666667%; + } + + .col-md-push-1 { + left: 8.33333333%; + } + + .col-md-push-0 { + left: auto; + } + + .col-md-offset-12 { + margin-left: 100%; + } + + .col-md-offset-11 { + margin-left: 91.66666667%; + } + + .col-md-offset-10 { + margin-left: 83.33333333%; + } + + .col-md-offset-9 { + margin-left: 75%; + } + + .col-md-offset-8 { + margin-left: 66.66666667%; + } + + .col-md-offset-7 { + margin-left: 58.33333333%; + } + + .col-md-offset-6 { + margin-left: 50%; + } + + .col-md-offset-5 { + margin-left: 41.66666667%; + } + + .col-md-offset-4 { + margin-left: 33.33333333%; + } + + .col-md-offset-3 { + margin-left: 25%; + } + + .col-md-offset-2 { + margin-left: 16.66666667%; + } + + .col-md-offset-1 { + margin-left: 8.33333333%; + } + + .col-md-offset-0 { + margin-left: 0%; + } +} + +@media (min-width: 1112px) { + .container { + width: 1096px; + } + + .col-lg-1, .col-lg-2, .col-lg-3, .col-lg-4, .col-lg-5, .col-lg-6, .col-lg-7, .col-lg-8, .col-lg-9, .col-lg-10, .col-lg-11, .col-lg-12 { + float: left; + } + + .col-lg-12 { + width: 100%; + } + + .col-lg-11 { + width: 91.66666667%; + } + + .col-lg-10 { + width: 83.33333333%; + } + + .col-lg-9 { + width: 75%; + } + + .col-lg-8 { + width: 66.66666667%; + } + + .col-lg-7 { + width: 58.33333333%; + } + + .col-lg-6 { + width: 50%; + } + + .col-lg-5 { + width: 41.66666667%; + } + + .col-lg-4 { + width: 33.33333333%; + } + + .col-lg-3 { + width: 25%; + } + + .col-lg-2 { + width: 16.66666667%; + } + + .col-lg-1 { + width: 8.33333333%; + } + + .col-lg-pull-12 { + right: 100%; + } + + .col-lg-pull-11 { + right: 91.66666667%; + } + + .col-lg-pull-10 { + right: 83.33333333%; + } + + .col-lg-pull-9 { + right: 75%; + } + + .col-lg-pull-8 { + right: 66.66666667%; + } + + .col-lg-pull-7 { + right: 58.33333333%; + } + + .col-lg-pull-6 { + right: 50%; + } + + .col-lg-pull-5 { + right: 41.66666667%; + } + + .col-lg-pull-4 { + right: 33.33333333%; + } + + .col-lg-pull-3 { + right: 25%; + } + + .col-lg-pull-2 { + right: 16.66666667%; + } + + .col-lg-pull-1 { + right: 8.33333333%; + } + + .col-lg-pull-0 { + right: auto; + } + + .col-lg-push-12 { + left: 100%; + } + + .col-lg-push-11 { + left: 91.66666667%; + } + + .col-lg-push-10 { + left: 83.33333333%; + } + + .col-lg-push-9 { + left: 75%; + } + + .col-lg-push-8 { + left: 66.66666667%; + } + + .col-lg-push-7 { + left: 58.33333333%; + } + + .col-lg-push-6 { + left: 50%; + } + + .col-lg-push-5 { + left: 41.66666667%; + } + + .col-lg-push-4 { + left: 33.33333333%; + } + + .col-lg-push-3 { + left: 25%; + } + + .col-lg-push-2 { + left: 16.66666667%; + } + + .col-lg-push-1 { + left: 8.33333333%; + } + + .col-lg-push-0 { + left: auto; + } + + .col-lg-offset-12 { + margin-left: 100%; + } + + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + + .col-lg-offset-9 { + margin-left: 75%; + } + + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + + .col-lg-offset-6 { + margin-left: 50%; + } + + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + + .col-lg-offset-3 { + margin-left: 25%; + } + + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + + .col-lg-offset-0 { + margin-left: 0; + } +} + +@media (min-width: 1440px) { + .container { + width: 1424px; + } + + .col-xl-1, .col-xl-2, .col-xl-3, .col-xl-4, .col-xl-5, .col-xl-6, .col-xl-7, .col-xl-8, .col-xl-9, .col-xl-10, .col-xl-11, .col-xl-12 { + float: left; + } + + .col-xl-12 { + width: 100%; + } + + .col-xl-11 { + width: 91.66666667%; + } + + .col-xl-10 { + width: 83.33333333%; + } + + .col-xl-9 { + width: 75%; + } + + .col-xl-8 { + width: 66.66666667%; + } + + .col-xl-7 { + width: 58.33333333%; + } + + .col-xl-6 { + width: 50%; + } + + .col-xl-5 { + width: 41.66666667%; + } + + .col-xl-4 { + width: 33.33333333%; + } + + .col-xl-3 { + width: 25%; + } + + .col-xl-2 { + width: 16.66666667%; + } + + .col-xl-1 { + width: 8.33333333%; + } + + .col-xl-pull-12 { + right: 100%; + } + + .col-xl-pull-11 { + right: 91.66666667%; + } + + .col-xl-pull-10 { + right: 83.33333333%; + } + + .col-xl-pull-9 { + right: 75%; + } + + .col-xl-pull-8 { + right: 66.66666667%; + } + + .col-xl-pull-7 { + right: 58.33333333%; + } + + .col-xl-pull-6 { + right: 50%; + } + + .col-xl-pull-5 { + right: 41.66666667%; + } + + .col-xl-pull-4 { + right: 33.33333333%; + } + + .col-xl-pull-3 { + right: 25%; + } + + .col-xl-pull-2 { + right: 16.66666667%; + } + + .col-xl-pull-1 { + right: 8.33333333%; + } + + .col-xl-pull-0 { + right: auto; + } + + .col-xl-push-12 { + left: 100%; + } + + .col-xl-push-11 { + left: 91.66666667%; + } + + .col-xl-push-10 { + left: 83.33333333%; + } + + .col-xl-push-9 { + left: 75%; + } + + .col-xl-push-8 { + left: 66.66666667%; + } + + .col-xl-push-7 { + left: 58.33333333%; + } + + .col-xl-push-6 { + left: 50%; + } + + .col-xl-push-5 { + left: 41.66666667%; + } + + .col-xl-push-4 { + left: 33.33333333%; + } + + .col-xl-push-3 { + left: 25%; + } + + .col-xl-push-2 { + left: 16.66666667%; + } + + .col-xl-push-1 { + left: 8.33333333%; + } + + .col-xl-push-0 { + left: auto; + } + + .col-xl-offset-12 { + margin-left: 100%; + } + + .col-xl-offset-11 { + margin-left: 91.66666667%; + } + + .col-xl-offset-10 { + margin-left: 83.33333333%; + } + + .col-xl-offset-9 { + margin-left: 75%; + } + + .col-xl-offset-8 { + margin-left: 66.66666667%; + } + + .col-xl-offset-7 { + margin-left: 58.33333333%; + } + + .col-xl-offset-6 { + margin-left: 50%; + } + + .col-xl-offset-5 { + margin-left: 41.66666667%; + } + + .col-xl-offset-4 { + margin-left: 33.33333333%; + } + + .col-xl-offset-3 { + margin-left: 25%; + } + + .col-xl-offset-2 { + margin-left: 16.66666667%; + } + + .col-xl-offset-1 { + margin-left: 8.33333333%; + } + + .col-xl-offset-0 { + margin-left: 0; + } +} + +@media (max-width: 499px) { + .xs-hidden { + display: none; + } +} + +@media (min-width:500px) and (max-width: 767px) { + .sm-hidden { + display: none; + } +} + +@media (min-width:768px) and (max-width: 1111px) { + .md-hidden { + display: none; + } +} + +@media (min-width: 1112px) { + .lg-hidden { + display: none; + } +} + +/*# Utilities #*/ + +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.row:before, +.row:after { + content: " "; + display: table; +} + +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.row:after { + clear: both; +} + +.img-responsive { + display: block; + width: 100%; + max-width: 100%; + height: auto; +} + +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} + +.cursor-hand { + cursor: pointer; +} + +.image-responsive { + max-width: 100%; +} + +.clear { + clear: both; +} + +.center-text { + text-align: center; +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Landing-page.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Landing-page.css new file mode 100644 index 0000000..49da8f8 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Landing-page.css @@ -0,0 +1,4882 @@ +@font-face { + font-family: 'PT Serif'; + font-style: normal; + font-weight: 700; + src: local('PT Serif Bold'), local('PTSerif-Bold'), url(../Fonts/PTSerif-Bold.woff) format('woff'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 300; + src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(../Fonts/SourceSansPro-Light.woff) format('woff'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 400; + src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(../Fonts/SourceSansPro-Regular.woff) format('woff'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 700; + src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(../Fonts/SourceSansPro-Bold.woff) format('woff'); +} +@font-face { + font-family: 'Core-icons'; + src: url('../Fonts/Core-icons.eot'); + src: url('../Fonts/Core-icons.svg#Core-icons') format('svg'), url('../Fonts/Core-icons.eot?#iefix') format('embedded-opentype'), url('../Fonts/Core-icons.woff') format('woff'), url('../Fonts/Core-icons.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 300; + src: url(../Fonts/GT-Walsheim-Thin.woff); +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 400; + src: url(../Fonts/GT-Walsheim-Regular.woff); +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 500; + src: url(../Fonts/GT-Walsheim-Medium.woff); +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 700; + src: url(../Fonts/GT-Walsheim-Bold.woff); +} +/*! normalize.css v3.0.1 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +main, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + font-size: 2em; + margin: 0.67em 0; +} +mark { + background: #ff0; + color: #000; +} +small { + font-size: 80%; +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + color: inherit; + font: inherit; + margin: 0; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: not-allowed; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +input { + line-height: normal; +} +input[type="text"], +input[type="email"], +textarea { + border: 1px solid #BEBEBE; +} +input[type="text"]:focus, +input[type="email"]:focus, +textarea:focus { + outline: 0; + box-shadow: 0 0 1px #08768c; + border: 1px solid #08768c; +} +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} +legend { + border: 0; + padding: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +td, +th { + padding: 0; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +/*# Typography #*/ +body { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; + line-height: 1.4; + color: #1C1C1C; + background-color: #ffffff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #B49669; + text-decoration: underline; +} +a:hover, +a:focus { + text-decoration: none; +} +h1 a, +.h1 a, +h2 a, +.h2 a, +h3 a, +.h3 a, +h4 a, +.h4 a, +h5 a, +.h5 a { + text-decoration: none; +} +h1 a:hover, +h1 a:focus, +.h1 a:hover, +.h1 a:focus, +h2 a:hover, +h2 a:focus, +.h2 a:hover, +.h2 a:focus, +h3 a:hover, +h3 a:focus, +.h3 a:hover, +.h3 a:focus, +h4 a:hover, +h4 a:focus, +.h4 a:hover, +.h4 a:focus, +h5 a:hover, +h5 a:focus, +.h5 a:hover, +.h5 a:focus { + text-decoration: underline; +} +h1, +h2, +h3, +.h1, +.h2, +.h3 { + line-height: 1.4; + color: #846331; + margin-bottom: 0.7rem; +} +h1, +.h1 { + font-weight: 400; + font-size: 4rem; +} +h2, +.h2 { + font-weight: 500; + font-size: 3rem; + margin-top: 3rem; + margin-bottom: 2rem; + line-height: 1; +} +h3, +.h3 { + font-weight: 500; + font-size: 2rem; +} +h4, +.h4 { + font-weight: 700; + font-size: 1.375rem; + margin-top: 1rem; + margin-bottom: 0.7rem; + line-height: 1.4; + color: inherit; +} +h5, +.h5 { + font-weight: 400; + font-size: 1.75rem; + margin-bottom: 1.625rem; + line-height: 1.143; + color: inherit; +} +p { + margin: 0 0 0.625rem; + margin-bottom: 0.7rem; +} +.lead-paragraph { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 300; + margin-bottom: 20px; + font-size: 1.375rem; + line-height: 1.4; +} +/*# Grid #*/ +.container { + margin-right: auto; + margin-left: auto; + padding-left: 8px; + padding-right: 8px; +} +.row { + margin-left: -0.5px; + margin-right: -0.5px; +} +.row--with-cols-padding { + padding: 0 3rem; +} +@media (max-width: 768px) { + .row--with-cols-padding { + padding: 0 1rem; + } +} +.row--with-cols-padding > div[class^='col-'], +.row--with-cols-padding > div[class*=' col-'] { + padding-bottom: 0px; +} +.row--with-cols-padding > div[class^='col-']:last-child, +.row--with-cols-padding > div[class*=' col-']:last-child { + padding-left: 1rem; +} +@media (max-width: 768px) { + .row--with-cols-padding > div[class^='col-']:last-child, + .row--with-cols-padding > div[class*=' col-']:last-child { + padding-left: 0; + } +} +.row--with-cols-padding > div[class^='col-']:first-child, +.row--with-cols-padding > div[class*=' col-']:first-child { + padding-right: 1rem; +} +@media (max-width: 768px) { + .row--with-cols-padding > div[class^='col-']:first-child, + .row--with-cols-padding > div[class*=' col-']:first-child { + padding-right: 0; + } +} +.row--with-cols-padding > div[class^='col-']:not(:last-child):not(:first-child), +.row--with-cols-padding > div[class*=' col-']:not(:last-child):not(:first-child) { + padding-right: 0.5rem; + padding-left: 0.5rem; +} +@media (max-width: 768px) { + .row--with-cols-padding > div[class^='col-']:not(:last-child):not(:first-child), + .row--with-cols-padding > div[class*=' col-']:not(:last-child):not(:first-child) { + padding-right: 0; + padding-left: 0; + } +} +.col-xs-1, +.col-sm-1, +.col-md-1, +.col-lg-1, +.col-xs-2, +.col-sm-2, +.col-md-2, +.col-lg-2, +.col-xs-3, +.col-sm-3, +.col-md-3, +.col-lg-3, +.col-xs-4, +.col-sm-4, +.col-md-4, +.col-lg-4, +.col-xs-5, +.col-sm-5, +.col-md-5, +.col-lg-5, +.col-xs-6, +.col-sm-6, +.col-md-6, +.col-lg-6, +.col-xs-7, +.col-sm-7, +.col-md-7, +.col-lg-7, +.col-xs-8, +.col-sm-8, +.col-md-8, +.col-lg-8, +.col-xs-9, +.col-sm-9, +.col-md-9, +.col-lg-9, +.col-xs-10, +.col-sm-10, +.col-md-10, +.col-lg-10, +.col-xs-11, +.col-sm-11, +.col-md-11, +.col-lg-11, +.col-xs-12, +.col-sm-12, +.col-md-12, +.col-lg-12 { + position: relative; + min-height: 1px; + padding-left: 0.5px; + padding-right: 0.5px; + padding-bottom: 1px; +} +.col-xs-1, +.col-xs-2, +.col-xs-3, +.col-xs-4, +.col-xs-5, +.col-xs-6, +.col-xs-7, +.col-xs-8, +.col-xs-9, +.col-xs-10, +.col-xs-11, +.col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0%; +} +@media (min-width: 500px) { + .container { + width: 484px; + } + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0%; + } +} +@media (min-width: 768px) { + .container { + width: 752px; + } + .col-md-1, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9, + .col-md-10, + .col-md-11, + .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0%; + } +} +@media (min-width: 1112px) { + .container { + width: 1096px; + } + .col-lg-1, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-10, + .col-lg-11, + .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0; + } +} +@media (min-width: 1440px) { + .container { + width: 1424px; + } + .col-xl-1, + .col-xl-2, + .col-xl-3, + .col-xl-4, + .col-xl-5, + .col-xl-6, + .col-xl-7, + .col-xl-8, + .col-xl-9, + .col-xl-10, + .col-xl-11, + .col-xl-12 { + float: left; + } + .col-xl-12 { + width: 100%; + } + .col-xl-11 { + width: 91.66666667%; + } + .col-xl-10 { + width: 83.33333333%; + } + .col-xl-9 { + width: 75%; + } + .col-xl-8 { + width: 66.66666667%; + } + .col-xl-7 { + width: 58.33333333%; + } + .col-xl-6 { + width: 50%; + } + .col-xl-5 { + width: 41.66666667%; + } + .col-xl-4 { + width: 33.33333333%; + } + .col-xl-3 { + width: 25%; + } + .col-xl-2 { + width: 16.66666667%; + } + .col-xl-1 { + width: 8.33333333%; + } + .col-xl-pull-12 { + right: 100%; + } + .col-xl-pull-11 { + right: 91.66666667%; + } + .col-xl-pull-10 { + right: 83.33333333%; + } + .col-xl-pull-9 { + right: 75%; + } + .col-xl-pull-8 { + right: 66.66666667%; + } + .col-xl-pull-7 { + right: 58.33333333%; + } + .col-xl-pull-6 { + right: 50%; + } + .col-xl-pull-5 { + right: 41.66666667%; + } + .col-xl-pull-4 { + right: 33.33333333%; + } + .col-xl-pull-3 { + right: 25%; + } + .col-xl-pull-2 { + right: 16.66666667%; + } + .col-xl-pull-1 { + right: 8.33333333%; + } + .col-xl-pull-0 { + right: auto; + } + .col-xl-push-12 { + left: 100%; + } + .col-xl-push-11 { + left: 91.66666667%; + } + .col-xl-push-10 { + left: 83.33333333%; + } + .col-xl-push-9 { + left: 75%; + } + .col-xl-push-8 { + left: 66.66666667%; + } + .col-xl-push-7 { + left: 58.33333333%; + } + .col-xl-push-6 { + left: 50%; + } + .col-xl-push-5 { + left: 41.66666667%; + } + .col-xl-push-4 { + left: 33.33333333%; + } + .col-xl-push-3 { + left: 25%; + } + .col-xl-push-2 { + left: 16.66666667%; + } + .col-xl-push-1 { + left: 8.33333333%; + } + .col-xl-push-0 { + left: auto; + } + .col-xl-offset-12 { + margin-left: 100%; + } + .col-xl-offset-11 { + margin-left: 91.66666667%; + } + .col-xl-offset-10 { + margin-left: 83.33333333%; + } + .col-xl-offset-9 { + margin-left: 75%; + } + .col-xl-offset-8 { + margin-left: 66.66666667%; + } + .col-xl-offset-7 { + margin-left: 58.33333333%; + } + .col-xl-offset-6 { + margin-left: 50%; + } + .col-xl-offset-5 { + margin-left: 41.66666667%; + } + .col-xl-offset-4 { + margin-left: 33.33333333%; + } + .col-xl-offset-3 { + margin-left: 25%; + } + .col-xl-offset-2 { + margin-left: 16.66666667%; + } + .col-xl-offset-1 { + margin-left: 8.33333333%; + } + .col-xl-offset-0 { + margin-left: 0; + } +} +@media (max-width: 499px) { + .xs-hidden { + display: none; + } +} +@media (min-width: 500px) and (max-width: 767px) { + .sm-hidden { + display: none; + } +} +@media (min-width: 768px) and (max-width: 1111px) { + .md-hidden { + display: none; + } +} +@media (min-width: 1112px) { + .lg-hidden { + display: none; + } +} +/*# Utilities #*/ +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.row:before, +.row:after { + content: " "; + display: table; +} +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.row:after { + clear: both; +} +.img-responsive { + display: block; + width: 100%; + max-width: 100%; + height: auto; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.cursor-hand { + cursor: pointer; +} +.image-responsive { + max-width: 100%; +} +.clear { + clear: both; +} +.center-text { + text-align: center; +} +[class^="icon-"], +[class*=" icon-"] { + font-family: 'Core-icons'; + display: inline-block; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + font-size: 16px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background-image: none; +} +[class^="icon-"]:before { + content: "\e619"; +} +.icon-only:before { + content: none; +} +.icon-dots-vertical:before { + content: "\e75d"; +} +.icon-chain:before { + content: "\e67f"; +} +.icon-chain-slash:before { + content: "\e691"; +} +.icon-list-bullets:before { + content: "\e754"; +} +.icon-list-numbers:before { + content: "\e75b"; +} +.icon-eye-slash:before { + content: "\e75c"; +} +.icon-arrow-u-right:before { + content: "\e703"; +} +.icon-arrow-u-left:before { + content: "\e677"; +} +.icon-arrow-down:before { + content: "\e682"; +} +.icon-arrow-up:before { + content: "\e64c"; +} +.icon-arrow-left:before { + content: "\e6dc"; +} +.icon-arrow-right:before { + content: "\e6da"; +} +.icon-arrow-down-circle:before { + content: "\e6ae"; +} +.icon-arrow-left-circle:before { + content: "\e6af"; +} +.icon-arrow-right-circle:before { + content: "\e6b1"; +} +.icon-arrow-up-circle:before { + content: "\e6bf"; +} +.icon-arrow-left-rect:before { + content: "\e6db"; +} +.icon-arrow-right-rect:before { + content: "\e6d9"; +} +.icon-arrow-crooked-left:before { + content: "\e6e0"; +} +.icon-arrow-crooked-right:before { + content: "\e6e1"; +} +.icon-arrow-double-left:before { + content: "\e6df"; +} +.icon-arrow-double-right:before { + content: "\e6de"; +} +.icon-arrow-down-line:before { + content: "\e6dd"; +} +.icon-arrow-up-line:before { + content: "\e6d3"; +} +.icon-arrows:before { + content: "\e6d7"; +} +.icon-arrows-h:before { + content: "\e6d5"; +} +.icon-arrows-v:before { + content: "\e6d4"; +} +.icon-magnifier:before { + content: "\e657"; +} +.icon-magnifier-minus:before { + content: "\e656"; +} +.icon-magnifier-plus:before { + content: "\e655"; +} +.icon-minus:before { + content: "\e73f"; +} +.icon-loop:before { + content: "\e600"; +} +.icon-merge:before { + content: "\e709"; +} +.icon-separate:before { + content: "\e70a"; +} +.icon-scheme-circles-triangle:before { + content: "\e73e"; +} +.icon-market:before { + content: "\e68e"; +} +.icon-bubble-o:before { + content: "\e6f3"; +} +.icon-bubble-times:before { + content: "\e6f2"; +} +.icon-clapperboard:before { + content: "\e636"; +} +.icon-collapse:before { + content: "\e745"; +} +.icon-collapse-scheme:before { + content: "\e700"; +} +.icon-dialog-window:before { + content: "\e6ff"; +} +.icon-dialog-window-cogwheel:before { + content: "\e71a"; +} +.icon-doc-ban-sign:before { + content: "\e6ef"; +} +.icon-doc-o:before { + content: "\e69c"; +} +.icon-doc-user:before { + content: "\e714"; +} +.icon-expand:before { + content: "\e744"; +} +.icon-file:before { + content: "\e719"; +} +.icon-folder-belt:before { + content: "\e715"; +} +.icon-folder-o:before { + content: "\e68b"; +} +.icon-hat-moustache:before { + content: "\e75a"; +} +.icon-key:before { + content: "\e65e"; +} +.icon-rectangle-a:before { + content: "\e61e"; +} +.icon-rectangle-a-o:before { + content: "\e623"; +} +.icon-rectangle-o-h:before { + content: "\e758"; +} +.icon-rectangle-o-v:before { + content: "\e759"; +} +.icon-rectangle-paragraph:before { + content: "\e625"; +} +.icon-tab:before { + content: "\e6fb"; +} +.icon-file-pdf:before { + content: "\e6a3"; +} +.icon-graduate-cap:before { + content: "\e713"; +} +.icon-clipboard-list:before { + content: "\e6a9"; +} +.icon-user-checkbox:before { + content: "\e603"; +} +.icon-box-cart:before { + content: "\e6cd"; +} +.icon-bubble-censored:before { + content: "\e6c2"; +} +.icon-drawers:before { + content: "\e699"; +} +.icon-earth:before { + content: "\e698"; +} +.icon-form:before { + content: "\e689"; +} +.icon-invoice:before { + content: "\e660"; +} +.icon-mug:before { + content: "\e644"; +} +.icon-square-dashed-line:before { + content: "\e617"; +} +.icon-briefcase:before { + content: "\e6c6"; +} +.icon-funnel:before { + content: "\e687"; +} +.icon-map:before { + content: "\e654"; +} +.icon-notebook:before { + content: "\e642"; +} +.icon-piechart:before { + content: "\e631"; +} +.icon-user-frame:before { + content: "\e604"; +} +.icon-clipboard-checklist:before { + content: "\e6aa"; +} +.icon-pictures:before { + content: "\e632"; +} +.icon-flag:before { + content: "\e68f"; +} +.icon-folder:before { + content: "\e68d"; +} +.icon-folder-opened:before { + content: "\e68a"; +} +.icon-picture:before { + content: "\e633"; +} +.icon-bin:before { + content: "\e6d0"; +} +.icon-bubble:before { + content: "\e6c3"; +} +.icon-doc:before { + content: "\e69f"; +} +.icon-doc-move:before { + content: "\e69d"; +} +.icon-edit:before { + content: "\e696"; +} +.icon-menu:before { + content: "\e650"; +} +.icon-message:before { + content: "\e64f"; +} +.icon-user:before { + content: "\e605"; +} +.icon-monitor-broken:before { + content: "\e70b"; +} +.icon-monitor:before { + content: "\e646"; +} +.icon-chevron-down-line:before { + content: "\e6c0"; +} +.icon-chevron-left-line:before { + content: "\e6d6"; +} +.icon-chevron-right-line:before { + content: "\e6e2"; +} +.icon-chevron-up-line:before { + content: "\e6ee"; +} +.icon-pin-o:before { + content: "\e705"; +} +.icon-brand-sharepoint:before { + content: "\e707"; +} +.icon-heartshake:before { + content: "\e681"; +} +.icon-pin:before { + content: "\e71e"; +} +.icon-checklist:before { + content: "\e61b"; +} +.icon-watch:before { + content: "\e601"; +} +.icon-permission-list:before { + content: "\e634"; +} +.icon-users:before { + content: "\e602"; +} +.icon-brand-youtube:before { + content: "\e659"; +} +.icon-brand-pinterest:before { + content: "\e6e3"; +} +.icon-brand-open-id:before { + content: "\e6e4"; +} +.icon-two-rectangles-v:before { + content: "\e606"; +} +.icon-brand-linkedin:before { + content: "\e6e5"; +} +.icon-two-rectangles-h:before { + content: "\e607"; +} +.icon-brand-google-plus:before { + content: "\e6e6"; +} +.icon-t-shirt:before { + content: "\e608"; +} +.icon-xml-tag:before { + content: "\e6e7"; +} +.icon-truck:before { + content: "\e609"; +} +.icon-trophy:before { + content: "\e60a"; +} +.icon-rss:before { + content: "\e6e9"; +} +.icon-triangle-right:before { + content: "\e60b"; +} +.icon-restriction-list:before { + content: "\e6ea"; +} +.icon-translate:before { + content: "\e60c"; +} +.icon-qr-code:before { + content: "\e6eb"; +} +.icon-times-circle:before { + content: "\e60d"; +} +.icon-lock-unlocked:before { + content: "\e6ec"; +} +.icon-times:before { + content: "\e60e"; +} +.icon-dollar-sign:before { + content: "\e6ed"; +} +.icon-tag:before { + content: "\e60f"; +} +.icon-tablet:before { + content: "\e610"; +} +.icon-cb-check-disabled:before { + content: "\e6f0"; +} +.icon-table:before { + content: "\e612"; +} +.icon-carousel:before { + content: "\e6f1"; +} +.icon-star-full:before { + content: "\e614"; +} +.icon-star-semi:before { + content: "\e613"; +} +.icon-star-empty:before { + content: "\e615"; +} +.icon-arrows-crooked:before { + content: "\e6f4"; +} +.icon-staging-scheme:before { + content: "\e616"; +} +.icon-shopping-cart:before { + content: "\e6f5"; +} +.icon-highlighter:before { + content: "\e6f6"; +} +.icon-square-dashed:before { + content: "\e618"; +} +.icon-cookie:before { + content: "\e6f7"; +} +.icon-square:before { + content: "\e619"; +} +.icon-software-package:before { + content: "\e61c"; +} +.icon-smartphone:before { + content: "\e61d"; +} +.icon-scissors:before { + content: "\e61f"; +} +.icon-rotate-right:before { + content: "\e620"; +} +.icon-rotate-left:before { + content: "\e621"; +} +.icon-rotate-double-right:before { + content: "\e622"; +} +.icon-ribbon:before { + content: "\e624"; +} +.icon-rb-uncheck:before { + content: "\e626"; +} +.icon-rb-check-sign:before { + content: "\e627"; +} +.icon-question-circle:before { + content: "\e629"; +} +.icon-project-scheme:before { + content: "\e62b"; +} +.icon-process-scheme:before { + content: "\e62c"; +} +.icon-plus-square:before { + content: "\e62d"; +} +.icon-plus-circle:before { + content: "\e62e"; +} +.icon-plus:before { + content: "\e62f"; +} +.icon-placeholder:before { + content: "\e630"; +} +.icon-perfume:before { + content: "\e635"; +} +.icon-percent-sign:before { + content: "\e638"; +} +.icon-pda:before { + content: "\e639"; +} +.icon-pc:before { + content: "\e63a"; +} +.icon-pause:before { + content: "\e63b"; +} +.icon-parent-children-scheme:before { + content: "\e63c"; +} +.icon-paperclip:before { + content: "\e63d"; +} +.icon-pants:before { + content: "\e63e"; +} +.icon-palette:before { + content: "\e63f"; +} +.icon-organisational-scheme:before { + content: "\e640"; +} +.icon-newspaper:before { + content: "\e643"; +} +.icon-monitor-smartphone:before { + content: "\e645"; +} +.icon-modal-question:before { + content: "\e647"; +} +.icon-modal-minimize:before { + content: "\e648"; +} +.icon-modal-maximize:before { + content: "\e649"; +} +.icon-modal-close:before { + content: "\e64a"; +} +.icon-minus-circle:before { + content: "\e64b"; +} +.icon-microphone:before { + content: "\e64d"; +} +.icon-messages:before { + content: "\e64e"; +} +.icon-media-player:before { + content: "\e651"; +} +.icon-mask:before { + content: "\e652"; +} +.icon-map-marker:before { + content: "\e653"; +} +.icon-lock:before { + content: "\e658"; +} +.icon-life-belt:before { + content: "\e65a"; +} +.icon-laptop:before { + content: "\e65d"; +} +.icon-kentico:before { + content: "\e65f"; +} +.icon-integration-scheme:before { + content: "\e661"; +} +.icon-i-circle:before { + content: "\e664"; +} +.icon-chevron-up-square:before { + content: "\e665"; +} +.icon-chevron-up-circle:before { + content: "\e666"; +} +.icon-chevron-up:before { + content: "\e667"; +} +.icon-chevron-right-square:before { + content: "\e668"; +} +.icon-chevron-right:before { + content: "\e669"; +} +.icon-chevron-left-square:before { + content: "\e66a"; +} +.icon-chevron-left-circle:before { + content: "\e66b"; +} +.icon-chevron-left:before { + content: "\e66c"; +} +.icon-chevron-down-square:before { + content: "\e66d"; +} +.icon-chevron-down-circle:before { + content: "\e66e"; +} +.icon-chevron-down:before { + content: "\e66f"; +} +.icon-chevron-double-up:before { + content: "\e670"; +} +.icon-chevron-double-right:before { + content: "\e671"; +} +.icon-chevron-double-left:before { + content: "\e672"; +} +.icon-chevron-double-down:before { + content: "\e673"; +} +.icon-checklist2:before { + content: "\e674"; +} +.icon-check-circle:before { + content: "\e675"; +} +.icon-check:before { + content: "\e676"; +} +.icon-tags:before { + content: "\e678"; +} +.icon-shoe-women:before { + content: "\e679"; +} +.icon-printer:before { + content: "\e67a"; +} +.icon-parent-child-scheme:before { + content: "\e67b"; +} +.icon-minus-square:before { + content: "\e67c"; +} +.icon-light-bulb:before { + content: "\e67d"; +} +.icon-chevron-right-circle:before { + content: "\e67e"; +} +.icon-home:before { + content: "\e680"; +} +.icon-half-arrows-right-left:before { + content: "\e683"; +} +.icon-graph:before { + content: "\e684"; +} +.icon-factory:before { + content: "\e690"; +} +.icon-exclamation-triangle:before { + content: "\e693"; +} +.icon-ellipsis:before { + content: "\e694"; +} +.icon-ekg-line:before { + content: "\e695"; +} +.icon-doc-paste:before { + content: "\e69a"; +} +.icon-doc-copy:before { + content: "\e69e"; +} +.icon-database:before { + content: "\e6a0"; +} +.icon-cup:before { + content: "\e6a2"; +} +.icon-compass:before { + content: "\e6a4"; +} +.icon-cogwheel-square:before { + content: "\e6a5"; +} +.icon-cogwheels:before { + content: "\e6a6"; +} +.icon-cogwheel:before { + content: "\e6a7"; +} +.icon-circle-square:before { + content: "\e6ab"; +} +.icon-circle:before { + content: "\e6ac"; +} +.icon-cb-uncheck:before { + content: "\e6ad"; +} +.icon-cb-check-sign:before { + content: "\e6b0"; +} +.icon-caret-up:before { + content: "\e6b2"; +} +.icon-caret-right-down:before { + content: "\e6b3"; +} +.icon-caret-right:before { + content: "\e6b4"; +} +.icon-caret-left:before { + content: "\e6b5"; +} +.icon-caret-down:before { + content: "\e6b6"; +} +.icon-camera:before { + content: "\e6b7"; +} +.icon-calendar-number:before { + content: "\e6b8"; +} +.icon-calendar:before { + content: "\e6b9"; +} +.icon-bullseye:before { + content: "\e6ba"; +} +.icon-building-block:before { + content: "\e6bb"; +} +.icon-building:before { + content: "\e6bc"; +} +.icon-bug:before { + content: "\e6bd"; +} +.icon-bucket-shovel:before { + content: "\e6be"; +} +.icon-bubbles:before { + content: "\e6c1"; +} +.icon-brush:before { + content: "\e6c4"; +} +.icon-broom:before { + content: "\e6c5"; +} +.icon-brand-twitter:before { + content: "\e6c7"; +} +.icon-brand-google:before { + content: "\e6c8"; +} +.icon-brand-facebook:before { + content: "\e6c9"; +} +.icon-brand-bing:before { + content: "\e6ca"; +} +.icon-braces:before { + content: "\e6cb"; +} +.icon-boxes:before { + content: "\e6cc"; +} +.icon-box:before { + content: "\e6ce"; +} +.icon-ban-sign:before { + content: "\e6d1"; +} +.icon-badge:before { + content: "\e6d2"; +} +.icon-arrow-right-top-square:before { + content: "\e6d8"; +} +.icon-breadcrumb:before { + content: "\e6f9"; +} +.icon-clock:before { + content: "\e6a8"; +} +.icon-cloud:before { + content: "\e701"; +} +.icon-cb-check-preview:before { + content: "\e702"; +} +.icon-accordion:before { + content: "\e704"; +} +.icon-two-squares-line:before { + content: "\e706"; +} +.icon-money-bill:before { + content: "\e708"; +} +.icon-puzzle:before { + content: "\e62a"; +} +.icon-wizard-stick:before { + content: "\e6fa"; +} +.icon-lines-rectangle-o:before { + content: "\e6fd"; +} +.icon-doc-arrows:before { + content: "\e6fe"; +} +.icon-l-text-col:before { + content: "\e685"; +} +.icon-l-menu-text-col:before { + content: "\e69b"; +} +.icon-l-menu-cols-3:before { + content: "\e6e8"; +} +.icon-l-logotype-menu-v-col:before { + content: "\e6fc"; +} +.icon-l-logotype-menu-h-col:before { + content: "\e70c"; +} +.icon-l-header-cols-3-footer:before { + content: "\e70d"; +} +.icon-l-cols-80-20:before { + content: "\e70e"; +} +.icon-l-cols-20-80:before { + content: "\e70f"; +} +.icon-l-cols-4:before { + content: "\e710"; +} +.icon-l-cols-3:before { + content: "\e711"; +} +.icon-l-cols-2:before { + content: "\e712"; +} +.icon-bezier-scheme:before { + content: "\e717"; +} +.icon-note:before { + content: "\e71c"; +} +.icon-piechart-lines:before { + content: "\e71d"; +} +.icon-l-article-map:before { + content: "\e721"; +} +.icon-l-calendar-number-article:before { + content: "\e722"; +} +.icon-l-forms-2:before { + content: "\e723"; +} +.icon-l-header-cols-2-footer:before { + content: "\e724"; +} +.icon-l-header-list-img:before { + content: "\e725"; +} +.icon-l-header-menu-text:before { + content: "\e726"; +} +.icon-l-header-text:before { + content: "\e727"; +} +.icon-l-list-article:before { + content: "\e728"; +} +.icon-l-lightbox:before { + content: "\e729"; +} +.icon-l-img-3-cols-3:before { + content: "\e72a"; +} +.icon-l-img-2-cols-3:before { + content: "\e72b"; +} +.icon-l-text:before { + content: "\e72c"; +} +.icon-l-rows-4:before { + content: "\e72d"; +} +.icon-l-rows-3:before { + content: "\e72e"; +} +.icon-l-rows-2:before { + content: "\e72f"; +} +.icon-l-menu-text-col-bottom:before { + content: "\e730"; +} +.icon-l-menu-text:before { + content: "\e731"; +} +.icon-l-menu-list-img-col:before { + content: "\e732"; +} +.icon-l-menu-list-img:before { + content: "\e733"; +} +.icon-l-menu-list:before { + content: "\e734"; +} +.icon-l-menu-cols-2:before { + content: "\e735"; +} +.icon-l-logotype-menu-col-footer:before { + content: "\e736"; +} +.icon-l-list-title:before { + content: "\e737"; +} +.icon-l-list-img-article:before { + content: "\e738"; +} +.icon-l-list-article-col:before { + content: "\e739"; +} +.icon-tree-structure:before { + content: "\e73a"; +} +.icon-vb:before { + content: "\e716"; +} +.icon-crosshair-o:before { + content: "\e71b"; +} +.icon-crosshair-f:before { + content: "\e71f"; +} +.icon-caret-right-aligned-left:before { + content: "\e720"; +} +.icon-caret-left-aligned-right:before { + content: "\e73b"; +} +.icon-gauge:before { + content: "\e686"; +} +.icon-c-sharp:before { + content: "\e718"; +} +.icon-tab-vertical:before { + content: "\e73c"; +} +.icon-right-double-quotation-mark:before { + content: "\e73d"; +} +.icon-braces-octothorpe:before { + content: "\e740"; +} +.icon-outdent:before { + content: "\e741"; +} +.icon-indent:before { + content: "\e742"; +} +.icon-i:before { + content: "\e743"; +} +.icon-b:before { + content: "\e746"; +} +.icon-u:before { + content: "\e747"; +} +.icon-s:before { + content: "\e748"; +} +.icon-x:before { + content: "\e749"; +} +.icon-t-f:before { + content: "\e74a"; +} +.icon-t:before { + content: "\e74b"; +} +.icon-parent-child-scheme-2:before { + content: "\e74c"; +} +.icon-parent-child-scheme2:before { + content: "\e74d"; +} +.icon-doc-torn:before { + content: "\e750"; +} +.icon-f:before { + content: "\e74e"; +} +.icon-a-lowercase:before { + content: "\e74f"; +} +.icon-circle-slashed:before { + content: "\e751"; +} +.icon-one:before { + content: "\e752"; +} +.icon-diamond:before { + content: "\e756"; +} +.icon-choice-user-scheme:before { + content: "\e753"; +} +.icon-choice-single-scheme:before { + content: "\e755"; +} +.icon-choice-multi-scheme:before { + content: "\e757"; +} +.icon-book-opened:before { + content: "\e6cf"; +} +.icon-e-book:before { + content: "\e697"; +} +.icon-spinner:before { + content: "\e61a"; +} +.icon-layouts:before { + content: "\e65b"; +} +.icon-layout:before { + content: "\e65c"; +} +.icon-id-card:before { + content: "\e663"; +} +.icon-id-cards:before { + content: "\e662"; +} +.icon-l-grid-3-2:before { + content: "\e611"; +} +.icon-l-grid-2-2:before { + content: "\e628"; +} +.icon-l-cols-70-30:before { + content: "\e637"; +} +.icon-l-cols-30-70:before { + content: "\e641"; +} +.icon-l-cols-25-50-25:before { + content: "\e688"; +} +.icon-l-cols-20-60-20:before { + content: "\e6a1"; +} +.icon-eye:before { + content: "\e692"; +} +.icon-list:before { + content: "\e6f8"; +} +.icon-folder-clock:before { + content: "\e68c"; +} +.icon-app-default:before { + content: "\e618"; +} +.icon-app-blogs:before { + content: "\e642"; +} +.icon-app-content:before { + content: "\e6cf"; +} +.icon-app-content-dashboard:before { + content: "\e686"; +} +.icon-app-file-import:before { + content: "\e6db"; +} +.icon-app-forms:before { + content: "\e689"; +} +.icon-app-checked-out:before { + content: "\e6c6"; +} +.icon-app-media:before { + content: "\e632"; +} +.icon-app-my-blogs:before { + content: "\e642"; +} +.icon-app-my-documents:before { + content: "\e6c6"; +} +.icon-app-outdated:before { + content: "\e6c6"; +} +.icon-app-pending:before { + content: "\e6c6"; +} +.icon-app-polls:before { + content: "\e6aa"; +} +.icon-app-recent:before { + content: "\e6c6"; +} +.icon-app-translations:before { + content: "\e698"; +} +.icon-app-activities:before { + content: "\e695"; +} +.icon-app-banners:before { + content: "\e624"; +} +.icon-app-campaigns:before { + content: "\e6ba"; +} +.icon-app-contacts:before { + content: "\e663"; +} +.icon-app-contact-groups:before { + content: "\e662"; +} +.icon-app-conversions:before { + content: "\e683"; +} +.icon-app-marketing-dashboard:before { + content: "\e686"; +} +.icon-app-marketing-reports:before { + content: "\e684"; +} +.icon-app-newsletters:before { + content: "\e64f"; +} +.icon-app-processes:before { + content: "\e62c"; +} +.icon-app-scoring:before { + content: "\e687"; +} +.icon-app-web-analytics:before { + content: "\e631"; +} +.icon-app-ab-test:before { + content: "\e706"; +} +.icon-app-mvt:before { + content: "\e65c"; +} +.icon-app-catalog-discounts:before { + content: "\e638"; +} +.icon-app-customers:before { + content: "\e604"; +} +.icon-app-ecommerce-dashboard:before { + content: "\e686"; +} +.icon-app-ecommerce-reports:before { + content: "\e684"; +} +.icon-app-free-shipping-offers:before { + content: "\e638"; +} +.icon-app-manufacturers:before { + content: "\e690"; +} +.icon-app-order-discounts:before { + content: "\e638"; +} +.icon-app-orders:before { + content: "\e660"; +} +.icon-app-product-coupons:before { + content: "\e638"; +} +.icon-app-product-options:before { + content: "\e6cc"; +} +.icon-app-products:before { + content: "\e6ce"; +} +.icon-app-suppliers:before { + content: "\e6cd"; +} +.icon-app-abuse-reports:before { + content: "\e6ea"; +} +.icon-app-avatars:before { + content: "\e652"; +} +.icon-app-bad-words:before { + content: "\e6c2"; +} +.icon-app-badges:before { + content: "\e6d2"; +} +.icon-app-events:before { + content: "\e6b8"; +} +.icon-app-facebook:before { + content: "\e6c9"; +} +.icon-app-forums:before { + content: "\e6c1"; +} +.icon-app-groups:before { + content: "\e602"; +} +.icon-app-chat:before { + content: "\e6c3"; +} +.icon-app-message-boards:before { + content: "\e6c1"; +} +.icon-app-messages:before { + content: "\e64e"; +} +.icon-app-my-projects:before { + content: "\e62b"; +} +.icon-app-projects:before { + content: "\e62b"; +} +.icon-app-api-examples:before { + content: "\e6a6"; +} +.icon-app-classes:before { + content: "\e6cb"; +} +.icon-app-css-stylesheets:before { + content: "\e63f"; +} +.icon-app-custom-tables:before { + content: "\e612"; +} +.icon-app-database-objects:before { + content: "\e6a0"; +} +.icon-app-device-profiles:before { + content: "\e645"; +} +.icon-app-document-types:before { + content: "\e69f"; +} +.icon-app-email-templates:before { + content: "\e64f"; +} +.icon-app-form-controls:before { + content: "\e689"; +} +.icon-app-inline-controls:before { + content: "\e689"; +} +.icon-app-javascript-files:before { + content: "\e6cb"; +} +.icon-app-macro-rules:before { + content: "\e740"; +} +.icon-app-modules:before { + content: "\e62a"; +} +.icon-app-notifications:before { + content: "\e68f"; +} +.icon-app-page-layouts:before { + content: "\e65c"; +} +.icon-app-page-templates:before { + content: "\e65c"; +} +.icon-app-web-part-containers:before { + content: "\e617"; +} +.icon-app-web-parts:before { + content: "\e6bb"; +} +.icon-app-web-templates:before { + content: "\e65c"; +} +.icon-app-widgets:before { + content: "\e6a5"; +} +.icon-app-banned-ips:before { + content: "\e6ea"; +} +.icon-app-categories:before { + content: "\e699"; +} +.icon-app-content-reports:before { + content: "\e6a7"; +} +.icon-app-countries:before { + content: "\e653"; +} +.icon-app-ecommerce-configuration:before { + content: "\e6a7"; +} +.icon-app-email-queue:before { + content: "\e64e"; +} +.icon-app-event-log:before { + content: "\e6a9"; +} +.icon-app-integration-bus:before { + content: "\e661"; +} +.icon-app-localization:before { + content: "\e698"; +} +.icon-app-membership:before { + content: "\e663"; +} +.icon-app-marketing-configuration:before { + content: "\e6a7"; +} +.icon-app-permissions:before { + content: "\e634"; +} +.icon-app-recycle-bin:before { + content: "\e6d0"; +} +.icon-app-relationship-names:before { + content: "\e67f"; +} +.icon-app-roles:before { + content: "\e603"; +} +.icon-app-search-engines:before { + content: "\e657"; +} +.icon-app-settings:before { + content: "\e6a7"; +} +.icon-app-scheduled-tasks:before { + content: "\e68c"; +} +.icon-app-sites:before { + content: "\e65b"; +} +.icon-app-smart-search:before { + content: "\e657"; +} +.icon-app-smtp-servers:before { + content: "\e64f"; +} +.icon-app-staging:before { + content: "\e616"; +} +.icon-app-system:before { + content: "\e6ab"; +} +.icon-app-tag-groups:before { + content: "\e678"; +} +.icon-app-time-zones:before { + content: "\e6a8"; +} +.icon-app-translation-services:before { + content: "\e60c"; +} +.icon-app-ui-personalization:before { + content: "\e65c"; +} +.icon-app-users:before { + content: "\e602"; +} +.icon-app-web-farm:before { + content: "\e63c"; +} +.icon-app-workflows:before { + content: "\e756"; +} +.icon-app-personas:before { + content: "\e75a"; +} +.icon-app-unit-tests:before { + content: "\e61b"; +} +.icon-app-licenses:before { + content: "\e65e"; +} +.icon-app-my-profile:before { + content: "\e605"; +} +.icon-app-debug:before { + content: "\e6bd"; +} +.icon-app-twitter:before { + content: "\e6c7"; +} +.icon-app-continuous-integration:before { + content: "\e600"; +} +.icon-googletranslator:before { + content: "\e6c8"; +} +.icon-microsofttranslator:before { + content: "\e6ca"; +} +.icon-external-link:before { + content: "\e6d8"; +} +.icon-mvc:before { + content: "\e73e"; +} +.icon-w-webpart-default:before { + content: "\e6bb"; +} +.icon-w-widget-default:before { + content: "\e6a5"; +} +.icon-w-css-list-menu:before { + content: "\e6f8"; +} +.icon-w-tree-menu:before { + content: "\e73a"; +} +.icon-w-category-menu:before { + content: "\e6f8"; +} +.icon-w-tab-menu:before { + content: "\e6f8"; +} +.icon-w-drop-down-menu:before { + content: "\e6f8"; +} +.icon-w-language-selection:before { + content: "\e698"; +} +.icon-w-language-selection-dropdown:before { + content: "\e698"; +} +.icon-w-language-selection-with-flags:before { + content: "\e698"; +} +.icon-w-page-placeholder:before { + content: "\e630"; +} +.icon-w-site-map:before { + content: "\e73a"; +} +.icon-w-qr-code:before { + content: "\e6eb"; +} +.icon-w-repeater:before { + content: "\e6f4"; +} +.icon-w-repeater-for-web-service:before { + content: "\e6a6"; +} +.icon-w-repeater-with-carousel:before { + content: "\e6f1"; +} +.icon-w-repeater-with-custom-query:before { + content: "\e6a0"; +} +.icon-w-query-repeater-with-effect:before { + content: "\e6a0"; +} +.icon-w-repeater-with-effect:before { + content: "\e6f4"; +} +.icon-w-repeater-with-lightbox:before { + content: "\e633"; +} +.icon-w-basic-repeater:before { + content: "\e6f4"; +} +.icon-w-basic-repeater-with-effect:before { + content: "\e6f4"; +} +.icon-w-custom-table-repeater:before { + content: "\e612"; +} +.icon-w-custom-table-repeater-with-effect:before { + content: "\e612"; +} +.icon-w-report-table:before { + content: "\e612"; +} +.icon-w-atom-repeater:before { + content: "\e6e9"; +} +.icon-w-xml-repeater:before { + content: "\e6e7"; +} +.icon-w-head-html-code:before { + content: "\e6e7"; +} +.icon-w-static-html:before { + content: "\e6e7"; +} +.icon-w-javascript:before { + content: "\e6cb"; +} +.icon-w-breadcrumbs:before { + content: "\e6f9"; +} +.icon-w-category-breadcrumbs:before { + content: "\e6f9"; +} +.icon-w-forum-breadcrumbs:before { + content: "\e6f9"; +} +.icon-w-document-attachments:before { + content: "\e63d"; +} +.icon-w-document-attachments-with-effect:before { + content: "\e63d"; +} +.icon-w-attachments:before { + content: "\e63d"; +} +.icon-w-attachments-carousel:before { + content: "\e6f1"; +} +.icon-w-attachments-carousel-3d:before { + content: "\e6f1"; +} +.icon-w-attachments-lightbox:before { + content: "\e633"; +} +.icon-w-lightbox-gallery:before { + content: "\e633"; +} +.icon-w-inbox:before { + content: "\e64f"; +} +.icon-w-send-message:before { + content: "\e64f"; +} +.icon-w-send-to-friend:before { + content: "\e64f"; +} +.icon-w-newsletter-archive:before { + content: "\e6f8"; +} +.icon-w-newsletter-subscription:before { + content: "\e675"; +} +.icon-w-messaging-info-panel:before { + content: "\e64f"; +} +.icon-w-newsletter-unsubscription:before { + content: "\e60d"; +} +.icon-w-custom-subscription-form:before { + content: "\e675"; +} +.icon-w-registration-e-mail-confirmation:before { + content: "\e64f"; +} +.icon-w-my-messages:before { + content: "\e64f"; +} +.icon-w-unsubscription-request:before { + content: "\e60d"; +} +.icon-w-outbox:before { + content: "\e64f"; +} +.icon-w-my-sent-invitations:before { + content: "\e64f"; +} +.icon-w-board-messages-data-source:before { + content: "\e6c1"; +} +.icon-w-group-forum-posts-data-source:before { + content: "\e6c1"; +} +.icon-w-query-data-source:before { + content: "\e6a0"; +} +.icon-w-forum-posts-data-source:before { + content: "\e6c1"; +} +.icon-w-documents-data-source:before { + content: "\e69f"; +} +.icon-w-web-service-data-source:before { + content: "\e6a6"; +} +.icon-w-department-members-data-source:before { + content: "\e640"; +} +.icon-w-macro-data-source:before { + content: "\e740"; +} +.icon-w-file-system-data-source:before { + content: "\e68a"; +} +.icon-w-sharepoint-data-source:before { + content: "\e6bb"; +} +.icon-w-group-media-libraries-data-source:before { + content: "\e632"; +} +.icon-w-atom-data-source:before { + content: "\e6e9"; +} +.icon-w-media-files-data-source:before { + content: "\e632"; +} +.icon-w-groups-data-source:before { + content: "\e602"; +} +.icon-w-custom-table-data-source:before { + content: "\e612"; +} +.icon-w-group-members-data-source:before { + content: "\e602"; +} +.icon-w-blog-comments-data-source:before { + content: "\e642"; +} +.icon-w-sql-data-source:before { + content: "\e6a0"; +} +.icon-w-sql-search-box:before { + content: "\e657"; +} +.icon-w-xml-data-source:before { + content: "\e6e7"; +} +.icon-w-sql-search-dialog:before { + content: "\e657"; +} +.icon-w-products-data-source:before { + content: "\e6ce"; +} +.icon-w-sql-search-dialog-with-results:before { + content: "\e657"; +} +.icon-w-media-libraries-data-source:before { + content: "\e632"; +} +.icon-w-users-data-source:before { + content: "\e605"; +} +.icon-w-attachments-data-source:before { + content: "\e63d"; +} +.icon-w-sql-search-results:before { + content: "\e6f8"; +} +.icon-w-chat-search-on-line-users:before { + content: "\e657"; +} +.icon-w-search-accelerator-for-ie8-and-higher:before { + content: "\e657"; +} +.icon-w-search-engine-results-highlighter:before { + content: "\e6f6"; +} +.icon-w-smart-search-box:before { + content: "\e657"; +} +.icon-w-forum-search-advanced-dialog:before { + content: "\e657"; +} +.icon-w-smart-search-dialog:before { + content: "\e657"; +} +.icon-w-forum-search-box:before { + content: "\e657"; +} +.icon-w-smart-search-dialog-with-results:before { + content: "\e657"; +} +.icon-w-smart-search-filter:before { + content: "\e687"; +} +.icon-w-smart-search-results:before { + content: "\e6f8"; +} +.icon-w-message-board-rss-feed:before { + content: "\e6c1"; +} +.icon-w-forum-posts-rss-feed:before { + content: "\e6c1"; +} +.icon-w-query-rss-feed:before { + content: "\e6a0"; +} +.icon-w-news-rss-feed:before { + content: "\e643"; +} +.icon-w-web-service-rss-feed:before { + content: "\e6a6"; +} +.icon-w-feed-link:before { + content: "\e6e9"; +} +.icon-w-cms-rss-feed:before { + content: "\e6e9"; +} +.icon-w-atom-feed:before { + content: "\e6e9"; +} +.icon-w-media-files-rss-feed:before { + content: "\e632"; +} +.icon-w-blog-comments-rss-feed:before { + content: "\e6e9"; +} +.icon-w-events-rss-feed:before { + content: "\e6b8"; +} +.icon-w-rss-data-source:before { + content: "\e6a0"; +} +.icon-w-rss-feed:before { + content: "\e6e9"; +} +.icon-w-products-rss-feed:before { + content: "\e6ce"; +} +.icon-w-custom-table-rss-feed:before { + content: "\e612"; +} +.icon-w-blog-posts-rss-feed:before { + content: "\e642"; +} +.icon-w-rss-repeater:before { + content: "\e6e9"; +} +.icon-w-web-part-zone:before { + content: "\e65c"; +} +.icon-w-banner-rotator:before { + content: "\e624"; +} +.icon-w-css-style-selector:before { + content: "\e63f"; +} +.icon-w-report:before { + content: "\e684"; +} +.icon-w-report-chart:before { + content: "\e684"; +} +.icon-w-switch-mobile-device-detection:before { + content: "\e61d"; +} +.icon-w-mobile-device-redirection:before { + content: "\e61d"; +} +.icon-w-poll:before { + content: "\e61b"; +} +.icon-w-group-polls:before { + content: "\e61b"; +} +.icon-w-scrolling-text:before { + content: "\e625"; +} +.icon-w-static-text:before { + content: "\e625"; +} +.icon-w-paged-text:before { + content: "\e625"; +} +.icon-w-editable-text:before { + content: "\e625"; +} +.icon-w-change-password:before { + content: "\e65e"; +} +.icon-w-unlock-user-accunt:before { + content: "\e6ec"; +} +.icon-w-reset-password:before { + content: "\e65e"; +} +.icon-w-automatically-initiated-chat:before { + content: "\e6c3"; +} +.icon-w-chat-send-message:before { + content: "\e64f"; +} +.icon-w-chat-support-request:before { + content: "\e6c3"; +} +.icon-w-chat-web-part:before { + content: "\e6bb"; +} +.icon-w-chat-errors:before { + content: "\e6f2"; +} +.icon-w-chat-leave-room:before { + content: "\e6d9"; +} +.icon-w-chat-login:before { + content: "\e65e"; +} +.icon-w-chat-notifications:before { + content: "\e6c3"; +} +.icon-w-chat-room-messages:before { + content: "\e6c3"; +} +.icon-w-chat-room-name:before { + content: "\e6c3"; +} +.icon-w-chat-room-users:before { + content: "\e605"; +} +.icon-w-chat-rooms:before { + content: "\e6f3"; +} +.icon-w-comment-view:before { + content: "\e6c1"; +} +.icon-w-forum-unsubscription:before { + content: "\e60d"; +} +.icon-w-forum-most-active-threads:before { + content: "\e6c1"; +} +.icon-w-forum-recently-active-threads:before { + content: "\e6c1"; +} +.icon-w-forum-top-contributors:before { + content: "\e6c1"; +} +.icon-w-forum-single-forum-flat-layout:before { + content: "\e6c1"; +} +.icon-w-forum-single-forum-general:before { + content: "\e6c1"; +} +.icon-w-forum-single-forum-tree-layout:before { + content: "\e6c1"; +} +.icon-w-calendar:before { + content: "\e6b9"; +} +.icon-w-date-and-time:before { + content: "\e6a8"; +} +.icon-w-event-calendar:before { + content: "\e6b8"; +} +.icon-w-event-registration:before { + content: "\e6b8"; +} +.icon-w-content-rating:before { + content: "\e614"; +} +.icon-w-shopping-cart-content:before { + content: "\e6f5"; +} +.icon-w-shopping-cart-preview:before { + content: "\e6f5"; +} +.icon-w-shopping-cart-totals:before { + content: "\e6f5"; +} +.icon-w-attachment-image-gallery:before { + content: "\e633"; +} +.icon-w-media-gallery-file-filter:before { + content: "\e633"; +} +.icon-w-media-gallery-file-list:before { + content: "\e633"; +} +.icon-w-media-gallery-folder-tree:before { + content: "\e633"; +} +.icon-w-image-gallery:before { + content: "\e633"; +} +.icon-w-media-libraries-viewer:before { + content: "\e633"; +} +.icon-w-custom-table-datagrid:before { + content: "\e612"; +} +.icon-w-grid-with-custom-query:before { + content: "\e612"; +} +.icon-w-custom-table-datalist:before { + content: "\e6f8"; +} +.icon-w-grid:before { + content: "\e612"; +} +.icon-w-table-layout:before { + content: "\e612"; +} +.icon-w-sharepoint-datagrid:before { + content: "\e612"; +} +.icon-w-grid-for-rest-service:before { + content: "\e612"; +} +.icon-w-grid-for-web-service:before { + content: "\e6a6"; +} +.icon-w-custom-table-datagrid:before { + content: "\e612"; +} +.icon-w-basic-datalist:before { + content: "\e6f8"; +} +.icon-w-sharepoint-datalist:before { + content: "\e6f8"; +} +.icon-w-datalist-with-custom-query:before { + content: "\e6a0"; +} +.icon-w-datalist:before { + content: "\e6f8"; +} +.icon-w-group-forum-list:before { + content: "\e6c1"; +} +.icon-w-group-profile:before { + content: "\e602"; +} +.icon-w-group-properties:before { + content: "\e602"; +} +.icon-w-group-forum-post-viewer:before { + content: "\e6c1"; +} +.icon-w-group-public-profile:before { + content: "\e602"; +} +.icon-w-group-forum-search-results:before { + content: "\e657"; +} +.icon-w-group-registration:before { + content: "\e602"; +} +.icon-w-group-forums:before { + content: "\e602"; +} +.icon-w-group-roles:before { + content: "\e602"; +} +.icon-w-group-invitation:before { + content: "\e64f"; +} +.icon-w-group-security-access:before { + content: "\e658"; +} +.icon-w-group-media-libraries:before { + content: "\e632"; +} +.icon-w-department-members-viewer:before { + content: "\e640"; +} +.icon-w-group-security-message:before { + content: "\e64f"; +} +.icon-w-leave-group:before { + content: "\e6d9"; +} +.icon-w-group-media-libraries-viewer:before { + content: "\e632"; +} +.icon-w-groups-filter:before { + content: "\e687"; +} +.icon-w-group-members:before { + content: "\e602"; +} +.icon-w-groups-viewer:before { + content: "\e602"; +} +.icon-w-group-members-viewer:before { + content: "\e602"; +} +.icon-w-group-contribution-list:before { + content: "\e6f8"; +} +.icon-w-chat-on-line-users:before { + content: "\e6c3"; +} +.icon-w-group-message-board:before { + content: "\e6c1"; +} +.icon-w-group-document-library:before { + content: "\e632"; +} +.icon-w-group-message-board-viewer:before { + content: "\e6c1"; +} +.icon-w-group-edit-contribution:before { + content: "\e696"; +} +.icon-w-group-message-boards:before { + content: "\e6c1"; +} +.icon-w-group-forum-most-active-threads:before { + content: "\e6c1"; +} +.icon-w-group-permissions:before { + content: "\e634"; +} +.icon-w-group-forum-recently-active-threads:before { + content: "\e6a8"; +} +.icon-w-custom-registration-form:before { + content: "\e605"; +} +.icon-w-on-line-form:before { + content: "\e689"; +} +.icon-w-registration-form:before { + content: "\e605"; +} +.icon-w-logon-form:before { + content: "\e65e"; +} +.icon-w-logon-mini-form:before { + content: "\e65e"; +} +.icon-w-discount-coupon:before { + content: "\e638"; +} +.icon-w-my-account:before { + content: "\e663"; +} +.icon-w-on-line-users:before { + content: "\e605"; +} +.icon-w-my-profile:before { + content: "\e605"; +} +.icon-w-user-public-profile:before { + content: "\e605"; +} +.icon-w-users-filter:before { + content: "\e687"; +} +.icon-w-document-name-filter:before { + content: "\e687"; +} +.icon-w-filter:before { + content: "\e687"; +} +.icon-w-remaining-amount-for-free-shipping:before { + content: "\e638"; +} +.icon-w-shipping-option-selection:before { + content: "\e609"; +} +.icon-w-tasks-owned-by-me:before { + content: "\e61b"; +} +.icon-w-my-projects:before { + content: "\e62b"; +} +.icon-w-project-list:before { + content: "\e62b"; +} +.icon-w-project-tasks:before { + content: "\e61b"; +} +.icon-w-tasks-assigned-to-me:before { + content: "\e61b"; +} +.icon-w-customer-detail:before { + content: "\e604"; +} +.icon-w-customer-address:before { + content: "\e604"; +} +.icon-w-liveid-required-data:before { + content: "\e6bb"; +} +.icon-w-windows-liveid:before { + content: "\e6bb"; +} +.icon-w-openid-logon:before { + content: "\e6e4"; +} +.icon-w-openid-required-data:before { + content: "\e6e4"; +} +.icon-w-powered-by-kentico:before { + content: "\e65f"; +} +.icon-w-bing-translator:before { + content: "\e6ca"; +} +.icon-w-static-bing-maps:before { + content: "\e6ca"; +} +.icon-w-basic-bing-maps:before { + content: "\e6ca"; +} +.icon-w-bing-maps:before { + content: "\e6ca"; +} +.icon-w-google-maps:before { + content: "\e6c8"; +} +.icon-w-static-google-maps:before { + content: "\e6c8"; +} +.icon-w-basic-google-maps:before { + content: "\e6c8"; +} +.icon-w-google-activity-feed:before { + content: "\e6e6"; +} +.icon-w-google-badge:before { + content: "\e6e6"; +} +.icon-w-google-analytics:before { + content: "\e6c8"; +} +.icon-w-google-search:before { + content: "\e6c8"; +} +.icon-w-google-sitemap-xml-sitemap:before { + content: "\e6c8"; +} +.icon-w-google-translator:before { + content: "\e6c8"; +} +.icon-w-google-1-button:before { + content: "\e6e6"; +} +.icon-w-facebook-activity-feed:before { + content: "\e6c9"; +} +.icon-w-facebook-comments:before { + content: "\e6c9"; +} +.icon-w-facebook-connect-logon:before { + content: "\e6c9"; +} +.icon-w-facebook-facepile:before { + content: "\e6c9"; +} +.icon-w-facebook-like-box:before { + content: "\e6c9"; +} +.icon-w-facebook-like-button:before { + content: "\e6c9"; +} +.icon-w-facebook-recommendations:before { + content: "\e6c9"; +} +.icon-w-facebook-send-button:before { + content: "\e6c9"; +} +.icon-w-twitter-feed:before { + content: "\e6c7"; +} +.icon-w-twitter-follow-button:before { + content: "\e6c7"; +} +.icon-w-twitter-tweet-button:before { + content: "\e6c7"; +} +.icon-w-pinterest-follow-button:before { + content: "\e6e3"; +} +.icon-w-pinterest-pin-it-button:before { + content: "\e6e3"; +} +.icon-w-linkedin-apply-with:before { + content: "\e6e5"; +} +.icon-w-linkedin-company-insider:before { + content: "\e6e5"; +} +.icon-w-linkedin-company-profile:before { + content: "\e6e5"; +} +.icon-w-linkedin-logon:before { + content: "\e6e5"; +} +.icon-w-linkedin-member-profile:before { + content: "\e6e5"; +} +.icon-w-linkedin-recommend-button:before { + content: "\e6e5"; +} +.icon-w-linkedin-required-data:before { + content: "\e6e5"; +} +.icon-w-linkedin-share-button:before { + content: "\e6e5"; +} +.icon-w-flash-web-part:before { + content: "\e6bb"; +} +.icon-w-flash-widget:before { + content: "\e6a5"; +} +.icon-w-social-bookmarking:before { + content: "\e678"; +} +.icon-w-wmp-video:before { + content: "\e6bb"; +} +.icon-w-youtube-video:before { + content: "\e659"; +} +.icon-w-silverlight-application-web-part:before { + content: "\e6bb"; +} +.icon-w-silverlight-application-widget:before { + content: "\e6a5"; +} +.icon-w-quicktime:before { + content: "\e6bb"; +} +.icon-w-product-filter:before { + content: "\e6ce"; +} +.icon-w-top-n-newest-products:before { + content: "\e6ce"; +} +.icon-w-top-n-products-by-sales:before { + content: "\e6ce"; +} +.icon-w-similar-products-by-sales:before { + content: "\e6ce"; +} +.icon-w-random-products:before { + content: "\e6ce"; +} +.icon-w-tag-cloud:before { + content: "\e701"; +} +.icon-w-message-board:before { + content: "\e6c1"; +} +.icon-w-accordion-layout:before { + content: "\e704"; +} +.icon-w-columns-layout:before { + content: "\e712"; +} +.icon-w-tabs-layout:before { + content: "\e6fb"; +} +.icon-w-wizard-layout:before { + content: "\e6fa"; +} +.icon-w-rows-layout:before { + content: "\e72e"; +} +.icon-w-new-blog:before { + content: "\e642"; +} +.icon-w-abuse-report:before { + content: "\e6ea"; +} +.icon-w-in-line-abuse-report:before { + content: "\e6ea"; +} +.icon-w-message-board-subscription-confirmation:before { + content: "\e675"; +} +.icon-w-datalist-for-web-service:before { + content: "\e6a6"; +} +.icon-w-tree-view:before { + content: "\e73a"; +} +.icon-w-admin-actions:before { + content: "\e67f"; +} +.icon-w-simple-cookie-law-consent:before { + content: "\e6f7"; +} +.icon-w-news-list:before { + content: "\e6f8"; +} +.icon-w-message-board-unsubscription:before { + content: "\e60d"; +} +.icon-w-keep-alive:before { + content: "\e622"; +} +.icon-w-donate:before { + content: "\e708"; +} +.icon-w-donations:before { + content: "\e708"; +} +.icon-w-payment-form:before { + content: "\e708"; +} +.icon-w-payment-method-selection:before { + content: "\e708"; +} +.icon-w-currency-selection:before { + content: "\e6ed"; +} +.icon-w-analytics-browser-capabilities:before { + content: "\e6ff"; +} +.icon-w-strands-recommendations:before { + content: "\e6bb"; +} +.icon-w-password-expiration:before { + content: "\e658"; +} +.icon-w-message-board-viewer:before { + content: "\e6c1"; +} +.icon-w-checkout-process-obsolete:before { + content: "\e6bb"; +} +.icon-w-category-list:before { + content: "\e6f8"; +} +.icon-w-analytics-custom-statistics:before { + content: "\e631"; +} +.icon-w-subscription-approval:before { + content: "\e675"; +} +.icon-w-widget-actions:before { + content: "\e6a5"; +} +.icon-w-message-panel:before { + content: "\e6f5"; +} +.icon-w-article-list:before { + content: "\e6f8"; +} +.icon-w-set-cookie:before { + content: "\e6f7"; +} +.icon-w-random-document:before { + content: "\e69f"; +} +.icon-w-edit-contribution:before { + content: "\e696"; +} +.icon-w-universal-document-viewer:before { + content: "\e69f"; +} +.icon-w-custom-response:before { + content: "\e698"; +} +.icon-w-collapsible-panel:before { + content: "\e700"; +} +.icon-w-wishlist:before { + content: "\e614"; +} +.icon-w-latest-news:before { + content: "\e643"; +} +.icon-w-edit-document-link:before { + content: "\e696"; +} +.icon-w-did-you-mean:before { + content: "\e629"; +} +.icon-w-universal-pager:before { + content: "\e6fe"; +} +.icon-w-basic-universal-viewer:before { + content: "\e6fd"; +} +.icon-w-random-redirection:before { + content: "\e703"; +} +.icon-w-notification-subscription:before { + content: "\e675"; +} +.icon-w-wizard-buttons:before { + content: "\e6fa"; +} +.icon-w-universal-viewer:before { + content: "\e6fd"; +} +.icon-w-report-value:before { + content: "\e749"; +} +.icon-w-recent-posts:before { + content: "\e642"; +} +.icon-w-object-management-buttons:before { + content: "\e696"; +} +.icon-w-wizard-header:before { + content: "\e6fa"; +} +.icon-w-universal-viewer-with-custom-query:before { + content: "\e6a0"; +} +.icon-w-confirmation-checkbox:before { + content: "\e702"; +} +.icon-w-sharepoint-repeater:before { + content: "\e6f4"; +} +.icon-w-register-after-checkout:before { + content: "\e605"; +} +.icon-w-post-archive:before { + content: "\e6f8"; +} +.icon-w-my-invitations:before { + content: "\e64f"; +} +.icon-w-link-button:before { + content: "\e67f"; +} +.icon-w-contact-list:before { + content: "\e604"; +} +.icon-w-task-info-panel:before { + content: "\e61b"; +} +.icon-w-document-library:before { + content: "\e69f"; +} +.icon-w-custom-table-form:before { + content: "\e612"; +} +.icon-w-hierarchical-viewer:before { + content: "\e6fd"; +} +.icon-w-user-control:before { + content: "\e6bb"; +} +.icon-w-content-slider:before { + content: "\e6f1"; +} +.icon-w-blog-post-subscription-confirmation:before { + content: "\e675"; +} +.icon-w-ignore-list:before { + content: "\e6ea"; +} +.icon-w-document-pager:before { + content: "\e6fe"; +} +.icon-w-content-subscription:before { + content: "\e675"; +} +.icon-w-blog-post-unsubscription:before { + content: "\e60d"; +} +.icon-w-text-highlighter:before { + content: "\e6f6"; +} +.icon-w-related-documents:before { + content: "\e69f"; +} +.icon-w-order-note:before { + content: "\e660"; +} +.icon-w-xslt-viewer:before { + content: "\e6e7"; +} +.icon-w-document-wizard-button:before { + content: "\e6fa"; +} +.icon-w-contribution-list:before { + content: "\e6f8"; +} +.icon-w-timer:before { + content: "\e6a8"; +} +.icon-w-shortcuts:before { + content: "\e67f"; +} +.icon-w-document-wizard-manager:before { + content: "\e6fa"; +} +.icon-w-cookie-law-consent:before { + content: "\e6f7"; +} +.icon-w-blog-comments-viewer:before { + content: "\e6c1"; +} +.icon-w-sign-out-button:before { + content: "\e6d9"; +} +.icon-w-scrolling-news:before { + content: "\e6f1"; +} +.icon-w-output-cache-dependencies:before { + content: "\e6bb"; +} +.icon-w-zones-with-effect:before { + content: "\e65c"; +} +.icon-w-document-wizard-navigation:before { + content: "\e6fa"; +} +.icon-w-my-subscriptions:before { + content: "\e634"; +} +.icon-w-document-wizard-step-action:before { + content: "\e6fa"; +} +.icon-w-page-views:before { + content: "\e6bb"; +} +.icon-w-activities:before { + content: "\e695"; +} +.icon-w-analytics-chart-viewer:before { + content: "\e631"; +} +.icon-w-analytics-table-viewer:before { + content: "\e612"; +} +.icon-w-articles-rss-feed:before { + content: "\e6e9"; +} +.icon-w-blog-comments:before { + content: "\e6c1"; +} +.icon-w-building-your-on-line-store:before { + content: "\e6f5"; +} +.icon-w-department-latest-blog-posts:before { + content: "\e642"; +} +.icon-w-department-latest-forum-posts:before { + content: "\e6c1"; +} +.icon-w-department-latest-news:before { + content: "\e643"; +} +.icon-w-department-quick-links:before { + content: "\e67f"; +} +.icon-w-department-upcoming-events:before { + content: "\e6b8"; +} +.icon-w-documents:before { + content: "\e69f"; +} +.icon-w-e-commerce-settings-checker:before { + content: "\e702"; +} +.icon-w-editable-image:before { + content: "\e633"; +} +.icon-w-e-mail-queue:before { + content: "\e64e"; +} +.icon-w-employee-of-the-month:before { + content: "\e604"; +} +.icon-w-event-management:before { + content: "\e6b8"; +} +.icon-w-eventlog:before { + content: "\e6a9"; +} +.icon-w-forum-group:before { + content: "\e6c1"; +} +.icon-w-forum-posts-waiting-for-approval:before { + content: "\e6c1"; +} +.icon-w-group-administrators:before { + content: "\e605"; +} +.icon-w-group-forum-posts-viewer:before { + content: "\e6c1"; +} +.icon-w-group-poll:before { + content: "\e61b"; +} +.icon-w-intranet-canteen-menu:before { + content: "\e660"; +} +.icon-w-intranet-departments:before { + content: "\e640"; +} +.icon-w-intranet-employees:before { + content: "\e602"; +} +.icon-w-intranet-latest-blog-posts:before { + content: "\e642"; +} +.icon-w-intranet-latest-forum-posts:before { + content: "\e6c1"; +} +.icon-w-intranet-latest-news:before { + content: "\e643"; +} +.icon-w-intranet-poll:before { + content: "\e631"; +} +.icon-w-intranet-quick-links:before { + content: "\e67f"; +} +.icon-w-intranet-upcoming-events:before { + content: "\e6b8"; +} +.icon-w-latest-blog-posts:before { + content: "\e642"; +} +.icon-w-latest-forum-posts:before { + content: "\e6c1"; +} +.icon-w-latest-news-for-corporate-site:before { + content: "\e643"; +} +.icon-w-link:before { + content: "\e67f"; +} +.icon-w-media-gallery:before { + content: "\e633"; +} +.icon-w-message-list:before { + content: "\e6f8"; +} +.icon-w-most-recent-pages:before { + content: "\e6f8"; +} +.icon-w-my-accounts:before { + content: "\e6bc"; +} +.icon-w-my-blogs:before { + content: "\e642"; +} +.icon-w-my-blogs-comments:before { + content: "\e6c1"; +} +.icon-w-my-contacts:before { + content: "\e663"; +} +.icon-w-my-inbox:before { + content: "\e64e"; +} +.icon-w-my-pending-contacts:before { + content: "\e663"; +} +.icon-w-my-projects-intranet-portal:before { + content: "\e62b"; +} +.icon-w-my-workgroups:before { + content: "\e6c6"; +} +.icon-w-object-recycle-bin:before { + content: "\e6d0"; +} +.icon-w-orders:before { + content: "\e660"; +} +.icon-w-persona-based-recommendations:before { + content: "\e604"; +} +.icon-w-personal-category-list:before { + content: "\e6f8"; +} +.icon-w-products:before { + content: "\e6ce"; +} +.icon-w-random-products-for-corporate-site:before { + content: "\e6ce"; +} +.icon-w-recent-users:before { + content: "\e605"; +} +.icon-w-report-daily-sales:before { + content: "\e684"; +} +.icon-w-report-monthly-sales:before { + content: "\e684"; +} +.icon-w-report-number-of-orders-by-status:before { + content: "\e684"; +} +.icon-w-report-sales-by-order-status:before { + content: "\e684"; +} +.icon-w-reporting:before { + content: "\e684"; +} +.icon-w-rich-text:before { + content: "\e728"; +} +.icon-w-scrolling-news-for-corporate-site:before { + content: "\e643"; +} +.icon-w-system:before { + content: "\e6ab"; +} +.icon-w-tasks-assigned-to-me-intranet-portal:before { + content: "\e61b"; +} +.icon-w-tasks-owned-by-me-intranet-portal:before { + content: "\e61b"; +} +.icon-w-text:before { + content: "\e72c"; +} +.icon-w-widget-zone:before { + content: "\e6a5"; +} +.icon-w-workgroup-administrators:before { + content: "\e605"; +} +.icon-w-workgroup-latest-blog-posts:before { + content: "\e642"; +} +.icon-w-workgroup-latest-forum-posts:before { + content: "\e6c1"; +} +.icon-w-workgroup-latest-news:before { + content: "\e643"; +} +.icon-w-workgroup-members:before { + content: "\e602"; +} +.icon-w-workgroup-messages:before { + content: "\e64f"; +} +.icon-w-workgroup-quick-links:before { + content: "\e67f"; +} +.icon-w-workgroup-recent-pages:before { + content: "\e6f8"; +} +.icon-w-workgroup-upcoming-events:before { + content: "\e6b8"; +} +.icon-w-current-user:before { + content: "\e605"; +} +.icon-w-disabled-module-info:before { + content: "\e664"; +} +.icon-w-edit:before { + content: "\e696"; +} +.icon-w-edit-parameters:before { + content: "\e696"; +} +.icon-w-forum-favorites:before { + content: "\e614"; +} +.icon-w-forum-posts-viewer:before { + content: "\e6c1"; +} +.icon-w-forum-subscription-confirmation:before { + content: "\e675"; +} +.icon-w-header-actions:before { + content: "\e6bb"; +} +.icon-w-horizontal-tabs:before { + content: "\e6fb"; +} +.icon-w-listing:before { + content: "\e728"; +} +.icon-w-edit-bindings:before { + content: "\e696"; +} +.icon-w-media-file-uploader:before { + content: "\e632"; +} +.icon-w-messages-placeholder:before { + content: "\e630"; +} +.icon-w-metafile-list:before { + content: "\e6f8"; +} +.icon-w-new-header-action:before { + content: "\e6bb"; +} +.icon-w-object-edit-panel:before { + content: "\e6bb"; +} +.icon-w-object-tree-menu:before { + content: "\e73a"; +} +.icon-w-page-title:before { + content: "\e727"; +} +.icon-w-preview-edit:before { + content: "\e696"; +} +.icon-w-selector:before { + content: "\e6bb"; +} +.icon-w-select-site:before { + content: "\e698"; +} +.icon-w-theme-file-manager:before { + content: "\e68a"; +} +.icon-w-tree:before { + content: "\e73a"; +} +.icon-w-tree-guide:before { + content: "\e73a"; +} +.icon-w-users-viewer:before { + content: "\e605"; +} +.icon-w-vertical-tabs:before { + content: "\e73c"; +} +.icon-file-default:before { + content: "\e69c"; +} +.icon-file-3gp:before { + content: "\e636"; +} +.icon-file-accdb:before { + content: "\e6a0"; +} +.icon-file-ai:before { + content: "\e717"; +} +.icon-file-ascx:before { + content: "\e714"; +} +.icon-file-aspx:before { + content: "\e69f"; +} +.icon-file-au:before { + content: "\e71c"; +} +.icon-file-avi:before { + content: "\e636"; +} +.icon-file-bat:before { + content: "\e71a"; +} +.icon-file-bmp:before { + content: "\e633"; +} +.icon-file-cs:before { + content: "\e718"; +} +.icon-file-css:before { + content: "\e63f"; +} +.icon-file-csv:before { + content: "\e612"; +} +.icon-file-dbm:before { + content: "\e6a0"; +} +.icon-file-doc:before { + content: "\e625"; +} +.icon-file-eps:before { + content: "\e717"; +} +.icon-file-flv:before { + content: "\e636"; +} +.icon-file-gif:before { + content: "\e633"; +} +.icon-file-html:before { + content: "\e6e7"; +} +.icon-file-jpeg:before { + content: "\e633"; +} +.icon-file-js:before { + content: "\e6cb"; +} +.icon-file-mdb:before { + content: "\e6a0"; +} +.icon-file-mid:before { + content: "\e71c"; +} +.icon-file-mov:before { + content: "\e636"; +} +.icon-file-mp3:before { + content: "\e71c"; +} +.icon-file-mp4:before { + content: "\e636"; +} +.icon-file-mpeg:before { + content: "\e71c"; +} +.icon-file-mpg:before { + content: "\e636"; +} +.icon-file-mpg4:before { + content: "\e636"; +} +.icon-file-oga:before { + content: "\e71c"; +} +.icon-file-ogg:before { + content: "\e71c"; +} +.icon-file-ogv:before { + content: "\e636"; +} +.icon-file-pdf:before { + content: "\e6a3"; +} +.icon-file-png:before { + content: "\e633"; +} +.icon-file-pps:before { + content: "\e71d"; +} +.icon-file-ppt:before { + content: "\e71d"; +} +.icon-file-ps:before { + content: "\e717"; +} +.icon-file-psd:before { + content: "\e633"; +} +.icon-file-rtf:before { + content: "\e625"; +} +.icon-file-sln:before { + content: "\e6ff"; +} +.icon-file-swf:before { + content: "\e636"; +} +.icon-file-tif:before { + content: "\e633"; +} +.icon-file-tiff:before { + content: "\e633"; +} +.icon-file-txt:before { + content: "\e625"; +} +.icon-file-vb:before { + content: "\e716"; +} +.icon-file-wav:before { + content: "\e71c"; +} +.icon-file-webm:before { + content: "\e636"; +} +.icon-file-wma:before { + content: "\e71c"; +} +.icon-file-wmv:before { + content: "\e636"; +} +.icon-file-xls:before { + content: "\e612"; +} +.icon-file-xml:before { + content: "\e6e7"; +} +.icon-file-xsl:before { + content: "\e6e7"; +} +.icon-file-xslt:before { + content: "\e6e7"; +} +.icon-file-zip:before { + content: "\e715"; +} +.icon-me-abstractobjectcollection:before { + content: "\e68b"; +} +.icon-me-binding:before { + content: "\e67f"; +} +.icon-me-boolean:before { + content: "\e74a"; +} +.icon-me-datetime:before { + content: "\e6a8"; +} +.icon-me-double:before { + content: "\e752"; +} +.icon-me-false:before { + content: "\e74e"; +} +.icon-me-children:before { + content: "\e67b"; +} +.icon-me-icontext:before { + content: "\e654"; +} +.icon-me-ilist:before { + content: "\e6f8"; +} +.icon-me-imacronamespace:before { + content: "\e699"; +} +.icon-me-info:before { + content: "\e6a9"; +} +.icon-me-insertmacro:before { + content: "\e740"; +} +.icon-me-int32:before { + content: "\e752"; +} +.icon-me-method:before { + content: "\e6a6"; +} +.icon-me-null:before { + content: "\e751"; +} +.icon-me-number:before { + content: "\e752"; +} +.icon-me-parent:before { + content: "\e74c"; +} +.icon-me-property:before { + content: "\e6a9"; +} +.icon-me-referring:before { + content: "\e67f"; +} +.icon-me-sitebinding:before { + content: "\e67f"; +} +.icon-me-snippet:before { + content: "\e750"; +} +.icon-me-string:before { + content: "\e74f"; +} +.icon-me-true:before { + content: "\e74b"; +} +.icon-me-value:before { + content: "\e749"; +} +.icon-me-exception:before { + content: "\e693"; +} +.icon-crosshair { + position: relative; + display: inline-block; +} +.icon-crosshair:before { + content: "\e71b"; + color: #fff; + position: absolute; + left: 0; + display: inline-block; +} +.icon-crosshair:after { + content: "\e71f"; + position: absolute; + left: 0; + display: inline-block; +} +.row.section-white { + background: #ffffff; +} +.row.section-cappuccino { + background-color: #CEB48D; +} +.row.section-cappuccino h1, +.row.section-cappuccino h2, +.row.section-cappuccino h3, +.row.section-cappuccino .h1, +.row.section-cappuccino .h2, +.row.section-cappuccino .h3 { + color: #6a5a3b; +} +.row.section-cappuccino .image-uploader-editor .uploader .dz-message { + color: #ffffff; +} +.cookie-consent { + font-size: 16px; + padding: 8px; + background: #E2D1BA; + color: #000000; +} +.cookie-consent .consent-text { + padding-bottom: 16px; +} +.cookie-consent .consent-buttons { + text-align: right; + margin: 0; +} +/*# Buttons #*/ +.btn { + padding: 0.5rem 1rem; + cursor: pointer; + background: #fff; + display: inline-block; + text-decoration: none; + letter-spacing: 2px; + line-height: 2.14286; + color: #ffffff; + background-color: #272219; + text-transform: uppercase; + font-size: 0.875rem; + border: none; +} +.btn:hover { + background: rgba(39, 34, 25, 0.8); +} +.btn-primary { + padding: 0.5625rem 1.5rem; +} +.btn:hover { + background: rgba(39, 34, 25, 0.8); +} +.btn-more { + margin: 3.5rem 0; + text-transform: uppercase; + font-size: 0.875rem; +} +.btn-disabled { + background-color: #a3a2a2; + border-color: #696663; +} +.btn-disabled:hover { + background: #a3a2a2; +} +@media (min-width: 768px) { + .btn-more { + padding: 1rem 2.5rem; + } +} +/*# Page wrap #*/ +html, +body { + height: 100%; +} +body { + display: table; + width: 100%; + color: #282828; + font-size: 18px; +} +body * { + font-family: "Source Sans Pro"; +} +h1 { + font-family: "PT Serif"; +} +h2 { + font-size: 34px; + font-weight: 400; + display: block; + text-align: center; +} +.fr-view { + width: 100%; + text-align: center; +} +.fr-view p { + text-align: left; +} +.fr-view h2 { + display: inline-block; + position: relative; + margin-bottom: 50px; + font-size: 3rem; + font-weight: 300; + line-height: 1.16666; + text-align: center; + color: #846331; +} +@media (min-width: 768px) { + .fr-view h2:before, + .fr-view h2:after { + width: 130px; + height: 1px; + position: absolute; + top: 50%; + background: currentColor; + content: ''; + } + .fr-view h2:before { + right: calc(100% + 32px); + } + .fr-view h2:after { + left: calc(100% + 32px); + } +} +.page-wrap, +.footer-wrapper { + display: table-row; +} +/*# Header #*/ +header .container { + padding: 1rem 0; +} +header .stripe { + height: 1.5rem; +} +.content-wrapper { + padding: 0; +} +.content-wrapper.top { + background: url(../Images/plant-3.png) right 580px no-repeat, url(../Images/bg.jpg) left bottom repeat; +} +.content-wrapper.top .row--with-cols-padding { + padding-bottom: 2em; +} +.content-wrapper.bottom { + background: url(../Images/plant-2.png) left 50% no-repeat, url(../Images/bg.jpg) left bottom repeat; +} +.content-wrapper.bottom p { + margin: 1rem 2.5rem 1rem 0rem; +} +.content-wrapper.bottom h3 { + font-size: 1.5rem; + font-weight: 400; + text-align: left; + margin: 1rem 2.5rem 1rem 0rem; +} +@media (min-width: 768px) { + .row--with-cols-padding { + display: flex; + } +} +.product-card { + background: #ffffff; + padding: 1rem; + height: 100%; + margin-bottom: 1rem; +} +.product-card img { + max-width: 100%; +} +@media (min-width: 768px) { + .product-card { + margin-bottom: 0; + } +} +/*# Card widget*/ +.card-body { + padding: 2rem 0; +} +.card-body .card-section { + height: 15.625rem; + width: 15.625rem; + background-size: cover; + background-repeat: no-repeat; + background-position-x: 50%; + text-align: left; + margin: 0 auto; +} +.card-body .card-section .card-text { + position: relative; + top: 50%; + transform: translateY(-50%); + width: 15.625rem; + color: #FFFFFF; + background-color: rgba(39, 34, 25, 0.8); + font-weight: normal; + font-size: 1rem; + line-height: 1.9rem; + padding: 0.6rem 1rem; + display: inline-block; + text-align: center; +} +/*# Form */ +form { + margin: 1rem 1.5rem 1rem 0rem; +} +form label { + margin-right: 2rem; + vertical-align: top; +} +form input[type=submit] { + padding: 0.5rem 1rem; + cursor: pointer; + background: #fff; + display: inline-block; + text-decoration: none; + letter-spacing: 2px; + line-height: 2.14286; + color: #ffffff; + background-color: #272219; + text-transform: uppercase; + font-size: 0.875rem; + border: none; +} +form input[type=submit]:hover { + background: rgba(39, 34, 25, 0.8); +} +form .form-field { + margin: 0.75rem 0; +} +form .form-field .editing-form-control-nested-control { + display: inline-block; + width: 100%; +} +form .form-field .editing-form-control-nested-control .form-control { + width: 100%; +} +form .form-field .editing-form-control-nested-control .field-validation-error { + color: #ff0000; +} +form .form-field .editing-form-control-nested-control { + text-align: left; +} +form .form-field .editing-form-control-nested-control .ktc-checkbox .form-control { + width: auto; +} +form .form-field .editing-form-control-nested-control .ktc-checkbox label { + margin-left: 0.75em; +} +@media (min-width: 768px) { + form .form-field .editing-form-control-nested-control { + width: 250px; + } +} +@media (min-width: 1112px) { + form { + text-align: right; + } +} +.formwidget-submit-text { + font-size: 1.5rem; + font-weight: 400; + text-align: right; + margin: 1rem 2.5rem 1rem 2rem; + display: block; +} +/*# Footer #*/ +footer .footer-container { + font-size: 13px; + color: #fff; + background: #1D1D1D; + padding-top: 2rem; + padding-bottom: 2rem; +} +.error-label { + font-weight: bold; + margin-top: 0.3rem; + margin-bottom: 0.6rem; + display: block; + color: #D12127; +} +.info-label { + font-weight: bold; + margin-top: 0.3rem; + margin-bottom: 0.6rem; + display: block; + color: white; + background-color: #497d04 !important; + padding: 1rem; +} +/*# Testimonial widget #*/ +.testimonial-body { + padding: 30px; + color: #ffffff; + font-size: 1.5rem; + text-align: left; + position: relative; + overflow: hidden; +} +.testimonial-body:before { + content: "\201C"; + opacity: 0.1; + font-size: 350px; + position: absolute; + left: 54px; + top: -110px; +} +.testimonial-body .author { + font-size: 1.2rem; +} +@media (min-width: 768px) { + .testimonial-body { + padding: 80px 100px 80px 200px; + } + .testimonial-body:before { + opacity: 0.4; + } +} +.first-color { + background-color: #272219; +} +.second-color { + background-color: #846331; +} +.third-color { + background-color: #494132; +} +/*# Hero image widget #*/ +.hero-image-section { + height: 580px; + width: 100%; + background-size: cover; + background-repeat: no-repeat; +} +.hero-image-section .content { + text-align: center; + position: relative; + top: 50%; + transform: translateY(-50%); + padding: 1rem; + pointer-events: none; +} +.hero-image-section .content .btn, +.hero-image-section .content .text { + pointer-events: auto; +} +.hero-image-section .content .btn { + line-height: 30px; + padding: 0.3rem 5rem; + border: 2px solid; + cursor: pointer; + display: inline-block; + text-decoration: none; + text-transform: uppercase; + font-weight: bold; + font-size: 1rem; + color: inherit; + padding: 1rem 2rem; + background: transparent; +} +.hero-image-section .content .btn:hover { + background: rgba(255, 255, 255, 0.3); +} +.hero-image-section .content .text { + width: 100%; + z-index: 1; + font-weight: 700; + font-size: 3rem; + line-height: 1; + display: inline-block; + margin-bottom: 3rem; +} +.hero-image-section .content a.btn { + cursor: pointer; +} +.hero-image-section.dark .content { + color: #000000; +} +.hero-image-section.dark .content .btn { + color: inherit; + border-color: #000000; +} +.hero-image-section.light .content { + color: #ffffff; +} +.hero-image-section.light .content .btn { + color: inherit; + border-color: #ffffff; +} +@media (min-width: 768px) { + .hero-image-section .content { + padding: 8rem; + text-align: left; + } + .hero-image-section .content .btn { + padding: 1rem 7rem; + } + .hero-image-section .content .text { + z-index: 1; + font-weight: 700; + font-size: 4rem; + line-height: 1; + display: inline-block; + margin-bottom: 3rem; + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Landing-page.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Landing-page.less new file mode 100644 index 0000000..edb98f7 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Landing-page.less @@ -0,0 +1,421 @@ +@import "./variables.less"; +@import "./Fonts.less"; +@import "./Grid.less"; +@import "./icons-core.less"; +@import "./Sections.less"; +@import "./TrackingConsent.less"; +@import "./Buttons.less"; + +/*# Page wrap #*/ +html, body { + height: 100%; +} + +body { + display: table; + width: 100%; + color: rgb(40, 40, 40); + font-size: 18px; + + * { + font-family: "Source Sans Pro"; + } +} + +h1 { + font-family: "PT Serif"; +} + +h2 { + font-size: 34px; + font-weight: 400; + display: block; + text-align: center; +} + +.fr-view { + width: 100%; + text-align: center; + + p { + text-align: left; + } + + h2 { + display: inline-block; + position: relative; + margin-bottom: 50px; + font-size: 3rem; + font-weight: 300; + line-height: 1.16666; + text-align: center; + color: @color-brown; + } + + @media (min-width: 768px) { + h2 { + &:before, + &:after { + width: 130px; + height: 1px; + position: absolute; + top: 50%; + background: currentColor; + content: ''; + } + + &:before { + right: calc(100% + 32px); + } + + &:after { + left: calc(100% + 32px); + } + } + } +} + +.page-wrap, .footer-wrapper { + display: table-row; +} + +/*# Header #*/ +header { + .container { + padding: 1rem 0; + } + + .stripe { + height: 1.5rem; + } +} + +.content-wrapper { + padding: 0; + + &.top { + background: url(../Images/plant-3.png) right 580px no-repeat, url(../Images/bg.jpg) left bottom repeat; + + .row--with-cols-padding { + padding-bottom: 2em; + } + } + + &.bottom { + background: url(../Images/plant-2.png) left 50% no-repeat, url(../Images/bg.jpg) left bottom repeat; + } + + &.bottom p { + margin: 1rem 2.5rem 1rem 0rem; + } + + &.bottom h3 { + font-size: 1.5rem; + font-weight: 400; + text-align: left; + margin: 1rem 2.5rem 1rem 0rem; + } +} + +@media (min-width: 768px) { + .row--with-cols-padding { + display: flex; + } +} + +.product-card { + background: @color-white; + padding: 1rem; + height: 100%; + margin-bottom: 1rem; + + img { + max-width: 100%; + } + + @media (min-width: 768px) { + margin-bottom: 0; + } +} + +/*# Card widget*/ +.card-body { + padding: 2rem 0; + + .card-section { + height: 15.625rem; + width: 15.625rem; + background-size: cover; + background-repeat: no-repeat; + background-position-x: 50%; + text-align: left; + margin: 0 auto; + + .card-text { + position: relative; + top: 50%; + transform: translateY(-50%); + width: 15.625rem; + color: #FFFFFF; + background-color: rgba(39, 34, 25, 0.8); + font-weight: normal; + font-size: 1rem; + line-height: 1.9rem; + padding: 0.6rem 1rem; + display: inline-block; + text-align: center; + } + } +} + +/*# Form */ +form { + margin: 1rem 1.5rem 1rem 0rem; + + label { + margin-right: 2rem; + vertical-align: top; + } + + input[type=submit] { + padding: .5rem 1rem; + cursor: pointer; + background: #fff; + display: inline-block; + text-decoration: none; + letter-spacing: 2px; + line-height: 2.14286; + color: @color-white; + background-color: @color-darkbrown; + text-transform: uppercase; + font-size: .875rem; + border: none; + + &:hover { + background: rgba(39, 34, 25, 0.8); + } + } + + .form-field { + margin: 0.75rem 0; + + .editing-form-control-nested-control { + display: inline-block; + width: 100%; + + .form-control { + width: 100%; + } + + .field-validation-error { + color: #ff0000; + } + } + + .editing-form-control-nested-control { + text-align: left; + + .ktc-checkbox { + .form-control { + width: auto; + } + + label { + margin-left: 0.75em; + } + } + } + } +} + +@media (min-width: 768px) { + form .form-field .editing-form-control-nested-control { + width: 250px; + } +} + +@media (min-width: 1112px) { + form { + text-align: right; + } +} + +.formwidget-submit-text { + font-size: 1.5rem; + font-weight: 400; + text-align: right; + margin: 1rem 2.5rem 1rem 2rem; + display: block; +} + +/*# Footer #*/ +footer { + .footer-container { + font-size: 13px; + color: #fff; + background: #1D1D1D; + padding-top: 2rem; + padding-bottom: 2rem; + } +} + +.error-label { + font-weight: bold; + margin-top: .3rem; + margin-bottom: .6rem; + display: block; + color: #D12127; +} + +.info-label { + font-weight: bold; + margin-top: .3rem; + margin-bottom: .6rem; + display: block; + color: white; + background-color: #497d04 !important; + padding: 1rem; +} + +/*# Testimonial widget #*/ +.testimonial-body { + padding: 30px; + color: rgb(255, 255, 255); + font-size: 1.5rem; + text-align: left; + position: relative; + overflow: hidden; + + &:before { + content: "\201C"; + opacity: 0.1; + font-size: 350px; + position: absolute; + left: 54px; + top: -110px; + } + + .author { + font-size: 1.2rem; + } +} + +@media (min-width: 768px) { + .testimonial-body { + padding: 80px 100px 80px 200px; + + &:before { + opacity: 0.4; + } + } +} + +.first-color { + background-color: @color-darkbrown; +} + +.second-color { + background-color: @color-brown; +} + +.third-color { + background-color: @color-gold; +} + +/*# Hero image widget #*/ +.hero-image-section { + height: 580px; + width: 100%; + background-size: cover; + background-repeat: no-repeat; + + .content { + text-align: center; + position: relative; + top: 50%; + transform: translateY(-50%); + padding: 1rem; + pointer-events: none; + + .btn, .text { + pointer-events: auto; + } + + .btn { + line-height: 30px; + padding: .3rem 5rem; + border: 2px solid; + cursor: pointer; + display: inline-block; + text-decoration: none; + text-transform: uppercase; + font-weight: bold; + font-size: 1rem; + color: inherit; + padding: 1rem 2rem; + background: transparent; + + &:hover { + background: rgba(255, 255, 255, 0.3); + } + } + + .text { + width: 100%; + z-index: 1; + font-weight: 700; + font-size: 3rem; + line-height: 1; + display: inline-block; + margin-bottom: 3rem; + } + + a.btn { + cursor: pointer; + } + } + + &.dark { + .content { + color: #000000; + + .btn { + color: inherit; + border-color: #000000; + } + } + } + + &.light { + .content { + color: #ffffff; + + .btn { + color: inherit; + border-color: #ffffff; + } + } + } +} + +@media (min-width: 768px) { + .hero-image-section { + .content { + padding: 8rem; + text-align: left; + + .btn { + padding: 1rem 7rem; + } + + .text { + z-index: 1; + font-weight: 700; + font-size: 4rem; + line-height: 1; + display: inline-block; + margin-bottom: 3rem; + } + } + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Menu.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Menu.less new file mode 100644 index 0000000..8f9f015 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Menu.less @@ -0,0 +1,412 @@ +.navigation { + display: flex; + flex-direction: row; + align-items: center; + flex-grow: 1; + color: @color-lightbrown; + + a { + text-decoration: none; + } + + a:hover, a:active { + color: @color-brown; + } + + a.navigation__cta { + display: flex; + align-items: center; + font-weight: 500; + margin-left: 0; + background: none; + + &-icon { + margin-left: 4px; + } + } +} + +.nav-logo { + float: left; + height: 50px; + display: flex; + flex-direction: column; + justify-content: center; + margin-left: 20px; + + .logo-wrapper a { + display: flex; + flex-direction: column; + + img { + height: 36px; + } + } +} + +ul.nav-menu { + display: flex; + flex-direction: column; + position: absolute; + top: 88px; + height: 0; + padding: 0; + overflow: hidden; + z-index: 99; + width: 100%; + list-style: none; + + li { + width: 100%; + + a { + display: inline-block; + width: 100%; + padding: 10px; + background-color: @color-darkbrown; + } + } +} + +ul.nav-menu.active { + height: auto; +} + +ul.additional-menu { + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-end; + flex-grow: 1; + margin-left: 10px; + + li { + height: 50px; + display: flex; + flex-direction: column; + justify-content: center; + + a { + padding: 5px; + -webkit-transition-duration: 0.3s; + -o-transition-duration: 0.3s; + transition-duration: 0.3s; + } + } +} + +/*# Avatar #*/ +.dropdown-desktop-avatar { + height: 30px; + width: 30px; + vertical-align: middle; + border-radius: 50%; +} + +/*# Search box #*/ +.searchBox { + display: inline-block; + width: 100%; + background: @color-gold; + + input[type=text] { + padding: 0 1rem; + width: calc(100% - 32px); + color: @color-lightbrown; + background: @color-gold; + + .placeholder ( { + color: @color-lightbrown; + } + + ) + } + + .search-box-watermark { + color: @color-lightbrown; + } + + .search-box-btn { + padding: .6rem 1rem; + float: right; + background: url(../Images/magnifier.svg) no-repeat center; + } + + .search-box-btn:focus, + .search-box-btn:hover { + background: url(../Images/magnifier-dark.svg) no-repeat center; + float: right; + } + + input, + input:hover, + input:focus { + height: 32px; + border: none; + float: left; + outline: none; + box-shadow: none; + } +} + +.search-mobile { + padding: 0 5px; + background: @color-darkbrown; +} + +.nav-toggle { + display: block; + position: relative; + width: 50px; + height: 50px; + margin-left: 5px; + cursor: pointer; + padding: 5px; + + .nav-toggle-inner { + width: 100%; + height: 100%; + background-color: @color-brown; + } +} + +span.icon-bar { + position: absolute; + right: 16px; + display: block; + width: 18px; + height: 2px; + background-color: #ffffff; + -webkit-transition-duration: 0.3s; + -o-transition-duration: 0.3s; + transition-duration: 0.3s; +} + +span.icon-bar:before { + content: none; +} + +.icon-bar:nth-child(1) { + top: 17px; +} + +.icon-bar:nth-child(2) { + top: 24px; +} + +.icon-bar:nth-child(3) { + top: 31px; +} + +/* ICON BARS ANIMATION */ + +.nav-toggle.active .icon-bar:nth-child(1) { + top: 24px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + transform: rotate(45deg); +} + +.nav-toggle.active .icon-bar:nth-child(2) { + width: 0; +} + +.nav-toggle.active .icon-bar:nth-child(3) { + top: 24px; + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + transform: rotate(-45deg); +} + +@media screen and (min-width: 768px) { + + .nav-logo { + margin-left: 24px; + margin-right: 20px; + height: auto; + + .logo-wrapper a { + img { + height: 46px; + } + } + } + + ul.nav-menu { + top: 100px; + } + + ul.additional-menu { + margin-right: 24px; + margin-left: 20px; + + li a { + padding: 0 5px; + } + + .search-menu-item { + display: flex; + flex-grow: 1; + max-width: 400px; + margin-right: 5px; + } + } + + .nav-toggle { + display: none; + } + + .nav-logo img { + height: 46px; + } + + .search-mobile { + display: none; + } +} + +@media screen and (min-width:1112px) { + .nav-toggle { + display: none; + } + + .nav-logo { + margin-left: 0; + + .logo-wrapper a img { + height: auto; + } + } + + ul.nav-menu { + position: static; + height: auto; + flex-direction: row; + align-items: center; + width: auto; + } + + ul.nav-menu li { + width: auto; + } + + ul.nav-menu li a { + width: auto; + padding: 10px; + } + + ul.additional-menu { + margin-right: 0; + + li.nav-toggle { + display: none; + } + + li a { + padding: 0 10px; + } + + .search-menu-item { + margin-right: 10px; + } + } +} + + +/* DROPDOWN */ + +.dropdown, .dropbtn { + position: relative; + display: inline-block; +} + +li.dropdown { + display: inline-block; + + a { + cursor: pointer; + } +} + +.dropdown-content { + display: none; + position: absolute; + top: 50px; + right: 0; + background-color: @color-lightbrown; + z-index: 1; +} + +.dropdown .dropdown-content { + & > a, form { + color: @color-white; + text-decoration: none; + display: block; + text-align: left; + } + + & > a { + padding: 8px 24px; + } + + & > form { + width: 100%; + + .sign-out-button { + width: 100%; + border: none; + background: none; + padding: 8px 24px; + text-align: left; + } + } +} + +.dropdown-content { + a:hover, form:hover { + background-color: @color-brown; + } +} + +.dropdown:hover .dropdown-content { + display: block; +} + +/*# Second level menu #*/ +.store-menu-list { + background: @color-lightbrown; +} + +.sub-menu { + font-size: 1.25rem; + text-transform: none; + line-height: 100%; +} + +.sub-menu ul { + list-style: none; + display: inline; +} + +.sub-menu li:hover { + background: @color-brown; +} + +.sub-menu li, .sub-menu a { + float: left; +} + +.sub-menu a { + padding: 1.25rem; +} + +.sub-menu a, +.sub-menu a:hover, +.sub-menu a:focus { + text-decoration: none; + color: #FFF; +} + +.sub-menu .sub-menu-item-selected { + background-color: #333; +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Mixins.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Mixins.less new file mode 100644 index 0000000..0066c7e --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Mixins.less @@ -0,0 +1,15 @@ +.placeholder(@rules) { + + &::-webkit-input-placeholder { + @rules(); + } + &:-moz-placeholder { + @rules(); + } + &::-moz-placeholder { + @rules(); + } + &:-ms-input-placeholder { + @rules(); + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Privacy.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Privacy.less new file mode 100644 index 0000000..d5574b0 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Privacy.less @@ -0,0 +1,14 @@ +.consent-item { + &:not(:first-of-type) { + border-top: 1px solid #e7e7e7; + } + + .row { + margin: 0 32px 0 32px; + padding: 8px 0 0 0; + } + + .consent-heading { + margin: 0; + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Reset.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Reset.less new file mode 100644 index 0000000..20a5ed8 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Reset.less @@ -0,0 +1,37 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ + +html, body, div, span, applet, object, iframe, +h1, h2, h3, h4, h5, h6, p, blockquote, pre, +a, abbr, acronym, address, big, cite, code, +del, dfn, img, ins, kbd, q, s, samp, +small, strike, strong, sub, sup, tt, var, +b, u, i, center, +dl, dt, dd, +fieldset, form, label, legend, +table, caption, tbody, tfoot, thead, tr, th, td, +article, aside, canvas, details, embed, +figure, figcaption, footer, header, hgroup, +menu, nav, output, ruby, section, summary, +time, mark, audio, video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, aside, details, figcaption, figure, +footer, header, hgroup, menu, nav, section { + display: block; +} +body { + line-height: 1; +} +table { + border-collapse: collapse; + border-spacing: 0; +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Sections.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Sections.less new file mode 100644 index 0000000..e0309da --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Sections.less @@ -0,0 +1,17 @@ +.row { + &.section-white { + background: @color-white; + } + + &.section-cappuccino { + background-color: @color-lightestbrown; + + h1, h2, h3, .h1, .h2, .h3 { + color: @color-lightgold; + } + + .image-uploader-editor .uploader .dz-message { + color: @color-white; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Site.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Site.css new file mode 100644 index 0000000..02d73a0 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Site.css @@ -0,0 +1,6550 @@ +/* http://meyerweb.com/eric/tools/css/reset/ + v2.0 | 20110126 + License: none (public domain) +*/ +html, +body, +div, +span, +applet, +object, +iframe, +h1, +h2, +h3, +h4, +h5, +h6, +p, +blockquote, +pre, +a, +abbr, +acronym, +address, +big, +cite, +code, +del, +dfn, +img, +ins, +kbd, +q, +s, +samp, +small, +strike, +strong, +sub, +sup, +tt, +var, +b, +u, +i, +center, +dl, +dt, +dd, +fieldset, +form, +label, +legend, +table, +caption, +tbody, +tfoot, +thead, +tr, +th, +td, +article, +aside, +canvas, +details, +embed, +figure, +figcaption, +footer, +header, +hgroup, +menu, +nav, +output, +ruby, +section, +summary, +time, +mark, +audio, +video { + margin: 0; + padding: 0; + border: 0; + font-size: 100%; + font: inherit; + vertical-align: baseline; +} +/* HTML5 display-role reset for older browsers */ +article, +aside, +details, +figcaption, +figure, +footer, +header, +hgroup, +menu, +nav, +section { + display: block; +} +body { + line-height: 1; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +@font-face { + font-family: 'PT Serif'; + font-style: normal; + font-weight: 700; + src: local('PT Serif Bold'), local('PTSerif-Bold'), url(../Fonts/PTSerif-Bold.woff) format('woff'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 300; + src: local('Source Sans Pro Light'), local('SourceSansPro-Light'), url(../Fonts/SourceSansPro-Light.woff) format('woff'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 400; + src: local('Source Sans Pro'), local('SourceSansPro-Regular'), url(../Fonts/SourceSansPro-Regular.woff) format('woff'); +} +@font-face { + font-family: 'Source Sans Pro'; + font-style: normal; + font-weight: 700; + src: local('Source Sans Pro Bold'), local('SourceSansPro-Bold'), url(../Fonts/SourceSansPro-Bold.woff) format('woff'); +} +@font-face { + font-family: 'Core-icons'; + src: url('../Fonts/Core-icons.eot'); + src: url('../Fonts/Core-icons.svg#Core-icons') format('svg'), url('../Fonts/Core-icons.eot?#iefix') format('embedded-opentype'), url('../Fonts/Core-icons.woff') format('woff'), url('../Fonts/Core-icons.ttf') format('truetype'); + font-weight: normal; + font-style: normal; +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 300; + src: url(../Fonts/GT-Walsheim-Thin.woff); +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 400; + src: url(../Fonts/GT-Walsheim-Regular.woff); +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 500; + src: url(../Fonts/GT-Walsheim-Medium.woff); +} +@font-face { + font-family: 'GT-Wallsheim'; + font-weight: 700; + src: url(../Fonts/GT-Walsheim-Bold.woff); +} +/*# Form */ +div.contact-us-form .form-field { + margin-bottom: 0.8rem; +} +div.contact-us-form .form-field-label { + margin-bottom: 0.3rem; +} +div.contact-us-form .form-field-label-required:after { + content: "*"; + color: #B4594A; +} +div.contact-us-form .input-style { + padding: 0.4rem; + width: 60%; +} +div.contact-us-form .editing-form-control-nested-control input, +div.contact-us-form .editing-form-control-nested-control textarea { + padding: 0.4rem; + width: 60%; +} +div.contact-us-form .editing-form-control-nested-control textarea { + width: 100%; + height: 6rem; +} +div.contact-us-form .field-validation-error { + font-weight: bold; + color: #D12127; +} +div.contact-us-form input[type="submit"] { + -webkit-appearance: button; + padding: 0.6rem 2rem; + cursor: pointer; + color: #ffffff; + background-color: #272219; + border: none; + display: inline-block; + text-decoration: none; + text-transform: uppercase; + letter-spacing: 2px; + font-size: 0.875rem; +} +div.contact-us-form input[type="submit"]:hover { + background: rgba(39, 34, 25, 0.8); +} +div.contact-us-form .ktc-file-component-wrapper .ktc-uploader-text { + max-width: calc(100% - 26px); + text-overflow: ellipsis; + overflow: hidden; + vertical-align: bottom; + white-space: nowrap; + display: inline-block; +} +div.contact-us-form .ktc-file-component-wrapper .ktc-uploader-icon-button { + font-family: "Core-icons"; + font-size: 20px; + position: absolute; + right: 8px; + color: #504e4c; + line-height: 24px; +} +div.contact-us-form .ktc-file-component-wrapper .ktc-uploader-icon-button[data-icon="select"]::before { + content: "\e6d3"; + cursor: pointer; +} +@keyframes spin { + 0% { + transform: rotate(0deg); + } + 100% { + transform: rotate(359deg); + } +} +div.contact-us-form .ktc-file-component-wrapper .ktc-uploader-icon-button[data-icon="loading"]::before { + content: "\e61a"; + display: inline-block; + animation: spin 1.2s infinite linear; +} +div.contact-us-form .ktc-file-component-wrapper .ktc-uploader-icon-button[data-icon="remove"] { + cursor: pointer; +} +div.contact-us-form .ktc-file-component-wrapper .ktc-uploader-icon-button[data-icon="remove"]::before { + content: "\e6d0"; +} +div.contact-us-form .ktc-file-component-wrapper .ktc-uploader-replacement { + display: none; +} +div.contact-us-form .ktc-file-component-wrapper .ktc-uploader-text-button { + display: none; +} +div.contact-us-form .ktc-file-component-wrapper input[type="file"] { + display: none; +} +div.contact-us-form .ktc-file-component-wrapper label { + margin-bottom: 0.8rem; + padding: 0.4rem; + width: 60%; + display: inline-block; + border: 1px solid #BEBEBE; + position: relative; + cursor: pointer; +} +/*! normalize.css v3.0.1 | MIT License | git.io/normalize */ +html { + font-family: sans-serif; + -ms-text-size-adjust: 100%; + -webkit-text-size-adjust: 100%; +} +body { + margin: 0; +} +article, +aside, +details, +figcaption, +figure, +footer, +header, +main, +nav, +section, +summary { + display: block; +} +audio, +canvas, +progress, +video { + display: inline-block; + vertical-align: baseline; +} +audio:not([controls]) { + display: none; + height: 0; +} +[hidden], +template { + display: none; +} +a { + background: transparent; +} +a:active, +a:hover { + outline: 0; +} +abbr[title] { + border-bottom: 1px dotted; +} +b, +strong { + font-weight: bold; +} +dfn { + font-style: italic; +} +h1 { + font-size: 2em; + margin: 0.67em 0; +} +mark { + background: #ff0; + color: #000; +} +small { + font-size: 80%; +} +sub, +sup { + font-size: 75%; + line-height: 0; + position: relative; + vertical-align: baseline; +} +sup { + top: -0.5em; +} +sub { + bottom: -0.25em; +} +img { + border: 0; +} +svg:not(:root) { + overflow: hidden; +} +figure { + margin: 1em 40px; +} +hr { + -moz-box-sizing: content-box; + box-sizing: content-box; + height: 0; +} +pre { + overflow: auto; +} +code, +kbd, +pre, +samp { + font-family: monospace, monospace; + font-size: 1em; +} +button, +input, +optgroup, +select, +textarea { + color: inherit; + font: inherit; + margin: 0; +} +button { + overflow: visible; +} +button, +select { + text-transform: none; +} +button, +html input[type="button"], +input[type="reset"], +input[type="submit"] { + -webkit-appearance: button; + cursor: pointer; +} +button[disabled], +html input[disabled] { + cursor: not-allowed; +} +button::-moz-focus-inner, +input::-moz-focus-inner { + border: 0; + padding: 0; +} +input { + line-height: normal; +} +input[type="text"], +input[type="email"], +textarea { + border: 1px solid #BEBEBE; +} +input[type="text"]:focus, +input[type="email"]:focus, +textarea:focus { + outline: 0; + box-shadow: 0 0 1px #08768c; + border: 1px solid #08768c; +} +input[type="checkbox"], +input[type="radio"] { + box-sizing: border-box; + padding: 0; +} +input[type="number"]::-webkit-inner-spin-button, +input[type="number"]::-webkit-outer-spin-button { + height: auto; +} +input[type="search"] { + -webkit-appearance: textfield; + -moz-box-sizing: content-box; + -webkit-box-sizing: content-box; + box-sizing: content-box; +} +input[type="search"]::-webkit-search-cancel-button, +input[type="search"]::-webkit-search-decoration { + -webkit-appearance: none; +} +fieldset { + border: 1px solid #c0c0c0; + margin: 0 2px; + padding: 0.35em 0.625em 0.75em; +} +legend { + border: 0; + padding: 0; +} +textarea { + overflow: auto; +} +optgroup { + font-weight: bold; +} +table { + border-collapse: collapse; + border-spacing: 0; +} +td, +th { + padding: 0; +} +* { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +*:before, +*:after { + -webkit-box-sizing: border-box; + -moz-box-sizing: border-box; + box-sizing: border-box; +} +/*# Typography #*/ +body { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 400; + font-size: 16px; + line-height: 1.4; + color: #1C1C1C; + background-color: #ffffff; +} +input, +button, +select, +textarea { + font-family: inherit; + font-size: inherit; + line-height: inherit; +} +a { + color: #B49669; + text-decoration: underline; +} +a:hover, +a:focus { + text-decoration: none; +} +h1 a, +.h1 a, +h2 a, +.h2 a, +h3 a, +.h3 a, +h4 a, +.h4 a, +h5 a, +.h5 a { + text-decoration: none; +} +h1 a:hover, +h1 a:focus, +.h1 a:hover, +.h1 a:focus, +h2 a:hover, +h2 a:focus, +.h2 a:hover, +.h2 a:focus, +h3 a:hover, +h3 a:focus, +.h3 a:hover, +.h3 a:focus, +h4 a:hover, +h4 a:focus, +.h4 a:hover, +.h4 a:focus, +h5 a:hover, +h5 a:focus, +.h5 a:hover, +.h5 a:focus { + text-decoration: underline; +} +h1, +h2, +h3, +.h1, +.h2, +.h3 { + line-height: 1.4; + color: #846331; + margin-bottom: 0.7rem; +} +h1, +.h1 { + font-weight: 400; + font-size: 4rem; +} +h2, +.h2 { + font-weight: 500; + font-size: 3rem; + margin-top: 3rem; + margin-bottom: 2rem; + line-height: 1; +} +h3, +.h3 { + font-weight: 500; + font-size: 2rem; +} +h4, +.h4 { + font-weight: 700; + font-size: 1.375rem; + margin-top: 1rem; + margin-bottom: 0.7rem; + line-height: 1.4; + color: inherit; +} +h5, +.h5 { + font-weight: 400; + font-size: 1.75rem; + margin-bottom: 1.625rem; + line-height: 1.143; + color: inherit; +} +p { + margin: 0 0 0.625rem; + margin-bottom: 0.7rem; +} +.lead-paragraph { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 300; + margin-bottom: 20px; + font-size: 1.375rem; + line-height: 1.4; +} +/*# Grid #*/ +.container { + margin-right: auto; + margin-left: auto; + padding-left: 8px; + padding-right: 8px; +} +.row { + margin-left: -0.5px; + margin-right: -0.5px; +} +.row--with-cols-padding { + padding: 0 3rem; +} +@media (max-width: 768px) { + .row--with-cols-padding { + padding: 0 1rem; + } +} +.row--with-cols-padding > div[class^='col-'], +.row--with-cols-padding > div[class*=' col-'] { + padding-bottom: 0px; +} +.row--with-cols-padding > div[class^='col-']:last-child, +.row--with-cols-padding > div[class*=' col-']:last-child { + padding-left: 1rem; +} +@media (max-width: 768px) { + .row--with-cols-padding > div[class^='col-']:last-child, + .row--with-cols-padding > div[class*=' col-']:last-child { + padding-left: 0; + } +} +.row--with-cols-padding > div[class^='col-']:first-child, +.row--with-cols-padding > div[class*=' col-']:first-child { + padding-right: 1rem; +} +@media (max-width: 768px) { + .row--with-cols-padding > div[class^='col-']:first-child, + .row--with-cols-padding > div[class*=' col-']:first-child { + padding-right: 0; + } +} +.row--with-cols-padding > div[class^='col-']:not(:last-child):not(:first-child), +.row--with-cols-padding > div[class*=' col-']:not(:last-child):not(:first-child) { + padding-right: 0.5rem; + padding-left: 0.5rem; +} +@media (max-width: 768px) { + .row--with-cols-padding > div[class^='col-']:not(:last-child):not(:first-child), + .row--with-cols-padding > div[class*=' col-']:not(:last-child):not(:first-child) { + padding-right: 0; + padding-left: 0; + } +} +.col-xs-1, +.col-sm-1, +.col-md-1, +.col-lg-1, +.col-xs-2, +.col-sm-2, +.col-md-2, +.col-lg-2, +.col-xs-3, +.col-sm-3, +.col-md-3, +.col-lg-3, +.col-xs-4, +.col-sm-4, +.col-md-4, +.col-lg-4, +.col-xs-5, +.col-sm-5, +.col-md-5, +.col-lg-5, +.col-xs-6, +.col-sm-6, +.col-md-6, +.col-lg-6, +.col-xs-7, +.col-sm-7, +.col-md-7, +.col-lg-7, +.col-xs-8, +.col-sm-8, +.col-md-8, +.col-lg-8, +.col-xs-9, +.col-sm-9, +.col-md-9, +.col-lg-9, +.col-xs-10, +.col-sm-10, +.col-md-10, +.col-lg-10, +.col-xs-11, +.col-sm-11, +.col-md-11, +.col-lg-11, +.col-xs-12, +.col-sm-12, +.col-md-12, +.col-lg-12 { + position: relative; + min-height: 1px; + padding-left: 0.5px; + padding-right: 0.5px; + padding-bottom: 1px; +} +.col-xs-1, +.col-xs-2, +.col-xs-3, +.col-xs-4, +.col-xs-5, +.col-xs-6, +.col-xs-7, +.col-xs-8, +.col-xs-9, +.col-xs-10, +.col-xs-11, +.col-xs-12 { + float: left; +} +.col-xs-12 { + width: 100%; +} +.col-xs-11 { + width: 91.66666667%; +} +.col-xs-10 { + width: 83.33333333%; +} +.col-xs-9 { + width: 75%; +} +.col-xs-8 { + width: 66.66666667%; +} +.col-xs-7 { + width: 58.33333333%; +} +.col-xs-6 { + width: 50%; +} +.col-xs-5 { + width: 41.66666667%; +} +.col-xs-4 { + width: 33.33333333%; +} +.col-xs-3 { + width: 25%; +} +.col-xs-2 { + width: 16.66666667%; +} +.col-xs-1 { + width: 8.33333333%; +} +.col-xs-pull-12 { + right: 100%; +} +.col-xs-pull-11 { + right: 91.66666667%; +} +.col-xs-pull-10 { + right: 83.33333333%; +} +.col-xs-pull-9 { + right: 75%; +} +.col-xs-pull-8 { + right: 66.66666667%; +} +.col-xs-pull-7 { + right: 58.33333333%; +} +.col-xs-pull-6 { + right: 50%; +} +.col-xs-pull-5 { + right: 41.66666667%; +} +.col-xs-pull-4 { + right: 33.33333333%; +} +.col-xs-pull-3 { + right: 25%; +} +.col-xs-pull-2 { + right: 16.66666667%; +} +.col-xs-pull-1 { + right: 8.33333333%; +} +.col-xs-pull-0 { + right: auto; +} +.col-xs-push-12 { + left: 100%; +} +.col-xs-push-11 { + left: 91.66666667%; +} +.col-xs-push-10 { + left: 83.33333333%; +} +.col-xs-push-9 { + left: 75%; +} +.col-xs-push-8 { + left: 66.66666667%; +} +.col-xs-push-7 { + left: 58.33333333%; +} +.col-xs-push-6 { + left: 50%; +} +.col-xs-push-5 { + left: 41.66666667%; +} +.col-xs-push-4 { + left: 33.33333333%; +} +.col-xs-push-3 { + left: 25%; +} +.col-xs-push-2 { + left: 16.66666667%; +} +.col-xs-push-1 { + left: 8.33333333%; +} +.col-xs-push-0 { + left: auto; +} +.col-xs-offset-12 { + margin-left: 100%; +} +.col-xs-offset-11 { + margin-left: 91.66666667%; +} +.col-xs-offset-10 { + margin-left: 83.33333333%; +} +.col-xs-offset-9 { + margin-left: 75%; +} +.col-xs-offset-8 { + margin-left: 66.66666667%; +} +.col-xs-offset-7 { + margin-left: 58.33333333%; +} +.col-xs-offset-6 { + margin-left: 50%; +} +.col-xs-offset-5 { + margin-left: 41.66666667%; +} +.col-xs-offset-4 { + margin-left: 33.33333333%; +} +.col-xs-offset-3 { + margin-left: 25%; +} +.col-xs-offset-2 { + margin-left: 16.66666667%; +} +.col-xs-offset-1 { + margin-left: 8.33333333%; +} +.col-xs-offset-0 { + margin-left: 0%; +} +@media (min-width: 500px) { + .container { + width: 484px; + } + .col-sm-1, + .col-sm-2, + .col-sm-3, + .col-sm-4, + .col-sm-5, + .col-sm-6, + .col-sm-7, + .col-sm-8, + .col-sm-9, + .col-sm-10, + .col-sm-11, + .col-sm-12 { + float: left; + } + .col-sm-12 { + width: 100%; + } + .col-sm-11 { + width: 91.66666667%; + } + .col-sm-10 { + width: 83.33333333%; + } + .col-sm-9 { + width: 75%; + } + .col-sm-8 { + width: 66.66666667%; + } + .col-sm-7 { + width: 58.33333333%; + } + .col-sm-6 { + width: 50%; + } + .col-sm-5 { + width: 41.66666667%; + } + .col-sm-4 { + width: 33.33333333%; + } + .col-sm-3 { + width: 25%; + } + .col-sm-2 { + width: 16.66666667%; + } + .col-sm-1 { + width: 8.33333333%; + } + .col-sm-pull-12 { + right: 100%; + } + .col-sm-pull-11 { + right: 91.66666667%; + } + .col-sm-pull-10 { + right: 83.33333333%; + } + .col-sm-pull-9 { + right: 75%; + } + .col-sm-pull-8 { + right: 66.66666667%; + } + .col-sm-pull-7 { + right: 58.33333333%; + } + .col-sm-pull-6 { + right: 50%; + } + .col-sm-pull-5 { + right: 41.66666667%; + } + .col-sm-pull-4 { + right: 33.33333333%; + } + .col-sm-pull-3 { + right: 25%; + } + .col-sm-pull-2 { + right: 16.66666667%; + } + .col-sm-pull-1 { + right: 8.33333333%; + } + .col-sm-pull-0 { + right: auto; + } + .col-sm-push-12 { + left: 100%; + } + .col-sm-push-11 { + left: 91.66666667%; + } + .col-sm-push-10 { + left: 83.33333333%; + } + .col-sm-push-9 { + left: 75%; + } + .col-sm-push-8 { + left: 66.66666667%; + } + .col-sm-push-7 { + left: 58.33333333%; + } + .col-sm-push-6 { + left: 50%; + } + .col-sm-push-5 { + left: 41.66666667%; + } + .col-sm-push-4 { + left: 33.33333333%; + } + .col-sm-push-3 { + left: 25%; + } + .col-sm-push-2 { + left: 16.66666667%; + } + .col-sm-push-1 { + left: 8.33333333%; + } + .col-sm-push-0 { + left: auto; + } + .col-sm-offset-12 { + margin-left: 100%; + } + .col-sm-offset-11 { + margin-left: 91.66666667%; + } + .col-sm-offset-10 { + margin-left: 83.33333333%; + } + .col-sm-offset-9 { + margin-left: 75%; + } + .col-sm-offset-8 { + margin-left: 66.66666667%; + } + .col-sm-offset-7 { + margin-left: 58.33333333%; + } + .col-sm-offset-6 { + margin-left: 50%; + } + .col-sm-offset-5 { + margin-left: 41.66666667%; + } + .col-sm-offset-4 { + margin-left: 33.33333333%; + } + .col-sm-offset-3 { + margin-left: 25%; + } + .col-sm-offset-2 { + margin-left: 16.66666667%; + } + .col-sm-offset-1 { + margin-left: 8.33333333%; + } + .col-sm-offset-0 { + margin-left: 0%; + } +} +@media (min-width: 768px) { + .container { + width: 752px; + } + .col-md-1, + .col-md-2, + .col-md-3, + .col-md-4, + .col-md-5, + .col-md-6, + .col-md-7, + .col-md-8, + .col-md-9, + .col-md-10, + .col-md-11, + .col-md-12 { + float: left; + } + .col-md-12 { + width: 100%; + } + .col-md-11 { + width: 91.66666667%; + } + .col-md-10 { + width: 83.33333333%; + } + .col-md-9 { + width: 75%; + } + .col-md-8 { + width: 66.66666667%; + } + .col-md-7 { + width: 58.33333333%; + } + .col-md-6 { + width: 50%; + } + .col-md-5 { + width: 41.66666667%; + } + .col-md-4 { + width: 33.33333333%; + } + .col-md-3 { + width: 25%; + } + .col-md-2 { + width: 16.66666667%; + } + .col-md-1 { + width: 8.33333333%; + } + .col-md-pull-12 { + right: 100%; + } + .col-md-pull-11 { + right: 91.66666667%; + } + .col-md-pull-10 { + right: 83.33333333%; + } + .col-md-pull-9 { + right: 75%; + } + .col-md-pull-8 { + right: 66.66666667%; + } + .col-md-pull-7 { + right: 58.33333333%; + } + .col-md-pull-6 { + right: 50%; + } + .col-md-pull-5 { + right: 41.66666667%; + } + .col-md-pull-4 { + right: 33.33333333%; + } + .col-md-pull-3 { + right: 25%; + } + .col-md-pull-2 { + right: 16.66666667%; + } + .col-md-pull-1 { + right: 8.33333333%; + } + .col-md-pull-0 { + right: auto; + } + .col-md-push-12 { + left: 100%; + } + .col-md-push-11 { + left: 91.66666667%; + } + .col-md-push-10 { + left: 83.33333333%; + } + .col-md-push-9 { + left: 75%; + } + .col-md-push-8 { + left: 66.66666667%; + } + .col-md-push-7 { + left: 58.33333333%; + } + .col-md-push-6 { + left: 50%; + } + .col-md-push-5 { + left: 41.66666667%; + } + .col-md-push-4 { + left: 33.33333333%; + } + .col-md-push-3 { + left: 25%; + } + .col-md-push-2 { + left: 16.66666667%; + } + .col-md-push-1 { + left: 8.33333333%; + } + .col-md-push-0 { + left: auto; + } + .col-md-offset-12 { + margin-left: 100%; + } + .col-md-offset-11 { + margin-left: 91.66666667%; + } + .col-md-offset-10 { + margin-left: 83.33333333%; + } + .col-md-offset-9 { + margin-left: 75%; + } + .col-md-offset-8 { + margin-left: 66.66666667%; + } + .col-md-offset-7 { + margin-left: 58.33333333%; + } + .col-md-offset-6 { + margin-left: 50%; + } + .col-md-offset-5 { + margin-left: 41.66666667%; + } + .col-md-offset-4 { + margin-left: 33.33333333%; + } + .col-md-offset-3 { + margin-left: 25%; + } + .col-md-offset-2 { + margin-left: 16.66666667%; + } + .col-md-offset-1 { + margin-left: 8.33333333%; + } + .col-md-offset-0 { + margin-left: 0%; + } +} +@media (min-width: 1112px) { + .container { + width: 1096px; + } + .col-lg-1, + .col-lg-2, + .col-lg-3, + .col-lg-4, + .col-lg-5, + .col-lg-6, + .col-lg-7, + .col-lg-8, + .col-lg-9, + .col-lg-10, + .col-lg-11, + .col-lg-12 { + float: left; + } + .col-lg-12 { + width: 100%; + } + .col-lg-11 { + width: 91.66666667%; + } + .col-lg-10 { + width: 83.33333333%; + } + .col-lg-9 { + width: 75%; + } + .col-lg-8 { + width: 66.66666667%; + } + .col-lg-7 { + width: 58.33333333%; + } + .col-lg-6 { + width: 50%; + } + .col-lg-5 { + width: 41.66666667%; + } + .col-lg-4 { + width: 33.33333333%; + } + .col-lg-3 { + width: 25%; + } + .col-lg-2 { + width: 16.66666667%; + } + .col-lg-1 { + width: 8.33333333%; + } + .col-lg-pull-12 { + right: 100%; + } + .col-lg-pull-11 { + right: 91.66666667%; + } + .col-lg-pull-10 { + right: 83.33333333%; + } + .col-lg-pull-9 { + right: 75%; + } + .col-lg-pull-8 { + right: 66.66666667%; + } + .col-lg-pull-7 { + right: 58.33333333%; + } + .col-lg-pull-6 { + right: 50%; + } + .col-lg-pull-5 { + right: 41.66666667%; + } + .col-lg-pull-4 { + right: 33.33333333%; + } + .col-lg-pull-3 { + right: 25%; + } + .col-lg-pull-2 { + right: 16.66666667%; + } + .col-lg-pull-1 { + right: 8.33333333%; + } + .col-lg-pull-0 { + right: auto; + } + .col-lg-push-12 { + left: 100%; + } + .col-lg-push-11 { + left: 91.66666667%; + } + .col-lg-push-10 { + left: 83.33333333%; + } + .col-lg-push-9 { + left: 75%; + } + .col-lg-push-8 { + left: 66.66666667%; + } + .col-lg-push-7 { + left: 58.33333333%; + } + .col-lg-push-6 { + left: 50%; + } + .col-lg-push-5 { + left: 41.66666667%; + } + .col-lg-push-4 { + left: 33.33333333%; + } + .col-lg-push-3 { + left: 25%; + } + .col-lg-push-2 { + left: 16.66666667%; + } + .col-lg-push-1 { + left: 8.33333333%; + } + .col-lg-push-0 { + left: auto; + } + .col-lg-offset-12 { + margin-left: 100%; + } + .col-lg-offset-11 { + margin-left: 91.66666667%; + } + .col-lg-offset-10 { + margin-left: 83.33333333%; + } + .col-lg-offset-9 { + margin-left: 75%; + } + .col-lg-offset-8 { + margin-left: 66.66666667%; + } + .col-lg-offset-7 { + margin-left: 58.33333333%; + } + .col-lg-offset-6 { + margin-left: 50%; + } + .col-lg-offset-5 { + margin-left: 41.66666667%; + } + .col-lg-offset-4 { + margin-left: 33.33333333%; + } + .col-lg-offset-3 { + margin-left: 25%; + } + .col-lg-offset-2 { + margin-left: 16.66666667%; + } + .col-lg-offset-1 { + margin-left: 8.33333333%; + } + .col-lg-offset-0 { + margin-left: 0; + } +} +@media (min-width: 1440px) { + .container { + width: 1424px; + } + .col-xl-1, + .col-xl-2, + .col-xl-3, + .col-xl-4, + .col-xl-5, + .col-xl-6, + .col-xl-7, + .col-xl-8, + .col-xl-9, + .col-xl-10, + .col-xl-11, + .col-xl-12 { + float: left; + } + .col-xl-12 { + width: 100%; + } + .col-xl-11 { + width: 91.66666667%; + } + .col-xl-10 { + width: 83.33333333%; + } + .col-xl-9 { + width: 75%; + } + .col-xl-8 { + width: 66.66666667%; + } + .col-xl-7 { + width: 58.33333333%; + } + .col-xl-6 { + width: 50%; + } + .col-xl-5 { + width: 41.66666667%; + } + .col-xl-4 { + width: 33.33333333%; + } + .col-xl-3 { + width: 25%; + } + .col-xl-2 { + width: 16.66666667%; + } + .col-xl-1 { + width: 8.33333333%; + } + .col-xl-pull-12 { + right: 100%; + } + .col-xl-pull-11 { + right: 91.66666667%; + } + .col-xl-pull-10 { + right: 83.33333333%; + } + .col-xl-pull-9 { + right: 75%; + } + .col-xl-pull-8 { + right: 66.66666667%; + } + .col-xl-pull-7 { + right: 58.33333333%; + } + .col-xl-pull-6 { + right: 50%; + } + .col-xl-pull-5 { + right: 41.66666667%; + } + .col-xl-pull-4 { + right: 33.33333333%; + } + .col-xl-pull-3 { + right: 25%; + } + .col-xl-pull-2 { + right: 16.66666667%; + } + .col-xl-pull-1 { + right: 8.33333333%; + } + .col-xl-pull-0 { + right: auto; + } + .col-xl-push-12 { + left: 100%; + } + .col-xl-push-11 { + left: 91.66666667%; + } + .col-xl-push-10 { + left: 83.33333333%; + } + .col-xl-push-9 { + left: 75%; + } + .col-xl-push-8 { + left: 66.66666667%; + } + .col-xl-push-7 { + left: 58.33333333%; + } + .col-xl-push-6 { + left: 50%; + } + .col-xl-push-5 { + left: 41.66666667%; + } + .col-xl-push-4 { + left: 33.33333333%; + } + .col-xl-push-3 { + left: 25%; + } + .col-xl-push-2 { + left: 16.66666667%; + } + .col-xl-push-1 { + left: 8.33333333%; + } + .col-xl-push-0 { + left: auto; + } + .col-xl-offset-12 { + margin-left: 100%; + } + .col-xl-offset-11 { + margin-left: 91.66666667%; + } + .col-xl-offset-10 { + margin-left: 83.33333333%; + } + .col-xl-offset-9 { + margin-left: 75%; + } + .col-xl-offset-8 { + margin-left: 66.66666667%; + } + .col-xl-offset-7 { + margin-left: 58.33333333%; + } + .col-xl-offset-6 { + margin-left: 50%; + } + .col-xl-offset-5 { + margin-left: 41.66666667%; + } + .col-xl-offset-4 { + margin-left: 33.33333333%; + } + .col-xl-offset-3 { + margin-left: 25%; + } + .col-xl-offset-2 { + margin-left: 16.66666667%; + } + .col-xl-offset-1 { + margin-left: 8.33333333%; + } + .col-xl-offset-0 { + margin-left: 0; + } +} +@media (max-width: 499px) { + .xs-hidden { + display: none; + } +} +@media (min-width: 500px) and (max-width: 767px) { + .sm-hidden { + display: none; + } +} +@media (min-width: 768px) and (max-width: 1111px) { + .md-hidden { + display: none; + } +} +@media (min-width: 1112px) { + .lg-hidden { + display: none; + } +} +/*# Utilities #*/ +.clearfix:before, +.clearfix:after, +.dl-horizontal dd:before, +.dl-horizontal dd:after, +.container:before, +.container:after, +.row:before, +.row:after { + content: " "; + display: table; +} +.clearfix:after, +.dl-horizontal dd:after, +.container:after, +.row:after { + clear: both; +} +.img-responsive { + display: block; + width: 100%; + max-width: 100%; + height: auto; +} +.sr-only { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.cursor-hand { + cursor: pointer; +} +.image-responsive { + max-width: 100%; +} +.clear { + clear: both; +} +.center-text { + text-align: center; +} +.navigation { + display: flex; + flex-direction: row; + align-items: center; + flex-grow: 1; + color: #B49669; +} +.navigation a { + text-decoration: none; +} +.navigation a:hover, +.navigation a:active { + color: #846331; +} +.navigation a.navigation__cta { + display: flex; + align-items: center; + font-weight: 500; + margin-left: 0; + background: none; +} +.navigation a.navigation__cta-icon { + margin-left: 4px; +} +.nav-logo { + float: left; + height: 50px; + display: flex; + flex-direction: column; + justify-content: center; + margin-left: 20px; +} +.nav-logo .logo-wrapper a { + display: flex; + flex-direction: column; +} +.nav-logo .logo-wrapper a img { + height: 36px; +} +ul.nav-menu { + display: flex; + flex-direction: column; + position: absolute; + top: 88px; + height: 0; + padding: 0; + overflow: hidden; + z-index: 99; + width: 100%; + list-style: none; +} +ul.nav-menu li { + width: 100%; +} +ul.nav-menu li a { + display: inline-block; + width: 100%; + padding: 10px; + background-color: #272219; +} +ul.nav-menu.active { + height: auto; +} +ul.additional-menu { + display: flex; + flex-direction: row; + align-items: center; + justify-content: flex-end; + flex-grow: 1; + margin-left: 10px; +} +ul.additional-menu li { + height: 50px; + display: flex; + flex-direction: column; + justify-content: center; +} +ul.additional-menu li a { + padding: 5px; + -webkit-transition-duration: 0.3s; + -o-transition-duration: 0.3s; + transition-duration: 0.3s; +} +/*# Avatar #*/ +.dropdown-desktop-avatar { + height: 30px; + width: 30px; + vertical-align: middle; + border-radius: 50%; +} +/*# Search box #*/ +.searchBox { + display: inline-block; + width: 100%; + background: #494132; +} +.searchBox input[type=text] { + padding: 0 1rem; + width: calc(100% - 32px); + color: #B49669; + background: #494132; +} +.searchBox input[type=text]::-webkit-input-placeholder { + color: #B49669; +} +.searchBox input[type=text]:-moz-placeholder { + color: #B49669; +} +.searchBox input[type=text]::-moz-placeholder { + color: #B49669; +} +.searchBox input[type=text]:-ms-input-placeholder { + color: #B49669; +} +.searchBox .search-box-watermark { + color: #B49669; +} +.searchBox .search-box-btn { + padding: 0.6rem 1rem; + float: right; + background: url(../Images/magnifier.svg) no-repeat center; +} +.searchBox .search-box-btn:focus, +.searchBox .search-box-btn:hover { + background: url(../Images/magnifier-dark.svg) no-repeat center; + float: right; +} +.searchBox input, +.searchBox input:hover, +.searchBox input:focus { + height: 32px; + border: none; + float: left; + outline: none; + box-shadow: none; +} +.search-mobile { + padding: 0 5px; + background: #272219; +} +.nav-toggle { + display: block; + position: relative; + width: 50px; + height: 50px; + margin-left: 5px; + cursor: pointer; + padding: 5px; +} +.nav-toggle .nav-toggle-inner { + width: 100%; + height: 100%; + background-color: #846331; +} +span.icon-bar { + position: absolute; + right: 16px; + display: block; + width: 18px; + height: 2px; + background-color: #ffffff; + -webkit-transition-duration: 0.3s; + -o-transition-duration: 0.3s; + transition-duration: 0.3s; +} +span.icon-bar:before { + content: none; +} +.icon-bar:nth-child(1) { + top: 17px; +} +.icon-bar:nth-child(2) { + top: 24px; +} +.icon-bar:nth-child(3) { + top: 31px; +} +/* ICON BARS ANIMATION */ +.nav-toggle.active .icon-bar:nth-child(1) { + top: 24px; + -webkit-transform: rotate(45deg); + -moz-transform: rotate(45deg); + transform: rotate(45deg); +} +.nav-toggle.active .icon-bar:nth-child(2) { + width: 0; +} +.nav-toggle.active .icon-bar:nth-child(3) { + top: 24px; + -webkit-transform: rotate(-45deg); + -moz-transform: rotate(-45deg); + transform: rotate(-45deg); +} +@media screen and (min-width: 768px) { + .nav-logo { + margin-left: 24px; + margin-right: 20px; + height: auto; + } + .nav-logo .logo-wrapper a img { + height: 46px; + } + ul.nav-menu { + top: 100px; + } + ul.additional-menu { + margin-right: 24px; + margin-left: 20px; + } + ul.additional-menu li a { + padding: 0 5px; + } + ul.additional-menu .search-menu-item { + display: flex; + flex-grow: 1; + max-width: 400px; + margin-right: 5px; + } + .nav-toggle { + display: none; + } + .nav-logo img { + height: 46px; + } + .search-mobile { + display: none; + } +} +@media screen and (min-width: 1112px) { + .nav-toggle { + display: none; + } + .nav-logo { + margin-left: 0; + } + .nav-logo .logo-wrapper a img { + height: auto; + } + ul.nav-menu { + position: static; + height: auto; + flex-direction: row; + align-items: center; + width: auto; + } + ul.nav-menu li { + width: auto; + } + ul.nav-menu li a { + width: auto; + padding: 10px; + } + ul.additional-menu { + margin-right: 0; + } + ul.additional-menu li.nav-toggle { + display: none; + } + ul.additional-menu li a { + padding: 0 10px; + } + ul.additional-menu .search-menu-item { + margin-right: 10px; + } +} +/* DROPDOWN */ +.dropdown, +.dropbtn { + position: relative; + display: inline-block; +} +li.dropdown { + display: inline-block; +} +li.dropdown a { + cursor: pointer; +} +.dropdown-content { + display: none; + position: absolute; + top: 50px; + right: 0; + background-color: #B49669; + z-index: 1; +} +.dropdown .dropdown-content > a, +.dropdown .dropdown-content form { + color: #ffffff; + text-decoration: none; + display: block; + text-align: left; +} +.dropdown .dropdown-content > a { + padding: 8px 24px; +} +.dropdown .dropdown-content > form { + width: 100%; +} +.dropdown .dropdown-content > form .sign-out-button { + width: 100%; + border: none; + background: none; + padding: 8px 24px; + text-align: left; +} +.dropdown-content a:hover, +.dropdown-content form:hover { + background-color: #846331; +} +.dropdown:hover .dropdown-content { + display: block; +} +/*# Second level menu #*/ +.store-menu-list { + background: #B49669; +} +.sub-menu { + font-size: 1.25rem; + text-transform: none; + line-height: 100%; +} +.sub-menu ul { + list-style: none; + display: inline; +} +.sub-menu li:hover { + background: #846331; +} +.sub-menu li, +.sub-menu a { + float: left; +} +.sub-menu a { + padding: 1.25rem; +} +.sub-menu a, +.sub-menu a:hover, +.sub-menu a:focus { + text-decoration: none; + color: #FFF; +} +.sub-menu .sub-menu-item-selected { + background-color: #333; +} +[class^="icon-"], +[class*=" icon-"] { + font-family: 'Core-icons'; + display: inline-block; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + font-size: 16px; + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background-image: none; +} +[class^="icon-"]:before { + content: "\e619"; +} +.icon-only:before { + content: none; +} +.icon-dots-vertical:before { + content: "\e75d"; +} +.icon-chain:before { + content: "\e67f"; +} +.icon-chain-slash:before { + content: "\e691"; +} +.icon-list-bullets:before { + content: "\e754"; +} +.icon-list-numbers:before { + content: "\e75b"; +} +.icon-eye-slash:before { + content: "\e75c"; +} +.icon-arrow-u-right:before { + content: "\e703"; +} +.icon-arrow-u-left:before { + content: "\e677"; +} +.icon-arrow-down:before { + content: "\e682"; +} +.icon-arrow-up:before { + content: "\e64c"; +} +.icon-arrow-left:before { + content: "\e6dc"; +} +.icon-arrow-right:before { + content: "\e6da"; +} +.icon-arrow-down-circle:before { + content: "\e6ae"; +} +.icon-arrow-left-circle:before { + content: "\e6af"; +} +.icon-arrow-right-circle:before { + content: "\e6b1"; +} +.icon-arrow-up-circle:before { + content: "\e6bf"; +} +.icon-arrow-left-rect:before { + content: "\e6db"; +} +.icon-arrow-right-rect:before { + content: "\e6d9"; +} +.icon-arrow-crooked-left:before { + content: "\e6e0"; +} +.icon-arrow-crooked-right:before { + content: "\e6e1"; +} +.icon-arrow-double-left:before { + content: "\e6df"; +} +.icon-arrow-double-right:before { + content: "\e6de"; +} +.icon-arrow-down-line:before { + content: "\e6dd"; +} +.icon-arrow-up-line:before { + content: "\e6d3"; +} +.icon-arrows:before { + content: "\e6d7"; +} +.icon-arrows-h:before { + content: "\e6d5"; +} +.icon-arrows-v:before { + content: "\e6d4"; +} +.icon-magnifier:before { + content: "\e657"; +} +.icon-magnifier-minus:before { + content: "\e656"; +} +.icon-magnifier-plus:before { + content: "\e655"; +} +.icon-minus:before { + content: "\e73f"; +} +.icon-loop:before { + content: "\e600"; +} +.icon-merge:before { + content: "\e709"; +} +.icon-separate:before { + content: "\e70a"; +} +.icon-scheme-circles-triangle:before { + content: "\e73e"; +} +.icon-market:before { + content: "\e68e"; +} +.icon-bubble-o:before { + content: "\e6f3"; +} +.icon-bubble-times:before { + content: "\e6f2"; +} +.icon-clapperboard:before { + content: "\e636"; +} +.icon-collapse:before { + content: "\e745"; +} +.icon-collapse-scheme:before { + content: "\e700"; +} +.icon-dialog-window:before { + content: "\e6ff"; +} +.icon-dialog-window-cogwheel:before { + content: "\e71a"; +} +.icon-doc-ban-sign:before { + content: "\e6ef"; +} +.icon-doc-o:before { + content: "\e69c"; +} +.icon-doc-user:before { + content: "\e714"; +} +.icon-expand:before { + content: "\e744"; +} +.icon-file:before { + content: "\e719"; +} +.icon-folder-belt:before { + content: "\e715"; +} +.icon-folder-o:before { + content: "\e68b"; +} +.icon-hat-moustache:before { + content: "\e75a"; +} +.icon-key:before { + content: "\e65e"; +} +.icon-rectangle-a:before { + content: "\e61e"; +} +.icon-rectangle-a-o:before { + content: "\e623"; +} +.icon-rectangle-o-h:before { + content: "\e758"; +} +.icon-rectangle-o-v:before { + content: "\e759"; +} +.icon-rectangle-paragraph:before { + content: "\e625"; +} +.icon-tab:before { + content: "\e6fb"; +} +.icon-file-pdf:before { + content: "\e6a3"; +} +.icon-graduate-cap:before { + content: "\e713"; +} +.icon-clipboard-list:before { + content: "\e6a9"; +} +.icon-user-checkbox:before { + content: "\e603"; +} +.icon-box-cart:before { + content: "\e6cd"; +} +.icon-bubble-censored:before { + content: "\e6c2"; +} +.icon-drawers:before { + content: "\e699"; +} +.icon-earth:before { + content: "\e698"; +} +.icon-form:before { + content: "\e689"; +} +.icon-invoice:before { + content: "\e660"; +} +.icon-mug:before { + content: "\e644"; +} +.icon-square-dashed-line:before { + content: "\e617"; +} +.icon-briefcase:before { + content: "\e6c6"; +} +.icon-funnel:before { + content: "\e687"; +} +.icon-map:before { + content: "\e654"; +} +.icon-notebook:before { + content: "\e642"; +} +.icon-piechart:before { + content: "\e631"; +} +.icon-user-frame:before { + content: "\e604"; +} +.icon-clipboard-checklist:before { + content: "\e6aa"; +} +.icon-pictures:before { + content: "\e632"; +} +.icon-flag:before { + content: "\e68f"; +} +.icon-folder:before { + content: "\e68d"; +} +.icon-folder-opened:before { + content: "\e68a"; +} +.icon-picture:before { + content: "\e633"; +} +.icon-bin:before { + content: "\e6d0"; +} +.icon-bubble:before { + content: "\e6c3"; +} +.icon-doc:before { + content: "\e69f"; +} +.icon-doc-move:before { + content: "\e69d"; +} +.icon-edit:before { + content: "\e696"; +} +.icon-menu:before { + content: "\e650"; +} +.icon-message:before { + content: "\e64f"; +} +.icon-user:before { + content: "\e605"; +} +.icon-monitor-broken:before { + content: "\e70b"; +} +.icon-monitor:before { + content: "\e646"; +} +.icon-chevron-down-line:before { + content: "\e6c0"; +} +.icon-chevron-left-line:before { + content: "\e6d6"; +} +.icon-chevron-right-line:before { + content: "\e6e2"; +} +.icon-chevron-up-line:before { + content: "\e6ee"; +} +.icon-pin-o:before { + content: "\e705"; +} +.icon-brand-sharepoint:before { + content: "\e707"; +} +.icon-heartshake:before { + content: "\e681"; +} +.icon-pin:before { + content: "\e71e"; +} +.icon-checklist:before { + content: "\e61b"; +} +.icon-watch:before { + content: "\e601"; +} +.icon-permission-list:before { + content: "\e634"; +} +.icon-users:before { + content: "\e602"; +} +.icon-brand-youtube:before { + content: "\e659"; +} +.icon-brand-pinterest:before { + content: "\e6e3"; +} +.icon-brand-open-id:before { + content: "\e6e4"; +} +.icon-two-rectangles-v:before { + content: "\e606"; +} +.icon-brand-linkedin:before { + content: "\e6e5"; +} +.icon-two-rectangles-h:before { + content: "\e607"; +} +.icon-brand-google-plus:before { + content: "\e6e6"; +} +.icon-t-shirt:before { + content: "\e608"; +} +.icon-xml-tag:before { + content: "\e6e7"; +} +.icon-truck:before { + content: "\e609"; +} +.icon-trophy:before { + content: "\e60a"; +} +.icon-rss:before { + content: "\e6e9"; +} +.icon-triangle-right:before { + content: "\e60b"; +} +.icon-restriction-list:before { + content: "\e6ea"; +} +.icon-translate:before { + content: "\e60c"; +} +.icon-qr-code:before { + content: "\e6eb"; +} +.icon-times-circle:before { + content: "\e60d"; +} +.icon-lock-unlocked:before { + content: "\e6ec"; +} +.icon-times:before { + content: "\e60e"; +} +.icon-dollar-sign:before { + content: "\e6ed"; +} +.icon-tag:before { + content: "\e60f"; +} +.icon-tablet:before { + content: "\e610"; +} +.icon-cb-check-disabled:before { + content: "\e6f0"; +} +.icon-table:before { + content: "\e612"; +} +.icon-carousel:before { + content: "\e6f1"; +} +.icon-star-full:before { + content: "\e614"; +} +.icon-star-semi:before { + content: "\e613"; +} +.icon-star-empty:before { + content: "\e615"; +} +.icon-arrows-crooked:before { + content: "\e6f4"; +} +.icon-staging-scheme:before { + content: "\e616"; +} +.icon-shopping-cart:before { + content: "\e6f5"; +} +.icon-highlighter:before { + content: "\e6f6"; +} +.icon-square-dashed:before { + content: "\e618"; +} +.icon-cookie:before { + content: "\e6f7"; +} +.icon-square:before { + content: "\e619"; +} +.icon-software-package:before { + content: "\e61c"; +} +.icon-smartphone:before { + content: "\e61d"; +} +.icon-scissors:before { + content: "\e61f"; +} +.icon-rotate-right:before { + content: "\e620"; +} +.icon-rotate-left:before { + content: "\e621"; +} +.icon-rotate-double-right:before { + content: "\e622"; +} +.icon-ribbon:before { + content: "\e624"; +} +.icon-rb-uncheck:before { + content: "\e626"; +} +.icon-rb-check-sign:before { + content: "\e627"; +} +.icon-question-circle:before { + content: "\e629"; +} +.icon-project-scheme:before { + content: "\e62b"; +} +.icon-process-scheme:before { + content: "\e62c"; +} +.icon-plus-square:before { + content: "\e62d"; +} +.icon-plus-circle:before { + content: "\e62e"; +} +.icon-plus:before { + content: "\e62f"; +} +.icon-placeholder:before { + content: "\e630"; +} +.icon-perfume:before { + content: "\e635"; +} +.icon-percent-sign:before { + content: "\e638"; +} +.icon-pda:before { + content: "\e639"; +} +.icon-pc:before { + content: "\e63a"; +} +.icon-pause:before { + content: "\e63b"; +} +.icon-parent-children-scheme:before { + content: "\e63c"; +} +.icon-paperclip:before { + content: "\e63d"; +} +.icon-pants:before { + content: "\e63e"; +} +.icon-palette:before { + content: "\e63f"; +} +.icon-organisational-scheme:before { + content: "\e640"; +} +.icon-newspaper:before { + content: "\e643"; +} +.icon-monitor-smartphone:before { + content: "\e645"; +} +.icon-modal-question:before { + content: "\e647"; +} +.icon-modal-minimize:before { + content: "\e648"; +} +.icon-modal-maximize:before { + content: "\e649"; +} +.icon-modal-close:before { + content: "\e64a"; +} +.icon-minus-circle:before { + content: "\e64b"; +} +.icon-microphone:before { + content: "\e64d"; +} +.icon-messages:before { + content: "\e64e"; +} +.icon-media-player:before { + content: "\e651"; +} +.icon-mask:before { + content: "\e652"; +} +.icon-map-marker:before { + content: "\e653"; +} +.icon-lock:before { + content: "\e658"; +} +.icon-life-belt:before { + content: "\e65a"; +} +.icon-laptop:before { + content: "\e65d"; +} +.icon-kentico:before { + content: "\e65f"; +} +.icon-integration-scheme:before { + content: "\e661"; +} +.icon-i-circle:before { + content: "\e664"; +} +.icon-chevron-up-square:before { + content: "\e665"; +} +.icon-chevron-up-circle:before { + content: "\e666"; +} +.icon-chevron-up:before { + content: "\e667"; +} +.icon-chevron-right-square:before { + content: "\e668"; +} +.icon-chevron-right:before { + content: "\e669"; +} +.icon-chevron-left-square:before { + content: "\e66a"; +} +.icon-chevron-left-circle:before { + content: "\e66b"; +} +.icon-chevron-left:before { + content: "\e66c"; +} +.icon-chevron-down-square:before { + content: "\e66d"; +} +.icon-chevron-down-circle:before { + content: "\e66e"; +} +.icon-chevron-down:before { + content: "\e66f"; +} +.icon-chevron-double-up:before { + content: "\e670"; +} +.icon-chevron-double-right:before { + content: "\e671"; +} +.icon-chevron-double-left:before { + content: "\e672"; +} +.icon-chevron-double-down:before { + content: "\e673"; +} +.icon-checklist2:before { + content: "\e674"; +} +.icon-check-circle:before { + content: "\e675"; +} +.icon-check:before { + content: "\e676"; +} +.icon-tags:before { + content: "\e678"; +} +.icon-shoe-women:before { + content: "\e679"; +} +.icon-printer:before { + content: "\e67a"; +} +.icon-parent-child-scheme:before { + content: "\e67b"; +} +.icon-minus-square:before { + content: "\e67c"; +} +.icon-light-bulb:before { + content: "\e67d"; +} +.icon-chevron-right-circle:before { + content: "\e67e"; +} +.icon-home:before { + content: "\e680"; +} +.icon-half-arrows-right-left:before { + content: "\e683"; +} +.icon-graph:before { + content: "\e684"; +} +.icon-factory:before { + content: "\e690"; +} +.icon-exclamation-triangle:before { + content: "\e693"; +} +.icon-ellipsis:before { + content: "\e694"; +} +.icon-ekg-line:before { + content: "\e695"; +} +.icon-doc-paste:before { + content: "\e69a"; +} +.icon-doc-copy:before { + content: "\e69e"; +} +.icon-database:before { + content: "\e6a0"; +} +.icon-cup:before { + content: "\e6a2"; +} +.icon-compass:before { + content: "\e6a4"; +} +.icon-cogwheel-square:before { + content: "\e6a5"; +} +.icon-cogwheels:before { + content: "\e6a6"; +} +.icon-cogwheel:before { + content: "\e6a7"; +} +.icon-circle-square:before { + content: "\e6ab"; +} +.icon-circle:before { + content: "\e6ac"; +} +.icon-cb-uncheck:before { + content: "\e6ad"; +} +.icon-cb-check-sign:before { + content: "\e6b0"; +} +.icon-caret-up:before { + content: "\e6b2"; +} +.icon-caret-right-down:before { + content: "\e6b3"; +} +.icon-caret-right:before { + content: "\e6b4"; +} +.icon-caret-left:before { + content: "\e6b5"; +} +.icon-caret-down:before { + content: "\e6b6"; +} +.icon-camera:before { + content: "\e6b7"; +} +.icon-calendar-number:before { + content: "\e6b8"; +} +.icon-calendar:before { + content: "\e6b9"; +} +.icon-bullseye:before { + content: "\e6ba"; +} +.icon-building-block:before { + content: "\e6bb"; +} +.icon-building:before { + content: "\e6bc"; +} +.icon-bug:before { + content: "\e6bd"; +} +.icon-bucket-shovel:before { + content: "\e6be"; +} +.icon-bubbles:before { + content: "\e6c1"; +} +.icon-brush:before { + content: "\e6c4"; +} +.icon-broom:before { + content: "\e6c5"; +} +.icon-brand-twitter:before { + content: "\e6c7"; +} +.icon-brand-google:before { + content: "\e6c8"; +} +.icon-brand-facebook:before { + content: "\e6c9"; +} +.icon-brand-bing:before { + content: "\e6ca"; +} +.icon-braces:before { + content: "\e6cb"; +} +.icon-boxes:before { + content: "\e6cc"; +} +.icon-box:before { + content: "\e6ce"; +} +.icon-ban-sign:before { + content: "\e6d1"; +} +.icon-badge:before { + content: "\e6d2"; +} +.icon-arrow-right-top-square:before { + content: "\e6d8"; +} +.icon-breadcrumb:before { + content: "\e6f9"; +} +.icon-clock:before { + content: "\e6a8"; +} +.icon-cloud:before { + content: "\e701"; +} +.icon-cb-check-preview:before { + content: "\e702"; +} +.icon-accordion:before { + content: "\e704"; +} +.icon-two-squares-line:before { + content: "\e706"; +} +.icon-money-bill:before { + content: "\e708"; +} +.icon-puzzle:before { + content: "\e62a"; +} +.icon-wizard-stick:before { + content: "\e6fa"; +} +.icon-lines-rectangle-o:before { + content: "\e6fd"; +} +.icon-doc-arrows:before { + content: "\e6fe"; +} +.icon-l-text-col:before { + content: "\e685"; +} +.icon-l-menu-text-col:before { + content: "\e69b"; +} +.icon-l-menu-cols-3:before { + content: "\e6e8"; +} +.icon-l-logotype-menu-v-col:before { + content: "\e6fc"; +} +.icon-l-logotype-menu-h-col:before { + content: "\e70c"; +} +.icon-l-header-cols-3-footer:before { + content: "\e70d"; +} +.icon-l-cols-80-20:before { + content: "\e70e"; +} +.icon-l-cols-20-80:before { + content: "\e70f"; +} +.icon-l-cols-4:before { + content: "\e710"; +} +.icon-l-cols-3:before { + content: "\e711"; +} +.icon-l-cols-2:before { + content: "\e712"; +} +.icon-bezier-scheme:before { + content: "\e717"; +} +.icon-note:before { + content: "\e71c"; +} +.icon-piechart-lines:before { + content: "\e71d"; +} +.icon-l-article-map:before { + content: "\e721"; +} +.icon-l-calendar-number-article:before { + content: "\e722"; +} +.icon-l-forms-2:before { + content: "\e723"; +} +.icon-l-header-cols-2-footer:before { + content: "\e724"; +} +.icon-l-header-list-img:before { + content: "\e725"; +} +.icon-l-header-menu-text:before { + content: "\e726"; +} +.icon-l-header-text:before { + content: "\e727"; +} +.icon-l-list-article:before { + content: "\e728"; +} +.icon-l-lightbox:before { + content: "\e729"; +} +.icon-l-img-3-cols-3:before { + content: "\e72a"; +} +.icon-l-img-2-cols-3:before { + content: "\e72b"; +} +.icon-l-text:before { + content: "\e72c"; +} +.icon-l-rows-4:before { + content: "\e72d"; +} +.icon-l-rows-3:before { + content: "\e72e"; +} +.icon-l-rows-2:before { + content: "\e72f"; +} +.icon-l-menu-text-col-bottom:before { + content: "\e730"; +} +.icon-l-menu-text:before { + content: "\e731"; +} +.icon-l-menu-list-img-col:before { + content: "\e732"; +} +.icon-l-menu-list-img:before { + content: "\e733"; +} +.icon-l-menu-list:before { + content: "\e734"; +} +.icon-l-menu-cols-2:before { + content: "\e735"; +} +.icon-l-logotype-menu-col-footer:before { + content: "\e736"; +} +.icon-l-list-title:before { + content: "\e737"; +} +.icon-l-list-img-article:before { + content: "\e738"; +} +.icon-l-list-article-col:before { + content: "\e739"; +} +.icon-tree-structure:before { + content: "\e73a"; +} +.icon-vb:before { + content: "\e716"; +} +.icon-crosshair-o:before { + content: "\e71b"; +} +.icon-crosshair-f:before { + content: "\e71f"; +} +.icon-caret-right-aligned-left:before { + content: "\e720"; +} +.icon-caret-left-aligned-right:before { + content: "\e73b"; +} +.icon-gauge:before { + content: "\e686"; +} +.icon-c-sharp:before { + content: "\e718"; +} +.icon-tab-vertical:before { + content: "\e73c"; +} +.icon-right-double-quotation-mark:before { + content: "\e73d"; +} +.icon-braces-octothorpe:before { + content: "\e740"; +} +.icon-outdent:before { + content: "\e741"; +} +.icon-indent:before { + content: "\e742"; +} +.icon-i:before { + content: "\e743"; +} +.icon-b:before { + content: "\e746"; +} +.icon-u:before { + content: "\e747"; +} +.icon-s:before { + content: "\e748"; +} +.icon-x:before { + content: "\e749"; +} +.icon-t-f:before { + content: "\e74a"; +} +.icon-t:before { + content: "\e74b"; +} +.icon-parent-child-scheme-2:before { + content: "\e74c"; +} +.icon-parent-child-scheme2:before { + content: "\e74d"; +} +.icon-doc-torn:before { + content: "\e750"; +} +.icon-f:before { + content: "\e74e"; +} +.icon-a-lowercase:before { + content: "\e74f"; +} +.icon-circle-slashed:before { + content: "\e751"; +} +.icon-one:before { + content: "\e752"; +} +.icon-diamond:before { + content: "\e756"; +} +.icon-choice-user-scheme:before { + content: "\e753"; +} +.icon-choice-single-scheme:before { + content: "\e755"; +} +.icon-choice-multi-scheme:before { + content: "\e757"; +} +.icon-book-opened:before { + content: "\e6cf"; +} +.icon-e-book:before { + content: "\e697"; +} +.icon-spinner:before { + content: "\e61a"; +} +.icon-layouts:before { + content: "\e65b"; +} +.icon-layout:before { + content: "\e65c"; +} +.icon-id-card:before { + content: "\e663"; +} +.icon-id-cards:before { + content: "\e662"; +} +.icon-l-grid-3-2:before { + content: "\e611"; +} +.icon-l-grid-2-2:before { + content: "\e628"; +} +.icon-l-cols-70-30:before { + content: "\e637"; +} +.icon-l-cols-30-70:before { + content: "\e641"; +} +.icon-l-cols-25-50-25:before { + content: "\e688"; +} +.icon-l-cols-20-60-20:before { + content: "\e6a1"; +} +.icon-eye:before { + content: "\e692"; +} +.icon-list:before { + content: "\e6f8"; +} +.icon-folder-clock:before { + content: "\e68c"; +} +.icon-app-default:before { + content: "\e618"; +} +.icon-app-blogs:before { + content: "\e642"; +} +.icon-app-content:before { + content: "\e6cf"; +} +.icon-app-content-dashboard:before { + content: "\e686"; +} +.icon-app-file-import:before { + content: "\e6db"; +} +.icon-app-forms:before { + content: "\e689"; +} +.icon-app-checked-out:before { + content: "\e6c6"; +} +.icon-app-media:before { + content: "\e632"; +} +.icon-app-my-blogs:before { + content: "\e642"; +} +.icon-app-my-documents:before { + content: "\e6c6"; +} +.icon-app-outdated:before { + content: "\e6c6"; +} +.icon-app-pending:before { + content: "\e6c6"; +} +.icon-app-polls:before { + content: "\e6aa"; +} +.icon-app-recent:before { + content: "\e6c6"; +} +.icon-app-translations:before { + content: "\e698"; +} +.icon-app-activities:before { + content: "\e695"; +} +.icon-app-banners:before { + content: "\e624"; +} +.icon-app-campaigns:before { + content: "\e6ba"; +} +.icon-app-contacts:before { + content: "\e663"; +} +.icon-app-contact-groups:before { + content: "\e662"; +} +.icon-app-conversions:before { + content: "\e683"; +} +.icon-app-marketing-dashboard:before { + content: "\e686"; +} +.icon-app-marketing-reports:before { + content: "\e684"; +} +.icon-app-newsletters:before { + content: "\e64f"; +} +.icon-app-processes:before { + content: "\e62c"; +} +.icon-app-scoring:before { + content: "\e687"; +} +.icon-app-web-analytics:before { + content: "\e631"; +} +.icon-app-ab-test:before { + content: "\e706"; +} +.icon-app-mvt:before { + content: "\e65c"; +} +.icon-app-catalog-discounts:before { + content: "\e638"; +} +.icon-app-customers:before { + content: "\e604"; +} +.icon-app-ecommerce-dashboard:before { + content: "\e686"; +} +.icon-app-ecommerce-reports:before { + content: "\e684"; +} +.icon-app-free-shipping-offers:before { + content: "\e638"; +} +.icon-app-manufacturers:before { + content: "\e690"; +} +.icon-app-order-discounts:before { + content: "\e638"; +} +.icon-app-orders:before { + content: "\e660"; +} +.icon-app-product-coupons:before { + content: "\e638"; +} +.icon-app-product-options:before { + content: "\e6cc"; +} +.icon-app-products:before { + content: "\e6ce"; +} +.icon-app-suppliers:before { + content: "\e6cd"; +} +.icon-app-abuse-reports:before { + content: "\e6ea"; +} +.icon-app-avatars:before { + content: "\e652"; +} +.icon-app-bad-words:before { + content: "\e6c2"; +} +.icon-app-badges:before { + content: "\e6d2"; +} +.icon-app-events:before { + content: "\e6b8"; +} +.icon-app-facebook:before { + content: "\e6c9"; +} +.icon-app-forums:before { + content: "\e6c1"; +} +.icon-app-groups:before { + content: "\e602"; +} +.icon-app-chat:before { + content: "\e6c3"; +} +.icon-app-message-boards:before { + content: "\e6c1"; +} +.icon-app-messages:before { + content: "\e64e"; +} +.icon-app-my-projects:before { + content: "\e62b"; +} +.icon-app-projects:before { + content: "\e62b"; +} +.icon-app-api-examples:before { + content: "\e6a6"; +} +.icon-app-classes:before { + content: "\e6cb"; +} +.icon-app-css-stylesheets:before { + content: "\e63f"; +} +.icon-app-custom-tables:before { + content: "\e612"; +} +.icon-app-database-objects:before { + content: "\e6a0"; +} +.icon-app-device-profiles:before { + content: "\e645"; +} +.icon-app-document-types:before { + content: "\e69f"; +} +.icon-app-email-templates:before { + content: "\e64f"; +} +.icon-app-form-controls:before { + content: "\e689"; +} +.icon-app-inline-controls:before { + content: "\e689"; +} +.icon-app-javascript-files:before { + content: "\e6cb"; +} +.icon-app-macro-rules:before { + content: "\e740"; +} +.icon-app-modules:before { + content: "\e62a"; +} +.icon-app-notifications:before { + content: "\e68f"; +} +.icon-app-page-layouts:before { + content: "\e65c"; +} +.icon-app-page-templates:before { + content: "\e65c"; +} +.icon-app-web-part-containers:before { + content: "\e617"; +} +.icon-app-web-parts:before { + content: "\e6bb"; +} +.icon-app-web-templates:before { + content: "\e65c"; +} +.icon-app-widgets:before { + content: "\e6a5"; +} +.icon-app-banned-ips:before { + content: "\e6ea"; +} +.icon-app-categories:before { + content: "\e699"; +} +.icon-app-content-reports:before { + content: "\e6a7"; +} +.icon-app-countries:before { + content: "\e653"; +} +.icon-app-ecommerce-configuration:before { + content: "\e6a7"; +} +.icon-app-email-queue:before { + content: "\e64e"; +} +.icon-app-event-log:before { + content: "\e6a9"; +} +.icon-app-integration-bus:before { + content: "\e661"; +} +.icon-app-localization:before { + content: "\e698"; +} +.icon-app-membership:before { + content: "\e663"; +} +.icon-app-marketing-configuration:before { + content: "\e6a7"; +} +.icon-app-permissions:before { + content: "\e634"; +} +.icon-app-recycle-bin:before { + content: "\e6d0"; +} +.icon-app-relationship-names:before { + content: "\e67f"; +} +.icon-app-roles:before { + content: "\e603"; +} +.icon-app-search-engines:before { + content: "\e657"; +} +.icon-app-settings:before { + content: "\e6a7"; +} +.icon-app-scheduled-tasks:before { + content: "\e68c"; +} +.icon-app-sites:before { + content: "\e65b"; +} +.icon-app-smart-search:before { + content: "\e657"; +} +.icon-app-smtp-servers:before { + content: "\e64f"; +} +.icon-app-staging:before { + content: "\e616"; +} +.icon-app-system:before { + content: "\e6ab"; +} +.icon-app-tag-groups:before { + content: "\e678"; +} +.icon-app-time-zones:before { + content: "\e6a8"; +} +.icon-app-translation-services:before { + content: "\e60c"; +} +.icon-app-ui-personalization:before { + content: "\e65c"; +} +.icon-app-users:before { + content: "\e602"; +} +.icon-app-web-farm:before { + content: "\e63c"; +} +.icon-app-workflows:before { + content: "\e756"; +} +.icon-app-personas:before { + content: "\e75a"; +} +.icon-app-unit-tests:before { + content: "\e61b"; +} +.icon-app-licenses:before { + content: "\e65e"; +} +.icon-app-my-profile:before { + content: "\e605"; +} +.icon-app-debug:before { + content: "\e6bd"; +} +.icon-app-twitter:before { + content: "\e6c7"; +} +.icon-app-continuous-integration:before { + content: "\e600"; +} +.icon-googletranslator:before { + content: "\e6c8"; +} +.icon-microsofttranslator:before { + content: "\e6ca"; +} +.icon-external-link:before { + content: "\e6d8"; +} +.icon-mvc:before { + content: "\e73e"; +} +.icon-w-webpart-default:before { + content: "\e6bb"; +} +.icon-w-widget-default:before { + content: "\e6a5"; +} +.icon-w-css-list-menu:before { + content: "\e6f8"; +} +.icon-w-tree-menu:before { + content: "\e73a"; +} +.icon-w-category-menu:before { + content: "\e6f8"; +} +.icon-w-tab-menu:before { + content: "\e6f8"; +} +.icon-w-drop-down-menu:before { + content: "\e6f8"; +} +.icon-w-language-selection:before { + content: "\e698"; +} +.icon-w-language-selection-dropdown:before { + content: "\e698"; +} +.icon-w-language-selection-with-flags:before { + content: "\e698"; +} +.icon-w-page-placeholder:before { + content: "\e630"; +} +.icon-w-site-map:before { + content: "\e73a"; +} +.icon-w-qr-code:before { + content: "\e6eb"; +} +.icon-w-repeater:before { + content: "\e6f4"; +} +.icon-w-repeater-for-web-service:before { + content: "\e6a6"; +} +.icon-w-repeater-with-carousel:before { + content: "\e6f1"; +} +.icon-w-repeater-with-custom-query:before { + content: "\e6a0"; +} +.icon-w-query-repeater-with-effect:before { + content: "\e6a0"; +} +.icon-w-repeater-with-effect:before { + content: "\e6f4"; +} +.icon-w-repeater-with-lightbox:before { + content: "\e633"; +} +.icon-w-basic-repeater:before { + content: "\e6f4"; +} +.icon-w-basic-repeater-with-effect:before { + content: "\e6f4"; +} +.icon-w-custom-table-repeater:before { + content: "\e612"; +} +.icon-w-custom-table-repeater-with-effect:before { + content: "\e612"; +} +.icon-w-report-table:before { + content: "\e612"; +} +.icon-w-atom-repeater:before { + content: "\e6e9"; +} +.icon-w-xml-repeater:before { + content: "\e6e7"; +} +.icon-w-head-html-code:before { + content: "\e6e7"; +} +.icon-w-static-html:before { + content: "\e6e7"; +} +.icon-w-javascript:before { + content: "\e6cb"; +} +.icon-w-breadcrumbs:before { + content: "\e6f9"; +} +.icon-w-category-breadcrumbs:before { + content: "\e6f9"; +} +.icon-w-forum-breadcrumbs:before { + content: "\e6f9"; +} +.icon-w-document-attachments:before { + content: "\e63d"; +} +.icon-w-document-attachments-with-effect:before { + content: "\e63d"; +} +.icon-w-attachments:before { + content: "\e63d"; +} +.icon-w-attachments-carousel:before { + content: "\e6f1"; +} +.icon-w-attachments-carousel-3d:before { + content: "\e6f1"; +} +.icon-w-attachments-lightbox:before { + content: "\e633"; +} +.icon-w-lightbox-gallery:before { + content: "\e633"; +} +.icon-w-inbox:before { + content: "\e64f"; +} +.icon-w-send-message:before { + content: "\e64f"; +} +.icon-w-send-to-friend:before { + content: "\e64f"; +} +.icon-w-newsletter-archive:before { + content: "\e6f8"; +} +.icon-w-newsletter-subscription:before { + content: "\e675"; +} +.icon-w-messaging-info-panel:before { + content: "\e64f"; +} +.icon-w-newsletter-unsubscription:before { + content: "\e60d"; +} +.icon-w-custom-subscription-form:before { + content: "\e675"; +} +.icon-w-registration-e-mail-confirmation:before { + content: "\e64f"; +} +.icon-w-my-messages:before { + content: "\e64f"; +} +.icon-w-unsubscription-request:before { + content: "\e60d"; +} +.icon-w-outbox:before { + content: "\e64f"; +} +.icon-w-my-sent-invitations:before { + content: "\e64f"; +} +.icon-w-board-messages-data-source:before { + content: "\e6c1"; +} +.icon-w-group-forum-posts-data-source:before { + content: "\e6c1"; +} +.icon-w-query-data-source:before { + content: "\e6a0"; +} +.icon-w-forum-posts-data-source:before { + content: "\e6c1"; +} +.icon-w-documents-data-source:before { + content: "\e69f"; +} +.icon-w-web-service-data-source:before { + content: "\e6a6"; +} +.icon-w-department-members-data-source:before { + content: "\e640"; +} +.icon-w-macro-data-source:before { + content: "\e740"; +} +.icon-w-file-system-data-source:before { + content: "\e68a"; +} +.icon-w-sharepoint-data-source:before { + content: "\e6bb"; +} +.icon-w-group-media-libraries-data-source:before { + content: "\e632"; +} +.icon-w-atom-data-source:before { + content: "\e6e9"; +} +.icon-w-media-files-data-source:before { + content: "\e632"; +} +.icon-w-groups-data-source:before { + content: "\e602"; +} +.icon-w-custom-table-data-source:before { + content: "\e612"; +} +.icon-w-group-members-data-source:before { + content: "\e602"; +} +.icon-w-blog-comments-data-source:before { + content: "\e642"; +} +.icon-w-sql-data-source:before { + content: "\e6a0"; +} +.icon-w-sql-search-box:before { + content: "\e657"; +} +.icon-w-xml-data-source:before { + content: "\e6e7"; +} +.icon-w-sql-search-dialog:before { + content: "\e657"; +} +.icon-w-products-data-source:before { + content: "\e6ce"; +} +.icon-w-sql-search-dialog-with-results:before { + content: "\e657"; +} +.icon-w-media-libraries-data-source:before { + content: "\e632"; +} +.icon-w-users-data-source:before { + content: "\e605"; +} +.icon-w-attachments-data-source:before { + content: "\e63d"; +} +.icon-w-sql-search-results:before { + content: "\e6f8"; +} +.icon-w-chat-search-on-line-users:before { + content: "\e657"; +} +.icon-w-search-accelerator-for-ie8-and-higher:before { + content: "\e657"; +} +.icon-w-search-engine-results-highlighter:before { + content: "\e6f6"; +} +.icon-w-smart-search-box:before { + content: "\e657"; +} +.icon-w-forum-search-advanced-dialog:before { + content: "\e657"; +} +.icon-w-smart-search-dialog:before { + content: "\e657"; +} +.icon-w-forum-search-box:before { + content: "\e657"; +} +.icon-w-smart-search-dialog-with-results:before { + content: "\e657"; +} +.icon-w-smart-search-filter:before { + content: "\e687"; +} +.icon-w-smart-search-results:before { + content: "\e6f8"; +} +.icon-w-message-board-rss-feed:before { + content: "\e6c1"; +} +.icon-w-forum-posts-rss-feed:before { + content: "\e6c1"; +} +.icon-w-query-rss-feed:before { + content: "\e6a0"; +} +.icon-w-news-rss-feed:before { + content: "\e643"; +} +.icon-w-web-service-rss-feed:before { + content: "\e6a6"; +} +.icon-w-feed-link:before { + content: "\e6e9"; +} +.icon-w-cms-rss-feed:before { + content: "\e6e9"; +} +.icon-w-atom-feed:before { + content: "\e6e9"; +} +.icon-w-media-files-rss-feed:before { + content: "\e632"; +} +.icon-w-blog-comments-rss-feed:before { + content: "\e6e9"; +} +.icon-w-events-rss-feed:before { + content: "\e6b8"; +} +.icon-w-rss-data-source:before { + content: "\e6a0"; +} +.icon-w-rss-feed:before { + content: "\e6e9"; +} +.icon-w-products-rss-feed:before { + content: "\e6ce"; +} +.icon-w-custom-table-rss-feed:before { + content: "\e612"; +} +.icon-w-blog-posts-rss-feed:before { + content: "\e642"; +} +.icon-w-rss-repeater:before { + content: "\e6e9"; +} +.icon-w-web-part-zone:before { + content: "\e65c"; +} +.icon-w-banner-rotator:before { + content: "\e624"; +} +.icon-w-css-style-selector:before { + content: "\e63f"; +} +.icon-w-report:before { + content: "\e684"; +} +.icon-w-report-chart:before { + content: "\e684"; +} +.icon-w-switch-mobile-device-detection:before { + content: "\e61d"; +} +.icon-w-mobile-device-redirection:before { + content: "\e61d"; +} +.icon-w-poll:before { + content: "\e61b"; +} +.icon-w-group-polls:before { + content: "\e61b"; +} +.icon-w-scrolling-text:before { + content: "\e625"; +} +.icon-w-static-text:before { + content: "\e625"; +} +.icon-w-paged-text:before { + content: "\e625"; +} +.icon-w-editable-text:before { + content: "\e625"; +} +.icon-w-change-password:before { + content: "\e65e"; +} +.icon-w-unlock-user-accunt:before { + content: "\e6ec"; +} +.icon-w-reset-password:before { + content: "\e65e"; +} +.icon-w-automatically-initiated-chat:before { + content: "\e6c3"; +} +.icon-w-chat-send-message:before { + content: "\e64f"; +} +.icon-w-chat-support-request:before { + content: "\e6c3"; +} +.icon-w-chat-web-part:before { + content: "\e6bb"; +} +.icon-w-chat-errors:before { + content: "\e6f2"; +} +.icon-w-chat-leave-room:before { + content: "\e6d9"; +} +.icon-w-chat-login:before { + content: "\e65e"; +} +.icon-w-chat-notifications:before { + content: "\e6c3"; +} +.icon-w-chat-room-messages:before { + content: "\e6c3"; +} +.icon-w-chat-room-name:before { + content: "\e6c3"; +} +.icon-w-chat-room-users:before { + content: "\e605"; +} +.icon-w-chat-rooms:before { + content: "\e6f3"; +} +.icon-w-comment-view:before { + content: "\e6c1"; +} +.icon-w-forum-unsubscription:before { + content: "\e60d"; +} +.icon-w-forum-most-active-threads:before { + content: "\e6c1"; +} +.icon-w-forum-recently-active-threads:before { + content: "\e6c1"; +} +.icon-w-forum-top-contributors:before { + content: "\e6c1"; +} +.icon-w-forum-single-forum-flat-layout:before { + content: "\e6c1"; +} +.icon-w-forum-single-forum-general:before { + content: "\e6c1"; +} +.icon-w-forum-single-forum-tree-layout:before { + content: "\e6c1"; +} +.icon-w-calendar:before { + content: "\e6b9"; +} +.icon-w-date-and-time:before { + content: "\e6a8"; +} +.icon-w-event-calendar:before { + content: "\e6b8"; +} +.icon-w-event-registration:before { + content: "\e6b8"; +} +.icon-w-content-rating:before { + content: "\e614"; +} +.icon-w-shopping-cart-content:before { + content: "\e6f5"; +} +.icon-w-shopping-cart-preview:before { + content: "\e6f5"; +} +.icon-w-shopping-cart-totals:before { + content: "\e6f5"; +} +.icon-w-attachment-image-gallery:before { + content: "\e633"; +} +.icon-w-media-gallery-file-filter:before { + content: "\e633"; +} +.icon-w-media-gallery-file-list:before { + content: "\e633"; +} +.icon-w-media-gallery-folder-tree:before { + content: "\e633"; +} +.icon-w-image-gallery:before { + content: "\e633"; +} +.icon-w-media-libraries-viewer:before { + content: "\e633"; +} +.icon-w-custom-table-datagrid:before { + content: "\e612"; +} +.icon-w-grid-with-custom-query:before { + content: "\e612"; +} +.icon-w-custom-table-datalist:before { + content: "\e6f8"; +} +.icon-w-grid:before { + content: "\e612"; +} +.icon-w-table-layout:before { + content: "\e612"; +} +.icon-w-sharepoint-datagrid:before { + content: "\e612"; +} +.icon-w-grid-for-rest-service:before { + content: "\e612"; +} +.icon-w-grid-for-web-service:before { + content: "\e6a6"; +} +.icon-w-custom-table-datagrid:before { + content: "\e612"; +} +.icon-w-basic-datalist:before { + content: "\e6f8"; +} +.icon-w-sharepoint-datalist:before { + content: "\e6f8"; +} +.icon-w-datalist-with-custom-query:before { + content: "\e6a0"; +} +.icon-w-datalist:before { + content: "\e6f8"; +} +.icon-w-group-forum-list:before { + content: "\e6c1"; +} +.icon-w-group-profile:before { + content: "\e602"; +} +.icon-w-group-properties:before { + content: "\e602"; +} +.icon-w-group-forum-post-viewer:before { + content: "\e6c1"; +} +.icon-w-group-public-profile:before { + content: "\e602"; +} +.icon-w-group-forum-search-results:before { + content: "\e657"; +} +.icon-w-group-registration:before { + content: "\e602"; +} +.icon-w-group-forums:before { + content: "\e602"; +} +.icon-w-group-roles:before { + content: "\e602"; +} +.icon-w-group-invitation:before { + content: "\e64f"; +} +.icon-w-group-security-access:before { + content: "\e658"; +} +.icon-w-group-media-libraries:before { + content: "\e632"; +} +.icon-w-department-members-viewer:before { + content: "\e640"; +} +.icon-w-group-security-message:before { + content: "\e64f"; +} +.icon-w-leave-group:before { + content: "\e6d9"; +} +.icon-w-group-media-libraries-viewer:before { + content: "\e632"; +} +.icon-w-groups-filter:before { + content: "\e687"; +} +.icon-w-group-members:before { + content: "\e602"; +} +.icon-w-groups-viewer:before { + content: "\e602"; +} +.icon-w-group-members-viewer:before { + content: "\e602"; +} +.icon-w-group-contribution-list:before { + content: "\e6f8"; +} +.icon-w-chat-on-line-users:before { + content: "\e6c3"; +} +.icon-w-group-message-board:before { + content: "\e6c1"; +} +.icon-w-group-document-library:before { + content: "\e632"; +} +.icon-w-group-message-board-viewer:before { + content: "\e6c1"; +} +.icon-w-group-edit-contribution:before { + content: "\e696"; +} +.icon-w-group-message-boards:before { + content: "\e6c1"; +} +.icon-w-group-forum-most-active-threads:before { + content: "\e6c1"; +} +.icon-w-group-permissions:before { + content: "\e634"; +} +.icon-w-group-forum-recently-active-threads:before { + content: "\e6a8"; +} +.icon-w-custom-registration-form:before { + content: "\e605"; +} +.icon-w-on-line-form:before { + content: "\e689"; +} +.icon-w-registration-form:before { + content: "\e605"; +} +.icon-w-logon-form:before { + content: "\e65e"; +} +.icon-w-logon-mini-form:before { + content: "\e65e"; +} +.icon-w-discount-coupon:before { + content: "\e638"; +} +.icon-w-my-account:before { + content: "\e663"; +} +.icon-w-on-line-users:before { + content: "\e605"; +} +.icon-w-my-profile:before { + content: "\e605"; +} +.icon-w-user-public-profile:before { + content: "\e605"; +} +.icon-w-users-filter:before { + content: "\e687"; +} +.icon-w-document-name-filter:before { + content: "\e687"; +} +.icon-w-filter:before { + content: "\e687"; +} +.icon-w-remaining-amount-for-free-shipping:before { + content: "\e638"; +} +.icon-w-shipping-option-selection:before { + content: "\e609"; +} +.icon-w-tasks-owned-by-me:before { + content: "\e61b"; +} +.icon-w-my-projects:before { + content: "\e62b"; +} +.icon-w-project-list:before { + content: "\e62b"; +} +.icon-w-project-tasks:before { + content: "\e61b"; +} +.icon-w-tasks-assigned-to-me:before { + content: "\e61b"; +} +.icon-w-customer-detail:before { + content: "\e604"; +} +.icon-w-customer-address:before { + content: "\e604"; +} +.icon-w-liveid-required-data:before { + content: "\e6bb"; +} +.icon-w-windows-liveid:before { + content: "\e6bb"; +} +.icon-w-openid-logon:before { + content: "\e6e4"; +} +.icon-w-openid-required-data:before { + content: "\e6e4"; +} +.icon-w-powered-by-kentico:before { + content: "\e65f"; +} +.icon-w-bing-translator:before { + content: "\e6ca"; +} +.icon-w-static-bing-maps:before { + content: "\e6ca"; +} +.icon-w-basic-bing-maps:before { + content: "\e6ca"; +} +.icon-w-bing-maps:before { + content: "\e6ca"; +} +.icon-w-google-maps:before { + content: "\e6c8"; +} +.icon-w-static-google-maps:before { + content: "\e6c8"; +} +.icon-w-basic-google-maps:before { + content: "\e6c8"; +} +.icon-w-google-activity-feed:before { + content: "\e6e6"; +} +.icon-w-google-badge:before { + content: "\e6e6"; +} +.icon-w-google-analytics:before { + content: "\e6c8"; +} +.icon-w-google-search:before { + content: "\e6c8"; +} +.icon-w-google-sitemap-xml-sitemap:before { + content: "\e6c8"; +} +.icon-w-google-translator:before { + content: "\e6c8"; +} +.icon-w-google-1-button:before { + content: "\e6e6"; +} +.icon-w-facebook-activity-feed:before { + content: "\e6c9"; +} +.icon-w-facebook-comments:before { + content: "\e6c9"; +} +.icon-w-facebook-connect-logon:before { + content: "\e6c9"; +} +.icon-w-facebook-facepile:before { + content: "\e6c9"; +} +.icon-w-facebook-like-box:before { + content: "\e6c9"; +} +.icon-w-facebook-like-button:before { + content: "\e6c9"; +} +.icon-w-facebook-recommendations:before { + content: "\e6c9"; +} +.icon-w-facebook-send-button:before { + content: "\e6c9"; +} +.icon-w-twitter-feed:before { + content: "\e6c7"; +} +.icon-w-twitter-follow-button:before { + content: "\e6c7"; +} +.icon-w-twitter-tweet-button:before { + content: "\e6c7"; +} +.icon-w-pinterest-follow-button:before { + content: "\e6e3"; +} +.icon-w-pinterest-pin-it-button:before { + content: "\e6e3"; +} +.icon-w-linkedin-apply-with:before { + content: "\e6e5"; +} +.icon-w-linkedin-company-insider:before { + content: "\e6e5"; +} +.icon-w-linkedin-company-profile:before { + content: "\e6e5"; +} +.icon-w-linkedin-logon:before { + content: "\e6e5"; +} +.icon-w-linkedin-member-profile:before { + content: "\e6e5"; +} +.icon-w-linkedin-recommend-button:before { + content: "\e6e5"; +} +.icon-w-linkedin-required-data:before { + content: "\e6e5"; +} +.icon-w-linkedin-share-button:before { + content: "\e6e5"; +} +.icon-w-flash-web-part:before { + content: "\e6bb"; +} +.icon-w-flash-widget:before { + content: "\e6a5"; +} +.icon-w-social-bookmarking:before { + content: "\e678"; +} +.icon-w-wmp-video:before { + content: "\e6bb"; +} +.icon-w-youtube-video:before { + content: "\e659"; +} +.icon-w-silverlight-application-web-part:before { + content: "\e6bb"; +} +.icon-w-silverlight-application-widget:before { + content: "\e6a5"; +} +.icon-w-quicktime:before { + content: "\e6bb"; +} +.icon-w-product-filter:before { + content: "\e6ce"; +} +.icon-w-top-n-newest-products:before { + content: "\e6ce"; +} +.icon-w-top-n-products-by-sales:before { + content: "\e6ce"; +} +.icon-w-similar-products-by-sales:before { + content: "\e6ce"; +} +.icon-w-random-products:before { + content: "\e6ce"; +} +.icon-w-tag-cloud:before { + content: "\e701"; +} +.icon-w-message-board:before { + content: "\e6c1"; +} +.icon-w-accordion-layout:before { + content: "\e704"; +} +.icon-w-columns-layout:before { + content: "\e712"; +} +.icon-w-tabs-layout:before { + content: "\e6fb"; +} +.icon-w-wizard-layout:before { + content: "\e6fa"; +} +.icon-w-rows-layout:before { + content: "\e72e"; +} +.icon-w-new-blog:before { + content: "\e642"; +} +.icon-w-abuse-report:before { + content: "\e6ea"; +} +.icon-w-in-line-abuse-report:before { + content: "\e6ea"; +} +.icon-w-message-board-subscription-confirmation:before { + content: "\e675"; +} +.icon-w-datalist-for-web-service:before { + content: "\e6a6"; +} +.icon-w-tree-view:before { + content: "\e73a"; +} +.icon-w-admin-actions:before { + content: "\e67f"; +} +.icon-w-simple-cookie-law-consent:before { + content: "\e6f7"; +} +.icon-w-news-list:before { + content: "\e6f8"; +} +.icon-w-message-board-unsubscription:before { + content: "\e60d"; +} +.icon-w-keep-alive:before { + content: "\e622"; +} +.icon-w-donate:before { + content: "\e708"; +} +.icon-w-donations:before { + content: "\e708"; +} +.icon-w-payment-form:before { + content: "\e708"; +} +.icon-w-payment-method-selection:before { + content: "\e708"; +} +.icon-w-currency-selection:before { + content: "\e6ed"; +} +.icon-w-analytics-browser-capabilities:before { + content: "\e6ff"; +} +.icon-w-strands-recommendations:before { + content: "\e6bb"; +} +.icon-w-password-expiration:before { + content: "\e658"; +} +.icon-w-message-board-viewer:before { + content: "\e6c1"; +} +.icon-w-checkout-process-obsolete:before { + content: "\e6bb"; +} +.icon-w-category-list:before { + content: "\e6f8"; +} +.icon-w-analytics-custom-statistics:before { + content: "\e631"; +} +.icon-w-subscription-approval:before { + content: "\e675"; +} +.icon-w-widget-actions:before { + content: "\e6a5"; +} +.icon-w-message-panel:before { + content: "\e6f5"; +} +.icon-w-article-list:before { + content: "\e6f8"; +} +.icon-w-set-cookie:before { + content: "\e6f7"; +} +.icon-w-random-document:before { + content: "\e69f"; +} +.icon-w-edit-contribution:before { + content: "\e696"; +} +.icon-w-universal-document-viewer:before { + content: "\e69f"; +} +.icon-w-custom-response:before { + content: "\e698"; +} +.icon-w-collapsible-panel:before { + content: "\e700"; +} +.icon-w-wishlist:before { + content: "\e614"; +} +.icon-w-latest-news:before { + content: "\e643"; +} +.icon-w-edit-document-link:before { + content: "\e696"; +} +.icon-w-did-you-mean:before { + content: "\e629"; +} +.icon-w-universal-pager:before { + content: "\e6fe"; +} +.icon-w-basic-universal-viewer:before { + content: "\e6fd"; +} +.icon-w-random-redirection:before { + content: "\e703"; +} +.icon-w-notification-subscription:before { + content: "\e675"; +} +.icon-w-wizard-buttons:before { + content: "\e6fa"; +} +.icon-w-universal-viewer:before { + content: "\e6fd"; +} +.icon-w-report-value:before { + content: "\e749"; +} +.icon-w-recent-posts:before { + content: "\e642"; +} +.icon-w-object-management-buttons:before { + content: "\e696"; +} +.icon-w-wizard-header:before { + content: "\e6fa"; +} +.icon-w-universal-viewer-with-custom-query:before { + content: "\e6a0"; +} +.icon-w-confirmation-checkbox:before { + content: "\e702"; +} +.icon-w-sharepoint-repeater:before { + content: "\e6f4"; +} +.icon-w-register-after-checkout:before { + content: "\e605"; +} +.icon-w-post-archive:before { + content: "\e6f8"; +} +.icon-w-my-invitations:before { + content: "\e64f"; +} +.icon-w-link-button:before { + content: "\e67f"; +} +.icon-w-contact-list:before { + content: "\e604"; +} +.icon-w-task-info-panel:before { + content: "\e61b"; +} +.icon-w-document-library:before { + content: "\e69f"; +} +.icon-w-custom-table-form:before { + content: "\e612"; +} +.icon-w-hierarchical-viewer:before { + content: "\e6fd"; +} +.icon-w-user-control:before { + content: "\e6bb"; +} +.icon-w-content-slider:before { + content: "\e6f1"; +} +.icon-w-blog-post-subscription-confirmation:before { + content: "\e675"; +} +.icon-w-ignore-list:before { + content: "\e6ea"; +} +.icon-w-document-pager:before { + content: "\e6fe"; +} +.icon-w-content-subscription:before { + content: "\e675"; +} +.icon-w-blog-post-unsubscription:before { + content: "\e60d"; +} +.icon-w-text-highlighter:before { + content: "\e6f6"; +} +.icon-w-related-documents:before { + content: "\e69f"; +} +.icon-w-order-note:before { + content: "\e660"; +} +.icon-w-xslt-viewer:before { + content: "\e6e7"; +} +.icon-w-document-wizard-button:before { + content: "\e6fa"; +} +.icon-w-contribution-list:before { + content: "\e6f8"; +} +.icon-w-timer:before { + content: "\e6a8"; +} +.icon-w-shortcuts:before { + content: "\e67f"; +} +.icon-w-document-wizard-manager:before { + content: "\e6fa"; +} +.icon-w-cookie-law-consent:before { + content: "\e6f7"; +} +.icon-w-blog-comments-viewer:before { + content: "\e6c1"; +} +.icon-w-sign-out-button:before { + content: "\e6d9"; +} +.icon-w-scrolling-news:before { + content: "\e6f1"; +} +.icon-w-output-cache-dependencies:before { + content: "\e6bb"; +} +.icon-w-zones-with-effect:before { + content: "\e65c"; +} +.icon-w-document-wizard-navigation:before { + content: "\e6fa"; +} +.icon-w-my-subscriptions:before { + content: "\e634"; +} +.icon-w-document-wizard-step-action:before { + content: "\e6fa"; +} +.icon-w-page-views:before { + content: "\e6bb"; +} +.icon-w-activities:before { + content: "\e695"; +} +.icon-w-analytics-chart-viewer:before { + content: "\e631"; +} +.icon-w-analytics-table-viewer:before { + content: "\e612"; +} +.icon-w-articles-rss-feed:before { + content: "\e6e9"; +} +.icon-w-blog-comments:before { + content: "\e6c1"; +} +.icon-w-building-your-on-line-store:before { + content: "\e6f5"; +} +.icon-w-department-latest-blog-posts:before { + content: "\e642"; +} +.icon-w-department-latest-forum-posts:before { + content: "\e6c1"; +} +.icon-w-department-latest-news:before { + content: "\e643"; +} +.icon-w-department-quick-links:before { + content: "\e67f"; +} +.icon-w-department-upcoming-events:before { + content: "\e6b8"; +} +.icon-w-documents:before { + content: "\e69f"; +} +.icon-w-e-commerce-settings-checker:before { + content: "\e702"; +} +.icon-w-editable-image:before { + content: "\e633"; +} +.icon-w-e-mail-queue:before { + content: "\e64e"; +} +.icon-w-employee-of-the-month:before { + content: "\e604"; +} +.icon-w-event-management:before { + content: "\e6b8"; +} +.icon-w-eventlog:before { + content: "\e6a9"; +} +.icon-w-forum-group:before { + content: "\e6c1"; +} +.icon-w-forum-posts-waiting-for-approval:before { + content: "\e6c1"; +} +.icon-w-group-administrators:before { + content: "\e605"; +} +.icon-w-group-forum-posts-viewer:before { + content: "\e6c1"; +} +.icon-w-group-poll:before { + content: "\e61b"; +} +.icon-w-intranet-canteen-menu:before { + content: "\e660"; +} +.icon-w-intranet-departments:before { + content: "\e640"; +} +.icon-w-intranet-employees:before { + content: "\e602"; +} +.icon-w-intranet-latest-blog-posts:before { + content: "\e642"; +} +.icon-w-intranet-latest-forum-posts:before { + content: "\e6c1"; +} +.icon-w-intranet-latest-news:before { + content: "\e643"; +} +.icon-w-intranet-poll:before { + content: "\e631"; +} +.icon-w-intranet-quick-links:before { + content: "\e67f"; +} +.icon-w-intranet-upcoming-events:before { + content: "\e6b8"; +} +.icon-w-latest-blog-posts:before { + content: "\e642"; +} +.icon-w-latest-forum-posts:before { + content: "\e6c1"; +} +.icon-w-latest-news-for-corporate-site:before { + content: "\e643"; +} +.icon-w-link:before { + content: "\e67f"; +} +.icon-w-media-gallery:before { + content: "\e633"; +} +.icon-w-message-list:before { + content: "\e6f8"; +} +.icon-w-most-recent-pages:before { + content: "\e6f8"; +} +.icon-w-my-accounts:before { + content: "\e6bc"; +} +.icon-w-my-blogs:before { + content: "\e642"; +} +.icon-w-my-blogs-comments:before { + content: "\e6c1"; +} +.icon-w-my-contacts:before { + content: "\e663"; +} +.icon-w-my-inbox:before { + content: "\e64e"; +} +.icon-w-my-pending-contacts:before { + content: "\e663"; +} +.icon-w-my-projects-intranet-portal:before { + content: "\e62b"; +} +.icon-w-my-workgroups:before { + content: "\e6c6"; +} +.icon-w-object-recycle-bin:before { + content: "\e6d0"; +} +.icon-w-orders:before { + content: "\e660"; +} +.icon-w-persona-based-recommendations:before { + content: "\e604"; +} +.icon-w-personal-category-list:before { + content: "\e6f8"; +} +.icon-w-products:before { + content: "\e6ce"; +} +.icon-w-random-products-for-corporate-site:before { + content: "\e6ce"; +} +.icon-w-recent-users:before { + content: "\e605"; +} +.icon-w-report-daily-sales:before { + content: "\e684"; +} +.icon-w-report-monthly-sales:before { + content: "\e684"; +} +.icon-w-report-number-of-orders-by-status:before { + content: "\e684"; +} +.icon-w-report-sales-by-order-status:before { + content: "\e684"; +} +.icon-w-reporting:before { + content: "\e684"; +} +.icon-w-rich-text:before { + content: "\e728"; +} +.icon-w-scrolling-news-for-corporate-site:before { + content: "\e643"; +} +.icon-w-system:before { + content: "\e6ab"; +} +.icon-w-tasks-assigned-to-me-intranet-portal:before { + content: "\e61b"; +} +.icon-w-tasks-owned-by-me-intranet-portal:before { + content: "\e61b"; +} +.icon-w-text:before { + content: "\e72c"; +} +.icon-w-widget-zone:before { + content: "\e6a5"; +} +.icon-w-workgroup-administrators:before { + content: "\e605"; +} +.icon-w-workgroup-latest-blog-posts:before { + content: "\e642"; +} +.icon-w-workgroup-latest-forum-posts:before { + content: "\e6c1"; +} +.icon-w-workgroup-latest-news:before { + content: "\e643"; +} +.icon-w-workgroup-members:before { + content: "\e602"; +} +.icon-w-workgroup-messages:before { + content: "\e64f"; +} +.icon-w-workgroup-quick-links:before { + content: "\e67f"; +} +.icon-w-workgroup-recent-pages:before { + content: "\e6f8"; +} +.icon-w-workgroup-upcoming-events:before { + content: "\e6b8"; +} +.icon-w-current-user:before { + content: "\e605"; +} +.icon-w-disabled-module-info:before { + content: "\e664"; +} +.icon-w-edit:before { + content: "\e696"; +} +.icon-w-edit-parameters:before { + content: "\e696"; +} +.icon-w-forum-favorites:before { + content: "\e614"; +} +.icon-w-forum-posts-viewer:before { + content: "\e6c1"; +} +.icon-w-forum-subscription-confirmation:before { + content: "\e675"; +} +.icon-w-header-actions:before { + content: "\e6bb"; +} +.icon-w-horizontal-tabs:before { + content: "\e6fb"; +} +.icon-w-listing:before { + content: "\e728"; +} +.icon-w-edit-bindings:before { + content: "\e696"; +} +.icon-w-media-file-uploader:before { + content: "\e632"; +} +.icon-w-messages-placeholder:before { + content: "\e630"; +} +.icon-w-metafile-list:before { + content: "\e6f8"; +} +.icon-w-new-header-action:before { + content: "\e6bb"; +} +.icon-w-object-edit-panel:before { + content: "\e6bb"; +} +.icon-w-object-tree-menu:before { + content: "\e73a"; +} +.icon-w-page-title:before { + content: "\e727"; +} +.icon-w-preview-edit:before { + content: "\e696"; +} +.icon-w-selector:before { + content: "\e6bb"; +} +.icon-w-select-site:before { + content: "\e698"; +} +.icon-w-theme-file-manager:before { + content: "\e68a"; +} +.icon-w-tree:before { + content: "\e73a"; +} +.icon-w-tree-guide:before { + content: "\e73a"; +} +.icon-w-users-viewer:before { + content: "\e605"; +} +.icon-w-vertical-tabs:before { + content: "\e73c"; +} +.icon-file-default:before { + content: "\e69c"; +} +.icon-file-3gp:before { + content: "\e636"; +} +.icon-file-accdb:before { + content: "\e6a0"; +} +.icon-file-ai:before { + content: "\e717"; +} +.icon-file-ascx:before { + content: "\e714"; +} +.icon-file-aspx:before { + content: "\e69f"; +} +.icon-file-au:before { + content: "\e71c"; +} +.icon-file-avi:before { + content: "\e636"; +} +.icon-file-bat:before { + content: "\e71a"; +} +.icon-file-bmp:before { + content: "\e633"; +} +.icon-file-cs:before { + content: "\e718"; +} +.icon-file-css:before { + content: "\e63f"; +} +.icon-file-csv:before { + content: "\e612"; +} +.icon-file-dbm:before { + content: "\e6a0"; +} +.icon-file-doc:before { + content: "\e625"; +} +.icon-file-eps:before { + content: "\e717"; +} +.icon-file-flv:before { + content: "\e636"; +} +.icon-file-gif:before { + content: "\e633"; +} +.icon-file-html:before { + content: "\e6e7"; +} +.icon-file-jpeg:before { + content: "\e633"; +} +.icon-file-js:before { + content: "\e6cb"; +} +.icon-file-mdb:before { + content: "\e6a0"; +} +.icon-file-mid:before { + content: "\e71c"; +} +.icon-file-mov:before { + content: "\e636"; +} +.icon-file-mp3:before { + content: "\e71c"; +} +.icon-file-mp4:before { + content: "\e636"; +} +.icon-file-mpeg:before { + content: "\e71c"; +} +.icon-file-mpg:before { + content: "\e636"; +} +.icon-file-mpg4:before { + content: "\e636"; +} +.icon-file-oga:before { + content: "\e71c"; +} +.icon-file-ogg:before { + content: "\e71c"; +} +.icon-file-ogv:before { + content: "\e636"; +} +.icon-file-pdf:before { + content: "\e6a3"; +} +.icon-file-png:before { + content: "\e633"; +} +.icon-file-pps:before { + content: "\e71d"; +} +.icon-file-ppt:before { + content: "\e71d"; +} +.icon-file-ps:before { + content: "\e717"; +} +.icon-file-psd:before { + content: "\e633"; +} +.icon-file-rtf:before { + content: "\e625"; +} +.icon-file-sln:before { + content: "\e6ff"; +} +.icon-file-swf:before { + content: "\e636"; +} +.icon-file-tif:before { + content: "\e633"; +} +.icon-file-tiff:before { + content: "\e633"; +} +.icon-file-txt:before { + content: "\e625"; +} +.icon-file-vb:before { + content: "\e716"; +} +.icon-file-wav:before { + content: "\e71c"; +} +.icon-file-webm:before { + content: "\e636"; +} +.icon-file-wma:before { + content: "\e71c"; +} +.icon-file-wmv:before { + content: "\e636"; +} +.icon-file-xls:before { + content: "\e612"; +} +.icon-file-xml:before { + content: "\e6e7"; +} +.icon-file-xsl:before { + content: "\e6e7"; +} +.icon-file-xslt:before { + content: "\e6e7"; +} +.icon-file-zip:before { + content: "\e715"; +} +.icon-me-abstractobjectcollection:before { + content: "\e68b"; +} +.icon-me-binding:before { + content: "\e67f"; +} +.icon-me-boolean:before { + content: "\e74a"; +} +.icon-me-datetime:before { + content: "\e6a8"; +} +.icon-me-double:before { + content: "\e752"; +} +.icon-me-false:before { + content: "\e74e"; +} +.icon-me-children:before { + content: "\e67b"; +} +.icon-me-icontext:before { + content: "\e654"; +} +.icon-me-ilist:before { + content: "\e6f8"; +} +.icon-me-imacronamespace:before { + content: "\e699"; +} +.icon-me-info:before { + content: "\e6a9"; +} +.icon-me-insertmacro:before { + content: "\e740"; +} +.icon-me-int32:before { + content: "\e752"; +} +.icon-me-method:before { + content: "\e6a6"; +} +.icon-me-null:before { + content: "\e751"; +} +.icon-me-number:before { + content: "\e752"; +} +.icon-me-parent:before { + content: "\e74c"; +} +.icon-me-property:before { + content: "\e6a9"; +} +.icon-me-referring:before { + content: "\e67f"; +} +.icon-me-sitebinding:before { + content: "\e67f"; +} +.icon-me-snippet:before { + content: "\e750"; +} +.icon-me-string:before { + content: "\e74f"; +} +.icon-me-true:before { + content: "\e74b"; +} +.icon-me-value:before { + content: "\e749"; +} +.icon-me-exception:before { + content: "\e693"; +} +.icon-crosshair { + position: relative; + display: inline-block; +} +.icon-crosshair:before { + content: "\e71b"; + color: #fff; + position: absolute; + left: 0; + display: inline-block; +} +.icon-crosshair:after { + content: "\e71f"; + position: absolute; + left: 0; + display: inline-block; +} +.radio, +.ktc-radio, +.checkbox, +.ktc-checkbox { + display: block; +} +.radio label, +.ktc-radio label, +.checkbox label, +.ktc-checkbox label { + display: inline-block; + cursor: pointer; + position: relative; + padding-left: 24px; + line-height: 20px; + font-weight: normal; +} +.radio label:before, +.ktc-radio label:before, +.checkbox label:before, +.ktc-checkbox label:before, +.radio label:after, +.ktc-radio label:after, +.checkbox label:after, +.ktc-checkbox label:after { + content: ""; + width: 15px; + height: 15px; + line-height: 16px; + display: inline-block; + box-sizing: border-box; + position: absolute; + left: 0; + top: 2px; + background-color: #ffffff; +} +.radio label:after, +.ktc-radio label:after, +.checkbox label:after, +.ktc-checkbox label:after { + background-color: transparent; +} +.radio input, +.ktc-radio input, +.checkbox input, +.ktc-checkbox input { + position: absolute; + width: 1px; + height: 1px; + padding: 0; + margin: -1px; + overflow: hidden; + clip: rect(0, 0, 0, 0); + border: 0; +} +.radio input[disabled] + label, +.ktc-radio input[disabled] + label, +.checkbox input[disabled] + label, +.ktc-checkbox input[disabled] + label, +.radio input:active[disabled] + label, +.ktc-radio input:active[disabled] + label, +.checkbox input:active[disabled] + label, +.ktc-checkbox input:active[disabled] + label { + cursor: not-allowed; +} +.radio input[disabled] + label:before, +.ktc-radio input[disabled] + label:before, +.checkbox input[disabled] + label:before, +.ktc-checkbox input[disabled] + label:before, +.radio input:active[disabled] + label:before, +.ktc-radio input:active[disabled] + label:before, +.checkbox input:active[disabled] + label:before, +.ktc-checkbox input:active[disabled] + label:before, +.radio input[disabled] + label:focus:before, +.ktc-radio input[disabled] + label:focus:before, +.checkbox input[disabled] + label:focus:before, +.ktc-checkbox input[disabled] + label:focus:before, +.radio input:active[disabled] + label:focus:before, +.ktc-radio input:active[disabled] + label:focus:before, +.checkbox input:active[disabled] + label:focus:before, +.ktc-checkbox input:active[disabled] + label:focus:before, +.radio input[disabled] + label:active:before, +.ktc-radio input[disabled] + label:active:before, +.checkbox input[disabled] + label:active:before, +.ktc-checkbox input[disabled] + label:active:before, +.radio input:active[disabled] + label:active:before, +.ktc-radio input:active[disabled] + label:active:before, +.checkbox input:active[disabled] + label:active:before, +.ktc-checkbox input:active[disabled] + label:active:before { + color: #e5e5e5; +} +.radio input[disabled] + label:after, +.ktc-radio input[disabled] + label:after, +.checkbox input[disabled] + label:after, +.ktc-checkbox input[disabled] + label:after, +.radio input:active[disabled] + label:after, +.ktc-radio input:active[disabled] + label:after, +.checkbox input:active[disabled] + label:after, +.ktc-checkbox input:active[disabled] + label:after { + color: #696663; +} +.radio input + label:before, +.ktc-radio input + label:before, +.checkbox input + label:before, +.ktc-checkbox input + label:before, +.radio input + label:after, +.ktc-radio input + label:after, +.checkbox input + label:after, +.ktc-checkbox input + label:after { + font-family: "Core-icons"; + font-size: 16px; + text-align: center; +} +.radio input + label:before, +.ktc-radio input + label:before, +.checkbox input + label:before, +.ktc-checkbox input + label:before { + color: #bdbbbb; +} +.radio input + label:after, +.ktc-radio input + label:after, +.checkbox input + label:after, +.ktc-checkbox input + label:after { + color: #497d04; +} +.radio input:focus + label:before, +.ktc-radio input:focus + label:before, +.checkbox input:focus + label:before, +.ktc-checkbox input:focus + label:before, +.radio input:active + label:before, +.ktc-radio input:active + label:before, +.checkbox input:active + label:before, +.ktc-checkbox input:active + label:before { + color: #1175ae; +} +.Safari .checkbox label:after, +.Safari .ktc-checkbox label:after { + height: 16px; +} +.Chrome .checkbox label:before, +.Chrome .ktc-checkbox label:before, +.Chrome .checkbox label:after, +.Chrome .ktc-checkbox label:after { + height: 16px; +} +.radio input ~ label:before, +.ktc-radio input ~ label:before { + content: "\e626"; +} +.radio input:disabled ~ label:before, +.ktc-radio input:disabled ~ label:before { + content: "\e6ac"; +} +.radio input:checked ~ label:after, +.ktc-radio input:checked ~ label:after { + content: "\e627"; +} +.radio label:before, +.ktc-radio label:before { + border-radius: 50%; +} +.checkbox input ~ label:before, +.ktc-checkbox input ~ label:before { + content: "\e6ad"; +} +.checkbox input:disabled ~ label:before, +.ktc-checkbox input:disabled ~ label:before { + content: "\e6f0"; +} +.checkbox input:checked ~ label:after, +.ktc-checkbox input:checked ~ label:after { + content: "\e6b0"; +} +.checkbox:not(.checkbox-no-label) label, +.ktc-checkbox:not(.checkbox-no-label) label, +.checkbox:not(.ktc-checkbox-no-label) label, +.ktc-checkbox:not(.ktc-checkbox-no-label) label { + margin-right: 8px; +} +.radio-list-vertical, +.ktc-radio-list-vertical, +.checkbox-list-vertical, +.ktc-checkbox-list-vertical { + margin-top: 6px; + margin-right: 8px; +} +.radio-list-vertical label:not(:first-of-type), +.ktc-radio-list-vertical label:not(:first-of-type), +.checkbox-list-vertical label:not(:first-of-type), +.ktc-checkbox-list-vertical label:not(:first-of-type), +.radio-list-vertical span:not(:first-of-type) label, +.ktc-radio-list-vertical span:not(:first-of-type) label, +.checkbox-list-vertical span:not(:first-of-type) label, +.ktc-checkbox-list-vertical span:not(:first-of-type) label, +.radio-list-vertical .radio + .radio, +.ktc-radio-list-vertical .radio + .radio, +.checkbox-list-vertical .radio + .radio, +.ktc-checkbox-list-vertical .radio + .radio, +.radio-list-vertical .ktc-radio + .ktc-radio, +.ktc-radio-list-vertical .ktc-radio + .ktc-radio, +.checkbox-list-vertical .ktc-radio + .ktc-radio, +.ktc-checkbox-list-vertical .ktc-radio + .ktc-radio, +.radio-list-vertical .checkbox + .checkbox, +.ktc-radio-list-vertical .checkbox + .checkbox, +.checkbox-list-vertical .checkbox + .checkbox, +.ktc-checkbox-list-vertical .checkbox + .checkbox, +.radio-list-vertical .ktc-checkbox + .ktc-checkbox, +.ktc-radio-list-vertical .ktc-checkbox + .ktc-checkbox, +.checkbox-list-vertical .ktc-checkbox + .ktc-checkbox, +.ktc-checkbox-list-vertical .ktc-checkbox + .ktc-checkbox { + margin-top: 4px; +} +.radio-list-vertical.first-on-page, +.ktc-radio-list-vertical.first-on-page, +.checkbox-list-vertical.first-on-page, +.ktc-checkbox-list-vertical.first-on-page { + margin-top: 0px; +} +.radio-list-horizontal .radio, +.ktc-radio-list-horizontal .radio, +.checkbox-list-horizontal .radio, +.ktc-checkbox-list-horizontal .radio, +.radio-list-horizontal .ktc-radio, +.ktc-radio-list-horizontal .ktc-radio, +.checkbox-list-horizontal .ktc-radio, +.ktc-checkbox-list-horizontal .ktc-radio, +.radio-list-horizontal .checkbox, +.ktc-radio-list-horizontal .checkbox, +.checkbox-list-horizontal .checkbox, +.ktc-checkbox-list-horizontal .checkbox, +.radio-list-horizontal .ktc-checkbox, +.ktc-radio-list-horizontal .ktc-checkbox, +.checkbox-list-horizontal .ktc-checkbox, +.ktc-checkbox-list-horizontal .ktc-checkbox { + display: inline-block; +} +.radio-list-horizontal label, +.ktc-radio-list-horizontal label, +.checkbox-list-horizontal label, +.ktc-checkbox-list-horizontal label { + margin-right: 16px; +} +.media-gallery { + margin-top: 2.5rem; +} +.media-gallery .cafe-overlay { + background-color: rgba(0, 0, 0, 0.4); + display: block; + height: 100%; + position: absolute; + width: 100%; + z-index: 10; +} +.media-gallery .cafe-overlay .ourcoffee-tile-text { + font-size: 1.375rem; + font-weight: 700; + position: absolute; + top: 50%; +} +.media-gallery .media-item span { + visibility: hidden; +} +.media-gallery .media-item:hover span { + visibility: visible; +} +.media-gallery .media-item.col-lg-6 { + margin-top: -1px; +} +.media-gallery .ratio-4-3 { + width: 100%; + position: relative; + background: url() 50% 50% no-repeat; + background-size: cover; + background-clip: content-box; +} +.media-gallery .ratio-4-3:before { + display: block; + content: ""; + padding-top: 75%; +} +.row.section-white { + background: #ffffff; +} +.row.section-cappuccino { + background-color: #CEB48D; +} +.row.section-cappuccino h1, +.row.section-cappuccino h2, +.row.section-cappuccino h3, +.row.section-cappuccino .h1, +.row.section-cappuccino .h2, +.row.section-cappuccino .h3 { + color: #6a5a3b; +} +.row.section-cappuccino .image-uploader-editor .uploader .dz-message { + color: #ffffff; +} +.consent-item:not(:first-of-type) { + border-top: 1px solid #e7e7e7; +} +.consent-item .row { + margin: 0 32px 0 32px; + padding: 8px 0 0 0; +} +.consent-item .consent-heading { + margin: 0; +} +.cookie-consent { + font-size: 16px; + padding: 8px; + background: #E2D1BA; + color: #000000; +} +.cookie-consent .consent-text { + padding-bottom: 16px; +} +.cookie-consent .consent-buttons { + text-align: right; + margin: 0; +} +/*# Buttons #*/ +.btn { + padding: 0.5rem 1rem; + cursor: pointer; + background: #fff; + display: inline-block; + text-decoration: none; + letter-spacing: 2px; + line-height: 2.14286; + color: #ffffff; + background-color: #272219; + text-transform: uppercase; + font-size: 0.875rem; + border: none; +} +.btn:hover { + background: rgba(39, 34, 25, 0.8); +} +.btn-primary { + padding: 0.5625rem 1.5rem; +} +.btn:hover { + background: rgba(39, 34, 25, 0.8); +} +.btn-more { + margin: 3.5rem 0; + text-transform: uppercase; + font-size: 0.875rem; +} +.btn-disabled { + background-color: #a3a2a2; + border-color: #696663; +} +.btn-disabled:hover { + background: #a3a2a2; +} +@media (min-width: 768px) { + .btn-more { + padding: 1rem 2.5rem; + } +} +/*# Page wrap #*/ +html, +body { + height: 100%; +} +body { + display: table; + width: 100%; + font-family: 'GT-Wallsheim', sans-serif; + font-weight: 300; +} +body .page-wrap .page-container-inner { + padding-bottom: 60px; + background: url(../Images/bg.jpg) left bottom repeat; +} +body.inverted .page-wrap .page-container-inner { + padding: 3rem 1rem; + background: none; +} +@media (min-width: 768px) { + body.inverted .page-wrap .page-container-inner { + padding: 3rem; + min-height: 554px; + background: url(../Images/plant-3.png) top right no-repeat; + } +} +body.inverted .footer-container { + background: url(../Images/bg.jpg) repeat; +} +body.inverted.no-bg .page-wrap .page-container-inner { + background: none; +} +.page-wrap, +.footer-wrapper { + display: table-row; + height: 100%; +} +/*# Header #*/ +header { + padding: 0; + color: #ffffff; + background: #272219; + display: flex; + flex-direction: column; + font-weight: 400; +} +@media screen and (min-width: 768px) { + header { + height: 100px; + padding: 16px 0; + } +} +@media screen and (min-width: 1112px) { + header { + height: 131px; + padding: 32px 48px; + } +} +/*# Footer #*/ +footer { + color: #846331; + background: #ffffff; +} +footer .footer-container { + padding: 2rem 0; +} +footer .row .footer-col:first-child { + margin-bottom: 40px; +} +footer .row address { + margin-bottom: 20px; +} +footer .row .subscription-form form { + display: flex; + flex-direction: column; +} +footer .row .subscription-form form .ktc-default-section { + flex-grow: 1; +} +footer .row .subscription-form form .ktc-default-section .form-control { + width: 100%; + padding: 0.875rem 1rem; + margin-top: 0.3rem; + margin-bottom: 0.8rem; +} +footer .row .subscription-form form input[type="submit"] { + align-self: flex-start; + padding: 0.5rem 1rem; + cursor: pointer; + background: #fff; + display: inline-block; + text-decoration: none; + letter-spacing: 2px; + line-height: 2.14286; + color: #ffffff; + background-color: #272219; + text-transform: uppercase; + font-size: 0.875rem; + border: none; + padding: 0.5625rem 1.5rem; +} +footer .row .subscription-form form input[type="submit"]:hover { + background: rgba(39, 34, 25, 0.8); +} +@media (min-width: 768px) { + footer { + padding-top: 78px; + } + footer .footer-container { + padding: 2rem 0 6rem 0; + } + footer .footer-container .container { + position: relative; + } + footer .footer-container .container:before { + display: block; + width: 250px; + height: 554px; + position: absolute; + left: 0; + top: -158px; + z-index: 1; + background: url(../Images/plant-2.png) top right; + content: ''; + } + footer .footer-container .container .row { + display: flex; + } + footer .footer-container .container .row .footer-col { + flex-grow: 1; + } + footer .footer-container .container .row .footer-col:first-child { + padding-left: 250px; + margin-bottom: 0; + } + footer .footer-container .container .row .footer-col:nth-child(2) { + display: flex; + flex-direction: column; + } + footer .footer-container .container .row address { + margin-bottom: 55px; + } + footer .footer-container .container .row .copyright { + margin-top: auto; + } +} +@media (min-width: 1112px) { + footer .footer-container .container:before { + width: 391px; + height: 554px; + } + footer .footer-container .container .row .footer-col:first-child { + padding-left: 391px; + } + footer .footer-container .container .row .subscription-form form { + flex-direction: row; + } + footer .footer-container .container .row .subscription-form form .ktc-default-section { + margin: 0; + } + footer .footer-container .container .row .subscription-form form .ktc-default-section .form-control { + margin-bottom: 0; + } + footer .footer-container .container .row .subscription-form form input[type="submit"] { + height: 52px; + align-self: flex-end; + } +} +/*# About page #*/ +.about-page { + padding: 3rem 1rem; + font-size: 1.2rem; +} +@media (min-width: 768px) { + .about-page { + padding: 3rem; + font-size: 1rem; + } + .text-and-image-text { + padding-right: 1rem; + padding-left: 0rem; + } + .text-and-image-text.text-right { + padding-right: 0rem; + padding-left: 1rem; + } +} +@media (min-width: 1112px) { + .about-page { + padding: 3rem; + font-size: 1.1rem; + } +} +/*# Reference #*/ +.reference { + padding: 3rem; +} +.reference .quote { + font-size: 1.1rem; +} +.reference .quote .text { + font-size: 1.3rem; + font-style: italic; + padding-bottom: 4rem; +} +.reference .quote .name-and-description { + text-align: right; + position: absolute; + bottom: 0; + right: 0; +} +.reference .quote .name-and-description .name { + font-weight: bold; +} +.reference .quote .name-and-description .description { + font-style: italic; +} +@media (max-width: 767px) { + .reference { + padding: 1rem; + margin-top: 1rem; + margin-bottom: 1rem; + } + .reference .full-height { + padding-left: 1rem; + padding-right: 1rem; + padding-bottom: 1rem; + padding-top: 1rem; + } +} +@media (min-width: 768px) { + .reference .full-height { + display: flex; + align-items: stretch; + } + .reference .quote { + padding-left: 2rem; + font-size: 0.9rem; + } + .reference .quote .text { + font-size: 1rem; + padding-left: 1rem; + } + .reference .quote:before { + content: "\201C"; + opacity: 0.1; + font-size: 350px; + position: absolute; + right: 0; + top: -110px; + } +} +@media (min-width: 1112px) { + .reference .quote { + font-size: 1.1rem; + } + .reference .quote .text { + font-size: 1.3rem; + } +} +@media (min-width: 1440px) { + .reference .quote { + font-size: 1.2rem; + } + .reference .quote .text { + font-size: 1.5rem; + } +} +/*# Forms #*/ +.form-group { + margin-bottom: 0.8rem; +} +.form-group-label { + margin-bottom: 0.3rem; +} +.form-group-label-required:after { + content: "*"; + color: #B4594A; +} +.form-group-input input, +.form-group-input textarea { + padding: 0.4rem; + width: 60%; +} +.form-group-input textarea { + width: 100%; + height: 6rem; +} +.form-group-input .Error input, +.form-group-input .Error textarea { + border-color: #D12127; +} +/*# Messages #*/ +.error-label, +.info-label { + font-weight: bold; + margin-top: 0.3rem; + margin-bottom: 0.6rem; + display: block; +} +.error-label { + color: #D12127; +} +.info-label { + color: white; + background-color: #497d04 !important; + padding: 1rem; +} +/*# Copyright #*/ +.copyright { + padding-top: 16px; + padding-bottom: 16px; +} +.uppercase-text { + text-transform: uppercase; +} +/*# Event section*/ +.events-section { + padding: 0 1rem; +} +.event-tile { + overflow: hidden; +} +.event-tile h2 a { + color: #846331; +} +.event-tile .event-tile-inner { + height: 100%; + background: #ffffff; +} +.event-tile-info { + position: relative; + padding: 1rem; +} +.event-tile-info ul { + list-style: none; + padding: 0; + margin: 0; +} +.event-tile-image { + width: 100%; + display: block; +} +.event-tile-text { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 300; + font-size: 1.375rem; + line-height: 1.4; +} +@media (max-width: 1111px) { + .event-tile { + padding-bottom: 1.25rem; + } +} +@media (min-width: 768px) { + .events-section { + display: flex; + flex-wrap: wrap; + } + .event-tile { + margin-bottom: 1.5rem; + } + .event-tile .event-tile-image { + height: 440px; + width: 100%; + } +} +@media (min-width: 1112px) { + .events-section { + padding: 0 3rem; + } + .event-tile { + height: 440px; + } + .event-tile .event-tile-info { + height: 100%; + display: flex; + flex-direction: column; + justify-content: flex-end; + padding: 2.5rem; + } + .event-tile .event-tile-info h2 { + margin: 0; + } + .event-tile-image { + height: 180px; + object-fit: cover; + } + .event-tile-info { + padding: 3rem 2.25rem 2.25rem 2.25rem; + } +} +@media (min-width: 1440px) { + .event-tile .event-tile-info { + padding: 6.25rem; + } + .event-tile-image { + height: 221px; + } +} +/*# Article Tile #*/ +.articles-section { + padding: 0 1rem; + background: url(../Images/plant-3.png) right top no-repeat, url(../Images/plant-1.png) left bottom no-repeat; +} +.articles-page .articles-section { + padding-top: 4rem; + background: url(../Images/plant-3.png) right top no-repeat; +} +.articles-page .row:after, +.articles-page .row:before { + display: none; +} +.article-tile { + overflow: hidden; +} +.article-tile h2 a { + color: #846331; +} +.article-tile .article-tile-inner { + height: 100%; + background: #ffffff; +} +.article-tile-small { + margin-bottom: 0.5rem; +} +.article-tile-info { + position: relative; + padding: 1rem; +} +.article-tile-image { + width: 100%; + display: block; +} +.article-tile-date { + display: inline-block; + text-transform: uppercase; + letter-spacing: 2px; + padding: 0.5rem 1.25rem; + font-size: 0.75rem; + font-weight: 400; + line-height: 2.143; + color: #ffffff; + background: #846331; +} +a + .article-tile-info .article-tile-date { + position: absolute; + top: 0; + transform: translateY(-50%); +} +.title-wrapper { + text-align: center; + width: 100%; +} +.title-wrapper .title-tab { + display: inline-block; + position: relative; + margin-bottom: 50px; + font-size: 3rem; + font-weight: 300; + line-height: 1.16666; + text-align: center; +} +.confirmation-page { + background: #FFF; +} +.confirmation-page .confirmation-text { + padding-bottom: 29.375px; + font-size: 19px; +} +.confirmation-page .confirmation-heading { + margin-bottom: 29px; +} +@media (max-width: 1111px) { + .article-tile-large { + padding-bottom: 1.25rem; + } +} +@media (min-width: 768px) { + .articles-section .row:first-child { + display: flex; + flex-wrap: wrap; + } + .title-tab:before, + .title-tab:after { + width: 130px; + height: 1px; + position: absolute; + top: 50%; + background: currentColor; + content: ''; + } + .title-tab:before { + right: calc(100% + 32px); + } + .title-tab:after { + left: calc(100% + 32px); + } + .article-tile-image { + height: 240px; + object-fit: cover; + } + .article-tile-small { + align-self: stretch; + padding-right: 0.25rem; + } + .article-tile-small.last { + padding-right: 0; + } + .article-tile-small + .article-tile-small { + padding-left: 0.25rem; + } + .article-tile-small.last { + padding-right: 0; + } + .article-tile-large { + margin-bottom: 1.5rem; + } + .article-tile-large .article-tile-image { + height: 440px; + width: 100%; + } +} +@media (min-width: 1112px) { + .articles-section { + padding: 0 3rem; + } + .article-tile-large { + height: 440px; + } + .article-tile-large .article-tile-info { + height: 100%; + display: flex; + flex-direction: column; + justify-content: flex-end; + padding: 2.5rem; + } + .article-tile-large .article-tile-info h2 { + margin: 0; + } + .article-tile-large .article-tile-info .article-tile-date { + position: relative; + color: #000000; + background: none; + transform: none; + align-self: flex-start; + padding: 0; + } + .article-tile-large .article-tile-info .article-tile-date:after { + display: block; + width: 49px; + height: 1px; + position: absolute; + left: calc(100% + 12px); + bottom: 10px; + background: #000000; + content: ''; + } + .article-tile-image { + height: 180px; + object-fit: cover; + } + .article-tile-small { + margin-bottom: 1rem; + padding-right: 0.75rem; + } + .article-tile-small + .article-tile-small { + padding-left: 0.75rem; + } + .article-tile-small.last { + padding-right: 0; + } + .article-tile-info { + padding: 3rem 2.25rem 2.25rem 2.25rem; + } +} +@media (min-width: 1440px) { + .article-tile-large .article-tile-info { + padding: 6.25rem; + } + .article-tile-image { + height: 221px; + } +} +/*# Article detail tile #*/ +.article-detail-page { + padding: 3rem 1rem; + font-size: 1.2rem; +} +.article-detail-page .article-detail { + padding: 0 2rem; +} +@media (min-width: 768px) { + .article-detail-page { + padding: 3rem; + background: url(../Images/plant-3.png) right top no-repeat; + } +} +.article-detail-datetime { + margin-bottom: 1rem; +} +.article-detail-image { + margin-bottom: 1rem; +} +.article-detail-content { + margin-top: 2rem; +} +.article-detail-full-width { + margin-top: 35px; +} +.article-detail-full-width .article-detail-content { + margin-top: 3rem; +} +.article-detail-full-width .equal-height { + display: flex; + display: -webkit-flex; + flex-wrap: wrap; +} +.article-detail-full-width .article-title--align-middle { + display: flex; + justify-content: center; + flex-direction: column; +} +@media (min-width: 1112px) { + .article-detail-full-width .article-detail-image { + width: 540px; + } + .article-detail-full-width .article-title--padding { + width: 75px; + } + .article-detail-full-width .article-detail-content { + margin-left: auto; + margin-right: auto; + float: none; + } +} +@media (min-width: 768px) { + .article-detail-related-box { + margin-bottom: 50px; + } + .article-detail-related-box .article-title--align-middle h2 { + margin-top: 0; + } +} +/*# Contact info #*/ +.contact-info { + list-style-type: none; + padding: 0; +} +/*# Pager #*/ +.pagination { + text-align: center; + padding: 0; + list-style-type: none; +} +.pagination > li { + display: inline; +} +.pagination > li > a { + color: black; + padding: 3px 5px; + text-decoration: none; +} +.pagination > li > a:hover, +.pagination > li > a:focus { + border-bottom: 2px solid #E6E6E6; +} +.pagination > li.active { + color: #846331; + border: 2px solid #846331; + padding: 3px 9px; +} +.pagination > li.PagedList-skipToPrevious > a, +.pagination > li.PagedList-skipToNext > a { + text-decoration: underline; + color: #846331; + border-bottom: none; +} +/*# Not found - 404 #*/ +@media (min-width: 768px) { + .not-found-content { + margin-left: 1rem; + } +} +/*# Home banner #*/ +.banner-section { + display: flex; + flex-direction: column; + justify-content: flex-end; + min-height: 580px; + width: 100%; + padding: 0; + background-size: cover; + background-repeat: no-repeat; + background-position-x: 60%; + text-align: left; + margin-bottom: 1rem; +} +.banner-heading { + color: #FFFFFF; + font-weight: 700; + font-size: 3rem; + line-height: 1; + padding: 1rem; + display: inline-block; + margin-bottom: 0; +} +.banner-text { + color: #FFF; + font-size: 1.375rem; + padding: 1.5rem; + display: block; + max-width: 31.25rem; + margin: 0; + font-weight: 400; + z-index: 1; + position: relative; +} +.banner-link { + color: #000000; + text-decoration: none; +} +@media (min-width: 768px) { + .banner-section { + padding: 7.5rem; + } + .banner-heading { + font-size: 5rem; + } +} +/*# Our story #*/ +.ourstory-section { + position: relative; + color: #ffffff; + padding: 1rem 1rem 7rem 1rem; + font-size: 1.5rem; + background: #B49669; + background-image: url(../Images/plant-4.png); + background-repeat: no-repeat; + background-position: right top; +} +.ourstory-section .section-text { + font-weight: 500; +} +.ourstory-section .title-tab { + color: #ffffff; +} +.ourstory-section .btn-more { + position: absolute; + bottom: 0; + left: 50%; + transform: translate(-50%, 50%); + margin: 0; + z-index: 1; +} +@media (min-width: 768px) { + .ourstory-section { + padding: 3rem 3rem 7rem 3rem; + font-size: 2.25rem; + } +} +.home-bottom-bg { + background: url(../Images/cup.png) right center no-repeat; +} +/*# About #*/ +.about-section { + padding: 3rem 0; +} +@media (min-width: 768px) { + .about-section { + padding: 0; + } + .about-section .row--with-cols-padding > div[class^='col-'], + .about-section .row--with-cols-padding > div[class*=' col-'] { + padding-top: 3rem; + padding-bottom: 3rem; + } + .about-section .row--with-cols-padding > div[class^='col-']:first-child, + .about-section .row--with-cols-padding > div[class*=' col-']:first-child { + text-align: right; + } +} +/*# Coffees #*/ +.coffees-page .row { + display: flex; + flex-wrap: wrap; +} +.product-tile-wrapper { + margin-bottom: 1rem; +} +.product-tile-wrapper .product-tile { + background: #ffffff; + text-align: center; + margin: 0.5rem; + border: 1px solid #e5e5e5; + height: 100%; +} +.product-tile-wrapper .product-tile a { + text-decoration: none; +} +.product-tile-wrapper .product-tile .product-heading { + text-align: center; + font-size: 1rem; + font-weight: bold; + font-family: 'Source Sans Pro', sans-serif; + z-index: 1; + display: block; + margin: auto; + width: 100%; + padding: 1.25rem; +} +.product-tile-wrapper .product-tile .product-tile-image { + width: 100%; +} +.coffee-detail-page figure { + margin: 0 0 1.25rem 0; + text-align: center; +} +.coffee-detail-page .image { + border: 1px solid #e5e5e5; +} +/*# Cafes #*/ +.cafes-page { + padding: 3rem 1rem; +} +@media (min-width: 768px) { + .cafes-page { + padding: 3rem; + background: url(../Images/plant-3.png) right top no-repeat; + } +} +.cafe-cards { + margin-left: 1px; + margin-top: 16px; +} +.cafe-cards .title-tab { + margin-top: 0; +} +.no-margin { + margin: 0; +} +.no-padding { + padding: 0px; +} +/*# Cafe tile #*/ +.cafe-tile { + background: #CEB48D; + color: #FFF; + height: 200px; + overflow: hidden; +} +.cafe-tile-address { + font-style: normal; + padding-bottom: 1rem; +} +.cafe-tile-address-anchor, +.cafe-tile-address-anchor:hover, +.cafe-tile-address-anchor:focus, +.cafe-tile-address-anchor:active { + color: #FFF; +} +.cafe-tile-image { + width: 100%; +} +.cafe-tile-content { + padding: 0 1rem 1rem 1rem; +} +.cafe-tile-content .cafe-tile-name { + color: #494132; +} +/*# Cafe image tile #*/ +.cafe-image-tile { + background: #B49669; + color: #FFF; +} +.cafe-image-tile-address { + font-style: normal; + padding-bottom: 1rem; +} +.cafe-image-tile-address-anchor, +.cafe-image-tile-address-anchor:hover, +.cafe-image-tile-address-anchor:focus, +.cafe-image-tile-address-anchor:active { + color: #FFF; +} +.cafe-image-tile-image { + height: 200px; + max-width: 200px; + position: absolute; + bottom: 1px; +} +.cafe-image-tile-content { + padding: 0 1rem 1rem 1rem; +} +.cafe-image-tile-content .cafe-image-tile-name { + color: #494132; +} +@media (min-width: 400px) { + .cafe-image-tile { + height: 200px; + overflow: hidden; + } + .cafe-image-tile-image-wrapper { + float: left; + width: 200px; + height: 100%; + overflow: hidden; + margin-right: 1rem; + } + .cafe-image-tile-content { + padding-right: 1rem; + } +} +@media (min-width: 768px) { + /* md size */ + .cafe-image-tile { + height: 220px; + } + .cafe-image-tile-image-wrapper { + width: 150px; + } + .cafe-image-tile-image { + max-width: 150px; + height: auto; + } +} +@media (min-width: 1112px) { + /* lg size */ + .cafe-image-tile { + height: 200px; + } + .cafe-image-tile-image-wrapper { + width: 200px; + } + .cafe-image-tile-image { + height: 200px; + max-width: 200px; + } +} +/*# Taste our coffee #*/ +.ourcoffee-tile-image { + overflow: hidden; + width: 100%; +} +.ourcoffee-tile-text { + position: absolute; + color: #ffffff; + display: block; + width: 100%; + z-index: 11; + padding: 0; + left: 0; + right: 0; + bottom: 0; + text-align: center; +} +.ourcoffee-tile-link { + display: flex; + justify-content: center; + font-size: 0; + position: relative; + background: #B49669; + height: 300px; + margin-bottom: 1.5rem; +} +.ourcoffee-tile-link img { + object-fit: cover; + object-position: 50% 0; +} +.cafe-overlay { + display: block; + height: 100%; + position: absolute; + width: 100%; + z-index: 10; + background: -webkit-gradient(linear, left top, left bottom, color-stop(51.26%, rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.315))); + background: linear-gradient(180deg, rgba(0, 0, 0, 0) 51.26%, rgba(0, 0, 0, 0.315) 100%); +} +@media (min-width: 768px) { + .ourcoffee-tile-link { + height: 200px; + margin-bottom: 0; + } + .ourcoffee-tile-link h2 { + font-size: 2rem; + } +} +@media (min-width: 1112px) { + .ourcoffee-tile-link { + height: 300px; + } + .ourcoffee-tile-link h2 { + font-size: 3rem; + } +} +@media (min-width: 1440px) { + .ourcoffee-tile-link { + height: 400px; + } +} +.no-margin { + margin: 0; +} +.no-padding { + padding: 0px; +} +/*# Contacts page #*/ +.contacts-page { + padding: 3rem 1rem; +} +@media (min-width: 768px) { + .contacts-page { + padding: 3rem; + background: url(../Images/plant-3.png) right top no-repeat; + } +} +/*# Map #*/ +.map { + height: 400px; +} +/*# Messages #*/ +.ErrorLabel, +.InfoLabel, +.error-label { + font-weight: bold; + margin-top: 0.3rem; + margin-bottom: 0.6rem; + display: block; +} +/*# Search tile #*/ +.search-tile { + margin-bottom: 3rem; + padding: 1rem; +} +.search-tile-badge { + background: #846331; + display: inline-block; + padding: 0 5px; + color: #fff; +} +.search-tile-subtitle { + padding: 0.5rem 0; +} +.search-tile-product-image img { + display: block; + width: 100%; + max-width: 100%; + height: auto; +} +@media (min-width: 768px) { + /* md size */ + .search-tile-content { + padding-left: 1rem; + } + .search-tile-title { + margin-top: 0; + } +} +/*# Registration #*/ +@media (max-width: 768px) { + .signin-register .form-group-input input[type="text"], + .signin-register .form-group-input input[type="password"], + .signin-register .form-group-input input[type="email"], + .signin-register .form-group-input textarea { + width: 100% !important; + } +} +.signin-register .validation-summary-errors ul { + margin: 0; + list-style-type: none; + padding: 0; +} +.signin-register .validation-summary-errors ul li { + color: white !important; + display: block; + font-weight: bold; + text-align: left; + background-color: #D12127; + padding: 10px 12px; + margin-top: 0.3rem; + margin-bottom: 0.6rem; +} +.signin-register .input-validation-error { + border-color: #d12127 !important; +} +.signin-register .field-validation-error { + color: #d12127; + display: block; + padding-bottom: 10px; + text-align: left; +} +.signin-register h2 { + margin-top: 0; +} +.signin-register .zone-dark { + background: #F0E8DD; + padding: 1rem; +} +.signin-register .zone-light { + padding: 1rem; +} +.signin-register .separator { + line-height: 1em; + border-bottom: 2px solid #bebebe; + margin: 1rem 0; +} +.signin-register .separator:before { + position: relative; + left: 50%; + margin-left: -2rem; + padding: 0 0.5rem; + top: 0.5rem; + background: #E7E7E7; +} +.signin-register input[type="submit"] { + margin: 0.5rem 0; +} +.signin-register input[type="password"], +.signin-register input[type="text"], +.signin-register input[type="email"] { + height: 2.6rem; + margin-top: 0.25rem; + padding-left: 0.5rem; + padding-right: 0.5rem; + border: 2px solid #BEBEBE; +} +.signin-register .EditingFormErrorLabel { + color: #D12127; +} +/*# Logon password and remember me #*/ +.logon-remember-me-checkbox { + display: block; +} +.logon-remember-me-checkbox input[type="checkbox"] { + width: auto; + margin-right: 0.15rem; +} +/*# Manufacturers #*/ +.manufacturer-list { + height: 80px; +} +.manufacturer-list .manufacturer-item { + height: 80px; + position: relative; +} +.manufacturer-list .manufacturer-item a { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); +} +.breadcrumbs .arrow { + padding-left: 20px; + padding-right: 10px; +} +.breadcrumbs a { + text-decoration: none; + color: #1C1C1C; +} +.breadcrumbs a:hover, +.breadcrumbs a:active { + text-decoration: none; +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Site.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Site.less new file mode 100644 index 0000000..6517e49 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/Site.less @@ -0,0 +1,1440 @@ + +@import "./Reset.less"; +@import "./variables.less"; +@import "./Fonts.less"; +@import "./Form.less"; +@import "./Grid.less"; +@import "./Menu.less"; +@import "./icons-core.less"; +@import "./Controls.less"; +@import "./Gallery.less"; +@import "./Sections.less"; +@import "./Privacy.less"; +@import "./TrackingConsent.less"; +@import "./Buttons.less"; +@import "./Mixins.less"; + +/*# Page wrap #*/ +html, body { + height: 100%; +} + +body { + display: table; + width: 100%; + font-family: 'GT-Wallsheim', sans-serif; + font-weight: 300; +} + +body .page-wrap { + .page-container-inner { + padding-bottom: 60px; + background: url(../Images/bg.jpg) left bottom repeat; + } +} + +body.inverted { + .page-wrap .page-container-inner { + padding: 3rem 1rem; + background: none; + + @media(min-width:768px) { + padding: 3rem; + min-height: 554px; + background: url(../Images/plant-3.png) top right no-repeat; + } + } + + .footer-container { + background: url(../Images/bg.jpg) repeat; + } +} + +body.inverted.no-bg .page-wrap .page-container-inner { + background: none; +} + +.page-wrap, .footer-wrapper { + display: table-row; + height: 100%; +} + +/*# Header #*/ +header { + padding: 0; + color: @color-white; + background: @color-darkbrown; + display: flex; + flex-direction: column; + font-weight: 400; +} + +@media screen and (min-width:768px) { + header { + height: 100px; + padding: 16px 0; + } +} + +@media screen and (min-width:1112px) { + header { + height: 131px; + padding: 32px 48px; + } +} + +/*# Footer #*/ +footer { + color: @color-brown; + background: @color-white; + + .footer-container { + padding: 2rem 0; + } + + .row { + .footer-col:first-child { + margin-bottom: 40px; + } + + address { + margin-bottom: 20px; + } + + .subscription-form form { + display: flex; + flex-direction: column; + + .ktc-default-section { + flex-grow: 1; + + .form-control { + width: 100%; + padding: 0.875rem 1rem; + margin-top: 0.3rem; + margin-bottom: 0.8rem; + } + } + + input[type="submit"] { + align-self: flex-start; + .btn; + .btn-primary; + } + } + } +} + +@media (min-width: 768px) { + footer { + padding-top: 78px; + + .footer-container { + padding: 2rem 0 6rem 0; + + .container { + position: relative; + + &:before { + display: block; + width: 250px; + height: 554px; + position: absolute; + left: 0; + top: -158px; + z-index: 1; + background: url(../Images/plant-2.png) top right; + content: ''; + } + + .row { + display: flex; + + .footer-col { + flex-grow: 1; + } + + .footer-col:first-child { + padding-left: 250px; + margin-bottom: 0; + } + + .footer-col:nth-child(2) { + display: flex; + flex-direction: column; + } + + address { + margin-bottom: 55px; + } + + .copyright { + margin-top: auto; + } + } + } + } + } +} + +@media (min-width: 1112px) { + footer .footer-container .container { + + &:before { + width: 391px; + height: 554px; + } + + .row { + .footer-col:first-child { + padding-left: 391px; + } + + .subscription-form form { + flex-direction: row; + + .ktc-default-section { + margin: 0; + + .form-control { + margin-bottom: 0; + } + } + + input[type="submit"] { + height: 52px; + align-self: flex-end; + } + } + } + } +} + +/*# About page #*/ +.about-page { + padding: 3rem 1rem; + font-size: 1.2rem; +} + +@media (min-width: 768px) { + .about-page { + padding: 3rem; + font-size: 1rem; + } + + .text-and-image-text { + padding-right: 1rem; + padding-left: 0rem; + + &.text-right { + padding-right: 0rem; + padding-left: 1rem; + } + } +} + +@media (min-width: 1112px) { + .about-page { + padding: 3rem; + font-size: 1.1rem; + } +} + +/*# Reference #*/ +.reference { + padding: 3rem; + + .quote { + font-size: 1.1rem; + + .text { + font-size: 1.3rem; + font-style: italic; + padding-bottom: 4rem; + } + + .name-and-description { + text-align: right; + position: absolute; + bottom: 0; + right: 0; + + .name { + font-weight: bold; + } + + .description { + font-style: italic; + } + } + } +} + +@media (max-width: 767px) { + .reference { + padding: 1rem; + margin-top: 1rem; + margin-bottom: 1rem; + + .full-height { + padding-left: 1rem; + padding-right: 1rem; + padding-bottom: 1rem; + padding-top: 1rem; + } + } +} + +@media (min-width: 768px) { + .reference { + .full-height { + display: flex; + align-items: stretch; + } + + .quote { + padding-left: 2rem; + font-size: 0.9rem; + + .text { + font-size: 1rem; + padding-left: 1rem; + } + + &:before { + content: "\201C"; + opacity: 0.1; + font-size: 350px; + position: absolute; + right: 0; + top: -110px; + } + } + } +} + +@media (min-width: 1112px) { + .reference { + .quote { + font-size: 1.1rem; + + .text { + font-size: 1.3rem; + } + } + } +} + +@media (min-width: 1440px) { + .reference { + .quote { + font-size: 1.2rem; + + .text { + font-size: 1.5rem; + } + } + } +} + +/*# Forms #*/ +.form-group { + margin-bottom: .8rem; +} + +.form-group-label { + margin-bottom: .3rem; +} + +.form-group-label-required:after { + content: "*"; + color: #B4594A; +} + +.form-group-input input, +.form-group-input textarea { + padding: .4rem; + width: 60%; +} + +.form-group-input textarea { + width: 100%; + height: 6rem; +} + +.form-group-input .Error input, +.form-group-input .Error textarea { + border-color: #D12127; +} + +/*# Messages #*/ +.error-label, +.info-label { + font-weight: bold; + margin-top: .3rem; + margin-bottom: .6rem; + display: block; +} + +.error-label { + color: #D12127; +} + +.info-label { + color: white; + background-color: #497d04 !important; + padding: 1rem; +} +/*# Copyright #*/ +.copyright { + padding-top: 16px; + padding-bottom: 16px; +} + +.uppercase-text { + text-transform: uppercase; +} +/*# Event section*/ +.events-section { + padding: 0 1rem; +} + +.event-tile { + overflow: hidden; + + h2 a { + color: @color-brown; + } + + .event-tile-inner { + height: 100%; + background: @color-white; + } +} + +.event-tile-info { + position: relative; + padding: 1rem; + + ul { + list-style: none; + padding: 0; + margin: 0; + } +} + +.event-tile-image { + width: 100%; + display: block; +} + +.event-tile-text { + font-family: 'Source Sans Pro', sans-serif; + font-weight: 300; + font-size: 1.375rem; + line-height: 1.4; +} + + +@media (max-width: 1111px) { + .event-tile { + padding-bottom: 1.25rem; + } +} + +@media (min-width: 768px) { + .events-section { + display: flex; + flex-wrap: wrap; + } + + .event-tile { + margin-bottom: 1.5rem; + + .event-tile-image { + height: 440px; + width: 100%; + } + } +} + +@media (min-width: 1112px) { + .events-section { + padding: 0 3rem; + } + + .event-tile { + height: 440px; + + .event-tile-info { + height: 100%; + display: flex; + flex-direction: column; + justify-content: flex-end; + padding: 2.5rem; + + h2 { + margin: 0; + } + } + } + + .event-tile-image { + height: 180px; + object-fit: cover; + } + + .event-tile-info { + padding: 3rem 2.25rem 2.25rem 2.25rem; + } +} + +@media (min-width: 1440px) { + .event-tile .event-tile-info { + padding: 6.25rem; + } + + .event-tile-image { + height: 221px; + } +} + + +/*# Article Tile #*/ +.articles-page { +} + +.articles-section { + padding: 0 1rem; + background: url(../Images/plant-3.png) right top no-repeat, url(../Images/plant-1.png) left bottom no-repeat; +} + +.articles-page { + .articles-section { + padding-top: 4rem; + background: url(../Images/plant-3.png) right top no-repeat; + } + + .row:after, .row:before { + display: none; + } +} + +.article-tile { + overflow: hidden; + + h2 a { + color: @color-brown; + } + + .article-tile-inner { + height: 100%; + background: @color-white; + } +} + +.article-tile-small { + margin-bottom: .5rem; +} + +.article-tile-info { + position: relative; + padding: 1rem; +} + +.article-tile-image { + width: 100%; + display: block; +} + +.article-tile-date { + display: inline-block; + text-transform: uppercase; + letter-spacing: 2px; + padding: 0.5rem 1.25rem; + font-size: .75rem; + font-weight: 400; + line-height: 2.143; + color: @color-white; + background: @color-brown; +} + +a + .article-tile-info .article-tile-date { + position: absolute; + top: 0; + transform: translateY(-50%); +} + +.title-wrapper { + text-align: center; + width: 100%; + + .title-tab { + display: inline-block; + position: relative; + margin-bottom: 50px; + font-size: 3rem; + font-weight: 300; + line-height: 1.16666; + text-align: center; + } +} + +.confirmation-page { + background: #FFF; + + .confirmation-text { + padding-bottom: 29.375px; + font-size: 19px; + } + + .confirmation-heading { + margin-bottom: 29px; + } +} + +@media (max-width: 1111px) { + .article-tile-large { + padding-bottom: 1.25rem; + } +} + +@media (min-width: 768px) { + .articles-section { + .row:first-child { + display: flex; + flex-wrap: wrap; + } + } + + .title-tab { + &:before, + &:after { + width: 130px; + height: 1px; + position: absolute; + top: 50%; + background: currentColor; + content: ''; + } + + &:before { + right: calc(100% + 32px); + } + + &:after { + left: calc(100% + 32px); + } + } + + .article-tile-image { + height: 240px; + object-fit: cover; + } + + .article-tile-small { + align-self: stretch; + padding-right: .25rem; + + &.last { + padding-right: 0; + } + } + + .article-tile-small + .article-tile-small { + padding-left: .25rem; + } + + .article-tile-small.last { + padding-right: 0; + } + + .article-tile-large { + margin-bottom: 1.5rem; + + .article-tile-image { + height: 440px; + width: 100%; + } + } +} + +@media (min-width: 1112px) { + .articles-section { + padding: 0 3rem; + } + + .article-tile-large { + height: 440px; + + .article-tile-info { + height: 100%; + display: flex; + flex-direction: column; + justify-content: flex-end; + padding: 2.5rem; + + h2 { + margin: 0; + } + + .article-tile-date { + position: relative; + color: @color-black; + background: none; + transform: none; + align-self: flex-start; + padding: 0; + + &:after { + display: block; + width: 49px; + height: 1px; + position: absolute; + left: calc(100% + 12px); + bottom: 10px; + background: @color-black; + content: ''; + } + } + } + } + + .article-tile-image { + height: 180px; + object-fit: cover; + } + + .article-tile-small { + margin-bottom: 1rem; + padding-right: .75rem; + } + + .article-tile-small + .article-tile-small { + padding-left: .75rem; + } + + .article-tile-small.last { + padding-right: 0; + } + + .article-tile-info { + padding: 3rem 2.25rem 2.25rem 2.25rem; + } +} + +@media (min-width: 1440px) { + .article-tile-large .article-tile-info { + padding: 6.25rem; + } + + .article-tile-image { + height: 221px; + } +} + +/*# Article detail tile #*/ +.article-detail-page { + padding: 3rem 1rem; + font-size: 1.2rem; + + .article-detail { + padding: 0 2rem; + } +} + +@media (min-width: 768px) { + .article-detail-page { + padding: 3rem; + background: url(../Images/plant-3.png) right top no-repeat; + } +} + +.article-detail-datetime { + margin-bottom: 1rem; +} + +.article-detail-image { + margin-bottom: 1rem; +} + +.article-detail-content { + margin-top: 2rem; +} + +.article-detail-full-width { + margin-top: 35px; + + .article-detail-content { + margin-top: 3rem; + } + + .equal-height { + display: flex; + display: -webkit-flex; + flex-wrap: wrap; + } + + .article-title--align-middle { + display: flex; + justify-content: center; + flex-direction: column; + } +} + +@media (min-width: 1112px) { + .article-detail-full-width { + + .article-detail-image { + width: 540px; + } + + .article-title--padding { + width: 75px; + } + + .article-detail-content { + margin-left: auto; + margin-right: auto; + float: none; + } + } +} + +@media (min-width: 768px) { + .article-detail-related-box { + margin-bottom: 50px; + + .article-title--align-middle { + h2 { + margin-top: 0; + } + } + } +} + +/*# Contact info #*/ +.contact-info { + list-style-type: none; + padding: 0; +} + +/*# Pager #*/ +.pagination { + text-align: center; + padding: 0; + list-style-type: none; + + & > li { + display: inline; + + & > a { + color: black; + padding: 3px 5px; + text-decoration: none; + + &:hover, + &:focus { + border-bottom: 2px solid #E6E6E6; + } + } + + &.active { + color: @color-brown; + border: 2px solid @color-brown; + padding: 3px 9px; + } + + &.PagedList-skipToPrevious > a, + &.PagedList-skipToNext > a { + text-decoration: underline; + color: @color-brown; + border-bottom: none; + } + } +} + +/*# Not found - 404 #*/ +@media (min-width: 768px) { + .not-found-content { + margin-left: 1rem; + } +} + +/*# Home banner #*/ +.banner-section { + display: flex; + flex-direction: column; + justify-content: flex-end; + min-height: 580px; + width: 100%; + padding: 0; + background-size: cover; + background-repeat: no-repeat; + background-position-x: 60%; + text-align: left; + margin-bottom: 1rem; +} + +.banner-heading { + color: #FFFFFF; + font-weight: 700; + font-size: 3rem; + line-height: 1; + padding: 1rem; + display: inline-block; + margin-bottom: 0; +} + +.banner-text { + color: #FFF; + font-size: 1.375rem; + padding: 1.5rem; + display: block; + max-width: 31.25rem; + margin: 0; + font-weight: 400; + z-index: 1; + position: relative; +} + +.banner-link { + color: #000000; + text-decoration: none; +} + +@media (min-width: 768px) { + .banner-section { + padding: 7.5rem; + } + + .banner-heading { + font-size: 5rem; + } +} + +/*# Our story #*/ +.ourstory-section { + position: relative; + color: @color-white; + padding: 1rem 1rem 7rem 1rem; + font-size: 1.5rem; + background: @color-lightbrown; + background-image: url(../Images/plant-4.png); + background-repeat: no-repeat; + background-position: right top; + + .section-text { + font-weight: 500; + } + + .title-tab { + color: @color-white; + } + + .btn-more { + position: absolute; + bottom: 0; + left: 50%; + transform: translate(-50%, 50%); + margin: 0; + z-index: 1; + } +} + +@media (min-width: 768px) { + .ourstory-section { + padding: 3rem 3rem 7rem 3rem; + font-size: 2.25rem; + } +} + +.home-bottom-bg { + background: url(../Images/cup.png) right center no-repeat +} + +/*# About #*/ +.about-section { + padding: 3rem 0; +} + + +@media (min-width: 768px) { + .about-section { + padding: 0; + + .row--with-cols-padding { + > div[class^='col-'], > div[class*=' col-'] { + padding-top: 3rem; + padding-bottom: 3rem; + + &:first-child { + text-align: right; + } + } + } + } +} +/*# Coffees #*/ + +.coffees-page .row { + display: flex; + flex-wrap: wrap; +} + +.product-tile-wrapper { + margin-bottom: 1rem; + + .product-tile { + background: #ffffff; + text-align: center; + margin: 0.5rem; + border: 1px solid #e5e5e5; + height: 100%; + + a { + text-decoration: none; + } + + .product-heading { + text-align: center; + font-size: 1rem; + font-weight: bold; + font-family: 'Source Sans Pro', sans-serif; + z-index: 1; + display: block; + margin: auto; + width: 100%; + padding: 1.25rem; + } + + .product-tile-image { + width: 100%; + } + } +} + +.coffee-detail-page { + figure { + margin: 0 0 1.25rem 0; + text-align: center; + } + + .image { + border: 1px solid #e5e5e5; + } +} + +/*# Cafes #*/ +.cafes-page { + padding: 3rem 1rem; +} + +@media (min-width: 768px) { + .cafes-page { + padding: 3rem; + background: url(../Images/plant-3.png) right top no-repeat; + } +} + +.cafe-cards { + margin-left: 1px; + margin-top: @base-unit; + + .title-tab { + margin-top: 0; + } +} + +.no-margin { + margin: 0; +} + +.no-padding { + padding: 0px; +} +/*# Cafe tile #*/ +.cafe-tile { + background: @color-lightestbrown; + color: #FFF; + height: 200px; + overflow: hidden; +} + +.cafe-tile-address { + font-style: normal; + padding-bottom: 1rem; +} + +.cafe-tile-address-anchor, +.cafe-tile-address-anchor:hover, +.cafe-tile-address-anchor:focus, +.cafe-tile-address-anchor:active { + color: #FFF; +} + +.cafe-tile-image { + width: 100%; +} + +.cafe-tile-content { + padding: 0 1rem 1rem 1rem; + + .cafe-tile-name { + color: @color-gold; + } +} + +/*# Cafe image tile #*/ +.cafe-image-tile { + background: @color-lightbrown; + color: #FFF; +} + +.cafe-image-tile-address { + font-style: normal; + padding-bottom: 1rem; +} + +.cafe-image-tile-address-anchor, +.cafe-image-tile-address-anchor:hover, +.cafe-image-tile-address-anchor:focus, +.cafe-image-tile-address-anchor:active { + color: #FFF; +} + +.cafe-image-tile-image { + height: 200px; + max-width: 200px; + position: absolute; + bottom: 1px; +} + +.cafe-image-tile-content { + padding: 0 1rem 1rem 1rem; + + .cafe-image-tile-name { + color: @color-gold; + } +} + +@media (min-width: 400px) { + .cafe-image-tile { + height: 200px; + overflow: hidden; + } + + .cafe-image-tile-image-wrapper { + float: left; + width: 200px; + height: 100%; + overflow: hidden; + margin-right: 1rem; + } + + .cafe-image-tile-content { + padding-right: 1rem; + } +} + +@media (min-width: 768px) { /* md size */ + .cafe-image-tile { + height: 220px; + } + + .cafe-image-tile-image-wrapper { + width: 150px; + } + + .cafe-image-tile-image { + max-width: 150px; + height: auto; + } +} + +@media (min-width: 1112px) { /* lg size */ + .cafe-image-tile { + height: 200px; + } + + .cafe-image-tile-image-wrapper { + width: 200px; + } + + .cafe-image-tile-image { + height: 200px; + max-width: 200px; + } +} + +/*# Taste our coffee #*/ +.ourcoffee-tile-image { + overflow: hidden; + width: 100%; +} + +.ourcoffee-tile-text { + position: absolute; + color: @color-white; + display: block; + width: 100%; + z-index: 11; + padding: 0; + left: 0; + right: 0; + bottom: 0; + text-align: center; +} + +.ourcoffee-tile-link { + display: flex; + justify-content: center; + font-size: 0; + position: relative; + background: @color-lightbrown; + height: 300px; + margin-bottom: 1.5rem; + + img { + object-fit: cover; + object-position: 50% 0; + } +} + +.cafe-overlay { + display: block; + height: 100%; + position: absolute; + width: 100%; + z-index: 10; + background: -webkit-gradient(linear, left top, left bottom, color-stop(51.26%, rgba(0, 0, 0, 0)), to(rgba(0, 0, 0, 0.315))); + background: linear-gradient(180deg, rgba(0, 0, 0, 0) 51.26%, rgba(0, 0, 0, 0.315) 100%); +} + +@media (min-width: 768px) { + .ourcoffee-tile-link { + height: 200px; + margin-bottom: 0; + + h2 { + font-size: 2rem; + } + } +} + +@media (min-width: 1112px) { + .ourcoffee-tile-link { + height: 300px; + + h2 { + font-size: 3rem; + } + } +} + +@media (min-width: 1440px) { + .ourcoffee-tile-link { + height: 400px; + } +} + +.no-margin { + margin: 0; +} + +.no-padding { + padding: 0px; +} + +/*# Contacts page #*/ +.contacts-page { + padding: 3rem 1rem; +} + +@media (min-width: 768px) { + .contacts-page { + padding: 3rem; + background: url(../Images/plant-3.png) right top no-repeat; + } +} + +/*# Map #*/ +.map { + height: 400px; +} + +/*# Messages #*/ +.ErrorLabel, +.InfoLabel, +.error-label { + font-weight: bold; + margin-top: .3rem; + margin-bottom: .6rem; + display: block; +} + +/*# Search tile #*/ +.search-tile { + margin-bottom: 3rem; + padding: 1rem; +} + +.search-tile-badge { + background: @color-brown; + display: inline-block; + padding: 0 5px; + color: #fff; +} + +.search-tile-subtitle { + padding: .5rem 0; +} + +.search-tile-product-image img { + display: block; + width: 100%; + max-width: 100%; + height: auto; +} + +@media (min-width: 768px) { /* md size */ + .search-tile-content { + padding-left: 1rem; + } + + .search-tile-title { + margin-top: 0; + } +} + +/*# Registration #*/ + +@media (max-width: 768px) { + .signin-register .form-group-input input[type="text"], + .signin-register .form-group-input input[type="password"], + .signin-register .form-group-input input[type="email"], + .signin-register .form-group-input textarea { + width: 100% !important; + } +} + +.signin-register { + .validation-summary-errors { + ul { + margin: 0; + list-style-type: none; + padding: 0; + + li { + color: white !important; + display: block; + font-weight: bold; + text-align: left; + background-color: #D12127; + padding: 10px 12px; + margin-top: .3rem; + margin-bottom: .6rem; + } + } + } + + .input-validation-error { + border-color: #d12127 !important; + } + + .field-validation-error { + color: #d12127; + display: block; + padding-bottom: 10px; + text-align: left; + } + + h2 { + margin-top: 0; + } + + .zone-dark { + background: @color-brownbg; + padding: 1rem; + } + + .zone-light { + padding: 1rem; + } + + .separator { + line-height: 1em; + border-bottom: 2px solid #bebebe; + margin: 1rem 0; + } + + .separator:before { + position: relative; + left: 50%; + margin-left: -2.0rem; + padding: 0 0.5rem; + top: 0.5rem; + background: #E7E7E7; + } + + input[type="submit"] { + margin: .5rem 0; + } + + input[type="password"], + input[type="text"], + input[type="email"] { + height: 2.6rem; + margin-top: 0.25rem; + padding-left: 0.5rem; + padding-right: 0.5rem; + border: 2px solid #BEBEBE; + } + + .EditingFormErrorLabel { + color: #D12127; + } +} + +/*# Logon password and remember me #*/ + +.logon-remember-me-checkbox { + display: block; + + input[type="checkbox"] { + width: auto; + margin-right: 0.15rem; + } +} + +/*# Manufacturers #*/ +.manufacturer-list { + height: 80px; + + .manufacturer-item { + height: 80px; + position: relative; + + a { + position: absolute; + top: 50%; + left: 50%; + transform: translate(-50%, -50%); + } + } +} +.breadcrumbs { + .arrow { + padding-left: 20px; + padding-right: 10px; + } + + a { + text-decoration: none; + color: #1C1C1C; + + &:hover, &:active { + text-decoration: none; + } + } +} diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/TrackingConsent.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/TrackingConsent.less new file mode 100644 index 0000000..0753bbc --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/TrackingConsent.less @@ -0,0 +1,17 @@ +@import (reference) "./variables.less"; + +.cookie-consent { + font-size: @base-unit; + padding: 8px; + background: @color-darkbrownbg; + color: @color-black; + + .consent-text { + padding-bottom: 16px; + } + + .consent-buttons { + text-align: right; + margin: 0; + } +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/icons-core.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/icons-core.less new file mode 100644 index 0000000..c85ed22 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/icons-core.less @@ -0,0 +1,1417 @@ +[class^="icon-"], [class*=" icon-"] { + font-family:'Core-icons'; + display: inline-block; + speak: none; + font-style: normal; + font-weight: normal; + font-variant: normal; + text-transform: none; + line-height: 1; + font-size: @base-unit; + // Better Font Rendering in Chrome + -webkit-font-smoothing: antialiased; + -moz-osx-font-smoothing: grayscale; + background-image: none; +} +[class^="icon-"]:before { + content: @icon-square; +} +.icon-only:before { + content: none; +} +@icon-dots-vertical: "\e75d"; +@icon-chain: "\e67f"; +@icon-chain-slash: "\e691"; +@icon-list-bullets: "\e754"; +@icon-list-numbers: "\e75b"; +@icon-eye-slash: "\e75c"; +@icon-arrow-u-right: "\e703"; +@icon-arrow-u-left: "\e677"; +@icon-arrow-down: "\e682"; +@icon-arrow-up: "\e64c"; +@icon-arrow-left: "\e6dc"; +@icon-arrow-right: "\e6da"; +@icon-arrow-down-circle: "\e6ae"; +@icon-arrow-left-circle: "\e6af"; +@icon-arrow-right-circle: "\e6b1"; +@icon-arrow-up-circle: "\e6bf"; +@icon-arrow-left-rect: "\e6db"; +@icon-arrow-right-rect: "\e6d9"; +@icon-arrow-crooked-left: "\e6e0"; +@icon-arrow-crooked-right: "\e6e1"; +@icon-arrow-double-left: "\e6df"; +@icon-arrow-double-right: "\e6de"; +@icon-arrow-down-line: "\e6dd"; +@icon-arrow-up-line: "\e6d3"; +@icon-arrows: "\e6d7"; +@icon-arrows-h: "\e6d5"; +@icon-arrows-v: "\e6d4"; +@icon-magnifier: "\e657"; +@icon-magnifier-minus: "\e656"; +@icon-magnifier-plus: "\e655"; +@icon-minus: "\e73f"; +@icon-loop: "\e600"; +@icon-merge: "\e709"; +@icon-separate: "\e70a"; +@icon-scheme-circles-triangle: "\e73e"; +@icon-market: "\e68e"; +@icon-bubble-o: "\e6f3"; +@icon-bubble-times: "\e6f2"; +@icon-clapperboard: "\e636"; +@icon-collapse: "\e745"; +@icon-collapse-scheme: "\e700"; +@icon-dialog-window: "\e6ff"; +@icon-dialog-window-cogwheel: "\e71a"; +@icon-doc-ban-sign: "\e6ef"; +@icon-doc-o: "\e69c"; +@icon-doc-user: "\e714"; +@icon-expand: "\e744"; +@icon-file: "\e719"; +@icon-folder-belt: "\e715"; +@icon-folder-o: "\e68b"; +@icon-hat-moustache: "\e75a"; +@icon-key: "\e65e"; +@icon-rectangle-a: "\e61e"; +@icon-rectangle-a-o: "\e623"; +@icon-rectangle-o-h: "\e758"; +@icon-rectangle-o-v: "\e759"; +@icon-rectangle-paragraph: "\e625"; +@icon-tab: "\e6fb"; +@icon-file-pdf: "\e6a3"; +@icon-graduate-cap: "\e713"; +@icon-clipboard-list: "\e6a9"; +@icon-user-checkbox: "\e603"; +@icon-box-cart: "\e6cd"; +@icon-bubble-censored: "\e6c2"; +@icon-drawers: "\e699"; +@icon-earth: "\e698"; +@icon-form: "\e689"; +@icon-invoice: "\e660"; +@icon-mug: "\e644"; +@icon-square-dashed-line: "\e617"; +@icon-briefcase: "\e6c6"; +@icon-funnel: "\e687"; +@icon-map: "\e654"; +@icon-notebook: "\e642"; +@icon-piechart: "\e631"; +@icon-user-frame: "\e604"; +@icon-clipboard-checklist: "\e6aa"; +@icon-pictures: "\e632"; +@icon-flag: "\e68f"; +@icon-folder: "\e68d"; +@icon-folder-opened: "\e68a"; +@icon-picture: "\e633"; +@icon-bin: "\e6d0"; +@icon-bubble: "\e6c3"; +@icon-doc: "\e69f"; +@icon-doc-move: "\e69d"; +@icon-edit: "\e696"; +@icon-menu: "\e650"; +@icon-message: "\e64f"; +@icon-user: "\e605"; +@icon-monitor-broken: "\e70b"; +@icon-monitor: "\e646"; +@icon-chevron-down-line: "\e6c0"; +@icon-chevron-left-line: "\e6d6"; +@icon-chevron-right-line: "\e6e2"; +@icon-chevron-up-line: "\e6ee"; +@icon-pin-o: "\e705"; +@icon-brand-sharepoint: "\e707"; +@icon-heartshake: "\e681"; +@icon-pin: "\e71e"; +@icon-checklist: "\e61b"; +@icon-watch: "\e601"; +@icon-permission-list: "\e634"; +@icon-users: "\e602"; +@icon-brand-youtube: "\e659"; +@icon-brand-pinterest: "\e6e3"; +@icon-brand-open-id: "\e6e4"; +@icon-two-rectangles-v: "\e606"; +@icon-brand-linkedin: "\e6e5"; +@icon-two-rectangles-h: "\e607"; +@icon-brand-google-plus: "\e6e6"; +@icon-t-shirt: "\e608"; +@icon-xml-tag: "\e6e7"; +@icon-truck: "\e609"; +@icon-trophy: "\e60a"; +@icon-rss: "\e6e9"; +@icon-triangle-right: "\e60b"; +@icon-restriction-list: "\e6ea"; +@icon-translate: "\e60c"; +@icon-qr-code: "\e6eb"; +@icon-times-circle: "\e60d"; +@icon-lock-unlocked: "\e6ec"; +@icon-times: "\e60e"; +@icon-dollar-sign: "\e6ed"; +@icon-tag: "\e60f"; +@icon-tablet: "\e610"; +@icon-cb-check-disabled: "\e6f0"; +@icon-table: "\e612"; +@icon-carousel: "\e6f1"; +@icon-star-full: "\e614"; +@icon-star-semi: "\e613"; +@icon-star-empty: "\e615"; +@icon-arrows-crooked: "\e6f4"; +@icon-staging-scheme: "\e616"; +@icon-shopping-cart: "\e6f5"; +@icon-highlighter: "\e6f6"; +@icon-square-dashed: "\e618"; +@icon-cookie: "\e6f7"; +@icon-square: "\e619"; +@icon-software-package: "\e61c"; +@icon-smartphone: "\e61d"; +@icon-scissors: "\e61f"; +@icon-rotate-right: "\e620"; +@icon-rotate-left: "\e621"; +@icon-rotate-double-right: "\e622"; +@icon-ribbon: "\e624"; +@icon-rb-uncheck: "\e626"; +@icon-rb-check-sign: "\e627"; +@icon-question-circle: "\e629"; +@icon-project-scheme: "\e62b"; +@icon-process-scheme: "\e62c"; +@icon-plus-square: "\e62d"; +@icon-plus-circle: "\e62e"; +@icon-plus: "\e62f"; +@icon-placeholder: "\e630"; +@icon-perfume: "\e635"; +@icon-percent-sign: "\e638"; +@icon-pda: "\e639"; +@icon-pc: "\e63a"; +@icon-pause: "\e63b"; +@icon-parent-children-scheme: "\e63c"; +@icon-paperclip: "\e63d"; +@icon-pants: "\e63e"; +@icon-palette: "\e63f"; +@icon-organisational-scheme: "\e640"; +@icon-newspaper: "\e643"; +@icon-monitor-smartphone: "\e645"; +@icon-modal-question: "\e647"; +@icon-modal-minimize: "\e648"; +@icon-modal-maximize: "\e649"; +@icon-modal-close: "\e64a"; +@icon-minus-circle: "\e64b"; +@icon-microphone: "\e64d"; +@icon-messages: "\e64e"; +@icon-media-player: "\e651"; +@icon-mask: "\e652"; +@icon-map-marker: "\e653"; +@icon-lock: "\e658"; +@icon-life-belt: "\e65a"; +@icon-laptop: "\e65d"; +@icon-kentico: "\e65f"; +@icon-integration-scheme: "\e661"; +@icon-i-circle: "\e664"; +@icon-chevron-up-square: "\e665"; +@icon-chevron-up-circle: "\e666"; +@icon-chevron-up: "\e667"; +@icon-chevron-right-square: "\e668"; +@icon-chevron-right: "\e669"; +@icon-chevron-left-square: "\e66a"; +@icon-chevron-left-circle: "\e66b"; +@icon-chevron-left: "\e66c"; +@icon-chevron-down-square: "\e66d"; +@icon-chevron-down-circle: "\e66e"; +@icon-chevron-down: "\e66f"; +@icon-chevron-double-up: "\e670"; +@icon-chevron-double-right: "\e671"; +@icon-chevron-double-left: "\e672"; +@icon-chevron-double-down: "\e673"; +@icon-checklist2: "\e674"; +@icon-check-circle: "\e675"; +@icon-check: "\e676"; +@icon-tags: "\e678"; +@icon-shoe-women: "\e679"; +@icon-printer: "\e67a"; +@icon-parent-child-scheme: "\e67b"; +@icon-minus-square: "\e67c"; +@icon-light-bulb: "\e67d"; +@icon-chevron-right-circle: "\e67e"; +@icon-home: "\e680"; +@icon-half-arrows-right-left: "\e683"; +@icon-graph: "\e684"; +@icon-factory: "\e690"; +@icon-exclamation-triangle: "\e693"; +@icon-ellipsis: "\e694"; +@icon-ekg-line: "\e695"; +@icon-doc-paste: "\e69a"; +@icon-doc-copy: "\e69e"; +@icon-database: "\e6a0"; +@icon-cup: "\e6a2"; +@icon-compass: "\e6a4"; +@icon-cogwheel-square: "\e6a5"; +@icon-cogwheels: "\e6a6"; +@icon-cogwheel: "\e6a7"; +@icon-circle-square: "\e6ab"; +@icon-circle: "\e6ac"; +@icon-cb-uncheck: "\e6ad"; +@icon-cb-check-sign: "\e6b0"; +@icon-caret-up: "\e6b2"; +@icon-caret-right-down: "\e6b3"; +@icon-caret-right: "\e6b4"; +@icon-caret-left: "\e6b5"; +@icon-caret-down: "\e6b6"; +@icon-camera: "\e6b7"; +@icon-calendar-number: "\e6b8"; +@icon-calendar: "\e6b9"; +@icon-bullseye: "\e6ba"; +@icon-building-block: "\e6bb"; +@icon-building: "\e6bc"; +@icon-bug: "\e6bd"; +@icon-bucket-shovel: "\e6be"; +@icon-bubbles: "\e6c1"; +@icon-brush: "\e6c4"; +@icon-broom: "\e6c5"; +@icon-brand-twitter: "\e6c7"; +@icon-brand-google: "\e6c8"; +@icon-brand-facebook: "\e6c9"; +@icon-brand-bing: "\e6ca"; +@icon-braces: "\e6cb"; +@icon-boxes: "\e6cc"; +@icon-box: "\e6ce"; +@icon-ban-sign: "\e6d1"; +@icon-badge: "\e6d2"; +@icon-arrow-right-top-square: "\e6d8"; +@icon-breadcrumb: "\e6f9"; +@icon-clock: "\e6a8"; +@icon-cloud: "\e701"; +@icon-cb-check-preview: "\e702"; +@icon-accordion: "\e704"; +@icon-two-squares-line: "\e706"; +@icon-money-bill: "\e708"; +@icon-puzzle: "\e62a"; +@icon-wizard-stick: "\e6fa"; +@icon-lines-rectangle-o: "\e6fd"; +@icon-doc-arrows: "\e6fe"; +@icon-l-text-col: "\e685"; +@icon-l-menu-text-col: "\e69b"; +@icon-l-menu-cols-3: "\e6e8"; +@icon-l-logotype-menu-v-col: "\e6fc"; +@icon-l-logotype-menu-h-col: "\e70c"; +@icon-l-header-cols-3-footer: "\e70d"; +@icon-l-cols-80-20: "\e70e"; +@icon-l-cols-20-80: "\e70f"; +@icon-l-cols-4: "\e710"; +@icon-l-cols-3: "\e711"; +@icon-l-cols-2: "\e712"; +@icon-bezier-scheme: "\e717"; +@icon-note: "\e71c"; +@icon-piechart-lines: "\e71d"; +@icon-l-article-map: "\e721"; +@icon-l-calendar-number-article: "\e722"; +@icon-l-forms-2: "\e723"; +@icon-l-header-cols-2-footer: "\e724"; +@icon-l-header-list-img: "\e725"; +@icon-l-header-menu-text: "\e726"; +@icon-l-header-text: "\e727"; +@icon-l-list-article: "\e728"; +@icon-l-lightbox: "\e729"; +@icon-l-img-3-cols-3: "\e72a"; +@icon-l-img-2-cols-3: "\e72b"; +@icon-l-text: "\e72c"; +@icon-l-rows-4: "\e72d"; +@icon-l-rows-3: "\e72e"; +@icon-l-rows-2: "\e72f"; +@icon-l-menu-text-col-bottom: "\e730"; +@icon-l-menu-text: "\e731"; +@icon-l-menu-list-img-col: "\e732"; +@icon-l-menu-list-img: "\e733"; +@icon-l-menu-list: "\e734"; +@icon-l-menu-cols-2: "\e735"; +@icon-l-logotype-menu-col-footer: "\e736"; +@icon-l-list-title: "\e737"; +@icon-l-list-img-article: "\e738"; +@icon-l-list-article-col: "\e739"; +@icon-tree-structure: "\e73a"; +@icon-vb: "\e716"; +@icon-crosshair-o: "\e71b"; +@icon-crosshair-f: "\e71f"; +@icon-caret-right-aligned-left: "\e720"; +@icon-caret-left-aligned-right: "\e73b"; +@icon-gauge: "\e686"; +@icon-c-sharp: "\e718"; +@icon-tab-vertical: "\e73c"; +@icon-right-double-quotation-mark: "\e73d"; +@icon-braces-octothorpe: "\e740"; +@icon-outdent: "\e741"; +@icon-indent: "\e742"; +@icon-i: "\e743"; +@icon-b: "\e746"; +@icon-u: "\e747"; +@icon-s: "\e748"; +@icon-x: "\e749"; +@icon-t-f: "\e74a"; +@icon-t: "\e74b"; +@icon-parent-child-scheme-2: "\e74c"; +@icon-parent-child-scheme2: "\e74d"; +@icon-doc-torn: "\e750"; +@icon-f: "\e74e"; +@icon-a-lowercase: "\e74f"; +@icon-circle-slashed: "\e751"; +@icon-one: "\e752"; +@icon-diamond: "\e756"; +@icon-choice-user-scheme: "\e753"; +@icon-choice-single-scheme: "\e755"; +@icon-choice-multi-scheme: "\e757"; +@icon-book-opened: "\e6cf"; +@icon-e-book: "\e697"; +@icon-spinner: "\e61a"; +@icon-layouts: "\e65b"; +@icon-layout: "\e65c"; +@icon-id-card: "\e663"; +@icon-id-cards: "\e662"; +@icon-l-grid-3-2: "\e611"; +@icon-l-grid-2-2: "\e628"; +@icon-l-cols-70-30: "\e637"; +@icon-l-cols-30-70: "\e641"; +@icon-l-cols-25-50-25: "\e688"; +@icon-l-cols-20-60-20: "\e6a1"; +@icon-eye: "\e692"; +@icon-list: "\e6f8"; +@icon-folder-clock: "\e68c"; + +.icon-dots-vertical:before {content: @icon-dots-vertical; } +.icon-chain:before {content: @icon-chain; } +.icon-chain-slash:before {content: @icon-chain-slash; } +.icon-list-bullets:before {content: @icon-list-bullets; } +.icon-list-numbers:before {content: @icon-list-numbers; } +.icon-eye-slash:before {content: @icon-eye-slash; } +.icon-arrow-u-right:before {content: @icon-arrow-u-right; } +.icon-arrow-u-left:before {content: @icon-arrow-u-left; } +.icon-arrow-down:before {content: @icon-arrow-down; } +.icon-arrow-up:before {content: @icon-arrow-up; } +.icon-arrow-left:before {content: @icon-arrow-left; } +.icon-arrow-right:before {content: @icon-arrow-right; } +.icon-arrow-down-circle:before {content: @icon-arrow-down-circle; } +.icon-arrow-left-circle:before {content: @icon-arrow-left-circle; } +.icon-arrow-right-circle:before {content: @icon-arrow-right-circle; } +.icon-arrow-up-circle:before {content: @icon-arrow-up-circle; } +.icon-arrow-left-rect:before {content: @icon-arrow-left-rect; } +.icon-arrow-right-rect:before {content: @icon-arrow-right-rect; } +.icon-arrow-crooked-left:before {content: @icon-arrow-crooked-left; } +.icon-arrow-crooked-right:before {content: @icon-arrow-crooked-right; } +.icon-arrow-double-left:before {content: @icon-arrow-double-left; } +.icon-arrow-double-right:before {content: @icon-arrow-double-right; } +.icon-arrow-down-line:before {content: @icon-arrow-down-line; } +.icon-arrow-up-line:before {content: @icon-arrow-up-line; } +.icon-arrows:before {content: @icon-arrows; } +.icon-arrows-h:before {content: @icon-arrows-h; } +.icon-arrows-v:before {content: @icon-arrows-v; } +.icon-magnifier:before {content: @icon-magnifier; } +.icon-magnifier-minus:before {content: @icon-magnifier-minus; } +.icon-magnifier-plus:before {content: @icon-magnifier-plus; } +.icon-minus:before {content: @icon-minus; } +.icon-loop:before {content: @icon-loop; } +.icon-merge:before {content: @icon-merge; } +.icon-separate:before {content: @icon-separate; } +.icon-scheme-circles-triangle:before {content: @icon-scheme-circles-triangle; } +.icon-market:before {content: @icon-market; } +.icon-bubble-o:before {content: @icon-bubble-o; } +.icon-bubble-times:before {content: @icon-bubble-times; } +.icon-clapperboard:before {content: @icon-clapperboard; } +.icon-collapse:before {content: @icon-collapse; } +.icon-collapse-scheme:before {content: @icon-collapse-scheme; } +.icon-dialog-window:before {content: @icon-dialog-window; } +.icon-dialog-window-cogwheel:before {content: @icon-dialog-window-cogwheel; } +.icon-doc-ban-sign:before {content: @icon-doc-ban-sign; } +.icon-doc-o:before {content: @icon-doc-o; } +.icon-doc-user:before {content: @icon-doc-user; } +.icon-expand:before {content: @icon-expand; } +.icon-file:before {content: @icon-file; } +.icon-folder-belt:before {content: @icon-folder-belt; } +.icon-folder-o:before {content: @icon-folder-o; } +.icon-hat-moustache:before {content: @icon-hat-moustache; } +.icon-key:before {content: @icon-key; } +.icon-rectangle-a:before {content: @icon-rectangle-a; } +.icon-rectangle-a-o:before {content: @icon-rectangle-a-o; } +.icon-rectangle-o-h:before {content: @icon-rectangle-o-h; } +.icon-rectangle-o-v:before {content: @icon-rectangle-o-v; } +.icon-rectangle-paragraph:before {content: @icon-rectangle-paragraph; } +.icon-tab:before {content: @icon-tab; } +.icon-file-pdf:before {content: @icon-file-pdf; } +.icon-graduate-cap:before {content: @icon-graduate-cap; } +.icon-clipboard-list:before {content: @icon-clipboard-list; } +.icon-user-checkbox:before {content: @icon-user-checkbox; } +.icon-box-cart:before {content: @icon-box-cart; } +.icon-bubble-censored:before {content: @icon-bubble-censored; } +.icon-drawers:before {content: @icon-drawers; } +.icon-earth:before {content: @icon-earth; } +.icon-form:before {content: @icon-form; } +.icon-invoice:before {content: @icon-invoice; } +.icon-mug:before {content: @icon-mug; } +.icon-square-dashed-line:before {content: @icon-square-dashed-line; } +.icon-briefcase:before {content: @icon-briefcase; } +.icon-funnel:before {content: @icon-funnel; } +.icon-map:before {content: @icon-map; } +.icon-notebook:before {content: @icon-notebook; } +.icon-piechart:before {content: @icon-piechart; } +.icon-user-frame:before {content: @icon-user-frame; } +.icon-clipboard-checklist:before {content: @icon-clipboard-checklist; } +.icon-pictures:before {content: @icon-pictures; } +.icon-flag:before {content: @icon-flag; } +.icon-folder:before {content: @icon-folder; } +.icon-folder-opened:before {content: @icon-folder-opened; } +.icon-picture:before {content: @icon-picture; } +.icon-bin:before {content: @icon-bin; } +.icon-bubble:before {content: @icon-bubble; } +.icon-doc:before {content: @icon-doc; } +.icon-doc-move:before {content: @icon-doc-move; } +.icon-edit:before {content: @icon-edit; } +.icon-menu:before {content: @icon-menu; } +.icon-message:before {content: @icon-message; } +.icon-user:before {content: @icon-user; } +.icon-monitor-broken:before {content: @icon-monitor-broken; } +.icon-monitor:before {content: @icon-monitor; } +.icon-chevron-down-line:before {content: @icon-chevron-down-line; } +.icon-chevron-left-line:before {content: @icon-chevron-left-line; } +.icon-chevron-right-line:before {content: @icon-chevron-right-line; } +.icon-chevron-up-line:before {content: @icon-chevron-up-line; } +.icon-pin-o:before {content: @icon-pin-o; } +.icon-brand-sharepoint:before {content: @icon-brand-sharepoint; } +.icon-heartshake:before {content: @icon-heartshake; } +.icon-pin:before {content: @icon-pin; } +.icon-checklist:before {content: @icon-checklist; } +.icon-watch:before {content: @icon-watch; } +.icon-permission-list:before {content: @icon-permission-list; } +.icon-users:before {content: @icon-users; } +.icon-brand-youtube:before {content: @icon-brand-youtube; } +.icon-brand-pinterest:before {content: @icon-brand-pinterest; } +.icon-brand-open-id:before {content: @icon-brand-open-id; } +.icon-two-rectangles-v:before {content: @icon-two-rectangles-v; } +.icon-brand-linkedin:before {content: @icon-brand-linkedin; } +.icon-two-rectangles-h:before {content: @icon-two-rectangles-h; } +.icon-brand-google-plus:before {content: @icon-brand-google-plus; } +.icon-t-shirt:before {content: @icon-t-shirt; } +.icon-xml-tag:before {content: @icon-xml-tag; } +.icon-truck:before {content: @icon-truck; } +.icon-trophy:before {content: @icon-trophy; } +.icon-rss:before {content: @icon-rss; } +.icon-triangle-right:before {content: @icon-triangle-right; } +.icon-restriction-list:before {content: @icon-restriction-list; } +.icon-translate:before {content: @icon-translate; } +.icon-qr-code:before {content: @icon-qr-code; } +.icon-times-circle:before {content: @icon-times-circle; } +.icon-lock-unlocked:before {content: @icon-lock-unlocked; } +.icon-times:before {content: @icon-times; } +.icon-dollar-sign:before {content: @icon-dollar-sign; } +.icon-tag:before {content: @icon-tag; } +.icon-tablet:before {content: @icon-tablet; } +.icon-cb-check-disabled:before {content: @icon-cb-check-disabled; } +.icon-table:before {content: @icon-table; } +.icon-carousel:before {content: @icon-carousel; } +.icon-star-full:before {content: @icon-star-full; } +.icon-star-semi:before {content: @icon-star-semi; } +.icon-star-empty:before {content: @icon-star-empty; } +.icon-arrows-crooked:before {content: @icon-arrows-crooked; } +.icon-staging-scheme:before {content: @icon-staging-scheme; } +.icon-shopping-cart:before {content: @icon-shopping-cart; } +.icon-highlighter:before {content: @icon-highlighter; } +.icon-square-dashed:before {content: @icon-square-dashed; } +.icon-cookie:before {content: @icon-cookie; } +.icon-square:before {content: @icon-square; } +.icon-software-package:before {content: @icon-software-package; } +.icon-smartphone:before {content: @icon-smartphone; } +.icon-scissors:before {content: @icon-scissors; } +.icon-rotate-right:before {content: @icon-rotate-right; } +.icon-rotate-left:before {content: @icon-rotate-left; } +.icon-rotate-double-right:before {content: @icon-rotate-double-right; } +.icon-ribbon:before {content: @icon-ribbon; } +.icon-rb-uncheck:before {content: @icon-rb-uncheck; } +.icon-rb-check-sign:before {content: @icon-rb-check-sign; } +.icon-question-circle:before {content: @icon-question-circle; } +.icon-project-scheme:before {content: @icon-project-scheme; } +.icon-process-scheme:before {content: @icon-process-scheme; } +.icon-plus-square:before {content: @icon-plus-square; } +.icon-plus-circle:before {content: @icon-plus-circle; } +.icon-plus:before {content: @icon-plus; } +.icon-placeholder:before {content: @icon-placeholder; } +.icon-perfume:before {content: @icon-perfume; } +.icon-percent-sign:before {content: @icon-percent-sign; } +.icon-pda:before {content: @icon-pda; } +.icon-pc:before {content: @icon-pc; } +.icon-pause:before {content: @icon-pause; } +.icon-parent-children-scheme:before {content: @icon-parent-children-scheme; } +.icon-paperclip:before {content: @icon-paperclip; } +.icon-pants:before {content: @icon-pants; } +.icon-palette:before {content: @icon-palette; } +.icon-organisational-scheme:before {content: @icon-organisational-scheme; } +.icon-newspaper:before {content: @icon-newspaper; } +.icon-monitor-smartphone:before {content: @icon-monitor-smartphone; } +.icon-modal-question:before {content: @icon-modal-question; } +.icon-modal-minimize:before {content: @icon-modal-minimize; } +.icon-modal-maximize:before {content: @icon-modal-maximize; } +.icon-modal-close:before {content: @icon-modal-close; } +.icon-minus-circle:before {content: @icon-minus-circle; } +.icon-microphone:before {content: @icon-microphone; } +.icon-messages:before {content: @icon-messages; } +.icon-media-player:before {content: @icon-media-player; } +.icon-mask:before {content: @icon-mask; } +.icon-map-marker:before {content: @icon-map-marker; } +.icon-lock:before {content: @icon-lock; } +.icon-life-belt:before {content: @icon-life-belt; } +.icon-laptop:before {content: @icon-laptop; } +.icon-kentico:before {content: @icon-kentico; } +.icon-integration-scheme:before {content: @icon-integration-scheme; } +.icon-i-circle:before {content: @icon-i-circle; } +.icon-chevron-up-square:before {content: @icon-chevron-up-square; } +.icon-chevron-up-circle:before {content: @icon-chevron-up-circle; } +.icon-chevron-up:before {content: @icon-chevron-up; } +.icon-chevron-right-square:before {content: @icon-chevron-right-square; } +.icon-chevron-right:before {content: @icon-chevron-right; } +.icon-chevron-left-square:before {content: @icon-chevron-left-square; } +.icon-chevron-left-circle:before {content: @icon-chevron-left-circle; } +.icon-chevron-left:before {content: @icon-chevron-left; } +.icon-chevron-down-square:before {content: @icon-chevron-down-square; } +.icon-chevron-down-circle:before {content: @icon-chevron-down-circle; } +.icon-chevron-down:before {content: @icon-chevron-down; } +.icon-chevron-double-up:before {content: @icon-chevron-double-up; } +.icon-chevron-double-right:before {content: @icon-chevron-double-right; } +.icon-chevron-double-left:before {content: @icon-chevron-double-left; } +.icon-chevron-double-down:before {content: @icon-chevron-double-down; } +.icon-checklist2:before {content: @icon-checklist2; } +.icon-check-circle:before {content: @icon-check-circle; } +.icon-check:before {content: @icon-check; } +.icon-tags:before {content: @icon-tags; } +.icon-shoe-women:before {content: @icon-shoe-women; } +.icon-printer:before {content: @icon-printer; } +.icon-parent-child-scheme:before {content: @icon-parent-child-scheme; } +.icon-minus-square:before {content: @icon-minus-square; } +.icon-light-bulb:before {content: @icon-light-bulb; } +.icon-chevron-right-circle:before {content: @icon-chevron-right-circle; } +.icon-home:before {content: @icon-home; } +.icon-half-arrows-right-left:before {content: @icon-half-arrows-right-left; } +.icon-graph:before {content: @icon-graph; } +.icon-factory:before {content: @icon-factory; } +.icon-exclamation-triangle:before {content: @icon-exclamation-triangle; } +.icon-ellipsis:before {content: @icon-ellipsis; } +.icon-ekg-line:before {content: @icon-ekg-line; } +.icon-doc-paste:before {content: @icon-doc-paste; } +.icon-doc-copy:before {content: @icon-doc-copy; } +.icon-database:before {content: @icon-database; } +.icon-cup:before {content: @icon-cup; } +.icon-compass:before {content: @icon-compass; } +.icon-cogwheel-square:before {content: @icon-cogwheel-square; } +.icon-cogwheels:before {content: @icon-cogwheels; } +.icon-cogwheel:before {content: @icon-cogwheel; } +.icon-circle-square:before {content: @icon-circle-square; } +.icon-circle:before {content: @icon-circle; } +.icon-cb-uncheck:before {content: @icon-cb-uncheck; } +.icon-cb-check-sign:before {content: @icon-cb-check-sign; } +.icon-caret-up:before {content: @icon-caret-up; } +.icon-caret-right-down:before {content: @icon-caret-right-down; } +.icon-caret-right:before {content: @icon-caret-right; } +.icon-caret-left:before {content: @icon-caret-left; } +.icon-caret-down:before {content: @icon-caret-down; } +.icon-camera:before {content: @icon-camera; } +.icon-calendar-number:before {content: @icon-calendar-number; } +.icon-calendar:before {content: @icon-calendar; } +.icon-bullseye:before {content: @icon-bullseye; } +.icon-building-block:before {content: @icon-building-block; } +.icon-building:before {content: @icon-building; } +.icon-bug:before {content: @icon-bug; } +.icon-bucket-shovel:before {content: @icon-bucket-shovel; } +.icon-bubbles:before {content: @icon-bubbles; } +.icon-brush:before {content: @icon-brush; } +.icon-broom:before {content: @icon-broom; } +.icon-brand-twitter:before {content: @icon-brand-twitter; } +.icon-brand-google:before {content: @icon-brand-google; } +.icon-brand-facebook:before {content: @icon-brand-facebook; } +.icon-brand-bing:before {content: @icon-brand-bing; } +.icon-braces:before {content: @icon-braces; } +.icon-boxes:before {content: @icon-boxes; } +.icon-box:before {content: @icon-box; } +.icon-ban-sign:before {content: @icon-ban-sign; } +.icon-badge:before {content: @icon-badge; } +.icon-arrow-right-top-square:before {content: @icon-arrow-right-top-square; } +.icon-breadcrumb:before {content: @icon-breadcrumb; } +.icon-clock:before {content: @icon-clock; } +.icon-cloud:before {content: @icon-cloud; } +.icon-cb-check-preview:before {content: @icon-cb-check-preview; } +.icon-accordion:before {content: @icon-accordion; } +.icon-two-squares-line:before {content: @icon-two-squares-line; } +.icon-money-bill:before {content: @icon-money-bill; } +.icon-puzzle:before {content: @icon-puzzle; } +.icon-wizard-stick:before {content: @icon-wizard-stick; } +.icon-lines-rectangle-o:before {content: @icon-lines-rectangle-o; } +.icon-doc-arrows:before {content: @icon-doc-arrows; } +.icon-l-text-col:before {content: @icon-l-text-col; } +.icon-l-menu-text-col:before {content: @icon-l-menu-text-col; } +.icon-l-menu-cols-3:before {content: @icon-l-menu-cols-3; } +.icon-l-logotype-menu-v-col:before {content: @icon-l-logotype-menu-v-col; } +.icon-l-logotype-menu-h-col:before {content: @icon-l-logotype-menu-h-col; } +.icon-l-header-cols-3-footer:before {content: @icon-l-header-cols-3-footer; } +.icon-l-cols-80-20:before {content: @icon-l-cols-80-20; } +.icon-l-cols-20-80:before {content: @icon-l-cols-20-80; } +.icon-l-cols-4:before {content: @icon-l-cols-4; } +.icon-l-cols-3:before {content: @icon-l-cols-3; } +.icon-l-cols-2:before {content: @icon-l-cols-2; } +.icon-bezier-scheme:before {content: @icon-bezier-scheme; } +.icon-note:before {content: @icon-note; } +.icon-piechart-lines:before {content: @icon-piechart-lines; } +.icon-l-article-map:before {content: @icon-l-article-map; } +.icon-l-calendar-number-article:before {content: @icon-l-calendar-number-article; } +.icon-l-forms-2:before {content: @icon-l-forms-2; } +.icon-l-header-cols-2-footer:before {content: @icon-l-header-cols-2-footer; } +.icon-l-header-list-img:before {content: @icon-l-header-list-img; } +.icon-l-header-menu-text:before {content: @icon-l-header-menu-text; } +.icon-l-header-text:before {content: @icon-l-header-text; } +.icon-l-list-article:before {content: @icon-l-list-article; } +.icon-l-lightbox:before {content: @icon-l-lightbox; } +.icon-l-img-3-cols-3:before {content: @icon-l-img-3-cols-3; } +.icon-l-img-2-cols-3:before {content: @icon-l-img-2-cols-3; } +.icon-l-text:before {content: @icon-l-text; } +.icon-l-rows-4:before {content: @icon-l-rows-4; } +.icon-l-rows-3:before {content: @icon-l-rows-3; } +.icon-l-rows-2:before {content: @icon-l-rows-2; } +.icon-l-menu-text-col-bottom:before {content: @icon-l-menu-text-col-bottom; } +.icon-l-menu-text:before {content: @icon-l-menu-text; } +.icon-l-menu-list-img-col:before {content: @icon-l-menu-list-img-col; } +.icon-l-menu-list-img:before {content: @icon-l-menu-list-img; } +.icon-l-menu-list:before {content: @icon-l-menu-list; } +.icon-l-menu-cols-2:before {content: @icon-l-menu-cols-2; } +.icon-l-logotype-menu-col-footer:before {content: @icon-l-logotype-menu-col-footer; } +.icon-l-list-title:before {content: @icon-l-list-title; } +.icon-l-list-img-article:before {content: @icon-l-list-img-article; } +.icon-l-list-article-col:before {content: @icon-l-list-article-col; } +.icon-tree-structure:before {content: @icon-tree-structure; } +.icon-vb:before {content: @icon-vb; } +.icon-crosshair-o:before {content: @icon-crosshair-o; } +.icon-crosshair-f:before {content: @icon-crosshair-f; } +.icon-caret-right-aligned-left:before {content: @icon-caret-right-aligned-left; } +.icon-caret-left-aligned-right:before {content: @icon-caret-left-aligned-right; } +.icon-gauge:before {content: @icon-gauge; } +.icon-c-sharp:before {content: @icon-c-sharp; } +.icon-tab-vertical:before {content: @icon-tab-vertical; } +.icon-right-double-quotation-mark:before {content: @icon-right-double-quotation-mark; } +.icon-braces-octothorpe:before {content: @icon-braces-octothorpe; } +.icon-outdent:before {content: @icon-outdent; } +.icon-indent:before {content: @icon-indent; } +.icon-i:before {content: @icon-i; } +.icon-b:before {content: @icon-b; } +.icon-u:before {content: @icon-u; } +.icon-s:before {content: @icon-s; } +.icon-x:before {content: @icon-x; } +.icon-t-f:before {content: @icon-t-f; } +.icon-t:before {content: @icon-t; } +.icon-parent-child-scheme-2:before {content: @icon-parent-child-scheme-2; } +.icon-parent-child-scheme2:before {content: @icon-parent-child-scheme2; } +.icon-doc-torn:before {content: @icon-doc-torn; } +.icon-f:before {content: @icon-f; } +.icon-a-lowercase:before {content: @icon-a-lowercase; } +.icon-circle-slashed:before {content: @icon-circle-slashed; } +.icon-one:before {content: @icon-one; } +.icon-diamond:before {content: @icon-diamond; } +.icon-choice-user-scheme:before {content: @icon-choice-user-scheme; } +.icon-choice-single-scheme:before {content: @icon-choice-single-scheme; } +.icon-choice-multi-scheme:before {content: @icon-choice-multi-scheme; } +.icon-book-opened:before {content: @icon-book-opened; } +.icon-e-book:before {content: @icon-e-book; } +.icon-spinner:before {content: @icon-spinner; } +.icon-layouts:before {content: @icon-layouts; } +.icon-layout:before {content: @icon-layout; } +.icon-id-card:before {content: @icon-id-card; } +.icon-id-cards:before {content: @icon-id-cards; } +.icon-l-grid-3-2:before {content: @icon-l-grid-3-2; } +.icon-l-grid-2-2:before {content: @icon-l-grid-2-2; } +.icon-l-cols-70-30:before {content: @icon-l-cols-70-30; } +.icon-l-cols-30-70:before {content: @icon-l-cols-30-70; } +.icon-l-cols-25-50-25:before {content: @icon-l-cols-25-50-25; } +.icon-l-cols-20-60-20:before {content: @icon-l-cols-20-60-20; } +.icon-eye:before {content: @icon-eye; } +.icon-list:before {content: @icon-list; } +.icon-folder-clock:before {content: @icon-folder-clock; } + +.icon-app-default:before { content: @icon-square-dashed; } +.icon-app-blogs:before { content: @icon-notebook; } +.icon-app-content:before { content: @icon-book-opened; } +.icon-app-content-dashboard:before { content: @icon-gauge; } +.icon-app-file-import:before { content: @icon-arrow-left-rect; } +.icon-app-forms:before { content: @icon-form; } +.icon-app-checked-out:before { content: @icon-briefcase; } +.icon-app-media:before { content: @icon-pictures; } +.icon-app-my-blogs:before { content: @icon-notebook; } +.icon-app-my-documents:before { content: @icon-briefcase; } +.icon-app-outdated:before { content: @icon-briefcase; } +.icon-app-pending:before { content: @icon-briefcase; } +.icon-app-polls:before { content: @icon-clipboard-checklist; } +.icon-app-recent:before { content: @icon-briefcase; } +.icon-app-translations:before { content: @icon-earth; } +.icon-app-activities:before { content: @icon-ekg-line; } +.icon-app-banners:before { content: @icon-ribbon; } +.icon-app-campaigns:before { content: @icon-bullseye; } +.icon-app-contacts:before { content: @icon-id-card; } +.icon-app-contact-groups:before { content: @icon-id-cards; } +.icon-app-conversions:before { content: @icon-half-arrows-right-left; } +.icon-app-marketing-dashboard:before { content: @icon-gauge; } +.icon-app-marketing-reports:before { content: @icon-graph; } +.icon-app-newsletters:before { content: @icon-message; } +.icon-app-processes:before { content: @icon-process-scheme; } +.icon-app-scoring:before { content: @icon-funnel; } +.icon-app-web-analytics:before { content: @icon-piechart; } +.icon-app-ab-test:before { content: @icon-two-squares-line; } +.icon-app-mvt:before { content: @icon-layout; } +.icon-app-catalog-discounts:before { content: @icon-percent-sign; } +.icon-app-customers:before { content: @icon-user-frame; } +.icon-app-ecommerce-dashboard:before { content: @icon-gauge; } +.icon-app-ecommerce-reports:before { content: @icon-graph; } +.icon-app-free-shipping-offers:before { content: @icon-percent-sign; } +.icon-app-manufacturers:before { content: @icon-factory; } +.icon-app-order-discounts:before { content: @icon-percent-sign; } +.icon-app-orders:before { content: @icon-invoice; } +.icon-app-product-coupons:before { content: @icon-percent-sign; } +.icon-app-product-options:before { content: @icon-boxes; } +.icon-app-products:before { content: @icon-box; } +.icon-app-suppliers:before { content: @icon-box-cart; } +.icon-app-abuse-reports:before { content: @icon-restriction-list; } +.icon-app-avatars:before { content: @icon-mask; } +.icon-app-bad-words:before { content: @icon-bubble-censored; } +.icon-app-badges:before { content: @icon-badge; } +.icon-app-events:before { content: @icon-calendar-number; } +.icon-app-facebook:before { content: @icon-brand-facebook; } +.icon-app-forums:before { content: @icon-bubbles; } +.icon-app-groups:before { content: @icon-users; } +.icon-app-chat:before { content: @icon-bubble; } +.icon-app-message-boards:before { content: @icon-bubbles; } +.icon-app-messages:before { content: @icon-messages; } +.icon-app-my-projects:before { content: @icon-project-scheme; } +.icon-app-projects:before { content: @icon-project-scheme; } +.icon-app-api-examples:before { content: @icon-cogwheels; } +.icon-app-classes:before { content: @icon-braces; } +.icon-app-css-stylesheets:before { content: @icon-palette; } +.icon-app-custom-tables:before { content: @icon-table; } +.icon-app-database-objects:before { content: @icon-database; } +.icon-app-device-profiles:before { content: @icon-monitor-smartphone; } +.icon-app-document-types:before { content: @icon-doc; } +.icon-app-email-templates:before { content: @icon-message; } +.icon-app-form-controls:before { content: @icon-form; } +.icon-app-inline-controls:before { content: @icon-form; } +.icon-app-javascript-files:before { content: @icon-braces; } +.icon-app-macro-rules:before { content: @icon-braces-octothorpe; } +.icon-app-modules:before { content: @icon-puzzle; } +.icon-app-notifications:before { content: @icon-flag; } +.icon-app-page-layouts:before { content: @icon-layout; } +.icon-app-page-templates:before { content: @icon-layout; } +.icon-app-web-part-containers:before { content: @icon-square-dashed-line; } +.icon-app-web-parts:before { content: @icon-building-block; } +.icon-app-web-templates:before { content: @icon-layout; } +.icon-app-widgets:before { content: @icon-cogwheel-square; } +.icon-app-banned-ips:before { content: @icon-restriction-list; } +.icon-app-categories:before { content: @icon-drawers; } +.icon-app-content-reports:before { content: @icon-cogwheel; } +.icon-app-countries:before { content: @icon-map-marker; } +.icon-app-ecommerce-configuration:before { content: @icon-cogwheel; } +.icon-app-email-queue:before { content: @icon-messages; } +.icon-app-event-log:before { content: @icon-clipboard-list; } +.icon-app-integration-bus:before { content: @icon-integration-scheme; } +.icon-app-localization:before { content: @icon-earth; } +.icon-app-membership:before { content: @icon-id-card; } +.icon-app-marketing-configuration:before { content: @icon-cogwheel; } +.icon-app-permissions:before { content: @icon-permission-list; } +.icon-app-recycle-bin:before { content: @icon-bin; } +.icon-app-relationship-names:before { content: @icon-chain; } +.icon-app-roles:before { content: @icon-user-checkbox; } +.icon-app-search-engines:before { content: @icon-magnifier; } +.icon-app-settings:before { content: @icon-cogwheel; } +.icon-app-scheduled-tasks:before { content: @icon-folder-clock; } +.icon-app-sites:before { content: @icon-layouts; } +.icon-app-smart-search:before { content: @icon-magnifier; } +.icon-app-smtp-servers:before { content: @icon-message; } +.icon-app-staging:before { content: @icon-staging-scheme; } +.icon-app-system:before { content: @icon-circle-square; } +.icon-app-tag-groups:before { content: @icon-tags; } +.icon-app-time-zones:before { content: @icon-clock; } +.icon-app-translation-services:before { content: @icon-translate; } +.icon-app-ui-personalization:before { content: @icon-layout; } +.icon-app-users:before { content: @icon-users; } +.icon-app-web-farm:before { content: @icon-parent-children-scheme; } +.icon-app-workflows:before { content: @icon-diamond; } +.icon-app-personas:before { content: @icon-hat-moustache; } +.icon-app-unit-tests:before { content: @icon-checklist; } +.icon-app-licenses:before { content: @icon-key; } +.icon-app-my-profile:before { content: @icon-user; } +.icon-app-debug:before { content: @icon-bug; } +.icon-app-twitter:before { content: @icon-brand-twitter; } +.icon-app-continuous-integration:before { content: @icon-loop; } + +.icon-googletranslator:before { content: @icon-brand-google; } +.icon-microsofttranslator:before { content: @icon-brand-bing; } + +.icon-external-link:before { content: @icon-arrow-right-top-square; } +.icon-mvc:before { content: @icon-scheme-circles-triangle; } + +.icon-w-webpart-default:before { content: @icon-building-block; } +.icon-w-widget-default:before { content: @icon-cogwheel-square; } +.icon-w-css-list-menu:before { content: @icon-list; } +.icon-w-tree-menu:before { content: @icon-tree-structure; } +.icon-w-category-menu:before { content: @icon-list; } +.icon-w-tab-menu:before { content: @icon-list; } +.icon-w-drop-down-menu:before { content: @icon-list; } +.icon-w-language-selection:before { content: @icon-earth; } +.icon-w-language-selection-dropdown:before { content: @icon-earth; } +.icon-w-language-selection-with-flags:before { content: @icon-earth; } +.icon-w-page-placeholder:before { content: @icon-placeholder; } +.icon-w-site-map:before { content: @icon-tree-structure; } +.icon-w-qr-code:before { content: @icon-qr-code; } +.icon-w-repeater:before { content: @icon-arrows-crooked; } +.icon-w-repeater-for-web-service:before { content: @icon-cogwheels; } +.icon-w-repeater-with-carousel:before { content: @icon-carousel; } +.icon-w-repeater-with-custom-query:before { content: @icon-database; } +.icon-w-query-repeater-with-effect:before { content: @icon-database; } +.icon-w-repeater-with-effect:before { content: @icon-arrows-crooked; } +.icon-w-repeater-with-lightbox:before { content: @icon-picture; } +.icon-w-basic-repeater:before { content: @icon-arrows-crooked; } +.icon-w-basic-repeater-with-effect:before { content: @icon-arrows-crooked; } +.icon-w-custom-table-repeater:before { content: @icon-table; } +.icon-w-custom-table-repeater-with-effect:before { content: @icon-table; } +.icon-w-report-table:before { content: @icon-table; } +.icon-w-atom-repeater:before { content: @icon-rss; } +.icon-w-xml-repeater:before { content: @icon-xml-tag; } +.icon-w-head-html-code:before { content: @icon-xml-tag; } +.icon-w-static-html:before { content: @icon-xml-tag; } +.icon-w-javascript:before { content: @icon-braces; } +.icon-w-breadcrumbs:before { content: @icon-breadcrumb; } +.icon-w-category-breadcrumbs:before { content: @icon-breadcrumb; } +.icon-w-forum-breadcrumbs:before { content: @icon-breadcrumb; } +.icon-w-document-attachments:before { content: @icon-paperclip; } +.icon-w-document-attachments-with-effect:before { content: @icon-paperclip; } +.icon-w-attachments:before { content: @icon-paperclip; } +.icon-w-attachments-carousel:before { content: @icon-carousel; } +.icon-w-attachments-carousel-3d:before { content: @icon-carousel; } +.icon-w-attachments-lightbox:before { content: @icon-picture; } +.icon-w-lightbox-gallery:before { content: @icon-picture; } +.icon-w-inbox:before { content: @icon-message; } +.icon-w-send-message:before { content: @icon-message; } +.icon-w-send-to-friend:before { content: @icon-message; } +.icon-w-newsletter-archive:before { content: @icon-list; } +.icon-w-newsletter-subscription:before { content: @icon-check-circle; } +.icon-w-messaging-info-panel:before { content: @icon-message; } +.icon-w-newsletter-unsubscription:before { content: @icon-times-circle; } +.icon-w-custom-subscription-form:before { content: @icon-check-circle; } +.icon-w-registration-e-mail-confirmation:before { content: @icon-message; } +.icon-w-my-messages:before { content: @icon-message; } +.icon-w-unsubscription-request:before { content: @icon-times-circle; } +.icon-w-outbox:before { content: @icon-message; } +.icon-w-my-sent-invitations:before { content: @icon-message; } +.icon-w-board-messages-data-source:before { content: @icon-bubbles; } +.icon-w-group-forum-posts-data-source:before { content: @icon-bubbles; } +.icon-w-query-data-source:before { content: @icon-database; } +.icon-w-forum-posts-data-source:before { content: @icon-bubbles; } +.icon-w-documents-data-source:before { content: @icon-doc; } +.icon-w-web-service-data-source:before { content: @icon-cogwheels; } +.icon-w-department-members-data-source:before { content: @icon-organisational-scheme; } +.icon-w-macro-data-source:before { content: @icon-braces-octothorpe; } +.icon-w-file-system-data-source:before { content: @icon-folder-opened; } +.icon-w-sharepoint-data-source:before { content: @icon-building-block; } +.icon-w-group-media-libraries-data-source:before { content: @icon-pictures; } +.icon-w-atom-data-source:before { content: @icon-rss; } +.icon-w-media-files-data-source:before { content: @icon-pictures; } +.icon-w-groups-data-source:before { content: @icon-users; } +.icon-w-custom-table-data-source:before { content: @icon-table; } +.icon-w-group-members-data-source:before { content: @icon-users; } +.icon-w-blog-comments-data-source:before { content: @icon-notebook; } +.icon-w-sql-data-source:before { content: @icon-database; } +.icon-w-sql-search-box:before { content: @icon-magnifier; } +.icon-w-xml-data-source:before { content: @icon-xml-tag; } +.icon-w-sql-search-dialog:before { content: @icon-magnifier; } +.icon-w-products-data-source:before { content: @icon-box; } +.icon-w-sql-search-dialog-with-results:before { content: @icon-magnifier; } +.icon-w-media-libraries-data-source:before { content: @icon-pictures; } +.icon-w-users-data-source:before { content: @icon-user; } +.icon-w-attachments-data-source:before { content: @icon-paperclip; } +.icon-w-sql-search-results:before { content: @icon-list; } +.icon-w-chat-search-on-line-users:before { content: @icon-magnifier; } +.icon-w-search-accelerator-for-ie8-and-higher:before { content: @icon-magnifier; } +.icon-w-search-engine-results-highlighter:before { content: @icon-highlighter; } +.icon-w-smart-search-box:before { content: @icon-magnifier; } +.icon-w-forum-search-advanced-dialog:before { content: @icon-magnifier; } +.icon-w-smart-search-dialog:before { content: @icon-magnifier; } +.icon-w-forum-search-box:before { content: @icon-magnifier; } +.icon-w-smart-search-dialog-with-results:before { content: @icon-magnifier; } +.icon-w-smart-search-filter:before { content: @icon-funnel; } +.icon-w-smart-search-results:before { content: @icon-list; } +.icon-w-message-board-rss-feed:before { content: @icon-bubbles; } +.icon-w-forum-posts-rss-feed:before { content: @icon-bubbles; } +.icon-w-query-rss-feed:before { content: @icon-database; } +.icon-w-news-rss-feed:before { content: @icon-newspaper; } +.icon-w-web-service-rss-feed:before { content: @icon-cogwheels; } +.icon-w-feed-link:before { content: @icon-rss; } +.icon-w-cms-rss-feed:before { content: @icon-rss; } +.icon-w-atom-feed:before { content: @icon-rss; } +.icon-w-media-files-rss-feed:before { content: @icon-pictures; } +.icon-w-blog-comments-rss-feed:before { content: @icon-rss; } +.icon-w-events-rss-feed:before { content: @icon-calendar-number; } +.icon-w-rss-data-source:before { content: @icon-database; } +.icon-w-rss-feed:before { content: @icon-rss; } +.icon-w-products-rss-feed:before { content: @icon-box; } +.icon-w-custom-table-rss-feed:before { content: @icon-table; } +.icon-w-blog-posts-rss-feed:before { content: @icon-notebook; } +.icon-w-rss-repeater:before { content: @icon-rss; } +.icon-w-web-part-zone:before { content: @icon-layout; } +.icon-w-banner-rotator:before { content: @icon-ribbon; } +.icon-w-css-style-selector:before { content: @icon-palette; } +.icon-w-report:before { content: @icon-graph; } +.icon-w-report-chart:before { content: @icon-graph; } +.icon-w-switch-mobile-device-detection:before { content: @icon-smartphone; } +.icon-w-mobile-device-redirection:before { content: @icon-smartphone; } +.icon-w-poll:before { content: @icon-checklist; } +.icon-w-group-polls:before { content: @icon-checklist; } +.icon-w-scrolling-text:before { content: @icon-rectangle-paragraph; } +.icon-w-static-text:before { content: @icon-rectangle-paragraph; } +.icon-w-paged-text:before { content: @icon-rectangle-paragraph; } +.icon-w-editable-text:before { content: @icon-rectangle-paragraph; } +.icon-w-change-password:before { content: @icon-key; } +.icon-w-unlock-user-accunt:before { content: @icon-lock-unlocked; } +.icon-w-reset-password:before { content: @icon-key; } +.icon-w-automatically-initiated-chat:before { content: @icon-bubble; } +.icon-w-chat-send-message:before { content: @icon-message; } +.icon-w-chat-support-request:before { content: @icon-bubble; } +.icon-w-chat-web-part:before { content: @icon-building-block; } +.icon-w-chat-errors:before { content: @icon-bubble-times; } +.icon-w-chat-leave-room:before { content: @icon-arrow-right-rect; } +.icon-w-chat-login:before { content: @icon-key; } +.icon-w-chat-notifications:before { content: @icon-bubble; } +.icon-w-chat-room-messages:before { content: @icon-bubble; } +.icon-w-chat-room-name:before { content: @icon-bubble; } +.icon-w-chat-room-users:before { content: @icon-user; } +.icon-w-chat-rooms:before { content: @icon-bubble-o; } +.icon-w-comment-view:before { content: @icon-bubbles; } +.icon-w-forum-unsubscription:before { content: @icon-times-circle; } +.icon-w-forum-most-active-threads:before { content: @icon-bubbles; } +.icon-w-forum-recently-active-threads:before { content: @icon-bubbles; } +.icon-w-forum-top-contributors:before { content: @icon-bubbles; } +.icon-w-forum-single-forum-flat-layout:before { content: @icon-bubbles; } +.icon-w-forum-single-forum-general:before { content: @icon-bubbles; } +.icon-w-forum-single-forum-tree-layout:before { content: @icon-bubbles; } +.icon-w-calendar:before { content: @icon-calendar; } +.icon-w-date-and-time:before { content: @icon-clock; } +.icon-w-event-calendar:before { content: @icon-calendar-number; } +.icon-w-event-registration:before { content: @icon-calendar-number; } +.icon-w-content-rating:before { content: @icon-star-full; } +.icon-w-shopping-cart-content:before { content: @icon-shopping-cart; } +.icon-w-shopping-cart-preview:before { content: @icon-shopping-cart; } +.icon-w-shopping-cart-totals:before { content: @icon-shopping-cart; } +.icon-w-attachment-image-gallery:before { content: @icon-picture; } +.icon-w-media-gallery-file-filter:before { content: @icon-picture; } +.icon-w-media-gallery-file-list:before { content: @icon-picture; } +.icon-w-media-gallery-folder-tree:before { content: @icon-picture; } +.icon-w-image-gallery:before { content: @icon-picture; } +.icon-w-media-libraries-viewer:before { content: @icon-picture; } +.icon-w-custom-table-datagrid:before { content: @icon-table; } +.icon-w-grid-with-custom-query:before { content: @icon-table; } +.icon-w-custom-table-datalist:before { content: @icon-list; } +.icon-w-grid:before { content: @icon-table; } +.icon-w-table-layout:before { content: @icon-table; } +.icon-w-sharepoint-datagrid:before { content: @icon-table; } +.icon-w-grid-for-rest-service:before { content: @icon-table; } +.icon-w-grid-for-web-service:before { content: @icon-cogwheels; } +.icon-w-custom-table-datagrid:before { content: @icon-table; } +.icon-w-basic-datalist:before { content: @icon-list; } +.icon-w-sharepoint-datalist:before { content: @icon-list; } +.icon-w-datalist-with-custom-query:before { content: @icon-database; } +.icon-w-datalist:before { content: @icon-list; } +.icon-w-group-forum-list:before { content: @icon-bubbles; } +.icon-w-group-profile:before { content: @icon-users; } +.icon-w-group-properties:before { content: @icon-users; } +.icon-w-group-forum-post-viewer:before { content: @icon-bubbles; } +.icon-w-group-public-profile:before { content: @icon-users; } +.icon-w-group-forum-search-results:before { content: @icon-magnifier; } +.icon-w-group-registration:before { content: @icon-users; } +.icon-w-group-forums:before { content: @icon-users; } +.icon-w-group-roles:before { content: @icon-users; } +.icon-w-group-invitation:before { content: @icon-message; } +.icon-w-group-security-access:before { content: @icon-lock; } +.icon-w-group-media-libraries:before { content: @icon-pictures; } +.icon-w-department-members-viewer:before { content: @icon-organisational-scheme; } +.icon-w-group-security-message:before { content: @icon-message; } +.icon-w-leave-group:before { content: @icon-arrow-right-rect; } +.icon-w-group-media-libraries-viewer:before { content: @icon-pictures; } +.icon-w-groups-filter:before { content: @icon-funnel; } +.icon-w-group-members:before { content: @icon-users; } +.icon-w-groups-viewer:before { content: @icon-users; } +.icon-w-group-members-viewer:before { content: @icon-users; } +.icon-w-group-contribution-list:before { content: @icon-list; } +.icon-w-chat-on-line-users:before { content: @icon-bubble; } +.icon-w-group-message-board:before { content: @icon-bubbles; } +.icon-w-group-document-library:before { content: @icon-pictures; } +.icon-w-group-message-board-viewer:before { content: @icon-bubbles; } +.icon-w-group-edit-contribution:before { content: @icon-edit; } +.icon-w-group-message-boards:before { content: @icon-bubbles; } +.icon-w-group-forum-most-active-threads:before { content: @icon-bubbles; } +.icon-w-group-permissions:before { content: @icon-permission-list; } +.icon-w-group-forum-recently-active-threads:before { content: @icon-clock; } +.icon-w-custom-registration-form:before { content: @icon-user; } +.icon-w-on-line-form:before { content: @icon-form; } +.icon-w-registration-form:before { content: @icon-user; } +.icon-w-logon-form:before { content: @icon-key; } +.icon-w-logon-mini-form:before { content: @icon-key; } +.icon-w-discount-coupon:before { content: @icon-percent-sign; } +.icon-w-my-account:before { content: @icon-id-card; } +.icon-w-on-line-users:before { content: @icon-user; } +.icon-w-my-profile:before { content: @icon-user; } +.icon-w-user-public-profile:before { content: @icon-user; } +.icon-w-users-filter:before { content: @icon-funnel; } +.icon-w-document-name-filter:before { content: @icon-funnel; } +.icon-w-filter:before { content: @icon-funnel; } +.icon-w-remaining-amount-for-free-shipping:before { content: @icon-percent-sign; } +.icon-w-shipping-option-selection:before { content: @icon-truck; } +.icon-w-tasks-owned-by-me:before { content: @icon-checklist; } +.icon-w-my-projects:before { content: @icon-project-scheme; } +.icon-w-project-list:before { content: @icon-project-scheme; } +.icon-w-project-tasks:before { content: @icon-checklist; } +.icon-w-tasks-assigned-to-me:before { content: @icon-checklist; } +.icon-w-customer-detail:before { content: @icon-user-frame; } +.icon-w-customer-address:before { content: @icon-user-frame; } +.icon-w-liveid-required-data:before { content: @icon-building-block; } +.icon-w-windows-liveid:before { content: @icon-building-block; } +.icon-w-openid-logon:before { content: @icon-brand-open-id; } +.icon-w-openid-required-data:before { content: @icon-brand-open-id; } +.icon-w-powered-by-kentico:before { content: @icon-kentico; } +.icon-w-bing-translator:before { content: @icon-brand-bing; } +.icon-w-static-bing-maps:before { content: @icon-brand-bing; } +.icon-w-basic-bing-maps:before { content: @icon-brand-bing; } +.icon-w-bing-maps:before { content: @icon-brand-bing; } +.icon-w-google-maps:before { content: @icon-brand-google; } +.icon-w-static-google-maps:before { content: @icon-brand-google; } +.icon-w-basic-google-maps:before { content: @icon-brand-google; } +.icon-w-google-activity-feed:before { content: @icon-brand-google-plus; } +.icon-w-google-badge:before { content: @icon-brand-google-plus; } +.icon-w-google-analytics:before { content: @icon-brand-google; } +.icon-w-google-search:before { content: @icon-brand-google; } +.icon-w-google-sitemap-xml-sitemap:before { content: @icon-brand-google; } +.icon-w-google-translator:before { content: @icon-brand-google; } +.icon-w-google-1-button:before { content: @icon-brand-google-plus; } +.icon-w-facebook-activity-feed:before { content: @icon-brand-facebook; } +.icon-w-facebook-comments:before { content: @icon-brand-facebook; } +.icon-w-facebook-connect-logon:before { content: @icon-brand-facebook; } +.icon-w-facebook-facepile:before { content: @icon-brand-facebook; } +.icon-w-facebook-like-box:before { content: @icon-brand-facebook; } +.icon-w-facebook-like-button:before { content: @icon-brand-facebook; } +.icon-w-facebook-recommendations:before { content: @icon-brand-facebook; } +.icon-w-facebook-send-button:before { content: @icon-brand-facebook; } +.icon-w-twitter-feed:before { content: @icon-brand-twitter; } +.icon-w-twitter-follow-button:before { content: @icon-brand-twitter; } +.icon-w-twitter-tweet-button:before { content: @icon-brand-twitter; } +.icon-w-pinterest-follow-button:before { content: @icon-brand-pinterest; } +.icon-w-pinterest-pin-it-button:before { content: @icon-brand-pinterest; } +.icon-w-linkedin-apply-with:before { content: @icon-brand-linkedin; } +.icon-w-linkedin-company-insider:before { content: @icon-brand-linkedin; } +.icon-w-linkedin-company-profile:before { content: @icon-brand-linkedin; } +.icon-w-linkedin-logon:before { content: @icon-brand-linkedin; } +.icon-w-linkedin-member-profile:before { content: @icon-brand-linkedin; } +.icon-w-linkedin-recommend-button:before { content: @icon-brand-linkedin; } +.icon-w-linkedin-required-data:before { content: @icon-brand-linkedin; } +.icon-w-linkedin-share-button:before { content: @icon-brand-linkedin; } +.icon-w-flash-web-part:before { content: @icon-building-block; } +.icon-w-flash-widget:before { content: @icon-cogwheel-square; } +.icon-w-social-bookmarking:before { content: @icon-tags; } +.icon-w-wmp-video:before { content: @icon-building-block; } +.icon-w-youtube-video:before { content: @icon-brand-youtube; } +.icon-w-silverlight-application-web-part:before { content: @icon-building-block; } +.icon-w-silverlight-application-widget:before { content: @icon-cogwheel-square; } +.icon-w-quicktime:before { content: @icon-building-block; } +.icon-w-product-filter:before { content: @icon-box; } +.icon-w-top-n-newest-products:before { content: @icon-box; } +.icon-w-top-n-products-by-sales:before { content: @icon-box; } +.icon-w-similar-products-by-sales:before { content: @icon-box; } +.icon-w-random-products:before { content: @icon-box; } +.icon-w-tag-cloud:before { content: @icon-cloud; } +.icon-w-message-board:before { content: @icon-bubbles; } +.icon-w-accordion-layout:before { content: @icon-accordion; } +.icon-w-columns-layout:before { content: @icon-l-cols-2; } +.icon-w-tabs-layout:before { content: @icon-tab; } +.icon-w-wizard-layout:before { content: @icon-wizard-stick; } +.icon-w-rows-layout:before { content: @icon-l-rows-3; } +.icon-w-new-blog:before { content: @icon-notebook; } +.icon-w-abuse-report:before { content: @icon-restriction-list; } +.icon-w-in-line-abuse-report:before { content: @icon-restriction-list; } +.icon-w-message-board-subscription-confirmation:before { content: @icon-check-circle; } +.icon-w-datalist-for-web-service:before { content: @icon-cogwheels; } +.icon-w-tree-view:before { content: @icon-tree-structure; } +.icon-w-admin-actions:before { content: @icon-chain; } +.icon-w-simple-cookie-law-consent:before { content: @icon-cookie; } +.icon-w-news-list:before { content: @icon-list; } +.icon-w-message-board-unsubscription:before { content: @icon-times-circle; } +.icon-w-keep-alive:before { content: @icon-rotate-double-right; } +.icon-w-donate:before { content: @icon-money-bill; } +.icon-w-donations:before { content: @icon-money-bill; } +.icon-w-payment-form:before { content: @icon-money-bill; } +.icon-w-payment-method-selection:before { content: @icon-money-bill; } +.icon-w-currency-selection:before { content: @icon-dollar-sign; } +.icon-w-analytics-browser-capabilities:before { content: @icon-dialog-window; } +.icon-w-strands-recommendations:before { content: @icon-building-block; } +.icon-w-password-expiration:before { content: @icon-lock; } +.icon-w-message-board-viewer:before { content: @icon-bubbles; } +.icon-w-checkout-process-obsolete:before { content: @icon-building-block; } +.icon-w-category-list:before { content: @icon-list; } +.icon-w-analytics-custom-statistics:before { content: @icon-piechart; } +.icon-w-subscription-approval:before { content: @icon-check-circle; } +.icon-w-widget-actions:before { content: @icon-cogwheel-square; } +.icon-w-message-panel:before { content: @icon-shopping-cart; } +.icon-w-article-list:before { content: @icon-list; } +.icon-w-set-cookie:before { content: @icon-cookie; } +.icon-w-random-document:before { content: @icon-doc; } +.icon-w-edit-contribution:before { content: @icon-edit; } +.icon-w-universal-document-viewer:before { content: @icon-doc; } +.icon-w-custom-response:before { content: @icon-earth; } +.icon-w-collapsible-panel:before { content: @icon-collapse-scheme; } +.icon-w-wishlist:before { content: @icon-star-full; } +.icon-w-latest-news:before { content: @icon-newspaper; } +.icon-w-edit-document-link:before { content: @icon-edit; } +.icon-w-did-you-mean:before { content: @icon-question-circle; } +.icon-w-universal-pager:before { content: @icon-doc-arrows; } +.icon-w-basic-universal-viewer:before { content: @icon-lines-rectangle-o; } +.icon-w-random-redirection:before { content: @icon-arrow-u-right; } +.icon-w-notification-subscription:before { content: @icon-check-circle; } +.icon-w-wizard-buttons:before { content: @icon-wizard-stick; } +.icon-w-universal-viewer:before { content: @icon-lines-rectangle-o; } +.icon-w-report-value:before { content: @icon-x; } +.icon-w-recent-posts:before { content: @icon-notebook; } +.icon-w-object-management-buttons:before { content: @icon-edit; } +.icon-w-wizard-header:before { content: @icon-wizard-stick; } +.icon-w-universal-viewer-with-custom-query:before { content: @icon-database; } +.icon-w-confirmation-checkbox:before { content: @icon-cb-check-preview; } +.icon-w-sharepoint-repeater:before { content: @icon-arrows-crooked; } +.icon-w-register-after-checkout:before { content: @icon-user; } +.icon-w-post-archive:before { content: @icon-list; } +.icon-w-my-invitations:before { content: @icon-message; } +.icon-w-link-button:before { content: @icon-chain; } +.icon-w-contact-list:before { content: @icon-user-frame; } +.icon-w-task-info-panel:before { content: @icon-checklist; } +.icon-w-document-library:before { content: @icon-doc; } +.icon-w-custom-table-form:before { content: @icon-table; } +.icon-w-hierarchical-viewer:before { content: @icon-lines-rectangle-o; } +.icon-w-user-control:before { content: @icon-building-block; } +.icon-w-content-slider:before { content: @icon-carousel; } +.icon-w-blog-post-subscription-confirmation:before { content: @icon-check-circle; } +.icon-w-ignore-list:before { content: @icon-restriction-list; } +.icon-w-document-pager:before { content: @icon-doc-arrows; } +.icon-w-content-subscription:before { content: @icon-check-circle; } +.icon-w-blog-post-unsubscription:before { content: @icon-times-circle; } +.icon-w-text-highlighter:before { content: @icon-highlighter; } +.icon-w-related-documents:before { content: @icon-doc; } +.icon-w-order-note:before { content: @icon-invoice; } +.icon-w-xslt-viewer:before { content: @icon-xml-tag; } +.icon-w-document-wizard-button:before { content: @icon-wizard-stick; } +.icon-w-contribution-list:before { content: @icon-list; } +.icon-w-timer:before { content: @icon-clock; } +.icon-w-shortcuts:before { content: @icon-chain; } +.icon-w-document-wizard-manager:before { content: @icon-wizard-stick; } +.icon-w-cookie-law-consent:before { content: @icon-cookie; } +.icon-w-blog-comments-viewer:before { content: @icon-bubbles; } +.icon-w-sign-out-button:before { content: @icon-arrow-right-rect; } +.icon-w-scrolling-news:before { content: @icon-carousel; } +.icon-w-output-cache-dependencies:before { content: @icon-building-block; } +.icon-w-zones-with-effect:before { content: @icon-layout; } +.icon-w-document-wizard-navigation:before { content: @icon-wizard-stick; } +.icon-w-my-subscriptions:before { content: @icon-permission-list; } +.icon-w-document-wizard-step-action:before { content: @icon-wizard-stick; } +.icon-w-page-views:before { content: @icon-building-block; } +.icon-w-activities:before { content: @icon-ekg-line; } +.icon-w-analytics-chart-viewer:before { content: @icon-piechart; } +.icon-w-analytics-table-viewer:before { content: @icon-table; } +.icon-w-articles-rss-feed:before { content: @icon-rss; } +.icon-w-blog-comments:before { content: @icon-bubbles; } +.icon-w-building-your-on-line-store:before { content: @icon-shopping-cart; } +.icon-w-department-latest-blog-posts:before { content: @icon-notebook; } +.icon-w-department-latest-forum-posts:before { content: @icon-bubbles; } +.icon-w-department-latest-news:before { content: @icon-newspaper; } +.icon-w-department-quick-links:before { content: @icon-chain; } +.icon-w-department-upcoming-events:before { content: @icon-calendar-number; } +.icon-w-documents:before { content: @icon-doc; } +.icon-w-e-commerce-settings-checker:before { content: @icon-cb-check-preview; } +.icon-w-editable-image:before { content: @icon-picture; } +.icon-w-e-mail-queue:before { content: @icon-messages; } +.icon-w-employee-of-the-month:before { content: @icon-user-frame; } +.icon-w-event-management:before { content: @icon-calendar-number; } +.icon-w-eventlog:before { content: @icon-clipboard-list; } +.icon-w-forum-group:before { content: @icon-bubbles; } +.icon-w-forum-posts-waiting-for-approval:before { content: @icon-bubbles; } +.icon-w-group-administrators:before { content: @icon-user; } +.icon-w-group-forum-posts-viewer:before { content: @icon-bubbles; } +.icon-w-group-poll:before { content: @icon-checklist; } +.icon-w-intranet-canteen-menu:before { content: @icon-invoice; } +.icon-w-intranet-departments:before { content: @icon-organisational-scheme; } +.icon-w-intranet-employees:before { content: @icon-users; } +.icon-w-intranet-latest-blog-posts:before { content: @icon-notebook; } +.icon-w-intranet-latest-forum-posts:before { content: @icon-bubbles; } +.icon-w-intranet-latest-news:before { content: @icon-newspaper; } +.icon-w-intranet-poll:before { content: @icon-piechart; } +.icon-w-intranet-quick-links:before { content: @icon-chain; } +.icon-w-intranet-upcoming-events:before { content: @icon-calendar-number; } +.icon-w-latest-blog-posts:before { content: @icon-notebook; } +.icon-w-latest-forum-posts:before { content: @icon-bubbles; } +.icon-w-latest-news-for-corporate-site:before { content: @icon-newspaper; } +.icon-w-link:before { content: @icon-chain; } +.icon-w-media-gallery:before { content: @icon-picture; } +.icon-w-message-list:before { content: @icon-list; } +.icon-w-most-recent-pages:before { content: @icon-list; } +.icon-w-my-accounts:before { content: @icon-building; } +.icon-w-my-blogs:before { content: @icon-notebook; } +.icon-w-my-blogs-comments:before { content: @icon-bubbles; } +.icon-w-my-contacts:before { content: @icon-id-card; } +.icon-w-my-inbox:before { content: @icon-messages; } +.icon-w-my-pending-contacts:before { content: @icon-id-card; } +.icon-w-my-projects-intranet-portal:before { content: @icon-project-scheme; } +.icon-w-my-workgroups:before { content: @icon-briefcase; } +.icon-w-object-recycle-bin:before { content: @icon-bin; } +.icon-w-orders:before { content: @icon-invoice; } +.icon-w-persona-based-recommendations:before { content: @icon-user-frame; } +.icon-w-personal-category-list:before { content: @icon-list; } +.icon-w-products:before { content: @icon-box; } +.icon-w-random-products-for-corporate-site:before { content: @icon-box; } +.icon-w-recent-users:before { content: @icon-user; } +.icon-w-report-daily-sales:before { content: @icon-graph; } +.icon-w-report-monthly-sales:before { content: @icon-graph; } +.icon-w-report-number-of-orders-by-status:before { content: @icon-graph; } +.icon-w-report-sales-by-order-status:before { content: @icon-graph; } +.icon-w-reporting:before { content: @icon-graph; } +.icon-w-rich-text:before { content: @icon-l-list-article; } +.icon-w-scrolling-news-for-corporate-site:before { content: @icon-newspaper; } +.icon-w-system:before { content: @icon-circle-square; } +.icon-w-tasks-assigned-to-me-intranet-portal:before { content: @icon-checklist; } +.icon-w-tasks-owned-by-me-intranet-portal:before { content: @icon-checklist; } +.icon-w-text:before { content: @icon-l-text; } +.icon-w-widget-zone:before { content: @icon-cogwheel-square; } +.icon-w-workgroup-administrators:before { content: @icon-user; } +.icon-w-workgroup-latest-blog-posts:before { content: @icon-notebook; } +.icon-w-workgroup-latest-forum-posts:before { content: @icon-bubbles; } +.icon-w-workgroup-latest-news:before { content: @icon-newspaper; } +.icon-w-workgroup-members:before { content: @icon-users; } +.icon-w-workgroup-messages:before { content: @icon-message; } +.icon-w-workgroup-quick-links:before { content: @icon-chain; } +.icon-w-workgroup-recent-pages:before { content: @icon-list; } +.icon-w-workgroup-upcoming-events:before { content: @icon-calendar-number; } +.icon-w-current-user:before { content: @icon-user; } +.icon-w-disabled-module-info:before { content: @icon-i-circle; } +.icon-w-edit:before { content: @icon-edit; } +.icon-w-edit-parameters:before { content: @icon-edit; } +.icon-w-forum-favorites:before { content: @icon-star-full; } +.icon-w-forum-posts-viewer:before { content: @icon-bubbles; } +.icon-w-forum-subscription-confirmation:before { content: @icon-check-circle; } +.icon-w-header-actions:before { content: @icon-building-block; } +.icon-w-horizontal-tabs:before { content: @icon-tab; } +.icon-w-listing:before { content: @icon-l-list-article; } +.icon-w-edit-bindings:before { content: @icon-edit; } +.icon-w-media-file-uploader:before { content: @icon-pictures; } +.icon-w-messages-placeholder:before { content: @icon-placeholder; } +.icon-w-metafile-list:before { content: @icon-list; } +.icon-w-new-header-action:before { content: @icon-building-block; } +.icon-w-object-edit-panel:before { content: @icon-building-block; } +.icon-w-object-tree-menu:before { content: @icon-tree-structure; } +.icon-w-page-title:before { content: @icon-l-header-text; } +.icon-w-preview-edit:before { content: @icon-edit; } +.icon-w-selector:before { content: @icon-building-block; } +.icon-w-select-site:before { content: @icon-earth; } +.icon-w-theme-file-manager:before { content: @icon-folder-opened; } +.icon-w-tree:before { content: @icon-tree-structure; } +.icon-w-tree-guide:before { content: @icon-tree-structure; } +.icon-w-users-viewer:before { content: @icon-user; } +.icon-w-vertical-tabs:before { content: @icon-tab-vertical; } + +.icon-file-default:before { content: @icon-doc-o; } +.icon-file-3gp:before { content: @icon-clapperboard; } +.icon-file-accdb:before { content: @icon-database; } +.icon-file-ai:before { content: @icon-bezier-scheme; } +.icon-file-ascx:before { content: @icon-doc-user; } +.icon-file-aspx:before { content: @icon-doc; } +.icon-file-au:before { content: @icon-note; } +.icon-file-avi:before { content: @icon-clapperboard; } +.icon-file-bat:before { content: @icon-dialog-window-cogwheel; } +.icon-file-bmp:before { content: @icon-picture; } +.icon-file-cs:before { content: @icon-c-sharp; } +.icon-file-css:before { content: @icon-palette; } +.icon-file-csv:before { content: @icon-table; } +.icon-file-dbm:before { content: @icon-database; } +.icon-file-doc:before { content: @icon-rectangle-paragraph; } +.icon-file-eps:before { content: @icon-bezier-scheme; } +.icon-file-flv:before { content: @icon-clapperboard; } +.icon-file-gif:before { content: @icon-picture; } +.icon-file-html:before { content: @icon-xml-tag; } +.icon-file-jpeg:before { content: @icon-picture; } +.icon-file-js:before { content: @icon-braces; } +.icon-file-mdb:before { content: @icon-database; } +.icon-file-mid:before { content: @icon-note; } +.icon-file-mov:before { content: @icon-clapperboard; } +.icon-file-mp3:before { content: @icon-note; } +.icon-file-mp4:before { content: @icon-clapperboard; } +.icon-file-mpeg:before { content: @icon-note; } +.icon-file-mpg:before { content: @icon-clapperboard; } +.icon-file-mpg4:before { content: @icon-clapperboard; } +.icon-file-oga:before { content: @icon-note; } +.icon-file-ogg:before { content: @icon-note; } +.icon-file-ogv:before { content: @icon-clapperboard; } +.icon-file-pdf:before { content: @icon-file-pdf; } +.icon-file-png:before { content: @icon-picture; } +.icon-file-pps:before { content: @icon-piechart-lines; } +.icon-file-ppt:before { content: @icon-piechart-lines; } +.icon-file-ps:before { content: @icon-bezier-scheme; } +.icon-file-psd:before { content: @icon-picture; } +.icon-file-rtf:before { content: @icon-rectangle-paragraph; } +.icon-file-sln:before { content: @icon-dialog-window; } +.icon-file-swf:before { content: @icon-clapperboard; } +.icon-file-tif:before { content: @icon-picture; } +.icon-file-tiff:before { content: @icon-picture; } +.icon-file-txt:before { content: @icon-rectangle-paragraph; } +.icon-file-vb:before { content: @icon-vb; } +.icon-file-wav:before { content: @icon-note; } +.icon-file-webm:before { content: @icon-clapperboard; } +.icon-file-wma:before { content: @icon-note; } +.icon-file-wmv:before { content: @icon-clapperboard; } +.icon-file-xls:before { content: @icon-table; } +.icon-file-xml:before { content: @icon-xml-tag; } +.icon-file-xsl:before { content: @icon-xml-tag; } +.icon-file-xslt:before { content: @icon-xml-tag; } +.icon-file-zip:before { content: @icon-folder-belt; } + +.icon-me-abstractobjectcollection:before { content: @icon-folder-o; } +.icon-me-binding:before { content: @icon-chain; } +.icon-me-boolean:before { content: @icon-t-f; } +.icon-me-datetime:before { content: @icon-clock; } +.icon-me-double:before { content: @icon-one; } +.icon-me-false:before { content: @icon-f; } +.icon-me-children:before { content: @icon-parent-child-scheme; } +.icon-me-icontext:before { content: @icon-map; } +.icon-me-ilist:before { content: @icon-list; } +.icon-me-imacronamespace:before { content: @icon-drawers; } +.icon-me-info:before { content: @icon-clipboard-list; } +.icon-me-insertmacro:before { content: @icon-braces-octothorpe; } +.icon-me-int32:before { content: @icon-one; } +.icon-me-method:before { content: @icon-cogwheels; } +.icon-me-null:before { content: @icon-circle-slashed; } +.icon-me-number:before { content: @icon-one; } +.icon-me-parent:before { content: @icon-parent-child-scheme-2; } +.icon-me-property:before { content: @icon-clipboard-list; } +.icon-me-referring:before { content: @icon-chain; } +.icon-me-sitebinding:before { content: @icon-chain; } +.icon-me-snippet:before { content: @icon-doc-torn; } +.icon-me-string:before { content: @icon-a-lowercase; } +.icon-me-true:before { content: @icon-t; } +.icon-me-value:before { content: @icon-x; } +.icon-me-exception:before { content: @icon-exclamation-triangle; } + + +// Special classes for crosshair + +.icon-crosshair{ + position: relative; + display: inline-block; +} + + +.icon-crosshair:before{ + content: @icon-crosshair-o; + color: #fff; + position: absolute; + left: 0; + display: inline-block; +} + +.icon-crosshair:after{ + content: @icon-crosshair-f; + position: absolute; + left: 0; + display: inline-block; +} + + + diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/variables.less b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/variables.less new file mode 100644 index 0000000..2569754 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Content/Styles/variables.less @@ -0,0 +1,104 @@ +// +// Variables +// -------------------------------------------------- + + +// Global values +// -------------------------------------------------- + +@base-unit: 16px; + +// Colors +// ------------------------- + +@color-black: #231E15; +@color-white: #fff; +@color-darkbrown: #272219; +@color-brown: #846331; +@color-lightbrown: #B49669; +@color-lightestbrown: #CEB48D; +@color-gold: #494132; +@color-lightgold: #6a5a3b; +@color-brownbg: #F0E8DD; +@color-darkbrownbg: #E2D1BA; + +@color-white: #ffffff; +@color-black: #000000; + +@color-blue-70: #0f6194; +@color-blue-100: #1175ae; + +@color-green-100: #497d04; + +@color-gray-70: #403e3d; +@color-gray-80: #504e4c; +@color-gray-90: #696663; +@color-gray-100: #a3a2a2; +@color-gray-130: #bdbbbb; +@color-gray-150: #e5e5e5; +@color-gray-155: #e7e7e7; +@color-gray-160: #f7f7f7; + +@color-app-facebook: #3b5998; +@color-app-twitter: #55acee; +@color-app-linkedin: #007bb6; +@color-app-sharepoint: #1372b8; + +// Typography +// ------------------------- +@font-family-sans-serif: "Segoe UI", Helvetica, Verdana, Arial, sans-serif; +@font-family-serif: Georgia, "Times New Roman", Times, serif; +@font-family-monospace: "Courier New", monospace; +@font-family-semibold: "Segoe UI Semibold", Helvetica, Verdana, Arial, sans-serif; +@font-family-base: @font-family-sans-serif; + +@font-size-base: @base-unit * 0.875; // ~14px +@font-size-large: @base-unit * 1.125; // ~18px +@font-size-huge: @base-unit * 1.5; // ~24px +@font-size-small: @base-unit * 0.75; // ~12px + +@line-height-50: @base-unit * 0.625; // ~10px +@line-height-80: @base-unit; +@line-height-100: @base-unit * 1.25; // ~20px +@line-height-150: @base-unit * 1.5; +@line-height-200: @base-unit * 2; // ~32 +@line-height-300: @base-unit * 3; // ~48 + +@headings-font-family: @font-family-base; +@headings-font-weight: bold; + +@white-space-width: @base-unit * 0.25; + +// Iconography +// ------------------------- + +@icon-font-path: "./fonts/"; +@icon-font-name: "Core-icons"; + +@icon-size-200: @base-unit * 4; // ~64px App icons on dashboard +@icon-size-150: @base-unit * 2; // ~32px Notifications +@icon-size-130: @base-unit * 1.75; // ~28px Reserved for Kentico logo +@icon-size-100: @base-unit * 1.5; // ~24px Icons in header +@icon-size-80: @base-unit; // ~16px Standard icon size +@icon-size-50: @base-unit * 0.75; // ~12px Tree icons +@icon-size-30: @base-unit * 0.5; // ~8px Only for statuses or indicators + +// Icon color on light background +@light-bg-icon-color: @color-gray-70; +@light-bg-icon-hover-color: @color-blue-70; + +// Icon color on dark background +@dark-bg-icon-color: @color-gray-100; + +// Fonts +// ------------------------- + +@font-size-base: @base-unit * 0.875; // ~14px + +// Forms +// ------------------------- +@input-bg: @color-gray-160; +@input-bg-disabled: @color-gray-150; +@input-color-disabled: @color-gray-90; +@input-border-width: 2px; + diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ColorPickerEditor/ColorPickerEditor.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ColorPickerEditor/ColorPickerEditor.css new file mode 100644 index 0000000..c5ebe5f --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ColorPickerEditor/ColorPickerEditor.css @@ -0,0 +1,72 @@ +.color-picker-editor div.inline-editor-btn-group { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; + z-index: 10000; + position: absolute; + right: 1em; + top: 1em; + background-color: #262524; + display: table; + box-sizing: border-box; + border: 1px solid #383838; + border-radius: 2px; + opacity: 0.8; + -webkit-transition: background-color .2s ease-in; + transition: background-color .2s ease-in; +} + +.color-picker-editor div.inline-editor-btn-group:hover { + opacity: 1.0; +} + +.color-picker-editor div.inline-editor-btn-group ul { + margin: 0; + padding: 0; +} + +.color-picker-editor div.inline-editor-btn-group li { + float: left; + list-style: none; + margin: 0; + padding: 0; +} + +.color-picker-editor div.inline-editor-btn-group li:first-child button { + border-bottom-left-radius: 2px; + border-top-left-radius: 2px; +} + +.color-picker-editor div.inline-editor-btn-group li:last-child button { + border-bottom-right-radius: 2px; + border-top-right-radius: 2px; +} + +.color-picker-editor div.inline-editor-btn-group li button { + box-sizing: border-box; + cursor: pointer; + display: block; + font-size: 24px; + line-height: 1.33; + margin: 0; + padding: 8px; + text-decoration: none; + color: #fff; + background-color: #262524; + height: 50px; + min-width: 50px; + border: 0; + border-right: 1px solid rgba(255, 255, 255, 0.1); + -webkit-transition: background-color .2s ease-in; + transition: background-color .2s ease-in; +} + +.color-picker-editor div.inline-editor-btn-group li button:hover { + background-color: #383838; +} + +.color-picker-editor .color-btn { + padding: 10px 0; + display: inline-block; + width: 35px; + height: 35px; +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ColorPickerEditor/color-picker-editor.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ColorPickerEditor/color-picker-editor.js new file mode 100644 index 0000000..8c4c23b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ColorPickerEditor/color-picker-editor.js @@ -0,0 +1,37 @@ +(function () { + window.kentico.pageBuilder.registerInlineEditor("color-picker-editor", { + init: function (options) { + var editor = options.editor; + var buttons = [ + { button: editor.querySelector("#first-color-btn"), cssClass: "first-color" }, + { button: editor.querySelector("#second-color-btn"), cssClass: "second-color" }, + { button: editor.querySelector("#third-color-btn"), cssClass: "third-color" }, + ]; + + var setColor = function (selectedButton) { + for (var i = 0; i < buttons.length; ++i) { + editor.parentElement.classList.remove(buttons[i].cssClass); + buttons[i].button.children[0].classList.remove("icon-cb-check-sign"); + } + editor.parentElement.classList.add(selectedButton.cssClass); + selectedButton.button.children[0].classList.add("icon-cb-check-sign"); + + var event = new CustomEvent("updateProperty", { + detail: { + value: selectedButton.cssClass, + name: options.propertyName + } + }); + editor.dispatchEvent(event); + } + + for (var i = 0; i < buttons.length; ++i) { + if (options.propertyValue === buttons[i].cssClass) { + buttons[i].button.children[0].classList.add("icon-cb-check-sign"); + } + var click = function(index) { setColor(buttons[index]); }.bind(this, i); + buttons[i].button.addEventListener("click", click); + } + } + }); +})(); diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ImageUploaderEditor/dropzone/dropzone.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ImageUploaderEditor/dropzone/dropzone.css new file mode 100644 index 0000000..9cece72 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ImageUploaderEditor/dropzone/dropzone.css @@ -0,0 +1,176 @@ +.image-uploader-editor .uploader-container { + text-align: center; + position: absolute; + width: 100%; + height: 100%; +} + +.image-uploader-editor .uploader-empty-container { + text-align: center; +} + +.image-uploader-editor .uploader-empty-container.absolute { + position: absolute; + width: 100%; + height: 100%; +} + + .image-uploader-editor .uploader-empty-container .uploader { + min-height: 200px; + color: #a3a2a2; + } + + .image-uploader-editor .uploader-empty-container .uploader .dz-clickable, + .image-uploader-editor .uploader-empty-container .uploader a { + color: #2081c3; + } + +.image-uploader-editor .uploader, .image-uploader-editor .uploader * { + -moz-box-sizing: border-box; + box-sizing: border-box; +} + +.image-uploader-editor .uploader { + width: 100%; + height: 100%; + color: transparent; +} + +.image-uploader-editor .uploader-container .uploader.dz-drag-hover, +.image-uploader-editor .uploader-empty-container .uploader.dz-drag-hover, +.image-uploader-editor .uploader-empty-container .uploader:hover, +.image-uploader-editor .uploader-container .uploader:hover { + width: 100%; + height: 100%; + color: #fff; + margin: auto; +} + +.image-uploader-editor .uploader-container .uploader.dz-drag-hover, +.image-uploader-editor .uploader-empty-container .uploader.dz-drag-hover { + background-color: rgba(155, 155, 155, .17); +} + +.image-uploader-editor .uploader-empty-container .uploader.dz-drag-hover, +.image-uploader-editor .uploader-empty-container .uploader:hover { + color: #a3a2a2; +} + +.image-uploader-editor .uploader .dz-clickable, +.image-uploader-editor .uploader a { + cursor: pointer; + color: transparent; +} + +.image-uploader-editor .uploader.dz-drag-hover .dz-clickable, +.image-uploader-editor .uploader:hover .dz-clickable, +.image-uploader-editor .uploader.dz-drag-hover a, +.image-uploader-editor .uploader:hover a { + color: #2081c3; +} + +.image-uploader-editor .uploader .dz-clickable * { + cursor: default; +} + +.image-uploader-editor .uploader .dz-clickable .dz-message, .image-uploader-editor .uploader .dz-clickable .dz-message * { + cursor: pointer; +} + +.image-uploader-editor .uploader .dz-message { + position: absolute; + width: 230px; + padding: 10px; + font-size: 14px; +} + +.image-uploader-editor .uploader .dz-message.center { + top: 50%; + left: 50%; + -webkit-transform: translate(-50%, -50%); + -ms-transform: translate(-50%, -50%); + transform: translate(-50%, -50%); +} + +.image-uploader-editor .uploader .dz-message.top { + top: 2.5rem; + left: 50%; + -webkit-transform: translate(-50%, 0); + -ms-transform: translate(-50%, 0); + transform: translate(-50%, 0); +} + +.image-uploader-editor .uploader .dz-message.bottom { + top: calc(100% - 1rem); + left: 50%; + -webkit-transform: translate(-50%, -100%); + -ms-transform: translate(-50%, -100%); + transform: translate(-50%, -100%); +} + +.image-uploader-editor .uploader:hover .dz-message, +.image-uploader-editor .uploader.dz-drag-hover .dz-message { + background-color: rgba(155, 155, 155, .75); + -ms-border-radius: 2px; + border-radius: 2px; + z-index: 2; +} + +.image-uploader-editor .uploader-empty-container .uploader .dz-message { + background-color: inherit; +} + +.image-uploader-editor .uploader .dz-message .icon-arrow-up-line { + font-size: 32px; +} + +.image-uploader-editor .uploader .dz-preview { + color: #fff; + position: relative; + display: inline-block; + width: 230px; + padding: 20px; + margin: 2em; + background-color: #403e3d; + -ms-border-radius: 2px; + border-radius: 2px; + z-index: 1; +} + +.image-uploader-editor .uploader .dz-preview .dz-progress { + display: block; + height: 15px; +} + +.image-uploader-editor .uploader .dz-preview .dz-progress .dz-upload { + display: block; + height: 100%; + width: 0; + background: #2ECC40; +} + +.image-uploader-editor .uploader .dz-preview .dz-error-message { + color: #FF4136; + display: none; +} + +.image-uploader-editor .uploader .dz-preview.dz-error .dz-error-message, .image-uploader-editor .uploader .dz-preview.dz-error .dz-error-mark { + display: block; +} + +.image-uploader-editor .uploader .dz-preview.dz-success .dz-success-mark { + display: block; +} + +.image-uploader-editor .uploader .dz-preview .dz-error-mark, .image-uploader-editor .uploader .dz-preview .dz-success-mark { + position: absolute; + display: none; + left: 30px; + top: 30px; + width: 54px; + height: 58px; + left: 50%; + margin-left: -27px; + -ms-opacity: 0.5; + opacity: 0.5; +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ImageUploaderEditor/dropzone/dropzone.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ImageUploaderEditor/dropzone/dropzone.js new file mode 100644 index 0000000..216d326 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/ImageUploaderEditor/dropzone/dropzone.js @@ -0,0 +1,2 @@ +"use strict";function _possibleConstructorReturn(a,b){if(!a)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!b||"object"!=typeof b&&"function"!=typeof b?a:b}function _inherits(a,b){if("function"!=typeof b&&null!==b)throw new TypeError("Super expression must either be null or a function, not "+typeof b);a.prototype=Object.create(b&&b.prototype,{constructor:{value:a,enumerable:!1,writable:!0,configurable:!0}}),b&&(Object.setPrototypeOf?Object.setPrototypeOf(a,b):a.__proto__=b)}function _classCallCheck(a,b){if(!(a instanceof b))throw new TypeError("Cannot call a class as a function")}function __guard__(a,b){return void 0!==a&&null!==a?b(a):void 0}function __guardMethod__(a,b,c){return void 0!==a&&null!==a&&"function"==typeof a[b]?c(a,b):void 0}var _createClass=function(){function a(a,b){for(var c=0;c1?c-1:0),e=1;e=f.length)break;h=f[g++];h.apply(this,d)}}return this}},{key:"off",value:function(a,b){if(!this._callbacks||0===arguments.length)return this._callbacks={},this;var c=this._callbacks[a];if(!c)return this;if(1===arguments.length)return delete this._callbacks[a],this;for(var d=0;d=c.length)break;e=c[d++];var f=e;if(/(^| )dz-message($| )/.test(f.className)){a=f,f.className="dz-message";break}}a||(a=b.createElement('
'),this.element.appendChild(a));var g=a.getElementsByTagName("span")[0];return g&&(null!=g.textContent?g.textContent=this.options.dictFallbackMessage:null!=g.innerText&&(g.innerText=this.options.dictFallbackMessage)),this.element.appendChild(this.getFallbackForm())},resize:function(a,b,c,d){var e={srcX:0,srcY:0,srcWidth:a.width,srcHeight:a.height},f=a.width/a.height;null==b&&null==c?(b=e.srcWidth,c=e.srcHeight):null==b?b=c*f:null==c&&(c=b/f),b=Math.min(b,e.srcWidth),c=Math.min(c,e.srcHeight);var g=b/c;if(e.srcWidth>b||e.srcHeight>c)if("crop"===d)f>g?(e.srcHeight=a.height,e.srcWidth=e.srcHeight*g):(e.srcWidth=a.width,e.srcHeight=e.srcWidth/g);else{if("contain"!==d)throw new Error("Unknown resizeMethod '"+d+"'");f>g?c=b/f:b=c*f}return e.srcX=(a.width-e.srcWidth)/2,e.srcY=(a.height-e.srcHeight)/2,e.trgWidth=b,e.trgHeight=c,e},transformFile:function(a,b){return(this.options.resizeWidth||this.options.resizeHeight)&&a.type.match(/image.*/)?this.resizeImage(a,this.options.resizeWidth,this.options.resizeHeight,this.options.resizeMethod,b):b(a)},previewTemplate:'
\n
\n
\n
\n
\n
\n
\n
\n
\n \n Check\n \n \n \n \n \n
\n
\n \n Error\n \n \n \n \n \n \n \n
\n
',drop:function(a){return this.element.classList.remove("dz-drag-hover")},dragstart:function(a){},dragend:function(a){return this.element.classList.remove("dz-drag-hover")},dragenter:function(a){return this.element.classList.add("dz-drag-hover")},dragover:function(a){return this.element.classList.add("dz-drag-hover")},dragleave:function(a){return this.element.classList.remove("dz-drag-hover")},paste:function(a){},reset:function(){return this.element.classList.remove("dz-started")},addedfile:function(a){var c=this;if(this.element===this.previewsContainer&&this.element.classList.add("dz-started"),this.previewsContainer){a.previewElement=b.createElement(this.options.previewTemplate.trim()),a.previewTemplate=a.previewElement,this.previewsContainer.appendChild(a.previewElement);for(var d=a.previewElement.querySelectorAll("[data-dz-name]"),e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;g.textContent=a.name}for(var h=a.previewElement.querySelectorAll("[data-dz-size]"),i=0,h=h;!(i>=h.length);)g=h[i++],g.innerHTML=this.filesize(a.size);this.options.addRemoveLinks&&(a._removeLink=b.createElement(''+this.options.dictRemoveFile+""),a.previewElement.appendChild(a._removeLink));for(var j=function(d){return d.preventDefault(),d.stopPropagation(),a.status===b.UPLOADING?b.confirm(c.options.dictCancelUploadConfirmation,function(){return c.removeFile(a)}):c.options.dictRemoveFileConfirmation?b.confirm(c.options.dictRemoveFileConfirmation,function(){return c.removeFile(a)}):c.removeFile(a)},k=a.previewElement.querySelectorAll("[data-dz-remove]"),l=0,k=k;;){var m;if(l>=k.length)break;m=k[l++];m.addEventListener("click",j)}}},removedfile:function(a){return null!=a.previewElement&&null!=a.previewElement.parentNode&&a.previewElement.parentNode.removeChild(a.previewElement),this._updateMaxFilesReachedClass()},thumbnail:function(a,b){if(a.previewElement){a.previewElement.classList.remove("dz-file-preview");for(var c=a.previewElement.querySelectorAll("[data-dz-thumbnail]"),d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];var f=e;f.alt=a.name,f.src=b}return setTimeout(function(){return a.previewElement.classList.add("dz-image-preview")},1)}},error:function(a,b){if(a.previewElement){a.previewElement.classList.add("dz-error"),"String"!=typeof b&&b.error&&(b=b.error);for(var c=a.previewElement.querySelectorAll("[data-dz-errormessage]"),d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];e.textContent=b}}},errormultiple:function(){},processing:function(a){if(a.previewElement&&(a.previewElement.classList.add("dz-processing"),a._removeLink))return a._removeLink.textContent=this.options.dictCancelUpload},processingmultiple:function(){},uploadprogress:function(a,b,c){if(a.previewElement)for(var d=a.previewElement.querySelectorAll("[data-dz-uploadprogress]"),e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;"PROGRESS"===g.nodeName?g.value=b:g.style.width=b+"%"}},totaluploadprogress:function(){},sending:function(){},sendingmultiple:function(){},success:function(a){if(a.previewElement)return a.previewElement.classList.add("dz-success")},successmultiple:function(){},canceled:function(a){return this.emit("error",a,this.options.dictUploadCanceled)},canceledmultiple:function(){},complete:function(a){if(a._removeLink&&(a._removeLink.textContent=this.options.dictRemoveFile),a.previewElement)return a.previewElement.classList.add("dz-complete")},completemultiple:function(){},maxfilesexceeded:function(){},maxfilesreached:function(){},queuecomplete:function(){},addedfiles:function(){}},this.prototype._thumbnailQueue=[],this.prototype._processingThumbnail=!1}},{key:"extend",value:function(a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d=e.length)break;g=e[f++];var h=g;for(var i in h){var j=h[i];a[i]=j}}return a}}]),_createClass(b,[{key:"getAcceptedFiles",value:function(){return this.files.filter(function(a){return a.accepted}).map(function(a){return a})}},{key:"getRejectedFiles",value:function(){return this.files.filter(function(a){return!a.accepted}).map(function(a){return a})}},{key:"getFilesWithStatus",value:function(a){return this.files.filter(function(b){return b.status===a}).map(function(a){return a})}},{key:"getQueuedFiles",value:function(){return this.getFilesWithStatus(b.QUEUED)}},{key:"getUploadingFiles",value:function(){return this.getFilesWithStatus(b.UPLOADING)}},{key:"getAddedFiles",value:function(){return this.getFilesWithStatus(b.ADDED)}},{key:"getActiveFiles",value:function(){return this.files.filter(function(a){return a.status===b.UPLOADING||a.status===b.QUEUED}).map(function(a){return a})}},{key:"init",value:function(){var a=this;if("form"===this.element.tagName&&this.element.setAttribute("enctype","multipart/form-data"),this.element.classList.contains("dropzone")&&!this.element.querySelector(".dz-message")&&this.element.appendChild(b.createElement('
'+this.options.dictDefaultMessage+"
")),this.clickableElements.length){!function b(){return a.hiddenFileInput&&a.hiddenFileInput.parentNode.removeChild(a.hiddenFileInput),a.hiddenFileInput=document.createElement("input"),a.hiddenFileInput.setAttribute("type","file"),(null===a.options.maxFiles||a.options.maxFiles>1)&&a.hiddenFileInput.setAttribute("multiple","multiple"),a.hiddenFileInput.className="dz-hidden-input",null!==a.options.acceptedFiles&&a.hiddenFileInput.setAttribute("accept",a.options.acceptedFiles),null!==a.options.capture&&a.hiddenFileInput.setAttribute("capture",a.options.capture),a.hiddenFileInput.style.visibility="hidden",a.hiddenFileInput.style.position="absolute",a.hiddenFileInput.style.top="0",a.hiddenFileInput.style.left="0",a.hiddenFileInput.style.height="0",a.hiddenFileInput.style.width="0",document.querySelector(a.options.hiddenInputContainer).appendChild(a.hiddenFileInput),a.hiddenFileInput.addEventListener("change",function(){var c=a.hiddenFileInput.files;if(c.length)for(var d=c,e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;a.addFile(g)}return a.emit("addedfiles",c),b()})}()}this.URL=null!==window.URL?window.URL:window.webkitURL;for(var c=this.events,d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];var f=e;this.on(f,this.options[f])}this.on("uploadprogress",function(){return a.updateTotalUploadProgress()}),this.on("removedfile",function(){return a.updateTotalUploadProgress()}),this.on("canceled",function(b){return a.emit("complete",b)}),this.on("complete",function(b){if(0===a.getAddedFiles().length&&0===a.getUploadingFiles().length&&0===a.getQueuedFiles().length)return setTimeout(function(){return a.emit("queuecomplete")},0)});var g=function(a){return a.stopPropagation(),a.preventDefault?a.preventDefault():a.returnValue=!1};return this.listeners=[{element:this.element,events:{dragstart:function(b){return a.emit("dragstart",b)},dragenter:function(b){return g(b),a.emit("dragenter",b)},dragover:function(b){var c=void 0;try{c=b.dataTransfer.effectAllowed}catch(a){}return b.dataTransfer.dropEffect="move"===c||"linkMove"===c?"move":"copy",g(b),a.emit("dragover",b)},dragleave:function(b){return a.emit("dragleave",b)},drop:function(b){return g(b),a.drop(b)},dragend:function(b){return a.emit("dragend",b)}}}],this.clickableElements.forEach(function(c){return a.listeners.push({element:c,events:{click:function(d){return(c!==a.element||d.target===a.element||b.elementInside(d.target,a.element.querySelector(".dz-message")))&&a.hiddenFileInput.click(),!0}}})}),this.enable(),this.options.init.call(this)}},{key:"destroy",value:function(){return this.disable(),this.removeAllFiles(!0),(null!=this.hiddenFileInput?this.hiddenFileInput.parentNode:void 0)&&(this.hiddenFileInput.parentNode.removeChild(this.hiddenFileInput),this.hiddenFileInput=null),delete this.element.dropzone,b.instances.splice(b.instances.indexOf(this),1)}},{key:"updateTotalUploadProgress",value:function(){var a=void 0,b=0,c=0;if(this.getActiveFiles().length){for(var d=this.getActiveFiles(),e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;b+=g.upload.bytesSent,c+=g.upload.total}a=100*b/c}else a=100;return this.emit("totaluploadprogress",a,c,b)}},{key:"_getParamName",value:function(a){return"function"==typeof this.options.paramName?this.options.paramName(a):this.options.paramName+(this.options.uploadMultiple?"["+a+"]":"")}},{key:"_renameFile",value:function(a){return"function"!=typeof this.options.renameFile?a.name:this.options.renameFile(a)}},{key:"getFallbackForm",value:function(){var a=void 0,c=void 0;if(a=this.getExistingFallback())return a;var d='
';this.options.dictFallbackText&&(d+="

"+this.options.dictFallbackText+"

"),d+='
';var e=b.createElement(d);return"FORM"!==this.element.tagName?(c=b.createElement('
'),c.appendChild(e)):(this.element.setAttribute("enctype","multipart/form-data"),this.element.setAttribute("method",this.options.method)),null!=c?c:e}},{key:"getExistingFallback",value:function(){for(var a=["div","form"],b=0;b=b.length)break;d=b[c++];var e=d;if(/(^| )fallback($| )/.test(e.className))return e}}(this.element.getElementsByTagName(d)))return c}}},{key:"setupEventListeners",value:function(){return this.listeners.map(function(a){return function(){var b=[];for(var c in a.events){var d=a.events[c];b.push(a.element.addEventListener(c,d,!1))}return b}()})}},{key:"removeEventListeners",value:function(){return this.listeners.map(function(a){return function(){var b=[];for(var c in a.events){var d=a.events[c];b.push(a.element.removeEventListener(c,d,!1))}return b}()})}},{key:"disable",value:function(){var a=this;return this.clickableElements.forEach(function(a){return a.classList.remove("dz-clickable")}),this.removeEventListeners(),this.disabled=!0,this.files.map(function(b){return a.cancelUpload(b)})}},{key:"enable",value:function(){return delete this.disabled,this.clickableElements.forEach(function(a){return a.classList.add("dz-clickable")}),this.setupEventListeners()}},{key:"filesize",value:function(a){var b=0,c="b";if(a>0){for(var d=["tb","gb","mb","kb","b"],e=0;e=Math.pow(this.options.filesizeBase,4-e)/10){b=a/Math.pow(this.options.filesizeBase,4-e),c=f;break}}b=Math.round(10*b)/10}return""+b+" "+this.options.dictFileSizeUnits[c]}},{key:"_updateMaxFilesReachedClass",value:function(){return null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(this.getAcceptedFiles().length===this.options.maxFiles&&this.emit("maxfilesreached",this.files),this.element.classList.add("dz-max-files-reached")):this.element.classList.remove("dz-max-files-reached")}},{key:"drop",value:function(a){if(a.dataTransfer){this.emit("drop",a);var b=a.dataTransfer.files;if(this.emit("addedfiles",b),b.length){var c=a.dataTransfer.items;c&&c.length&&null!=c[0].webkitGetAsEntry?this._addFilesFromItems(c):this.handleFiles(b)}}}},{key:"paste",value:function(a){if(null!=__guard__(null!=a?a.clipboardData:void 0,function(a){return a.items})){this.emit("paste",a);var b=a.clipboardData.items;return b.length?this._addFilesFromItems(b):void 0}}},{key:"handleFiles",value:function(a){for(var b=a,c=0,b=b;;){var d;if(c>=b.length)break;d=b[c++];var e=d;this.addFile(e)}}},{key:"_addFilesFromItems",value:function(a){var b=this;return function(){for(var c=[],d=a,e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g,h=f;null!=h.webkitGetAsEntry&&(g=h.webkitGetAsEntry())?g.isFile?c.push(b.addFile(h.getAsFile())):g.isDirectory?c.push(b._addFilesFromDirectory(g,g.name)):c.push(void 0):null!=h.getAsFile&&(null==h.kind||"file"===h.kind)?c.push(b.addFile(h.getAsFile())):c.push(void 0)}return c}()}},{key:"_addFilesFromDirectory",value:function(a,b){var c=this,d=a.createReader(),e=function(a){return __guardMethod__(console,"log",function(b){return b.log(a)})};return function a(){return d.readEntries(function(d){if(d.length>0){for(var e=d,f=0,e=e;;){var g;if(f>=e.length)break;g=e[f++];var h=g;h.isFile?h.file(function(a){if(!c.options.ignoreHiddenFiles||"."!==a.name.substring(0,1))return a.fullPath=b+"/"+a.name,c.addFile(a)}):h.isDirectory&&c._addFilesFromDirectory(h,b+"/"+h.name)}a()}return null},e)}()}},{key:"accept",value:function(a,c){return a.size>1024*this.options.maxFilesize*1024?c(this.options.dictFileTooBig.replace("{{filesize}}",Math.round(a.size/1024/10.24)/100).replace("{{maxFilesize}}",this.options.maxFilesize)):b.isValidFile(a,this.options.acceptedFiles)?null!=this.options.maxFiles&&this.getAcceptedFiles().length>=this.options.maxFiles?(c(this.options.dictMaxFilesExceeded.replace("{{maxFiles}}",this.options.maxFiles)),this.emit("maxfilesexceeded",a)):this.options.accept.call(this,a,c):c(this.options.dictInvalidFileType)}},{key:"addFile",value:function(a){var c=this;return a.upload={uuid:b.uuidv4(),progress:0,total:a.size,bytesSent:0,filename:this._renameFile(a),chunked:this.options.chunking&&(this.options.forceChunking||a.size>this.options.chunkSize),totalChunkCount:Math.ceil(a.size/this.options.chunkSize)},this.files.push(a),a.status=b.ADDED,this.emit("addedfile",a),this._enqueueThumbnail(a),this.accept(a,function(b){return b?(a.accepted=!1,c._errorProcessing([a],b)):(a.accepted=!0,c.options.autoQueue&&c.enqueueFile(a)),c._updateMaxFilesReachedClass()})}},{key:"enqueueFiles",value:function(a){for(var b=a,c=0,b=b;;){var d;if(c>=b.length)break;d=b[c++];var e=d;this.enqueueFile(e)}return null}},{key:"enqueueFile",value:function(a){var c=this;if(a.status!==b.ADDED||!0!==a.accepted)throw new Error("This file can't be queued because it has already been processed or was rejected.");if(a.status=b.QUEUED,this.options.autoProcessQueue)return setTimeout(function(){return c.processQueue()},0)}},{key:"_enqueueThumbnail",value:function(a){var b=this;if(this.options.createImageThumbnails&&a.type.match(/image.*/)&&a.size<=1024*this.options.maxThumbnailFilesize*1024)return this._thumbnailQueue.push(a),setTimeout(function(){return b._processThumbnailQueue()},0)}},{key:"_processThumbnailQueue",value:function(){var a=this;if(!this._processingThumbnail&&0!==this._thumbnailQueue.length){this._processingThumbnail=!0;var b=this._thumbnailQueue.shift();return this.createThumbnail(b,this.options.thumbnailWidth,this.options.thumbnailHeight,this.options.thumbnailMethod,!0,function(c){return a.emit("thumbnail",b,c),a._processingThumbnail=!1,a._processThumbnailQueue()})}}},{key:"removeFile",value:function(a){if(a.status===b.UPLOADING&&this.cancelUpload(a),this.files=without(this.files,a),this.emit("removedfile",a),0===this.files.length)return this.emit("reset")}},{key:"removeAllFiles",value:function(a){null==a&&(a=!1);for(var c=this.files.slice(),d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];var f=e;(f.status!==b.UPLOADING||a)&&this.removeFile(f)}return null}},{key:"resizeImage",value:function(a,c,d,e,f){var g=this;return this.createThumbnail(a,c,d,e,!1,function(c,d){if(null==d)return f(a);var e=g.options.resizeMimeType;null==e&&(e=a.type);var h=d.toDataURL(e,g.options.resizeQuality);return"image/jpeg"!==e&&"image/jpg"!==e||(h=ExifRestore.restore(a.dataURL,h)),f(b.dataURItoBlob(h))})}},{key:"createThumbnail",value:function(a,b,c,d,e,f){var g=this,h=new FileReader;return h.onload=function(){return a.dataURL=h.result,"image/svg+xml"===a.type?void(null!=f&&f(h.result)):g.createThumbnailFromUrl(a,b,c,d,e,f)},h.readAsDataURL(a)}},{key:"createThumbnailFromUrl",value:function(a,b,c,d,e,f,g){var h=this,i=document.createElement("img");return g&&(i.crossOrigin=g),i.onload=function(){var g=function(a){return a(1)};return"undefined"!=typeof EXIF&&null!==EXIF&&e&&(g=function(a){return EXIF.getData(i,function(){return a(EXIF.getTag(this,"Orientation"))})}),g(function(e){a.width=i.width,a.height=i.height;var g=h.options.resize.call(h,a,b,c,d),j=document.createElement("canvas"),k=j.getContext("2d");switch(j.width=g.trgWidth,j.height=g.trgHeight,e>4&&(j.width=g.trgHeight,j.height=g.trgWidth),e){case 2:k.translate(j.width,0),k.scale(-1,1);break;case 3:k.translate(j.width,j.height),k.rotate(Math.PI);break;case 4:k.translate(0,j.height),k.scale(1,-1);break;case 5:k.rotate(.5*Math.PI),k.scale(1,-1);break;case 6:k.rotate(.5*Math.PI),k.translate(0,-j.height);break;case 7:k.rotate(.5*Math.PI),k.translate(j.width,-j.height),k.scale(-1,1);break;case 8:k.rotate(-.5*Math.PI),k.translate(-j.width,0)}drawImageIOSFix(k,i,null!=g.srcX?g.srcX:0,null!=g.srcY?g.srcY:0,g.srcWidth,g.srcHeight,null!=g.trgX?g.trgX:0,null!=g.trgY?g.trgY:0,g.trgWidth,g.trgHeight);var l=j.toDataURL("image/png");if(null!=f)return f(l,j)})},null!=f&&(i.onerror=f),i.src=a.dataURL}},{key:"processQueue",value:function(){var a=this.options.parallelUploads,b=this.getUploadingFiles().length,c=b;if(!(b>=a)){var d=this.getQueuedFiles();if(d.length>0){if(this.options.uploadMultiple)return this.processFiles(d.slice(0,a-b));for(;c=c.length)break;e=c[d++];var f=e;f.processing=!0,f.status=b.UPLOADING,this.emit("processing",f)}return this.options.uploadMultiple&&this.emit("processingmultiple",a),this.uploadFiles(a)}},{key:"_getFilesWithXhr",value:function(a){return this.files.filter(function(b){return b.xhr===a}).map(function(a){return a})}},{key:"cancelUpload",value:function(a){if(a.status===b.UPLOADING){for(var c=this._getFilesWithXhr(a.xhr),d=c,e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];f.status=b.CANCELED}void 0!==a.xhr&&a.xhr.abort();for(var g=c,h=0,g=g;;){var i;if(h>=g.length)break;i=g[h++];var j=i;this.emit("canceled",j)}this.options.uploadMultiple&&this.emit("canceledmultiple",c)}else a.status!==b.ADDED&&a.status!==b.QUEUED||(a.status=b.CANCELED,this.emit("canceled",a),this.options.uploadMultiple&&this.emit("canceledmultiple",[a]));if(this.options.autoProcessQueue)return this.processQueue()}},{key:"resolveOption",value:function(a){if("function"==typeof a){for(var b=arguments.length,c=Array(b>1?b-1:0),d=1;d=e.upload.totalChunkCount)){g++;var h=d*c.options.chunkSize,i=Math.min(h+c.options.chunkSize,e.size),j={name:c._getParamName(0),data:f.webkitSlice?f.webkitSlice(h,i):f.slice(h,i),filename:e.upload.filename,chunkIndex:d};e.upload.chunks[d]={file:e,index:d,dataBlock:j,status:b.UPLOADING,progress:0,retries:0},c._uploadData(a,[j])}};if(e.upload.finishedChunkUpload=function(d){var f=!0;d.status=b.SUCCESS,d.dataBlock=null;for(var g=0;g=f.length)break;h=f[g++];h.xhr=e}a[0].upload.chunked&&(a[0].upload.chunks[c[0].chunkIndex].xhr=e);var i=this.resolveOption(this.options.method,a),j=this.resolveOption(this.options.url,a);e.open(i,j,!0),e.timeout=this.resolveOption(this.options.timeout,a),e.withCredentials=!!this.options.withCredentials,e.onload=function(b){d._finishedUploading(a,e,b)},e.onerror=function(){d._handleUploadError(a,e)},(null!=e.upload?e.upload:e).onprogress=function(b){return d._updateFilesUploadProgress(a,e,b)};var k={Accept:"application/json","Cache-Control":"no-cache","X-Requested-With":"XMLHttpRequest"};this.options.headers&&b.extend(k,this.options.headers);for(var l in k){var m=k[l];m&&e.setRequestHeader(l,m)}var n=new FormData;if(this.options.params){var o=this.options.params;"function"==typeof o&&(o=o.call(this,a,e,a[0].upload.chunked?this._getChunk(a[0],e):null));for(var p in o){var q=o[p];n.append(p,q)}}for(var r=a,s=0,r=r;;){var t;if(s>=r.length)break;t=r[s++];var u=t;this.emit("sending",u,e,n)}this.options.uploadMultiple&&this.emit("sendingmultiple",a,e,n),this._addFormElementData(n);for(var v=0;v=b.length)break;d=b[c++];var e=d,f=e.getAttribute("name"),g=e.getAttribute("type");if(g&&(g=g.toLowerCase()),void 0!==f&&null!==f)if("SELECT"===e.tagName&&e.hasAttribute("multiple"))for(var h=e.options,i=0,h=h;;){var j;if(i>=h.length)break;j=h[i++];var k=j;k.selected&&a.append(f,k.value)}else(!g||"checkbox"!==g&&"radio"!==g||e.checked)&&a.append(f,e.value)}}},{key:"_updateFilesUploadProgress",value:function(a,b,c){var d=void 0;if(void 0!==c){if(d=100*c.loaded/c.total,a[0].upload.chunked){var e=a[0],f=this._getChunk(e,b);f.progress=d,f.total=c.total,f.bytesSent=c.loaded;e.upload.progress=0,e.upload.total=0,e.upload.bytesSent=0;for(var g=0;g=h.length)break;j=h[i++];var k=j;k.upload.progress=d,k.upload.total=c.total,k.upload.bytesSent=c.loaded}for(var l=a,m=0,l=l;;){var n;if(m>=l.length)break;n=l[m++];var o=n;this.emit("uploadprogress",o,o.upload.progress,o.upload.bytesSent)}}else{var p=!0;d=100;for(var q=a,r=0,q=q;;){var s;if(r>=q.length)break;s=q[r++];var t=s;100===t.upload.progress&&t.upload.bytesSent===t.upload.total||(p=!1),t.upload.progress=d,t.upload.bytesSent=t.upload.total}if(p)return;for(var u=a,v=0,u=u;;){var w;if(v>=u.length)break;w=u[v++];var x=w;this.emit("uploadprogress",x,d,x.upload.bytesSent)}}}},{key:"_finishedUploading",value:function(a,c,d){var e=void 0;if(a[0].status!==b.CANCELED&&4===c.readyState){if("arraybuffer"!==c.responseType&&"blob"!==c.responseType&&(e=c.responseText,c.getResponseHeader("content-type")&&~c.getResponseHeader("content-type").indexOf("application/json")))try{e=JSON.parse(e)}catch(a){d=a,e="Invalid JSON response from server."}this._updateFilesUploadProgress(a),200<=c.status&&c.status<300?a[0].upload.chunked?a[0].upload.finishedChunkUpload(this._getChunk(a[0],c)):this._finished(a,e,d):this._handleUploadError(a,c,e)}}},{key:"_handleUploadError",value:function(a,c,d){if(a[0].status!==b.CANCELED){if(a[0].upload.chunked&&this.options.retryChunks){var e=this._getChunk(a[0],c);if(e.retries++=f.length)break;f[g++];this._errorProcessing(a,d||this.options.dictResponseError.replace("{{statusCode}}",c.status),c)}}}},{key:"submitRequest",value:function(a,b,c){a.send(b)}},{key:"_finished",value:function(a,c,d){for(var e=a,f=0,e=e;;){var g;if(f>=e.length)break;g=e[f++];var h=g;h.status=b.SUCCESS,this.emit("success",h,c,d),this.emit("complete",h)}if(this.options.uploadMultiple&&(this.emit("successmultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue)return this.processQueue()}},{key:"_errorProcessing",value:function(a,c,d){for(var e=a,f=0,e=e;;){var g;if(f>=e.length)break;g=e[f++];var h=g;h.status=b.ERROR,this.emit("error",h,c,d),this.emit("complete",h)}if(this.options.uploadMultiple&&(this.emit("errormultiple",a,c,d),this.emit("completemultiple",a)),this.options.autoProcessQueue)return this.processQueue()}}],[{key:"uuidv4",value:function(){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,function(a){var b=16*Math.random()|0;return("x"===a?b:3&b|8).toString(16)})}}]),b}(Emitter);Dropzone.initClass(),Dropzone.version="5.3.1",Dropzone.options={},Dropzone.optionsForElement=function(a){return a.getAttribute("id")?Dropzone.options[camelize(a.getAttribute("id"))]:void 0},Dropzone.instances=[],Dropzone.forElement=function(a){if("string"==typeof a&&(a=document.querySelector(a)),null==(null!=a?a.dropzone:void 0))throw new Error("No Dropzone found for given element. This is probably because you're trying to access it before Dropzone had the time to initialize. Use the `init` option to setup any additional observers on your Dropzone.");return a.dropzone},Dropzone.autoDiscover=!0,Dropzone.discover=function(){var a=void 0;if(document.querySelectorAll)a=document.querySelectorAll(".dropzone");else{a=[];var b=function(b){return function(){for(var c=[],d=b,e=0,d=d;;){var f;if(e>=d.length)break;f=d[e++];var g=f;/(^| )dropzone($| )/.test(g.className)?c.push(a.push(g)):c.push(void 0)}return c}()};b(document.getElementsByTagName("div")),b(document.getElementsByTagName("form"))}return function(){for(var b=[],c=a,d=0,c=c;;){var e;if(d>=c.length)break;e=c[d++];var f=e;!1!==Dropzone.optionsForElement(f)?b.push(new Dropzone(f)):b.push(void 0)}return b}()},Dropzone.blacklistedBrowsers=[/opera.*(Macintosh|Windows Phone).*version\/12/i],Dropzone.isBrowserSupported=function(){var a=!0;if(window.File&&window.FileReader&&window.FileList&&window.Blob&&window.FormData&&document.querySelector)if("classList"in document.createElement("a"))for(var b=Dropzone.blacklistedBrowsers,c=0,b=b;;){var d;if(c>=b.length)break;d=b[c++];var e=d;e.test(navigator.userAgent)&&(a=!1)}else a=!1;else a=!1;return a},Dropzone.dataURItoBlob=function(a){for(var b=atob(a.split(",")[1]),c=a.split(",")[0].split(":")[1].split(";")[0],d=new ArrayBuffer(b.length),e=new Uint8Array(d),f=0,g=b.length,h=0<=g;h?f<=g:f>=g;h?f++:f--)e[f]=b.charCodeAt(f);return new Blob([d],{type:c})};var without=function(a,b){return a.filter(function(a){return a!==b}).map(function(a){return a})},camelize=function(a){return a.replace(/[\-_](\w)/g,function(a){return a.charAt(1).toUpperCase()})};Dropzone.createElement=function(a){var b=document.createElement("div");return b.innerHTML=a,b.childNodes[0]},Dropzone.elementInside=function(a,b){if(a===b)return!0;for(;a=a.parentNode;)if(a===b)return!0;return!1},Dropzone.getElement=function(a,b){var c=void 0;if("string"==typeof a?c=document.querySelector(a):null!=a.nodeType&&(c=a),null==c)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector or a plain HTML element.");return c},Dropzone.getElements=function(a,b){var c=void 0,d=void 0;if(a instanceof Array){d=[];try{for(var e=a,f=0,e=e;!(f>=e.length);)c=e[f++],d.push(this.getElement(c,b))}catch(a){d=null}}else if("string"==typeof a){d=[];for(var g=document.querySelectorAll(a),h=0,g=g;!(h>=g.length);)c=g[h++],d.push(c)}else null!=a.nodeType&&(d=[a]);if(null==d||!d.length)throw new Error("Invalid `"+b+"` option provided. Please provide a CSS selector, a plain HTML element or a list of those.");return d},Dropzone.confirm=function(a,b,c){return window.confirm(a)?b():null!=c?c():void 0},Dropzone.isValidFile=function(a,b){if(!b)return!0;b=b.split(",");for(var c=a.type,d=c.replace(/\/.*$/,""),e=b,f=0,e=e;;){var g;if(f>=e.length)break;g=e[f++];var h=g;if(h=h.trim(),"."===h.charAt(0)){if(-1!==a.name.toLowerCase().indexOf(h.toLowerCase(),a.name.length-h.length))return!0}else if(/\/\*$/.test(h)){if(d===h.replace(/\/.*$/,""))return!0}else if(c===h)return!0}return!1},"undefined"!=typeof jQuery&&null!==jQuery&&(jQuery.fn.dropzone=function(a){return this.each(function(){return new Dropzone(this,a)})}),"undefined"!=typeof module&&null!==module?module.exports=Dropzone:window.Dropzone=Dropzone,Dropzone.ADDED="added",Dropzone.QUEUED="queued",Dropzone.ACCEPTED=Dropzone.QUEUED,Dropzone.UPLOADING="uploading",Dropzone.PROCESSING=Dropzone.UPLOADING,Dropzone.CANCELED="canceled",Dropzone.ERROR="error",Dropzone.SUCCESS="success";var detectVerticalSquash=function(a){var b=(a.naturalWidth,a.naturalHeight),c=document.createElement("canvas");c.width=1,c.height=b;var d=c.getContext("2d");d.drawImage(a,0,0);for(var e=d.getImageData(1,0,1,b),f=e.data,g=0,h=b,i=b;i>g;){0===f[4*(i-1)+3]?h=i:g=i,i=h+g>>1}var j=i/b;return 0===j?1:j},drawImageIOSFix=function(a,b,c,d,e,f,g,h,i,j){var k=detectVerticalSquash(b);return a.drawImage(b,c,d,e,f,g,h,i,j/k)},ExifRestore=function(){function a(){_classCallCheck(this,a)}return _createClass(a,null,[{key:"initClass",value:function(){this.KEY_STR="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="}},{key:"encode64",value:function(a){for(var b="",c=void 0,d=void 0,e="",f=void 0,g=void 0,h=void 0,i="",j=0;;)if(c=a[j++],d=a[j++],e=a[j++],f=c>>2,g=(3&c)<<4|d>>4,h=(15&d)<<2|e>>6,i=63&e,isNaN(d)?h=i=64:isNaN(e)&&(i=64),b=b+this.KEY_STR.charAt(f)+this.KEY_STR.charAt(g)+this.KEY_STR.charAt(h)+this.KEY_STR.charAt(i),c=d=e="",f=g=h=i="",!(ja.length)break}return c}},{key:"decode64",value:function(a){var b=void 0,c=void 0,d="",e=void 0,f=void 0,g=void 0,h="",i=0,j=[],k=/[^A-Za-z0-9\+\/\=]/g;for(k.exec(a)&&console.warn("There were invalid base64 characters in the input text.\nValid base64 characters are A-Z, a-z, 0-9, '+', '/',and '='\nExpect errors in decoding."),a=a.replace(/[^A-Za-z0-9\+\/\=]/g,"");;)if(e=this.KEY_STR.indexOf(a.charAt(i++)),f=this.KEY_STR.indexOf(a.charAt(i++)),g=this.KEY_STR.indexOf(a.charAt(i++)),h=this.KEY_STR.indexOf(a.charAt(i++)),b=e<<2|f>>4,c=(15&f)<<4|g>>2,d=(3&g)<<6|h,j.push(b),64!==g&&j.push(c),64!==h&&j.push(d),b=c=d="",e=f=g=h="",!(i 0) { + var newFile = selection.items[0]; + if (options.propertyValue && options.propertyValue.length && newFile.fileGuid === options.propertyValue[0].fileGuid) { + return { + closeDialog: true + }; + } + + var event = new CustomEvent("updateProperty", + { + detail: { + value: [{ fileGuid: newFile.fileGuid }], + name: options.propertyName + } + }); + + editor.dispatchEvent(event); + } + + return { + closeDialog: true + }; + } + }; + window.kentico.modalDialog.contentSelector.open(dialogOptions); + }); + } + + var dropZone = new Dropzone(zone, + { + acceptedFiles: ".gif,.png,.jpg,.jpeg;.webp", + maxFiles: 1, + url: editor.getAttribute("data-url"), + createImageThumbnails: false, + clickable: clickable, + dictInvalidFileType: options.localizationService.getString( + "You can't upload files of this type.") + }); + + dropZone.on("success", + function (e) { + var content = JSON.parse(e.xhr.response); + + var event = new CustomEvent("updateProperty", + { + detail: { + value: isMediaFile ? [{ fileGuid: content.guid }] : content.guid, + name: options.propertyName + } + }); + + editor.dispatchEvent(event); + }); + }, + + destroy: function (options) { + var dropZone = options.editor.querySelector(".uploader").dropzone; + if (dropZone) { + dropZone.destroy(); + } + } + }); +})(); diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/SpinnerEditor/SpinnerEditor.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/SpinnerEditor/SpinnerEditor.css new file mode 100644 index 0000000..92f1555 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/SpinnerEditor/SpinnerEditor.css @@ -0,0 +1,72 @@ +.spinner-editor div.inline-editor-btn-group { + font-family: "Helvetica Neue", Helvetica, Arial, sans-serif; + font-size: 16px; + right: 1em; + top: 1em; + position: absolute; + z-index: 10000; + background-color: #262524; + border: 1px solid #383838; + border-radius: 2px; + opacity: 0.8; + -webkit-transition: background-color .2s ease-in; + transition: background-color .2s ease-in; +} + +.spinner-editor div.inline-editor-btn-group:hover { + opacity: 1.0; +} + +.spinner-editor div.inline-editor-btn-group ul { + margin: 0; + padding: 0; +} + +.spinner-editor div.inline-editor-btn-group li { + float: left; + list-style: none; + margin: 0; + padding: 0; +} + +.spinner-editor div.inline-editor-btn-group li:first-child button { + border-bottom-left-radius: 2px; + border-top-left-radius: 2px; +} + +.spinner-editor div.inline-editor-btn-group li:last-child button { + border-bottom-right-radius: 2px; + border-top-right-radius: 2px; +} + +.spinner-editor div.inline-editor-btn-group li button { + box-sizing: border-box; + cursor: pointer; + display: block; + font-size: 14px; + line-height: 1.33; + margin: 0; + padding: 15px; + text-decoration: none; + background-color: #262524; + border: 0; + color: #fff; + height: 50px; + min-width: 50px; + -webkit-transition: background-color .2s ease-in; + transition: background-color .2s ease-in; +} + +.spinner-editor div.inline-editor-btn-group li button:hover { + background-color: #383838; +} + +.spinner-editor div.inline-editor-btn-group li button:disabled { + background-color: #000; + color: #fff; + cursor: default; +} + +.spinner-editor div.inline-editor-btn-group li button:focus { + outline: none; +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/SpinnerEditor/spinner-editor.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/SpinnerEditor/spinner-editor.js new file mode 100644 index 0000000..0b3ae0b --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/SpinnerEditor/spinner-editor.js @@ -0,0 +1,33 @@ +(function () { + window.kentico.pageBuilder.registerInlineEditor("spinner-editor", { + init: function (options) { + var editor = options.editor; + editor.querySelector("#value-placeholder").innerText = options.propertyValue; + + var minusButton = editor.querySelector("#minus-btn"); + if (options.propertyValue < 2) { + minusButton.disabled = true; + } else { + minusButton.addEventListener("click", function () { + var event = new CustomEvent("updateProperty", { + detail: { + value: options.propertyValue - 1, + name: options.propertyName + } + }); + editor.dispatchEvent(event); + }); + } + + editor.querySelector("#plus-btn").addEventListener("click", function () { + var event = new CustomEvent("updateProperty", { + detail: { + value: options.propertyValue + 1, + name: options.propertyName + } + }); + editor.dispatchEvent(event); + }); + } + }); +})(); diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/TextEditor/TextEditor.css b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/TextEditor/TextEditor.css new file mode 100644 index 0000000..d53a0d1 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/TextEditor/TextEditor.css @@ -0,0 +1,13 @@ +.text-editor { + outline: none; + cursor: text; +} + + .text-editor:empty:before { + content: attr(data-placeholder-text); + color: #d6d9d6; + } + + .text-editor:not(:focus):hover { + background-color: rgba(155, 155, 155, 0.17); + } diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/TextEditor/text-editor.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/TextEditor/text-editor.js new file mode 100644 index 0000000..0a1bb70 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Admin/InlineEditors/TextEditor/text-editor.js @@ -0,0 +1,26 @@ +(function () { + window.kentico.pageBuilder.registerInlineEditor("text-editor", { + init: function (options) { + var editor = options.editor; + + editor.addEventListener("input", function () { + if (!this.textContent) { + // Clear the element when text content is empty because Firefox always + // keeps a
element in the contenteditable even when it's empty + // which prevents the css placeholder text from appearing. + this.innerHTML = ""; + } + + var event = new CustomEvent("updateProperty", { + detail: { + name: options.propertyName, + value: this.textContent, + refreshMarkup: false + } + }); + + editor.dispatchEvent(event); + }); + }, + }); +})(); diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Public/NewsletterSubscriptionWidget/replace-form.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Public/NewsletterSubscriptionWidget/replace-form.js new file mode 100644 index 0000000..3c94eca --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/PageBuilder/Public/NewsletterSubscriptionWidget/replace-form.js @@ -0,0 +1,13 @@ +function replaceForm(event) { + event.preventDefault(); + var form = event.target; + + $.ajax({ + method: "POST", + url: form.action, + data: $(form).serialize(), + success: function (data) { + $(form).replaceWith(data); + } + }); +} \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/addressSelector.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/addressSelector.js new file mode 100644 index 0000000..994cfa3 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/addressSelector.js @@ -0,0 +1,54 @@ +(function () { + 'use strict'; + + $('.js-address-selector-div').change(function () { + var $selectorDiv = $(this), + $addressDiv = $selectorDiv.parent(), + $selector = $selectorDiv.find('.js-address-selector'), + url = $selectorDiv.data('statelistaction'), + postData = { + addressId: $selector.val() + }; + + if (!postData.addressId) { + eraseFields($addressDiv); + return; + } + + $.post(url, postData, function (data) { + fillFields($addressDiv, data); + }); + }); + + function fillFields($addressDiv, data) { + fillBasicFields($addressDiv, data); + fillCountryStateFields($addressDiv, data); + } + + function fillBasicFields($addressDiv, data) { + var basicFields = $addressDiv.data('fields'), + addressType = $addressDiv.data('addresstype'); + + $.each(basicFields, function (i, val) { + var fieldId = '#' + addressType + '_' + addressType + val, + fieldVal = data[val]; + + $(fieldId).val(fieldVal); + }); + } + + function fillCountryStateFields($addressDiv, data) { + var $countryStateSelector = $addressDiv.find('.js-country-state-selector'), + countryField = $countryStateSelector.data('countryfield'), + stateField = $countryStateSelector.data('statefield'), + $countrySelector = $countryStateSelector.find('.js-country-selector'); + + $countryStateSelector.data('stateselectedid', data[stateField]); + $countrySelector.val(data[countryField]).change(); + } + + function eraseFields($addressDiv) { + var data = {}; + fillFields($addressDiv, data); + } +}()); diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/countryStateSelector.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/countryStateSelector.js new file mode 100644 index 0000000..80b6465 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/countryStateSelector.js @@ -0,0 +1,60 @@ +(function () { + 'use strict'; + + $('.js-country-selector').change(function () { + var $countrySelector = $(this), + $countryStateSelector = $countrySelector.parent('.js-country-state-selector'), + $stateSelector = $countryStateSelector.find('.js-state-selector'), + $stateSelectorContainer = $countryStateSelector.find('.js-state-selector-container'), + selectedStateId = $countryStateSelector.data('stateselectedid'), + url = $countryStateSelector.data('statelistaction'), + postData = { + countryId: $countrySelector.val() + }; + + $stateSelectorContainer.hide(); + + if (!postData.countryId) { + return; + } + + $.post(url, postData, function (data) { + $countryStateSelector.data('stateselectedid', 0); + $stateSelector.val(null); + + if (!data.length) { + return; + } + + fillStateSelector($stateSelector, data); + $stateSelectorContainer.show(); + + if (selectedStateId > 0) { + $stateSelector.val(selectedStateId); + } + }); + }); + + $('.js-country-state-selector').each(function () { + var $selector = $(this), + $countrySelector = $selector.find('.js-country-selector'), + countryId = $selector.data('countryselectedid'); + + if (countryId > 0) { + $countrySelector.val(countryId); + } + + $countrySelector.change(); + $selector.data('countryselectedid', 0); + }); + + function fillStateSelector($stateSelector, data) { + var items = ''; + + $.each(data, function (i, state) { + items += ''; + }); + + $stateSelector.html(items); + } +}()); \ No newline at end of file diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/formAutoPost.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/formAutoPost.js new file mode 100644 index 0000000..8559b17 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/formAutoPost.js @@ -0,0 +1,38 @@ + (function ($) { + 'use strict'; + + $.fn.formAutoPost = function (options) { + // Default settings + var settings = $.extend({ + targetContainerSelector: "#target-list", + url: "" + }, options); + + var onSuccess = function (data) { + $(settings.targetContainerSelector).html(data); + } + + var getAjaxParameters = function(htmlControl) { + var $form = $(htmlControl).closest("form"); + + return { + url: $form.attr("action"), + method: $form.attr("method"), + data: $form.serialize() + } + } + + var ajaxCall = function () { + var ajaxParams = getAjaxParameters(this); + $.ajax({ + method: ajaxParams.method, + url: ajaxParams.url, + data: ajaxParams.data, + success: onSuccess + }); + } + + return this.click(ajaxCall); + }; + +}(jQuery)); diff --git a/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/jquery-3.5.1.min.js b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/jquery-3.5.1.min.js new file mode 100644 index 0000000..b061403 --- /dev/null +++ b/src/Kentico.Xperience.Lucene.Sample/wwwroot/Scripts/jquery-3.5.1.min.js @@ -0,0 +1,2 @@ +/*! jQuery v3.5.1 | (c) JS Foundation and other contributors | jquery.org/license */ +!function(e,t){"use strict";"object"==typeof module&&"object"==typeof module.exports?module.exports=e.document?t(e,!0):function(e){if(!e.document)throw new Error("jQuery requires a window with a document");return t(e)}:t(e)}("undefined"!=typeof window?window:this,function(C,e){"use strict";var t=[],r=Object.getPrototypeOf,s=t.slice,g=t.flat?function(e){return t.flat.call(e)}:function(e){return t.concat.apply([],e)},u=t.push,i=t.indexOf,n={},o=n.toString,v=n.hasOwnProperty,a=v.toString,l=a.call(Object),y={},m=function(e){return"function"==typeof e&&"number"!=typeof e.nodeType},x=function(e){return null!=e&&e===e.window},E=C.document,c={type:!0,src:!0,nonce:!0,noModule:!0};function b(e,t,n){var r,i,o=(n=n||E).createElement("script");if(o.text=e,t)for(r in c)(i=t[r]||t.getAttribute&&t.getAttribute(r))&&o.setAttribute(r,i);n.head.appendChild(o).parentNode.removeChild(o)}function w(e){return null==e?e+"":"object"==typeof e||"function"==typeof e?n[o.call(e)]||"object":typeof e}var f="3.5.1",S=function(e,t){return new S.fn.init(e,t)};function p(e){var t=!!e&&"length"in e&&e.length,n=w(e);return!m(e)&&!x(e)&&("array"===n||0===t||"number"==typeof t&&0+~]|"+M+")"+M+"*"),U=new RegExp(M+"|>"),X=new RegExp(F),V=new RegExp("^"+I+"$"),G={ID:new RegExp("^#("+I+")"),CLASS:new RegExp("^\\.("+I+")"),TAG:new RegExp("^("+I+"|[*])"),ATTR:new RegExp("^"+W),PSEUDO:new RegExp("^"+F),CHILD:new RegExp("^:(only|first|last|nth|nth-last)-(child|of-type)(?:\\("+M+"*(even|odd|(([+-]|)(\\d*)n|)"+M+"*(?:([+-]|)"+M+"*(\\d+)|))"+M+"*\\)|)","i"),bool:new RegExp("^(?:"+R+")$","i"),needsContext:new RegExp("^"+M+"*[>+~]|:(even|odd|eq|gt|lt|nth|first|last)(?:\\("+M+"*((?:-\\d)?\\d*)"+M+"*\\)|)(?=[^-]|$)","i")},Y=/HTML$/i,Q=/^(?:input|select|textarea|button)$/i,J=/^h\d$/i,K=/^[^{]+\{\s*\[native \w/,Z=/^(?:#([\w-]+)|(\w+)|\.([\w-]+))$/,ee=/[+~]/,te=new RegExp("\\\\[\\da-fA-F]{1,6}"+M+"?|\\\\([^\\r\\n\\f])","g"),ne=function(e,t){var n="0x"+e.slice(1)-65536;return t||(n<0?String.fromCharCode(n+65536):String.fromCharCode(n>>10|55296,1023&n|56320))},re=/([\0-\x1f\x7f]|^-?\d)|^-$|[^\0-\x1f\x7f-\uFFFF\w-]/g,ie=function(e,t){return t?"\0"===e?"\ufffd":e.slice(0,-1)+"\\"+e.charCodeAt(e.length-1).toString(16)+" ":"\\"+e},oe=function(){T()},ae=be(function(e){return!0===e.disabled&&"fieldset"===e.nodeName.toLowerCase()},{dir:"parentNode",next:"legend"});try{H.apply(t=O.call(p.childNodes),p.childNodes),t[p.childNodes.length].nodeType}catch(e){H={apply:t.length?function(e,t){L.apply(e,O.call(t))}:function(e,t){var n=e.length,r=0;while(e[n++]=t[r++]);e.length=n-1}}}function se(t,e,n,r){var i,o,a,s,u,l,c,f=e&&e.ownerDocument,p=e?e.nodeType:9;if(n=n||[],"string"!=typeof t||!t||1!==p&&9!==p&&11!==p)return n;if(!r&&(T(e),e=e||C,E)){if(11!==p&&(u=Z.exec(t)))if(i=u[1]){if(9===p){if(!(a=e.getElementById(i)))return n;if(a.id===i)return n.push(a),n}else if(f&&(a=f.getElementById(i))&&y(e,a)&&a.id===i)return n.push(a),n}else{if(u[2])return H.apply(n,e.getElementsByTagName(t)),n;if((i=u[3])&&d.getElementsByClassName&&e.getElementsByClassName)return H.apply(n,e.getElementsByClassName(i)),n}if(d.qsa&&!N[t+" "]&&(!v||!v.test(t))&&(1!==p||"object"!==e.nodeName.toLowerCase())){if(c=t,f=e,1===p&&(U.test(t)||z.test(t))){(f=ee.test(t)&&ye(e.parentNode)||e)===e&&d.scope||((s=e.getAttribute("id"))?s=s.replace(re,ie):e.setAttribute("id",s=S)),o=(l=h(t)).length;while(o--)l[o]=(s?"#"+s:":scope")+" "+xe(l[o]);c=l.join(",")}try{return H.apply(n,f.querySelectorAll(c)),n}catch(e){N(t,!0)}finally{s===S&&e.removeAttribute("id")}}}return g(t.replace($,"$1"),e,n,r)}function ue(){var r=[];return function e(t,n){return r.push(t+" ")>b.cacheLength&&delete e[r.shift()],e[t+" "]=n}}function le(e){return e[S]=!0,e}function ce(e){var t=C.createElement("fieldset");try{return!!e(t)}catch(e){return!1}finally{t.parentNode&&t.parentNode.removeChild(t),t=null}}function fe(e,t){var n=e.split("|"),r=n.length;while(r--)b.attrHandle[n[r]]=t}function pe(e,t){var n=t&&e,r=n&&1===e.nodeType&&1===t.nodeType&&e.sourceIndex-t.sourceIndex;if(r)return r;if(n)while(n=n.nextSibling)if(n===t)return-1;return e?1:-1}function de(t){return function(e){return"input"===e.nodeName.toLowerCase()&&e.type===t}}function he(n){return function(e){var t=e.nodeName.toLowerCase();return("input"===t||"button"===t)&&e.type===n}}function ge(t){return function(e){return"form"in e?e.parentNode&&!1===e.disabled?"label"in e?"label"in e.parentNode?e.parentNode.disabled===t:e.disabled===t:e.isDisabled===t||e.isDisabled!==!t&&ae(e)===t:e.disabled===t:"label"in e&&e.disabled===t}}function ve(a){return le(function(o){return o=+o,le(function(e,t){var n,r=a([],e.length,o),i=r.length;while(i--)e[n=r[i]]&&(e[n]=!(t[n]=e[n]))})})}function ye(e){return e&&"undefined"!=typeof e.getElementsByTagName&&e}for(e in d=se.support={},i=se.isXML=function(e){var t=e.namespaceURI,n=(e.ownerDocument||e).documentElement;return!Y.test(t||n&&n.nodeName||"HTML")},T=se.setDocument=function(e){var t,n,r=e?e.ownerDocument||e:p;return r!=C&&9===r.nodeType&&r.documentElement&&(a=(C=r).documentElement,E=!i(C),p!=C&&(n=C.defaultView)&&n.top!==n&&(n.addEventListener?n.addEventListener("unload",oe,!1):n.attachEvent&&n.attachEvent("onunload",oe)),d.scope=ce(function(e){return a.appendChild(e).appendChild(C.createElement("div")),"undefined"!=typeof e.querySelectorAll&&!e.querySelectorAll(":scope fieldset div").length}),d.attributes=ce(function(e){return e.className="i",!e.getAttribute("className")}),d.getElementsByTagName=ce(function(e){return e.appendChild(C.createComment("")),!e.getElementsByTagName("*").length}),d.getElementsByClassName=K.test(C.getElementsByClassName),d.getById=ce(function(e){return a.appendChild(e).id=S,!C.getElementsByName||!C.getElementsByName(S).length}),d.getById?(b.filter.ID=function(e){var t=e.replace(te,ne);return function(e){return e.getAttribute("id")===t}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n=t.getElementById(e);return n?[n]:[]}}):(b.filter.ID=function(e){var n=e.replace(te,ne);return function(e){var t="undefined"!=typeof e.getAttributeNode&&e.getAttributeNode("id");return t&&t.value===n}},b.find.ID=function(e,t){if("undefined"!=typeof t.getElementById&&E){var n,r,i,o=t.getElementById(e);if(o){if((n=o.getAttributeNode("id"))&&n.value===e)return[o];i=t.getElementsByName(e),r=0;while(o=i[r++])if((n=o.getAttributeNode("id"))&&n.value===e)return[o]}return[]}}),b.find.TAG=d.getElementsByTagName?function(e,t){return"undefined"!=typeof t.getElementsByTagName?t.getElementsByTagName(e):d.qsa?t.querySelectorAll(e):void 0}:function(e,t){var n,r=[],i=0,o=t.getElementsByTagName(e);if("*"===e){while(n=o[i++])1===n.nodeType&&r.push(n);return r}return o},b.find.CLASS=d.getElementsByClassName&&function(e,t){if("undefined"!=typeof t.getElementsByClassName&&E)return t.getElementsByClassName(e)},s=[],v=[],(d.qsa=K.test(C.querySelectorAll))&&(ce(function(e){var t;a.appendChild(e).innerHTML="",e.querySelectorAll("[msallowcapture^='']").length&&v.push("[*^$]="+M+"*(?:''|\"\")"),e.querySelectorAll("[selected]").length||v.push("\\["+M+"*(?:value|"+R+")"),e.querySelectorAll("[id~="+S+"-]").length||v.push("~="),(t=C.createElement("input")).setAttribute("name",""),e.appendChild(t),e.querySelectorAll("[name='']").length||v.push("\\["+M+"*name"+M+"*="+M+"*(?:''|\"\")"),e.querySelectorAll(":checked").length||v.push(":checked"),e.querySelectorAll("a#"+S+"+*").length||v.push(".#.+[+~]"),e.querySelectorAll("\\\f"),v.push("[\\r\\n\\f]")}),ce(function(e){e.innerHTML="";var t=C.createElement("input");t.setAttribute("type","hidden"),e.appendChild(t).setAttribute("name","D"),e.querySelectorAll("[name=d]").length&&v.push("name"+M+"*[*^$|!~]?="),2!==e.querySelectorAll(":enabled").length&&v.push(":enabled",":disabled"),a.appendChild(e).disabled=!0,2!==e.querySelectorAll(":disabled").length&&v.push(":enabled",":disabled"),e.querySelectorAll("*,:x"),v.push(",.*:")})),(d.matchesSelector=K.test(c=a.matches||a.webkitMatchesSelector||a.mozMatchesSelector||a.oMatchesSelector||a.msMatchesSelector))&&ce(function(e){d.disconnectedMatch=c.call(e,"*"),c.call(e,"[s!='']:x"),s.push("!=",F)}),v=v.length&&new RegExp(v.join("|")),s=s.length&&new RegExp(s.join("|")),t=K.test(a.compareDocumentPosition),y=t||K.test(a.contains)?function(e,t){var n=9===e.nodeType?e.documentElement:e,r=t&&t.parentNode;return e===r||!(!r||1!==r.nodeType||!(n.contains?n.contains(r):e.compareDocumentPosition&&16&e.compareDocumentPosition(r)))}:function(e,t){if(t)while(t=t.parentNode)if(t===e)return!0;return!1},D=t?function(e,t){if(e===t)return l=!0,0;var n=!e.compareDocumentPosition-!t.compareDocumentPosition;return n||(1&(n=(e.ownerDocument||e)==(t.ownerDocument||t)?e.compareDocumentPosition(t):1)||!d.sortDetached&&t.compareDocumentPosition(e)===n?e==C||e.ownerDocument==p&&y(p,e)?-1:t==C||t.ownerDocument==p&&y(p,t)?1:u?P(u,e)-P(u,t):0:4&n?-1:1)}:function(e,t){if(e===t)return l=!0,0;var n,r=0,i=e.parentNode,o=t.parentNode,a=[e],s=[t];if(!i||!o)return e==C?-1:t==C?1:i?-1:o?1:u?P(u,e)-P(u,t):0;if(i===o)return pe(e,t);n=e;while(n=n.parentNode)a.unshift(n);n=t;while(n=n.parentNode)s.unshift(n);while(a[r]===s[r])r++;return r?pe(a[r],s[r]):a[r]==p?-1:s[r]==p?1:0}),C},se.matches=function(e,t){return se(e,null,null,t)},se.matchesSelector=function(e,t){if(T(e),d.matchesSelector&&E&&!N[t+" "]&&(!s||!s.test(t))&&(!v||!v.test(t)))try{var n=c.call(e,t);if(n||d.disconnectedMatch||e.document&&11!==e.document.nodeType)return n}catch(e){N(t,!0)}return 0":{dir:"parentNode",first:!0}," ":{dir:"parentNode"},"+":{dir:"previousSibling",first:!0},"~":{dir:"previousSibling"}},preFilter:{ATTR:function(e){return e[1]=e[1].replace(te,ne),e[3]=(e[3]||e[4]||e[5]||"").replace(te,ne),"~="===e[2]&&(e[3]=" "+e[3]+" "),e.slice(0,4)},CHILD:function(e){return e[1]=e[1].toLowerCase(),"nth"===e[1].slice(0,3)?(e[3]||se.error(e[0]),e[4]=+(e[4]?e[5]+(e[6]||1):2*("even"===e[3]||"odd"===e[3])),e[5]=+(e[7]+e[8]||"odd"===e[3])):e[3]&&se.error(e[0]),e},PSEUDO:function(e){var t,n=!e[6]&&e[2];return G.CHILD.test(e[0])?null:(e[3]?e[2]=e[4]||e[5]||"":n&&X.test(n)&&(t=h(n,!0))&&(t=n.indexOf(")",n.length-t)-n.length)&&(e[0]=e[0].slice(0,t),e[2]=n.slice(0,t)),e.slice(0,3))}},filter:{TAG:function(e){var t=e.replace(te,ne).toLowerCase();return"*"===e?function(){return!0}:function(e){return e.nodeName&&e.nodeName.toLowerCase()===t}},CLASS:function(e){var t=m[e+" "];return t||(t=new RegExp("(^|"+M+")"+e+"("+M+"|$)"))&&m(e,function(e){return t.test("string"==typeof e.className&&e.className||"undefined"!=typeof e.getAttribute&&e.getAttribute("class")||"")})},ATTR:function(n,r,i){return function(e){var t=se.attr(e,n);return null==t?"!="===r:!r||(t+="","="===r?t===i:"!="===r?t!==i:"^="===r?i&&0===t.indexOf(i):"*="===r?i&&-1:\x20\t\r\n\f]*)[\x20\t\r\n\f]*\/?>(?:<\/\1>|)$/i;function D(e,n,r){return m(n)?S.grep(e,function(e,t){return!!n.call(e,t,e)!==r}):n.nodeType?S.grep(e,function(e){return e===n!==r}):"string"!=typeof n?S.grep(e,function(e){return-1)[^>]*|#([\w-]+))$/;(S.fn.init=function(e,t,n){var r,i;if(!e)return this;if(n=n||j,"string"==typeof e){if(!(r="<"===e[0]&&">"===e[e.length-1]&&3<=e.length?[null,e,null]:q.exec(e))||!r[1]&&t)return!t||t.jquery?(t||n).find(e):this.constructor(t).find(e);if(r[1]){if(t=t instanceof S?t[0]:t,S.merge(this,S.parseHTML(r[1],t&&t.nodeType?t.ownerDocument||t:E,!0)),N.test(r[1])&&S.isPlainObject(t))for(r in t)m(this[r])?this[r](t[r]):this.attr(r,t[r]);return this}return(i=E.getElementById(r[2]))&&(this[0]=i,this.length=1),this}return e.nodeType?(this[0]=e,this.length=1,this):m(e)?void 0!==n.ready?n.ready(e):e(S):S.makeArray(e,this)}).prototype=S.fn,j=S(E);var L=/^(?:parents|prev(?:Until|All))/,H={children:!0,contents:!0,next:!0,prev:!0};function O(e,t){while((e=e[t])&&1!==e.nodeType);return e}S.fn.extend({has:function(e){var t=S(e,this),n=t.length;return this.filter(function(){for(var e=0;e\x20\t\r\n\f]*)/i,he=/^$|^module$|\/(?:java|ecma)script/i;ce=E.createDocumentFragment().appendChild(E.createElement("div")),(fe=E.createElement("input")).setAttribute("type","radio"),fe.setAttribute("checked","checked"),fe.setAttribute("name","t"),ce.appendChild(fe),y.checkClone=ce.cloneNode(!0).cloneNode(!0).lastChild.checked,ce.innerHTML="",y.noCloneChecked=!!ce.cloneNode(!0).lastChild.defaultValue,ce.innerHTML="",y.option=!!ce.lastChild;var ge={thead:[1,"","
"],col:[2,"","
"],tr:[2,"","
"],td:[3,"","
"],_default:[0,"",""]};function ve(e,t){var n;return n="undefined"!=typeof e.getElementsByTagName?e.getElementsByTagName(t||"*"):"undefined"!=typeof e.querySelectorAll?e.querySelectorAll(t||"*"):[],void 0===t||t&&A(e,t)?S.merge([e],n):n}function ye(e,t){for(var n=0,r=e.length;n",""]);var me=/<|&#?\w+;/;function xe(e,t,n,r,i){for(var o,a,s,u,l,c,f=t.createDocumentFragment(),p=[],d=0,h=e.length;d\s*$/g;function qe(e,t){return A(e,"table")&&A(11!==t.nodeType?t:t.firstChild,"tr")&&S(e).children("tbody")[0]||e}function Le(e){return e.type=(null!==e.getAttribute("type"))+"/"+e.type,e}function He(e){return"true/"===(e.type||"").slice(0,5)?e.type=e.type.slice(5):e.removeAttribute("type"),e}function Oe(e,t){var n,r,i,o,a,s;if(1===t.nodeType){if(Y.hasData(e)&&(s=Y.get(e).events))for(i in Y.remove(t,"handle events"),s)for(n=0,r=s[i].length;n").attr(n.scriptAttrs||{}).prop({charset:n.scriptCharset,src:n.url}).on("load error",i=function(e){r.remove(),i=null,e&&t("error"===e.type?404:200,e.type)}),E.head.appendChild(r[0])},abort:function(){i&&i()}}});var Ut,Xt=[],Vt=/(=)\?(?=&|$)|\?\?/;S.ajaxSetup({jsonp:"callback",jsonpCallback:function(){var e=Xt.pop()||S.expando+"_"+Ct.guid++;return this[e]=!0,e}}),S.ajaxPrefilter("json jsonp",function(e,t,n){var r,i,o,a=!1!==e.jsonp&&(Vt.test(e.url)?"url":"string"==typeof e.data&&0===(e.contentType||"").indexOf("application/x-www-form-urlencoded")&&Vt.test(e.data)&&"data");if(a||"jsonp"===e.dataTypes[0])return r=e.jsonpCallback=m(e.jsonpCallback)?e.jsonpCallback():e.jsonpCallback,a?e[a]=e[a].replace(Vt,"$1"+r):!1!==e.jsonp&&(e.url+=(Et.test(e.url)?"&":"?")+e.jsonp+"="+r),e.converters["script json"]=function(){return o||S.error(r+" was not called"),o[0]},e.dataTypes[0]="json",i=C[r],C[r]=function(){o=arguments},n.always(function(){void 0===i?S(C).removeProp(r):C[r]=i,e[r]&&(e.jsonpCallback=t.jsonpCallback,Xt.push(r)),o&&m(i)&&i(o[0]),o=i=void 0}),"script"}),y.createHTMLDocument=((Ut=E.implementation.createHTMLDocument("").body).innerHTML="
",2===Ut.childNodes.length),S.parseHTML=function(e,t,n){return"string"!=typeof e?[]:("boolean"==typeof t&&(n=t,t=!1),t||(y.createHTMLDocument?((r=(t=E.implementation.createHTMLDocument("")).createElement("base")).href=E.location.href,t.head.appendChild(r)):t=E),o=!n&&[],(i=N.exec(e))?[t.createElement(i[1])]:(i=xe([e],t,o),o&&o.length&&S(o).remove(),S.merge([],i.childNodes)));var r,i,o},S.fn.load=function(e,t,n){var r,i,o,a=this,s=e.indexOf(" ");return-1").append(S.parseHTML(e)).find(r):e)}).always(n&&function(e,t){a.each(function(){n.apply(this,o||[e.responseText,t,e])})}),this},S.expr.pseudos.animated=function(t){return S.grep(S.timers,function(e){return t===e.elem}).length},S.offset={setOffset:function(e,t,n){var r,i,o,a,s,u,l=S.css(e,"position"),c=S(e),f={};"static"===l&&(e.style.position="relative"),s=c.offset(),o=S.css(e,"top"),u=S.css(e,"left"),("absolute"===l||"fixed"===l)&&-1<(o+u).indexOf("auto")?(a=(r=c.position()).top,i=r.left):(a=parseFloat(o)||0,i=parseFloat(u)||0),m(t)&&(t=t.call(e,n,S.extend({},s))),null!=t.top&&(f.top=t.top-s.top+a),null!=t.left&&(f.left=t.left-s.left+i),"using"in t?t.using.call(e,f):("number"==typeof f.top&&(f.top+="px"),"number"==typeof f.left&&(f.left+="px"),c.css(f))}},S.fn.extend({offset:function(t){if(arguments.length)return void 0===t?this:this.each(function(e){S.offset.setOffset(this,t,e)});var e,n,r=this[0];return r?r.getClientRects().length?(e=r.getBoundingClientRect(),n=r.ownerDocument.defaultView,{top:e.top+n.pageYOffset,left:e.left+n.pageXOffset}):{top:0,left:0}:void 0},position:function(){if(this[0]){var e,t,n,r=this[0],i={top:0,left:0};if("fixed"===S.css(r,"position"))t=r.getBoundingClientRect();else{t=this.offset(),n=r.ownerDocument,e=r.offsetParent||n.documentElement;while(e&&(e===n.body||e===n.documentElement)&&"static"===S.css(e,"position"))e=e.parentNode;e&&e!==r&&1===e.nodeType&&((i=S(e).offset()).top+=S.css(e,"borderTopWidth",!0),i.left+=S.css(e,"borderLeftWidth",!0))}return{top:t.top-i.top-S.css(r,"marginTop",!0),left:t.left-i.left-S.css(r,"marginLeft",!0)}}},offsetParent:function(){return this.map(function(){var e=this.offsetParent;while(e&&"static"===S.css(e,"position"))e=e.offsetParent;return e||re})}}),S.each({scrollLeft:"pageXOffset",scrollTop:"pageYOffset"},function(t,i){var o="pageYOffset"===i;S.fn[t]=function(e){return $(this,function(e,t,n){var r;if(x(e)?r=e:9===e.nodeType&&(r=e.defaultView),void 0===n)return r?r[i]:e[t];r?r.scrollTo(o?r.pageXOffset:n,o?n:r.pageYOffset):e[t]=n},t,e,arguments.length)}}),S.each(["top","left"],function(e,n){S.cssHooks[n]=$e(y.pixelPosition,function(e,t){if(t)return t=Be(e,n),Me.test(t)?S(e).position()[n]+"px":t})}),S.each({Height:"height",Width:"width"},function(a,s){S.each({padding:"inner"+a,content:s,"":"outer"+a},function(r,o){S.fn[o]=function(e,t){var n=arguments.length&&(r||"boolean"!=typeof e),i=r||(!0===e||!0===t?"margin":"border");return $(this,function(e,t,n){var r;return x(e)?0===o.indexOf("outer")?e["inner"+a]:e.document.documentElement["client"+a]:9===e.nodeType?(r=e.documentElement,Math.max(e.body["scroll"+a],r["scroll"+a],e.body["offset"+a],r["offset"+a],r["client"+a])):void 0===n?S.css(e,t,i):S.style(e,t,n,i)},s,n?e:void 0,n)}})}),S.each(["ajaxStart","ajaxStop","ajaxComplete","ajaxError","ajaxSuccess","ajaxSend"],function(e,t){S.fn[t]=function(e){return this.on(t,e)}}),S.fn.extend({bind:function(e,t,n){return this.on(e,null,t,n)},unbind:function(e,t){return this.off(e,null,t)},delegate:function(e,t,n,r){return this.on(t,e,n,r)},undelegate:function(e,t,n){return 1===arguments.length?this.off(e,"**"):this.off(t,e||"**",n)},hover:function(e,t){return this.mouseenter(e).mouseleave(t||e)}}),S.each("blur focus focusin focusout resize scroll click dblclick mousedown mouseup mousemove mouseover mouseout mouseenter mouseleave change select submit keydown keypress keyup contextmenu".split(" "),function(e,n){S.fn[n]=function(e,t){return 0 { + // if menu is active and if target is not menu and its children nor menu toggle button and its children + if ($menu.hasClass('active') && !$menu.is(e.target) && $menu.has(e.target).length === 0 && !$navToggle.is(e.target) && $navToggle.has(e.target).length === 0) { + e.stopPropagation(); + $navToggle.removeClass('active'); + $menu.removeClass('active'); + } + }); +})(jQuery); \ No newline at end of file