├── .gitignore
├── HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.nuspec
├── HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.sln
├── LICENSE
├── README.md
├── VueJs.Picnic.CSharp
├── .dockerignore
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .template.config
│ └── template.json
├── ClientApp
│ ├── .editorconfig
│ ├── app.js
│ ├── app.vue
│ ├── assets
│ │ ├── _picnic.scss
│ │ ├── _theme.scss
│ │ └── site.scss
│ ├── components
│ │ ├── baseIcon.vue
│ │ ├── basePageTitle.vue
│ │ ├── cookieConsent.vue
│ │ ├── navMenu.vue
│ │ └── navMenuTop.vue
│ ├── favicon.ico
│ ├── index.html
│ ├── pages
│ │ ├── 404.vue
│ │ ├── about.vue
│ │ ├── counter-example.vue
│ │ ├── fetch-data.vue
│ │ └── home.vue
│ ├── router
│ │ ├── index.js
│ │ └── routes.js
│ ├── static
│ │ ├── fontello
│ │ │ ├── LICENSE.txt
│ │ │ ├── README.txt
│ │ │ ├── config.json
│ │ │ ├── css
│ │ │ │ ├── animation.css
│ │ │ │ ├── fontello-codes.css
│ │ │ │ ├── fontello-embedded.css
│ │ │ │ ├── fontello-ie7-codes.css
│ │ │ │ ├── fontello-ie7.css
│ │ │ │ └── fontello.css
│ │ │ └── font
│ │ │ │ ├── fontello.eot
│ │ │ │ ├── fontello.svg
│ │ │ │ ├── fontello.ttf
│ │ │ │ ├── fontello.woff
│ │ │ │ └── fontello.woff2
│ │ ├── ie-polyfill.min.js
│ │ └── images
│ │ │ └── logo.png
│ └── store
│ │ └── index.js
├── Controllers
│ ├── ValuesController.cs
│ └── WeatherController.cs
├── Dockerfile
├── Extensions
│ └── ServiceCollectionExtensions.cs
├── Models
│ └── WeatherForecast.cs
├── Program.cs
├── Properties
│ └── launchSettings.json
├── Providers
│ ├── IWeatherProvider.cs
│ └── WeatherProviderFake.cs
├── Startup.cs
├── VueJs.Picnic.CSharp.csproj
├── appsettings.Development.json
├── appsettings.json
├── build
│ ├── base.config.js
│ ├── base.dev.config.js
│ ├── base.prod.config.js
│ ├── publishingLoader.html
│ └── webpack.config.js
├── package-lock.json
└── package.json
├── VueJs.PicnicTable.CSharp
├── .dockerignore
├── .eslintignore
├── .eslintrc.js
├── .gitignore
├── .template.config
│ └── template.json
├── ClientApp
│ ├── .editorconfig
│ ├── _i18n
│ │ ├── lang
│ │ │ ├── en.js
│ │ │ ├── fr.js
│ │ │ └── ja.js
│ │ └── setup.js
│ ├── app.js
│ ├── app.vue
│ ├── assets
│ │ ├── _picnic.scss
│ │ ├── _theme.scss
│ │ └── site.scss
│ ├── components
│ │ ├── baseIcon.vue
│ │ ├── basePageTitle.vue
│ │ ├── cookieConsent.vue
│ │ ├── navMenu.vue
│ │ └── navMenuTop.vue
│ ├── favicon.ico
│ ├── index.html
│ ├── pages
│ │ ├── 404.vue
│ │ ├── about.vue
│ │ ├── counter-example.vue
│ │ ├── extra-Stuff.vue
│ │ ├── fetch-data.vue
│ │ └── home.vue
│ ├── router
│ │ ├── index.js
│ │ └── routes.js
│ ├── static
│ │ ├── fontello
│ │ │ ├── LICENSE.txt
│ │ │ ├── README.txt
│ │ │ ├── config.json
│ │ │ ├── css
│ │ │ │ ├── animation.css
│ │ │ │ ├── fontello-codes.css
│ │ │ │ ├── fontello-embedded.css
│ │ │ │ ├── fontello-ie7-codes.css
│ │ │ │ ├── fontello-ie7.css
│ │ │ │ └── fontello.css
│ │ │ └── font
│ │ │ │ ├── fontello.eot
│ │ │ │ ├── fontello.svg
│ │ │ │ ├── fontello.ttf
│ │ │ │ ├── fontello.woff
│ │ │ │ └── fontello.woff2
│ │ ├── ie-polyfill.min.js
│ │ └── images
│ │ │ └── logo.png
│ └── store
│ │ ├── index.js
│ │ └── modules
│ │ ├── counter.js
│ │ └── i18n.js
├── Controllers
│ ├── ValuesController.cs
│ └── WeatherController.cs
├── Dockerfile
├── Extensions
│ └── ServiceCollectionExtensions.cs
├── Models
│ ├── Dto
│ │ └── WeatherForecastResults.cs
│ └── WeatherForecast.cs
├── Program.cs
├── Properties
│ └── launchSettings.json
├── Providers
│ ├── IWeatherProvider.cs
│ └── WeatherProviderFake.cs
├── Startup.cs
├── VueJs.PicnicTable.CSharp.csproj
├── appsettings.Development.json
├── appsettings.json
├── build
│ ├── base.config.js
│ ├── base.dev.config.js
│ ├── base.prod.config.js
│ ├── publishingLoader.html
│ └── webpack.config.js
├── package-lock.json
└── package.json
├── appveyor.yml
├── screenshot
├── screenshot-home-menu-collapsed.png
├── screenshot-home-responsive-menu.png
├── screenshot-home-responsive.png
└── screenshot-home.png
└── vsix
└── HoNoSoFt.DotNet.Web.Spa.ProjectTemplate
├── HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.csproj
├── ProjectTemplates
└── CSharp
│ └── .NET Core
│ └── Web
│ └── VueJs Picnic.zip
├── Properties
└── AssemblyInfo.cs
├── Resources
├── HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.png
├── LICENSE
├── honosoft-128px.png
└── logo_temp.png
├── honosoft-128px.png
└── source.extension.vsixmanifest
/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | npm-debug.log
4 |
5 | VueJs.Picnic.CSharp/wwwroot/**/*
6 | VueJs.PicnicTable.CSharp/wwwroot/**/*
7 |
8 | ## Personal temp folder
9 | tmp/**/*
10 | pack_template/**/*
11 |
12 | ## Others
13 | # /Properties/launchSettings.json
14 |
15 | ## Ignore Visual Studio temporary files, build results, and
16 | ## files generated by popular Visual Studio add-ons.
17 |
18 | # User-specific files
19 | *.suo
20 | *.user
21 | *.userosscache
22 | *.sln.docstates
23 |
24 | # User-specific files (MonoDevelop/Xamarin Studio)
25 | *.userprefs
26 |
27 | # Build results
28 | [Dd]ebug/
29 | [Dd]ebugPublic/
30 | [Rr]elease/
31 | [Rr]eleases/
32 | x64/
33 | x86/
34 | bld/
35 | bin/
36 | Bin/
37 | obj/
38 | Obj/
39 |
40 | # Visual Studio 2015 cache/options directory
41 | .vs/
42 | /wwwroot/dist/**
43 |
44 | # Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
45 | !/wwwroot/dist/_placeholder.txt
46 |
47 | /yarn.lock
48 |
49 | # MSTest test Results
50 | [Tt]est[Rr]esult*/
51 | [Bb]uild[Ll]og.*
52 |
53 | # NUNIT
54 | *.VisualState.xml
55 | TestResult.xml
56 |
57 | # Build Results of an ATL Project
58 | [Dd]ebugPS/
59 | [Rr]eleasePS/
60 | dlldata.c
61 |
62 | # DNX
63 | project.lock.json
64 | artifacts/
65 |
66 | *_i.c
67 | *_p.c
68 | *_i.h
69 | *.ilk
70 | *.meta
71 | *.obj
72 | *.pch
73 | *.pdb
74 | *.pgc
75 | *.pgd
76 | *.rsp
77 | *.sbr
78 | *.tlb
79 | *.tli
80 | *.tlh
81 | *.tmp
82 | *.tmp_proj
83 | *.log
84 | *.vspscc
85 | *.vssscc
86 | .builds
87 | *.pidb
88 | *.svclog
89 | *.scc
90 |
91 | # Chutzpah Test files
92 | _Chutzpah*
93 |
94 | # Visual C++ cache files
95 | ipch/
96 | *.aps
97 | *.ncb
98 | *.opendb
99 | *.opensdf
100 | *.sdf
101 | *.cachefile
102 |
103 | # Visual Studio profiler
104 | *.psess
105 | *.vsp
106 | *.vspx
107 | *.sap
108 |
109 | # TFS 2012 Local Workspace
110 | $tf/
111 |
112 | # Guidance Automation Toolkit
113 | *.gpState
114 |
115 | # ReSharper is a .NET coding add-in
116 | _ReSharper*/
117 | *.[Rr]e[Ss]harper
118 | *.DotSettings.user
119 |
120 | # JustCode is a .NET coding add-in
121 | .JustCode
122 |
123 | # TeamCity is a build add-in
124 | _TeamCity*
125 |
126 | # DotCover is a Code Coverage Tool
127 | *.dotCover
128 |
129 | # NCrunch
130 | _NCrunch_*
131 | .*crunch*.local.xml
132 | nCrunchTemp_*
133 |
134 | # MightyMoose
135 | *.mm.*
136 | AutoTest.Net/
137 |
138 | # Web workbench (sass)
139 | .sass-cache/
140 |
141 | # Installshield output folder
142 | [Ee]xpress/
143 |
144 | # DocProject is a documentation generator add-in
145 | DocProject/buildhelp/
146 | DocProject/Help/*.HxT
147 | DocProject/Help/*.HxC
148 | DocProject/Help/*.hhc
149 | DocProject/Help/*.hhk
150 | DocProject/Help/*.hhp
151 | DocProject/Help/Html2
152 | DocProject/Help/html
153 |
154 | # Click-Once directory
155 | publish/
156 |
157 | # Publish Web Output
158 | *.[Pp]ublish.xml
159 | *.azurePubxml
160 | # TODO: Comment the next line if you want to checkin your web deploy settings
161 | # but database connection strings (with potential passwords) will be unencrypted
162 | *.pubxml
163 | *.publishproj
164 |
165 | # NuGet Packages
166 | *.nupkg
167 | # The packages folder can be ignored because of Package Restore
168 | **/packages/*
169 | # except build/, which is used as an MSBuild target.
170 | !**/packages/build/
171 | # Uncomment if necessary however generally it will be regenerated when needed
172 | #!**/packages/repositories.config
173 |
174 | # Microsoft Azure Build Output
175 | csx/
176 | *.build.csdef
177 |
178 | # Microsoft Azure Emulator
179 | ecf/
180 | rcf/
181 |
182 | # Microsoft Azure ApplicationInsights config file
183 | ApplicationInsights.config
184 |
185 | # Windows Store app package directory
186 | AppPackages/
187 | BundleArtifacts/
188 |
189 | # Visual Studio cache files
190 | # files ending in .cache can be ignored
191 | *.[Cc]ache
192 | # but keep track of directories ending in .cache
193 | !*.[Cc]ache/
194 |
195 | # Others
196 | ClientBin/
197 | ~$*
198 | *~
199 | *.dbmdl
200 | *.dbproj.schemaview
201 | *.pfx
202 | *.publishsettings
203 | orleans.codegen.cs
204 |
205 | # Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
206 | /node_modules/**
207 | !/node_modules/_placeholder.txt
208 |
209 | # RIA/Silverlight projects
210 | Generated_Code/
211 |
212 | # Backup & report files from converting an old project file
213 | # to a newer Visual Studio version. Backup files are not needed,
214 | # because we have git ;-)
215 | _UpgradeReport_Files/
216 | Backup*/
217 | UpgradeLog*.XML
218 | UpgradeLog*.htm
219 |
220 | # SQL Server files
221 | *.mdf
222 | *.ldf
223 |
224 | # Business Intelligence projects
225 | *.rdl.data
226 | *.bim.layout
227 | *.bim_*.settings
228 |
229 | # Microsoft Fakes
230 | FakesAssemblies/
231 |
232 | # GhostDoc plugin setting file
233 | *.GhostDoc.xml
234 |
235 | # Node.js Tools for Visual Studio
236 | .ntvs_analysis.dat
237 |
238 | # Visual Studio 6 build log
239 | *.plg
240 |
241 | # Visual Studio 6 workspace options file
242 | *.opt
243 |
244 | # Visual Studio LightSwitch build output
245 | **/*.HTMLClient/GeneratedArtifacts
246 | **/*.DesktopClient/GeneratedArtifacts
247 | **/*.DesktopClient/ModelManifest.xml
248 | **/*.Server/GeneratedArtifacts
249 | **/*.Server/ModelManifest.xml
250 | _Pvt_Extensions
251 |
252 | # Paket dependency manager
253 | .paket/paket.exe
254 |
255 | # FAKE - F# Make
256 | .fake/
257 |
258 | .vscode/
259 |
--------------------------------------------------------------------------------
/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.nuspec:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | HoNoSoFt.DotNet.Web.Spa.ProjectTemplates
5 | Nordes Menard-Lamarre
6 |
7 | Template for ASP.NET Core 2.2 WebApi + Vue.js Client app and Picnic CSS with webpack and hot reloading
8 |
9 |
10 |
11 |
12 | {{version}}
13 | https://www.honosoft.com/img/logo.png
14 | https://github.com/nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates
15 | https://github.com/nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/blob/master/LICENSE
16 |
17 |
18 |
22 |
26 |
27 |
--------------------------------------------------------------------------------
/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.sln:
--------------------------------------------------------------------------------
1 |
2 | Microsoft Visual Studio Solution File, Format Version 12.00
3 | # Visual Studio 15
4 | VisualStudioVersion = 15.0.26124.0
5 | MinimumVisualStudioVersion = 15.0.26124.0
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VueJs.Picnic.CSharp", "VueJs.Picnic.CSharp\VueJs.Picnic.CSharp.csproj", "{6B3E8EE8-92E3-41CE-A356-A5F880EEA367}"
7 | EndProject
8 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "VueJs.PicnicTable.CSharp", "VueJs.PicnicTable.CSharp\VueJs.PicnicTable.CSharp.csproj", "{8DEDA817-6C63-4AB4-9E95-10819044311D}"
9 | EndProject
10 | Global
11 | GlobalSection(SolutionConfigurationPlatforms) = preSolution
12 | Debug|Any CPU = Debug|Any CPU
13 | Debug|x64 = Debug|x64
14 | Debug|x86 = Debug|x86
15 | Release|Any CPU = Release|Any CPU
16 | Release|x64 = Release|x64
17 | Release|x86 = Release|x86
18 | EndGlobalSection
19 | GlobalSection(ProjectConfigurationPlatforms) = postSolution
20 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
21 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Debug|Any CPU.Build.0 = Debug|Any CPU
22 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Debug|x64.ActiveCfg = Debug|Any CPU
23 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Debug|x64.Build.0 = Debug|Any CPU
24 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Debug|x86.ActiveCfg = Debug|Any CPU
25 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Debug|x86.Build.0 = Debug|Any CPU
26 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Release|Any CPU.ActiveCfg = Release|Any CPU
27 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Release|Any CPU.Build.0 = Release|Any CPU
28 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Release|x64.ActiveCfg = Release|Any CPU
29 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Release|x64.Build.0 = Release|Any CPU
30 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Release|x86.ActiveCfg = Release|Any CPU
31 | {6B3E8EE8-92E3-41CE-A356-A5F880EEA367}.Release|x86.Build.0 = Release|Any CPU
32 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
33 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Debug|Any CPU.Build.0 = Debug|Any CPU
34 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Debug|x64.ActiveCfg = Debug|Any CPU
35 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Debug|x64.Build.0 = Debug|Any CPU
36 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Debug|x86.ActiveCfg = Debug|Any CPU
37 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Debug|x86.Build.0 = Debug|Any CPU
38 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Release|Any CPU.ActiveCfg = Release|Any CPU
39 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Release|Any CPU.Build.0 = Release|Any CPU
40 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Release|x64.ActiveCfg = Release|Any CPU
41 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Release|x64.Build.0 = Release|Any CPU
42 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Release|x86.ActiveCfg = Release|Any CPU
43 | {8DEDA817-6C63-4AB4-9E95-10819044311D}.Release|x86.Build.0 = Release|Any CPU
44 | EndGlobalSection
45 | GlobalSection(SolutionProperties) = preSolution
46 | HideSolutionNode = FALSE
47 | EndGlobalSection
48 | GlobalSection(ExtensibilityGlobals) = postSolution
49 | SolutionGuid = {14AADF15-4005-4622-86EF-03CC40101934}
50 | EndGlobalSection
51 | EndGlobal
52 |
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Nordes Ménard-Lamarre
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.
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | obj/
3 | bin/
4 |
5 | wwwroot/**
6 |
7 | # User-specific files
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | .dockerignore
14 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/.eslintignore:
--------------------------------------------------------------------------------
1 | ######################################################
2 | # https://eslint.org/docs/user-guide/configuring
3 | ######################################################
4 | # /node_modules/* and /bower_components/* in the project root are ignored by default
5 | # Ignore built files except build/index.js
6 | /ClientApp/Static/**/*.js
7 |
8 | # !build/index.js ... if i would like to ignore all except that... then it's the way
9 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | "parserOptions": {
4 | "parser": "babel-eslint"
5 | },
6 | "extends": [
7 | "standard",
8 | "plugin:vue/recommended"
9 | ]
10 | };
11 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | npm-debug.log
4 |
5 | # /Properties/launchSettings.json
6 |
7 | package-lock.json
8 |
9 | ## Ignore Visual Studio temporary files, build results, and
10 | ## files generated by popular Visual Studio add-ons.
11 |
12 | # User-specific files
13 | *.suo
14 | *.user
15 | *.userosscache
16 | *.sln.docstates
17 |
18 | # User-specific files (MonoDevelop/Xamarin Studio)
19 | *.userprefs
20 |
21 | # Build results
22 | [Dd]ebug/
23 | [Dd]ebugPublic/
24 | [Rr]elease/
25 | [Rr]eleases/
26 | x64/
27 | x86/
28 | bld/
29 | bin/
30 | Bin/
31 | obj/
32 | Obj/
33 |
34 | # Visual Studio 2015 cache/options directory
35 | .vs/
36 | /wwwroot/dist/**
37 |
38 | # Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
39 | !/wwwroot/dist/_placeholder.txt
40 |
41 | /yarn.lock
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUNIT
48 | *.VisualState.xml
49 | TestResult.xml
50 |
51 | # Build Results of an ATL Project
52 | [Dd]ebugPS/
53 | [Rr]eleasePS/
54 | dlldata.c
55 |
56 | # DNX
57 | project.lock.json
58 | artifacts/
59 |
60 | *_i.c
61 | *_p.c
62 | *_i.h
63 | *.ilk
64 | *.meta
65 | *.obj
66 | *.pch
67 | *.pdb
68 | *.pgc
69 | *.pgd
70 | *.rsp
71 | *.sbr
72 | *.tlb
73 | *.tli
74 | *.tlh
75 | *.tmp
76 | *.tmp_proj
77 | *.log
78 | *.vspscc
79 | *.vssscc
80 | .builds
81 | *.pidb
82 | *.svclog
83 | *.scc
84 |
85 | # Chutzpah Test files
86 | _Chutzpah*
87 |
88 | # Visual C++ cache files
89 | ipch/
90 | *.aps
91 | *.ncb
92 | *.opendb
93 | *.opensdf
94 | *.sdf
95 | *.cachefile
96 |
97 | # Visual Studio profiler
98 | *.psess
99 | *.vsp
100 | *.vspx
101 | *.sap
102 |
103 | # TFS 2012 Local Workspace
104 | $tf/
105 |
106 | # Guidance Automation Toolkit
107 | *.gpState
108 |
109 | # ReSharper is a .NET coding add-in
110 | _ReSharper*/
111 | *.[Rr]e[Ss]harper
112 | *.DotSettings.user
113 |
114 | # JustCode is a .NET coding add-in
115 | .JustCode
116 |
117 | # TeamCity is a build add-in
118 | _TeamCity*
119 |
120 | # DotCover is a Code Coverage Tool
121 | *.dotCover
122 |
123 | # NCrunch
124 | _NCrunch_*
125 | .*crunch*.local.xml
126 | nCrunchTemp_*
127 |
128 | # MightyMoose
129 | *.mm.*
130 | AutoTest.Net/
131 |
132 | # Web workbench (sass)
133 | .sass-cache/
134 |
135 | # Installshield output folder
136 | [Ee]xpress/
137 |
138 | # DocProject is a documentation generator add-in
139 | DocProject/buildhelp/
140 | DocProject/Help/*.HxT
141 | DocProject/Help/*.HxC
142 | DocProject/Help/*.hhc
143 | DocProject/Help/*.hhk
144 | DocProject/Help/*.hhp
145 | DocProject/Help/Html2
146 | DocProject/Help/html
147 |
148 | # Click-Once directory
149 | publish/
150 |
151 | # Publish Web Output
152 | *.[Pp]ublish.xml
153 | *.azurePubxml
154 | # TODO: Comment the next line if you want to checkin your web deploy settings
155 | # but database connection strings (with potential passwords) will be unencrypted
156 | *.pubxml
157 | *.publishproj
158 |
159 | # NuGet Packages
160 | *.nupkg
161 | # The packages folder can be ignored because of Package Restore
162 | **/packages/*
163 | # except build/, which is used as an MSBuild target.
164 | !**/packages/build/
165 | # Uncomment if necessary however generally it will be regenerated when needed
166 | #!**/packages/repositories.config
167 |
168 | # Microsoft Azure Build Output
169 | csx/
170 | *.build.csdef
171 |
172 | # Microsoft Azure Emulator
173 | ecf/
174 | rcf/
175 |
176 | # Microsoft Azure ApplicationInsights config file
177 | ApplicationInsights.config
178 |
179 | # Windows Store app package directory
180 | AppPackages/
181 | BundleArtifacts/
182 |
183 | # Visual Studio cache files
184 | # files ending in .cache can be ignored
185 | *.[Cc]ache
186 | # but keep track of directories ending in .cache
187 | !*.[Cc]ache/
188 |
189 | # Others
190 | ClientBin/
191 | ~$*
192 | *~
193 | *.dbmdl
194 | *.dbproj.schemaview
195 | *.pfx
196 | *.publishsettings
197 | orleans.codegen.cs
198 |
199 | # Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
200 | /node_modules/**
201 | !/node_modules/_placeholder.txt
202 |
203 | # RIA/Silverlight projects
204 | Generated_Code/
205 |
206 | # Backup & report files from converting an old project file
207 | # to a newer Visual Studio version. Backup files are not needed,
208 | # because we have git ;-)
209 | _UpgradeReport_Files/
210 | Backup*/
211 | UpgradeLog*.XML
212 | UpgradeLog*.htm
213 |
214 | # SQL Server files
215 | *.mdf
216 | *.ldf
217 |
218 | # Business Intelligence projects
219 | *.rdl.data
220 | *.bim.layout
221 | *.bim_*.settings
222 |
223 | # Microsoft Fakes
224 | FakesAssemblies/
225 |
226 | # GhostDoc plugin setting file
227 | *.GhostDoc.xml
228 |
229 | # Node.js Tools for Visual Studio
230 | .ntvs_analysis.dat
231 |
232 | # Visual Studio 6 build log
233 | *.plg
234 |
235 | # Visual Studio 6 workspace options file
236 | *.opt
237 |
238 | # Visual Studio LightSwitch build output
239 | **/*.HTMLClient/GeneratedArtifacts
240 | **/*.DesktopClient/GeneratedArtifacts
241 | **/*.DesktopClient/ModelManifest.xml
242 | **/*.Server/GeneratedArtifacts
243 | **/*.Server/ModelManifest.xml
244 | _Pvt_Extensions
245 |
246 | # Paket dependency manager
247 | .paket/paket.exe
248 |
249 | # FAKE - F# Make
250 | .fake/
251 |
252 | .vscode/
253 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "Nordes Menard-Lamarre",
4 | "classifications": [ "Web", "WebAPI", "SPA" ],
5 | "groupIdentity": "HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.VuePicnic",
6 | "identity": "VueJs.Picnic.CSharp",
7 | "name": "ASP.NET Core with Vue and Picnic",
8 | "preferNameDirectory": true,
9 | "primaryOutputs": [
10 | {
11 | "path": "VueJs.Picnic.CSharp.csproj"
12 | }
13 | ],
14 | "shortName": "vuejs-picnic",
15 | "sourceName": "VueJs.Picnic.CSharp",
16 | "sources": [
17 | {
18 | "source": "./",
19 | "target": "./",
20 | "exclude": [
21 | ".template.config/**"
22 | ],
23 | "modifiers": [
24 | {
25 | "condition": "(TargetFrameworkOverride == '')",
26 | "exclude": [
27 | "app.config"
28 | ]
29 | },
30 | {
31 | "condition": "(ExcludeLaunchSettings)",
32 | "exclude": [
33 | "Properties/launchSettings.json"
34 | ]
35 | }
36 | ]
37 | }
38 | ],
39 | "symbols": {
40 | "ExcludeLaunchSettings": {
41 | "type": "parameter",
42 | "datatype": "bool",
43 | "defaultValue": "false",
44 | "description": "Whether to exclude launchSettings.json from the generated template."
45 | },
46 | "HttpPort": {
47 | "type": "parameter",
48 | "datatype": "integer",
49 | "description": "Port number to use for the HTTP endpoint in launchSettings.json."
50 | },
51 | "HttpPortGenerated": {
52 | "type": "generated",
53 | "generator": "port"
54 | },
55 | "HttpPortReplacer": {
56 | "type": "generated",
57 | "generator": "coalesce",
58 | "parameters": {
59 | "sourceVariableName": "HttpPort",
60 | "fallbackVariableName": "HttpPortGenerated"
61 | },
62 | "replaces": "8080"
63 | },
64 | "HttpsPort": {
65 | "type": "parameter",
66 | "datatype": "integer",
67 | "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
68 | },
69 | "HttpsPortGenerated": {
70 | "type": "generated",
71 | "generator": "port",
72 | "parameters": {
73 | "low": 44300,
74 | "high": 44399
75 | }
76 | },
77 | "HttpsPortReplacer": {
78 | "type": "generated",
79 | "generator": "coalesce",
80 | "parameters": {
81 | "sourceVariableName": "HttpsPort",
82 | "fallbackVariableName": "HttpsPortGenerated"
83 | },
84 | "replaces": "44300"
85 | },
86 | "TargetFrameworkOverride": {
87 | "type": "parameter",
88 | "description": "Overrides the target framework",
89 | "replaces": "TargetFrameworkOverride",
90 | "datatype": "string",
91 | "defaultValue": ""
92 | },
93 | "Framework": {
94 | "type": "parameter",
95 | "description": "The target framework for the project.",
96 | "datatype": "choice",
97 | "choices": [
98 | {
99 | "choice": "netcoreapp2.2",
100 | "description": "Target netcoreapp2.2"
101 | }
102 | ],
103 | "replaces": "netcoreapp2.2",
104 | "defaultValue": "netcoreapp2.2"
105 | },
106 | "HostIdentifier": {
107 | "type": "bind",
108 | "binding": "HostIdentifier"
109 | },
110 | "skipRestore": {
111 | "type": "parameter",
112 | "datatype": "bool",
113 | "description": "If specified, skips the automatic restore of the project on create.",
114 | "defaultValue": "false"
115 | },
116 | "NoHttps": {
117 | "type": "parameter",
118 | "datatype": "bool",
119 | "defaultValue": "false",
120 | "description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
121 | }
122 | },
123 | "tags": {
124 | "language": "C#",
125 | "type": "project"
126 | },
127 |
128 |
129 | "precedence": 100,
130 | "guids": [
131 | "6B3E8EE8-92E3-41CE-A356-A5F880EEA367"
132 | ],
133 | "postActions": [
134 | {
135 | "condition": "(!skipRestore)",
136 | "description": "Restore NuGet packages required by this project.",
137 | "manualInstructions": [
138 | {
139 | "text": "Run 'dotnet restore'"
140 | }
141 | ],
142 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
143 | "continueOnError": true
144 | }
145 | ]
146 | }
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/app.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import upperFirst from 'lodash/upperFirst'
3 | import camelCase from 'lodash/camelCase'
4 | import axios from 'axios'
5 | import router from './router/index'
6 | import store from './store'
7 | import { sync } from 'vuex-router-sync'
8 |
9 | import App from './app.vue'
10 | require('./assets/site.scss')
11 |
12 | // Mode details on: https://vuejs.org/v2/guide/components-registration.html
13 | const requireComponent = require.context(
14 | // The relative path of the components folder
15 | './components',
16 | // Whether or not to look in subfolders
17 | true,
18 | // The regular expression used to match base component filenames
19 | /base[A-Z]\w+\.(vue|js)$/
20 | )
21 |
22 | requireComponent.keys().forEach(fileName => {
23 | // Get component config
24 | const componentConfig = requireComponent(fileName)
25 |
26 | // Get PascalCase name of component
27 | const componentName = upperFirst(
28 | camelCase(
29 | // Strip the leading `./` and extension from the filename
30 | fileName.replace(/base/, '').replace(/^\.\/(.*)\.\w+$/, '$1')
31 | )
32 | )
33 |
34 | // Register component globally
35 | Vue.component(
36 | componentName,
37 | // Look for the component options on `.default`, which will
38 | // exist if the component was exported with `export default`,
39 | // otherwise fall back to module's root.
40 | componentConfig.default || componentConfig
41 | )
42 | })
43 |
44 | Vue.prototype.$http = axios
45 | sync(store, router)
46 |
47 | new Vue({ // eslint-disable-line
48 | el: '#app',
49 | store,
50 | router,
51 | ...App
52 | })
53 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/app.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
36 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/assets/_picnic.scss:
--------------------------------------------------------------------------------
1 | @import "../../node_modules/picnic/src/picnic.scss";
2 |
3 | .body {
4 | overflow:hidden;
5 | }
6 |
7 | .main {
8 | display:flex;
9 | flex-direction:column;
10 | min-height:100%;
11 | height:100%;
12 | }
13 |
14 | .container {
15 | display:flex;
16 | align-items: stretch;
17 | flex:1;
18 | overflow: hidden;
19 | }
20 |
21 | // Bug fix in the template. The card somehow does not react well for no apparent reason.
22 | // This is not the proper solution especially if you start using card within a popup.
23 | article.card {
24 | header,
25 | content,
26 | footer {
27 | position: inherit !important;
28 | }
29 |
30 | position: inherit !important;
31 | }
32 |
33 | @media all and (max-width: $picnic-breakpoint) {
34 | nav.dark {
35 | background-color: $theme-dark-color;
36 | }
37 |
38 | .topmenu {
39 | display: none;
40 | }
41 |
42 | .main-content {
43 | position: absolute;
44 | margin-top: 3em;
45 | padding:0.5em;
46 | }
47 |
48 | %nav {
49 | position:fixed;
50 | flex: 0 0 100%;
51 | justify-content: stretch;
52 | flex-wrap: wrap;
53 |
54 | .burger~.menu {
55 | background-color: $theme-dark-color;
56 | }
57 |
58 | .brand {
59 | max-width: initial;
60 | }
61 |
62 | .collapseToggle {
63 | display: none !important;
64 | }
65 |
66 | .menu {
67 | .nav-item {
68 | color: #CCC;
69 | }
70 |
71 | .nav-item.active {
72 | color: #fff;
73 | background: rgb(28, 66, 92);
74 | }
75 | }
76 | }
77 | }
78 |
79 | @media all and (min-width: $picnic-breakpoint) {
80 | nav.dark {
81 | border-right:1px #ddd solid;
82 | }
83 |
84 | .topmenu {
85 | margin:0px;
86 | padding:0.5em;
87 | height: 3em;
88 | display:flex;
89 | justify-content: space-between;
90 | line-height: 2em;
91 | background-color: $theme-dark-color;
92 | color: $theme-dark-textcolor;
93 | align-items: stretch;
94 |
95 | .topmenu-flex {
96 | display:flex;
97 | }
98 |
99 | .brandTop {
100 | font-weight: bold;
101 | padding-right: 2em;
102 | color: #fff;
103 | }
104 |
105 | .logo {
106 | height: 2em;
107 | padding-right: 0.5em;
108 | }
109 |
110 | .user {
111 | display: flex;
112 | justify-content: flex-end;
113 | }
114 | }
115 |
116 | $picnic-nav-width: 300px !default;
117 | $picnic-nav-width-collapsed: 40px !important;
118 |
119 | .main-content {
120 | flex: 1;
121 | overflow:auto;
122 | padding: 0.2em;
123 | }
124 |
125 | .brand {
126 | display:none;
127 | }
128 |
129 | .collapseToggle {
130 | position:absolute;
131 | bottom:20px;
132 | right:-10px;
133 | text-align:right;
134 | padding:10px;
135 | }
136 |
137 | .collapsed {
138 | width: $picnic-nav-width-collapsed;
139 | }
140 |
141 | %nav {
142 | display: flex;
143 | flex: initial;
144 | vertical-align: top;
145 | z-index: inherit;
146 | box-shadow: inherit;
147 | // background: $theme-dark-color;
148 | right: inherit;
149 | width: $picnic-nav-width;
150 | height: inherit;
151 | padding: inherit;
152 |
153 | .menu {
154 | float: inherit;
155 | top: auto;
156 | clear: both;
157 | display: block;
158 |
159 | -webkit-transform: inherit;
160 | transform: inherit;
161 |
162 | .nav-item {
163 | display: inline-flex;
164 | padding: 0.4em 0px 0.4em 0.5em;
165 | margin: 0px;
166 | width: 100%;
167 | color: #444;
168 | }
169 |
170 | .nav-item.active {
171 | color: #eee;
172 | background: $blue;
173 | }
174 |
175 | span.collapsed {
176 | display:none !important;
177 | }
178 | }
179 | }
180 | }
181 |
182 | table {
183 | thead {
184 | font-size: 0.9em;
185 | white-space: nowrap;
186 |
187 | tr {
188 | th {
189 | background-color: $theme-dark-color;
190 | }
191 | }
192 | }
193 | }
194 |
195 | .page-title {
196 | margin-bottom: 1em;
197 | margin-left: -0.5em;
198 | padding-left: 0.5em;
199 |
200 | h1 {
201 | padding: 0.1em;
202 | }
203 | }
204 |
205 | article {
206 | header {
207 | background-color: $theme-dark-color;
208 | color: $white;
209 | }
210 |
211 | content {
212 | padding: 0 1em;
213 | }
214 |
215 | footer {
216 | background-color: $silver;
217 | padding: 0 1em !important;
218 | }
219 | }
220 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/assets/_theme.scss:
--------------------------------------------------------------------------------
1 | $picnic-nav-position: inherit;
2 |
3 | $theme-dark-color: #333;
4 | $theme-dark-textcolor: #ddd;
5 |
6 | $green: #00AA55;
7 |
8 | @import "../../node_modules/picnic/src/themes/default/theme";
9 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/assets/site.scss:
--------------------------------------------------------------------------------
1 | @import "./theme";
2 | @import "./picnic";
3 |
4 | .text-right {
5 | text-align: right;
6 | }
7 |
8 | // Optimization can be done by using a list + substring + ...
9 | // http://sass-lang.com/documentation/Sass/Script/Functions.html
10 | @for $size from 1 to 4 {
11 | .pt-#{$size}, .py-#{$size} {
12 | padding-top: #{$size}em;
13 | }
14 | .pb-#{$size}, .py-#{$size} {
15 | padding-bottom: #{$size}em;
16 | }
17 |
18 | .pl-#{$size}, .px-#{$size} {
19 | padding-left: #{$size}em;
20 | }
21 | .pr-#{$size}, .px-#{$size} {
22 | padding-right: #{$size}em;
23 | }
24 |
25 | .ml-#{$size}, .mx-#{$size} {
26 | margin-left: #{$size}em;
27 | }
28 | .mr-#{$size}, .mx-#{$size} {
29 | margin-right: #{$size}em;
30 | }
31 |
32 | .mt-#{$size}, .my-#{$size} {
33 | margin-left: #{$size}em;
34 | }
35 | .mb-#{$size}, .my-#{$size} {
36 | margin-right: #{$size}em;
37 | }
38 | }
39 |
40 | .color-white {
41 | color: $white;
42 | }
43 | .color-red {
44 | color: $picnic-error;
45 | }
46 |
47 | .bt {
48 | border-top: $picnic-border;
49 | }
50 |
51 | .text-center {
52 | text-align: center;
53 | }
54 |
55 | .spinner-big {
56 | font-size:79px;
57 | line-height: 1;
58 | }
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/components/baseIcon.vue:
--------------------------------------------------------------------------------
1 |
31 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/components/basePageTitle.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ title }}
4 |
5 |
6 |
7 |
17 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/components/cookieConsent.vue:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
32 |
33 |
69 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/components/navMenu.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
VueJs Core
13 |
14 |
15 |
20 | ≡
24 |
25 |
47 |
48 |
49 |
50 |
73 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/components/navMenuTop.vue:
--------------------------------------------------------------------------------
1 |
2 |
14 |
15 |
16 |
24 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.Picnic.CSharp/ClientApp/favicon.ico
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | HoNoSoFt - Dotnet Core - VueJs setting table for Picnic
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/pages/404.vue:
--------------------------------------------------------------------------------
1 |
2 |
9 |
10 |
11 |
104 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/pages/about.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Hi,
5 |
This template is brought to you by HoNoSoFt . We hope that you'll have fun working with
6 | this template. We also have a blog where you'll find plenty of interesting stuff. However,
7 | you will have to use the google translate if you don't speak French ;).
8 |
More details about this template can be found at the Github repository https://www.nuget.org/packages/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/ .
9 | There's also a wiki available for more details about what is included in the template.
10 |
Best regards,
11 |
Nordès Ménard-Lamarre (HoNoSoFt )
12 |
13 |
The license is MIT, enjoy!
14 |
15 |
16 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/pages/counter-example.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
This is a simple example of an VueJs page component.
6 |
7 |
Current count (Vuex): {{ currentCount }}
8 |
Auto count: {{ autoCount }}
9 |
10 |
Increment
11 |
Reset
12 |
13 |
14 |
15 |
52 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/pages/fetch-data.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Loading...
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Date
16 | Temp. (C)
17 | Temp. (F)
18 | Summary
19 |
20 |
21 |
22 |
26 | {{ forecast.dateFormatted }}
27 | {{ forecast.temperatureC }}
28 | {{ forecast.temperatureF }}
29 | {{ forecast.summary }}
30 |
31 |
32 |
33 |
34 |
35 |
Previous
40 |
44 | {{ n }}
48 |
Next
53 |
54 |
55 |
56 |
57 |
58 |
67 |
68 |
122 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/pages/home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
Welcome to your new single-page application, built with:
5 |
6 | ASP.NET Core and C# for cross-platform server-side code
7 | VueJs for client-side code
8 | Picnic CSS for layout and styling
9 | Fontello , an icon library that plays really nice with others.
10 | EsLint , in order to keep the code look & feel constant.
11 |
12 |
To help you get started, we've also set up:
13 |
14 | Client-side navigation using Vue-Router . For example, click Counter
15 | then Back to return here. (Featuring, Vuex )
16 | WebPack CLI integration . In development mode, there's no need to run webpack ....
17 | It runs in the background automatically, so your client-side resources are dynamically built on demand and the
18 | page refreshes when you modify any ClientApp file.
19 | Efficient production builds . In production mode, development-time features are disabled,
20 | and your dotnet publish configuration automatically invokes webpack ... production to produce minified,
21 | ahead-of-time compiled JavaScript files. Chunk also insure that any client cache will not fail you when loading your application.
22 |
23 |
The ClientApp subdirectory is a standard NodeJs/VueJs application. If you open a command prompt in that
24 | directory, you can run any npm command (e.g., npm run build), or use npm to install extra packages
25 | into it.
26 |
27 |
28 |
29 | Simple example of binding
30 |
31 | Hello, {{ msg }}!
32 |
33 |
37 | {{ (new Date()).toLocaleString() }}
38 |
39 |
40 |
41 |
42 |
If you want to know more about the author of this template, you can contact him through
43 |
52 |
53 |
54 |
55 |
64 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueRouter from 'vue-router'
3 | import { routes } from './routes'
4 |
5 | Vue.use(VueRouter)
6 |
7 | let router = new VueRouter({
8 | mode: 'history',
9 | routes
10 | })
11 |
12 | export default router
13 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/router/routes.js:
--------------------------------------------------------------------------------
1 | import Home from 'pages/home'
2 | import CounterExample from 'pages/counter-example'
3 | import FetchData from 'pages/fetch-data'
4 | import About from 'pages/about'
5 | import NotFound404 from 'pages/404'
6 |
7 | export const routes = [
8 | { name: '404', path: '/404', component: NotFound404, meta: { showMenu: false, display: 'Error' } },
9 | { name: 'home', path: '/', component: Home, meta: { showMenu: true, display: 'Home', icon: 'icon-home' } },
10 | { name: 'counter', path: '/counter', component: CounterExample, meta: { showMenu: true, display: 'Counter', icon: 'icon-counter' } },
11 | { name: 'fetch-data', path: '/fetch-data', component: FetchData, meta: { showMenu: true, display: 'Fetch data', icon: 'icon-list-bullet' } },
12 | { name: 'about', path: '/about', component: About, meta: { showMenu: true, display: 'About', icon: 'icon-about' } },
13 | { name: 'catchAll', path: '*', redirect: '/404', meta: { showMenu: false } }
14 | ]
15 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/static/fontello/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Font license info
2 |
3 |
4 | ## Font Awesome
5 |
6 | Copyright (C) 2016 by Dave Gandy
7 |
8 | Author: Dave Gandy
9 | License: SIL ()
10 | Homepage: http://fortawesome.github.com/Font-Awesome/
11 |
12 |
13 | ## Fontelico
14 |
15 | Copyright (C) 2012 by Fontello project
16 |
17 | Author: Crowdsourced, for Fontello project
18 | License: SIL (http://scripts.sil.org/OFL)
19 | Homepage: http://fontello.com
20 |
21 |
22 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/static/fontello/README.txt:
--------------------------------------------------------------------------------
1 | This webfont is generated by http://fontello.com open source project.
2 |
3 |
4 | ================================================================================
5 | Please, note, that you should obey original font licenses, used to make this
6 | webfont pack. Details available in LICENSE.txt file.
7 |
8 | - Usually, it's enough to publish content of LICENSE.txt file somewhere on your
9 | site in "About" section.
10 |
11 | - If your project is open-source, usually, it will be ok to make LICENSE.txt
12 | file publicly available in your repository.
13 |
14 | - Fonts, used in Fontello, don't require a clickable link on your site.
15 | But any kind of additional authors crediting is welcome.
16 | ================================================================================
17 |
18 |
19 | Comments on archive content
20 | ---------------------------
21 |
22 | - /font/* - fonts in different formats
23 |
24 | - /css/* - different kinds of css, for all situations. Should be ok with
25 | twitter bootstrap. Also, you can skip style and assign icon classes
26 | directly to text elements, if you don't mind about IE7.
27 |
28 | - demo.html - demo file, to show your webfont content
29 |
30 | - LICENSE.txt - license info about source fonts, used to build your one.
31 |
32 | - config.json - keeps your settings. You can import it back into fontello
33 | anytime, to continue your work
34 |
35 |
36 | Why so many CSS files ?
37 | -----------------------
38 |
39 | Because we like to fit all your needs :)
40 |
41 | - basic file, .css - is usually enough, it contains @font-face
42 | and character code definitions
43 |
44 | - *-ie7.css - if you need IE7 support, but still don't wish to put char codes
45 | directly into html
46 |
47 | - *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
48 | rules, but still wish to benefit from css generation. That can be very
49 | convenient for automated asset build systems. When you need to update font -
50 | no need to manually edit files, just override old version with archive
51 | content. See fontello source code for examples.
52 |
53 | - *-embedded.css - basic css file, but with embedded WOFF font, to avoid
54 | CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
55 | We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
56 | server headers. But if you ok with dirty hack - this file is for you. Note,
57 | that data url moved to separate @font-face to avoid problems with
2 |
3 |
4 | Copyright (C) 2018 by original authors @ fontello.com
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/static/fontello/font/fontello.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.Picnic.CSharp/ClientApp/static/fontello/font/fontello.ttf
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/static/fontello/font/fontello.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.Picnic.CSharp/ClientApp/static/fontello/font/fontello.woff
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/static/fontello/font/fontello.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.Picnic.CSharp/ClientApp/static/fontello/font/fontello.woff2
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/static/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.Picnic.CSharp/ClientApp/static/images/logo.png
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/ClientApp/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 |
4 | Vue.use(Vuex)
5 |
6 | // TYPES
7 | const MAIN_SET_COUNTER = 'MAIN_SET_COUNTER'
8 |
9 | // STATE
10 | const state = {
11 | counter: 1
12 | }
13 |
14 | // MUTATIONS
15 | const mutations = {
16 | [MAIN_SET_COUNTER] (state, obj) {
17 | state.counter = obj.counter
18 | }
19 | }
20 |
21 | // ACTIONS
22 | const actions = ({
23 | setCounter ({ commit }, obj) {
24 | commit(MAIN_SET_COUNTER, obj)
25 | }
26 | })
27 |
28 | export default new Vuex.Store({
29 | state,
30 | mutations,
31 | actions
32 | })
33 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Controllers/ValuesController.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using Microsoft.AspNetCore.Mvc;
3 |
4 | namespace VueJs.Picnic.CSharp.Controllers
5 | {
6 | [Route("api/[controller]")]
7 | [ApiController]
8 | public class ValuesController : ControllerBase
9 | {
10 | // GET api/values
11 | [HttpGet]
12 | public ActionResult> Get()
13 | {
14 | return new string[] { "value1", "value22" };
15 | }
16 |
17 | // GET api/values/5
18 | [HttpGet("{id}")]
19 | public ActionResult Get(int id)
20 | {
21 | return "value";
22 | }
23 |
24 | // POST api/values
25 | [HttpPost]
26 | public void Post([FromBody] string value)
27 | {
28 | }
29 |
30 | // PUT api/values/5
31 | [HttpPut("{id}")]
32 | public void Put(int id, [FromBody] string value)
33 | {
34 | }
35 |
36 | // DELETE api/values/5
37 | [HttpDelete("{id}")]
38 | public void Delete(int id)
39 | {
40 | }
41 | }
42 | }
43 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Controllers/WeatherController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using System.Threading.Tasks;
5 | using Microsoft.AspNetCore.Mvc;
6 | using VueJs.Picnic.CSharp.Providers;
7 |
8 | namespace VueJs.Picnic.CSharp.Controllers
9 | {
10 | [Route("api/[controller]")]
11 | [ApiController]
12 | public class WeatherController : ControllerBase
13 | {
14 | private readonly IWeatherProvider weatherProvider;
15 |
16 | public WeatherController(IWeatherProvider weatherProvider)
17 | {
18 | this.weatherProvider = weatherProvider;
19 | }
20 |
21 | [HttpGet("[action]")]
22 | public IActionResult Forecasts([FromQuery(Name = "from")] int from = 0, [FromQuery(Name = "to")] int to = 4)
23 | {
24 | var quantity = to - from;
25 |
26 | // We should also avoid going too far in the list.
27 | if (quantity <= 0)
28 | {
29 | return BadRequest("You cannot have the 'to' parameter higher than 'from' parameter.");
30 | }
31 |
32 | if (from < 0)
33 | {
34 | return BadRequest("You cannot go in the negative with the 'from' parameter");
35 | }
36 |
37 | var allForecasts = weatherProvider.GetForecasts();
38 | var result = new
39 | {
40 | Total = allForecasts.Count,
41 | Forecasts = allForecasts.Skip(from).Take(quantity).ToArray()
42 | };
43 |
44 | return Ok(result);
45 | }
46 | }
47 | }
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Dockerfile:
--------------------------------------------------------------------------------
1 | ####################################################
2 | # To build your own image:
3 | # > docker build -t honosoft/vuejs-picnic:latest -t honosoft/vuejs-picnic:1.5.0 .
4 | # To run your image once it's ready:
5 | # > docker run -d -p 8080:80 --name vuejs-picnic honosoft/vuejs-picnic
6 | # To push the image into your docker repository:
7 | # > docker push honosoft/vuejs-picnic:latest
8 | # If you wish to remove your dangling images, please do the following (not mandatory)
9 | # > docker rmi $(docker images -f “dangling=true” -q)
10 | ####################################################
11 |
12 | # Build the container with Source code compiled
13 | FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine3.8 as buildenv
14 | WORKDIR /source
15 | RUN apk add --update nodejs nodejs-npm
16 | COPY *.csproj .
17 | RUN dotnet restore
18 | COPY . .
19 | # Publishing will also restore (install) the npm packages.
20 | RUN dotnet publish -c Release -o /app/ -r linux-musl-x64
21 |
22 | # Stage 2 - Creating Image for compiled app
23 | FROM mcr.microsoft.com/dotnet/core/runtime:2.2-alpine3.8 as baseimage
24 | RUN addgroup -S coreApp && adduser -S -G coreApp coreApp
25 |
26 | ## User should be set in order to run under that user, however, it is not for now.
27 |
28 | # Define other environment variable if needed.
29 | ENV ASPNETCORE_URLS=http://+:$port
30 |
31 | WORKDIR /app
32 | COPY --from=buildenv /app .
33 | RUN chown -R coreApp:coreApp /app
34 |
35 | # Replace the application name if required.
36 | ENTRYPOINT ["dotnet", "VueJs.Picnic.CSharp.dll"]
37 | EXPOSE $port
38 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Extensions/ServiceCollectionExtensions.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 |
3 | namespace VueJs.Picnic.CSharp.Extensions
4 | {
5 | public static class ServiceCollectionExtensions
6 | {
7 | public static IServiceCollection AddWeather(this IServiceCollection services)
8 | {
9 | // All add weather related DI.
10 | services.AddSingleton();
11 |
12 | return services;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Models/WeatherForecast.cs:
--------------------------------------------------------------------------------
1 | namespace VueJs.Picnic.CSharp.Models
2 | {
3 | public class WeatherForecast
4 | {
5 | public string DateFormatted { get; set; }
6 |
7 | public string Summary { get; set; }
8 |
9 | public int TemperatureC { get; set; }
10 |
11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
12 | }
13 | }
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore;
7 | using Microsoft.AspNetCore.Hosting;
8 | using Microsoft.Extensions.Configuration;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace VueJs.Picnic.CSharp
12 | {
13 | public class Program
14 | {
15 | public static void Main(string[] args)
16 | {
17 | CreateWebHostBuilder(args).Build().Run();
18 | }
19 |
20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
21 | WebHost.CreateDefaultBuilder(args)
22 | .UseStartup();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/launchsettings.json",
3 | "iisSettings": {
4 | "windowsAuthentication": false,
5 | "anonymousAuthentication": true,
6 | "iisExpress": {
7 | "applicationUrl": "http://localhost:21535",
8 | "sslPort": 44307
9 | }
10 | },
11 | "profiles": {
12 | "IIS Express": {
13 | "commandName": "IISExpress",
14 | "launchBrowser": true,
15 | "launchUrl": "",
16 | "environmentVariables": {
17 | "ASPNETCORE_ENVIRONMENT": "Development"
18 | }
19 | },
20 | "VueJs.Picnic.CSharp": {
21 | "commandName": "Project",
22 | "launchBrowser": true,
23 | "launchUrl": "",
24 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
25 | "environmentVariables": {
26 | "ASPNETCORE_ENVIRONMENT": "Development"
27 | }
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Providers/IWeatherProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using VueJs.Picnic.CSharp.Models;
3 |
4 | namespace VueJs.Picnic.CSharp.Providers
5 | {
6 | public interface IWeatherProvider
7 | {
8 | List GetForecasts();
9 | }
10 | }
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Providers/WeatherProviderFake.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using VueJs.Picnic.CSharp.Models;
5 |
6 | namespace VueJs.Picnic.CSharp.Providers
7 | {
8 | public class WeatherProviderFake : IWeatherProvider
9 | {
10 | private readonly string[] summaries = {
11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
12 | };
13 |
14 | private List WeatherForecasts { get; set; }
15 |
16 | public WeatherProviderFake()
17 | {
18 | Initialize(50);
19 | }
20 |
21 | private void Initialize(int quantity)
22 | {
23 | var rng = new Random();
24 | WeatherForecasts = Enumerable.Range(1, quantity).Select(index => new WeatherForecast
25 | {
26 | DateFormatted = DateTime.Now.AddDays(index).ToString("d"),
27 | TemperatureC = rng.Next(-20, 55),
28 | Summary = summaries[rng.Next(summaries.Length)]
29 | }).ToList();
30 | }
31 |
32 | public List GetForecasts()
33 | {
34 | return WeatherForecasts;
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/Startup.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.AspNetCore.Builder;
2 | using Microsoft.AspNetCore.Hosting;
3 | using Microsoft.AspNetCore.Mvc;
4 | using Microsoft.AspNetCore.ResponseCompression;
5 | using Microsoft.AspNetCore.SpaServices.Webpack;
6 | using Microsoft.Extensions.Configuration;
7 | using Microsoft.Extensions.DependencyInjection;
8 | using VueJs.Picnic.CSharp.Extensions;
9 |
10 | namespace VueJs.Picnic.CSharp
11 | {
12 | public class Startup
13 | {
14 | public Startup(IConfiguration configuration)
15 | {
16 | Configuration = configuration;
17 | }
18 |
19 | public IConfiguration Configuration { get; }
20 |
21 | // This method gets called by the runtime. Use this method to add services to the container.
22 | public void ConfigureServices(IServiceCollection services)
23 | {
24 | services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
25 |
26 | // Enable the Gzip compression especially for Kestrel
27 | services.Configure(options => options.Level = System.IO.Compression.CompressionLevel.Optimal);
28 | services.AddResponseCompression(options =>
29 | {
30 | #if (!NoHttps)
31 | options.EnableForHttps = true;
32 | #endif
33 | });
34 |
35 | services.AddSpaStaticFiles(config => { config.RootPath = "wwwroot/"; });
36 |
37 | // Example with dependency injection for a data provider.
38 | services.AddWeather();
39 | }
40 |
41 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
42 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
43 | {
44 | if (env.IsDevelopment())
45 | {
46 | app.UseDeveloperExceptionPage();
47 | }
48 | else
49 | {
50 | app.UseExceptionHandler("/Error");
51 | #if (!NoHttps)
52 | app.UseHsts();
53 | }
54 |
55 | app.UseHttpsRedirection();
56 | #else
57 | }
58 | #endif
59 |
60 | app.UseResponseCompression(); // No need if you use IIS, but really something good for Kestrel!
61 |
62 | // Idea: https://code.msdn.microsoft.com/How-to-fix-the-routing-225ac90f
63 | // This avoid having a real mvc view. You have other way of doing, but this one works
64 | // properly.
65 | // app.UseSpa();
66 | app.UseDefaultFiles();
67 | app.UseStaticFiles();
68 | app.UseSpaStaticFiles();
69 | app.UseMvc(routes =>
70 | {
71 | routes.MapRoute(
72 | name: "default",
73 | template: "{controller}/{action=Index}/{id?}");
74 | });
75 |
76 | app.UseSpa(spa =>
77 | {
78 | spa.Options.SourcePath = "ClientApp";
79 |
80 | if (env.IsDevelopment())
81 | {
82 | spa.ApplicationBuilder.UseWebpackDevMiddleware(
83 | new WebpackDevMiddlewareOptions
84 | {
85 | HotModuleReplacement = true,
86 | ConfigFile = "./build/webpack.config.js"
87 | });
88 | }
89 | });
90 | }
91 | }
92 | }
93 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/VueJs.Picnic.CSharp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.2
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 | %(DistFiles.Identity)
42 | PreserveNewest
43 |
44 |
45 |
46 |
47 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Debug",
5 | "System": "Information",
6 | "Microsoft": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Warning"
5 | }
6 | },
7 | "AllowedHosts": "*"
8 | }
9 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/build/base.config.js:
--------------------------------------------------------------------------------
1 | const args = process.argv
2 | const isProduction = args.indexOf('--prod', 0) >= 0
3 |
4 | let CurrentEnvironment = require('./base.dev.config.js')
5 | if (isProduction) {
6 | CurrentEnvironment = require('./base.prod.config.js')
7 | }
8 |
9 | // Please understand that the default are for the production. It can be overriden in the specific
10 | // configuration file such as :
11 | // - base.dev.config: Development configuration overrides
12 | // - base.prod.config: Production configuration overrides
13 | module.exports = {
14 | // Define if the build is in production or development. Please don't override this value.
15 | // to trigger a build as in production, use: npm run build -- --prod
16 | isProduction: isProduction,
17 |
18 | // Define what is your base URI. Normally, if your site is http://www.something.com/ you don't
19 | // have anything to change here. Otherwise if your site is http://www.something.com/my-application/
20 | // then you would put the base uri as '/my-application'.
21 | //
22 | // default: '/'
23 | baseUriPath: CurrentEnvironment.hasOwnProperty('baseUriPath') ? CurrentEnvironment.baseUriPath : '/',
24 |
25 | // Define if you want to have the map file generated in order to mainly debug your application. Don't
26 | // forget that normally you don't want this in production.
27 | //
28 | // default: false
29 | generateMapFiles: CurrentEnvironment.hasOwnProperty('generateMapFiles') ? CurrentEnvironment.generateMapFiles : false
30 | }
31 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/build/base.dev.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // Override default configuration such as
3 | // baseUriPath: '/'
4 | generateMapFiles: true
5 | }
6 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/build/base.prod.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // baseUriPath: '/'
3 | }
4 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/build/publishingLoader.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Webpack - Publishing in progress...
4 |
69 |
70 |
71 |
72 |
73 |
74 | Loading...
75 |
76 |
77 |
78 |
79 |
105 |
106 |
--------------------------------------------------------------------------------
/VueJs.Picnic.CSharp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "honosoft-vuejs-picnic",
3 | "description": "ASP.NET Core & VueJS using Picnic CSS",
4 | "author": "Nordes Menard-Lamarre",
5 | "repository": {
6 | "url": "https://github.com/nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates"
7 | },
8 | "license": "MIT",
9 | "scripts": {
10 | "build": "webpack --config build/webpack.config.js --hide-modules --progress",
11 | "lint": "eslint ./ClientApp/ --ext .js,.vue --fix"
12 | },
13 | "dependencies": {
14 | "axios": "^0.19.0",
15 | "vue": "^2.6.10",
16 | "vue-router": "^3.0.6",
17 | "vuex": "^3.1.1",
18 | "vuex-router-sync": "^5.0.0"
19 | },
20 | "devDependencies": {
21 | "@babel/core": "^7.4.5",
22 | "@babel/plugin-transform-async-to-generator": "^7.4.4",
23 | "@babel/plugin-transform-runtime": "^7.4.4",
24 | "@babel/preset-env": "^7.4.5",
25 | "@babel/runtime": "^7.4.5",
26 | "aspnet-webpack": "^3.0.0",
27 | "babel-eslint": "^10.0.2",
28 | "babel-loader": "^8.0.6",
29 | "babel-preset-env": "^1.7.0",
30 | "copy-webpack-plugin": "^5.0.3",
31 | "css-loader": "^3.0.0",
32 | "eslint": "^6.0.0",
33 | "eslint-config-standard": "^12.0.0",
34 | "eslint-plugin-import": "^2.17.3",
35 | "eslint-plugin-node": "^9.1.0",
36 | "eslint-plugin-promise": "^4.1.1",
37 | "eslint-plugin-standard": "^4.0.0",
38 | "eslint-plugin-vue": "^5.2.3",
39 | "file-loader": "^4.0.0",
40 | "html-webpack-plugin": "^3.2.0",
41 | "mini-css-extract-plugin": "^0.7.0",
42 | "node-sass": "^4.12.0",
43 | "optimize-css-assets-webpack-plugin": "^5.0.1",
44 | "picnic": "^6.5.0",
45 | "rimraf": "^2.6.3",
46 | "sass-loader": "^7.1.0",
47 | "tar": "^4.4.10",
48 | "uglifyjs-webpack-plugin": "^2.1.3",
49 | "vue-loader": "^15.7.0",
50 | "vue-style-loader": "^4.1.2",
51 | "vue-template-compiler": "^2.6.10",
52 | "webpack": "^4.35.0",
53 | "webpack-cli": "^3.3.5",
54 | "webpack-dev-middleware": "^3.7.0",
55 | "webpack-hot-middleware": "^2.25.0"
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/.dockerignore:
--------------------------------------------------------------------------------
1 | node_modules/
2 | obj/
3 | bin/
4 |
5 | wwwroot/**
6 |
7 | # User-specific files
8 | *.suo
9 | *.user
10 | *.userosscache
11 | *.sln.docstates
12 |
13 | .dockerignore
14 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/.eslintignore:
--------------------------------------------------------------------------------
1 | ######################################################
2 | # https://eslint.org/docs/user-guide/configuring
3 | ######################################################
4 | # /node_modules/* and /bower_components/* in the project root are ignored by default
5 | # Ignore built files except build/index.js
6 | /ClientApp/Static/**/*.js
7 |
8 | # !build/index.js ... if i would like to ignore all except that... then it's the way
9 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/.eslintrc.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | root: true,
3 | "parserOptions": {
4 | "parser": "babel-eslint"
5 | },
6 | "extends": [
7 | "standard",
8 | "plugin:vue/recommended"
9 | ]
10 | };
11 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 | node_modules/
3 | npm-debug.log
4 |
5 | # /Properties/launchSettings.json
6 |
7 | package-lock.json
8 |
9 | ## Ignore Visual Studio temporary files, build results, and
10 | ## files generated by popular Visual Studio add-ons.
11 |
12 | # User-specific files
13 | *.suo
14 | *.user
15 | *.userosscache
16 | *.sln.docstates
17 |
18 | # User-specific files (MonoDevelop/Xamarin Studio)
19 | *.userprefs
20 |
21 | # Build results
22 | [Dd]ebug/
23 | [Dd]ebugPublic/
24 | [Rr]elease/
25 | [Rr]eleases/
26 | x64/
27 | x86/
28 | bld/
29 | bin/
30 | Bin/
31 | obj/
32 | Obj/
33 |
34 | # Visual Studio 2015 cache/options directory
35 | .vs/
36 | /wwwroot/dist/**
37 |
38 | # Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
39 | !/wwwroot/dist/_placeholder.txt
40 |
41 | /yarn.lock
42 |
43 | # MSTest test Results
44 | [Tt]est[Rr]esult*/
45 | [Bb]uild[Ll]og.*
46 |
47 | # NUNIT
48 | *.VisualState.xml
49 | TestResult.xml
50 |
51 | # Build Results of an ATL Project
52 | [Dd]ebugPS/
53 | [Rr]eleasePS/
54 | dlldata.c
55 |
56 | # DNX
57 | project.lock.json
58 | artifacts/
59 |
60 | *_i.c
61 | *_p.c
62 | *_i.h
63 | *.ilk
64 | *.meta
65 | *.obj
66 | *.pch
67 | *.pdb
68 | *.pgc
69 | *.pgd
70 | *.rsp
71 | *.sbr
72 | *.tlb
73 | *.tli
74 | *.tlh
75 | *.tmp
76 | *.tmp_proj
77 | *.log
78 | *.vspscc
79 | *.vssscc
80 | .builds
81 | *.pidb
82 | *.svclog
83 | *.scc
84 |
85 | # Chutzpah Test files
86 | _Chutzpah*
87 |
88 | # Visual C++ cache files
89 | ipch/
90 | *.aps
91 | *.ncb
92 | *.opendb
93 | *.opensdf
94 | *.sdf
95 | *.cachefile
96 |
97 | # Visual Studio profiler
98 | *.psess
99 | *.vsp
100 | *.vspx
101 | *.sap
102 |
103 | # TFS 2012 Local Workspace
104 | $tf/
105 |
106 | # Guidance Automation Toolkit
107 | *.gpState
108 |
109 | # ReSharper is a .NET coding add-in
110 | _ReSharper*/
111 | *.[Rr]e[Ss]harper
112 | *.DotSettings.user
113 |
114 | # JustCode is a .NET coding add-in
115 | .JustCode
116 |
117 | # TeamCity is a build add-in
118 | _TeamCity*
119 |
120 | # DotCover is a Code Coverage Tool
121 | *.dotCover
122 |
123 | # NCrunch
124 | _NCrunch_*
125 | .*crunch*.local.xml
126 | nCrunchTemp_*
127 |
128 | # MightyMoose
129 | *.mm.*
130 | AutoTest.Net/
131 |
132 | # Web workbench (sass)
133 | .sass-cache/
134 |
135 | # Installshield output folder
136 | [Ee]xpress/
137 |
138 | # DocProject is a documentation generator add-in
139 | DocProject/buildhelp/
140 | DocProject/Help/*.HxT
141 | DocProject/Help/*.HxC
142 | DocProject/Help/*.hhc
143 | DocProject/Help/*.hhk
144 | DocProject/Help/*.hhp
145 | DocProject/Help/Html2
146 | DocProject/Help/html
147 |
148 | # Click-Once directory
149 | publish/
150 |
151 | # Publish Web Output
152 | *.[Pp]ublish.xml
153 | *.azurePubxml
154 | # TODO: Comment the next line if you want to checkin your web deploy settings
155 | # but database connection strings (with potential passwords) will be unencrypted
156 | *.pubxml
157 | *.publishproj
158 |
159 | # NuGet Packages
160 | *.nupkg
161 | # The packages folder can be ignored because of Package Restore
162 | **/packages/*
163 | # except build/, which is used as an MSBuild target.
164 | !**/packages/build/
165 | # Uncomment if necessary however generally it will be regenerated when needed
166 | #!**/packages/repositories.config
167 |
168 | # Microsoft Azure Build Output
169 | csx/
170 | *.build.csdef
171 |
172 | # Microsoft Azure Emulator
173 | ecf/
174 | rcf/
175 |
176 | # Microsoft Azure ApplicationInsights config file
177 | ApplicationInsights.config
178 |
179 | # Windows Store app package directory
180 | AppPackages/
181 | BundleArtifacts/
182 |
183 | # Visual Studio cache files
184 | # files ending in .cache can be ignored
185 | *.[Cc]ache
186 | # but keep track of directories ending in .cache
187 | !*.[Cc]ache/
188 |
189 | # Others
190 | ClientBin/
191 | ~$*
192 | *~
193 | *.dbmdl
194 | *.dbproj.schemaview
195 | *.pfx
196 | *.publishsettings
197 | orleans.codegen.cs
198 |
199 | # Workaround for https://github.com/aspnet/JavaScriptServices/issues/235
200 | /node_modules/**
201 | !/node_modules/_placeholder.txt
202 |
203 | # RIA/Silverlight projects
204 | Generated_Code/
205 |
206 | # Backup & report files from converting an old project file
207 | # to a newer Visual Studio version. Backup files are not needed,
208 | # because we have git ;-)
209 | _UpgradeReport_Files/
210 | Backup*/
211 | UpgradeLog*.XML
212 | UpgradeLog*.htm
213 |
214 | # SQL Server files
215 | *.mdf
216 | *.ldf
217 |
218 | # Business Intelligence projects
219 | *.rdl.data
220 | *.bim.layout
221 | *.bim_*.settings
222 |
223 | # Microsoft Fakes
224 | FakesAssemblies/
225 |
226 | # GhostDoc plugin setting file
227 | *.GhostDoc.xml
228 |
229 | # Node.js Tools for Visual Studio
230 | .ntvs_analysis.dat
231 |
232 | # Visual Studio 6 build log
233 | *.plg
234 |
235 | # Visual Studio 6 workspace options file
236 | *.opt
237 |
238 | # Visual Studio LightSwitch build output
239 | **/*.HTMLClient/GeneratedArtifacts
240 | **/*.DesktopClient/GeneratedArtifacts
241 | **/*.DesktopClient/ModelManifest.xml
242 | **/*.Server/GeneratedArtifacts
243 | **/*.Server/ModelManifest.xml
244 | _Pvt_Extensions
245 |
246 | # Paket dependency manager
247 | .paket/paket.exe
248 |
249 | # FAKE - F# Make
250 | .fake/
251 |
252 | .vscode/
253 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/.template.config/template.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/template",
3 | "author": "Nordes Menard-Lamarre",
4 | "classifications": [ "Web", "WebAPI", "SPA" ],
5 | "groupIdentity": "HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.VuePicnicTable",
6 | "identity": "VueJs.PicnicTable.CSharp",
7 | "name": "ASP.NET Core + Vue + Picnic + ...",
8 | "preferNameDirectory": true,
9 | "primaryOutputs": [
10 | {
11 | "path": "VueJs.PicnicTable.CSharp.csproj"
12 | }
13 | ],
14 | "shortName": "vuejs-picnic-table",
15 | "sourceName": "VueJs.PicnicTable.CSharp",
16 | "sources": [
17 | {
18 | "source": "./",
19 | "target": "./",
20 | "exclude": [
21 | ".template.config/**"
22 | ],
23 | "modifiers": [
24 | {
25 | "condition": "(TargetFrameworkOverride == '')",
26 | "exclude": [
27 | "app.config"
28 | ]
29 | },
30 | {
31 | "condition": "(ExcludeLaunchSettings)",
32 | "exclude": [
33 | "Properties/launchSettings.json"
34 | ]
35 | }
36 | ]
37 | }
38 | ],
39 | "symbols": {
40 | "ExcludeLaunchSettings": {
41 | "type": "parameter",
42 | "datatype": "bool",
43 | "defaultValue": "false",
44 | "description": "Whether to exclude launchSettings.json from the generated template."
45 | },
46 | "HttpPort": {
47 | "type": "parameter",
48 | "datatype": "integer",
49 | "description": "Port number to use for the HTTP endpoint in launchSettings.json."
50 | },
51 | "HttpPortGenerated": {
52 | "type": "generated",
53 | "generator": "port"
54 | },
55 | "HttpPortReplacer": {
56 | "type": "generated",
57 | "generator": "coalesce",
58 | "parameters": {
59 | "sourceVariableName": "HttpPort",
60 | "fallbackVariableName": "HttpPortGenerated"
61 | },
62 | "replaces": "8080"
63 | },
64 | "HttpsPort": {
65 | "type": "parameter",
66 | "datatype": "integer",
67 | "description": "Port number to use for the HTTPS endpoint in launchSettings.json. This option is only applicable when the parameter no-https is not used (no-https will be ignored if either IndividualAuth or OrganizationalAuth is used)."
68 | },
69 | "HttpsPortGenerated": {
70 | "type": "generated",
71 | "generator": "port",
72 | "parameters": {
73 | "low": 44300,
74 | "high": 44399
75 | }
76 | },
77 | "HttpsPortReplacer": {
78 | "type": "generated",
79 | "generator": "coalesce",
80 | "parameters": {
81 | "sourceVariableName": "HttpsPort",
82 | "fallbackVariableName": "HttpsPortGenerated"
83 | },
84 | "replaces": "44300"
85 | },
86 | "TargetFrameworkOverride": {
87 | "type": "parameter",
88 | "description": "Overrides the target framework",
89 | "replaces": "TargetFrameworkOverride",
90 | "datatype": "string",
91 | "defaultValue": ""
92 | },
93 | "Framework": {
94 | "type": "parameter",
95 | "description": "The target framework for the project.",
96 | "datatype": "choice",
97 | "choices": [
98 | {
99 | "choice": "netcoreapp2.2",
100 | "description": "Target netcoreapp2.2"
101 | }
102 | ],
103 | "replaces": "netcoreapp2.2",
104 | "defaultValue": "netcoreapp2.2"
105 | },
106 | "HostIdentifier": {
107 | "type": "bind",
108 | "binding": "HostIdentifier"
109 | },
110 | "skipRestore": {
111 | "type": "parameter",
112 | "datatype": "bool",
113 | "description": "If specified, skips the automatic restore of the project on create.",
114 | "defaultValue": "false"
115 | },
116 | "NoHttps": {
117 | "type": "parameter",
118 | "datatype": "bool",
119 | "defaultValue": "false",
120 | "description": "Whether to turn off HTTPS. This option only applies if Individual, IndividualB2C, SingleOrg, or MultiOrg aren't used for --auth."
121 | }
122 | },
123 | "tags": {
124 | "language": "C#",
125 | "type": "project"
126 | },
127 |
128 |
129 | "precedence": 100,
130 | "guids": [
131 | "6B3E8EE8-92E3-41CE-A356-A5F880EEA367"
132 | ],
133 | "postActions": [
134 | {
135 | "condition": "(!skipRestore)",
136 | "description": "Restore NuGet packages required by this project.",
137 | "manualInstructions": [
138 | {
139 | "text": "Run 'dotnet restore'"
140 | }
141 | ],
142 | "actionId": "210D431B-A78B-4D2F-B762-4ED3E3EA9025",
143 | "continueOnError": true
144 | }
145 | ]
146 | }
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/.editorconfig:
--------------------------------------------------------------------------------
1 | # Editor configuration, see http://editorconfig.org
2 | root = true
3 |
4 | [*]
5 | charset = utf-8
6 | indent_style = space
7 | indent_size = 2
8 | insert_final_newline = true
9 | trim_trailing_whitespace = true
10 |
11 | [*.md]
12 | max_line_length = off
13 | trim_trailing_whitespace = false
14 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/_i18n/lang/en.js:
--------------------------------------------------------------------------------
1 | const messages = {
2 | route: {
3 | home: 'Home',
4 | counter: 'Counter',
5 | fetchData: 'Fetch-data',
6 | extraStuff: 'Extra Stuff',
7 | about: 'About',
8 | error404: 'Error: Page not found'
9 | },
10 | cookieConsent: {
11 | message: 'This website is using cookies.',
12 | moreDetails: 'More details can be found here',
13 | accept: 'I accept'
14 | },
15 | navMenu: {
16 | title: 'VueJs Core',
17 | lang: {
18 | en: 'En',
19 | fr: 'Fr',
20 | ja: '日本語'
21 | }
22 | },
23 | '404': {
24 | title: 'Error 404 - Not Found',
25 | message: 'Not Found'
26 | },
27 | home: {
28 | title: '.Net Core 2.2 / SPA powered by VueJS and Picnic CSS',
29 | welcome: 'Welcome to your new single-page application, built with:',
30 | welcomeHtml: `
31 | ASP.NET Core and C# for cross-platform server-side code
32 | VueJs for client-side code
33 | Picnic CSS for layout and styling
34 | Fontello , an icon library that plays really nice with others. You can also use alternative library like FontAwesome if you prefer.
35 | EsLint , in order to keep the code look uniform.
36 | `,
37 | alsoSetup: 'To help you get started, we\'ve also added:',
38 | alsoHtml: `
39 | Vue-i18n for internationalization
40 | Vee-Validate for forms validation
41 | Vue-Router for SPA navigation.
42 | Vuex for state management within the application
43 | WebPack to help you build faster your UX. In development mode, there's no need to run webpack {...}.
44 | You simply need to use dotnet run and let the magic happen.
45 | Efficient production builds . In production mode, development-time features are disabled,
46 | and your dotnet publish configuration automatically invokes webpack ... production to produce minified,
47 | ahead-of-time compiled JavaScript files. Chunk also insure that any client cache will not fail you when loading your application.
48 | `,
49 | npmDetailHtml: `The ClientApp subdirectory is a standard NodeJs/VueJs application. If you open a command prompt in that
50 | directory, you can run any npm command (e.g., npm run build), or use npm to install extra packages
51 | into it.`,
52 | binding: {
53 | title: 'Simple example of binding',
54 | hello: 'Hello {msg}!'
55 | },
56 | footer: 'If you want to know more about the author of this template, you can contact him through'
57 | },
58 | about: {
59 | title: 'About',
60 | message: `Hi,
61 | This template is brought to you by HoNoSoFt . We hope
62 | that you'll have fun working with this template. We also have a blog
63 | where you'll find plenty of interesting stuff. However, you will have to use the google translate if you
64 | don't speak French ;).
65 | More details about this template can be found at the Github repository
66 | https://www.nuget.org/packages/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/ .
67 | There's also a wiki available for more details about what is included in the template.
68 | Best regards,
69 | Nordès Ménard-Lamarre (HoNoSoFt )
70 |
71 | The license is MIT, enjoy!
`
72 | },
73 | counter: {
74 | title: 'Counter',
75 | welcome: 'This is a simple example of an VueJs page component.',
76 | currentCount: 'Current count (Vuex): ',
77 | count: 'Not started | {count} tick | {count} ticks',
78 | autoCount: 'Auto count: ',
79 | btnIncrement: 'Increment',
80 | btnReset: 'Reset'
81 | },
82 | message: {
83 | hello: 'Hello world'
84 | }
85 | }
86 |
87 | export default messages
88 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/_i18n/lang/fr.js:
--------------------------------------------------------------------------------
1 | const messages = {
2 | route: {
3 | home: 'Accueil',
4 | counter: 'Compteur',
5 | fetchData: 'Appel API',
6 | extraStuff: 'Chose Extra',
7 | about: 'À Propos'
8 | },
9 | cookieConsent: {
10 | message: 'Ce site web utilise des cookies.',
11 | moreDetails: 'Plus de détails peut être donné ici',
12 | accept: `J'accepte`
13 | },
14 | navMenu: {
15 | title: 'VueJs Core',
16 | lang: {
17 | en: 'En',
18 | fr: 'Fr',
19 | ja: '日本語'
20 | }
21 | },
22 | '404': {
23 | title: 'Erreur 404 - Page non trouvée',
24 | message: 'Page non trouvée'
25 | },
26 | home: {
27 | title: '.Net Core 2.2 / SPA alimenté par VueJS et Picnic CSS',
28 | welcome: 'Bienvenu sur votre nouvelle monopage applicative, construite avec:',
29 | welcomeHtml: `
30 | ASP.NET Core et C# pour du code serveur multi-plateforme
31 | VueJs pour le code client
32 | Picnic CSS pour le layout (UX/UI)
33 | Fontello , une librairie d'icones qui fonctionne bien avec les autres. Vous pouvez aussi utiliser des alternatives tel que FontAwesome.
34 | EsLint afin d'avoir une conformité dans votre code.
35 | `,
36 | alsoSetup: 'Pour vous aider à démarrer, vous trouverez aussi ajouté au projet:',
37 | alsoHtml: `
38 | Vue-i18n pour l'internationalisation
39 | Vee-Validate pour la validation de formulaire
40 | Vue-Router pour la navigation SPA (monopage)
41 | Vuex pour gérer l'état de votre application
42 | WebPack pour vous aider à bâtir plus rapidement votre UX. En mode de developpement, il n'y aucun besoin d'exécuter webpack {...}.
43 | Vous pouvez tout simplement utiliser dotnet run et ainsi laisser la magie faire son oeuvre.
44 | Build pour la production efficace . En mode production, les outils de developpement sont désactivés,
45 | et la commande dotnet publish invoque automatiquement la configuration de production et ainsi crée les fichiers minifiés.
46 | Les Chunk assure aussi de ne pas avoir de surprise au niveau client (cache).
47 | `,
48 | npmDetailHtml: `L'application UX/UI se retrouve sous le répertoire ClientApp et se trouve à être une application standard NodeJs/VueJs. Si vous ouvre votre invite de commande dans le répertoire,
49 | vous pouvez exécuter toutes les commandes npm (e.g., npm run build), ou encore utiliser npm pour installer des packages extra.`,
50 | binding: {
51 | title: 'Exemple simple pour du binding',
52 | hello: 'Bonjour {msg}!'
53 | },
54 | footer: 'Si vous voulez en savoir plus sur l\'auteur de ce template, vous pouvez le contacter par'
55 | },
56 | about: {
57 | title: 'À Propos',
58 | message: `Bonjour,
59 | Ce template à été mis à votre disposition par HoNoSoFt . Nous espérons
60 | que vous aurez du plaisir à travailler à l'aide de ce template. Nous avons aussi un blog
61 | ou vous y trouver pleins d'information intéressante (Fr, En).
62 | Plus de détails sur ce template peut être trouvé sur GitHub
63 | https://www.nuget.org/packages/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/ .
64 | Il y a aussi un Wiki qui vous est a disposition afin d'obtenir plus d'information sur ce qui est inclus dans ce template.
65 | Best regards,
66 | Nordès Ménard-Lamarre (HoNoSoFt )
67 |
68 | La license est sous MIT, aillez du plaisir!
`
69 | },
70 | counter: {
71 | title: 'Compteur',
72 | welcome: 'Ceci est un exemple de page VueJS avec Vuex.',
73 | currentCount: 'Compteur (Vuex): ',
74 | count: 'Pas démarré | {count} tick | {count} ticks',
75 | autoCount: 'Compteur automatique: ',
76 | btnIncrement: 'Incrément',
77 | btnReset: 'Redémarrer'
78 | },
79 | message: {
80 | hello: 'bonjour monde'
81 | }
82 | }
83 |
84 | export default messages
85 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/_i18n/lang/ja.js:
--------------------------------------------------------------------------------
1 | const messages = {
2 | route: {
3 | home: 'トップ',
4 | counter: 'カウンタ',
5 | fetchData: 'API サンプル',
6 | extraStuff: 'エキストラ',
7 | about: 'これについて'
8 | },
9 | message: {
10 | hello: 'こんにちは、世界'
11 | }
12 | }
13 |
14 | export default messages
15 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/_i18n/setup.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueI18n from 'vue-i18n'
3 | import defaultMessages from './lang/en'
4 | import axios from 'axios'
5 |
6 | Vue.use(VueI18n)
7 | // ----------------------
8 | // You can also use https://kazupon.github.io/vue-i18n/guide/sfc.html#basic-usage instead.
9 | // ----------------------
10 |
11 | export const i18n = new VueI18n({
12 | locale: 'en', // set locale
13 | fallbackLocale: 'en',
14 | messages: { 'en': defaultMessages }
15 | })
16 |
17 | const loadedLanguages = ['en'] // our default language that is preloaded
18 |
19 | function setI18nLanguage (lang) {
20 | i18n.locale = lang
21 | axios.defaults.headers.common['Accept-Language'] = lang
22 | document.querySelector('html').setAttribute('lang', lang)
23 |
24 | return lang
25 | }
26 |
27 | export function loadLanguageAsync (lang) {
28 | if (i18n.locale !== lang && lang !== null && lang !== undefined) {
29 | if (!loadedLanguages.includes(lang)) {
30 | // eslint-disable-line
31 | return import(/* webpackChunkName: "lang-[request]" */ `./lang/${lang}`).then((msgs) => {
32 | i18n.setLocaleMessage(lang, msgs.default)
33 | loadedLanguages.push(lang)
34 |
35 | return setI18nLanguage(lang)
36 | })
37 | }
38 |
39 | return Promise.resolve(setI18nLanguage(lang))
40 | }
41 |
42 | return Promise.resolve(lang)
43 | }
44 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/app.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import upperFirst from 'lodash/upperFirst'
3 | import camelCase from 'lodash/camelCase'
4 | import axios from 'axios'
5 | import router from './router/index'
6 | import store from './store'
7 | import { sync } from 'vuex-router-sync'
8 | import VeeValidate from 'vee-validate'
9 | import { i18n, loadLanguageAsync } from './_i18n/setup'
10 | import App from './app.vue'
11 | require('./assets/site.scss')
12 |
13 | // Mode details on: https://vuejs.org/v2/guide/components-registration.html
14 | const requireComponent = require.context(
15 | // The relative path of the components folder
16 | './components',
17 | // Whether or not to look in subfolders
18 | true,
19 | // The regular expression used to match base component filenames
20 | /base[A-Z]\w+\.(vue|js)$/
21 | )
22 |
23 | requireComponent.keys().forEach(fileName => {
24 | // Get component config
25 | const componentConfig = requireComponent(fileName)
26 |
27 | // Get PascalCase name of component
28 | const componentName = upperFirst(
29 | camelCase(
30 | // Strip the leading `./` and extension from the filename
31 | fileName.replace(/base/, '').replace(/^\.\/(.*)\.\w+$/, '$1')
32 | )
33 | )
34 |
35 | // Register component globally
36 | Vue.component(
37 | componentName,
38 | // Look for the component options on `.default`, which will
39 | // exist if the component was exported with `export default`,
40 | // otherwise fall back to module's root.
41 | componentConfig.default || componentConfig
42 | )
43 | })
44 |
45 | Vue.prototype.$http = axios
46 | Vue.use(VeeValidate)
47 | var _loadLanguageAsync = loadLanguageAsync
48 |
49 | router.beforeEach((to, from, next) => {
50 | let lang = to.params.lang
51 | let thatStore = store
52 |
53 | if (lang === null || lang === undefined) {
54 | // console.debug(`Set default language to "${store.state.i18n.lang}" from the local storage`)
55 | // Usually the language is set by default during the init.
56 | lang = store.state.i18n.lang === null ? i18n.locale : store.state.i18n.lang // default
57 | }
58 |
59 | _loadLanguageAsync(lang)
60 | .then(() => {
61 | // Save the new value if necessary
62 | if (thatStore.state.i18n.lang !== lang) {
63 | thatStore.dispatch('i18n/changeLocale', { lang })
64 | }
65 | })
66 | .then(() => next())
67 | .catch(err => {
68 | console.log('Unknown language : ' + err)
69 | next('/404')
70 | })
71 | })
72 |
73 | store.dispatch('i18n/init', { lang: i18n.locale })
74 |
75 | sync(store, router)
76 |
77 | new Vue({ // eslint-disable-line
78 | el: '#app',
79 | store,
80 | i18n,
81 | router,
82 | ...App
83 | })
84 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/app.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
11 |
12 |
13 |
14 |
15 |
16 |
29 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/assets/_picnic.scss:
--------------------------------------------------------------------------------
1 | @import "../../node_modules/picnic/src/picnic.scss";
2 |
3 | .body {
4 | overflow:hidden;
5 | }
6 |
7 | .main {
8 | display:flex;
9 | flex-direction:column;
10 | min-height:100%;
11 | height:100%;
12 | }
13 |
14 | .container {
15 | display:flex;
16 | align-items: stretch;
17 | flex:1;
18 | overflow: hidden;
19 | }
20 |
21 | // Bug fix in the template. The card somehow does not react well for no apparent reason.
22 | // This is not the proper solution especially if you start using card within a popup.
23 | article.card {
24 | header,
25 | content,
26 | footer {
27 | position: inherit !important;
28 | }
29 |
30 | position: inherit !important;
31 | }
32 |
33 | @media all and (max-width: $picnic-breakpoint) {
34 | nav.dark {
35 | background-color: $theme-dark-color;
36 | }
37 |
38 | .topmenu {
39 | display: none;
40 | }
41 |
42 | .main-content {
43 | position: absolute;
44 | margin-top: 3em;
45 | padding:0.5em;
46 | }
47 |
48 | %nav {
49 | position:fixed;
50 | flex: 0 0 100%;
51 | justify-content: stretch;
52 | flex-wrap: wrap;
53 |
54 | .burger~.menu {
55 | background-color: $theme-dark-color;
56 | }
57 |
58 | .brand {
59 | max-width: initial;
60 | }
61 |
62 | .collapseToggle {
63 | display: none !important;
64 | }
65 |
66 | .menu {
67 | .nav-item {
68 | color: #CCC;
69 | }
70 |
71 | .nav-item.active {
72 | color: #fff;
73 | background: rgb(28, 66, 92);
74 | }
75 | }
76 | }
77 | }
78 |
79 | @media all and (min-width: $picnic-breakpoint) {
80 | nav.dark {
81 | // background-color: $theme-dark-color;
82 | border-right:1px #ddd solid;
83 | }
84 |
85 | .topmenu {
86 | margin:0px;
87 | padding:0.5em;
88 | height: 3em;
89 | display:flex;
90 | justify-content: space-between;
91 | line-height: 2em;
92 | background-color: $theme-dark-color;
93 | color: $theme-dark-textcolor;
94 | align-items: stretch;
95 |
96 | .topmenu-flex {
97 | display:flex;
98 | }
99 |
100 | .brandTop {
101 | font-weight: bold;
102 | padding-right: 2em;
103 | color: #fff;
104 | }
105 |
106 | .logo {
107 | height: 2em;
108 | padding-right: 0.5em;
109 | }
110 |
111 | .lang {
112 | width: 60px; color: #000;font-size: 0.8em; padding-top:0px; margin-top:4px; justify-content:center;
113 | }
114 |
115 | .user {
116 | display: flex;
117 | justify-content: flex-end;
118 | }
119 | }
120 |
121 | $picnic-nav-width: 300px !default;
122 | $picnic-nav-width-collapsed: 40px !important;
123 |
124 | .main-content {
125 | flex: 1;
126 | overflow:auto;
127 | padding: 0.2em;
128 | }
129 |
130 | .brand {
131 | display:none;
132 | }
133 |
134 | .collapseToggle {
135 | position:absolute;
136 | bottom:20px;
137 | right:-10px;
138 | text-align:right;
139 | padding:10px;
140 | }
141 |
142 | .collapsed {
143 | width: $picnic-nav-width-collapsed;
144 | }
145 |
146 | %nav {
147 | display: flex;
148 | flex: initial;
149 | vertical-align: top;
150 | z-index: inherit;
151 | box-shadow: inherit;
152 | // background: $theme-dark-color;
153 | right: inherit;
154 | width: $picnic-nav-width;
155 | height: inherit;
156 | padding: inherit;
157 |
158 | .menu {
159 | float: inherit;
160 | top: auto;
161 | clear: both;
162 | display: block;
163 |
164 | -webkit-transform: inherit;
165 | transform: inherit;
166 |
167 | .nav-item {
168 | display: inline-flex;
169 | padding: 0.4em 0px 0.4em 0.5em;
170 | margin: 0px;
171 | width: 100%;
172 | color: #444;
173 | }
174 |
175 | .nav-item.active {
176 | color: #eee;
177 | background: $blue;
178 | }
179 |
180 | span.collapsed {
181 | display:none !important;
182 | }
183 | }
184 | }
185 | }
186 |
187 | table {
188 | thead {
189 | font-size: 0.9em;
190 | white-space: nowrap;
191 |
192 | tr {
193 | th {
194 | background-color: $theme-dark-color;
195 | }
196 | }
197 | }
198 | }
199 |
200 | article {
201 | header {
202 | background-color: $theme-dark-color;
203 | color: $white;
204 | }
205 |
206 | content {
207 | padding: 0 1em;
208 | }
209 |
210 | footer {
211 | background-color: $silver;
212 | padding: 0 1em !important;
213 | }
214 | }
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/assets/_theme.scss:
--------------------------------------------------------------------------------
1 | $picnic-nav-position: inherit;
2 |
3 | $theme-dark-color: #333;
4 | $theme-dark-textcolor: #ddd;
5 |
6 | $green: #00AA55;
7 |
8 | @import "../../node_modules/picnic/src/themes/default/theme";
9 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/assets/site.scss:
--------------------------------------------------------------------------------
1 | @import "./theme";
2 | @import "./picnic";
3 |
4 | .text-right {
5 | text-align: right;
6 | }
7 |
8 | .page-title {
9 | border-bottom: 1px solid #ddd;
10 | margin-bottom: 1em;
11 | margin-left: -0.5em;
12 | padding-left: 0.5em;
13 |
14 | h1 {
15 | padding: 0.1em;
16 | }
17 | }
18 |
19 | // Optimization can be done by using a list + substring + ...
20 | // http://sass-lang.com/documentation/Sass/Script/Functions.html
21 | @for $size from 1 to 4 {
22 | .pt-#{$size}, .py-#{$size} {
23 | padding-top: #{$size}em;
24 | }
25 | .pb-#{$size}, .py-#{$size} {
26 | padding-bottom: #{$size}em;
27 | }
28 |
29 | .pl-#{$size}, .px-#{$size} {
30 | padding-left: #{$size}em;
31 | }
32 | .pr-#{$size}, .px-#{$size} {
33 | padding-right: #{$size}em;
34 | }
35 |
36 | .ml-#{$size}, .mx-#{$size} {
37 | margin-left: #{$size}em;
38 | }
39 | .mr-#{$size}, .mx-#{$size} {
40 | margin-right: #{$size}em;
41 | }
42 |
43 | .mt-#{$size}, .my-#{$size} {
44 | margin-left: #{$size}em;
45 | }
46 | .mb-#{$size}, .my-#{$size} {
47 | margin-right: #{$size}em;
48 | }
49 | }
50 |
51 | .color-white {
52 | color: $white;
53 | }
54 |
55 | .color-red {
56 | color: $picnic-error;
57 | }
58 |
59 | .bt {
60 | border-top: $picnic-border;
61 | }
62 |
63 | .text-center {
64 | text-align: center;
65 | }
66 |
67 | .spinner-big {
68 | font-size:79px;
69 | line-height: 1;
70 | }
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/components/baseIcon.vue:
--------------------------------------------------------------------------------
1 |
31 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/components/basePageTitle.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
{{ title }}
4 |
5 |
6 |
7 |
17 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/components/cookieConsent.vue:
--------------------------------------------------------------------------------
1 |
2 |
10 |
11 |
12 |
34 |
35 |
71 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/components/navMenu.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
9 |
{{ $t('navMenu.title') }}
14 |
18 | {{ $t(`navMenu.lang.${lang}`) }}
24 |
25 |
26 |
27 |
32 | ≡
36 |
37 |
58 |
59 |
60 |
61 |
102 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/components/navMenuTop.vue:
--------------------------------------------------------------------------------
1 |
2 |
25 |
26 |
27 |
52 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.PicnicTable.CSharp/ClientApp/favicon.ico
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/index.html:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 | HoNoSoFt - Dotnet Core - VueJs taking a Picnic
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/pages/404.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
7 |
404
¯\_ (ツ)
_/¯ {{ $t('404.message') }}
8 |
9 |
10 |
11 |
104 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/pages/about.vue:
--------------------------------------------------------------------------------
1 |
2 |
8 |
9 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/pages/counter-example.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
{{ $t('counter.welcome') }}
6 |
7 |
{{ $t('counter.currentCount') }} {{ $tc('counter.count', currentHitCount, { count: currentHitCount }) }}
8 |
{{ $t('counter.autoCount') }} {{ $tc('counter.count', autoCount, { count: autoCount }) }}
9 |
10 |
{{ $t('counter.btnIncrement') }}
11 |
{{ $t('counter.btnReset') }}
12 |
13 |
14 |
15 |
52 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/pages/extra-Stuff.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
What's on the Picnic Table ;)
5 |
「This page will not be translated」
6 |
7 | Swagger (SwashBuckle)
8 |
12 | vee-validate (Can also work with the i18n module if configured)
13 |
41 | I18N (Multilingual) - Lazy way, but can be re-adapted per/component instead. Now if you set your files,
42 | they will be downloaded dynamically. The language will be basically loaded on demands. The setting is also
43 | made in order to alter the param within the route, so that all the application is affected at once.
44 |
45 | Official Documentation
46 | Sample: {{ $t('message.hello') }} (Should be adapted for the entire site, use the dropdown in order to
47 | change the language
48 |
49 |
50 |
51 |
52 |
53 |
69 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/pages/fetch-data.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
Loading...
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 | Date
16 | Temp. (C)
17 | Temp. (F)
18 | Summary
19 |
20 |
21 |
22 |
26 | {{ forecast.dateFormatted }}
27 | {{ forecast.temperatureC }}
28 | {{ forecast.temperatureF }}
29 | {{ forecast.summary }}
30 |
31 |
32 |
33 |
34 |
35 |
Previous
40 |
44 | {{ n }}
48 |
Next
53 |
54 |
55 |
56 |
57 |
58 |
67 |
68 |
122 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/pages/home.vue:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
{{ $t('home.welcome') }}
5 |
7 |
{{ $t('home.alsoSetup') }}
8 |
10 |
11 |
12 |
13 |
14 | {{ $t('home.binding.title') }}
15 |
16 | {{ $t('home.binding.hello', {msg: msg}) }}
17 |
18 |
22 |
23 |
24 |
25 | {{ (new Date()).toLocaleString() }}
26 |
27 |
28 |
29 |
30 |
{{ $t('home.footer') }}
31 |
40 |
41 |
42 |
43 |
52 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/router/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import VueRouter from 'vue-router'
3 | import { routes } from './routes'
4 |
5 | Vue.use(VueRouter)
6 |
7 | let router = new VueRouter({
8 | mode: 'history',
9 | routes
10 | })
11 |
12 | export default router
13 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/router/routes.js:
--------------------------------------------------------------------------------
1 | import Home from 'pages/home'
2 | import CounterExample from 'pages/counter-example'
3 | import FetchData from 'pages/fetch-data'
4 | import ExtraStuff from 'pages/extra-stuff'
5 | import About from 'pages/about'
6 | import NotFound404 from 'pages/404'
7 |
8 | // Order matter since there's the language optional tag. That's why home is the
9 | // latest with the catch{all}.
10 | export const routes = [
11 | { name: '404', path: '/404', component: NotFound404, meta: { order: null, i18n: 'route.error404' } },
12 | { name: 'counter', path: '/:lang?/counter', component: CounterExample, meta: { order: 2, i18n: 'route.counter', icon: 'icon-counter' } },
13 | { name: 'fetch-data', path: '/:lang?/fetch-data', component: FetchData, meta: { order: 3, i18n: 'route.fetchData', icon: 'icon-list-bullet' } },
14 | { name: 'extra-stuff', path: '/:lang?/extra-stuff', component: ExtraStuff, meta: { order: 4, i18n: 'route.extraStuff', icon: 'icon-list-bullet' } },
15 | { name: 'about', path: '/:lang?/about', component: About, meta: { order: 5, i18n: 'route.about', icon: 'icon-about' } },
16 | { name: 'home', path: '/:lang?', component: Home, meta: { order: 1, i18n: 'route.home', icon: 'icon-home' } },
17 | { name: 'catchAll', path: '*', redirect: '/404', meta: { order: null } }
18 | ]
19 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/static/fontello/LICENSE.txt:
--------------------------------------------------------------------------------
1 | Font license info
2 |
3 |
4 | ## Font Awesome
5 |
6 | Copyright (C) 2016 by Dave Gandy
7 |
8 | Author: Dave Gandy
9 | License: SIL ()
10 | Homepage: http://fortawesome.github.com/Font-Awesome/
11 |
12 |
13 | ## Fontelico
14 |
15 | Copyright (C) 2012 by Fontello project
16 |
17 | Author: Crowdsourced, for Fontello project
18 | License: SIL (http://scripts.sil.org/OFL)
19 | Homepage: http://fontello.com
20 |
21 |
22 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/static/fontello/README.txt:
--------------------------------------------------------------------------------
1 | This webfont is generated by http://fontello.com open source project.
2 |
3 |
4 | ================================================================================
5 | Please, note, that you should obey original font licenses, used to make this
6 | webfont pack. Details available in LICENSE.txt file.
7 |
8 | - Usually, it's enough to publish content of LICENSE.txt file somewhere on your
9 | site in "About" section.
10 |
11 | - If your project is open-source, usually, it will be ok to make LICENSE.txt
12 | file publicly available in your repository.
13 |
14 | - Fonts, used in Fontello, don't require a clickable link on your site.
15 | But any kind of additional authors crediting is welcome.
16 | ================================================================================
17 |
18 |
19 | Comments on archive content
20 | ---------------------------
21 |
22 | - /font/* - fonts in different formats
23 |
24 | - /css/* - different kinds of css, for all situations. Should be ok with
25 | twitter bootstrap. Also, you can skip style and assign icon classes
26 | directly to text elements, if you don't mind about IE7.
27 |
28 | - demo.html - demo file, to show your webfont content
29 |
30 | - LICENSE.txt - license info about source fonts, used to build your one.
31 |
32 | - config.json - keeps your settings. You can import it back into fontello
33 | anytime, to continue your work
34 |
35 |
36 | Why so many CSS files ?
37 | -----------------------
38 |
39 | Because we like to fit all your needs :)
40 |
41 | - basic file, .css - is usually enough, it contains @font-face
42 | and character code definitions
43 |
44 | - *-ie7.css - if you need IE7 support, but still don't wish to put char codes
45 | directly into html
46 |
47 | - *-codes.css and *-ie7-codes.css - if you like to use your own @font-face
48 | rules, but still wish to benefit from css generation. That can be very
49 | convenient for automated asset build systems. When you need to update font -
50 | no need to manually edit files, just override old version with archive
51 | content. See fontello source code for examples.
52 |
53 | - *-embedded.css - basic css file, but with embedded WOFF font, to avoid
54 | CORS issues in Firefox and IE9+, when fonts are hosted on the separate domain.
55 | We strongly recommend to resolve this issue by `Access-Control-Allow-Origin`
56 | server headers. But if you ok with dirty hack - this file is for you. Note,
57 | that data url moved to separate @font-face to avoid problems with
2 |
3 |
4 | Copyright (C) 2018 by original authors @ fontello.com
5 |
6 |
7 |
8 |
9 |
10 |
11 |
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
27 |
28 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/static/fontello/font/fontello.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.PicnicTable.CSharp/ClientApp/static/fontello/font/fontello.ttf
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/static/fontello/font/fontello.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.PicnicTable.CSharp/ClientApp/static/fontello/font/fontello.woff
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/static/fontello/font/fontello.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.PicnicTable.CSharp/ClientApp/static/fontello/font/fontello.woff2
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/static/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/VueJs.PicnicTable.CSharp/ClientApp/static/images/logo.png
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/store/index.js:
--------------------------------------------------------------------------------
1 | import Vue from 'vue'
2 | import Vuex from 'vuex'
3 | import I18n from './modules/i18n'
4 | import Counter from './modules/counter'
5 |
6 | Vue.use(Vuex)
7 |
8 | export default new Vuex.Store({
9 | modules: {
10 | counter: Counter,
11 | i18n: I18n
12 | }
13 | })
14 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/store/modules/counter.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Example of a counter (usual demo... you know the drill)
3 | */
4 |
5 | const COUNTER_SET_HIT = 'COUNTER_SET_HIT'
6 |
7 | export default {
8 | namespaced: true,
9 |
10 | state: {
11 | hit: 0
12 | },
13 |
14 | mutations: {
15 | [COUNTER_SET_HIT] (state, obj) {
16 | state.hit = obj.hit
17 | }
18 | },
19 |
20 | actions: {
21 | setHit ({ commit }, obj) {
22 | commit(COUNTER_SET_HIT, obj)
23 | }
24 | },
25 |
26 | getters: {
27 | },
28 |
29 | modules: {
30 | // Declare sub-modules
31 | }
32 | }
33 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/ClientApp/store/modules/i18n.js:
--------------------------------------------------------------------------------
1 | /**
2 | * Module for Vuex coupled with vue-router in order to have the following behavior when landing on a page.
3 | *
4 | * Behavior:
5 | * 1. http://mysite.com/my-page
6 | * > This will use your last session language or the default. Whichever come first.
7 | * 2. http://mysite.com/en/my-page
8 | * > This will set your current (and next interaction or session) to english as your new default
9 | * 3. http://mysite.com/ja/my-page
10 | * > As precedent, however if 'ja' is not the site default, when you land on (1), it will redirect you to
11 | * > http://mysite.com/ja/my-page
12 | */
13 |
14 | const I18N_INIT = 'I18N_INIT'
15 | const I18N_SET = 'I18N_SET'
16 | const I18N_SAVE_STORAGE = 'I18N_SAVE_STORAGE'
17 |
18 | // Module example. This is also based on the official documentation at https://vuex.vuejs.org/guide/modules.html
19 | export default {
20 | namespaced: true,
21 |
22 | state: {
23 | lang: null // Set upon the first request
24 | },
25 |
26 | mutations: {
27 | [I18N_SAVE_STORAGE]: function (state) {
28 | localStorage.setItem('store.i18n', JSON.stringify(state))
29 | },
30 |
31 | [I18N_INIT]: function (state, defaultLang) {
32 | // Check if the ID exists
33 | if (localStorage.getItem('store.i18n')) {
34 | // Replace the state object with the stored item
35 | Object.assign(state, JSON.parse(localStorage.getItem('store.i18n')))
36 | } else {
37 | if (state.lang === null) {
38 | state.lang = defaultLang
39 | }
40 | }
41 | },
42 |
43 | [I18N_SET]: function (state, lang) {
44 | state.lang = lang
45 | }
46 | },
47 |
48 | actions: {
49 | init (state, obj) {
50 | state.commit(I18N_INIT, obj.lang)
51 | state.commit(I18N_SAVE_STORAGE)
52 | },
53 |
54 | changeLocale ({ commit }, obj) {
55 | commit(I18N_SET, obj.lang)
56 | commit(I18N_SAVE_STORAGE)
57 | }
58 | },
59 |
60 | getters: {
61 | },
62 |
63 | modules: {
64 | // Declare sub-modules
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Controllers/ValuesController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using Microsoft.AspNetCore.Mvc;
4 |
5 | namespace VueJs.PicnicTable.CSharp.Controllers
6 | {
7 | [Route("api/[controller]")]
8 | [ApiController]
9 | public class ValuesController : ControllerBase
10 | {
11 | ///
12 | /// GET api/values
13 | ///
14 | /// Returns an enumerable of value
15 | [ProducesResponseType((int)System.Net.HttpStatusCode.OK)]
16 | [HttpGet]
17 | public ActionResult> Get()
18 | {
19 | return new string[] { "value1", "value22" };
20 | }
21 |
22 | ///
23 | /// Get a value.
24 | ///
25 | /// Returns an enumerable of value
26 | /// For example, if you do GET api/values/5, you will get the "value".
27 | [ProducesResponseType((int)System.Net.HttpStatusCode.OK)]
28 | [HttpGet("{id}")]
29 | public ActionResult Get(int id)
30 | {
31 | return "value";
32 | }
33 |
34 | // POST api/values
35 | [HttpPost]
36 | [ProducesResponseType((int)System.Net.HttpStatusCode.Created)]
37 | public void Post([FromBody] string value)
38 | {
39 | }
40 |
41 | // PUT api/values/5
42 | [ProducesResponseType((int)System.Net.HttpStatusCode.NoContent)]
43 | [HttpPut("{id}")]
44 | public void Put(int id, [FromBody] string value)
45 | {
46 | }
47 |
48 | // DELETE api/values/5
49 | [ProducesResponseType((int)System.Net.HttpStatusCode.NoContent)]
50 | [HttpDelete("{id}")]
51 | public void Delete(int id)
52 | {
53 | }
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Controllers/WeatherController.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.ComponentModel.DataAnnotations;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore.Mvc;
7 | using VueJs.PicnicTable.CSharp.Models.Dto;
8 | using VueJs.PicnicTable.CSharp.Providers;
9 |
10 | namespace VueJs.PicnicTable.CSharp.Controllers
11 | {
12 | [Route("api/[controller]")]
13 | [ApiController]
14 | public class WeatherController : ControllerBase
15 | {
16 | private readonly IWeatherProvider weatherProvider;
17 |
18 | public WeatherController(IWeatherProvider weatherProvider)
19 | {
20 | this.weatherProvider = weatherProvider;
21 | }
22 |
23 | ///
24 | /// Gets the forecast using some paging.
25 | ///
26 | /// Define the index to start from
27 | /// Define the index until what value
28 | /// The forecast as an enumerable.
29 | /// This method is simply used as an example for simple pagination.
30 | [HttpGet("[action]")]
31 | [ProducesResponseType(typeof(WeatherForecastResults), (int)System.Net.HttpStatusCode.OK)]
32 | [ProducesResponseType((int)System.Net.HttpStatusCode.BadRequest)]
33 | public IActionResult Forecasts([FromQuery(Name = "from")] int from = 0, [FromQuery(Name = "to")] int to = 4)
34 | {
35 | var quantity = to - from;
36 |
37 | // We should also avoid going too far in the list.
38 | if (quantity <= 0)
39 | {
40 | return BadRequest("You cannot have the 'to' parameter higher than 'from' parameter.");
41 | }
42 |
43 | if (from < 0)
44 | {
45 | return BadRequest("You cannot go in the negative with the 'from' parameter");
46 | }
47 |
48 | var allForecasts = weatherProvider.GetForecasts();
49 | var result = new WeatherForecastResults
50 | {
51 | Total = allForecasts.Count,
52 | Forecasts = allForecasts.Skip(from).Take(quantity).ToArray()
53 | };
54 |
55 | return Ok(result);
56 | }
57 | }
58 | }
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Dockerfile:
--------------------------------------------------------------------------------
1 | ####################################################
2 | # To build your own image:
3 | # > docker build -t honosoft/vuejs-picnictable:latest -t honosoft/vuejs-picnictable:1.5.0 .
4 | # To run your image once it's ready:
5 | # > docker run -d -p 8080:80 --name vuejs-picnictable honosoft/vuejs-picnictable
6 | # To push the image into your docker repository:
7 | # > docker push honosoft/vuejs-picnictable:latest
8 | # If you wish to remove your dangling images, please do the following (not mandatory)
9 | # > docker rmi $(docker images -f “dangling=true” -q)
10 | ####################################################
11 |
12 | # Build the container with Source code compiled
13 | FROM mcr.microsoft.com/dotnet/core/sdk:2.2-alpine3.8 as buildenv
14 | WORKDIR /source
15 | RUN apk add --update nodejs nodejs-npm
16 | COPY *.csproj .
17 | RUN dotnet restore
18 | COPY . .
19 | # Publishing will also restore (install) the npm packages.
20 | RUN dotnet publish -c Release -o /app/ -r linux-musl-x64
21 |
22 | # Stage 2 - Creating Image for compiled app
23 | FROM mcr.microsoft.com/dotnet/core/runtime:2.2-alpine3.8 as baseimage
24 | RUN addgroup -S coreApp && adduser -S -G coreApp coreApp
25 |
26 | # Define other environment variable if needed.
27 | ENV ASPNETCORE_URLS=http://+:$port
28 |
29 | WORKDIR /app
30 | COPY --from=buildenv /app .
31 | RUN chown -R coreApp:coreApp /app
32 |
33 | # Replace the application name if required.
34 | ENTRYPOINT ["dotnet", "VueJs.PicnicTable.CSharp.dll"]
35 | EXPOSE $port
36 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Extensions/ServiceCollectionExtensions.cs:
--------------------------------------------------------------------------------
1 | using Microsoft.Extensions.DependencyInjection;
2 |
3 | namespace VueJs.PicnicTable.CSharp.Extensions
4 | {
5 | public static class ServiceCollectionExtensions
6 | {
7 | public static IServiceCollection AddWeather(this IServiceCollection services)
8 | {
9 | // All add weather related DI.
10 | services.AddSingleton();
11 |
12 | return services;
13 | }
14 | }
15 | }
16 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Models/Dto/WeatherForecastResults.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 |
3 | namespace VueJs.PicnicTable.CSharp.Models.Dto
4 | {
5 | public class WeatherForecastResults
6 | {
7 | public int Total { get; set; }
8 | public IEnumerable Forecasts;
9 | }
10 | }
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Models/WeatherForecast.cs:
--------------------------------------------------------------------------------
1 | namespace VueJs.PicnicTable.CSharp.Models
2 | {
3 | public class WeatherForecast
4 | {
5 | public string DateFormatted { get; set; }
6 |
7 | public string Summary { get; set; }
8 |
9 | public int TemperatureC { get; set; }
10 |
11 | public int TemperatureF => 32 + (int)(TemperatureC / 0.5556);
12 | }
13 | }
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Program.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.IO;
4 | using System.Linq;
5 | using System.Threading.Tasks;
6 | using Microsoft.AspNetCore;
7 | using Microsoft.AspNetCore.Hosting;
8 | using Microsoft.Extensions.Configuration;
9 | using Microsoft.Extensions.Logging;
10 |
11 | namespace VueJs.PicnicTable.CSharp
12 | {
13 | public class Program
14 | {
15 | public static void Main(string[] args)
16 | {
17 | CreateWebHostBuilder(args).Build().Run();
18 | }
19 |
20 | public static IWebHostBuilder CreateWebHostBuilder(string[] args) =>
21 | WebHost.CreateDefaultBuilder(args)
22 | .UseStartup();
23 | }
24 | }
25 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Properties/launchSettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "$schema": "http://json.schemastore.org/launchsettings.json",
3 | "iisSettings": {
4 | "windowsAuthentication": false,
5 | "anonymousAuthentication": true,
6 | "iisExpress": {
7 | "applicationUrl": "http://localhost:21535",
8 | "sslPort": 44307
9 | }
10 | },
11 | "profiles": {
12 | "IIS Express": {
13 | "commandName": "IISExpress",
14 | "launchBrowser": true,
15 | "launchUrl": "",
16 | "environmentVariables": {
17 | "ASPNETCORE_ENVIRONMENT": "Development"
18 | }
19 | },
20 | "VueJs.PicnicTable.CSharp": {
21 | "commandName": "Project",
22 | "launchBrowser": true,
23 | "launchUrl": "",
24 | "applicationUrl": "https://localhost:5001;http://localhost:5000",
25 | "environmentVariables": {
26 | "ASPNETCORE_ENVIRONMENT": "Development"
27 | }
28 | }
29 | }
30 | }
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Providers/IWeatherProvider.cs:
--------------------------------------------------------------------------------
1 | using System.Collections.Generic;
2 | using VueJs.PicnicTable.CSharp.Models;
3 |
4 | namespace VueJs.PicnicTable.CSharp.Providers
5 | {
6 | public interface IWeatherProvider
7 | {
8 | List GetForecasts();
9 | }
10 | }
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Providers/WeatherProviderFake.cs:
--------------------------------------------------------------------------------
1 | using System;
2 | using System.Collections.Generic;
3 | using System.Linq;
4 | using VueJs.PicnicTable.CSharp.Models;
5 |
6 | namespace VueJs.PicnicTable.CSharp.Providers
7 | {
8 | public class WeatherProviderFake : IWeatherProvider
9 | {
10 | private readonly string[] summaries = {
11 | "Freezing", "Bracing", "Chilly", "Cool", "Mild", "Warm", "Balmy", "Hot", "Sweltering", "Scorching"
12 | };
13 |
14 | private List WeatherForecasts { get; set; }
15 |
16 | public WeatherProviderFake()
17 | {
18 | Initialize(50);
19 | }
20 |
21 | private void Initialize(int quantity)
22 | {
23 | var rng = new Random();
24 | WeatherForecasts = Enumerable.Range(1, quantity).Select(index => new WeatherForecast
25 | {
26 | DateFormatted = DateTime.Now.AddDays(index).ToString("d"),
27 | TemperatureC = rng.Next(-20, 55),
28 | Summary = summaries[rng.Next(summaries.Length)]
29 | }).ToList();
30 | }
31 |
32 | public List GetForecasts()
33 | {
34 | return WeatherForecasts;
35 | }
36 | }
37 | }
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/Startup.cs:
--------------------------------------------------------------------------------
1 | using System.IO;
2 | using System.Reflection;
3 | using Microsoft.AspNetCore.Builder;
4 | using Microsoft.AspNetCore.Hosting;
5 | using Microsoft.AspNetCore.Mvc;
6 | using Microsoft.AspNetCore.ResponseCompression;
7 | using Microsoft.AspNetCore.SpaServices.Webpack;
8 | using Microsoft.Extensions.Configuration;
9 | using Microsoft.Extensions.DependencyInjection;
10 | using Swashbuckle.AspNetCore.Swagger;
11 | using VueJs.PicnicTable.CSharp.Extensions;
12 |
13 | namespace VueJs.PicnicTable.CSharp
14 | {
15 | public class Startup
16 | {
17 | public Startup(IConfiguration configuration)
18 | {
19 | Configuration = configuration;
20 | }
21 |
22 | public IConfiguration Configuration { get; }
23 |
24 | // This method gets called by the runtime. Use this method to add services to the container.
25 | public void ConfigureServices(IServiceCollection services)
26 | {
27 | services.AddMvc().SetCompatibilityVersion(CompatibilityVersion.Version_2_1);
28 | services.AddSwaggerGen(c =>
29 | {
30 | c.SwaggerDoc("v1", new Info {
31 | Title = "My app API",
32 | Description = "A simple example Core Web API",
33 | TermsOfService = "None",
34 | Version = "v1",
35 | Contact = new Contact
36 | {
37 | Name = "Nordes Lamarre",
38 | Email = string.Empty,
39 | Url = "https://twitter.com/nordes"
40 | },
41 | License = new License
42 | {
43 | Name = "Use under MIT",
44 | Url = "https://github.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/blob/master/LICENSE"
45 | }
46 | });
47 |
48 | // Set the comments path for the Swagger JSON and UI.
49 | var xmlFile = $"{Assembly.GetExecutingAssembly().GetName().Name}.xml";
50 | var xmlPath = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), xmlFile);
51 | c.IncludeXmlComments(xmlPath);
52 | });
53 |
54 | // Enable the Gzip compression especially for Kestrel
55 | services.Configure(options => options.Level = System.IO.Compression.CompressionLevel.Optimal);
56 | services.AddResponseCompression(options =>
57 | {
58 | #if (!NoHttps)
59 | options.EnableForHttps = true;
60 | #endif
61 | });
62 |
63 | services.AddSpaStaticFiles(config => { config.RootPath = "wwwroot/"; });
64 |
65 | // Example with dependency injection for a data provider.
66 | services.AddWeather();
67 | }
68 |
69 | // This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
70 | public void Configure(IApplicationBuilder app, IHostingEnvironment env)
71 | {
72 | if (env.IsDevelopment())
73 | {
74 | app.UseDeveloperExceptionPage();
75 | }
76 | else
77 | {
78 | app.UseExceptionHandler("/Error");
79 | #if (!NoHttps)
80 | // The default HSTS value is 30 days. You may want to change this for production scenarios, see https://aka.ms/aspnetcore-hsts.
81 | app.UseHsts();
82 | }
83 |
84 | app.UseHttpsRedirection();
85 | #else
86 | }
87 | #endif
88 | app.UseResponseCompression(); // This is especially true for Kestrel!
89 |
90 | // Enable middleware to serve generated Swagger as a JSON endpoint.
91 | app.UseSwagger();
92 | // Enable middleware to serve swagger-ui (HTML, JS, CSS, etc.), specifying the Swagger JSON endpoint.
93 | app.UseSwaggerUI(c =>
94 | {
95 | c.SwaggerEndpoint("/swagger/v1/swagger.json", "My API V1");
96 | });
97 |
98 | app.UseDefaultFiles();
99 | app.UseStaticFiles();
100 | app.UseSpaStaticFiles();
101 | app.UseMvc(routes =>
102 | {
103 | routes.MapRoute(
104 | name: "default",
105 | template: "{controller}/{action=Index}/{id?}");
106 | });
107 |
108 | app.UseSpa(spa =>
109 | {
110 | spa.Options.SourcePath = "ClientApp";
111 |
112 | if (env.IsDevelopment())
113 | {
114 | spa.ApplicationBuilder.UseWebpackDevMiddleware(
115 | new WebpackDevMiddlewareOptions
116 | {
117 | HotModuleReplacement = true,
118 | ConfigFile = "./build/webpack.config.js"
119 | });
120 | }
121 | });
122 | }
123 | }
124 | }
125 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/VueJs.PicnicTable.CSharp.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | netcoreapp2.2
5 |
6 |
7 |
8 | true
9 | $(NoWarn);1591
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 | %(DistFiles.Identity)
48 | PreserveNewest
49 |
50 |
51 |
52 |
53 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/appsettings.Development.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Debug",
5 | "System": "Information",
6 | "Microsoft": "Information"
7 | }
8 | }
9 | }
10 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/appsettings.json:
--------------------------------------------------------------------------------
1 | {
2 | "Logging": {
3 | "LogLevel": {
4 | "Default": "Warning"
5 | }
6 | },
7 | "AllowedHosts": "*"
8 | }
9 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/build/base.config.js:
--------------------------------------------------------------------------------
1 | const args = process.argv
2 | const isProduction = args.indexOf('--prod', 0) >= 0
3 |
4 | let CurrentEnvironment = require('./base.dev.config.js')
5 | if (isProduction) {
6 | CurrentEnvironment = require('./base.prod.config.js')
7 | }
8 |
9 | // Please understand that the default are for the production. It can be overriden in the specific
10 | // configuration file such as :
11 | // - base.dev.config: Development configuration overrides
12 | // - base.prod.config: Production configuration overrides
13 | module.exports = {
14 | // Define if the build is in production or development. Please don't override this value.
15 | // to trigger a build as in production, use: npm run build -- --prod
16 | isProduction: isProduction,
17 |
18 | // Define what is your base URI. Normally, if your site is http://www.something.com/ you don't
19 | // have anything to change here. Otherwise if your site is http://www.something.com/my-application/
20 | // then you would put the base uri as '/my-application'.
21 | //
22 | // default: '/'
23 | baseUriPath: CurrentEnvironment.hasOwnProperty('baseUriPath') ? CurrentEnvironment.baseUriPath : '/',
24 |
25 | // Define if you want to have the map file generated in order to mainly debug your application. Don't
26 | // forget that normally you don't want this in production.
27 | //
28 | // default: false
29 | generateMapFiles: CurrentEnvironment.hasOwnProperty('generateMapFiles') ? CurrentEnvironment.generateMapFiles : false
30 | }
31 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/build/base.dev.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // Override default configuration such as
3 | // baseUriPath: '/'
4 | generateMapFiles: true
5 | }
6 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/build/base.prod.config.js:
--------------------------------------------------------------------------------
1 | module.exports = {
2 | // baseUriPath: '/'
3 | }
4 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/build/publishingLoader.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | Webpack - Publishing in progress...
4 |
69 |
70 |
71 |
72 |
73 |
74 | Loading...
75 |
76 |
77 |
78 |
79 |
105 |
106 |
--------------------------------------------------------------------------------
/VueJs.PicnicTable.CSharp/package.json:
--------------------------------------------------------------------------------
1 | {
2 | "name": "honosoft-vuejs-picnic",
3 | "description": "ASP.NET Core & VueJS using Picnic CSS and set the full table (many extras)",
4 | "author": "Nordes Menard-Lamarre",
5 | "repository": {
6 | "url": "https://github.com/nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates"
7 | },
8 | "license": "MIT",
9 | "scripts": {
10 | "build": "webpack --config build/webpack.config.js --hide-modules --progress",
11 | "lint": "eslint ./ClientApp/ --ext .js,.vue --fix"
12 | },
13 | "dependencies": {
14 | "axios": "^0.19.0",
15 | "vee-validate": "^2.2.11",
16 | "vue": "^2.6.10",
17 | "vue-i18n": "^8.11.2",
18 | "vue-router": "^3.0.6",
19 | "vuex": "^3.1.1",
20 | "vuex-router-sync": "^5.0.0"
21 | },
22 | "devDependencies": {
23 | "@babel/core": "^7.4.5",
24 | "@babel/plugin-syntax-dynamic-import": "^7.2.0",
25 | "@babel/plugin-transform-async-to-generator": "^7.4.4",
26 | "@babel/plugin-transform-runtime": "^7.4.4",
27 | "@babel/preset-env": "^7.4.5",
28 | "@babel/runtime": "^7.4.5",
29 | "aspnet-webpack": "^3.0.0",
30 | "babel-eslint": "^10.0.2",
31 | "babel-loader": "^8.0.6",
32 | "babel-preset-env": "^1.7.0",
33 | "copy-webpack-plugin": "^5.0.3",
34 | "css-loader": "^3.0.0",
35 | "eslint": "^6.0.0",
36 | "eslint-config-standard": "^12.0.0",
37 | "eslint-plugin-import": "^2.17.3",
38 | "eslint-plugin-node": "^9.1.0",
39 | "eslint-plugin-promise": "^4.1.1",
40 | "eslint-plugin-standard": "^4.0.0",
41 | "eslint-plugin-vue": "^5.2.3",
42 | "file-loader": "^4.0.0",
43 | "html-webpack-plugin": "^3.2.0",
44 | "mini-css-extract-plugin": "^0.7.0",
45 | "node-sass": "^4.12.0",
46 | "optimize-css-assets-webpack-plugin": "^5.0.1",
47 | "picnic": "^6.5.0",
48 | "rimraf": "^2.6.3",
49 | "sass-loader": "^7.1.0",
50 | "tar": "^4.4.10",
51 | "uglifyjs-webpack-plugin": "^2.1.3",
52 | "vue-loader": "^15.7.0",
53 | "vue-style-loader": "^4.1.2",
54 | "vue-template-compiler": "^2.6.10",
55 | "webpack": "^4.35.0",
56 | "webpack-cli": "^3.3.5",
57 | "webpack-dev-middleware": "^3.7.0",
58 | "webpack-hot-middleware": "^2.25.0"
59 | }
60 | }
61 |
--------------------------------------------------------------------------------
/appveyor.yml:
--------------------------------------------------------------------------------
1 | image: Visual Studio 2017
2 |
3 | version: 1.6.{build}
4 |
5 | install:
6 | # - ps: (new-object Net.WebClient).DownloadString("https://raw.github.com/madskristensen/ExtensionScripts/master/AppVeyor/vsix.ps1") | iex
7 |
8 | before_build:
9 | - ps: write-host Build v. $env:appveyor_build_version
10 | - nuget restore
11 | # - ps: Vsix-IncrementVsixVersion | Vsix-UpdateBuildVersion
12 |
13 | dotnet_csproj:
14 | patch: true
15 | file: '**\*.csproj'
16 | version: '{version}'
17 | package_version: '{version}'
18 | assembly_version: '{version}'
19 | file_version: '{version}'
20 | informational_version: '{version}'
21 |
22 | build_script:
23 | - msbuild /p:configuration=Release /p:DeployExtension=false /p:ZipPackageCompressionLevel=normal /v:m
24 | - ps: (Get-Content HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.nuspec).replace('{{version}}', $env:appveyor_build_version ) | Set-Content HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.nuspec
25 | - nuget pack
26 | #Nuget autopackaging can also be done cref: https://www.appveyor.com/docs/deployment/nuget/
27 |
28 | after_build:
29 | - ps: Get-ChildItem .\*.nupkg | % { Push-AppveyorArtifact $_.FullName -FileName $_.Name }
30 | - ps: Get-ChildItem .\*.nupkg | % { dotnet new -i $_.FullName }
31 | # Vuejs-Picnic
32 | - ps: mkdir demo.picnic
33 | - ps: cd demo.picnic
34 | - ps: dotnet new vuejs-picnic
35 | - npm install
36 | - ps: dotnet publish demo.picnic.csproj -c release -r win-x86 -o ./output --self-contained
37 | - ps: cd ..
38 | # Vuejs-Picnic Table (full blown)
39 | - ps: mkdir demo.picnictable
40 | - ps: cd demo.picnictable
41 | - ps: dotnet new vuejs-picnic-table
42 | - npm install
43 | - ps: dotnet publish demo.picnictable.csproj -c release -r win-x86 -o ./output --self-contained
44 |
45 | artifacts:
46 | - path: demo.picnic\output
47 | name: vuejs-picnic
48 | - path: demo.picnictable\output
49 | name: vuejs-picnictable
50 |
51 | # after_test:
52 | # - ps: Vsix-PushArtifacts | Vsix-PublishToGallery
53 | # add the nuget artifact.
54 | # - appveyor PushArtifact HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.0.9.0.nupkg
55 |
56 | # https://www.appveyor.com/docs/packaging-artifacts/
57 | #artifacts:
58 | # - path: '**\*.nupkg'
59 |
--------------------------------------------------------------------------------
/screenshot/screenshot-home-menu-collapsed.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/screenshot/screenshot-home-menu-collapsed.png
--------------------------------------------------------------------------------
/screenshot/screenshot-home-responsive-menu.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/screenshot/screenshot-home-responsive-menu.png
--------------------------------------------------------------------------------
/screenshot/screenshot-home-responsive.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/screenshot/screenshot-home-responsive.png
--------------------------------------------------------------------------------
/screenshot/screenshot-home.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/screenshot/screenshot-home.png
--------------------------------------------------------------------------------
/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.csproj:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 | 15.0
5 | $(MSBuildExtensionsPath32)\Microsoft\VisualStudio\v$(VisualStudioVersion)
6 |
7 |
8 |
9 | Debug
10 | AnyCPU
11 | 2.0
12 | {82b43b9b-a64c-4715-b499-d71e9ca2bd60};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}
13 | {0446B628-40C0-47E6-B37A-F20293A6C95D}
14 | Library
15 | Properties
16 | HoNoSoFt.DotNet.Web.Spa.ProjectTemplates
17 | HoNoSoFt.DotNet.Web.Spa.ProjectTemplates
18 | v4.6
19 | false
20 | false
21 | false
22 | false
23 | false
24 | false
25 | Program
26 | $(DevEnvDir)devenv.exe
27 | /rootsuffix Exp
28 |
29 |
30 | true
31 | full
32 | false
33 | bin\Debug\
34 | DEBUG;TRACE
35 | prompt
36 | 4
37 |
38 |
39 | pdbonly
40 | true
41 | bin\Release\
42 | TRACE
43 | prompt
44 | 4
45 |
46 |
47 |
48 |
49 |
50 |
51 | Always
52 | true
53 |
54 |
55 | Always
56 | true
57 |
58 |
59 | Designer
60 |
61 |
62 |
63 |
64 | Always
65 | true
66 |
67 |
68 | Always
69 | true
70 |
71 |
72 |
73 |
74 |
75 |
76 |
83 |
--------------------------------------------------------------------------------
/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/ProjectTemplates/CSharp/.NET Core/Web/VueJs Picnic.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/ProjectTemplates/CSharp/.NET Core/Web/VueJs Picnic.zip
--------------------------------------------------------------------------------
/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/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("HoNoSoFt.DotNet.Web.Spa.ProjectTemplate.Vsix")]
9 | [assembly: AssemblyDescription("")]
10 | [assembly: AssemblyConfiguration("")]
11 | [assembly: AssemblyCompany("HoNoSoFt")]
12 | [assembly: AssemblyProduct("HoNoSoFt.DotNet.Web.Spa.ProjectTemplate.Vsix")]
13 | [assembly: AssemblyCopyright("Nordes Menard-Lamarre")]
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 | // Version information for an assembly consists of the following four values:
23 | //
24 | // Major Version
25 | // Minor Version
26 | // Build Number
27 | // Revision
28 | //
29 | // You can specify all the values or you can default the Build and Revision Numbers
30 | // by using the '*' as shown below:
31 | // [assembly: AssemblyVersion("1.0.*")]
32 | [assembly: AssemblyVersion("1.0.0.0")]
33 | [assembly: AssemblyFileVersion("1.0.0.0")]
34 |
--------------------------------------------------------------------------------
/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/Resources/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/Resources/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates.png
--------------------------------------------------------------------------------
/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/Resources/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Nordes Ménard-Lamarre
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.
--------------------------------------------------------------------------------
/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/Resources/honosoft-128px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/Resources/honosoft-128px.png
--------------------------------------------------------------------------------
/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/Resources/logo_temp.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/Resources/logo_temp.png
--------------------------------------------------------------------------------
/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/honosoft-128px.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/Nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates/961107111f4172039cdd393ba3f61c206ab8e098/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/honosoft-128px.png
--------------------------------------------------------------------------------
/vsix/HoNoSoFt.DotNet.Web.Spa.ProjectTemplate/source.extension.vsixmanifest:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 | HoNoSoFt.DotNet.Web.Spa.ProjectTemplates
6 | Light template for ASP.NET Core 2 WebApi and Vue.js 2 Client app and Picnic CSS with webpack and hot reloading.
7 | https://github.com/nordes/HoNoSoFt.DotNet.Web.Spa.ProjectTemplates
8 | Resources\LICENSE
9 | Resources\honosoft-128px.png
10 | Resources\honosoft-128px.png
11 | Project Template, .Net Core 2.2, VueJs, Picnic CSS
12 |
13 |
14 |
15 |
16 |
17 |
18 |
19 |
20 |
21 |
22 |
23 |
24 |
25 |
26 |
--------------------------------------------------------------------------------