├── .gitattributes ├── .gitignore ├── .idea ├── .idea.ImageResizer.Plugins.EPiServerBlobReader │ ├── .idea │ │ ├── contentModel.xml │ │ ├── modules.xml │ │ ├── vcs.xml │ │ └── workspace.xml │ └── riderModule.iml └── config │ └── applicationhost.config ├── .nuget ├── ImageResizer.Plugins.EPiServerBlobReader.4.0.3.nupkg ├── ImageResizer.Plugins.EPiServerBlobReader.4.1.0.nupkg ├── ImageResizer.Plugins.EPiServerBlobReader.4.1.1.nupkg ├── ImageResizer.Plugins.EPiServerBlobReader.4.1.2.nupkg ├── ImageResizer.Plugins.EPiServerBlobReader.5.0.0.nupkg ├── ImageResizer.Plugins.EPiServerBlobReader.5.0.1.nupkg ├── NuGet.Config ├── NuGet.exe └── NuGet.targets ├── .vs ├── ImageResizer.Plugins.EPiServerBlobReader │ └── v15 │ │ └── sqlite3 │ │ └── storage.ide └── config │ └── applicationhost.config ├── .whitesource ├── ImageResizer.Plugins.EPiServerBlobReader.sln ├── LICENSE ├── README.md ├── appveyor.yml ├── build-packages.ps1 ├── nuget.config ├── samples └── SampleAlloy │ ├── .vs │ └── config │ │ └── applicationhost.config │ ├── App_Data │ ├── DefaultSiteContent.episerverdata │ ├── EPiServerDB_0c090946.mdf │ ├── EPiServerDB_0c090946_log.ldf │ ├── GeoLiteCity.dat │ └── blobs │ │ ├── 04c39f885afc472dba493df1059d7dcf │ │ ├── cae89f0e7ae948fdb54fecdd053c564e.jpg │ │ └── cae89f0e7ae948fdb54fecdd053c564e_Thumbnail.png │ │ ├── 0956602fde60432796c2539e6b1513a6 │ │ └── 36444e66f2354570b131138f502e14d4.png │ │ ├── 0a05d40300484441ab3ab7efb3c5ff47 │ │ ├── 75d7df6a429c47788e19f2430d98b9f5.jpg │ │ └── 75d7df6a429c47788e19f2430d98b9f5_Thumbnail.png │ │ ├── 16431fe5497e4c07ba9ca12649839178 │ │ ├── 70459ec5e4204f098a6b758116a9214c.jpg │ │ ├── 70459ec5e4204f098a6b758116a9214c_Thumbnail.png │ │ ├── 7cd2d349bacb4d199068d57dfd8bc99a.jpg │ │ ├── 7cd2d349bacb4d199068d57dfd8bc99a_Thumbnail.png │ │ ├── f108f6db08d3413292f65fdcec098317.jpg │ │ └── f108f6db08d3413292f65fdcec098317_Thumbnail.png │ │ ├── 1b98ffe54a7f480390e084067aa531bf │ │ └── 4f5f01fe279d4e468b5ac5334b34134f.png │ │ ├── 2959213efa18420585e87b0421e8e0ad │ │ └── 0a3b3bfc98c644458cf557c98a999c1a.jpg │ │ ├── 2b07e4a981b54a6184b349529d832b19 │ │ └── 7dc53b1842e240979311291983a7ae66.png │ │ ├── 385914972f1247eb988a00a2111d1568 │ │ ├── 1a8e1607451f46508bc92399484aac6b.png │ │ └── 1a8e1607451f46508bc92399484aac6b_Thumbnail.png │ │ ├── 3e2aea8fa94e4c7eabf0c716d789441b │ │ └── bd34e19f5c0f4a2ba1c1c8d5f01808ae.png │ │ ├── 3f9f47bfa9494c85b9abdbd8ff974bf5 │ │ ├── 78e08f306fc44c03888da8bab14fee3e.png │ │ └── 78e08f306fc44c03888da8bab14fee3e_Thumbnail.png │ │ ├── 485da84c6aa24710956343e600c43383 │ │ ├── 70e2f2a3857c4835854583b796422ac1.jpg │ │ ├── 70e2f2a3857c4835854583b796422ac1_Thumbnail.png │ │ ├── 7e744850dde3494380e50fee03b3957f.jpg │ │ ├── 7e744850dde3494380e50fee03b3957f_Thumbnail.png │ │ ├── faa3c4dc86b742f3aa0722c5e6e23150.jpg │ │ └── faa3c4dc86b742f3aa0722c5e6e23150_Thumbnail.png │ │ ├── 55b1016baab14dad8d6c079103c8eafa │ │ └── 649294cc796f41929a1965718dffd37a.png │ │ ├── 5af4bc6f408a4aecbf035030ecc1acb4 │ │ └── 0b29c9305eda43dd83e3981a6ed3a82d.png │ │ ├── 619fca8204e540eea7352f3cab7bf409 │ │ └── 642752e9ab914dbc8bfbff7b158c1a0b.jpg │ │ ├── 6580dc8e964c48bbadb623e1a0d264c8 │ │ └── 364d4d07c3fa4f8db401ce9504688eec.png │ │ ├── 6b82b8fb94e14e16adeba55c98c097ee │ │ ├── 437e8e5ea7fe4b8aaf12fac8fc22803d.jpg │ │ └── 437e8e5ea7fe4b8aaf12fac8fc22803d_Thumbnail.png │ │ ├── 6c589d8500114c199fd3d81def407e99 │ │ └── ad15c26de9ae4961bb2684c9fc0e3a22.jpg │ │ ├── 6db33dddfe7d483389ed4e594f3aa9c7 │ │ └── 4744fa764ccc4f51876166ac614abe10.png │ │ ├── 70a64edfbd194df18aa4d3d58f37ceb9 │ │ └── 0e06c4e11a794b428ab4f881663b88e8.png │ │ ├── 71ed7c742b50482c904a3d709778788f │ │ └── 4e473727445d48b983ee4b7dd5900e83.png │ │ ├── 7b0d1ede33fa449796bfe3996edb19c1 │ │ └── c101fa5b5d844132bd6e0662c89fdd91.png │ │ ├── 7cba394531e14500bd7386afc319d76a │ │ └── 930770cbd8c9437da02cb1c0468945c2.jpg │ │ ├── 838ccaa44766447685ccc4882d91ab03 │ │ └── f08006eb5ef94dcb812559722f8de4d0.jpg │ │ ├── 8c419ee724d64b229d41a481a24547b2 │ │ └── eb53bd3a3bd442d98db93e8d2c3fc1af.png │ │ ├── 9643b398b9b54077bd58076b1fa0bed2 │ │ ├── 2365ec05c19e421a8c7091c2c5c23668.jpg │ │ └── 2365ec05c19e421a8c7091c2c5c23668_Thumbnail.png │ │ ├── a1cc1e4f5ce246998eadfac9c02f66e5 │ │ ├── 5a088065e37b4f52a286c3f91da0bfc4.jpg │ │ └── 5a088065e37b4f52a286c3f91da0bfc4_Thumbnail.png │ │ ├── a6d100507f77406a96a22996e0d3b931 │ │ └── ccdc110de0d64864b73fcb36c1b77a53.png │ │ ├── a9ce5401d5004ad392842dfeb1e38b34 │ │ └── 92c46e048fef43d6978fb9afed9f5aaa.jpg │ │ ├── ab5268d5ee9e4392855655118cabbc09 │ │ └── 14a448bd83c44587807a4aab90d730b1.png │ │ ├── b0566dc0e85341769c7fa737a432dacd │ │ └── 9b4566cb57114c5d82f8b011b3317164.png │ │ ├── b1f3bff6e0514ef69b4b677d094645c3 │ │ └── 7dba176dd85e4d898462b6f11111b163.png │ │ ├── befd120cd540407d9d94d5fc4d54cd5f │ │ └── ecc95455fbcf46dfb11d8a8515dacf79.jpg │ │ ├── c2659179c10448a29820bd581005990c │ │ └── 2aedf124d98949208342b1ec395f07c3.png │ │ ├── c60dd07e8559431eb13b7605feb8ef55 │ │ └── 415137265cd848ce8736d489f047c8c3.png │ │ ├── c9fcce3cc5824a078d3b7d33f06126f0 │ │ └── 723817a183ac4ada82e87421f1bf4033.png │ │ ├── ccd2f2e8076b4dbdbce8b75d7918d9b2 │ │ ├── 6598d114649f403494a5e39ae0e52e12.png │ │ └── 6598d114649f403494a5e39ae0e52e12_Thumbnail.png │ │ ├── cdc27a7cc2aa4a93b4109ceb0554ecef │ │ └── 4e5447acdec14f9d9e64357b785304fd.png │ │ ├── d21063e61e074553918aa0ac7968b653 │ │ └── 17183bbd93a049bb9911f4baeebeff3e.png │ │ ├── d3c3dbf269b8467a8574236406df9900 │ │ ├── 75b9ce805d054490bca033587498917a.png │ │ └── 75b9ce805d054490bca033587498917a_Thumbnail.png │ │ ├── d405ad7613734f6794e15fa13a626d78 │ │ └── 26d4468ea1a24ddcb287b129546bc9bb.png │ │ ├── da73c99b8b4d46df93e69101408d6630 │ │ └── 8fbb14eb5b8948fd80cbe9b6484ad482.mp4 │ │ ├── e1aa88bcf6de45ff92f1065e827822b4 │ │ ├── 3654f95ce9c243b88a097eafa064ebda.png │ │ └── 3654f95ce9c243b88a097eafa064ebda_Thumbnail.png │ │ ├── e62bd3d07f0d4a03a945dd671a5d9032 │ │ └── 1d2e8fda4a944335b2f2fd05c1c0eec7.png │ │ ├── eafd00dceec94e8892a5527846d7c7e1 │ │ └── 73bc58da26334206b2fee86b6f7c0a65.png │ │ ├── f473424c5fe64c029cdc3967857484f7 │ │ └── 7e0637ed94d34711a656619e53f487e8.png │ │ ├── f943f760caf3426b89bcc2a1a1a5e2c8 │ │ ├── 5af56c1426724c0ca388e9c2ea6399d0.jpg │ │ └── 5af56c1426724c0ca388e9c2ea6399d0_Thumbnail.jpg │ │ ├── fc3c6520375a4e40859f2ed1f7c4636a │ │ └── e6b6a9b869714ea485f3fd17c38b537f.png │ │ └── fe6704c9cc9a47bb9bbf009c8120ef2f │ │ ├── e5b75ca76f414e5a8a7b7ca19ee41841.png │ │ └── e5b75ca76f414e5a8a7b7ca19ee41841_Thumbnail.png │ ├── Business │ ├── Channels │ │ ├── DisplayResolutionBase.cs │ │ ├── DisplayResolutions.cs │ │ ├── MobileChannel.cs │ │ └── WebChannel.cs │ ├── ContentExtensions.cs │ ├── ContentLocator.cs │ ├── ContentProviders │ │ └── ClonedContentProvider.cs │ ├── EditorDescriptors │ │ ├── ContactPageSelectionFactory.cs │ │ ├── ContactPageSelector.cs │ │ └── StringListEditorDescriptor.cs │ ├── EmailAddressAttribute.cs │ ├── IModifyLayout.cs │ ├── Initialization │ │ ├── BundleConfig.cs │ │ ├── CustomizedRenderingInitialization.cs │ │ ├── DependencyResolverInitialization.cs │ │ ├── DisplayModesInitialization.cs │ │ ├── DisplayRegistryInitialization.cs │ │ ├── FilterConfig.cs │ │ └── GlobalNewsContentProviderInitialization.cs │ ├── PageContextActionFilter.cs │ ├── PageTypeExtensions.cs │ ├── PageViewContextFactory.cs │ ├── PictureProfiles.cs │ ├── Rendering │ │ ├── AlloyContentAreaRenderer.cs │ │ ├── ErrorHandlingContentRenderer.cs │ │ ├── IContainerPage.cs │ │ ├── ICustomCssInContentArea.cs │ │ ├── SiteViewEngine.cs │ │ └── TemplateCoordinator.cs │ ├── StructureMapDependencyResolver.cs │ └── UIDescriptors │ │ └── ContainerPageUIDescriptor.cs │ ├── ClientResources │ ├── Images │ │ └── icons │ │ │ └── layoutIcons24x24.png │ ├── Scripts │ │ └── Editors │ │ │ └── StringList.js │ └── Styles │ │ ├── LayoutIcons.css │ │ └── Styles.css │ ├── Controllers │ ├── ContactBlockController.cs │ ├── DefaultPageController.cs │ ├── ImageFileController.cs │ ├── PageControllerBase.cs │ ├── PageListBlockController.cs │ ├── PreviewController.cs │ ├── StartPageController.cs │ └── VideoFileController.cs │ ├── EPiServerLog.config │ ├── Experiment │ └── Class1.cs │ ├── Global.asax │ ├── Global.asax.cs │ ├── Global.cs │ ├── Helpers │ ├── CategorizableExtensions.cs │ ├── HtmlHelpers.cs │ └── UrlHelpers.cs │ ├── Models │ ├── Blocks │ │ ├── ButtonBlock.cs │ │ ├── ContactBlock.cs │ │ ├── EditorialBlock.cs │ │ ├── FormBlock.cs │ │ ├── JumbotronBlock.cs │ │ ├── PageListBlock.cs │ │ ├── SiteBlockData.cs │ │ ├── SiteLogotypeBlock.cs │ │ └── TeaserBlock.cs │ ├── Media │ │ ├── GenericMedia.cs │ │ ├── ImageFile.cs │ │ └── VideoFile.cs │ ├── Pages │ │ ├── ArticlePage.cs │ │ ├── ContactPage.cs │ │ ├── ContainerPage.cs │ │ ├── IHasRelatedContent.cs │ │ ├── ISearchPage.cs │ │ ├── LandingPage.cs │ │ ├── NewsPage.cs │ │ ├── ProductPage.cs │ │ ├── SearchPage.cs │ │ ├── SitePageData.cs │ │ ├── StandardPage.cs │ │ └── StartPage.cs │ ├── Properties │ │ └── PropertyStringList.cs │ ├── SiteContentType.cs │ ├── SiteImageUrl.cs │ └── ViewModels │ │ ├── ContactBlockModel.cs │ │ ├── ContentRenderingErrorModel.cs │ │ ├── IPageViewModel.cs │ │ ├── ImageViewModel.cs │ │ ├── LayoutModel.cs │ │ ├── PageListModel.cs │ │ ├── PageViewModel.cs │ │ ├── PreviewModel.cs │ │ ├── SearchContentModel.cs │ │ └── VideoViewModel.cs │ ├── Properties │ └── AssemblyInfo.cs │ ├── Resources │ └── LanguageFiles │ │ ├── ContentTypeNames.xml │ │ ├── Display.xml │ │ ├── EditorHints.xml │ │ ├── GroupNames.xml │ │ ├── PropertyNames.xml │ │ ├── Views.xml │ │ └── _ReadMe.txt │ ├── SampleAlloy.csproj │ ├── Static │ ├── css │ │ ├── bootstrap-collapse.js │ │ ├── bootstrap-responsive.css │ │ ├── bootstrap.css │ │ ├── editmode.css │ │ ├── editor.css │ │ ├── media.css │ │ └── style.css │ ├── gfx │ │ ├── New_FDT_Press_Contact_.JPG │ │ ├── carouselbackground.png │ │ ├── contact.jpg │ │ ├── exampelspan4.png │ │ ├── experts.png │ │ ├── fallows-media-wide.jpg │ │ ├── leader.png │ │ ├── leader2.png │ │ ├── logotype.png │ │ ├── meet.jpg │ │ ├── page-type-thumbnail-article.png │ │ ├── page-type-thumbnail-contact.png │ │ ├── page-type-thumbnail-product.png │ │ ├── page-type-thumbnail-standard.png │ │ ├── page-type-thumbnail.png │ │ ├── person.png │ │ ├── plan.jpg │ │ ├── play.png │ │ ├── playInactive.png │ │ ├── productLandingv2.png │ │ ├── searchbutton.png │ │ ├── searchbuttonsmall.png │ │ └── track.jpg │ ├── html │ │ └── error.htm │ ├── img │ │ ├── glyphicons-halflings-white.png │ │ └── glyphicons-halflings.png │ ├── js │ │ ├── bootstrap.js │ │ └── jquery.js │ └── jwplayer │ │ ├── jwplayer.js │ │ ├── player.swf │ │ ├── preview.jpg │ │ └── video.mp4 │ ├── Views │ ├── ArticlePage │ │ └── Index.cshtml │ ├── ContactBlock │ │ └── Index.cshtml │ ├── ImageFile │ │ └── Index.cshtml │ ├── LandingPage │ │ └── Index.cshtml │ ├── NewsPage │ │ └── Index.cshtml │ ├── PageListBlock │ │ └── Index.cshtml │ ├── Preview │ │ └── Index.cshtml │ ├── ProductPage │ │ └── Index.cshtml │ ├── Shared │ │ ├── Blocks │ │ │ ├── ButtonBlock.cshtml │ │ │ ├── EditorialBlock.cshtml │ │ │ ├── FormBlock.cshtml │ │ │ ├── JumbotronBlockWide.cshtml │ │ │ ├── NoRenderer.cshtml │ │ │ ├── SiteLogotypeBlock.cshtml │ │ │ ├── TeaserBlock.cshtml │ │ │ └── TeaserBlockWide.cshtml │ │ ├── Breadcrumbs.cshtml │ │ ├── DisplayTemplates │ │ │ ├── ContactPage.cshtml │ │ │ ├── DateTime.cshtml │ │ │ ├── Image.cshtml │ │ │ └── StringList.cshtml │ │ ├── Footer.cshtml │ │ ├── Header.cshtml │ │ ├── Layouts │ │ │ ├── _LeftNavigation.cshtml │ │ │ ├── _Root.cshtml │ │ │ └── _TwoPlusOne.cshtml │ │ ├── PagePartials │ │ │ ├── ContactPage.cshtml │ │ │ ├── ContactPageWide.cshtml │ │ │ ├── Page.cshtml │ │ │ └── PageWide.cshtml │ │ ├── SubNavigation.cshtml │ │ ├── TemplateError.cshtml │ │ └── TemplateHint.cshtml │ ├── StandardPage │ │ └── Index.cshtml │ ├── StartPage │ │ └── Index.cshtml │ ├── VideoFile │ │ └── Index.cshtml │ ├── Web.config │ └── _viewstart.cshtml │ ├── Web.Debug.config │ ├── Web.Release.config │ ├── Web.config │ ├── favicon.ico │ ├── module.config │ ├── modules │ └── _protected │ │ ├── CMS │ │ ├── CMS.zip │ │ └── web.config │ │ ├── EPiServer.Cms.TinyMce │ │ ├── EPiServer.Cms.TinyMce.zip │ │ └── web.config │ │ ├── EPiServer.Packaging.UI │ │ ├── EPiServer.Packaging.UI.zip │ │ └── web.config │ │ ├── Shell │ │ ├── Shell.zip │ │ └── web.config │ │ └── repository.config │ ├── noimage.jpg │ ├── packages.config │ ├── seq.jpg │ └── winforms.png └── src └── ImageResizer.Plugins.EPiServerBlobReader ├── ContentReferenceExtensions.cs ├── EPiServerBlobFile.cs ├── EPiServerBlobReaderPlugin.cs ├── HtmlHelperExtensions.cs ├── HtmlHelperExtensionsForPicture.cs ├── ImageResizer.Plugins.EPiServerBlobReader.csproj ├── ImageResizer.Plugins.EPiServerBlobReader.nuspec ├── PictureProfile.cs ├── Properties └── AssemblyInfo.cs ├── UrlBuilderExtensions.cs ├── app.config ├── packages.config └── web.config.transform /.gitattributes: -------------------------------------------------------------------------------- 1 | # Auto detect text files and perform LF normalization 2 | * text=auto 3 | 4 | # Custom for Visual Studio 5 | *.cs diff=csharp 6 | *.sln merge=union 7 | *.csproj merge=union 8 | *.vbproj merge=union 9 | *.fsproj merge=union 10 | *.dbproj merge=union 11 | 12 | # Standard to msysgit 13 | *.doc diff=astextplain 14 | *.DOC diff=astextplain 15 | *.docx diff=astextplain 16 | *.DOCX diff=astextplain 17 | *.dot diff=astextplain 18 | *.DOT diff=astextplain 19 | *.pdf diff=astextplain 20 | *.PDF diff=astextplain 21 | *.rtf diff=astextplain 22 | *.RTF diff=astextplain 23 | -------------------------------------------------------------------------------- /.idea/.idea.ImageResizer.Plugins.EPiServerBlobReader/.idea/contentModel.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/.idea.ImageResizer.Plugins.EPiServerBlobReader/.idea/modules.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /.idea/.idea.ImageResizer.Plugins.EPiServerBlobReader/.idea/vcs.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.idea/.idea.ImageResizer.Plugins.EPiServerBlobReader/riderModule.iml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | -------------------------------------------------------------------------------- /.nuget/ImageResizer.Plugins.EPiServerBlobReader.4.0.3.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/.nuget/ImageResizer.Plugins.EPiServerBlobReader.4.0.3.nupkg -------------------------------------------------------------------------------- /.nuget/ImageResizer.Plugins.EPiServerBlobReader.4.1.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/.nuget/ImageResizer.Plugins.EPiServerBlobReader.4.1.0.nupkg -------------------------------------------------------------------------------- /.nuget/ImageResizer.Plugins.EPiServerBlobReader.4.1.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/.nuget/ImageResizer.Plugins.EPiServerBlobReader.4.1.1.nupkg -------------------------------------------------------------------------------- /.nuget/ImageResizer.Plugins.EPiServerBlobReader.4.1.2.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/.nuget/ImageResizer.Plugins.EPiServerBlobReader.4.1.2.nupkg -------------------------------------------------------------------------------- /.nuget/ImageResizer.Plugins.EPiServerBlobReader.5.0.0.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/.nuget/ImageResizer.Plugins.EPiServerBlobReader.5.0.0.nupkg -------------------------------------------------------------------------------- /.nuget/ImageResizer.Plugins.EPiServerBlobReader.5.0.1.nupkg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/.nuget/ImageResizer.Plugins.EPiServerBlobReader.5.0.1.nupkg -------------------------------------------------------------------------------- /.nuget/NuGet.Config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /.nuget/NuGet.exe: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/.nuget/NuGet.exe -------------------------------------------------------------------------------- /.vs/ImageResizer.Plugins.EPiServerBlobReader/v15/sqlite3/storage.ide: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/.vs/ImageResizer.Plugins.EPiServerBlobReader/v15/sqlite3/storage.ide -------------------------------------------------------------------------------- /.whitesource: -------------------------------------------------------------------------------- 1 | { 2 | "generalSettings": { 3 | "shouldScanRepo": true 4 | }, 5 | "checkRunSettings": { 6 | "vulnerableCheckRunConclusionLevel": "failure" 7 | } 8 | } -------------------------------------------------------------------------------- /ImageResizer.Plugins.EPiServerBlobReader.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio 15 4 | VisualStudioVersion = 15.0.26430.12 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ImageResizer.Plugins.EPiServerBlobReader", "src\ImageResizer.Plugins.EPiServerBlobReader\ImageResizer.Plugins.EPiServerBlobReader.csproj", "{D63A4907-40DA-40EB-A17D-1CC62704A02E}" 7 | EndProject 8 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{C88BB859-879A-4A35-8A5F-7EF9BC93D5BD}" 9 | ProjectSection(SolutionItems) = preProject 10 | .nuget\NuGet.Config = .nuget\NuGet.Config 11 | .nuget\NuGet.exe = .nuget\NuGet.exe 12 | .nuget\NuGet.targets = .nuget\NuGet.targets 13 | EndProjectSection 14 | EndProject 15 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "samples", "samples", "{F4778037-B3EF-45BE-95C6-8652A2C836A1}" 16 | EndProject 17 | Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "SampleAlloy", "samples\SampleAlloy\SampleAlloy.csproj", "{142027ED-EFE7-426D-9AAD-9E049EC6E115}" 18 | EndProject 19 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Items", "Solution Items", "{189982E3-BE19-4AB1-ACF7-4562194E57AC}" 20 | ProjectSection(SolutionItems) = preProject 21 | build-packages.ps1 = build-packages.ps1 22 | README.md = README.md 23 | EndProjectSection 24 | EndProject 25 | Global 26 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 27 | Debug|Any CPU = Debug|Any CPU 28 | Release|Any CPU = Release|Any CPU 29 | EndGlobalSection 30 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 31 | {D63A4907-40DA-40EB-A17D-1CC62704A02E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 32 | {D63A4907-40DA-40EB-A17D-1CC62704A02E}.Debug|Any CPU.Build.0 = Debug|Any CPU 33 | {D63A4907-40DA-40EB-A17D-1CC62704A02E}.Release|Any CPU.ActiveCfg = Release|Any CPU 34 | {D63A4907-40DA-40EB-A17D-1CC62704A02E}.Release|Any CPU.Build.0 = Release|Any CPU 35 | {142027ED-EFE7-426D-9AAD-9E049EC6E115}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 36 | {142027ED-EFE7-426D-9AAD-9E049EC6E115}.Debug|Any CPU.Build.0 = Debug|Any CPU 37 | {142027ED-EFE7-426D-9AAD-9E049EC6E115}.Release|Any CPU.ActiveCfg = Release|Any CPU 38 | {142027ED-EFE7-426D-9AAD-9E049EC6E115}.Release|Any CPU.Build.0 = Release|Any CPU 39 | EndGlobalSection 40 | GlobalSection(SolutionProperties) = preSolution 41 | HideSolutionNode = FALSE 42 | EndGlobalSection 43 | GlobalSection(NestedProjects) = preSolution 44 | {142027ED-EFE7-426D-9AAD-9E049EC6E115} = {F4778037-B3EF-45BE-95C6-8652A2C836A1} 45 | EndGlobalSection 46 | EndGlobal 47 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | The MIT License (MIT) 2 | 3 | Copyright (c) 2017 Valdis Iljuconoks 4 | 5 | Permission is hereby granted, free of charge, to any person obtaining a copy 6 | of this software and associated documentation files (the "Software"), to deal 7 | in the Software without restriction, including without limitation the rights 8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 9 | copies of the Software, and to permit persons to whom the Software is 10 | furnished to do so, subject to the following conditions: 11 | 12 | The above copyright notice and this permission notice shall be included in all 13 | copies or substantial portions of the Software. 14 | 15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 21 | SOFTWARE. 22 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | before_build: 2 | - cmd: nuget restore 3 | version: 6.0.{build} 4 | platform: Any CPU 5 | build: 6 | verbosity: minimal 7 | -------------------------------------------------------------------------------- /build-packages.ps1: -------------------------------------------------------------------------------- 1 | cd .\.nuget 2 | 3 | .\nuget.exe pack ..\src\ImageResizer.Plugins.EPiServerBlobReader\ImageResizer.Plugins.EPiServerBlobReader.csproj -Properties Configuration=Release 4 | cd ..\ -------------------------------------------------------------------------------- /nuget.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/DefaultSiteContent.episerverdata: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/DefaultSiteContent.episerverdata -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/EPiServerDB_0c090946.mdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/EPiServerDB_0c090946.mdf -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/EPiServerDB_0c090946_log.ldf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/EPiServerDB_0c090946_log.ldf -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/GeoLiteCity.dat: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/GeoLiteCity.dat -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/04c39f885afc472dba493df1059d7dcf/cae89f0e7ae948fdb54fecdd053c564e.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/04c39f885afc472dba493df1059d7dcf/cae89f0e7ae948fdb54fecdd053c564e.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/04c39f885afc472dba493df1059d7dcf/cae89f0e7ae948fdb54fecdd053c564e_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/04c39f885afc472dba493df1059d7dcf/cae89f0e7ae948fdb54fecdd053c564e_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/0956602fde60432796c2539e6b1513a6/36444e66f2354570b131138f502e14d4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/0956602fde60432796c2539e6b1513a6/36444e66f2354570b131138f502e14d4.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/0a05d40300484441ab3ab7efb3c5ff47/75d7df6a429c47788e19f2430d98b9f5.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/0a05d40300484441ab3ab7efb3c5ff47/75d7df6a429c47788e19f2430d98b9f5.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/0a05d40300484441ab3ab7efb3c5ff47/75d7df6a429c47788e19f2430d98b9f5_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/0a05d40300484441ab3ab7efb3c5ff47/75d7df6a429c47788e19f2430d98b9f5_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/70459ec5e4204f098a6b758116a9214c.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/70459ec5e4204f098a6b758116a9214c.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/70459ec5e4204f098a6b758116a9214c_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/70459ec5e4204f098a6b758116a9214c_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/7cd2d349bacb4d199068d57dfd8bc99a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/7cd2d349bacb4d199068d57dfd8bc99a.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/7cd2d349bacb4d199068d57dfd8bc99a_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/7cd2d349bacb4d199068d57dfd8bc99a_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/f108f6db08d3413292f65fdcec098317.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/f108f6db08d3413292f65fdcec098317.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/f108f6db08d3413292f65fdcec098317_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/16431fe5497e4c07ba9ca12649839178/f108f6db08d3413292f65fdcec098317_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/1b98ffe54a7f480390e084067aa531bf/4f5f01fe279d4e468b5ac5334b34134f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/1b98ffe54a7f480390e084067aa531bf/4f5f01fe279d4e468b5ac5334b34134f.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/2959213efa18420585e87b0421e8e0ad/0a3b3bfc98c644458cf557c98a999c1a.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/2959213efa18420585e87b0421e8e0ad/0a3b3bfc98c644458cf557c98a999c1a.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/2b07e4a981b54a6184b349529d832b19/7dc53b1842e240979311291983a7ae66.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/2b07e4a981b54a6184b349529d832b19/7dc53b1842e240979311291983a7ae66.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/385914972f1247eb988a00a2111d1568/1a8e1607451f46508bc92399484aac6b.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/385914972f1247eb988a00a2111d1568/1a8e1607451f46508bc92399484aac6b.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/385914972f1247eb988a00a2111d1568/1a8e1607451f46508bc92399484aac6b_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/385914972f1247eb988a00a2111d1568/1a8e1607451f46508bc92399484aac6b_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/3e2aea8fa94e4c7eabf0c716d789441b/bd34e19f5c0f4a2ba1c1c8d5f01808ae.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/3e2aea8fa94e4c7eabf0c716d789441b/bd34e19f5c0f4a2ba1c1c8d5f01808ae.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/3f9f47bfa9494c85b9abdbd8ff974bf5/78e08f306fc44c03888da8bab14fee3e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/3f9f47bfa9494c85b9abdbd8ff974bf5/78e08f306fc44c03888da8bab14fee3e.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/3f9f47bfa9494c85b9abdbd8ff974bf5/78e08f306fc44c03888da8bab14fee3e_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/3f9f47bfa9494c85b9abdbd8ff974bf5/78e08f306fc44c03888da8bab14fee3e_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/70e2f2a3857c4835854583b796422ac1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/70e2f2a3857c4835854583b796422ac1.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/70e2f2a3857c4835854583b796422ac1_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/70e2f2a3857c4835854583b796422ac1_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/7e744850dde3494380e50fee03b3957f.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/7e744850dde3494380e50fee03b3957f.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/7e744850dde3494380e50fee03b3957f_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/7e744850dde3494380e50fee03b3957f_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/faa3c4dc86b742f3aa0722c5e6e23150.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/faa3c4dc86b742f3aa0722c5e6e23150.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/faa3c4dc86b742f3aa0722c5e6e23150_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/485da84c6aa24710956343e600c43383/faa3c4dc86b742f3aa0722c5e6e23150_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/55b1016baab14dad8d6c079103c8eafa/649294cc796f41929a1965718dffd37a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/55b1016baab14dad8d6c079103c8eafa/649294cc796f41929a1965718dffd37a.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/5af4bc6f408a4aecbf035030ecc1acb4/0b29c9305eda43dd83e3981a6ed3a82d.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/5af4bc6f408a4aecbf035030ecc1acb4/0b29c9305eda43dd83e3981a6ed3a82d.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/619fca8204e540eea7352f3cab7bf409/642752e9ab914dbc8bfbff7b158c1a0b.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/619fca8204e540eea7352f3cab7bf409/642752e9ab914dbc8bfbff7b158c1a0b.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/6580dc8e964c48bbadb623e1a0d264c8/364d4d07c3fa4f8db401ce9504688eec.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/6580dc8e964c48bbadb623e1a0d264c8/364d4d07c3fa4f8db401ce9504688eec.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/6b82b8fb94e14e16adeba55c98c097ee/437e8e5ea7fe4b8aaf12fac8fc22803d.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/6b82b8fb94e14e16adeba55c98c097ee/437e8e5ea7fe4b8aaf12fac8fc22803d.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/6b82b8fb94e14e16adeba55c98c097ee/437e8e5ea7fe4b8aaf12fac8fc22803d_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/6b82b8fb94e14e16adeba55c98c097ee/437e8e5ea7fe4b8aaf12fac8fc22803d_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/6c589d8500114c199fd3d81def407e99/ad15c26de9ae4961bb2684c9fc0e3a22.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/6c589d8500114c199fd3d81def407e99/ad15c26de9ae4961bb2684c9fc0e3a22.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/6db33dddfe7d483389ed4e594f3aa9c7/4744fa764ccc4f51876166ac614abe10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/6db33dddfe7d483389ed4e594f3aa9c7/4744fa764ccc4f51876166ac614abe10.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/70a64edfbd194df18aa4d3d58f37ceb9/0e06c4e11a794b428ab4f881663b88e8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/70a64edfbd194df18aa4d3d58f37ceb9/0e06c4e11a794b428ab4f881663b88e8.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/71ed7c742b50482c904a3d709778788f/4e473727445d48b983ee4b7dd5900e83.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/71ed7c742b50482c904a3d709778788f/4e473727445d48b983ee4b7dd5900e83.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/7b0d1ede33fa449796bfe3996edb19c1/c101fa5b5d844132bd6e0662c89fdd91.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/7b0d1ede33fa449796bfe3996edb19c1/c101fa5b5d844132bd6e0662c89fdd91.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/7cba394531e14500bd7386afc319d76a/930770cbd8c9437da02cb1c0468945c2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/7cba394531e14500bd7386afc319d76a/930770cbd8c9437da02cb1c0468945c2.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/838ccaa44766447685ccc4882d91ab03/f08006eb5ef94dcb812559722f8de4d0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/838ccaa44766447685ccc4882d91ab03/f08006eb5ef94dcb812559722f8de4d0.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/8c419ee724d64b229d41a481a24547b2/eb53bd3a3bd442d98db93e8d2c3fc1af.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/8c419ee724d64b229d41a481a24547b2/eb53bd3a3bd442d98db93e8d2c3fc1af.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/9643b398b9b54077bd58076b1fa0bed2/2365ec05c19e421a8c7091c2c5c23668.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/9643b398b9b54077bd58076b1fa0bed2/2365ec05c19e421a8c7091c2c5c23668.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/9643b398b9b54077bd58076b1fa0bed2/2365ec05c19e421a8c7091c2c5c23668_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/9643b398b9b54077bd58076b1fa0bed2/2365ec05c19e421a8c7091c2c5c23668_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/a1cc1e4f5ce246998eadfac9c02f66e5/5a088065e37b4f52a286c3f91da0bfc4.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/a1cc1e4f5ce246998eadfac9c02f66e5/5a088065e37b4f52a286c3f91da0bfc4.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/a1cc1e4f5ce246998eadfac9c02f66e5/5a088065e37b4f52a286c3f91da0bfc4_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/a1cc1e4f5ce246998eadfac9c02f66e5/5a088065e37b4f52a286c3f91da0bfc4_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/a6d100507f77406a96a22996e0d3b931/ccdc110de0d64864b73fcb36c1b77a53.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/a6d100507f77406a96a22996e0d3b931/ccdc110de0d64864b73fcb36c1b77a53.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/a9ce5401d5004ad392842dfeb1e38b34/92c46e048fef43d6978fb9afed9f5aaa.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/a9ce5401d5004ad392842dfeb1e38b34/92c46e048fef43d6978fb9afed9f5aaa.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/ab5268d5ee9e4392855655118cabbc09/14a448bd83c44587807a4aab90d730b1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/ab5268d5ee9e4392855655118cabbc09/14a448bd83c44587807a4aab90d730b1.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/b0566dc0e85341769c7fa737a432dacd/9b4566cb57114c5d82f8b011b3317164.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/b0566dc0e85341769c7fa737a432dacd/9b4566cb57114c5d82f8b011b3317164.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/b1f3bff6e0514ef69b4b677d094645c3/7dba176dd85e4d898462b6f11111b163.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/b1f3bff6e0514ef69b4b677d094645c3/7dba176dd85e4d898462b6f11111b163.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/befd120cd540407d9d94d5fc4d54cd5f/ecc95455fbcf46dfb11d8a8515dacf79.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/befd120cd540407d9d94d5fc4d54cd5f/ecc95455fbcf46dfb11d8a8515dacf79.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/c2659179c10448a29820bd581005990c/2aedf124d98949208342b1ec395f07c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/c2659179c10448a29820bd581005990c/2aedf124d98949208342b1ec395f07c3.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/c60dd07e8559431eb13b7605feb8ef55/415137265cd848ce8736d489f047c8c3.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/c60dd07e8559431eb13b7605feb8ef55/415137265cd848ce8736d489f047c8c3.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/c9fcce3cc5824a078d3b7d33f06126f0/723817a183ac4ada82e87421f1bf4033.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/c9fcce3cc5824a078d3b7d33f06126f0/723817a183ac4ada82e87421f1bf4033.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/ccd2f2e8076b4dbdbce8b75d7918d9b2/6598d114649f403494a5e39ae0e52e12.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/ccd2f2e8076b4dbdbce8b75d7918d9b2/6598d114649f403494a5e39ae0e52e12.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/ccd2f2e8076b4dbdbce8b75d7918d9b2/6598d114649f403494a5e39ae0e52e12_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/ccd2f2e8076b4dbdbce8b75d7918d9b2/6598d114649f403494a5e39ae0e52e12_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/cdc27a7cc2aa4a93b4109ceb0554ecef/4e5447acdec14f9d9e64357b785304fd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/cdc27a7cc2aa4a93b4109ceb0554ecef/4e5447acdec14f9d9e64357b785304fd.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/d21063e61e074553918aa0ac7968b653/17183bbd93a049bb9911f4baeebeff3e.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/d21063e61e074553918aa0ac7968b653/17183bbd93a049bb9911f4baeebeff3e.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/d3c3dbf269b8467a8574236406df9900/75b9ce805d054490bca033587498917a.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/d3c3dbf269b8467a8574236406df9900/75b9ce805d054490bca033587498917a.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/d3c3dbf269b8467a8574236406df9900/75b9ce805d054490bca033587498917a_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/d3c3dbf269b8467a8574236406df9900/75b9ce805d054490bca033587498917a_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/d405ad7613734f6794e15fa13a626d78/26d4468ea1a24ddcb287b129546bc9bb.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/d405ad7613734f6794e15fa13a626d78/26d4468ea1a24ddcb287b129546bc9bb.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/da73c99b8b4d46df93e69101408d6630/8fbb14eb5b8948fd80cbe9b6484ad482.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/da73c99b8b4d46df93e69101408d6630/8fbb14eb5b8948fd80cbe9b6484ad482.mp4 -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/e1aa88bcf6de45ff92f1065e827822b4/3654f95ce9c243b88a097eafa064ebda.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/e1aa88bcf6de45ff92f1065e827822b4/3654f95ce9c243b88a097eafa064ebda.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/e1aa88bcf6de45ff92f1065e827822b4/3654f95ce9c243b88a097eafa064ebda_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/e1aa88bcf6de45ff92f1065e827822b4/3654f95ce9c243b88a097eafa064ebda_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/e62bd3d07f0d4a03a945dd671a5d9032/1d2e8fda4a944335b2f2fd05c1c0eec7.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/e62bd3d07f0d4a03a945dd671a5d9032/1d2e8fda4a944335b2f2fd05c1c0eec7.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/eafd00dceec94e8892a5527846d7c7e1/73bc58da26334206b2fee86b6f7c0a65.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/eafd00dceec94e8892a5527846d7c7e1/73bc58da26334206b2fee86b6f7c0a65.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/f473424c5fe64c029cdc3967857484f7/7e0637ed94d34711a656619e53f487e8.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/f473424c5fe64c029cdc3967857484f7/7e0637ed94d34711a656619e53f487e8.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/f943f760caf3426b89bcc2a1a1a5e2c8/5af56c1426724c0ca388e9c2ea6399d0.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/f943f760caf3426b89bcc2a1a1a5e2c8/5af56c1426724c0ca388e9c2ea6399d0.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/f943f760caf3426b89bcc2a1a1a5e2c8/5af56c1426724c0ca388e9c2ea6399d0_Thumbnail.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/f943f760caf3426b89bcc2a1a1a5e2c8/5af56c1426724c0ca388e9c2ea6399d0_Thumbnail.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/fc3c6520375a4e40859f2ed1f7c4636a/e6b6a9b869714ea485f3fd17c38b537f.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/fc3c6520375a4e40859f2ed1f7c4636a/e6b6a9b869714ea485f3fd17c38b537f.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/fe6704c9cc9a47bb9bbf009c8120ef2f/e5b75ca76f414e5a8a7b7ca19ee41841.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/fe6704c9cc9a47bb9bbf009c8120ef2f/e5b75ca76f414e5a8a7b7ca19ee41841.png -------------------------------------------------------------------------------- /samples/SampleAlloy/App_Data/blobs/fe6704c9cc9a47bb9bbf009c8120ef2f/e5b75ca76f414e5a8a7b7ca19ee41841_Thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/App_Data/blobs/fe6704c9cc9a47bb9bbf009c8120ef2f/e5b75ca76f414e5a8a7b7ca19ee41841_Thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Channels/DisplayResolutionBase.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.Framework.Localization; 2 | using EPiServer.ServiceLocation; 3 | using EPiServer.Web; 4 | 5 | namespace SampleAlloy.Business.Channels 6 | { 7 | /// 8 | /// Base class for all resolution definitions 9 | /// 10 | public abstract class DisplayResolutionBase : IDisplayResolution 11 | { 12 | private Injected LocalizationService { get; set; } 13 | 14 | protected DisplayResolutionBase(string name, int width, int height) 15 | { 16 | Id = GetType().FullName; 17 | Name = Translate(name); 18 | Width = width; 19 | Height = height; 20 | } 21 | 22 | /// 23 | /// Gets the unique ID for this resolution 24 | /// 25 | public string Id { get; protected set; } 26 | 27 | /// 28 | /// Gets the name of resolution 29 | /// 30 | public string Name { get; protected set; } 31 | 32 | /// 33 | /// Gets the resolution width in pixels 34 | /// 35 | public int Width { get; protected set; } 36 | 37 | /// 38 | /// Gets the resolution height in pixels 39 | /// 40 | public int Height { get; protected set; } 41 | 42 | private string Translate(string resurceKey) 43 | { 44 | string value; 45 | 46 | if(!LocalizationService.Service.TryGetString(resurceKey, out value)) 47 | { 48 | value = resurceKey; 49 | } 50 | 51 | return value; 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Channels/DisplayResolutions.cs: -------------------------------------------------------------------------------- 1 | namespace SampleAlloy.Business.Channels 2 | { 3 | /// 4 | /// Defines resolution for desktop displays 5 | /// 6 | public class StandardResolution : DisplayResolutionBase 7 | { 8 | public StandardResolution() : base("/resolutions/standard", 1366, 768) 9 | { 10 | } 11 | } 12 | 13 | /// 14 | /// Defines resolution for a horizontal iPad 15 | /// 16 | public class IpadHorizontalResolution : DisplayResolutionBase 17 | { 18 | public IpadHorizontalResolution() : base("/resolutions/ipadhorizontal", 1024, 768) 19 | { 20 | } 21 | } 22 | 23 | /// 24 | /// Defines resolution for a vertical iPhone 5s 25 | /// 26 | public class IphoneVerticalResolution : DisplayResolutionBase 27 | { 28 | public IphoneVerticalResolution() : base("/resolutions/iphonevertical", 320, 568) 29 | { 30 | } 31 | } 32 | 33 | /// 34 | /// Defines resolution for a vertical Android handheld device 35 | /// 36 | public class AndroidVerticalResolution : DisplayResolutionBase 37 | { 38 | public AndroidVerticalResolution() : base("/resolutions/androidvertical", 480, 800) 39 | { 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Channels/MobileChannel.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.WebPages; 3 | using EPiServer.Web; 4 | 5 | namespace SampleAlloy.Business.Channels 6 | { 7 | // 8 | //Defines the 'Mobile' content channel 9 | // 10 | public class MobileChannel : DisplayChannel 11 | { 12 | public const string Name = "mobile"; 13 | 14 | public override string ChannelName 15 | { 16 | get 17 | { 18 | return Name; 19 | } 20 | } 21 | 22 | public override string ResolutionId 23 | { 24 | get 25 | { 26 | return typeof(IphoneVerticalResolution).FullName; 27 | } 28 | } 29 | 30 | public override bool IsActive(HttpContextBase context) 31 | { 32 | return context.GetOverriddenBrowser().IsMobileDevice; 33 | } 34 | } 35 | } 36 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Channels/WebChannel.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using EPiServer.Web; 3 | 4 | namespace SampleAlloy.Business.Channels 5 | { 6 | /// 7 | /// Defines the 'Web' content channel 8 | /// 9 | public class WebChannel : DisplayChannel 10 | { 11 | public override string ChannelName 12 | { 13 | get 14 | { 15 | return "web"; 16 | } 17 | } 18 | 19 | public override bool IsActive(HttpContextBase context) 20 | { 21 | return !context.Request.Browser.IsMobileDevice; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/ContentExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using EPiServer.Core; 4 | using EPiServer.Filters; 5 | using EPiServer.Framework.Web; 6 | using EPiServer.ServiceLocation; 7 | using EPiServer; 8 | 9 | namespace SampleAlloy.Business 10 | { 11 | /// 12 | /// Extension methods for content 13 | /// 14 | public static class ContentExtensions 15 | { 16 | /// 17 | /// Shorthand for DataFactory.Instance.Get 18 | /// 19 | /// 20 | /// 21 | /// 22 | public static IContent Get(this ContentReference contentLink) where TContent : IContent 23 | { 24 | return DataFactory.Instance.Get(contentLink); 25 | } 26 | 27 | /// 28 | /// Filters content which should not be visible to the user. 29 | /// 30 | public static IEnumerable FilterForDisplay(this IEnumerable contents, bool requirePageTemplate = false, bool requireVisibleInMenu = false) 31 | where T : IContent 32 | { 33 | var accessFilter = new FilterAccess(); 34 | var publishedFilter = new FilterPublished(); 35 | contents = contents.Where(x => !publishedFilter.ShouldFilter(x) && !accessFilter.ShouldFilter(x)); 36 | if (requirePageTemplate) 37 | { 38 | var templateFilter = ServiceLocator.Current.GetInstance(); 39 | templateFilter.TemplateTypeCategories = TemplateTypeCategories.Page; 40 | contents = contents.Where(x => !templateFilter.ShouldFilter(x)); 41 | } 42 | if (requireVisibleInMenu) 43 | { 44 | contents = contents.Where(x => VisibleInMenu(x)); 45 | } 46 | return contents; 47 | } 48 | 49 | private static bool VisibleInMenu(IContent content) 50 | { 51 | var page = content as PageData; 52 | if (page == null) 53 | { 54 | return true; 55 | } 56 | return page.VisibleInMenu; 57 | } 58 | } 59 | } 60 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/EditorDescriptors/ContactPageSelectionFactory.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using EPiServer.ServiceLocation; 4 | using EPiServer.Shell.ObjectEditing; 5 | 6 | namespace SampleAlloy.Business.EditorDescriptors 7 | { 8 | /// 9 | /// Provides a list of options corresponding to ContactPage pages on the site 10 | /// 11 | /// 12 | public class ContactPageSelectionFactory : ISelectionFactory 13 | { 14 | private Injected ContentLocator { get; set; } 15 | 16 | public IEnumerable GetSelections(ExtendedMetadata metadata) 17 | { 18 | var contactPages = ContentLocator.Service.GetContactPages(); 19 | 20 | return new List(contactPages.Select(c => new SelectItem {Value = c.PageLink, Text = c.Name})); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/EditorDescriptors/ContactPageSelector.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using EPiServer.Core; 4 | using EPiServer.Shell.ObjectEditing; 5 | using EPiServer.Shell.ObjectEditing.EditorDescriptors; 6 | 7 | namespace SampleAlloy.Business.EditorDescriptors 8 | { 9 | /// 10 | /// Registers an editor to select a ContactPage for a PageReference property using a dropdown 11 | /// 12 | [EditorDescriptorRegistration(TargetType = typeof(PageReference), UIHint = Global.SiteUIHints.Contact)] 13 | public class ContactPageSelector : EditorDescriptor 14 | { 15 | public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable attributes) 16 | { 17 | SelectionFactoryType = typeof(ContactPageSelectionFactory); 18 | 19 | ClientEditingClass = "epi-cms/contentediting/editors/SelectionEditor"; 20 | 21 | base.ModifyMetadata(metadata, attributes); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/EditorDescriptors/StringListEditorDescriptor.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using EPiServer.Shell.ObjectEditing.EditorDescriptors; 4 | using EPiServer.Shell.ObjectEditing; 5 | 6 | namespace SampleAlloy.Business.EditorDescriptors 7 | { 8 | /// 9 | /// Register an editor for StringList properties 10 | /// 11 | [EditorDescriptorRegistration(TargetType = typeof(String[]), UIHint = Global.SiteUIHints.Strings)] 12 | public class StringListEditorDescriptor : EditorDescriptor 13 | { 14 | public override void ModifyMetadata(ExtendedMetadata metadata, IEnumerable attributes) 15 | { 16 | ClientEditingClass = "alloy/editors/StringList"; 17 | 18 | base.ModifyMetadata(metadata, attributes); 19 | } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/EmailAddressAttribute.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using System.Text.RegularExpressions; 3 | 4 | namespace SampleAlloy.Business 5 | { 6 | /// 7 | /// Specifies the data type for a property as EmailAddress and validates it as an e-mail address. 8 | /// 9 | /// 10 | /// A class with the same name and functionality exists in version 4.5 of .NET Framework, meaning that 11 | /// this class can be removed and it's usages replaced if changing target framework to 4.5. 12 | /// 13 | public class EmailAddressAttribute : DataTypeAttribute 14 | { 15 | private static readonly Regex ValidationRegex = new Regex(@"^((([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+(\.([a-z]|\d|[!#\$%&'\*\+\-\/=\?\^_`{\|}~]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])+)*)|((\x22)((((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(([\x01-\x08\x0b\x0c\x0e-\x1f\x7f]|\x21|[\x23-\x5b]|[\x5d-\x7e]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(\\([\x01-\x09\x0b\x0c\x0d-\x7f]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF]))))*(((\x20|\x09)*(\x0d\x0a))?(\x20|\x09)+)?(\x22)))@((([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|\d|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.)+(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])|(([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])([a-z]|\d|-|\.|_|~|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])*([a-z]|[\u00A0-\uD7FF\uF900-\uFDCF\uFDF0-\uFFEF])))\.?$", RegexOptions.Compiled | RegexOptions.ExplicitCapture | RegexOptions.IgnoreCase); 16 | 17 | public EmailAddressAttribute() : base(DataType.EmailAddress) 18 | { 19 | } 20 | 21 | public override bool IsValid(object value) 22 | { 23 | if (value == null) 24 | { 25 | return true; 26 | } 27 | var input = value as string; 28 | return ((input != null) && (ValidationRegex.Match(input).Length > 0)); 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/IModifyLayout.cs: -------------------------------------------------------------------------------- 1 | using SampleAlloy.Models.ViewModels; 2 | 3 | namespace SampleAlloy.Business 4 | { 5 | /// 6 | /// Defines a method which may be invoked by PageContextActionFilter allowing controllers 7 | /// to modify common layout properties of the view model. 8 | /// 9 | interface IModifyLayout 10 | { 11 | void ModifyLayout(LayoutModel layoutModel); 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Initialization/BundleConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Optimization; 2 | using EPiServer.Framework; 3 | using EPiServer.Framework.Initialization; 4 | 5 | namespace SampleAlloy.Business.Initialization 6 | { 7 | [InitializableModule] 8 | public class BundleConfig : IInitializableModule 9 | { 10 | public void Initialize(InitializationEngine context) 11 | { 12 | if (context.HostType == HostType.WebApplication) 13 | { 14 | RegisterBundles(BundleTable.Bundles); 15 | } 16 | } 17 | 18 | // For more information on Bundling, visit http://go.microsoft.com/fwlink/?LinkId=254725 19 | public static void RegisterBundles(BundleCollection bundles) 20 | { 21 | bundles.Add(new ScriptBundle("~/bundles/js").Include( 22 | "~/Static/js/jquery.js", //jquery.js can be removed and linked from CDN instead, we use a local one for demo purposes without internet connectionzz 23 | "~/Static/js/bootstrap.js")); 24 | 25 | bundles.Add(new StyleBundle("~/bundles/css") 26 | .Include("~/Static/css/bootstrap.css", new CssRewriteUrlTransform()) 27 | .Include("~/Static/css/bootstrap-responsive.css") 28 | .Include("~/Static/css/media.css") 29 | .Include("~/Static/css/style.css", new CssRewriteUrlTransform()) 30 | .Include("~/Static/css/editmode.css")); 31 | } 32 | 33 | public void Uninitialize(InitializationEngine context) 34 | { 35 | } 36 | 37 | public void Preload(string[] parameters) 38 | { 39 | } 40 | } 41 | } 42 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Initialization/CustomizedRenderingInitialization.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using EPiServer.Framework; 3 | using EPiServer.Framework.Initialization; 4 | using EPiServer.ServiceLocation; 5 | using SampleAlloy.Business.Rendering; 6 | using EPiServer.Web; 7 | 8 | namespace SampleAlloy.Business.Initialization 9 | { 10 | /// 11 | /// Module for customizing templates and rendering. 12 | /// 13 | [ModuleDependency(typeof(EPiServer.Web.InitializationModule))] 14 | public class CustomizedRenderingInitialization : IInitializableModule 15 | { 16 | public void Initialize(InitializationEngine context) 17 | { 18 | //Add custom view engine allowing partials to be placed in additional locations 19 | //Note that we add it first in the list to optimize view resolving when using DisplayFor/PropertyFor 20 | ViewEngines.Engines.Insert(0, new SiteViewEngine()); 21 | 22 | context.Locate.TemplateResolver() 23 | .TemplateResolved += TemplateCoordinator.OnTemplateResolved; 24 | } 25 | 26 | public void Uninitialize(InitializationEngine context) 27 | { 28 | ServiceLocator.Current.GetInstance() 29 | .TemplateResolved -= TemplateCoordinator.OnTemplateResolved; 30 | } 31 | 32 | public void Preload(string[] parameters) 33 | { 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Initialization/DependencyResolverInitialization.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using EPiServer.Framework; 3 | using EPiServer.Framework.Initialization; 4 | using EPiServer.ServiceLocation; 5 | using EPiServer.Web.Mvc; 6 | using EPiServer.Web.Mvc.Html; 7 | using SampleAlloy.Business.Rendering; 8 | using InitializationModule = EPiServer.Web.InitializationModule; 9 | 10 | namespace SampleAlloy.Business.Initialization 11 | { 12 | [InitializableModule] 13 | [ModuleDependency(typeof(InitializationModule))] 14 | public class DependencyResolverInitialization : IConfigurableModule 15 | { 16 | public void ConfigureContainer(ServiceConfigurationContext context) 17 | { 18 | context.Services.AddTransient(); 19 | context.Services.AddTransient(); 20 | 21 | DependencyResolver.SetResolver(new StructureMapDependencyResolver(context.StructureMap())); 22 | } 23 | 24 | public void Initialize(InitializationEngine context) 25 | { 26 | } 27 | 28 | public void Uninitialize(InitializationEngine context) 29 | { 30 | } 31 | 32 | public void Preload(string[] parameters) 33 | { 34 | } 35 | } 36 | } -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Initialization/DisplayModesInitialization.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Web; 3 | using System.Web.WebPages; 4 | using EPiServer.Framework; 5 | using EPiServer.Framework.Initialization; 6 | using EPiServer.ServiceLocation; 7 | using SampleAlloy.Business.Channels; 8 | using EPiServer.Web; 9 | 10 | namespace SampleAlloy.Business.Initialization 11 | { 12 | /// 13 | /// Adds a new display mode for mobile which is active if the mobile channel is active in addition to if the request is from a mobile device (like the default one) 14 | /// 15 | /// 16 | /// It's also possible to map a display mode as a channel through the DisplayChannelService.RegisterDisplayMode() method. 17 | /// Adding channels that way does not however enable specifying ResolutionId which we want to do for the mobile channel. 18 | /// 19 | [ModuleDependency(typeof(EPiServer.Web.InitializationModule))] 20 | public class DisplayModesInitialization : IInitializableModule 21 | { 22 | public void Initialize(InitializationEngine context) 23 | { 24 | var mobileChannelDisplayMode = new DefaultDisplayMode("mobile") 25 | { 26 | ContextCondition = IsMobileDisplayModeActive 27 | }; 28 | DisplayModeProvider.Instance.Modes.Insert(0, mobileChannelDisplayMode); 29 | } 30 | 31 | private static bool IsMobileDisplayModeActive(HttpContextBase httpContext) 32 | { 33 | if (httpContext.GetOverriddenBrowser().IsMobileDevice) 34 | { 35 | return true; 36 | } 37 | var displayChannelService = ServiceLocator.Current.GetInstance(); 38 | return displayChannelService.GetActiveChannels(httpContext).Any(x => x.ChannelName == MobileChannel.Name); 39 | } 40 | 41 | public void Uninitialize(InitializationEngine context) 42 | { 43 | } 44 | 45 | public void Preload(string[] parameters) 46 | { 47 | } 48 | } 49 | } 50 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Initialization/DisplayRegistryInitialization.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.Framework; 2 | using EPiServer.Framework.Initialization; 3 | using EPiServer.ServiceLocation; 4 | using EPiServer.Web; 5 | using System.Collections.Generic; 6 | using System.Web.Mvc; 7 | 8 | namespace SampleAlloy.Business.Initialization 9 | { 10 | [InitializableModule] 11 | [ModuleDependency(typeof(EPiServer.Web.InitializationModule))] 12 | public class DisplayRegistryInitialization : IInitializableModule 13 | { 14 | public void Initialize(InitializationEngine context) 15 | { 16 | if (context.HostType == HostType.WebApplication) 17 | { 18 | // Register Display Options 19 | var options = ServiceLocator.Current.GetInstance(); 20 | options 21 | .Add("full", "/displayoptions/full", Global.ContentAreaTags.FullWidth, "", "epi-icon__layout--full") 22 | .Add("wide", "/displayoptions/wide", Global.ContentAreaTags.TwoThirdsWidth, "", "epi-icon__layout--two-thirds") 23 | .Add("narrow", "/displayoptions/narrow", Global.ContentAreaTags.OneThirdWidth, "", "epi-icon__layout--one-third"); 24 | 25 | AreaRegistration.RegisterAllAreas(); 26 | 27 | } 28 | } 29 | 30 | public void Preload(string[] parameters){} 31 | 32 | public void Uninitialize(InitializationEngine context){} 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Initialization/FilterConfig.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using EPiServer.Framework; 3 | using EPiServer.Framework.Initialization; 4 | using EPiServer.ServiceLocation; 5 | 6 | namespace SampleAlloy.Business.Initialization 7 | { 8 | /// 9 | /// Module for registering filters which will be applied to controller actions. 10 | /// 11 | [ModuleDependency(typeof(EPiServer.Web.InitializationModule))] 12 | public class FilterConfig : IInitializableModule 13 | { 14 | public void Initialize(InitializationEngine context) 15 | { 16 | GlobalFilters.Filters.Add(ServiceLocator.Current.GetInstance()); 17 | } 18 | 19 | public void Uninitialize(InitializationEngine context) 20 | { 21 | } 22 | 23 | public void Preload(string[] parameters) 24 | { 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/PageContextActionFilter.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using SampleAlloy.Models.Pages; 3 | using SampleAlloy.Models.ViewModels; 4 | using EPiServer.Web.Routing; 5 | 6 | namespace SampleAlloy.Business 7 | { 8 | /// 9 | /// Intercepts actions with view models of type IPageViewModel and populates the view models 10 | /// Layout and Section properties. 11 | /// 12 | /// 13 | /// This filter frees controllers for pages from having to care about common context needed by layouts 14 | /// and other page framework components allowing the controllers to focus on the specifics for the page types 15 | /// and actions that they handle. 16 | /// 17 | public class PageContextActionFilter : IResultFilter 18 | { 19 | private readonly PageViewContextFactory _contextFactory; 20 | public PageContextActionFilter(PageViewContextFactory contextFactory) 21 | { 22 | _contextFactory = contextFactory; 23 | } 24 | 25 | public void OnResultExecuting(ResultExecutingContext filterContext) 26 | { 27 | var viewModel = filterContext.Controller.ViewData.Model; 28 | 29 | var model = viewModel as IPageViewModel; 30 | if (model != null) 31 | { 32 | var currentContentLink = filterContext.RequestContext.GetContentLink(); 33 | 34 | var layoutModel = model.Layout ?? _contextFactory.CreateLayoutModel(currentContentLink, filterContext.RequestContext); 35 | 36 | var layoutController = filterContext.Controller as IModifyLayout; 37 | if(layoutController != null) 38 | { 39 | layoutController.ModifyLayout(layoutModel); 40 | } 41 | 42 | model.Layout = layoutModel; 43 | 44 | if (model.Section == null) 45 | { 46 | model.Section = _contextFactory.GetSection(currentContentLink); 47 | } 48 | } 49 | } 50 | 51 | public void OnResultExecuted(ResultExecutedContext filterContext) 52 | { 53 | } 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/PageTypeExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EPiServer.DataAbstraction; 3 | using EPiServer.ServiceLocation; 4 | 5 | namespace SampleAlloy.Business 6 | { 7 | /// 8 | /// Provides extension methods for types intended to be used when working with page types 9 | /// 10 | public static class PageTypeExtensions 11 | { 12 | /// 13 | /// Returns the definition for a specific page type 14 | /// 15 | /// 16 | /// 17 | public static PageType GetPageType(this Type pageType) 18 | { 19 | var pageTypeRepository = ServiceLocator.Current.GetInstance(); 20 | 21 | return pageTypeRepository.Load(pageType); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/PictureProfiles.cs: -------------------------------------------------------------------------------- 1 | using ImageResizer.Plugins.EPiServer; 2 | 3 | namespace SampleAlloy.Business 4 | { 5 | public class PictureProfiles 6 | { 7 | public static PictureProfile SampleImage = new PictureProfile 8 | { 9 | DefaultWidth = 992, 10 | SrcSetSizes = new[] 11 | { 12 | "50vw" 13 | }, 14 | SrcSetWidths = new[] { 480, 768, 992, 1200 } 15 | }; 16 | 17 | public static PictureProfile BootstrapGrid = 18 | new PictureProfile 19 | { 20 | DefaultWidth = 576, 21 | SrcMedias = new[] 22 | { 23 | "(min-width: 1200px)", 24 | "(min-width: 992px)", 25 | "(min-width: 768px)", 26 | "(min-width: 576px)", 27 | "(max-width: 575.98px)" 28 | }, 29 | SrcSetWidths = new[] 30 | { 31 | 1200, 32 | 1200, 33 | 992, 34 | 768, 35 | 576 36 | } 37 | }; 38 | } 39 | } 40 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Rendering/AlloyContentAreaRenderer.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | using EPiServer.Core; 4 | using EPiServer.Core.Html.StringParsing; 5 | using EPiServer.Web; 6 | using EPiServer.Web.Mvc; 7 | using EPiServer.Web.Mvc.Html; 8 | using EPiServer; 9 | 10 | namespace SampleAlloy.Business.Rendering 11 | { 12 | /// 13 | /// Extends the default to apply custom CSS classes to each . 14 | /// 15 | public class AlloyContentAreaRenderer : ContentAreaRenderer 16 | { 17 | protected override string GetContentAreaItemCssClass(HtmlHelper htmlHelper, ContentAreaItem contentAreaItem) 18 | { 19 | var tag = GetContentAreaItemTemplateTag(htmlHelper, contentAreaItem); 20 | return string.Format("block {0} {1} {2}", GetTypeSpecificCssClasses(contentAreaItem, ContentRepository), GetCssClassForTag(tag), tag); 21 | } 22 | 23 | /// 24 | /// Gets a CSS class used for styling based on a tag name (ie a Bootstrap class name) 25 | /// 26 | /// Any tag name available, see 27 | private static string GetCssClassForTag(string tagName) 28 | { 29 | if (string.IsNullOrEmpty(tagName)) 30 | { 31 | return ""; 32 | } 33 | switch (tagName.ToLower()) 34 | { 35 | case "span12": 36 | return "full"; 37 | case "span8": 38 | return "wide"; 39 | case "span6": 40 | return "half"; 41 | default: 42 | return string.Empty; 43 | } 44 | } 45 | 46 | private static string GetTypeSpecificCssClasses(ContentAreaItem contentAreaItem, IContentRepository contentRepository) 47 | { 48 | var content = contentAreaItem.GetContent(contentRepository); 49 | var cssClass = content == null ? String.Empty : content.GetOriginalType().Name.ToLowerInvariant(); 50 | 51 | var customClassContent = content as ICustomCssInContentArea; 52 | if (customClassContent != null && !string.IsNullOrWhiteSpace(customClassContent.ContentAreaCssClass)) 53 | { 54 | cssClass += string.Format("{0}", customClassContent.ContentAreaCssClass); 55 | } 56 | 57 | return cssClass; 58 | } 59 | } 60 | } 61 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Rendering/IContainerPage.cs: -------------------------------------------------------------------------------- 1 | namespace SampleAlloy.Business.Rendering 2 | { 3 | /// 4 | /// Marker interface for content types which should not be handled by DefaultPageController. 5 | /// 6 | interface IContainerPage 7 | { 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Rendering/ICustomCssInContentArea.cs: -------------------------------------------------------------------------------- 1 | namespace SampleAlloy.Business.Rendering 2 | { 3 | /// 4 | /// Defines a property for CSS class(es) which will be added to the class 5 | /// attribute of containing elements when rendered in a content area with a size tag. 6 | /// 7 | interface ICustomCssInContentArea 8 | { 9 | string ContentAreaCssClass { get; } 10 | } 11 | } 12 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/Rendering/SiteViewEngine.cs: -------------------------------------------------------------------------------- 1 | using System.Linq; 2 | using System.Web.Mvc; 3 | 4 | namespace SampleAlloy.Business.Rendering 5 | { 6 | /// 7 | /// Extends the Razor view engine to include the folders ~/Views/Shared/Blocks/ and ~/Views/Shared/PagePartials/ 8 | /// when looking for partial views. 9 | /// 10 | public class SiteViewEngine : RazorViewEngine 11 | { 12 | private static readonly string[] AdditionalPartialViewFormats = new[] 13 | { 14 | TemplateCoordinator.BlockFolder + "{0}.cshtml", 15 | TemplateCoordinator.PagePartialsFolder + "{0}.cshtml" 16 | }; 17 | 18 | public SiteViewEngine() 19 | { 20 | PartialViewLocationFormats = PartialViewLocationFormats.Union(AdditionalPartialViewFormats).ToArray(); 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/StructureMapDependencyResolver.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web.Mvc; 5 | using StructureMap; 6 | 7 | namespace SampleAlloy.Business 8 | { 9 | public class StructureMapDependencyResolver : IDependencyResolver 10 | { 11 | readonly IContainer _container; 12 | 13 | public StructureMapDependencyResolver(IContainer container) 14 | { 15 | _container = container; 16 | } 17 | 18 | public object GetService(Type serviceType) 19 | { 20 | if (serviceType.IsInterface || serviceType.IsAbstract) 21 | { 22 | return GetInterfaceService(serviceType); 23 | } 24 | return GetConcreteService(serviceType); 25 | } 26 | 27 | private object GetConcreteService(Type serviceType) 28 | { 29 | try 30 | { 31 | // Can't use TryGetInstance here because it won’t create concrete types 32 | return _container.GetInstance(serviceType); 33 | } 34 | catch (StructureMapException) 35 | { 36 | return null; 37 | } 38 | } 39 | 40 | private object GetInterfaceService(Type serviceType) 41 | { 42 | return _container.TryGetInstance(serviceType); 43 | } 44 | 45 | public IEnumerable GetServices(Type serviceType) 46 | { 47 | return _container.GetAllInstances(serviceType).Cast(); 48 | } 49 | } 50 | } 51 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Business/UIDescriptors/ContainerPageUIDescriptor.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.Editor; 2 | using EPiServer.Shell; 3 | using SampleAlloy.Models.Pages; 4 | 5 | namespace SampleAlloy.Business.UIDescriptors 6 | { 7 | /// 8 | /// Describes how the UI should appear for content. 9 | /// 10 | [UIDescriptorRegistration] 11 | public class ContainerPageUIDescriptor : UIDescriptor 12 | { 13 | public ContainerPageUIDescriptor() 14 | : base(ContentTypeCssClassNames.Container) 15 | { 16 | DefaultView = CmsViewNames.AllPropertiesView; 17 | } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /samples/SampleAlloy/ClientResources/Images/icons/layoutIcons24x24.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/ClientResources/Images/icons/layoutIcons24x24.png -------------------------------------------------------------------------------- /samples/SampleAlloy/ClientResources/Styles/LayoutIcons.css: -------------------------------------------------------------------------------- 1 | .Sleek .epi-icon__layout--full { 2 | background: url('../Images/Icons/layoutIcons24x24.png') 0px -24px no-repeat; 3 | height: 24px; 4 | width: 24px; 5 | } 6 | .Sleek .epi-icon__layout--half { 7 | background: url('../Images/Icons/layoutIcons24x24.png') 0px -48px no-repeat; 8 | height: 24px; 9 | width: 24px; 10 | } 11 | .Sleek .epi-icon__layout--two-thirds { 12 | background: url('../Images/Icons/layoutIcons24x24.png') 0px -72px no-repeat; 13 | height: 24px; 14 | width: 24px; 15 | } 16 | .Sleek .epi-icon__layout--one-third { 17 | background: url('../Images/Icons/layoutIcons24x24.png') 0px -96px no-repeat; 18 | height: 24px; 19 | width: 24px; 20 | } 21 | .Sleek .epi-icon__layout--one-quarter { 22 | background: url('../Images/Icons/layoutIcons24x24.png') 0px -120px no-repeat; 23 | height: 24px; 24 | width: 24px; 25 | } -------------------------------------------------------------------------------- /samples/SampleAlloy/ClientResources/Styles/Styles.css: -------------------------------------------------------------------------------- 1 | @import url("LayoutIcons.css"); 2 | 3 | .epiStringList .dijitTextArea { 4 | width: 250px; 5 | } 6 | 7 | .epiStringList .epiStringListError .dijitTextArea { 8 | border: solid 1px #d46464; 9 | } -------------------------------------------------------------------------------- /samples/SampleAlloy/Controllers/DefaultPageController.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | using EPiServer; 4 | using EPiServer.Framework.DataAnnotations; 5 | using SampleAlloy.Models.Pages; 6 | using SampleAlloy.Models.ViewModels; 7 | 8 | namespace SampleAlloy.Controllers 9 | { 10 | /// 11 | /// Concrete controller that handles all page types that don't have their own specific controllers. 12 | /// 13 | /// 14 | /// Note that as the view file name is hard coded it won't work with DisplayModes (ie Index.mobile.cshtml). 15 | /// For page types requiring such views add specific controllers for them. Alterntively the Index action 16 | /// could be modified to set ControllerContext.RouteData.Values["controller"] to type name of the currentPage 17 | /// argument. That may however have side effects. 18 | /// 19 | [TemplateDescriptor(Inherited = true)] 20 | public class DefaultPageController : PageControllerBase 21 | { 22 | public ViewResult Index(SitePageData currentPage) 23 | { 24 | var model = CreateModel(currentPage); 25 | return View(string.Format("~/Views/{0}/Index.cshtml", currentPage.GetOriginalType().Name), model); 26 | } 27 | 28 | /// 29 | /// Creates a PageViewModel where the type parameter is the type of the page. 30 | /// 31 | /// 32 | /// Used to create models of a specific type without the calling method having to know that type. 33 | /// 34 | private static IPageViewModel CreateModel(SitePageData page) 35 | { 36 | var type = typeof(PageViewModel<>).MakeGenericType(page.GetOriginalType()); 37 | return Activator.CreateInstance(type, page) as IPageViewModel; 38 | } 39 | } 40 | } 41 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Controllers/ImageFileController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using SampleAlloy.Models.Media; 3 | using SampleAlloy.Models.ViewModels; 4 | using EPiServer.Web.Mvc; 5 | using EPiServer.Web.Routing; 6 | 7 | namespace SampleAlloy.Controllers 8 | { 9 | /// 10 | /// Controller for the image file. 11 | /// 12 | public class ImageFileController : PartialContentController 13 | { 14 | private readonly UrlResolver _urlResolver; 15 | 16 | public ImageFileController(UrlResolver urlResolver) 17 | { 18 | _urlResolver = urlResolver; 19 | } 20 | 21 | /// 22 | /// The index action for the image file. Creates the view model and renders the view. 23 | /// 24 | /// The current image file. 25 | public override ActionResult Index(ImageFile currentContent) 26 | { 27 | var model = new ImageViewModel 28 | { 29 | Url = _urlResolver.GetUrl(currentContent.ContentLink), 30 | Name = currentContent.Name, 31 | Copyright = currentContent.Copyright 32 | }; 33 | 34 | return PartialView(model); 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Controllers/PageControllerBase.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using System.Web.Security; 3 | using SampleAlloy.Business; 4 | using SampleAlloy.Models.Pages; 5 | using SampleAlloy.Models.ViewModels; 6 | using EPiServer.Web.Mvc; 7 | 8 | namespace SampleAlloy.Controllers 9 | { 10 | /// 11 | /// All controllers that renders pages should inherit from this class so that we can 12 | /// apply action filters, such as for output caching site wide, should we want to. 13 | /// 14 | public abstract class PageControllerBase : PageController, IModifyLayout 15 | where T : SitePageData 16 | { 17 | /// 18 | /// Signs out the current user and redirects to the Index action of the same controller. 19 | /// 20 | /// 21 | /// There's a log out link in the footer which should redirect the user to the same page. 22 | /// As we don't have a specific user/account/login controller but rely on the login URL for 23 | /// forms authentication for login functionality we add an action for logging out to all 24 | /// controllers inheriting from this class. 25 | /// 26 | public ActionResult Logout() 27 | { 28 | FormsAuthentication.SignOut(); 29 | return RedirectToAction("Index"); 30 | } 31 | 32 | public virtual void ModifyLayout(LayoutModel layoutModel) 33 | { 34 | var page = PageContext.Page as SitePageData; 35 | if(page != null) 36 | { 37 | layoutModel.HideHeader = page.HideSiteHeader; 38 | layoutModel.HideFooter = page.HideSiteFooter; 39 | } 40 | } 41 | } 42 | } 43 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Controllers/PageListBlockController.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using System.Web.Mvc; 4 | using EPiServer.Core; 5 | using EPiServer.Filters; 6 | using SampleAlloy.Business; 7 | using SampleAlloy.Models.Blocks; 8 | using SampleAlloy.Models.ViewModels; 9 | using EPiServer.Web.Mvc; 10 | using EPiServer; 11 | 12 | namespace SampleAlloy.Controllers 13 | { 14 | public class PageListBlockController : BlockController 15 | { 16 | private ContentLocator contentLocator; 17 | private IContentLoader contentLoader; 18 | public PageListBlockController(ContentLocator contentLocator, IContentLoader contentLoader) 19 | { 20 | this.contentLocator = contentLocator; 21 | this.contentLoader = contentLoader; 22 | } 23 | 24 | public override ActionResult Index(PageListBlock currentBlock) 25 | { 26 | var pages = FindPages(currentBlock); 27 | 28 | pages = Sort(pages, currentBlock.SortOrder); 29 | 30 | if(currentBlock.Count > 0) 31 | { 32 | pages = pages.Take(currentBlock.Count); 33 | } 34 | 35 | var model = new PageListModel(currentBlock) 36 | { 37 | Pages = pages 38 | }; 39 | 40 | ViewData.GetEditHints() 41 | .AddConnection(x => x.Heading, x => x.Heading); 42 | 43 | return PartialView(model); 44 | } 45 | 46 | private IEnumerable FindPages(PageListBlock currentBlock) 47 | { 48 | IEnumerable pages; 49 | var listRoot = currentBlock.Root; 50 | if (currentBlock.Recursive) 51 | { 52 | if (currentBlock.PageTypeFilter != null) 53 | { 54 | pages = contentLocator.FindPagesByPageType(listRoot, true, currentBlock.PageTypeFilter.ID); 55 | } 56 | else 57 | { 58 | pages = contentLocator.GetAll(listRoot); 59 | } 60 | } 61 | else 62 | { 63 | if (currentBlock.PageTypeFilter != null) 64 | { 65 | pages = contentLoader.GetChildren(listRoot) 66 | .Where(p => p.PageTypeID == currentBlock.PageTypeFilter.ID); 67 | } 68 | else 69 | { 70 | pages = contentLoader.GetChildren(listRoot); 71 | } 72 | } 73 | 74 | if (currentBlock.CategoryFilter != null && currentBlock.CategoryFilter.Any()) 75 | { 76 | pages = pages.Where(x => x.Category.Intersect(currentBlock.CategoryFilter).Any()); 77 | } 78 | return pages; 79 | } 80 | 81 | private IEnumerable Sort(IEnumerable pages, FilterSortOrder sortOrder) 82 | { 83 | var asCollection = new PageDataCollection(pages); 84 | var sortFilter = new FilterSort(sortOrder); 85 | sortFilter.Sort(asCollection); 86 | return asCollection; 87 | } 88 | } 89 | } 90 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Controllers/StartPageController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using SampleAlloy.Models.Pages; 3 | using SampleAlloy.Models.ViewModels; 4 | using EPiServer.Web; 5 | using EPiServer.Web.Mvc; 6 | 7 | namespace SampleAlloy.Controllers 8 | { 9 | public class StartPageController : PageControllerBase 10 | { 11 | public ActionResult Index(StartPage currentPage) 12 | { 13 | var model = PageViewModel.Create(currentPage); 14 | 15 | if (SiteDefinition.Current.StartPage.CompareToIgnoreWorkID(currentPage.ContentLink)) // Check if it is the StartPage or just a page of the StartPage type. 16 | { 17 | //Connect the view models logotype property to the start page's to make it editable 18 | var editHints = ViewData.GetEditHints, StartPage>(); 19 | editHints.AddConnection(m => m.Layout.Logotype, p => p.SiteLogotype); 20 | editHints.AddConnection(m => m.Layout.ProductPages, p => p.ProductPageLinks); 21 | editHints.AddConnection(m => m.Layout.CompanyInformationPages, p => p.CompanyInformationPageLinks); 22 | editHints.AddConnection(m => m.Layout.NewsPages, p => p.NewsPageLinks); 23 | editHints.AddConnection(m => m.Layout.CustomerZonePages, p => p.CustomerZonePageLinks); 24 | } 25 | 26 | return View(model); 27 | } 28 | 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Controllers/VideoFileController.cs: -------------------------------------------------------------------------------- 1 | using System.Web.Mvc; 2 | using SampleAlloy.Models.Media; 3 | using SampleAlloy.Models.ViewModels; 4 | using EPiServer.Web.Mvc; 5 | using EPiServer.Web.Routing; 6 | using System; 7 | using EPiServer.Core; 8 | 9 | namespace SampleAlloy.Controllers 10 | { 11 | /// 12 | /// Controller for the video file. 13 | /// 14 | public class VideoFileController : PartialContentController 15 | { 16 | private readonly UrlResolver _urlResolver; 17 | 18 | public VideoFileController(UrlResolver urlResolver) 19 | { 20 | _urlResolver = urlResolver; 21 | } 22 | 23 | /// 24 | /// The index action for the video file. Creates the view model and renders the view. 25 | /// 26 | /// The current video file. 27 | public override ActionResult Index(VideoFile currentContent) 28 | { 29 | var model = new VideoViewModel 30 | { 31 | Url = _urlResolver.GetUrl(currentContent.ContentLink), 32 | PreviewImageUrl = ContentReference.IsNullOrEmpty(currentContent.PreviewImage) ? String.Empty : _urlResolver.GetUrl(currentContent.PreviewImage), 33 | }; 34 | 35 | return PartialView(model); 36 | } 37 | } 38 | } 39 | -------------------------------------------------------------------------------- /samples/SampleAlloy/EPiServerLog.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Global.asax: -------------------------------------------------------------------------------- 1 | <%@ Application Codebehind="Global.asax.cs" Language="C#" Inherits="SampleAlloy.EPiServerApplication" %> 2 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Global.asax.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | 4 | namespace SampleAlloy 5 | { 6 | public class EPiServerApplication : EPiServer.Global 7 | { 8 | protected void Application_Start() 9 | { 10 | AreaRegistration.RegisterAllAreas(); 11 | 12 | //Tip: Want to call the EPiServer API on startup? Add an initialization module instead (Add -> New Item.. -> EPiServer -> Initialization Module) 13 | } 14 | } 15 | } -------------------------------------------------------------------------------- /samples/SampleAlloy/Global.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.DataAnnotations; 2 | using System.Collections.Generic; 3 | using System.ComponentModel.DataAnnotations; 4 | 5 | namespace SampleAlloy 6 | { 7 | 8 | public class Global 9 | { 10 | /// 11 | /// Group names for content types and properties 12 | /// 13 | [GroupDefinitions()] 14 | public static class GroupNames 15 | { 16 | [Display(Name = "Contact", Order = 1)] 17 | public const string Contact = "Contact"; 18 | 19 | [Display(Name = "Default", Order = 2)] 20 | public const string Default = "Default"; 21 | 22 | [Display(Name = "Metadata", Order = 3)] 23 | public const string MetaData = "Metadata"; 24 | 25 | [Display(Name = "News", Order = 4)] 26 | public const string News = "News"; 27 | 28 | [Display(Name = "Products", Order = 5)] 29 | public const string Products = "Products"; 30 | 31 | [Display(Name = "SiteSettings", Order = 6)] 32 | public const string SiteSettings = "SiteSettings"; 33 | 34 | [Display(Name = "Specialized", Order = 7)] 35 | public const string Specialized = "Specialized"; 36 | } 37 | 38 | /// 39 | /// Tags to use for the main widths used in the Bootstrap HTML framework 40 | /// 41 | public static class ContentAreaTags 42 | { 43 | public const string FullWidth = "span12"; 44 | public const string TwoThirdsWidth = "span8"; 45 | public const string HalfWidth = "span6"; 46 | public const string OneThirdWidth = "span4"; 47 | public const string NoRenderer = "norenderer"; 48 | } 49 | 50 | /// 51 | /// Main widths used in the Bootstrap HTML framework 52 | /// 53 | public static class ContentAreaWidths 54 | { 55 | public const int FullWidth = 12; 56 | public const int TwoThirdsWidth = 8; 57 | public const int HalfWidth = 6; 58 | public const int OneThirdWidth = 4; 59 | } 60 | 61 | public static Dictionary ContentAreaTagWidths = new Dictionary 62 | { 63 | { ContentAreaTags.FullWidth, ContentAreaWidths.FullWidth }, 64 | { ContentAreaTags.TwoThirdsWidth, ContentAreaWidths.TwoThirdsWidth }, 65 | { ContentAreaTags.HalfWidth, ContentAreaWidths.HalfWidth }, 66 | { ContentAreaTags.OneThirdWidth, ContentAreaWidths.OneThirdWidth } 67 | }; 68 | 69 | /// 70 | /// Names used for UIHint attributes to map specific rendering controls to page properties 71 | /// 72 | public static class SiteUIHints 73 | { 74 | public const string Contact = "contact"; 75 | public const string Strings = "StringList"; 76 | } 77 | 78 | /// 79 | /// Virtual path to folder with static graphics, such as "~/Static/gfx/" 80 | /// 81 | public const string StaticGraphicsFolderPath = "~/Static/gfx/"; 82 | } 83 | } 84 | 85 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Helpers/CategorizableExtensions.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Linq; 3 | using EPiServer; 4 | using EPiServer.Core; 5 | using EPiServer.DataAbstraction; 6 | using EPiServer.ServiceLocation; 7 | 8 | namespace SampleAlloy.Helpers 9 | { 10 | /// 11 | /// Provides extension methods for categorizable content 12 | /// 13 | /// ICategorizable content includes for example pages and blocks. 14 | public static class CategorizableExtensions 15 | { 16 | /// 17 | /// Returns the CSS classes (if any) associated with the theme(s) of the content, as decided by its categories 18 | /// 19 | /// 20 | /// CSS classes associated with the content's theme(s), or an empty string array if no theme is applicable 21 | /// Content's categorization may map to more than one theme. This method assumes there are website categories called "Meet", "Track", and "Plan" 22 | public static string[] GetThemeCssClassNames(this ICategorizable content) 23 | { 24 | if (content.Category == null) 25 | { 26 | return new string[0]; 27 | } 28 | 29 | var cssClasses = new HashSet(); // Although with some overhead, a HashSet allows us to ensure we never add a CSS class more than once 30 | var categoryRepository = ServiceLocator.Current.GetInstance(); 31 | 32 | foreach (var categoryName in content.Category.Select(category => categoryRepository.Get(category).Name.ToLower())) 33 | { 34 | switch (categoryName) 35 | { 36 | case "meet": 37 | cssClasses.Add("theme1"); 38 | break; 39 | case "track": 40 | cssClasses.Add("theme2"); 41 | break; 42 | case "plan": 43 | cssClasses.Add("theme3"); 44 | break; 45 | } 46 | } 47 | 48 | return cssClasses.ToArray(); 49 | } 50 | } 51 | } 52 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Helpers/UrlHelpers.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.Web.Mvc; 3 | using System.Web.Routing; 4 | using EPiServer.Core; 5 | using EPiServer.Globalization; 6 | using EPiServer.ServiceLocation; 7 | using EPiServer.Web.Routing; 8 | using EPiServer; 9 | 10 | namespace SampleAlloy.Helpers 11 | { 12 | public static class UrlHelpers 13 | { 14 | /// 15 | /// Returns the target URL for a ContentReference. Respects the page's shortcut setting 16 | /// so if the page is set as a shortcut to another page or an external URL that URL 17 | /// will be returned. 18 | /// 19 | public static IHtmlString PageLinkUrl(this UrlHelper urlHelper, ContentReference contentLink) 20 | { 21 | if(ContentReference.IsNullOrEmpty(contentLink)) 22 | { 23 | return MvcHtmlString.Empty; 24 | } 25 | 26 | var contentLoader = ServiceLocator.Current.GetInstance(); 27 | var page = contentLoader.Get(contentLink); 28 | 29 | return PageLinkUrl(urlHelper, page); 30 | } 31 | 32 | /// 33 | /// Returns the target URL for a page. Respects the page's shortcut setting 34 | /// so if the page is set as a shortcut to another page or an external URL that URL 35 | /// will be returned. 36 | /// 37 | public static IHtmlString PageLinkUrl(this UrlHelper urlHelper, PageData page) 38 | { 39 | var urlResolver = ServiceLocator.Current.GetInstance(); 40 | switch (page.LinkType) 41 | { 42 | case PageShortcutType.Normal: 43 | case PageShortcutType.FetchData: 44 | return new MvcHtmlString(urlResolver.GetUrl(page.ContentLink)); 45 | 46 | case PageShortcutType.Shortcut: 47 | var shortcutProperty = page.Property["PageShortcutLink"] as PropertyPageReference; 48 | if (shortcutProperty != null && !ContentReference.IsNullOrEmpty(shortcutProperty.ContentLink)) 49 | { 50 | return urlHelper.PageLinkUrl(shortcutProperty.ContentLink); 51 | } 52 | break; 53 | 54 | case PageShortcutType.External: 55 | return new MvcHtmlString(page.LinkURL); 56 | } 57 | return MvcHtmlString.Empty; 58 | } 59 | 60 | public static RouteValueDictionary GetPageRoute(this RequestContext requestContext, ContentReference contentLink) 61 | { 62 | var values = new RouteValueDictionary(); 63 | values[RoutingConstants.NodeKey] = contentLink; 64 | values[RoutingConstants.LanguageKey] = ContentLanguage.PreferredCulture.Name; 65 | return values; 66 | } 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Blocks/ButtonBlock.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.DataAbstraction; 3 | using EPiServer; 4 | 5 | namespace SampleAlloy.Models.Blocks 6 | { 7 | /// 8 | /// Used to insert a link which is styled as a button 9 | /// 10 | [SiteContentType(GUID = "426CF12F-1F01-4EA0-922F-0778314DDAF0")] 11 | [SiteImageUrl] 12 | public class ButtonBlock : SiteBlockData 13 | { 14 | [Display(Order = 1, GroupName = SystemTabNames.Content)] 15 | [Required] 16 | public virtual string ButtonText { get; set; } 17 | 18 | [Display(Order = 2, GroupName = SystemTabNames.Content)] 19 | [Required] 20 | public virtual Url ButtonLink { get; set; } 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Blocks/ContactBlock.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.Core; 3 | using EPiServer.DataAbstraction; 4 | using EPiServer.DataAnnotations; 5 | using EPiServer.Web; 6 | using EPiServer; 7 | 8 | namespace SampleAlloy.Models.Blocks 9 | { 10 | /// 11 | /// Used to present contact information with a call-to-action link 12 | /// 13 | /// Actual contact details are retrieved from a contact page specified using the ContactPageLink property 14 | [SiteContentType(GUID = "7E932EAF-6BC2-4753-902A-8670EDC5F363")] 15 | [SiteImageUrl] 16 | public class ContactBlock : SiteBlockData 17 | { 18 | [Display( 19 | GroupName = SystemTabNames.Content, 20 | Order = 1)] 21 | [CultureSpecific] 22 | [UIHint(UIHint.Image)] 23 | public virtual ContentReference Image { get; set; } 24 | 25 | [Display( 26 | GroupName = SystemTabNames.Content, 27 | Order = 2)] 28 | [CultureSpecific] 29 | public virtual string Heading { get; set; } 30 | 31 | /// 32 | /// Gets or sets the contact page from which contact information should be retrieved 33 | /// 34 | [Display( 35 | GroupName = SystemTabNames.Content, 36 | Order = 3)] 37 | [UIHint(Global.SiteUIHints.Contact)] 38 | public virtual PageReference ContactPageLink { get; set; } 39 | 40 | [Display( 41 | GroupName = SystemTabNames.Content, 42 | Order = 4)] 43 | [CultureSpecific] 44 | public virtual string LinkText { get; set; } 45 | 46 | [Display( 47 | GroupName = SystemTabNames.Content, 48 | Order = 5)] 49 | [CultureSpecific] 50 | public virtual Url LinkUrl { get; set; } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Blocks/EditorialBlock.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.Core; 3 | using EPiServer.DataAbstraction; 4 | using EPiServer.DataAnnotations; 5 | 6 | namespace SampleAlloy.Models.Blocks 7 | { 8 | /// 9 | /// Used to insert editorial content edited using a rich-text editor 10 | /// 11 | [SiteContentType( 12 | GUID = "67F617A4-2175-4360-975E-75EDF2B924A7", 13 | GroupName = SystemTabNames.Content)] 14 | [SiteImageUrl] 15 | public class EditorialBlock : SiteBlockData 16 | { 17 | [Display(GroupName = SystemTabNames.Content)] 18 | [CultureSpecific] 19 | public virtual XhtmlString MainBody { get; set; } 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Blocks/FormBlock.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.DataAbstraction; 3 | using EPiServer.DataAnnotations; 4 | 5 | namespace SampleAlloy.Models.Blocks 6 | { 7 | /// 8 | /// Used to insert an XForm 9 | /// 10 | [SiteContentType( 11 | GroupName = Global.GroupNames.Specialized, 12 | GUID = "FA326346-4D4C-4E82-AFE8-C36279006179")] 13 | [SiteImageUrl] 14 | public class FormBlock : SiteBlockData 15 | { 16 | [Display( 17 | GroupName = SystemTabNames.Content, 18 | Order = 1)] 19 | [CultureSpecific] 20 | public virtual string Heading { get; set; } 21 | 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Blocks/JumbotronBlock.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.DataAbstraction; 3 | using EPiServer.DataAnnotations; 4 | using EPiServer.Web; 5 | using EPiServer.Core; 6 | using EPiServer; 7 | 8 | namespace SampleAlloy.Models.Blocks 9 | { 10 | /// 11 | /// Used for a primary message on a page, commonly used on start pages and landing pages 12 | /// 13 | [SiteContentType( 14 | GroupName = Global.GroupNames.Specialized, 15 | GUID = "9FD1C860-7183-4122-8CD4-FF4C55E096F9")] 16 | [SiteImageUrl] 17 | public class JumbotronBlock : SiteBlockData 18 | { 19 | [Display( 20 | GroupName = SystemTabNames.Content, 21 | Order = 1 22 | )] 23 | [CultureSpecific] 24 | [UIHint(UIHint.Image)] 25 | public virtual ContentReference Image { get; set; } 26 | 27 | /// 28 | /// Gets or sets a description for the image, for example used as the alt text for the image when rendered 29 | /// 30 | [Display( 31 | GroupName = SystemTabNames.Content, 32 | Order = 1 33 | )] 34 | [CultureSpecific] 35 | [UIHint(UIHint.LongString)] 36 | public virtual string ImageDescription 37 | { 38 | get 39 | { 40 | var propertyValue = this["ImageDescription"] as string; 41 | 42 | // Return image description with fall back to the heading if no description has been specified 43 | return string.IsNullOrWhiteSpace(propertyValue) ? Heading : propertyValue; 44 | } 45 | set { this["ImageDescription"] = value; } 46 | } 47 | 48 | [Display( 49 | GroupName = SystemTabNames.Content, 50 | Order = 1 51 | )] 52 | [CultureSpecific] 53 | public virtual string Heading { get; set; } 54 | 55 | [Display( 56 | GroupName = SystemTabNames.Content, 57 | Order = 2 58 | )] 59 | [CultureSpecific] 60 | [UIHint(UIHint.Textarea)] 61 | public virtual string SubHeading { get; set; } 62 | 63 | [Display( 64 | GroupName = SystemTabNames.Content, 65 | Order = 3 66 | )] 67 | [CultureSpecific] 68 | [Required] 69 | public virtual string ButtonText { get; set; } 70 | 71 | //The link must be required as an anchor tag requires an href in order to be valid and focusable 72 | [Display( 73 | GroupName = SystemTabNames.Content, 74 | Order = 4 75 | )] 76 | [CultureSpecific] 77 | [Required] 78 | public virtual Url ButtonLink { get; set; } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Blocks/PageListBlock.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel; 2 | using System.ComponentModel.DataAnnotations; 3 | using EPiServer.Core; 4 | using EPiServer.DataAbstraction; 5 | using EPiServer.DataAnnotations; 6 | using EPiServer.Filters; 7 | 8 | namespace SampleAlloy.Models.Blocks 9 | { 10 | /// 11 | /// Used to insert a list of pages, for example a news list 12 | /// 13 | [SiteContentType(GUID = "30685434-33DE-42AF-88A7-3126B936AEAD")] 14 | [SiteImageUrl] 15 | public class PageListBlock : SiteBlockData 16 | { 17 | [Display( 18 | GroupName = SystemTabNames.Content, 19 | Order = 1)] 20 | [CultureSpecific] 21 | public virtual string Heading { get; set; } 22 | 23 | [Display( 24 | GroupName = SystemTabNames.Content, 25 | Order = 2)] 26 | [DefaultValue(false)] 27 | public virtual bool IncludePublishDate { get; set; } 28 | 29 | /// 30 | /// Gets or sets whether a page introduction/description should be included in the list 31 | /// 32 | [Display( 33 | GroupName = SystemTabNames.Content, 34 | Order = 3)] 35 | [DefaultValue(true)] 36 | public virtual bool IncludeIntroduction { get; set; } 37 | 38 | [Display( 39 | GroupName = SystemTabNames.Content, 40 | Order = 4)] 41 | [DefaultValue(3)] 42 | [Required] 43 | public virtual int Count { get; set; } 44 | 45 | [Display( 46 | GroupName = SystemTabNames.Content, 47 | Order = 4)] 48 | [DefaultValue(FilterSortOrder.PublishedDescending)] 49 | [UIHint("SortOrder")] 50 | [BackingType(typeof(PropertyNumber))] 51 | public virtual FilterSortOrder SortOrder { get; set; } 52 | 53 | [Display( 54 | GroupName = SystemTabNames.Content, 55 | Order = 5)] 56 | [Required] 57 | public virtual PageReference Root { get; set; } 58 | 59 | [Display( 60 | GroupName = SystemTabNames.Content, 61 | Order = 6)] 62 | public virtual PageType PageTypeFilter{get; set;} 63 | 64 | [Display( 65 | GroupName = SystemTabNames.Content, 66 | Order = 7)] 67 | public virtual CategoryList CategoryFilter { get; set; } 68 | 69 | [Display( 70 | GroupName = SystemTabNames.Content, 71 | Order = 8)] 72 | public virtual bool Recursive { get; set; } 73 | 74 | #region IInitializableContent 75 | 76 | /// 77 | /// Sets the default property values on the content data. 78 | /// 79 | /// Type of the content. 80 | public override void SetDefaultValues(ContentType contentType) 81 | { 82 | base.SetDefaultValues(contentType); 83 | 84 | Count = 3; 85 | IncludeIntroduction = true; 86 | IncludePublishDate = false; 87 | SortOrder = FilterSortOrder.PublishedDescending; 88 | } 89 | 90 | #endregion 91 | } 92 | } 93 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Blocks/SiteBlockData.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace SampleAlloy.Models.Blocks 3 | { 4 | /// 5 | /// Base class for all block types on the site 6 | /// 7 | public abstract class SiteBlockData : EPiServer.Core.BlockData 8 | { 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Blocks/SiteLogotypeBlock.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.Core; 3 | using EPiServer.DataAnnotations; 4 | using EPiServer.Shell.ObjectEditing; 5 | using EPiServer.Web; 6 | using EPiServer; 7 | 8 | namespace SampleAlloy.Models.Blocks 9 | { 10 | /// 11 | /// Used to provide a composite property on the start page to set site logotype settings 12 | /// 13 | [SiteContentType( 14 | GUID = "09854019-91A5-4B93-8623-17F038346001", 15 | AvailableInEditMode = false)] // Should not be created and added to content areas by editors, the SiteLogotypeBlock is only used as a property type 16 | [SiteImageUrl] 17 | public class SiteLogotypeBlock : SiteBlockData 18 | { 19 | /// 20 | /// Gets the site logotype URL 21 | /// 22 | /// If not specified a default logotype will be used 23 | [DefaultDragAndDropTarget] 24 | [UIHint(UIHint.Image)] 25 | public virtual Url Url 26 | { 27 | get 28 | { 29 | var url = this.GetPropertyValue(b => b.Url); 30 | 31 | return url == null || url.IsEmpty() 32 | ? new Url("/Static/gfx/logotype.png") 33 | : url; 34 | } 35 | set 36 | { 37 | this.SetPropertyValue(b => b.Url, value); 38 | } 39 | } 40 | 41 | [CultureSpecific] 42 | public virtual string Title { get; set; } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Blocks/TeaserBlock.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.Core; 3 | using EPiServer.DataAbstraction; 4 | using EPiServer.DataAnnotations; 5 | using EPiServer.Web; 6 | 7 | namespace SampleAlloy.Models.Blocks 8 | { 9 | /// 10 | /// Used to provide a stylized entry point to a page on the site 11 | /// 12 | [SiteContentType(GUID = "EB67A99A-E239-41B8-9C59-20EAA5936047")] // BEST PRACTICE TIP: Always assign a GUID explicitly when creating a new block type 13 | [SiteImageUrl] // Use site's default thumbnail 14 | public class TeaserBlock : SiteBlockData 15 | { 16 | [CultureSpecific] 17 | [Required(AllowEmptyStrings = false)] 18 | [Display( 19 | GroupName = SystemTabNames.Content, 20 | Order = 1)] 21 | public virtual string Heading { get; set; } 22 | 23 | [CultureSpecific] 24 | [Required(AllowEmptyStrings = false)] 25 | [Display( 26 | GroupName = SystemTabNames.Content, 27 | Order = 2)] 28 | [UIHint(UIHint.LongString)] 29 | public virtual string Text { get; set; } 30 | 31 | [CultureSpecific] 32 | [Required(AllowEmptyStrings = false)] 33 | [UIHint(UIHint.Image)] 34 | [Display( 35 | GroupName = SystemTabNames.Content, 36 | Order = 3)] 37 | public virtual ContentReference Image { get; set; } 38 | 39 | [Display( 40 | GroupName = SystemTabNames.Content, 41 | Order = 4)] 42 | public virtual PageReference Link { get; set; } 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Media/GenericMedia.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.Core; 2 | using EPiServer.DataAnnotations; 3 | using System; 4 | 5 | namespace SampleAlloy.Models.Media 6 | { 7 | [ContentType(GUID = "EE3BD195-7CB0-4756-AB5F-E5E223CD9820")] 8 | public class GenericMedia : MediaData 9 | { 10 | /// 11 | /// Gets or sets the description. 12 | /// 13 | public virtual String Description { get; set; } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Media/ImageFile.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.Core; 2 | using EPiServer.DataAnnotations; 3 | using EPiServer.Framework.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations; 5 | 6 | namespace SampleAlloy.Models.Media 7 | { 8 | [ContentType(GUID = "0A89E464-56D4-449F-AEA8-2BF774AB8730")] 9 | [MediaDescriptor(ExtensionString = "jpg,jpeg,jpe,ico,gif,bmp,png")] 10 | public class ImageFile : ImageData 11 | { 12 | /// 13 | /// Gets or sets the copyright. 14 | /// 15 | /// 16 | /// The copyright. 17 | /// 18 | public virtual string Copyright { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Media/VideoFile.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.Core; 3 | using EPiServer.DataAnnotations; 4 | using EPiServer.Framework.DataAnnotations; 5 | using EPiServer.Web; 6 | 7 | namespace SampleAlloy.Models.Media 8 | { 9 | [ContentType(GUID = "85468104-E06F-47E5-A317-FC9B83D3CBA6")] 10 | [MediaDescriptor(ExtensionString = "flv,mp4,webm")] 11 | public class VideoFile : VideoData 12 | { 13 | /// 14 | /// Gets or sets the copyright. 15 | /// 16 | public virtual string Copyright { get; set; } 17 | 18 | /// 19 | /// Gets or sets the URL to the preview image. 20 | /// 21 | [UIHint(UIHint.Image)] 22 | public virtual ContentReference PreviewImage { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/ArticlePage.cs: -------------------------------------------------------------------------------- 1 | namespace SampleAlloy.Models.Pages 2 | { 3 | /// 4 | /// Used primarily for publishing news articles on the website 5 | /// 6 | [SiteContentType( 7 | GroupName = Global.GroupNames.News, 8 | GUID = "AEECADF2-3E89-4117-ADEB-F8D43565D2F4")] 9 | [SiteImageUrl(Global.StaticGraphicsFolderPath + "page-type-thumbnail-article.png")] 10 | public class ArticlePage : StandardPage 11 | { 12 | 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/ContactPage.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using SampleAlloy.Business; 3 | using SampleAlloy.Business.EditorDescriptors; 4 | using SampleAlloy.Business.Rendering; 5 | using EPiServer.Web; 6 | using EPiServer.Core; 7 | 8 | namespace SampleAlloy.Models.Pages 9 | { 10 | /// 11 | /// Represents contact details for a contact person 12 | /// 13 | [SiteContentType( 14 | GUID = "F8D47655-7B50-4319-8646-3369BA9AF05B", 15 | GroupName = Global.GroupNames.Specialized)] 16 | [SiteImageUrl(Global.StaticGraphicsFolderPath + "page-type-thumbnail-contact.png")] 17 | public class ContactPage : SitePageData, IContainerPage 18 | { 19 | [Display(GroupName = Global.GroupNames.Contact)] 20 | [UIHint(UIHint.Image)] 21 | public virtual ContentReference Image { get; set; } 22 | 23 | [Display(GroupName = Global.GroupNames.Contact)] 24 | public virtual string Phone { get; set; } 25 | 26 | [Display(GroupName = Global.GroupNames.Contact)] 27 | [Business.EmailAddress] 28 | public virtual string Email { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/ContainerPage.cs: -------------------------------------------------------------------------------- 1 | using SampleAlloy.Business.Rendering; 2 | 3 | namespace SampleAlloy.Models.Pages 4 | { 5 | /// 6 | /// Used to logically group pages in the page tree 7 | /// 8 | [SiteContentType( 9 | GUID = "D178950C-D20E-4A46-90BD-5338B2424745", 10 | GroupName = Global.GroupNames.Specialized)] 11 | [SiteImageUrl] 12 | public class ContainerPage : SitePageData, IContainerPage 13 | { 14 | 15 | } 16 | } 17 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/IHasRelatedContent.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.Core; 2 | 3 | namespace SampleAlloy.Models.Pages 4 | { 5 | public interface IHasRelatedContent 6 | { 7 | ContentArea RelatedContentArea { get; } 8 | } 9 | } 10 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/ISearchPage.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Generic; 3 | using System.Linq; 4 | using System.Web; 5 | 6 | namespace SampleAlloy.Models.Pages 7 | { 8 | /// 9 | /// Marker interface for search implementation 10 | /// 11 | public interface ISearchPage 12 | { 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/LandingPage.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.Core; 3 | using EPiServer.DataAbstraction; 4 | using EPiServer.DataAnnotations; 5 | 6 | namespace SampleAlloy.Models.Pages 7 | { 8 | /// 9 | /// Used for campaign or landing pages, commonly used for pages linked in online advertising such as AdWords 10 | /// 11 | [SiteContentType( 12 | GUID = "DBED4258-8213-48DB-A11F-99C034172A54", 13 | GroupName = Global.GroupNames.Specialized)] 14 | [SiteImageUrl] 15 | public class LandingPage : SitePageData 16 | { 17 | [Display( 18 | GroupName = SystemTabNames.Content, 19 | Order=310)] 20 | [CultureSpecific] 21 | public virtual ContentArea MainContentArea { get; set; } 22 | 23 | public override void SetDefaultValues(ContentType contentType) 24 | { 25 | base.SetDefaultValues(contentType); 26 | 27 | HideSiteFooter = true; 28 | HideSiteHeader = true; 29 | } 30 | } 31 | } 32 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/NewsPage.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using EPiServer.DataAbstraction; 3 | using EPiServer.Filters; 4 | using EPiServer.Framework.Localization; 5 | using EPiServer.ServiceLocation; 6 | using SampleAlloy.Business; 7 | using SampleAlloy.Models.Blocks; 8 | 9 | namespace SampleAlloy.Models.Pages 10 | { 11 | /// 12 | /// Presents a news section including a list of the most recent articles on the site 13 | /// 14 | [SiteContentType(GUID = "638D8271-5CA3-4C72-BABC-3E8779233263")] 15 | [SiteImageUrl] 16 | public class NewsPage : StandardPage 17 | { 18 | [Display( 19 | GroupName = SystemTabNames.Content, 20 | Order = 305)] 21 | public virtual PageListBlock NewsList { get; set; } 22 | 23 | public override void SetDefaultValues(ContentType contentType) 24 | { 25 | base.SetDefaultValues(contentType); 26 | 27 | NewsList.Count = 20; 28 | NewsList.Heading = ServiceLocator.Current.GetInstance().GetString("/newspagetemplate/latestnews"); 29 | NewsList.IncludeIntroduction = true; 30 | NewsList.IncludePublishDate = true; 31 | NewsList.Recursive = true; 32 | NewsList.PageTypeFilter = typeof(ArticlePage).GetPageType(); 33 | NewsList.SortOrder = FilterSortOrder.PublishedDescending; 34 | } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/ProductPage.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using SampleAlloy.Models.Blocks; 3 | using EPiServer.Core; 4 | using EPiServer.DataAbstraction; 5 | using EPiServer.DataAnnotations; 6 | using SampleAlloy.Models.Properties; 7 | 8 | namespace SampleAlloy.Models.Pages 9 | { 10 | /// 11 | /// Used to present a single product 12 | /// 13 | [SiteContentType( 14 | GUID = "17583DCD-3C11-49DD-A66D-0DEF0DD601FC", 15 | GroupName = Global.GroupNames.Products)] 16 | [SiteImageUrl(Global.StaticGraphicsFolderPath + "page-type-thumbnail-product.png")] 17 | [AvailableContentTypes( 18 | Availability = Availability.Specific, 19 | IncludeOn = new[] { typeof(StartPage) })] 20 | public class ProductPage : StandardPage, IHasRelatedContent 21 | { 22 | [Required] 23 | [BackingType(typeof(PropertyStringList))] 24 | [Display(Order = 305)] 25 | [UIHint(Global.SiteUIHints.Strings)] 26 | [CultureSpecific] 27 | public virtual string[] UniqueSellingPoints { get; set; } 28 | 29 | [Display( 30 | GroupName = SystemTabNames.Content, 31 | Order = 330)] 32 | [CultureSpecific] 33 | [AllowedTypes(new[] { typeof(IContentData) },new[] { typeof(JumbotronBlock) })] 34 | public virtual ContentArea RelatedContentArea { get; set; } 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/SearchPage.cs: -------------------------------------------------------------------------------- 1 | using System.ComponentModel.DataAnnotations; 2 | using SampleAlloy.Models.Blocks; 3 | using EPiServer.Core; 4 | using EPiServer.DataAbstraction; 5 | using EPiServer.DataAnnotations; 6 | 7 | namespace SampleAlloy.Models.Pages 8 | { 9 | /// 10 | /// Used to provide on-site search 11 | /// 12 | [SiteContentType( 13 | GUID = "AAC25733-1D21-4F82-B031-11E626C91E30", 14 | GroupName = Global.GroupNames.Specialized)] 15 | [SiteImageUrl] 16 | public class SearchPage : SitePageData, IHasRelatedContent, ISearchPage 17 | { 18 | [Display( 19 | GroupName = SystemTabNames.Content, 20 | Order = 310)] 21 | [CultureSpecific] 22 | [AllowedTypes(new[] { typeof(IContentData) }, new[] { typeof(JumbotronBlock) })] 23 | public virtual ContentArea RelatedContentArea { get; set; } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Pages/StandardPage.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.Core; 2 | using EPiServer.DataAbstraction; 3 | using EPiServer.DataAnnotations; 4 | using System.ComponentModel.DataAnnotations; 5 | 6 | namespace SampleAlloy.Models.Pages 7 | { 8 | /// 9 | /// Used for the pages mainly consisting of manually created content such as text, images, and blocks 10 | /// 11 | [SiteContentType(GUID = "9CCC8A41-5C8C-4BE0-8E73-520FF3DE8267")] 12 | [SiteImageUrl(Global.StaticGraphicsFolderPath + "page-type-thumbnail-standard.png")] 13 | public class StandardPage : SitePageData 14 | { 15 | [Display( 16 | GroupName = SystemTabNames.Content, 17 | Order = 310)] 18 | [CultureSpecific] 19 | public virtual XhtmlString MainBody { get; set; } 20 | 21 | [Display( 22 | GroupName = SystemTabNames.Content, 23 | Order = 320)] 24 | public virtual ContentArea MainContentArea { get; set; } 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/Properties/PropertyStringList.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EPiServer.Core; 3 | using EPiServer.Framework.DataAnnotations; 4 | using EPiServer.PlugIn; 5 | 6 | namespace SampleAlloy.Models.Properties 7 | { 8 | /// 9 | /// Property type for storing a list of strings 10 | /// 11 | /// 12 | /// For an example, see where this property type is used for 13 | /// the MetaKeywords property 14 | /// 15 | [EditorHint(Global.SiteUIHints.Strings)] 16 | [PropertyDefinitionTypePlugIn(Description = "A property for list of strings", DisplayName = "String List")] 17 | public class PropertyStringList : PropertyLongString 18 | { 19 | protected string Separator = "\n"; 20 | 21 | public string[] List => (string[]) Value; 22 | 23 | public override Type PropertyValueType => typeof(string[]); 24 | 25 | public override object Value 26 | { 27 | get 28 | { 29 | var value = base.Value as string; 30 | 31 | if (value == null) 32 | return null; 33 | 34 | return value.Split(Separator.ToCharArray(), StringSplitOptions.RemoveEmptyEntries); 35 | } 36 | set 37 | { 38 | if (value is string[]) 39 | { 40 | var s = string.Join(Separator, value as string[]); 41 | base.Value = s; 42 | } 43 | else 44 | { 45 | base.Value = value; 46 | } 47 | } 48 | } 49 | 50 | public override object SaveData(PropertyDataCollection properties) 51 | { 52 | return LongString; 53 | } 54 | } 55 | } -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/SiteContentType.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.DataAnnotations; 2 | 3 | namespace SampleAlloy.Models 4 | { 5 | /// 6 | /// Attribute used for site content types to set default attribute values 7 | /// 8 | public class SiteContentType : ContentTypeAttribute 9 | { 10 | public SiteContentType() 11 | { 12 | GroupName = Global.GroupNames.Default; 13 | } 14 | } 15 | } 16 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/SiteImageUrl.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.DataAnnotations; 2 | 3 | namespace SampleAlloy.Models 4 | { 5 | /// 6 | /// Attribute to set the default thumbnail for site page and block types 7 | /// 8 | public class SiteImageUrl : ImageUrlAttribute 9 | { 10 | /// 11 | /// The parameterless constructor will initialize a SiteImageUrl attribute with a default thumbnail 12 | /// 13 | public SiteImageUrl() : base("~/Static/gfx/page-type-thumbnail.png") 14 | { 15 | 16 | } 17 | 18 | public SiteImageUrl(string path) : base(path) 19 | { 20 | 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/ContactBlockModel.cs: -------------------------------------------------------------------------------- 1 | using System.Web; 2 | using System.ComponentModel.DataAnnotations; 3 | using SampleAlloy.Models.Pages; 4 | using EPiServer.Web; 5 | using EPiServer.Core; 6 | 7 | namespace SampleAlloy.Models.ViewModels 8 | { 9 | public class ContactBlockModel 10 | { 11 | [UIHint(UIHint.Image)] 12 | public ContentReference Image { get; set; } 13 | public string Heading { get; set; } 14 | public string LinkText { get; set; } 15 | public IHtmlString LinkUrl { get; set; } 16 | public bool ShowLink { get; set; } 17 | public ContactPage ContactPage { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/ContentRenderingErrorModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EPiServer; 3 | using EPiServer.Core; 4 | 5 | namespace SampleAlloy.Models.ViewModels 6 | { 7 | public class ContentRenderingErrorModel 8 | { 9 | public ContentRenderingErrorModel(IContentData contentData, Exception exception) 10 | { 11 | var content = contentData as IContent; 12 | if(content != null) 13 | { 14 | ContentName = content.Name; 15 | } 16 | else 17 | { 18 | ContentName = string.Empty; 19 | } 20 | 21 | ContentTypeName = contentData.GetOriginalType().Name; 22 | 23 | Exception = exception; 24 | } 25 | 26 | public string ContentName { get; set; } 27 | public string ContentTypeName { get; set; } 28 | public Exception Exception { get; set; } 29 | } 30 | } 31 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/IPageViewModel.cs: -------------------------------------------------------------------------------- 1 | using EPiServer.Core; 2 | using SampleAlloy.Models.Pages; 3 | 4 | namespace SampleAlloy.Models.ViewModels 5 | { 6 | /// 7 | /// Defines common characteristics for view models for pages, including properties used by layout files. 8 | /// 9 | /// 10 | /// Views which should handle several page types (T) can use this interface as model type rather than the 11 | /// concrete PageViewModel class, utilizing the that this interface is covariant. 12 | /// 13 | public interface IPageViewModel where T : SitePageData 14 | { 15 | T CurrentPage { get; } 16 | LayoutModel Layout { get; set; } 17 | IContent Section { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/ImageViewModel.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace SampleAlloy.Models.ViewModels 3 | { 4 | /// 5 | /// View model for the image file 6 | /// 7 | public class ImageViewModel 8 | { 9 | /// 10 | /// Gets or sets the URL to the image. 11 | /// 12 | public string Url { get; set; } 13 | 14 | /// 15 | /// Gets or sets the name of the image. 16 | /// 17 | public string Name { get; set; } 18 | 19 | /// 20 | /// Gets or sets the copyright information of the image. 21 | /// 22 | public string Copyright { get; set; } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/LayoutModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web; 3 | using System.Web.Mvc; 4 | using System.Web.Routing; 5 | using EPiServer.Core; 6 | using EPiServer.SpecializedProperties; 7 | using SampleAlloy.Models.Blocks; 8 | 9 | namespace SampleAlloy.Models.ViewModels 10 | { 11 | public class LayoutModel 12 | { 13 | public SiteLogotypeBlock Logotype { get; set; } 14 | public IHtmlString LogotypeLinkUrl { get; set; } 15 | public bool HideHeader { get; set; } 16 | public bool HideFooter { get; set; } 17 | public LinkItemCollection ProductPages { get; set; } 18 | public LinkItemCollection CompanyInformationPages { get; set; } 19 | public LinkItemCollection NewsPages { get; set; } 20 | public LinkItemCollection CustomerZonePages { get; set; } 21 | public bool LoggedIn { get; set; } 22 | public MvcHtmlString LoginUrl { get; set; } 23 | public MvcHtmlString LogOutUrl { get; set; } 24 | public MvcHtmlString SearchActionUrl { get; set; } 25 | 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/PageListModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using EPiServer.Core; 3 | using SampleAlloy.Models.Blocks; 4 | 5 | namespace SampleAlloy.Models.ViewModels 6 | { 7 | public class PageListModel 8 | { 9 | public PageListModel(PageListBlock block) 10 | { 11 | Heading = block.Heading; 12 | ShowIntroduction = block.IncludeIntroduction; 13 | ShowPublishDate = block.IncludePublishDate; 14 | } 15 | public string Heading { get; set; } 16 | public IEnumerable Pages { get; set; } 17 | public bool ShowIntroduction { get; set; } 18 | public bool ShowPublishDate { get; set; } 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/PageViewModel.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using EPiServer.Core; 3 | using SampleAlloy.Models.Pages; 4 | 5 | namespace SampleAlloy.Models.ViewModels 6 | { 7 | public class PageViewModel : IPageViewModel where T : SitePageData 8 | { 9 | public PageViewModel(T currentPage) 10 | { 11 | CurrentPage = currentPage; 12 | } 13 | 14 | public T CurrentPage { get; private set; } 15 | public LayoutModel Layout { get; set; } 16 | public IContent Section { get; set; } 17 | } 18 | 19 | public static class PageViewModel 20 | { 21 | /// 22 | /// Returns a PageViewModel of type . 23 | /// 24 | /// 25 | /// Convenience method for creating PageViewModels without having to specify the type as methods can use type inference while constructors cannot. 26 | /// 27 | public static PageViewModel Create(T page) where T : SitePageData 28 | { 29 | return new PageViewModel(page); 30 | } 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/PreviewModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using EPiServer.Core; 3 | using SampleAlloy.Models.Pages; 4 | 5 | namespace SampleAlloy.Models.ViewModels 6 | { 7 | public class PreviewModel : PageViewModel 8 | { 9 | public PreviewModel(SitePageData currentPage, IContent previewContent) 10 | : base(currentPage) 11 | { 12 | PreviewContent = previewContent; 13 | Areas = new List(); 14 | } 15 | 16 | public IContent PreviewContent { get; set; } 17 | public List Areas { get; set; } 18 | 19 | public class PreviewArea 20 | { 21 | public bool Supported { get; set; } 22 | public string AreaName { get; set; } 23 | public string AreaTag { get; set; } 24 | public ContentArea ContentArea { get; set; } 25 | } 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/SearchContentModel.cs: -------------------------------------------------------------------------------- 1 | using System.Collections.Generic; 2 | using System.Web; 3 | using SampleAlloy.Models.Pages; 4 | 5 | namespace SampleAlloy.Models.ViewModels 6 | { 7 | public class SearchContentModel : PageViewModel 8 | { 9 | public SearchContentModel(SearchPage currentPage) : base(currentPage) 10 | { 11 | } 12 | 13 | public bool SearchServiceDisabled { get; set; } 14 | public string SearchedQuery { get; set; } 15 | public int NumberOfHits { get; set; } 16 | public IEnumerable Hits { get; set; } 17 | 18 | public class SearchHit 19 | { 20 | public string Title { get; set; } 21 | public string Url { get; set; } 22 | public string Excerpt { get; set; } 23 | } 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Models/ViewModels/VideoViewModel.cs: -------------------------------------------------------------------------------- 1 | 2 | namespace SampleAlloy.Models.ViewModels 3 | { 4 | /// 5 | /// View model for the video file 6 | /// 7 | public class VideoViewModel 8 | { 9 | /// 10 | /// Gets or sets the URL to the video. 11 | /// 12 | public string Url { get; set; } 13 | 14 | /// 15 | /// Gets or sets the URL to a preview image for the video. 16 | /// 17 | public string PreviewImageUrl { get; set; } 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | using System.Runtime.InteropServices; 4 | 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | [assembly: AssemblyTitle("SampleAlloy")] 9 | [assembly: AssemblyDescription("")] 10 | [assembly: AssemblyConfiguration("")] 11 | [assembly: AssemblyCompany("")] 12 | [assembly: AssemblyProduct("SampleAlloy")] 13 | [assembly: AssemblyCopyright("Copyright © 2016")] 14 | [assembly: AssemblyTrademark("")] 15 | [assembly: AssemblyCulture("")] 16 | 17 | // Setting ComVisible to false makes the types in this assembly not visible 18 | // to COM components. If you need to access a type in this assembly from 19 | // COM, set the ComVisible attribute to true on that type. 20 | [assembly: ComVisible(false)] 21 | 22 | // The following GUID is for the ID of the typelib if this project is exposed to COM 23 | [assembly: Guid("94db38c3-6a80-42d1-9cae-8b4f69475c13")] 24 | 25 | // Version information for an assembly consists of the following four values: 26 | // 27 | // Major Version 28 | // Minor Version 29 | // Build Number 30 | // Revision 31 | // 32 | // You can specify all the values or you can default the Revision and Build Numbers 33 | // by using the '*' as shown below: 34 | [assembly: AssemblyVersion("1.0.0.0")] 35 | [assembly: AssemblyFileVersion("1.0.0.0")] 36 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Resources/LanguageFiles/Display.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | Mobile 7 | 8 | 9 | Web 10 | 11 | 12 | 13 | Full 14 | Wide 15 | Narrow 16 | 17 | 18 | Standard (1366x768) 19 | iPad horizontal (1024x768) 20 | iPhone vertical (320x568) 21 | Android vertical (480x800) 22 | 23 | 24 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Resources/LanguageFiles/EditorHints.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | Button Text 11 | 12 | 13 | 14 | 15 | 16 | This block type does not have a renderer for this type of content area. 17 | 18 | 19 | 20 | 21 | 22 | Error while rendering {0} {1} 23 | 24 | 25 | 26 | The block '{0}' when displayed as {1} 27 | The block '{0}' cannot be displayed as {1} 28 | No renderer found for '{0}' 29 | 30 | 31 | 32 | 33 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Resources/LanguageFiles/GroupNames.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | Default 9 | 10 | 11 | News 12 | 13 | 14 | Products 15 | 16 | 17 | SEO 18 | 19 | 20 | Site settings 21 | 22 | 23 | Specialized 24 | 25 | 26 | 27 | 28 | 29 | 30 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Resources/LanguageFiles/Views.xml: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | E-mail 8 | Phone 9 | No contact selected 10 | 11 | 12 |
13 | The Company 14 | Customer Zone 15 | Log in 16 | Log out 17 | News & Events 18 | Products 19 |
20 | 21 | 22 | Search 23 | 24 | 25 | 26 | Latest news 27 | News list will be empty since no list root has been set 28 | 29 | 30 | 31 | no 32 | Search result 33 | Search 34 | Your search for 35 | resulted in 36 | hits 37 | EPiServer Search is not configured or is not active for this website. 38 | 39 | 40 |
41 | Thank you for your post! 42 |
43 | 44 |
45 | 46 |
47 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Resources/LanguageFiles/_ReadMe.txt: -------------------------------------------------------------------------------- 1 | All language files in this folder are included in the LocalizationService. 2 | 3 | The path to this folder is configured in EPiServerFramework.config: 4 | 5 | 6 | 7 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/css/editmode.css: -------------------------------------------------------------------------------- 1 | /* CSS specific to edit mode, such as help content displayed to the editor */ 2 | 3 | .alert-info 4 | { 5 | border-color: #B8C0C5; 6 | color: black; 7 | font-family: Verdana; 8 | font-size: 1em; 9 | font-style: italic; 10 | background-color: #B8C0C5; 11 | box-shadow: 3px 3px 5px #CCC; 12 | text-align: center; 13 | } 14 | 15 | .alert-error p { 16 | text-align: left; 17 | } 18 | 19 | .alert-error .heading { 20 | font-weight: bold; 21 | color: #ff0000; 22 | } 23 | 24 | .alert-error .details { 25 | font-size: 0.8em; 26 | max-height: 100px; 27 | overflow: scroll; 28 | } 29 | 30 | .header.dim { 31 | margin: 2% 0; 32 | opacity: 0.3; 33 | } -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/css/editor.css: -------------------------------------------------------------------------------- 1 | /* Styles used by the TinyMCE editor */ 2 | 3 | h2 {EditMenuName:Header 2;} 4 | h3 {EditMenuName:Header 3;} 5 | 6 | /*Block Preview*/ 7 | .alert-info { 8 | background-color: #FFF8AA; 9 | border-color: #858585; 10 | color: #000000; 11 | font-family: Verdana; 12 | font-size: 12px; 13 | } 14 | 15 | .header.dim { 16 | margin: 2% 0; 17 | opacity: 0.3; 18 | } -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/css/media.css: -------------------------------------------------------------------------------- 1 | @charset "utf-8"; 2 | /* CSS Document */ 3 | 4 | 5 | 6 | @media (max-width: 979px) { 7 | .span12, .span8, .span6, .span4 { 8 | float: none; 9 | width: auto !important; 10 | } 11 | 12 | .span4 h2, .span6 h2 13 | { 14 | clear:both; 15 | } 16 | 17 | .teaserblock.full h2, .teaserblock.wide h2 { 18 | font-size: 2.5em; 19 | } 20 | 21 | .subHeader 22 | { 23 | width:100% !important; 24 | font-weight:normal !important; 25 | } 26 | 27 | .jumbotronblock .span4 28 | { 29 | display:none; 30 | } 31 | 32 | .media .mediaImg img 33 | { 34 | width:75%;} 35 | 36 | 37 | .hideMyTracks {display:none;} 38 | 39 | } 40 | 41 | 42 | 43 | @media (max-width: 834px) { 44 | 45 | .teaserblock.full h2, .teaserblock.wide h2 { 46 | clear:both; 47 | } 48 | 49 | .teaserblock.full h2, .teaserblock.wide h2, .teaserblock.full p, .teaserblock.wide p { 50 | text-align:center; 51 | } 52 | 53 | .teaserblock.full img, .teaserblock.wide img { 54 | width:75%; 55 | } 56 | 57 | #header .span2 58 | { 59 | float:left; 60 | width:20% !important; 61 | } 62 | 63 | #header .span10 64 | { 65 | float:right; 66 | } 67 | 68 | .span12 .media .mediaText, .span8 .media .mediaText 69 | { 70 | clear:both; 71 | margin:0 2% 5px; 72 | } 73 | 74 | } 75 | 76 | @media (max-width: 767px) { 77 | 78 | h1 79 | { 80 | font-size:35px !important; 81 | } 82 | 83 | h2 84 | { 85 | font-size:20px !important; 86 | } 87 | 88 | .introduction { 89 | font-size:1.2em !important; 90 | margin:2% 0 4% 0; 91 | } 92 | 93 | .alloyMenu .navbar .nav>li>a { 94 | color:#323335; 95 | padding-bottom:12px; 96 | line-height:23px; 97 | text-shadow:none !important; 98 | outline:none; 99 | } 100 | 101 | .alloyMenu .navbar .nav>li>ul>li a:hover { 102 | outline:1px solid; 103 | background:#2980bd; 104 | } 105 | 106 | 107 | .span3 { 108 | width:100% !important; 109 | 110 | } 111 | 112 | .teaserblock img { 113 | width:75%; 114 | } 115 | 116 | .btn-blue { 117 | margin-right:1%; 118 | float:left; 119 | clear:none; 120 | } 121 | 122 | .searchButton { 123 | float:right; 124 | margin-top:7px !important; 125 | } 126 | 127 | .alloyMenu .navbar-search .search-query 128 | { 129 | max-width:70%; 130 | } 131 | 132 | 133 | #header .span2 134 | { 135 | float:left; 136 | width:20% !important; 137 | } 138 | 139 | #header .span10 140 | { 141 | float:right; 142 | } 143 | 144 | } 145 | 146 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/New_FDT_Press_Contact_.JPG: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/New_FDT_Press_Contact_.JPG -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/carouselbackground.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/carouselbackground.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/contact.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/contact.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/exampelspan4.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/exampelspan4.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/experts.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/experts.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/fallows-media-wide.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/fallows-media-wide.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/leader.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/leader.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/leader2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/leader2.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/logotype.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/logotype.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/meet.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/meet.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/page-type-thumbnail-article.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/page-type-thumbnail-article.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/page-type-thumbnail-contact.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/page-type-thumbnail-contact.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/page-type-thumbnail-product.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/page-type-thumbnail-product.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/page-type-thumbnail-standard.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/page-type-thumbnail-standard.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/page-type-thumbnail.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/page-type-thumbnail.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/person.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/person.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/plan.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/plan.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/play.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/play.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/playInactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/playInactive.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/productLandingv2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/productLandingv2.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/searchbutton.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/searchbutton.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/searchbuttonsmall.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/searchbuttonsmall.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/gfx/track.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/gfx/track.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/html/error.htm: -------------------------------------------------------------------------------- 1 |  2 | 3 | An error occured 4 | 5 | 6 | 9 | Logotype 10 |

When things go wrong...

11 |

This error message can be modified by editing the /Static/html/error.htm file.

12 | 13 | 14 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/jwplayer/player.swf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/jwplayer/player.swf -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/jwplayer/preview.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/jwplayer/preview.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/Static/jwplayer/video.mp4: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/Static/jwplayer/video.mp4 -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/ArticlePage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using SampleAlloy 2 | @model PageViewModel 3 | 4 | @{ Layout = "~/Views/Shared/Layouts/_LeftNavigation.cshtml"; } 5 | 6 |

x.CurrentPage.PageName)>@Model.CurrentPage.PageName

7 |

x.CurrentPage.MetaDescription)>@Model.CurrentPage.MetaDescription

8 |
9 |
x.CurrentPage.MainBody)> 10 | @Html.DisplayFor(m => m.CurrentPage.MainBody) 11 |
12 |
13 | @Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "row", Tag = Global.ContentAreaTags.TwoThirdsWidth }) 14 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/ContactBlock/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model ContactBlockModel 2 | 3 |
4 | @Html.PropertyFor(x => x.Image) 5 |

x.Heading)>@Model.Heading

6 | @Html.PropertyFor(x => x.ContactPage) 7 | @if(Model.ShowLink) 8 | { 9 | x.LinkText)> 10 | @Model.LinkText 11 | 12 | } 13 |
14 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/ImageFile/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model ImageViewModel 2 | 3 | @Model.Name 4 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/LandingPage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using SampleAlloy 2 | @model PageViewModel 3 |
4 | @Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "row equal-height", tag = Global.ContentAreaTags.FullWidth }) 5 |
6 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/NewsPage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using SampleAlloy 2 | @model PageViewModel 3 | 4 | @{ Layout = "~/Views/Shared/Layouts/_LeftNavigation.cshtml"; } 5 | 6 |

x.CurrentPage.PageName)>@Model.CurrentPage.PageName

7 |

x.CurrentPage.MetaDescription)>@Model.CurrentPage.MetaDescription

8 |
9 |
x.CurrentPage.MainBody)> 10 | @Html.DisplayFor(m => m.CurrentPage.MainBody) 11 |
12 |
13 | @Html.PropertyFor(x => x.CurrentPage.NewsList) 14 | @Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "row", Tag = Global.ContentAreaTags.TwoThirdsWidth }) 15 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/PageListBlock/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model PageListModel 2 | @Html.FullRefreshPropertiesMetaData(new[] { "IncludePublishDate", "IncludeIntroduction", "Count", "SortOrder", "Root", "PageTypeFilter", "CategoryFilter", "Recursive" }) 3 |

x.Heading)>@Model.Heading

4 |
5 | 6 | @foreach(var page in Model.Pages) 7 | { 8 |
9 |

10 | @Html.PageLink(page) 11 |

12 | @if(Model.ShowPublishDate) 13 | { 14 |

@Html.DisplayFor(x => page.StartPublish)

15 | } 16 | @if(Model.ShowIntroduction && page is SitePageData) 17 | { 18 | var withTeaserText = (SitePageData) page; 19 |

@withTeaserText.TeaserText

20 | } 21 |
22 |
23 | } 24 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Preview/Index.cshtml: -------------------------------------------------------------------------------- 1 | @model PreviewModel 2 | 3 | @foreach(var area in Model.Areas) 4 | { 5 | if(area.Supported) 6 | { 7 | @Html.Partial("TemplateHint", string.Format(@Html.Translate("/preview/heading"), Model.PreviewContent.Name, area.AreaName)) 8 |
9 | @Html.DisplayFor(x => area.ContentArea, new {Tag = area.AreaTag}) 10 |
11 | } 12 | else 13 | { 14 | @Html.Partial("TemplateHint", string.Format(@Html.Translate("/preview/norenderer"), Model.PreviewContent.Name, area.AreaName)) 15 | } 16 | } 17 | 18 | @if(!Model.Areas.Any()) 19 | { 20 | @Html.Partial("TemplateHint", string.Format(@Html.Translate("/preview/norendereratall"), Model.PreviewContent.Name)) 21 | } 22 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/ProductPage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using SampleAlloy 2 | @model PageViewModel 3 | 4 | @{ Layout = "~/Views/Shared/Layouts/_TwoPlusOne.cshtml"; } 5 | 6 |

x.CurrentPage.PageName)>@Model.CurrentPage.PageName

7 |

x.CurrentPage.MetaDescription)>@Model.CurrentPage.MetaDescription

8 |
9 |
x.CurrentPage.MainBody)> 10 | @Html.DisplayFor(m => m.CurrentPage.MainBody) 11 |
12 |
13 | @Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "row", Tag = Global.ContentAreaTags.TwoThirdsWidth }) 14 | 15 | @section RelatedContent 16 | { 17 |
x.CurrentPage.PageImage)> 18 | 19 |
20 | 21 |
22 |

x.CurrentPage.PageName)>@Model.CurrentPage.PageName

23 | @Html.PropertyFor(x => x.CurrentPage.UniqueSellingPoints) 24 |
25 | 26 | @Html.PropertyFor(x => x.CurrentPage.RelatedContentArea, new { CssClass = "row", Tag = Global.ContentAreaTags.OneThirdWidth }) 27 | } 28 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Blocks/ButtonBlock.cshtml: -------------------------------------------------------------------------------- 1 | @model ButtonBlock 2 | 3 | m.ButtonText)> 4 | @{ 5 | var buttonText = string.IsNullOrWhiteSpace(Model.ButtonText) 6 | ? Html.Translate("/blocks/buttonblockcontrol/buttondefaulttext") 7 | : Model.ButtonText; 8 | } 9 | @buttonText 10 | 11 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Blocks/EditorialBlock.cshtml: -------------------------------------------------------------------------------- 1 | @model EditorialBlock 2 | 3 |
x.MainBody)> 4 | @Html.DisplayFor(x => Model.MainBody) 5 |
6 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Blocks/FormBlock.cshtml: -------------------------------------------------------------------------------- 1 | @model FormBlock 2 | 3 |

m.Heading)>@Model.Heading

4 | @Html.PropertyFor(x => x.Form) 5 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Blocks/JumbotronBlockWide.cshtml: -------------------------------------------------------------------------------- 1 | @model JumbotronBlock 2 | 3 |
4 |
5 | @Html.PropertyFor(m=>m.Image) 6 |
7 | 8 |
9 |

m.Heading)>@Model.Heading

10 |

m.SubHeading)>@Model.SubHeading

11 | m.ButtonText)>@Model.ButtonText 12 |
13 |
14 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Blocks/NoRenderer.cshtml: -------------------------------------------------------------------------------- 1 | @using EPiServer.Shell.Web.Mvc.Html 2 | @Html.Partial("TemplateHint", @Html.Translate("/blocks/norenderer/message")) 3 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Blocks/SiteLogotypeBlock.cshtml: -------------------------------------------------------------------------------- 1 | @model SiteLogotypeBlock 2 | 3 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Blocks/TeaserBlock.cshtml: -------------------------------------------------------------------------------- 1 | @using EPiServer.Core 2 | @using SampleAlloy.Controllers 3 | @model TeaserBlock 4 |
5 | @*Link the teaser block only if a link has been set and not displayed in preview*@ 6 | @using(Html.BeginConditionalLink( 7 | !ContentReference.IsNullOrEmpty(Model.Link) && !(ViewContext.Controller is PreviewController), 8 | Url.PageLinkUrl(Model.Link), 9 | Model.Heading)) 10 | { 11 |

x.Heading)>@Model.Heading

12 |

x.Text)>@Model.Text

13 |
x.Image)>
14 | } 15 | 16 |
17 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Blocks/TeaserBlockWide.cshtml: -------------------------------------------------------------------------------- 1 | @using EPiServer.Core 2 | @using SampleAlloy.Controllers 3 | @model TeaserBlock 4 | 5 |
6 | @*Link the teaser block only if a link has been set and not displayed in preview*@ 7 | @using(Html.BeginConditionalLink( 8 | !ContentReference.IsNullOrEmpty(Model.Link) && !(ViewContext.Controller is PreviewController), 9 | Url.PageLinkUrl(Model.Link), 10 | Model.Heading)) 11 | { 12 |
13 |
x.Image)> 14 | 15 |
16 |
17 |

x.Heading)>@Model.Heading

18 |

x.Text)>@Model.Text

19 |
20 |
21 | } 22 |
23 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Breadcrumbs.cshtml: -------------------------------------------------------------------------------- 1 | @using EPiServer.Core 2 | @using EPiServer.Web 3 | @*Helper used as template for a page in the bread crumb, recursively triggering the rendering of the next page*@ 4 | @helper ItemTemplate(HtmlHelpers.MenuItem breadCrumbItem) { 5 | if (breadCrumbItem.Selected) 6 | { 7 | if (breadCrumbItem.Page.HasTemplate() && !breadCrumbItem.Page.ContentLink.CompareToIgnoreWorkID(Model.CurrentPage.ContentLink)) 8 | { 9 | @Html.PageLink(breadCrumbItem.Page) 10 | } 11 | else 12 | { 13 | @breadCrumbItem.Page.PageName 14 | } 15 | if (!breadCrumbItem.Page.ContentLink.CompareToIgnoreWorkID(Model.CurrentPage.ContentLink)) 16 | { 17 | / 18 | @Html.MenuList(breadCrumbItem.Page.ContentLink, ItemTemplate) 19 | } 20 | } 21 | } 22 | 23 |
24 |
25 |
    26 | @Html.ContentLink(SiteDefinition.Current.StartPage) 27 | / 28 | @Html.MenuList(SiteDefinition.Current.StartPage, ItemTemplate, requireVisibleInMenu: false, requirePageTemplate: false) 29 |
30 |
31 |
32 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/DisplayTemplates/ContactPage.cshtml: -------------------------------------------------------------------------------- 1 | @model ContactPage 2 | 3 |

4 | @if(Model != null) 5 | { 6 | @Model.PageName
7 | @Html.Translate("/contact/phone")@: : @Model.Phone
8 | @Html.Translate("/contact/email")@: : @Html.DisplayFor(m => m.Email) 9 | } 10 | else 11 | { 12 | @Html.Translate("/contact/noneselected") 13 | } 14 |

15 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/DisplayTemplates/DateTime.cshtml: -------------------------------------------------------------------------------- 1 | @model DateTime 2 | @Model.ToString("d MMMM yyyy") 3 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/DisplayTemplates/Image.cshtml: -------------------------------------------------------------------------------- 1 | @model EPiServer.Core.ContentReference 2 | @if (Model != null) 3 | { 4 | 5 | } 6 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/DisplayTemplates/StringList.cshtml: -------------------------------------------------------------------------------- 1 | @model string[] 2 | @if(Model != null && Model.Length > 0) 3 | { 4 |
    5 | @foreach(var stringValue in Model) 6 | { 7 |
  • @stringValue
  • 8 | } 9 |
10 | } 11 | 12 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Footer.cshtml: -------------------------------------------------------------------------------- 1 | @model IPageViewModel 2 |
3 | 36 |
37 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Header.cshtml: -------------------------------------------------------------------------------- 1 | @using EPiServer.Editor 2 | @using EPiServer.Core 3 | @using EPiServer.Web 4 | @model IPageViewModel 5 |
6 | 51 |
52 | 53 |
54 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Layouts/_LeftNavigation.cshtml: -------------------------------------------------------------------------------- 1 | @model IPageViewModel 2 | 3 | @{ Layout = "~/Views/Shared/Layouts/_Root.cshtml"; } 4 | 5 | @{Html.RenderPartial("Breadcrumbs", Model);} 6 | 7 |
8 |
9 |
10 |
11 | @{Html.RenderPartial("SubNavigation", Model);} 12 | @RenderSection("RelatedContent", false) 13 |
14 |
15 |
16 | 17 |
18 | @RenderBody() 19 |
20 |
21 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Layouts/_Root.cshtml: -------------------------------------------------------------------------------- 1 | @using System.Web.Optimization 2 | @using EPiServer.Framework.Web.Mvc.Html 3 | @model IPageViewModel 4 | 5 | 6 | 7 | 8 | 9 | 10 | @Model.CurrentPage.MetaTitle 11 | @Html.CanonicalLink() 12 | @Html.AlternateLinks() 13 | @Styles.Render("~/bundles/css") 14 | @Scripts.Render("~/bundles/js") 15 | @Html.RequiredClientResources("Header") @*Enable components to require resources. For an example, see the view for VideoBlock.*@ 16 | 17 | 18 | 19 | @Html.RenderEPiServerQuickNavigator() 20 | @Html.FullRefreshPropertiesMetaData() 21 |
22 | @if(!Model.Layout.HideHeader) 23 | { 24 | Html.RenderPartial("Header", Model); 25 | } 26 | @RenderBody() 27 | @if(!Model.Layout.HideHeader) 28 | { 29 | Html.RenderPartial("Footer", Model); 30 | } 31 |
32 | @Html.RequiredClientResources("Footer") 33 | 34 | 35 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/Layouts/_TwoPlusOne.cshtml: -------------------------------------------------------------------------------- 1 | @using SampleAlloy 2 | @model IPageViewModel 3 | @{ Layout = "~/Views/Shared/Layouts/_Root.cshtml"; } 4 | 5 | @{Html.RenderPartial("Breadcrumbs");} 6 | 7 |
8 | 9 |
10 | @RenderBody() 11 |
12 | 13 |
14 | @if (IsSectionDefined("RelatedContent")) 15 | { 16 | @RenderSection("RelatedContent") 17 | } 18 | else if (Model.CurrentPage is IHasRelatedContent) 19 | { 20 | @Html.PropertyFor(x => ((IHasRelatedContent)x.CurrentPage).RelatedContentArea, new { CssClass = "row", Tag = Global.ContentAreaTags.OneThirdWidth }) 21 | } 22 |
23 |
24 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/PagePartials/ContactPage.cshtml: -------------------------------------------------------------------------------- 1 | @model ContactPage 2 | 3 |
4 | 5 |

@Model.PageName

6 |

@Model.TeaserText

7 |

8 | @Html.Translate("/contact/email"): @Html.DisplayFor(x => x.Email)
9 | @Html.Translate("/contact/phone"): @Model.Phone 10 |

11 |
12 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/PagePartials/ContactPageWide.cshtml: -------------------------------------------------------------------------------- 1 | @model ContactPage 2 |
3 |
4 |
5 | 6 |
7 |

@Model.PageName

8 |

@Model.TeaserText

9 |

10 | @Html.Translate("/contact/email"): @Html.DisplayFor(x => x.Email)
11 | @Html.Translate("/contact/phone"): @Model.Phone 12 |

13 |
14 |
15 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/PagePartials/Page.cshtml: -------------------------------------------------------------------------------- 1 | @using EPiServer.Core 2 | @model SitePageData 3 | 4 |
5 | @using(Html.BeginConditionalLink(Model.HasTemplate(), Url.PageLinkUrl(Model), Model.PageName)) 6 | { 7 |

@Model.PageName

8 |

@Model.TeaserText

9 | @Html.DisplayFor(m => m.PageImage) 10 | } 11 |
12 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/PagePartials/PageWide.cshtml: -------------------------------------------------------------------------------- 1 | @using EPiServer.Core 2 | @model SitePageData 3 |
4 | @using(Html.BeginConditionalLink(Model.HasTemplate(), Url.PageLinkUrl(Model), Model.PageName)) 5 | { 6 |
7 |
8 | @Html.DisplayFor(m => m.PageImage) 9 |
10 |

@Model.PageName

11 |

@Model.TeaserText

12 |
13 | } 14 |
15 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/SubNavigation.cshtml: -------------------------------------------------------------------------------- 1 | @model IPageViewModel 2 | 3 | @helper ItemTemplate(HtmlHelpers.MenuItem firstLevelItem) { 4 | 10 |
11 |
    12 | @Html.MenuList(firstLevelItem.Page.ContentLink, SubLevelItemTemplate) 13 |
14 |
15 | } 16 | 17 | @helper SubLevelItemTemplate(HtmlHelpers.MenuItem subLevelItem) { 18 |
  • 19 | @Html.PageLink(subLevelItem.Page) 20 | @*To show more levels call Html.MenuList recursively here if subLevelItem.Selected == true*@ 21 |
  • 22 | } 23 | 24 |
    25 |
    26 | @if(Model.Section != null) { 27 | @Html.MenuList(Model.Section.ContentLink, ItemTemplate) 28 | } 29 |
    30 |
    31 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/TemplateError.cshtml: -------------------------------------------------------------------------------- 1 | @model ContentRenderingErrorModel 2 |
    3 |

    @string.Format(Html.Translate("/renderingerror/heading"), Model.ContentTypeName, Model.ContentName)

    4 |

    5 | @Model.Exception.Message
    6 | @Model.Exception.StackTrace 7 |

    8 |
    9 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Shared/TemplateHint.cshtml: -------------------------------------------------------------------------------- 1 | @model string 2 |

    @Model

    3 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/StandardPage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using SampleAlloy 2 | @model PageViewModel 3 | 4 | @{ Layout = "~/Views/Shared/Layouts/_LeftNavigation.cshtml"; } 5 | 6 |

    x.CurrentPage.PageName)>@Model.CurrentPage.PageName

    7 |

    x.CurrentPage.MetaDescription)>@Model.CurrentPage.MetaDescription

    8 |
    9 |
    x.CurrentPage.MainBody)> 10 | @Html.DisplayFor(m => m.CurrentPage.MainBody) 11 |
    12 |
    13 | @Html.PropertyFor(x => x.CurrentPage.MainContentArea, new { CssClass = "row", Tag = Global.ContentAreaTags.TwoThirdsWidth }) 14 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/StartPage/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using ImageResizer 2 | @using ImageResizer.Plugins.EPiServer 3 | @using SampleAlloy.Business 4 | @model PageViewModel 5 | 6 | 7 |
    8 | @Html.Raw(Html.ResizePicture(Model.CurrentPage.MainImage, PictureProfiles.SampleImage, cssClass: "sample-css-class").ToHtmlString()) 9 | @Html.ResizePicture(Model.CurrentPage.MainImage, PictureProfiles.SampleImage, cssClass: "sample-css-class") 10 |
    11 | 12 |
    13 | @Html.ResizePictures(new[] 14 | { 15 | Html.ResizeImage(Model.CurrentPage.XLImage).Quality(10), 16 | Html.ResizeImage(Model.CurrentPage.LGImage).Quality(10), 17 | Html.ResizeImage(Model.CurrentPage.MDImage).Quality(10), 18 | Html.ResizeImage(Model.CurrentPage.SMImage).Quality(10), 19 | Html.ResizeImage(Model.CurrentPage.XSImage).Quality(10) 20 | }, PictureProfiles.BootstrapGrid, cssClass: "sample-css-class") 21 | 22 | @Html.ResizePictures(new[] 23 | { 24 | Model.CurrentPage.XLImage, 25 | Model.CurrentPage.LGImage, 26 | Model.CurrentPage.MDImage, 27 | Model.CurrentPage.SMImage, 28 | Model.CurrentPage.XSImage 29 | }, PictureProfiles.BootstrapGrid, cssClass: "sample-css-class") 30 | 31 | @Html.ResizePicture(Model.CurrentPage.MainImage, PictureProfiles.SampleImage, cssClass: "sample-css-class") 32 | @Html.ResizePicture(Model.CurrentPage.MainImage.ResizeImage().Quality(10), PictureProfiles.SampleImage, cssClass: "sample-css-class") 33 | @Html.ResizePictureWithFallback(Model.CurrentPage.EmptyImage, PictureProfiles.SampleImage, "/noimage.jpg?scale=both", cssClass: "sample-css-class") 34 |
    35 | 36 |
    37 | 38 | 39 | 40 |
    41 | 42 |
    43 | 44 | 45 | 46 |
    47 | 48 |
    49 | 50 | 51 | 52 |
    53 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/VideoFile/Index.cshtml: -------------------------------------------------------------------------------- 1 | @using EPiServer.Framework.Web.Resources 2 | @model VideoViewModel 3 | @{ 4 | ClientResources.RequireScript(Href("~/static/jwplayer/jwplayer.js")); 5 | 6 | //The video element's ID needs to be unique in order for several video blocks and possible the same video block, to work on the same page 7 | var containerId = "video-container-" + Guid.NewGuid().GetHashCode(); 8 | } 9 | @Html.FullRefreshPropertiesMetaData(new []{"Url"}) 10 |
    m.Url)> 11 |
    12 |
    13 |
    14 | 15 | 30 |
    31 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/Web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 |
    7 |
    8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Views/_viewstart.cshtml: -------------------------------------------------------------------------------- 1 | @{ 2 | Layout = "~/Views/Shared/Layouts/_Root.cshtml"; 3 | } 4 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Web.Debug.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 29 | 30 | -------------------------------------------------------------------------------- /samples/SampleAlloy/Web.Release.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 17 | 18 | 19 | 30 | 31 | -------------------------------------------------------------------------------- /samples/SampleAlloy/favicon.ico: -------------------------------------------------------------------------------- 1 | h( ...>>>Ɋ9777000$$$666!!!### -------------------------------------------------------------------------------- /samples/SampleAlloy/module.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /samples/SampleAlloy/modules/_protected/CMS/CMS.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/modules/_protected/CMS/CMS.zip -------------------------------------------------------------------------------- /samples/SampleAlloy/modules/_protected/CMS/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/SampleAlloy/modules/_protected/EPiServer.Cms.TinyMce/EPiServer.Cms.TinyMce.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/modules/_protected/EPiServer.Cms.TinyMce/EPiServer.Cms.TinyMce.zip -------------------------------------------------------------------------------- /samples/SampleAlloy/modules/_protected/EPiServer.Cms.TinyMce/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/SampleAlloy/modules/_protected/EPiServer.Packaging.UI/EPiServer.Packaging.UI.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/modules/_protected/EPiServer.Packaging.UI/EPiServer.Packaging.UI.zip -------------------------------------------------------------------------------- /samples/SampleAlloy/modules/_protected/EPiServer.Packaging.UI/web.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | -------------------------------------------------------------------------------- /samples/SampleAlloy/modules/_protected/Shell/Shell.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/modules/_protected/Shell/Shell.zip -------------------------------------------------------------------------------- /samples/SampleAlloy/modules/_protected/Shell/web.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | -------------------------------------------------------------------------------- /samples/SampleAlloy/modules/_protected/repository.config: -------------------------------------------------------------------------------- 1 |  2 | -------------------------------------------------------------------------------- /samples/SampleAlloy/noimage.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/noimage.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | -------------------------------------------------------------------------------- /samples/SampleAlloy/seq.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/seq.jpg -------------------------------------------------------------------------------- /samples/SampleAlloy/winforms.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/d07625bd7659aa8914e9e1a040f3cff2f917ce5e/samples/SampleAlloy/winforms.png -------------------------------------------------------------------------------- /src/ImageResizer.Plugins.EPiServerBlobReader/ContentReferenceExtensions.cs: -------------------------------------------------------------------------------- 1 | using EPiServer; 2 | using EPiServer.Core; 3 | 4 | namespace ImageResizer.Plugins.EPiServer 5 | { 6 | public static class ContentReferenceExtensions 7 | { 8 | public static UrlBuilder ResizeImage(this ContentReference image, int? width = null, int? height = null) 9 | { 10 | return HtmlHelperExtensions.ResizeImage(null, image, width, height); 11 | } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ImageResizer.Plugins.EPiServerBlobReader/EPiServerBlobFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Collections.Specialized; 3 | using System.IO; 4 | using System.Threading.Tasks; 5 | using EPiServer; 6 | using EPiServer.Core; 7 | using EPiServer.Framework.Blobs; 8 | using EPiServer.Security; 9 | using EPiServer.ServiceLocation; 10 | using EPiServer.Web.Routing; 11 | 12 | namespace ImageResizer.Plugins.EPiServerBlobReader 13 | { 14 | // Original code (or at least as much as left from it): 15 | // http://world.episerver.com/Code/Martin-Pickering/ImageResizingNet-integration-for-CMS75/ 16 | public class EPiServerBlobFile : IVirtualFileWithModifiedDate, IVirtualFileWithModifiedDateAsync, IVirtualFileAsync 17 | { 18 | private readonly UrlResolver _urlResolver; 19 | private Blob _blob; 20 | private IContent _content; 21 | 22 | public EPiServerBlobFile(string virtualPath, NameValueCollection queryString) : this(virtualPath, queryString, ServiceLocator.Current.GetInstance()) { } 23 | 24 | public EPiServerBlobFile(string virtualPath, NameValueCollection queryString, UrlResolver urlResolver) 25 | { 26 | _urlResolver = urlResolver; 27 | VirtualPath = virtualPath; 28 | QueryString = queryString; 29 | } 30 | 31 | public NameValueCollection QueryString { get; private set; } 32 | 33 | public Blob Blob => _blob ?? (_blob = GetBlob()); 34 | 35 | private IContent Content 36 | { 37 | get 38 | { 39 | if (_content != null) 40 | { 41 | return _content; 42 | } 43 | 44 | _content = _urlResolver.Route(new UrlBuilder(VirtualPath)); 45 | if (!_content.QueryDistinctAccess(AccessLevel.Read)) 46 | { 47 | _content = null; 48 | } 49 | 50 | return _content; 51 | } 52 | } 53 | 54 | public bool BlobExists => Content != null; 55 | 56 | public string VirtualPath { get; } 57 | public Task OpenAsync() 58 | { 59 | return Task.FromResult(Blob?.OpenRead()); 60 | } 61 | 62 | public DateTime ModifiedDateUTC 63 | { 64 | get 65 | { 66 | var trackable = Content as IChangeTrackable; 67 | return trackable?.Saved.ToUniversalTime() ?? DateTime.MinValue.ToUniversalTime(); 68 | } 69 | } 70 | 71 | public Task GetModifiedDateUTCAsync() 72 | { 73 | return Task.FromResult(ModifiedDateUTC); 74 | } 75 | 76 | public Stream Open() 77 | { 78 | return Blob?.OpenRead(); 79 | } 80 | 81 | private Blob GetBlob() 82 | { 83 | var binaryStorable = Content as IBinaryStorable; 84 | return binaryStorable?.BinaryData; 85 | } 86 | } 87 | } 88 | -------------------------------------------------------------------------------- /src/ImageResizer.Plugins.EPiServerBlobReader/HtmlHelperExtensions.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.Web.Mvc; 3 | using EPiServer; 4 | using EPiServer.Core; 5 | using EPiServer.Web.Routing; 6 | 7 | namespace ImageResizer.Plugins.EPiServer 8 | { 9 | public static class HtmlHelperExtensions 10 | { 11 | public static UrlBuilder ResizeImage(this HtmlHelper helper, ContentReference image, int? width = null, int? height = null) 12 | { 13 | if(image == null || image == ContentReference.EmptyReference) 14 | throw new ArgumentNullException(nameof(image), "You might want to use `ResizeImageWithFallback()` instead"); 15 | 16 | var url = UrlResolver.Current.GetUrl(image); 17 | 18 | return ConstructUrl(url, width, height); 19 | } 20 | 21 | public static UrlBuilder ResizeImageWithFallback(this HtmlHelper helper, ContentReference image, string imageFallback, int? width = null, int? height = null) 22 | { 23 | return ConstructUrl(image == null || image == ContentReference.EmptyReference ? imageFallback : UrlResolver.Current.GetUrl(image), width, height); 24 | } 25 | 26 | public static UrlBuilder ResizeImage(this HtmlHelper helper, string imageUrl, int? width = null, int? height = null) 27 | { 28 | if(string.IsNullOrEmpty(imageUrl)) 29 | throw new ArgumentNullException(nameof(imageUrl), "You might want to use `ResizeImageWithFallback()` instead"); 30 | 31 | return ConstructUrl(imageUrl, width, height); 32 | } 33 | 34 | public static UrlBuilder ResizeImageWithFallback(this HtmlHelper helper, string imageUrl, string imageFallback, int? width = null, int? height = null) 35 | { 36 | return ConstructUrl(string.IsNullOrEmpty(imageUrl) ? imageFallback : imageUrl, width, height); 37 | } 38 | 39 | private static UrlBuilder ConstructUrl(string url, int? width = null, int? height = null) 40 | { 41 | var builder = new UrlBuilder(url); 42 | 43 | if(width.HasValue) 44 | builder.Width(width.Value); 45 | 46 | if(height.HasValue) 47 | builder.Height(height.Value); 48 | 49 | return builder; 50 | } 51 | } 52 | } 53 | -------------------------------------------------------------------------------- /src/ImageResizer.Plugins.EPiServerBlobReader/ImageResizer.Plugins.EPiServerBlobReader.nuspec: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | $id$ 5 | $version$ 6 | $title$ 7 | $author$ 8 | $author$ 9 | https://github.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader 10 | https://github.com/valdisiljuconoks/ImageResizer.Plugins.EPiServerBlobReader/blob/master/LICENSE 11 | false 12 | $description$ 13 | Support for responsive picture element. 14 | Copyright 2021 (c) Valdis Iljuconoks, Tech Fellow 15 | EPiServer CMS ImageResizer Image Resizer BlobReader Blob ImageResizing Resizing Image Resizer ImageResizer.Net Imazen Imazen.Net 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | -------------------------------------------------------------------------------- /src/ImageResizer.Plugins.EPiServerBlobReader/PictureProfile.cs: -------------------------------------------------------------------------------- 1 | namespace ImageResizer.Plugins.EPiServer 2 | { 3 | public class PictureProfile 4 | { 5 | public int DefaultWidth { get; set; } 6 | 7 | public int[] SrcSetWidths { get; set; } 8 | 9 | public string[] SrcSetSizes { get; set; } 10 | 11 | public string[] SrcMedias { get; set; } 12 | } 13 | } 14 | -------------------------------------------------------------------------------- /src/ImageResizer.Plugins.EPiServerBlobReader/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.InteropServices; 3 | 4 | [assembly: AssemblyTitle("ImageResizer.Plugins.EPiServerBlobReader")] 5 | [assembly: AssemblyDescription("ImageResizer library plugins for your Episerver site")] 6 | [assembly: AssemblyConfiguration("")] 7 | [assembly: AssemblyCompany("Valdis Iljuconoks (Tech Fellow Consulting), https://tech-fellow.net")] 8 | [assembly: AssemblyProduct("ImageResizer.Plugins.EPiServerBlobReader")] 9 | [assembly: AssemblyCopyright("Copyright © 2021")] 10 | [assembly: AssemblyTrademark("")] 11 | [assembly: AssemblyCulture("")] 12 | [assembly: ComVisible(false)] 13 | [assembly: Guid("aef92250-d8f9-4ce1-81ca-18c47b565d14")] 14 | [assembly: AssemblyVersion("7.3.0.0")] 15 | [assembly: AssemblyFileVersion("7.3.0.0")] 16 | [assembly: AssemblyInformationalVersion("7.3.0")] 17 | -------------------------------------------------------------------------------- /src/ImageResizer.Plugins.EPiServerBlobReader/packages.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | -------------------------------------------------------------------------------- /src/ImageResizer.Plugins.EPiServerBlobReader/web.config.transform: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 |
    5 | 6 | 7 | 8 | 9 | 10 | 11 | --------------------------------------------------------------------------------