├── LICENSE
├── README.md
├── myshop.com
├── .gitignore
├── build.ps1
├── build.sh
├── config.toml
├── content
│ └── _index.md
├── ponzuImport.go
└── themes
│ └── beautifulhugo
│ ├── .gitattributes
│ ├── .gitignore
│ ├── LICENSE
│ ├── README.md
│ ├── archetypes
│ └── default.md
│ ├── data
│ └── beautifulhugo
│ │ └── social.toml
│ ├── exampleSite
│ ├── config.toml
│ ├── content
│ │ ├── _index.md
│ │ ├── page
│ │ │ └── about.md
│ │ └── post
│ │ │ ├── 2015-01-04-first-post.md
│ │ │ ├── 2015-01-15-pirates.md
│ │ │ ├── 2015-01-19-soccer.md
│ │ │ ├── 2015-01-27-dear-diary.md
│ │ │ ├── 2015-02-13-hamlet-monologue.md
│ │ │ ├── 2015-02-20-test-markdown.md
│ │ │ ├── 2015-02-26-flake-it-till-you-make-it.md
│ │ │ ├── 2016-03-08-code-sample.md
│ │ │ ├── 2017-03-05-math-sample.md
│ │ │ ├── 2017-03-07-bigimg-sample.md
│ │ │ └── 2017-03-20-photoswipe-gallery-sample.md
│ ├── layouts
│ │ └── partials
│ │ │ ├── footer_custom.html
│ │ │ └── head_custom.html
│ └── static
│ │ └── .gitkeep
│ ├── i18n
│ ├── br.yaml
│ ├── de.yaml
│ ├── en.yaml
│ ├── eo.yaml
│ ├── es.yaml
│ ├── fr.yaml
│ ├── it.yaml
│ ├── ja.yaml
│ ├── nb.yaml
│ ├── nl.yaml
│ ├── pl.yaml
│ ├── ru.yaml
│ └── zh.yaml
│ ├── images
│ ├── screenshot.png
│ └── tn.png
│ ├── layouts
│ ├── 404.html
│ ├── _default
│ │ ├── baseof.html
│ │ ├── list.html
│ │ ├── single.html
│ │ └── terms.html
│ ├── index.html
│ ├── partials
│ │ ├── disqus.html
│ │ ├── footer.html
│ │ ├── footer_custom.html
│ │ ├── head.html
│ │ ├── head_custom.html
│ │ ├── header.html
│ │ ├── load-photoswipe-theme.html
│ │ ├── nav.html
│ │ ├── post_meta.html
│ │ ├── share-links.html
│ │ ├── staticman-comments.html
│ │ └── translation_link.html
│ └── shortcodes
│ │ ├── figure.html
│ │ └── gallery.html
│ ├── static
│ ├── css
│ │ ├── bootstrap.min.css
│ │ ├── codeblock.css
│ │ ├── font-awesome.min.css
│ │ ├── highlight.min.css
│ │ ├── hugo-easy-gallery.css
│ │ ├── katex.min.css
│ │ ├── main-minimal.css
│ │ ├── main.css
│ │ ├── staticman.css
│ │ └── syntax.css
│ ├── img
│ │ ├── 404-southpark.jpg
│ │ ├── avatar-favicon.png
│ │ ├── avatar-icon.png
│ │ ├── favicon.ico
│ │ ├── favicon.ico.zip
│ │ ├── flood.jpg
│ │ ├── hexagon-thumb.jpg
│ │ ├── hexagon.jpg
│ │ ├── path.jpg
│ │ ├── sphere-thumb.jpg
│ │ ├── sphere.jpg
│ │ ├── triangle-thumb.jpg
│ │ └── triangle.jpg
│ └── js
│ │ ├── auto-render.min.js
│ │ ├── bootstrap.min.js
│ │ ├── highlight.min.js
│ │ ├── jquery.min.js
│ │ ├── katex.min.js
│ │ ├── load-photoswipe.js
│ │ ├── main.js
│ │ ├── photoswipe-ui-default.min.js
│ │ ├── photoswipe.min.js
│ │ ├── recaptcha.js
│ │ └── staticman.js
│ └── theme.toml
├── netlify.toml
└── ponzu
├── .gitattributes
├── .gitignore
├── CONTRIBUTING.md
├── Dockerfile
├── LICENSE
├── README.md
├── addons
├── README.md
└── github.com
│ └── bosssauce
│ └── reference
│ ├── LICENSE
│ ├── README.md
│ └── reference.go
├── cmd
└── ponzu
│ ├── LICENSE
│ ├── add.go
│ ├── build.go
│ ├── cli_test.go
│ ├── generate.go
│ ├── main.go
│ ├── new.go
│ ├── new_test.go
│ ├── options.go
│ ├── paths.go
│ ├── ponzu.json
│ ├── templates
│ ├── gen-checkbox.tmpl
│ ├── gen-content.tmpl
│ ├── gen-custom.tmpl
│ ├── gen-file-repeater.tmpl
│ ├── gen-file.tmpl
│ ├── gen-hidden.tmpl
│ ├── gen-input-repeater.tmpl
│ ├── gen-input.tmpl
│ ├── gen-reference-repeater.tmpl
│ ├── gen-reference.tmpl
│ ├── gen-richtext.tmpl
│ ├── gen-select-repeater.tmpl
│ ├── gen-select.tmpl
│ ├── gen-tags.tmpl
│ └── gen-textarea.tmpl
│ ├── upgrade.go
│ ├── usage.go
│ ├── vendor
│ ├── README.md
│ ├── github.com
│ │ ├── boltdb
│ │ │ └── bolt
│ │ │ │ ├── .gitignore
│ │ │ │ ├── LICENSE
│ │ │ │ ├── Makefile
│ │ │ │ ├── README.md
│ │ │ │ ├── appveyor.yml
│ │ │ │ ├── bolt_386.go
│ │ │ │ ├── bolt_amd64.go
│ │ │ │ ├── bolt_arm.go
│ │ │ │ ├── bolt_arm64.go
│ │ │ │ ├── bolt_linux.go
│ │ │ │ ├── bolt_openbsd.go
│ │ │ │ ├── bolt_ppc.go
│ │ │ │ ├── bolt_ppc64.go
│ │ │ │ ├── bolt_ppc64le.go
│ │ │ │ ├── bolt_s390x.go
│ │ │ │ ├── bolt_unix.go
│ │ │ │ ├── bolt_unix_solaris.go
│ │ │ │ ├── bolt_windows.go
│ │ │ │ ├── boltsync_unix.go
│ │ │ │ ├── bucket.go
│ │ │ │ ├── bucket_test.go
│ │ │ │ ├── cmd
│ │ │ │ └── bolt
│ │ │ │ │ ├── main.go
│ │ │ │ │ └── main_test.go
│ │ │ │ ├── cursor.go
│ │ │ │ ├── cursor_test.go
│ │ │ │ ├── db.go
│ │ │ │ ├── db_test.go
│ │ │ │ ├── doc.go
│ │ │ │ ├── errors.go
│ │ │ │ ├── freelist.go
│ │ │ │ ├── freelist_test.go
│ │ │ │ ├── node.go
│ │ │ │ ├── node_test.go
│ │ │ │ ├── page.go
│ │ │ │ ├── page_test.go
│ │ │ │ ├── quick_test.go
│ │ │ │ ├── simulation_test.go
│ │ │ │ ├── tx.go
│ │ │ │ └── tx_test.go
│ │ ├── bosssauce
│ │ │ └── reference
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ └── reference.go
│ │ ├── gofrs
│ │ │ └── uuid
│ │ │ │ ├── .gitignore
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── codec.go
│ │ │ │ ├── codec_test.go
│ │ │ │ ├── fuzz.go
│ │ │ │ ├── generator.go
│ │ │ │ ├── generator_test.go
│ │ │ │ ├── sql.go
│ │ │ │ ├── sql_test.go
│ │ │ │ ├── testdata
│ │ │ │ └── corpus
│ │ │ │ │ ├── 1416586f4a34d02bcb506f6107b40df512b9f2f9
│ │ │ │ │ ├── 3b46a7e7b02ec193581e6c9fa2c8a72f50a64e08-1
│ │ │ │ │ ├── 50c54bb75fcfdc488f162bf2f0c6dec6103bfa18-5
│ │ │ │ │ ├── 69c581ab749cbd56be8684d3a58ac2cfab9af0f4-5
│ │ │ │ │ ├── 752bf000e0bff06777dd0d6f0be6353844de678a-3
│ │ │ │ │ ├── a4483762d4ece8466d82cca5cacd35a0829c4e60-2
│ │ │ │ │ ├── d0952c45e0c823fc5cc12bcf7d9b877d150ab523-1
│ │ │ │ │ ├── da39a3ee5e6b4b0d3255bfef95601890afd80709
│ │ │ │ │ ├── e2b84d2065846891f18ae109b12e01d224e1c7c3-4
│ │ │ │ │ ├── e320d749435115e874f77420e17d0937e07f69f3-2
│ │ │ │ │ ├── ed132d47d757f6468443a22df8a2a965efb34098-7
│ │ │ │ │ ├── eeefb01f7bb3c627aedb292c994b20f739ffd613-6
│ │ │ │ │ ├── seed_invalid_0
│ │ │ │ │ ├── seed_invalid_1
│ │ │ │ │ ├── seed_invalid_10
│ │ │ │ │ ├── seed_invalid_11
│ │ │ │ │ ├── seed_invalid_12
│ │ │ │ │ ├── seed_invalid_13
│ │ │ │ │ ├── seed_invalid_14
│ │ │ │ │ ├── seed_invalid_15
│ │ │ │ │ ├── seed_invalid_16
│ │ │ │ │ ├── seed_invalid_17
│ │ │ │ │ ├── seed_invalid_18
│ │ │ │ │ ├── seed_invalid_19
│ │ │ │ │ ├── seed_invalid_2
│ │ │ │ │ ├── seed_invalid_20
│ │ │ │ │ ├── seed_invalid_21
│ │ │ │ │ ├── seed_invalid_22
│ │ │ │ │ ├── seed_invalid_23
│ │ │ │ │ ├── seed_invalid_3
│ │ │ │ │ ├── seed_invalid_4
│ │ │ │ │ ├── seed_invalid_5
│ │ │ │ │ ├── seed_invalid_6
│ │ │ │ │ ├── seed_invalid_7
│ │ │ │ │ ├── seed_invalid_8
│ │ │ │ │ ├── seed_invalid_9
│ │ │ │ │ ├── seed_valid_BracedCanonical
│ │ │ │ │ ├── seed_valid_BracedHashlike
│ │ │ │ │ ├── seed_valid_Canonical
│ │ │ │ │ ├── seed_valid_Hashlike
│ │ │ │ │ ├── seed_valid_URNCanonical
│ │ │ │ │ └── seed_valid_URNHashlike
│ │ │ │ ├── uuid.go
│ │ │ │ └── uuid_test.go
│ │ ├── gorilla
│ │ │ └── schema
│ │ │ │ ├── .travis.yml
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── cache.go
│ │ │ │ ├── converter.go
│ │ │ │ ├── decoder.go
│ │ │ │ ├── decoder_test.go
│ │ │ │ └── doc.go
│ │ ├── nilslice
│ │ │ ├── email
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── email.go
│ │ │ │ └── email_test.go
│ │ │ └── jwt
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── doc.go
│ │ │ │ └── jwt.go
│ │ ├── ponzu-cms
│ │ │ └── ponzu
│ │ │ │ ├── content
│ │ │ │ └── product.go
│ │ │ │ ├── management
│ │ │ │ ├── editor
│ │ │ │ │ ├── dom.go
│ │ │ │ │ ├── editor.go
│ │ │ │ │ ├── elements.go
│ │ │ │ │ ├── repeaters.go
│ │ │ │ │ └── values.go
│ │ │ │ ├── format
│ │ │ │ │ └── csv.go
│ │ │ │ └── manager
│ │ │ │ │ └── manager.go
│ │ │ │ └── system
│ │ │ │ ├── addon
│ │ │ │ ├── addon.go
│ │ │ │ ├── api.go
│ │ │ │ └── manager.go
│ │ │ │ ├── admin
│ │ │ │ ├── admin.go
│ │ │ │ ├── config
│ │ │ │ │ └── config.go
│ │ │ │ ├── export.go
│ │ │ │ ├── filesystem.go
│ │ │ │ ├── handlers.go
│ │ │ │ ├── server.go
│ │ │ │ ├── static
│ │ │ │ │ ├── common
│ │ │ │ │ │ └── js
│ │ │ │ │ │ │ ├── jquery-2.1.4.min.js
│ │ │ │ │ │ │ └── util.js
│ │ │ │ │ ├── dashboard
│ │ │ │ │ │ ├── css
│ │ │ │ │ │ │ ├── admin.css
│ │ │ │ │ │ │ ├── material-icons.css
│ │ │ │ │ │ │ └── materialize.min.css
│ │ │ │ │ │ ├── fonts
│ │ │ │ │ │ │ ├── icons-regular.woff2
│ │ │ │ │ │ │ └── roboto
│ │ │ │ │ │ │ │ ├── Roboto-Bold.eot
│ │ │ │ │ │ │ │ ├── Roboto-Bold.ttf
│ │ │ │ │ │ │ │ ├── Roboto-Bold.woff
│ │ │ │ │ │ │ │ ├── Roboto-Bold.woff2
│ │ │ │ │ │ │ │ ├── Roboto-Light.eot
│ │ │ │ │ │ │ │ ├── Roboto-Light.ttf
│ │ │ │ │ │ │ │ ├── Roboto-Light.woff
│ │ │ │ │ │ │ │ ├── Roboto-Light.woff2
│ │ │ │ │ │ │ │ ├── Roboto-Medium.eot
│ │ │ │ │ │ │ │ ├── Roboto-Medium.ttf
│ │ │ │ │ │ │ │ ├── Roboto-Medium.woff
│ │ │ │ │ │ │ │ ├── Roboto-Medium.woff2
│ │ │ │ │ │ │ │ ├── Roboto-Regular.eot
│ │ │ │ │ │ │ │ ├── Roboto-Regular.ttf
│ │ │ │ │ │ │ │ ├── Roboto-Regular.woff
│ │ │ │ │ │ │ │ ├── Roboto-Regular.woff2
│ │ │ │ │ │ │ │ ├── Roboto-Thin.eot
│ │ │ │ │ │ │ │ ├── Roboto-Thin.ttf
│ │ │ │ │ │ │ │ ├── Roboto-Thin.woff
│ │ │ │ │ │ │ │ └── Roboto-Thin.woff2
│ │ │ │ │ │ ├── img
│ │ │ │ │ │ │ └── ponzu-file.png
│ │ │ │ │ │ └── js
│ │ │ │ │ │ │ ├── chart.bundle.min.js
│ │ │ │ │ │ │ └── materialize.min.js
│ │ │ │ │ └── editor
│ │ │ │ │ │ ├── css
│ │ │ │ │ │ ├── materialNote.css
│ │ │ │ │ │ └── materialNote.css.map
│ │ │ │ │ │ ├── font
│ │ │ │ │ │ └── roboto
│ │ │ │ │ │ │ ├── Roboto-Bold.ttf
│ │ │ │ │ │ │ ├── Roboto-Bold.woff
│ │ │ │ │ │ │ ├── Roboto-Bold.woff2
│ │ │ │ │ │ │ ├── Roboto-Light.ttf
│ │ │ │ │ │ │ ├── Roboto-Light.woff
│ │ │ │ │ │ │ ├── Roboto-Light.woff2
│ │ │ │ │ │ │ ├── Roboto-Medium.ttf
│ │ │ │ │ │ │ ├── Roboto-Medium.woff
│ │ │ │ │ │ │ ├── Roboto-Medium.woff2
│ │ │ │ │ │ │ ├── Roboto-Regular.ttf
│ │ │ │ │ │ │ ├── Roboto-Regular.woff
│ │ │ │ │ │ │ ├── Roboto-Regular.woff2
│ │ │ │ │ │ │ ├── Roboto-Thin.ttf
│ │ │ │ │ │ │ ├── Roboto-Thin.woff
│ │ │ │ │ │ │ └── Roboto-Thin.woff2
│ │ │ │ │ │ ├── js
│ │ │ │ │ │ ├── ckMaterializeOverrides.js
│ │ │ │ │ │ └── materialNote.js
│ │ │ │ │ │ ├── license.txt
│ │ │ │ │ │ └── sass
│ │ │ │ │ │ ├── components
│ │ │ │ │ │ ├── _buttons.scss
│ │ │ │ │ │ ├── _cards.scss
│ │ │ │ │ │ ├── _collapsible.scss
│ │ │ │ │ │ ├── _color.scss
│ │ │ │ │ │ ├── _dropdown.scss
│ │ │ │ │ │ ├── _form.scss
│ │ │ │ │ │ ├── _global.scss
│ │ │ │ │ │ ├── _grid.scss
│ │ │ │ │ │ ├── _icons-material-design.scss
│ │ │ │ │ │ ├── _materialbox.scss
│ │ │ │ │ │ ├── _mixins.scss
│ │ │ │ │ │ ├── _modal.scss
│ │ │ │ │ │ ├── _navbar.scss
│ │ │ │ │ │ ├── _normalize.scss
│ │ │ │ │ │ ├── _prefixer.scss
│ │ │ │ │ │ ├── _preloader.scss
│ │ │ │ │ │ ├── _roboto.scss
│ │ │ │ │ │ ├── _sideNav.scss
│ │ │ │ │ │ ├── _slider.scss
│ │ │ │ │ │ ├── _table_of_contents.scss
│ │ │ │ │ │ ├── _tabs.scss
│ │ │ │ │ │ ├── _toast.scss
│ │ │ │ │ │ ├── _tooltip.scss
│ │ │ │ │ │ ├── _typography.scss
│ │ │ │ │ │ ├── _variables.scss
│ │ │ │ │ │ ├── _waves.scss
│ │ │ │ │ │ └── date_picker
│ │ │ │ │ │ │ ├── _default.date.scss
│ │ │ │ │ │ │ ├── _default.scss
│ │ │ │ │ │ │ └── _default.time.scss
│ │ │ │ │ │ ├── materialNote.scss
│ │ │ │ │ │ └── materialize.scss
│ │ │ │ ├── upload
│ │ │ │ │ ├── backup.go
│ │ │ │ │ └── upload.go
│ │ │ │ └── user
│ │ │ │ │ └── auth.go
│ │ │ │ ├── api
│ │ │ │ ├── analytics
│ │ │ │ │ ├── backup.go
│ │ │ │ │ ├── batch.go
│ │ │ │ │ └── init.go
│ │ │ │ ├── cors.go
│ │ │ │ ├── create.go
│ │ │ │ ├── delete.go
│ │ │ │ ├── gzip.go
│ │ │ │ ├── handlers.go
│ │ │ │ ├── hide.go
│ │ │ │ ├── json.go
│ │ │ │ ├── omit.go
│ │ │ │ ├── push.go
│ │ │ │ ├── record.go
│ │ │ │ ├── search.go
│ │ │ │ ├── server.go
│ │ │ │ └── update.go
│ │ │ │ ├── backup
│ │ │ │ └── archive.go
│ │ │ │ ├── db
│ │ │ │ ├── addon.go
│ │ │ │ ├── backup.go
│ │ │ │ ├── cache.go
│ │ │ │ ├── config.go
│ │ │ │ ├── content.go
│ │ │ │ ├── index.go
│ │ │ │ ├── init.go
│ │ │ │ ├── upload.go
│ │ │ │ └── user.go
│ │ │ │ ├── item
│ │ │ │ ├── item.go
│ │ │ │ ├── types.go
│ │ │ │ └── upload.go
│ │ │ │ ├── search
│ │ │ │ ├── backup.go
│ │ │ │ └── search.go
│ │ │ │ ├── system.go
│ │ │ │ └── tls
│ │ │ │ ├── devcerts.go
│ │ │ │ ├── enable.go
│ │ │ │ └── enabledev.go
│ │ ├── spf13
│ │ │ ├── cobra
│ │ │ │ ├── .mailmap
│ │ │ │ ├── LICENSE.txt
│ │ │ │ ├── README.md
│ │ │ │ ├── cobra.go
│ │ │ │ ├── cobra_test.go
│ │ │ │ ├── command.go
│ │ │ │ ├── command_notwin.go
│ │ │ │ ├── command_test.go
│ │ │ │ └── command_win.go
│ │ │ └── pflag
│ │ │ │ ├── LICENSE
│ │ │ │ ├── README.md
│ │ │ │ ├── bool.go
│ │ │ │ ├── bool_slice.go
│ │ │ │ ├── bool_slice_test.go
│ │ │ │ ├── bool_test.go
│ │ │ │ ├── count.go
│ │ │ │ ├── count_test.go
│ │ │ │ ├── duration.go
│ │ │ │ ├── example_test.go
│ │ │ │ ├── export_test.go
│ │ │ │ ├── flag.go
│ │ │ │ ├── flag_test.go
│ │ │ │ ├── float32.go
│ │ │ │ ├── float64.go
│ │ │ │ ├── golangflag.go
│ │ │ │ ├── golangflag_test.go
│ │ │ │ ├── int.go
│ │ │ │ ├── int32.go
│ │ │ │ ├── int64.go
│ │ │ │ ├── int8.go
│ │ │ │ ├── int_slice.go
│ │ │ │ ├── int_slice_test.go
│ │ │ │ ├── ip.go
│ │ │ │ ├── ip_slice.go
│ │ │ │ ├── ip_slice_test.go
│ │ │ │ ├── ip_test.go
│ │ │ │ ├── ipmask.go
│ │ │ │ ├── ipnet.go
│ │ │ │ ├── ipnet_test.go
│ │ │ │ ├── string.go
│ │ │ │ ├── string_array.go
│ │ │ │ ├── string_array_test.go
│ │ │ │ ├── string_slice.go
│ │ │ │ ├── string_slice_test.go
│ │ │ │ ├── uint.go
│ │ │ │ ├── uint16.go
│ │ │ │ ├── uint32.go
│ │ │ │ ├── uint64.go
│ │ │ │ ├── uint8.go
│ │ │ │ ├── uint_slice.go
│ │ │ │ └── uint_slice_test.go
│ │ └── tidwall
│ │ │ ├── gjson
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── gjson.go
│ │ │ └── logo.png
│ │ │ └── sjson
│ │ │ ├── .travis.yml
│ │ │ ├── LICENSE
│ │ │ ├── README.md
│ │ │ ├── logo.png
│ │ │ └── sjson.go
│ └── golang.org
│ │ └── x
│ │ ├── crypto
│ │ ├── autocert
│ │ │ ├── autocert.go
│ │ │ ├── autocert_test.go
│ │ │ ├── cache.go
│ │ │ ├── cache_test.go
│ │ │ ├── example_test.go
│ │ │ ├── listener.go
│ │ │ ├── renewal.go
│ │ │ └── renewal_test.go
│ │ └── bcrypt
│ │ │ ├── base64.go
│ │ │ ├── bcrypt.go
│ │ │ └── bcrypt_test.go
│ │ ├── net
│ │ └── context
│ │ │ ├── context.go
│ │ │ ├── context_test.go
│ │ │ ├── ctxhttp
│ │ │ ├── ctxhttp.go
│ │ │ ├── ctxhttp_17_test.go
│ │ │ ├── ctxhttp_pre17.go
│ │ │ ├── ctxhttp_pre17_test.go
│ │ │ └── ctxhttp_test.go
│ │ │ ├── go17.go
│ │ │ ├── pre_go17.go
│ │ │ └── withtimeout_test.go
│ │ └── text
│ │ ├── transform
│ │ ├── examples_test.go
│ │ ├── transform.go
│ │ └── transform_test.go
│ │ └── unicode
│ │ └── norm
│ │ ├── composition.go
│ │ ├── composition_test.go
│ │ ├── example_iter_test.go
│ │ ├── example_test.go
│ │ ├── forminfo.go
│ │ ├── forminfo_test.go
│ │ ├── input.go
│ │ ├── iter.go
│ │ ├── iter_test.go
│ │ ├── maketables.go
│ │ ├── norm_test.go
│ │ ├── normalize.go
│ │ ├── normalize_test.go
│ │ ├── readwriter.go
│ │ ├── readwriter_test.go
│ │ ├── tables.go
│ │ ├── transform.go
│ │ ├── transform_test.go
│ │ ├── trie.go
│ │ ├── triegen.go
│ │ └── ucd_test.go
│ └── version.go
├── content
└── product.go
├── deployment
├── README.md
└── sysv
│ └── ponzu-server
├── docs
├── .gitignore
├── LICENSE
├── README.md
├── build
│ ├── 404.html
│ ├── CLI
│ │ ├── General-Usage
│ │ │ └── index.html
│ │ └── Generating-References
│ │ │ └── index.html
│ ├── Content
│ │ ├── An-Overview
│ │ │ └── index.html
│ │ └── Extending-Content
│ │ │ └── index.html
│ ├── Form-Fields
│ │ └── HTML-Inputs
│ │ │ └── index.html
│ ├── HTTP-APIs
│ │ ├── Content
│ │ │ └── index.html
│ │ ├── File-Metadata
│ │ │ └── index.html
│ │ └── Search
│ │ │ └── index.html
│ ├── Interfaces
│ │ ├── API
│ │ │ └── index.html
│ │ ├── Editor
│ │ │ └── index.html
│ │ ├── Format
│ │ │ └── index.html
│ │ ├── Item
│ │ │ └── index.html
│ │ └── Search
│ │ │ └── index.html
│ ├── Ponzu-Addons
│ │ ├── Creating-Addons
│ │ │ └── index.html
│ │ └── Using-Addons
│ │ │ └── index.html
│ ├── Quickstart
│ │ └── Overview
│ │ │ └── index.html
│ ├── References
│ │ └── Overview
│ │ │ └── index.html
│ ├── Running-Backups
│ │ └── Backups
│ │ │ └── index.html
│ ├── System-Configuration
│ │ └── Settings
│ │ │ └── index.html
│ ├── System-Deployment
│ │ ├── Docker
│ │ │ └── index.html
│ │ └── SysV-Style
│ │ │ └── index.html
│ ├── assets
│ │ ├── images
│ │ │ ├── favicon.ico
│ │ │ └── icons
│ │ │ │ ├── bitbucket-670608a71a.svg
│ │ │ │ ├── github-1da075986e.svg
│ │ │ │ └── gitlab-5ad3f9f9e5.svg
│ │ ├── javascripts
│ │ │ ├── application-6b599127bc.js
│ │ │ └── modernizr-56ade86843.js
│ │ └── stylesheets
│ │ │ ├── application-4d0d3f2fbf.css
│ │ │ └── application-f78e5cb881.palette.css
│ ├── images
│ │ ├── editor-checkbox.png
│ │ ├── editor-file-repeater.png
│ │ ├── editor-file.png
│ │ ├── editor-input-repeater.png
│ │ ├── editor-input.png
│ │ ├── editor-richtext.png
│ │ ├── editor-select-repeater.png
│ │ ├── editor-select.png
│ │ ├── editor-tags.png
│ │ ├── editor-textarea.png
│ │ ├── logo.png
│ │ └── ponzu-banner.png
│ ├── index.html
│ ├── mkdocs
│ │ ├── js
│ │ │ ├── lunr.min.js
│ │ │ ├── mustache.min.js
│ │ │ ├── require.js
│ │ │ ├── search-results-template.mustache
│ │ │ ├── search.js
│ │ │ └── text.js
│ │ └── search_index.json
│ └── sitemap.xml
├── mkdocs.yml
└── src
│ ├── CLI
│ ├── General-Usage.md
│ └── Generating-References.md
│ ├── Content
│ ├── An-Overview.md
│ └── Extending-Content.md
│ ├── Form-Fields
│ └── HTML-Inputs.md
│ ├── HTTP-APIs
│ ├── Content.md
│ ├── File-Metadata.md
│ └── Search.md
│ ├── Interfaces
│ ├── API.md
│ ├── Editor.md
│ ├── Format.md
│ ├── Item.md
│ └── Search.md
│ ├── Ponzu-Addons
│ ├── Creating-Addons.md
│ └── Using-Addons.md
│ ├── Quickstart
│ └── Overview.md
│ ├── References
│ └── Overview.md
│ ├── Running-Backups
│ └── Backups.md
│ ├── System-Configuration
│ └── Settings.md
│ ├── System-Deployment
│ ├── Docker.md
│ └── SysV-Style.md
│ ├── images
│ ├── editor-checkbox.png
│ ├── editor-file-repeater.png
│ ├── editor-file.png
│ ├── editor-input-repeater.png
│ ├── editor-input.png
│ ├── editor-richtext.png
│ ├── editor-select-repeater.png
│ ├── editor-select.png
│ ├── editor-tags.png
│ ├── editor-textarea.png
│ ├── logo.png
│ └── ponzu-banner.png
│ └── index.md
├── examples
├── LICENSE
├── README.md
├── createable
│ ├── README.md
│ └── content
│ │ └── song.go
├── deleteable
│ ├── README.md
│ └── content
│ │ └── song.go
└── updateable
│ ├── README.md
│ └── content
│ └── song.go
└── ponzu-banner.png
/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2018 Snipcart
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # A Guide to Golang E-Commerce (w/ Go-Powered CMS Tutorial)
2 |
3 | 
4 |
5 | Let's explore the Golang ecosystem and the e-commerce possibilities it offers.
6 |
7 | I'll then show you how to craft your own Go-powered online shop with the help of Ponzu CMS.
8 |
9 | Steps:
10 |
11 | - Setting up Ponzu CMS.
12 | - Creating the store frontend with a Go static site generator.
13 | - Deploying the website to Netlify.
14 | - Enabling e-commerce capabilities with Snipcart.
15 |
16 | Let's first take a step back and immerse ourselves in the Golang universe.
17 |
18 | > Read full tutorial [here](https://snipcart.com/blog/golang-ecommerce-ponzu-cms-demo)
19 |
20 | > See live demo [here](https://snipcart-ponzu-hugo.netlify.com/)
21 |
22 | Enjoy folks!
23 |
--------------------------------------------------------------------------------
/myshop.com/.gitignore:
--------------------------------------------------------------------------------
1 | content/product
2 | public
3 | ponzuImport.exe
4 | ponzuImport
--------------------------------------------------------------------------------
/myshop.com/build.ps1:
--------------------------------------------------------------------------------
1 | go build -o .\ponzuImport.exe .\ponzuImport.go
2 |
3 | .\ponzuImport.exe
4 |
5 | hugo
6 |
--------------------------------------------------------------------------------
/myshop.com/build.sh:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env bash
2 |
3 | go build -o ./ponzuImport ./ponzuImport.go
4 |
5 | ./ponzuImport
6 |
7 | hugo
8 |
--------------------------------------------------------------------------------
/myshop.com/config.toml:
--------------------------------------------------------------------------------
1 | baseurl = "https://snipcart-ponzu-hugo.netlify.com/"
2 | DefaultContentLanguage = "en"
3 | title = "Global Flooding Rescue Store"
4 | theme = "beautifulhugo"
5 | metaDataFormat = "yaml"
6 | pygmentsStyle = "trac"
7 | pygmentsUseClasses = false
8 | pygmentsCodeFences = false
9 | pygmentsCodefencesGuessSyntax = false
10 |
11 | [Params]
12 | subtitle = "Prepare to deal with the tide!"
13 | logo = "img/flood.jpg"
14 | favicon = "img/favicon.ico"
15 | dateFormat = "January 2, 2006"
16 | commit = false
17 | rss = false
18 | comments = false
19 | readingTime = false
20 | useHLJS = false
21 | socialShare = false
22 | snipcartAPIKey = "Njk5ZjgzOWYtOGYyOS00ZmM0LTlkODItNGMxMjk4YWRiYTgwNjM2NzE2NzkyNTU0MTg4NDUw"
23 |
24 | [Author]
25 | name = "Snipcart"
26 | website = "https://snipcart.com"
27 | email = "geeks+ponzu@snipcart.com"
28 | facebook = "snipcart"
29 | github = "snipcart/snipcart-ponzu"
30 | twitter = "snipcart"
31 |
--------------------------------------------------------------------------------
/myshop.com/content/_index.md:
--------------------------------------------------------------------------------
1 | Sea level [is rising](https://ocean.si.edu/through-time/ancient-seas/sea-level-rise), and a rise of a few meters only [could get some people's feet wet](http://flood.firetree.net/?ll=45.3412,12.9813&zoom=10&m=1). Better be prepared!
2 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/.gitattributes:
--------------------------------------------------------------------------------
1 | # Auto detect text files and perform LF normalization
2 | * text=auto
3 |
4 | # Custom for Visual Studio
5 | *.cs diff=csharp
6 |
7 | # Standard to msysgit
8 | *.doc diff=astextplain
9 | *.DOC diff=astextplain
10 | *.docx diff=astextplain
11 | *.DOCX diff=astextplain
12 | *.dot diff=astextplain
13 | *.DOT diff=astextplain
14 | *.pdf diff=astextplain
15 | *.PDF diff=astextplain
16 | *.rtf diff=astextplain
17 | *.RTF diff=astextplain
18 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/.gitignore:
--------------------------------------------------------------------------------
1 | # Themes directory of example site; ignored so that we can clone the repo
2 | # inside the themes directory and test the example site with "hugo server".
3 | exampleSite/themes/
4 |
5 | # Windows image file caches
6 | Thumbs.db
7 | ehthumbs.db
8 |
9 | # Folder config file
10 | Desktop.ini
11 |
12 | # Recycle Bin used on file shares
13 | $RECYCLE.BIN/
14 |
15 | # Windows Installer files
16 | *.cab
17 | *.msi
18 | *.msm
19 | *.msp
20 |
21 | # Windows shortcuts
22 | *.lnk
23 |
24 | # Vim swap files
25 | *.swp
26 |
27 | # =========================
28 | # Operating System Files
29 | # =========================
30 |
31 | # OSX
32 | # =========================
33 |
34 | .DS_Store
35 | .AppleDouble
36 | .LSOverride
37 |
38 | # Thumbnails
39 | ._*
40 |
41 | # Files that might appear on external disk
42 | .Spotlight-V100
43 | .Trashes
44 |
45 | # Directories potentially created on remote AFP share
46 | .AppleDB
47 | .AppleDesktop
48 | Network Trash Folder
49 | Temporary Items
50 | .apdisk
51 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Original work Copyright (c) 2015 Dean Attali
4 | Modified work Copyright (c) 2017 Michael Romero
5 |
6 | Permission is hereby granted, free of charge, to any person obtaining a copy
7 | of this software and associated documentation files (the "Software"), to deal
8 | in the Software without restriction, including without limitation the rights
9 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 | copies of the Software, and to permit persons to whom the Software is
11 | furnished to do so, subject to the following conditions:
12 |
13 | The above copyright notice and this permission notice shall be included in all
14 | copies or substantial portions of the Software.
15 |
16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
22 | SOFTWARE.
23 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/archetypes/default.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: "{{ replace .TranslationBaseName "-" " " | name }}"
3 | date: {{ .Date }}
4 | subtitle: ""
5 | tags: []
6 | ---
7 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/_index.md:
--------------------------------------------------------------------------------
1 | ## Front Page Content
2 | `beautifulhugo` supports content on your front page. Edit `/content/_index.md` to change what appears here. Delete `/content/_index.md` if you don't want any content here.
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/page/about.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: About me
3 | subtitle: Why you'd want to go on a date with me
4 | comments: false
5 | ---
6 |
7 | My name is Inigo Montoya. I have the following qualities:
8 |
9 | - I rock a great mustache
10 | - I'm extremely loyal to my family
11 |
12 | What else do you need?
13 |
14 | ### my history
15 |
16 | To be honest, I'm having some trouble remembering right now, so why don't you just watch [my movie](http://en.wikipedia.org/wiki/The_Princess_Bride_%28film%29) and it will answer **all** your questions.
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/post/2015-01-04-first-post.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: First post!
3 | date: 2015-01-05
4 | ---
5 |
6 | This is my first post, how exciting!
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/post/2015-01-15-pirates.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Pirates arrrr
3 | date: 2015-01-15
4 | ---
5 |
6 | Piracy is typically an act of robbery or criminal violence at sea. The term can include acts committed on land, in the air, or in other major bodies of water or on a shore. It does not normally include crimes committed against persons traveling on the same vessel as the perpetrator (e.g. one passenger stealing from others on the same vessel). The term has been used throughout history to refer to raids across land borders by non-state agents.
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/post/2015-01-19-soccer.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Soccer
3 | subtitle: Best sport ever!
4 | date: 2015-01-19
5 | ---
6 |
7 | From Wikipedia:
8 |
9 | Association football, more commonly known as football or soccer,[2] is a sport played between two teams of eleven players with a spherical ball. It is played by 250 million players in over 200 countries, making it the world's most popular sport.[3][4][5][6] The game is played on a rectangular field with a goal at each end. The object of the game is to score by getting the ball into the opposing goal.
10 |
11 | The goalkeepers are the only players allowed to touch the ball with their hands or arms while it is in play and then only in their penalty area. Outfield players mostly use their feet to strike or pass the ball, but may use their head or torso to strike the ball instead. The team that scores the most goals by the end of the match wins. If the score is level at the end of the game, either a draw is declared or the game goes into extra time and/or a penalty shootout depending on the format of the competition. The Laws of the Game were originally codified in England by The Football Association in 1863. Association football is governed internationally by the International Federation of Association Football (FIFA; French: Fédération Internationale de Football Association) which organises a World Cup every four years.[7]
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/post/2015-01-27-dear-diary.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Dear diary
3 | date: 2015-01-27
4 | ---
5 |
6 | What is it with that Mary girl? Dragging me to school every day. As if I had a choice. What you don't hear in those nursery rhymes is that she starves me if I don't go to school with her; it's the only way I can stay alive! I'm thinking about being adopted by Little Bo Peep, sure I may get lost, but anything is better than being with Mary and those little brats at school (shudder, shudder).
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/post/2015-02-13-hamlet-monologue.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: To be
3 | subtitle: ... or not to be?
4 | date: 2015-02-13
5 | ---
6 |
7 | To be, or not to be--that is the question:
8 | Whether 'tis nobler in the mind to suffer
9 | The slings and arrows of outrageous fortune
10 | Or to take arms against a sea of troubles
11 | And by opposing end them. To die, to sleep--
12 | No more--and by a sleep to say we end
13 | The heartache, and the thousand natural shocks
14 | That flesh is heir to. 'Tis a consummation
15 | Devoutly to be wished. To die, to sleep--
16 | To sleep--perchance to dream: ay, there's the rub,
17 | For in that sleep of death what dreams may come
18 | When we have shuffled off this mortal coil,
19 | Must give us pause. There's the respect
20 | That makes calamity of so long life.
21 | For who would bear the whips and scorns of time,
22 | Th' oppressor's wrong, the proud man's contumely
23 | The pangs of despised love, the law's delay,
24 | The insolence of office, and the spurns
25 | That patient merit of th' unworthy takes,
26 | When he himself might his quietus make
27 | With a bare bodkin? Who would fardels bear,
28 | To grunt and sweat under a weary life,
29 | But that the dread of something after death,
30 | The undiscovered country, from whose bourn
31 | No traveller returns, puzzles the will,
32 | And makes us rather bear those ills we have
33 | Than fly to others that we know not of?
34 | Thus conscience does make cowards of us all,
35 | And thus the native hue of resolution
36 | Is sicklied o'er with the pale cast of thought,
37 | And enterprise of great pitch and moment
38 | With this regard their currents turn awry
39 | And lose the name of action. -- Soft you now,
40 | The fair Ophelia! -- Nymph, in thy orisons
41 | Be all my sins remembered.
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/post/2015-02-20-test-markdown.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Test markdown
3 | subtitle: Each post also has a subtitle
4 | date: 2015-02-20
5 | tags: ["example", "markdown"]
6 | ---
7 |
8 | You can write regular [markdown](http://markdowntutorial.com/) here and Jekyll will automatically convert it to a nice webpage. I strongly encourage you to [take 5 minutes to learn how to write in markdown](http://markdowntutorial.com/) - it'll teach you how to transform regular text into bold/italics/headings/tables/etc.
9 |
10 | **Here is some bold text**
11 |
12 | ## Here is a secondary heading
13 |
14 | Here's a useless table:
15 |
16 | | Number | Next number | Previous number |
17 | | :------ |:--- | :--- |
18 | | Five | Six | Four |
19 | | Ten | Eleven | Nine |
20 | | Seven | Eight | Six |
21 | | Two | Three | One |
22 |
23 |
24 | How about a yummy crepe?
25 |
26 | 
27 |
28 | Here's a code chunk with syntax highlighting:
29 |
30 | ```javascript
31 | var foo = function(x) {
32 | return(x + 5);
33 | }
34 | foo(3)
35 | ```
36 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/post/2016-03-08-code-sample.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Code Sample
3 | subtitle: Using Hugo or Pygments
4 | date: 2016-03-08
5 | tags: ["example", "code"]
6 | ---
7 |
8 | The following are two code samples using syntax highlighting.
9 |
10 |
11 |
12 | The following is a code sample using triple backticks ( ``` ) code fencing provided in Hugo. This is client side highlighting and does not require any special installation.
13 |
14 | ```javascript
15 | var num1, num2, sum
16 | num1 = prompt("Enter first number")
17 | num2 = prompt("Enter second number")
18 | sum = parseInt(num1) + parseInt(num2) // "+" means "add"
19 | alert("Sum = " + sum) // "+" means combine into a string
20 | ```
21 |
22 |
23 | The following is a code sample using the "highlight" shortcode provided in Hugo. This is server side highlighting and requires Python and Pygments to be installed.
24 |
25 | {{< highlight javascript >}}
26 | var num1, num2, sum
27 | num1 = prompt("Enter first number")
28 | num2 = prompt("Enter second number")
29 | sum = parseInt(num1) + parseInt(num2) // "+" means "add"
30 | alert("Sum = " + sum) // "+" means combine into a string
31 | {{ highlight >}}
32 |
33 |
34 | And here is the same code with line numbers:
35 |
36 | {{< highlight javascript "linenos=inline">}}
37 | var num1, num2, sum
38 | num1 = prompt("Enter first number")
39 | num2 = prompt("Enter second number")
40 | sum = parseInt(num1) + parseInt(num2) // "+" means "add"
41 | alert("Sum = " + sum) // "+" means combine into a string
42 | {{ highlight >}}
43 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/post/2017-03-05-math-sample.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Math Sample
3 | subtitle: Using KaTeX
4 | date: 2017-03-05
5 | tags: ["example", "math"]
6 | ---
7 |
8 | KaTeX can be used to generate complex math formulas server-side.
9 |
10 | $$
11 | \phi = \frac{(1+\sqrt{5})}{2} = 1.6180339887\cdots
12 | $$
13 |
14 | Additional details can be found on [GitHub](https://github.com/Khan/KaTeX) or on the [Wiki](http://tiddlywiki.com/plugins/tiddlywiki/katex/).
15 |
16 |
17 | ### Example 1
18 |
19 | If the text between $$ contains newlines it will rendered in display mode:
20 | ```
21 | $$
22 | f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
23 | $$
24 | ```
25 | $$
26 | f(x) = \int_{-\infty}^\infty\hat f(\xi)\,e^{2 \pi i \xi x}\,d\xi
27 | $$
28 |
29 |
30 | ### Example 2
31 | ```
32 | $$
33 | \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }
34 | $$
35 | ```
36 | $$
37 | \frac{1}{\Bigl(\sqrt{\phi \sqrt{5}}-\phi\Bigr) e^{\frac25 \pi}} = 1+\frac{e^{-2\pi}} {1+\frac{e^{-4\pi}} {1+\frac{e^{-6\pi}} {1+\frac{e^{-8\pi}} {1+\cdots} } } }
38 | $$
39 |
40 |
41 | ### Example 3
42 | ```
43 | $$
44 | 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1.
45 | $$
46 | ```
47 | $$
48 | 1 + \frac{q^2}{(1-q)}+\frac{q^6}{(1-q)(1-q^2)}+\cdots = \prod_{j=0}^{\infty}\frac{1}{(1-q^{5j+2})(1-q^{5j+3})}, \quad\quad \text{for }\lvert q\rvert<1.
49 | $$
50 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/content/post/2017-03-07-bigimg-sample.md:
--------------------------------------------------------------------------------
1 | ---
2 | title: Big Image Sample
3 | subtitle: Using Multiple Images
4 | date: 2017-03-07
5 | tags: ["example", "bigimg"]
6 | bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}, {src: "/img/sphere.jpg", desc: "Sphere"}, {src: "/img/hexagon.jpg", desc: "Hexagon"}]
7 | ---
8 |
9 | The image banners at the top of the page are refered to as "bigimg" in this theme. They are optional, and one more more can be specified. If more than one is specified, the images rotate every 10 seconds. In the front matter, bigimgs are specified using an array of hashes.
10 |
11 |
12 |
13 | A single bigimg can be specified in the front matter by the following YAML:
14 | ```
15 | bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"}]
16 | ```
17 |
18 | Multiple bigimgs can be specified in the front matter by the following YAML:
19 | ```
20 | bigimg: [{src: "/img/triangle.jpg", desc: "Triangle"},
21 | {src: "/img/sphere.jpg", desc: "Sphere"},
22 | {src: "/img/hexagon.jpg", desc: "Hexagon"}]
23 | ```
24 |
25 | Also note that the description field is optional, and images could instead be specified by:
26 | ```
27 | bigimg: [{src: "/img/triangle.jpg"},
28 | {src: "/img/sphere.jpg"},
29 | {src: "/img/hexagon.jpg"}]
30 | ```
31 |
32 | The above YAML array of hashes were written in "flow" style. However when generating a new page or post with `hugo new post/mypost.md`, hugo may interpret the archetype for bigimg in the default YAML style. Defining multiple bigimg's complete with descriptions in this style would be specified by:
33 | ```
34 | bigimg:
35 | - {src: "/img/triangle.jpg", desc: "Triangle"}
36 | - {src: "/img/sphere.jpg", desc: "Sphere"}
37 | - {src: "/img/hexagon.jpg", desc: "Hexagon"}
38 | ```
39 |
40 | Additional information can be found [in this YAML tutorial](https://rhnh.net/2011/01/31/yaml-tutorial/).
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/layouts/partials/footer_custom.html:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/layouts/partials/head_custom.html:
--------------------------------------------------------------------------------
1 |
5 |
16 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/exampleSite/static/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/exampleSite/static/.gitkeep
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/i18n/br.yaml:
--------------------------------------------------------------------------------
1 | # Content
2 | - id: dateFormat
3 | translation: "2 de Janeiro de 2006"
4 | - id: shortdateFormat
5 | translation: "02/Jan/2006 15:04:05"
6 | - id: postedOnDate
7 | translation: "Postado em {{ .Count }}"
8 | - id: lastModified
9 | translation: "(Ultima modificação em {{ .Count }})"
10 | - id: translationsLabel
11 | translation: "Outras linguagens: "
12 | - id: translationsSeparator
13 | translation: ", "
14 | - id: readMore
15 | translation: "Saiba mais"
16 | - id: olderPosts
17 | translation: "Posts antigos"
18 | - id: newerPosts
19 | translation: "Posts novos"
20 | - id: previousPost
21 | translation: "Post anterior"
22 | - id: nextPost
23 | translation: "Próximo Post"
24 | - id: readTime
25 | translation: "minutos"
26 | - id: words
27 | translation: "palavras"
28 |
29 |
30 | # 404 page
31 | - id: pageNotFound
32 | translation: "Opa, a página não existe"
33 |
34 | # Footer
35 | - id: poweredBy # Accepts HTML
36 | translation: 'Hugo v{{ .Hugo.Version }} powered • Tema por Beautiful Jekyll adaptado para Beautiful Hugo '
37 |
38 | # Navigation
39 | - id: toggleNavigation
40 | translation: "Ver navegação"
41 | - id: languageSwitcherLabel
42 | translation: "Idioma"
43 | - id: gcseLabelShort
44 | translation: "Buscar"
45 | - id: gcseLabelLong
46 | translation: "Buscar {{ .Site.Title }}"
47 | - id: gcseClose
48 | translation: "Fechar"
49 |
50 | # Staticman
51 | - id: noComment
52 | translation: "Sem comentários"
53 | - id: oneComment
54 | translation: "comentário"
55 | - id: moreComment
56 | translation: "comentários"
57 | - id: useMarkdown
58 | translation: "Você pode usar sintaxe MarkDown"
59 | - id: yourName
60 | translation: "Seu nome"
61 | - id: yourEmail
62 | translation: "Seu email"
63 | - id: yourWebsite
64 | translation: "Seu website"
65 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/i18n/de.yaml:
--------------------------------------------------------------------------------
1 | # Content
2 | - id: dateFormat
3 | translation: "02.01.2006"
4 | - id: shortdateFormat
5 | translation: "2 Jan, 2006 15:04:05"
6 | - id: postedOnDate
7 | translation: "Gepostet am {{ .Count }}"
8 | - id: lastModified
9 | translation: "(Zuletzt geändert am {{ .Count }})"
10 | - id: translationsLabel
11 | translation: "Andere Sprachen: "
12 | - id: translationsSeparator
13 | translation: ", "
14 | - id: readMore
15 | translation: "Mehr"
16 | - id: olderPosts
17 | translation: "Ältere Posts"
18 | - id: newerPosts
19 | translation: "Neuere Posts"
20 | - id: previousPost
21 | translation: "Letzter Post"
22 | - id: nextPost
23 | translation: "Nächster Post"
24 | - id: readTime
25 | translation: "Minuten"
26 | - id: words
27 | translation: "Wörter"
28 |
29 |
30 | # 404 page
31 | - id: pageNotFound
32 | translation: "Ups, diese Seite existiert nicht. (404 Error)"
33 |
34 | # Footer
35 | - id: poweredBy # Accepts HTML
36 | translation: 'Hugo v{{ .Hugo.Version }} powered • Theme by Beautiful Jekyll adapted to Beautiful Hugo '
37 |
38 | # Navigation
39 | - id: toggleNavigation
40 | translation: "Navigation"
41 | - id: languageSwitcherLabel
42 | translation: "Sprache"
43 | - id: gcseLabelShort
44 | translation: "Suche"
45 | - id: gcseLabelLong
46 | translation: "Suche {{ .Site.Title }}"
47 | - id: gcseClose
48 | translation: "Schließen"
49 |
50 | # Staticman
51 | - id: noComment
52 | translation: "No comment"
53 | - id: oneComment
54 | translation: "comment"
55 | - id: moreComment
56 | translation: "comments"
57 | - id: useMarkdown
58 | translation: "You can use Markdown syntax"
59 | - id: yourName
60 | translation: "Your name"
61 | - id: yourEmail
62 | translation: "Your email address"
63 | - id: yourWebsite
64 | translation: "You website"
65 |
66 |
67 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/i18n/eo.yaml:
--------------------------------------------------------------------------------
1 | # Content
2 | - id: dateFormat
3 | translation: "2006-01-02"
4 | - id: shortdateFormat
5 | translation: "2 Jan, 2006 15:04:05"
6 | - id: postedOnDate
7 | translation: "Afiŝiĝis je {{ .Count }}"
8 | - id: lastModified
9 | translation: "(Laste aliiĝis je {{ .Count }})"
10 | - id: translationsLabel
11 | translation: "Aliaj lingvoj: "
12 | - id: translationsSeparator
13 | translation: ", "
14 | - id: readMore
15 | translation: "Legi pli"
16 | - id: olderPosts
17 | translation: "Plimalnovaj afiŝoj"
18 | - id: newerPosts
19 | translation: "Plinovaj afiŝoj"
20 | - id: previousPost
21 | translation: "Antaŭa afiŝo"
22 | - id: nextPost
23 | translation: "Sekva afiŝo"
24 | - id: readTime
25 | translation: "minutoj"
26 | - id: words
27 | translation: "vortoj"
28 |
29 |
30 | # 404 page
31 | - id: pageNotFound
32 | translation: "Ups, ĉi tiu paĝo ne ekzistas. (404 Error)"
33 |
34 | # Footer
35 | - id: poweredBy # Accepts HTML
36 | translation: 'Hugo v{{ .Hugo.Version }} -povigita • Haŭto de Beautiful Jekyll adaptiĝis al Beautiful Hugo '
37 |
38 | # Navigation
39 | - id: toggleNavigation
40 | translation: "Navigacio"
41 | - id: languageSwitcherLabel
42 | translation: "Lingvo"
43 | - id: gcseLabelShort
44 | translation: "Serĉi"
45 | - id: gcseLabelLong
46 | translation: "Serĉi {{ .Site.Title }}"
47 | - id: gcseClose
48 | translation: "Fermi"
49 |
50 | # Staticman
51 | - id: noComment
52 | translation: "Sen komentoj"
53 | - id: oneComment
54 | translation: "komento"
55 | - id: moreComment
56 | translation: "komentoj"
57 | - id: useMarkdown
58 | translation: "Vi povus uzi Markdown-sintakson"
59 | - id: yourName
60 | translation: "Via nomo"
61 | - id: yourEmail
62 | translation: "Via retpoŝtadreso"
63 | - id: yourWebsite
64 | translation: "Via retpaĝaro"
65 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/i18n/ja.yaml:
--------------------------------------------------------------------------------
1 | # Content
2 | - id: dateFormat
3 | translation: "2006年1月2日"
4 | - id: shortdateFormat
5 | translation: "2 Jan, 2006 15:04:05"
6 | - id: postedOnDate
7 | translation: "{{ .Count }}に投稿"
8 | - id: lastModified
9 | translation: "(最終更新日時{{ .Count }})"
10 | - id: translationsLabel
11 | translation: "翻訳:"
12 | - id: translationsSeparator
13 | translation: "・"
14 | - id: readMore
15 | translation: "続きを読む"
16 | - id: olderPosts
17 | translation: "古いページ"
18 | - id: newerPosts
19 | translation: "新しいページ"
20 | - id: previousPost
21 | translation: "前ページ"
22 | - id: nextPost
23 | translation: "次ページ"
24 | - id: readTime
25 | translation: "分間"
26 | - id: words
27 | translation: "言葉"
28 |
29 |
30 | # 404 page
31 | - id: pageNotFound
32 | translation: "おっと、このページが存在しない。他にあたってください。(404エラー)"
33 |
34 | # Footer
35 | - id: poweredBy # Accepts HTML
36 | translation: '起動力にHugo v{{ .Hugo.Version }} • テーマにBeautiful Jekyll に基づいているBeautiful Hugo '
37 |
38 | # Navigation
39 | - id: toggleNavigation
40 | translation: "メニューを切り替え"
41 | - id: gcseLabelShort
42 | translation: "検索"
43 | - id: gcseLabelLong
44 | translation: "{{ .Site.Title }}を検索"
45 | - id: gcseClose
46 | translation: "閉じる"
47 |
48 | # Staticman
49 | - id: noComment
50 | translation: "No comment"
51 | - id: oneComment
52 | translation: "comment"
53 | - id: moreComment
54 | translation: "comments"
55 | - id: useMarkdown
56 | translation: "You can use Markdown syntax"
57 | - id: yourName
58 | translation: "Your name"
59 | - id: yourEmail
60 | translation: "Your email address"
61 | - id: yourWebsite
62 | translation: "You website"
63 |
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/i18n/pl.yaml:
--------------------------------------------------------------------------------
1 | # Content
2 | - id: dateFormat
3 | translation: "02.01.2006"
4 | - id: shortdateFormat
5 | translation: "2 Jan, 2006 15:04:05"
6 | - id: postedOnDate
7 | translation: "Opublikowany {{ .Count }}"
8 | - id: lastModified
9 | translation: "(Ostatnia modyfikacja {{ .Count }})"
10 | - id: translationsLabel
11 | translation: "Inne języki: "
12 | - id: translationsSeparator
13 | translation: ", "
14 | - id: readMore
15 | translation: "Więcej"
16 | - id: olderPosts
17 | translation: "Poprzednie wpisy"
18 | - id: newerPosts
19 | translation: "Następne wpisy"
20 | - id: previousPost
21 | translation: "Poprzedni"
22 | - id: nextPost
23 | translation: "Następny"
24 | - id: readTime
25 | translation: "minuty"
26 | - id: words
27 | translation: "słowa"
28 |
29 |
30 | # 404 page
31 | - id: pageNotFound
32 | translation: "Nieprawidłowy adres (błąd 404)"
33 |
34 | # Footer
35 | - id: poweredBy # Accepts HTML
36 | translation: 'Hugo v{{ .Hugo.Version }} powered • Theme by Beautiful Jekyll adapted to Beautiful Hugo '
37 |
38 | # Navigation
39 | - id: toggleNavigation
40 | translation: "Nawigacja"
41 | - id: languageSwitcherLabel
42 | translation: "Język"
43 | - id: gcseLabelShort
44 | translation: "Szukaj"
45 | - id: gcseLabelLong
46 | translation: "Szukaj {{ .Site.Title }}"
47 | - id: gcseClose
48 | translation: "Zamknij"
49 |
50 | # Staticman
51 | - id: noComment
52 | translation: "No comment"
53 | - id: oneComment
54 | translation: "comment"
55 | - id: moreComment
56 | translation: "comments"
57 | - id: useMarkdown
58 | translation: "You can use Markdown syntax"
59 | - id: yourName
60 | translation: "Your name"
61 | - id: yourEmail
62 | translation: "Your email address"
63 | - id: yourWebsite
64 | translation: "You website"
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/i18n/zh.yaml:
--------------------------------------------------------------------------------
1 | # Content
2 | - id: dateFormat
3 | translation: "January 2, 2006"
4 | - id: shortdateFormat
5 | translation: "2 Jan, 2006 15:04:05"
6 | - id: postedOnDate
7 | translation: "发表于 {{ .Count }}"
8 | - id: lastModified
9 | translation: "(上次修改时间 {{ .Count }})"
10 | - id: translationsLabel
11 | translation: "其它语言: "
12 | - id: translationsSeparator
13 | translation: ", "
14 | - id: readMore
15 | translation: "阅读全文"
16 | - id: olderPosts
17 | translation: "下一页"
18 | - id: newerPosts
19 | translation: "上一页"
20 | - id: previousPost
21 | translation: "前一篇"
22 | - id: nextPost
23 | translation: "后一篇"
24 | - id: readTime
25 | translation: "分钟"
26 | - id: words
27 | translation: "个字"
28 |
29 |
30 | # 404 page
31 | - id: pageNotFound
32 | translation: "啊哦,这篇文章不存在。 (404 错误)"
33 |
34 | # Footer
35 | - id: poweredBy # Accepts HTML
36 | translation: '由 Hugo v{{ .Hugo.Version }} 强力驱动 • 主题 Beautiful Hugo 移植自 Beautiful Jekyll '
37 |
38 | # Navigation
39 | - id: toggleNavigation
40 | translation: "切换导航"
41 | - id: languageSwitcherLabel
42 | translation: "语言"
43 | - id: gcseLabelShort
44 | translation: "搜索"
45 | - id: gcseLabelLong
46 | translation: "搜索 {{ .Site.Title }}"
47 | - id: gcseClose
48 | translation: "关闭"
49 |
50 | # Staticman
51 | - id: noComment
52 | translation: "No comment"
53 | - id: oneComment
54 | translation: "comment"
55 | - id: moreComment
56 | translation: "comments"
57 | - id: useMarkdown
58 | translation: "You can use Markdown syntax"
59 | - id: yourName
60 | translation: "Your name"
61 | - id: yourEmail
62 | translation: "Your email address"
63 | - id: yourWebsite
64 | translation: "You website"
65 |
66 |
67 |
68 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/images/screenshot.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/images/screenshot.png
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/images/tn.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/images/tn.png
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/layouts/404.html:
--------------------------------------------------------------------------------
1 | {{ define "header" }}{{ end }}
2 | {{ define "main" }}
3 |
4 |
5 |
{{ i18n "pageNotFound" }}
6 |
7 |
8 |
9 |
10 | {{ end }}
11 |
12 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/layouts/_default/baseof.html:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{ partial "head.html" . }}
4 |
5 | {{ partial "nav.html" . }}
6 | {{ block "header" . }}{{ partial "header.html" . }}{{ end }}
7 | {{ block "main" . }}{{ end }}
8 | {{ partial "footer.html" . }}
9 |
10 |
11 |
12 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/layouts/_default/terms.html:
--------------------------------------------------------------------------------
1 | {{ define "main" }}
2 |
3 | {{ $data := .Data }}
4 |
5 |
6 |
7 |
8 |
9 | {{ range $key, $value := .Data.Terms.ByCount }}
10 |
32 | {{ end }}
33 |
34 |
35 |
36 |
37 |
38 |
39 | {{ end }}
40 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/layouts/partials/disqus.html:
--------------------------------------------------------------------------------
1 | {{ if (.Params.comments) | or (and (or (not (isset .Params "comments")) (eq .Params.comments nil)) (.Site.Params.comments)) }}
2 | {{ if .Site.DisqusShortname }}
3 |
6 | {{ end }}
7 | {{ end }}
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/layouts/partials/footer_custom.html:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/layouts/partials/head_custom.html:
--------------------------------------------------------------------------------
1 |
5 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/layouts/partials/post_meta.html:
--------------------------------------------------------------------------------
1 |
2 | {{/* {{ $lastmodstr := default (i18n "dateFormat") .Site.Params.dateformat | .Lastmod.Format }} */}}
3 | {{/* {{ $datestr := default (i18n "dateFormat") .Site.Params.dateformat | .Date.Format }} */}}
4 | {{/* {{ $datestr | i18n "postedOnDate"}} */}}
5 | {{/* {{ if ne $datestr $lastmodstr }}
6 | {{ $lastmodstr | i18n "lastModified" }}
7 | {{ end }} */}}
8 | {{ if .Site.Params.readingTime }}
9 | |
10 | {{ i18n "readingTime"}} {{ .ReadingTime }} {{ i18n "readTime" }} ({{ .WordCount }} {{ i18n "words" }})
11 | {{ end }}
12 | {{- if .Site.Params.staticman -}}
13 | |
14 | {{ $slug := replace .URL "/" "" }}
15 | {{ if .Site.Data.comments }}
16 | {{ $comments := index $.Site.Data.comments $slug }}
17 | {{ if $comments }}
18 | {{ if gt (len $comments) 1 }}
19 | {{ len $comments }} {{ i18n "moreComment" }}
20 | {{ else }}
21 | {{ len $comments }} {{ i18n "oneComment" }}
22 | {{ end }}
23 | {{ else }}
24 | 0 {{ i18n "oneComment" }}
25 | {{ end }}
26 | {{ end }}
27 | {{ end }}
28 | {{ if .IsTranslated -}}
29 | {{- $sortedTranslations := sort .Translations "Site.Language.Weight" -}}
30 | {{- $links := apply $sortedTranslations "partial" "translation_link.html" "." -}}
31 | {{- $cleanLinks := apply $links "chomp" "." -}}
32 | {{- $linksOutput := delimit $cleanLinks (i18n "translationsSeparator") -}}
33 | • {{ i18n "translationsLabel" }}{{ $linksOutput }}
34 | {{- end }}
35 |
36 |
37 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/layouts/partials/translation_link.html:
--------------------------------------------------------------------------------
1 | {{ default .Lang .Site.Language.LanguageName }}
2 |
3 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/css/codeblock.css:
--------------------------------------------------------------------------------
1 | /* --- Code blocks --- */
2 |
3 | .chroma .ln {
4 | margin-right: 0.8em;
5 | padding: 0 0.4em 0 0.4em;
6 | }
7 | pre code.hljs {
8 | padding: 9.5px;
9 | }
10 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/css/highlight.min.css:
--------------------------------------------------------------------------------
1 | .hljs{display:block;overflow-x:auto;padding:0.5em;color:#333;background:#f8f8f8}.hljs-comment,.hljs-quote{color:#998;font-style:italic}.hljs-keyword,.hljs-selector-tag,.hljs-subst{color:#333;font-weight:bold}.hljs-number,.hljs-literal,.hljs-variable,.hljs-template-variable,.hljs-tag .hljs-attr{color:#008080}.hljs-string,.hljs-doctag{color:#d14}.hljs-title,.hljs-section,.hljs-selector-id{color:#900;font-weight:bold}.hljs-subst{font-weight:normal}.hljs-type,.hljs-class .hljs-title{color:#458;font-weight:bold}.hljs-tag,.hljs-name,.hljs-attribute{color:#000080;font-weight:normal}.hljs-regexp,.hljs-link{color:#009926}.hljs-symbol,.hljs-bullet{color:#990073}.hljs-built_in,.hljs-builtin-name{color:#0086b3}.hljs-meta{color:#999;font-weight:bold}.hljs-deletion{background:#fdd}.hljs-addition{background:#dfd}.hljs-emphasis{font-style:italic}.hljs-strong{font-weight:bold}
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/css/main-minimal.css:
--------------------------------------------------------------------------------
1 | .main-content {
2 | padding-bottom: 50px;
3 | }
4 |
5 | footer.footer-min {
6 | position: fixed;
7 | bottom: 0;
8 | width: 100%;
9 | padding: 3px;
10 | background-color: #f5f5f5;
11 | border-top: 1px solid #eeeeee;
12 | text-align: center;
13 | }
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/css/staticman.css:
--------------------------------------------------------------------------------
1 | .staticman-comments {
2 | padding: 20px 0px 0px 0px;
3 | }
4 |
5 | .staticman-comments .comment-content{
6 | border-top: 1px solid #EEEEEE;
7 | padding: 4px 0px 30px 0px;
8 | }
9 |
10 | .staticman-comments .comment-content p {
11 | padding: 5px 0px 5px 0px;
12 | margin: 5px 58px 0px 58px;
13 | }
14 |
15 | .staticman-comments .textfield {
16 | width: 420px;
17 | max-width: 100%;
18 | padding: 0.5rem 0;
19 | width: 100%;
20 | }
21 |
22 | .staticman-comments input {
23 | border: 1px solid rgba(0,0,0,0.12);
24 | padding: 4px 5px;
25 | width: 100%;
26 | }
27 |
28 |
29 | .staticman-comments .g-recaptcha {
30 | padding: 0.5rem 0;
31 | }
32 |
33 | .staticman-comments textarea {
34 | border: 1px solid rgba(0,0,0,0.12);
35 | padding: 4px 5px;
36 | vertical-align: top;
37 | height: 10em;
38 | width: 100%;
39 | }
40 |
41 | .staticman-comments .comment-avatar {
42 | float:left;
43 | width: 48;
44 | height: 48;
45 | margin-right: 10px;
46 | }
47 |
48 | .staticman-comments .show-modal {
49 | overflow: hidden;
50 | position: relative;
51 | }
52 |
53 | .staticman-comments .show-modal:before {
54 | position: absolute;
55 | content: '';
56 | top: 0;
57 | left: 0;
58 | width: 100%;
59 | height: 100%;
60 | z-index: 999;
61 | background-color: rgba(0, 0, 0, 0.85);
62 | }
63 |
64 | .show-modal .modal {
65 | display: block;
66 | }
67 |
68 | .modal {
69 | display: none;
70 | position: fixed;
71 | width: 300px;
72 | top: 50%;
73 | left: 50%;
74 | margin-left: -150px;
75 | margin-top: -150px;
76 | min-height: 0;
77 | height: 30%;
78 | z-index: 9999;
79 | padding: 0.5rem;
80 | border: 1px solid rgba(0,0,0,0.25);
81 | background-color: rgba(220,220,220,0.9);
82 | height: 10em;
83 | }
84 |
85 | form--loading:before {
86 | content: '';
87 | }
88 |
89 | .form--loading .form__spinner {
90 | display: block;
91 | }
92 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/404-southpark.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/404-southpark.jpg
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/avatar-favicon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/avatar-favicon.png
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/avatar-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/avatar-icon.png
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/favicon.ico
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/favicon.ico.zip:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/favicon.ico.zip
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/flood.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/flood.jpg
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/hexagon-thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/hexagon-thumb.jpg
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/hexagon.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/hexagon.jpg
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/path.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/path.jpg
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/sphere-thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/sphere-thumb.jpg
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/sphere.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/sphere.jpg
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/triangle-thumb.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/triangle-thumb.jpg
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/img/triangle.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/myshop.com/themes/beautifulhugo/static/img/triangle.jpg
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/js/recaptcha.js:
--------------------------------------------------------------------------------
1 | /* PLEASE DO NOT COPY AND PASTE THIS CODE. */(function() {if (!window['___grecaptcha_cfg']) { window['___grecaptcha_cfg'] = {}; };if (!window['___grecaptcha_cfg']['render']) { window['___grecaptcha_cfg']['render'] = 'onload'; };window['__google_recaptcha_client'] = true;var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;po.src = 'https://www.gstatic.com/recaptcha/api2/r20171115120512/recaptcha__en.js'; var elem = document.querySelector('script[nonce]');var nonce = elem && (elem['nonce'] || elem.getAttribute('nonce'));if (nonce) { po.setAttribute('nonce', nonce); }var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);})();
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/static/js/staticman.js:
--------------------------------------------------------------------------------
1 | // Static comments
2 | // from: https://github.com/eduardoboucas/popcorn/blob/gh-pages/js/main.js
3 | (function ($) {
4 | var $comments = $('.js-comments');
5 |
6 | $('.js-form').submit(function () {
7 | var form = this;
8 |
9 | $(form).addClass('form--loading');
10 |
11 | $.ajax({
12 | type: $(this).attr('method'),
13 | url: $(this).attr('action'),
14 | data: $(this).serialize(),
15 | contentType: 'application/x-www-form-urlencoded',
16 | success: function (data) {
17 | showModal('Perfect !', 'Thanks for your comment! It will show on the site once it has been approved. .');
18 | $(form).removeClass('form--loading');
19 | },
20 | error: function (err) {
21 | console.log(err);
22 | showModal('Error', 'Sorry, there was an error with the submission!');
23 | $(form).removeClass('form--loading');
24 | }
25 | });
26 |
27 | return false;
28 | });
29 |
30 | $('.js-close-modal').click(function () {
31 | $('body').removeClass('show-modal');
32 | });
33 |
34 | function showModal(title, message) {
35 | $('.js-modal-title').text(title);
36 | $('.js-modal-text').html(message);
37 |
38 | $('body').addClass('show-modal');
39 | }
40 | })(jQuery);
41 |
--------------------------------------------------------------------------------
/myshop.com/themes/beautifulhugo/theme.toml:
--------------------------------------------------------------------------------
1 | name = "Beautiful Hugo"
2 | license = "MIT"
3 | licenselink = "https://github.com/halogenica/Hugo-BeautifulHugo/blob/master/LICENSE"
4 | description = "A port of Beautiful Jekyll theme"
5 | tags = ["blog", "company", "portfolio", "projects", "minimal", "responsive"]
6 | features = ["blog", "themes", "disqus", "minimal", "responsive", "staticman"]
7 | min_version = 0.28
8 |
9 | [author]
10 | name = "halogenica"
11 | homepage = "http://halogenica.net"
12 |
13 | # If Porting existing theme
14 | [original]
15 | author = "dattali"
16 | homepage = "http://deanattali.com/beautiful-jekyll/"
17 | repo = "https://github.com/daattali/beautiful-jekyll"
18 |
--------------------------------------------------------------------------------
/netlify.toml:
--------------------------------------------------------------------------------
1 | [build]
2 | base = "myshop.com"
3 | publish = "myshop.com/public"
4 | command = "./build.sh"
5 |
6 | [context.production.environment]
7 | HUGO_VERSION = "0.47.1"
8 | HUGO_ENV = "production"
9 |
--------------------------------------------------------------------------------
/ponzu/.gitattributes:
--------------------------------------------------------------------------------
1 | cmd/ponzu/vendor/* linguist-vendored=false
2 | system/admin/static/dashboard/js/* linguist-vendored
3 | system/admin/static/dashboard/css/* linguist-vendored
4 | system/admin/static/dashboard/fonts/* linguist-vendored
5 | system/admin/static/dashboard/css/admin.css linguist-vendored=false
6 | system/admin/static/editor/js/* linguist-vendored
7 | system/admin/static/editor/sass/* linguist-vendored
8 | system/admin/static/editor/css/* linguist-vendored
9 | system/admin/static/editor/font/* linguist-vendored
10 | system/admin/static/common/js/* linguist-vendored
11 | system/admin/static/common/js/util.js linguist-vendored=false
--------------------------------------------------------------------------------
/ponzu/.gitignore:
--------------------------------------------------------------------------------
1 | ponzu-server
2 | ponzu-server.exe
3 | /uploads
4 | /search
5 | /*.db
6 | /*.db.lock
7 | *.pem
8 | ponzuImport
9 | ponzuImport.exe
--------------------------------------------------------------------------------
/ponzu/Dockerfile:
--------------------------------------------------------------------------------
1 |
2 | # Base our image on an official, minimal image of our preferred golang
3 | FROM golang:1.9
4 |
5 | # Note: The default golang docker image, already has the GOPATH env variable set.
6 | # GOPATH is located at /go
7 | ENV GO_SRC $GOPATH/src
8 | ENV PONZU_GITHUB github.com/ponzu-cms/ponzu
9 | ENV PONZU_ROOT $GO_SRC/$PONZU_GITHUB
10 |
11 | # Consider updating package in the future. For instance ca-certificates etc.
12 | # RUN apt-get update -qq && apt-get install -y build-essential
13 |
14 | # Make the ponzu root directory
15 | RUN mkdir -p $PONZU_ROOT
16 |
17 | # All commands will be run inside of ponzu root
18 | WORKDIR $PONZU_ROOT
19 |
20 | # Copy the ponzu source into ponzu root.
21 | COPY . .
22 |
23 | # the following runs the code inside of the $GO_SRC/$PONZU_GITHUB directory
24 | RUN go get -u $PONZU_GITHUB...
25 |
26 | # Define the scripts we want run once the container boots
27 | # CMD [ "" ]
28 |
--------------------------------------------------------------------------------
/ponzu/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2016 Boss Sauce Creative, LLC.
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/ponzu/addons/README.md:
--------------------------------------------------------------------------------
1 | # Addons
2 |
3 | Place packages inside this directory to extend upon Ponzu core. Find more addons
4 | from the official repository at https://github.com/ponzu-cms/addons
5 |
6 | All packages inside this directory get vendored upon executing `$ ponzu build`
7 |
8 | To submit an official addon, fork the repository at the URL above and make a
9 | pull request including your addon inside a directory without its own git
10 | repository.
11 |
12 | Questions? Reach out to [@ponzu_cms](https://twitter.com/ponzu_cms) on Twitter,
13 | or open an issue at https://github.com/ponzu-cms/ponzu
--------------------------------------------------------------------------------
/ponzu/addons/github.com/bosssauce/reference/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2016 Boss Sauce Creative, LLC.
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/ponzu/addons/github.com/bosssauce/reference/README.md:
--------------------------------------------------------------------------------
1 | # Reference
2 |
3 | A Ponzu addon to embed a reference to a content type from within another content type in the CMS.
4 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2016 Boss Sauce Creative, LLC.
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/build.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "path/filepath"
5 | "strings"
6 |
7 | "github.com/spf13/cobra"
8 | )
9 |
10 | func buildPonzuServer() error {
11 | // copy all ./content files to internal vendor directory
12 | src := "content"
13 | dst := filepath.Join("cmd", "ponzu", "vendor", "github.com", "ponzu-cms", "ponzu", "content")
14 | err := emptyDir(dst)
15 | if err != nil {
16 | return err
17 | }
18 | err = copyFilesWarnConflicts(src, dst, []string{"doc.go"})
19 | if err != nil {
20 | return err
21 | }
22 |
23 | // copy all ./addons files & dirs to internal vendor directory
24 | src = "addons"
25 | dst = filepath.Join("cmd", "ponzu", "vendor")
26 | err = copyFilesWarnConflicts(src, dst, nil)
27 | if err != nil {
28 | return err
29 | }
30 |
31 | // execute go build -o ponzu-cms cmd/ponzu/*.go
32 | cmdPackageName := strings.Join([]string{".", "cmd", "ponzu"}, "/")
33 | buildOptions := []string{"build", "-o", buildOutputName(), cmdPackageName}
34 | return execAndWait(gocmd, buildOptions...)
35 | }
36 |
37 | var buildCmd = &cobra.Command{
38 | Use: "build [flags]",
39 | Short: "build will build/compile the project to then be run.",
40 | Long: `From within your Ponzu project directory, running build will copy and move
41 | the necessary files from your workspace into the vendored directory, and
42 | will build/compile the project to then be run.
43 |
44 | By providing the 'gocmd' flag, you can specify which Go command to build the
45 | project, if testing a different release of Go.
46 |
47 | Errors will be reported, but successful build commands return nothing.`,
48 | Example: `$ ponzu build
49 | (or)
50 | $ ponzu build --gocmd=go1.8rc1`,
51 | RunE: func(cmd *cobra.Command, args []string) error {
52 | return buildPonzuServer()
53 | },
54 | }
55 |
56 | func init() {
57 | RegisterCmdlineCommand(buildCmd)
58 | }
59 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/new_test.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "os"
5 | "path/filepath"
6 | "testing"
7 | )
8 |
9 | func TestNewName2Path(t *testing.T) {
10 | savedGOPATH := os.Getenv("GOPATH")
11 | defer os.Setenv("GOPATH", savedGOPATH)
12 | pwd, err := os.Getwd()
13 | if err != nil {
14 | t.Fatalf("Could not determine current working directory: %s", err)
15 | }
16 |
17 | isNil := func(e error) bool { return e == nil }
18 | isNonNil := func(e error) bool { return e != nil }
19 |
20 | baseDir := filepath.Join(pwd, "test-fixtures", "new")
21 |
22 | testTable := []struct {
23 | gopath, wd, a,
24 | wantP string
25 | wantE func(e error) bool
26 | }{{
27 | gopath: baseDir,
28 | wd: filepath.Join("src", "existing"),
29 | a: ".",
30 | wantP: filepath.Join(pwd, "test-fixtures", "new", "src", "existing"),
31 | wantE: os.IsExist,
32 | }, {
33 | gopath: baseDir,
34 | wd: filepath.Join(""),
35 | a: "non-existing",
36 | wantP: filepath.Join(pwd, "test-fixtures", "new", "src", "non-existing"),
37 | wantE: isNil,
38 | }, {
39 | gopath: baseDir,
40 | wd: filepath.Join(""),
41 | a: ".",
42 | wantP: "",
43 | wantE: isNonNil,
44 | }, {
45 | gopath: baseDir,
46 | wd: "..",
47 | a: ".",
48 | wantP: "",
49 | wantE: isNonNil,
50 | }}
51 |
52 | for _, test := range testTable {
53 | os.Setenv("GOPATH", test.gopath)
54 | err = os.Chdir(filepath.Join(test.gopath, test.wd))
55 | if err != nil {
56 | t.Fatalf("could not setup base: %s", err)
57 | }
58 | got, gotE := name2path(test.a)
59 | if got != test.wantP {
60 | t.Errorf("got '%s', want: '%s'", got, test.wantP)
61 | }
62 | if !test.wantE(gotE) {
63 | t.Errorf("got error '%s'", gotE)
64 | }
65 | }
66 | }
67 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/paths.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "os"
5 | "os/user"
6 | "path/filepath"
7 | "runtime"
8 | "strings"
9 | )
10 |
11 | // buildOutputName returns the correct ponzu-server file name
12 | // based on the host Operating System
13 | func buildOutputName() string {
14 | if runtime.GOOS == "windows" {
15 | return "ponzu-server.exe"
16 | }
17 |
18 | return "ponzu-server"
19 | }
20 |
21 | // resolve GOPATH. In 1.8 can be default, or custom. A custom GOPATH can
22 | // also contain multiple paths, in which case 'go get' uses the first
23 | func getGOPATH() (string, error) {
24 | var gopath string
25 | gopath = os.Getenv("GOPATH")
26 | if gopath == "" {
27 | // not set, find the default
28 | usr, err := user.Current()
29 | if err != nil {
30 | return gopath, err
31 | }
32 | gopath = filepath.Join(usr.HomeDir, "go")
33 | } else {
34 | // parse out in case of multiple, retain first
35 | if runtime.GOOS == "windows" {
36 | gopaths := strings.Split(gopath, ";")
37 | gopath = gopaths[0]
38 | } else {
39 | gopaths := strings.Split(gopath, ":")
40 | gopath = gopaths[0]
41 | }
42 | }
43 | return gopath, nil
44 | }
45 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/ponzu.json:
--------------------------------------------------------------------------------
1 | {
2 | "version": "0.9.4"
3 | }
4 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-checkbox.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.Checkbox("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | }, map[string]string{
4 | // "value": "Display Name",
5 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-content.tmpl:
--------------------------------------------------------------------------------
1 | package content
2 |
3 | import (
4 | "fmt"
5 | {{ if .HasReferences }}
6 | "github.com/bosssauce/reference"
7 | {{ end }}
8 | "github.com/ponzu-cms/ponzu/management/editor"
9 | "github.com/ponzu-cms/ponzu/system/item"
10 | )
11 |
12 | type {{ .Name }} struct {
13 | item.Item
14 |
15 | {{ range .Fields }}{{ .Name }} {{ .TypeName }} `json:"{{ .JSONName }}"`
16 | {{ end }}
17 | }
18 |
19 | // MarshalEditor writes a buffer of html to edit a {{ .Name }} within the CMS
20 | // and implements editor.Editable
21 | func ({{ .Initial }} *{{ .Name }}) MarshalEditor() ([]byte, error) {
22 | view, err := editor.Form({{ .Initial }},
23 | // Take note that the first argument to these Input-like functions
24 | // is the string version of each {{ .Name }} field, and must follow
25 | // this pattern for auto-decoding and auto-encoding reasons:
26 | {{ range .Fields }}editor.Field{
27 | {{ .View }}
28 | },
29 | {{ end }}
30 | )
31 |
32 | if err != nil {
33 | return nil, fmt.Errorf("Failed to render {{ .Name }} editor view: %s", err.Error())
34 | }
35 |
36 | return view, nil
37 | }
38 |
39 | func init() {
40 | item.Types["{{ .Name }}"] = func() interface{} { return new({{ .Name }}) }
41 | }
42 |
43 | // String defines how a {{ .Name }} is printed. Update it using more descriptive
44 | // fields from the {{ .Name }} struct type
45 | func ({{ .Initial }} *{{ .Name }}) String() string {
46 | return fmt.Sprintf("{{ .Name }}: %s", {{ .Initial }}.UUID)
47 | }
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-custom.tmpl:
--------------------------------------------------------------------------------
1 | View: []byte(`
2 |
3 | {{ .Name }}
4 |
5 |
6 | `),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-file-repeater.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.FileRepeater("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | "placeholder": "Upload the {{ .Name }} here",
4 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-file.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.File("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | "placeholder": "Upload the {{ .Name }} here",
4 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-hidden.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.Input("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "type": "hidden",
3 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-input-repeater.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.InputRepeater("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | "type": "text",
4 | "placeholder": "Enter the {{ .Name }} here",
5 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-input.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.Input("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | "type": "text",
4 | "placeholder": "Enter the {{ .Name }} here",
5 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-reference-repeater.tmpl:
--------------------------------------------------------------------------------
1 | View: reference.SelectRepeater("[[ .Name ]]", [[ .Initial ]], map[string]string{
2 | "label": "[[ .Name ]]",
3 | },
4 | "[[ .ReferenceName ]]",
5 | `[[ range .ReferenceJSONTags ]]{{ .[[ . ]] }} [[ else ]][[ .ReferenceName ]]: {{ .id }}[[ end ]]`,
6 | ),
7 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-reference.tmpl:
--------------------------------------------------------------------------------
1 | View: reference.Select("[[ .Name ]]", [[ .Initial ]], map[string]string{
2 | "label": "[[ .Name ]]",
3 | },
4 | "[[ .ReferenceName ]]",
5 | `[[ range .ReferenceJSONTags ]]{{ .[[ . ]] }} [[ else ]][[ .ReferenceName ]]: {{ .id }}[[ end ]]`,
6 | ),
7 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-richtext.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.Richtext("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | "placeholder": "Enter the {{ .Name }} here",
4 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-select-repeater.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.SelectRepeater("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | }, map[string]string{
4 | // "value": "Display Name",
5 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-select.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.Select("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | }, map[string]string{
4 | // "value": "Display Name",
5 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-tags.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.Tags("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | "placeholder": "+{{ .Name }}",
4 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/templates/gen-textarea.tmpl:
--------------------------------------------------------------------------------
1 | View: editor.Textarea("{{ .Name }}", {{ .Initial }}, map[string]string{
2 | "label": "{{ .Name }}",
3 | "placeholder": "Enter the {{ .Name }} here",
4 | }),
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/README.md:
--------------------------------------------------------------------------------
1 | # Addons
2 |
3 | Place packages inside this directory to extend upon Ponzu core. Find more addons
4 | from the official repository at https://github.com/ponzu-cms/addons
5 |
6 | All packages inside this directory get vendored upon executing `$ ponzu build`
7 |
8 | To submit an official addon, fork the repository at the URL above and make a
9 | pull request including your addon inside a directory without its own git
10 | repository.
11 |
12 | Questions? Reach out to [@ponzu_cms](https://twitter.com/ponzu_cms) on Twitter,
13 | or open an issue at https://github.com/ponzu-cms/ponzu
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/.gitignore:
--------------------------------------------------------------------------------
1 | *.prof
2 | *.test
3 | *.swp
4 | /bin/
5 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2013 Ben Johnson
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | 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, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/Makefile:
--------------------------------------------------------------------------------
1 | BRANCH=`git rev-parse --abbrev-ref HEAD`
2 | COMMIT=`git rev-parse --short HEAD`
3 | GOLDFLAGS="-X main.branch $(BRANCH) -X main.commit $(COMMIT)"
4 |
5 | default: build
6 |
7 | race:
8 | @go test -v -race -test.run="TestSimulate_(100op|1000op)"
9 |
10 | # go get github.com/kisielk/errcheck
11 | errcheck:
12 | @errcheck -ignorepkg=bytes -ignore=os:Remove github.com/boltdb/bolt
13 |
14 | test:
15 | @go test -v -cover .
16 | @go test -v ./cmd/bolt
17 |
18 | .PHONY: fmt test
19 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/appveyor.yml:
--------------------------------------------------------------------------------
1 | version: "{build}"
2 |
3 | os: Windows Server 2012 R2
4 |
5 | clone_folder: c:\gopath\src\github.com\boltdb\bolt
6 |
7 | environment:
8 | GOPATH: c:\gopath
9 |
10 | install:
11 | - echo %PATH%
12 | - echo %GOPATH%
13 | - go version
14 | - go env
15 | - go get -v -t ./...
16 |
17 | build_script:
18 | - go test -v ./...
19 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_386.go:
--------------------------------------------------------------------------------
1 | package bolt
2 |
3 | // maxMapSize represents the largest mmap size supported by Bolt.
4 | const maxMapSize = 0x7FFFFFFF // 2GB
5 |
6 | // maxAllocSize is the size used when creating array pointers.
7 | const maxAllocSize = 0xFFFFFFF
8 |
9 | // Are unaligned load/stores broken on this arch?
10 | var brokenUnaligned = false
11 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_amd64.go:
--------------------------------------------------------------------------------
1 | package bolt
2 |
3 | // maxMapSize represents the largest mmap size supported by Bolt.
4 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
5 |
6 | // maxAllocSize is the size used when creating array pointers.
7 | const maxAllocSize = 0x7FFFFFFF
8 |
9 | // Are unaligned load/stores broken on this arch?
10 | var brokenUnaligned = false
11 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_arm.go:
--------------------------------------------------------------------------------
1 | package bolt
2 |
3 | import "unsafe"
4 |
5 | // maxMapSize represents the largest mmap size supported by Bolt.
6 | const maxMapSize = 0x7FFFFFFF // 2GB
7 |
8 | // maxAllocSize is the size used when creating array pointers.
9 | const maxAllocSize = 0xFFFFFFF
10 |
11 | // Are unaligned load/stores broken on this arch?
12 | var brokenUnaligned bool
13 |
14 | func init() {
15 | // Simple check to see whether this arch handles unaligned load/stores
16 | // correctly.
17 |
18 | // ARM9 and older devices require load/stores to be from/to aligned
19 | // addresses. If not, the lower 2 bits are cleared and that address is
20 | // read in a jumbled up order.
21 |
22 | // See http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.faqs/ka15414.html
23 |
24 | raw := [6]byte{0xfe, 0xef, 0x11, 0x22, 0x22, 0x11}
25 | val := *(*uint32)(unsafe.Pointer(uintptr(unsafe.Pointer(&raw)) + 2))
26 |
27 | brokenUnaligned = val != 0x11222211
28 | }
29 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_arm64.go:
--------------------------------------------------------------------------------
1 | // +build arm64
2 |
3 | package bolt
4 |
5 | // maxMapSize represents the largest mmap size supported by Bolt.
6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
7 |
8 | // maxAllocSize is the size used when creating array pointers.
9 | const maxAllocSize = 0x7FFFFFFF
10 |
11 | // Are unaligned load/stores broken on this arch?
12 | var brokenUnaligned = false
13 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_linux.go:
--------------------------------------------------------------------------------
1 | package bolt
2 |
3 | import (
4 | "syscall"
5 | )
6 |
7 | // fdatasync flushes written data to a file descriptor.
8 | func fdatasync(db *DB) error {
9 | return syscall.Fdatasync(int(db.file.Fd()))
10 | }
11 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_openbsd.go:
--------------------------------------------------------------------------------
1 | package bolt
2 |
3 | import (
4 | "syscall"
5 | "unsafe"
6 | )
7 |
8 | const (
9 | msAsync = 1 << iota // perform asynchronous writes
10 | msSync // perform synchronous writes
11 | msInvalidate // invalidate cached data
12 | )
13 |
14 | func msync(db *DB) error {
15 | _, _, errno := syscall.Syscall(syscall.SYS_MSYNC, uintptr(unsafe.Pointer(db.data)), uintptr(db.datasz), msInvalidate)
16 | if errno != 0 {
17 | return errno
18 | }
19 | return nil
20 | }
21 |
22 | func fdatasync(db *DB) error {
23 | if db.data != nil {
24 | return msync(db)
25 | }
26 | return db.file.Sync()
27 | }
28 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_ppc.go:
--------------------------------------------------------------------------------
1 | // +build ppc
2 |
3 | package bolt
4 |
5 | // maxMapSize represents the largest mmap size supported by Bolt.
6 | const maxMapSize = 0x7FFFFFFF // 2GB
7 |
8 | // maxAllocSize is the size used when creating array pointers.
9 | const maxAllocSize = 0xFFFFFFF
10 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_ppc64.go:
--------------------------------------------------------------------------------
1 | // +build ppc64
2 |
3 | package bolt
4 |
5 | // maxMapSize represents the largest mmap size supported by Bolt.
6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
7 |
8 | // maxAllocSize is the size used when creating array pointers.
9 | const maxAllocSize = 0x7FFFFFFF
10 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_ppc64le.go:
--------------------------------------------------------------------------------
1 | // +build ppc64le
2 |
3 | package bolt
4 |
5 | // maxMapSize represents the largest mmap size supported by Bolt.
6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
7 |
8 | // maxAllocSize is the size used when creating array pointers.
9 | const maxAllocSize = 0x7FFFFFFF
10 |
11 | // Are unaligned load/stores broken on this arch?
12 | var brokenUnaligned = false
13 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/bolt_s390x.go:
--------------------------------------------------------------------------------
1 | // +build s390x
2 |
3 | package bolt
4 |
5 | // maxMapSize represents the largest mmap size supported by Bolt.
6 | const maxMapSize = 0xFFFFFFFFFFFF // 256TB
7 |
8 | // maxAllocSize is the size used when creating array pointers.
9 | const maxAllocSize = 0x7FFFFFFF
10 |
11 | // Are unaligned load/stores broken on this arch?
12 | var brokenUnaligned = false
13 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/boltdb/bolt/boltsync_unix.go:
--------------------------------------------------------------------------------
1 | // +build !windows,!plan9,!linux,!openbsd
2 |
3 | package bolt
4 |
5 | // fdatasync flushes written data to a file descriptor.
6 | func fdatasync(db *DB) error {
7 | return db.file.Sync()
8 | }
9 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/bosssauce/reference/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2016 Boss Sauce Creative, LLC.
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/bosssauce/reference/README.md:
--------------------------------------------------------------------------------
1 | # Reference
2 |
3 | A Ponzu addon to embed a reference to a content type from within another content type in the CMS.
4 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/.gitignore:
--------------------------------------------------------------------------------
1 | # Binaries for programs and plugins
2 | *.exe
3 | *.exe~
4 | *.dll
5 | *.so
6 | *.dylib
7 |
8 | # Test binary, build with `go test -c`
9 | *.test
10 |
11 | # Output of the go coverage tool, specifically when used with LiteIDE
12 | *.out
13 |
14 | # binary bundle generated by go-fuzz
15 | uuid-fuzz.zip
16 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: false
3 | go:
4 | - 1.7
5 | - 1.8
6 | - 1.9
7 | - "1.10"
8 | - tip
9 | matrix:
10 | allow_failures:
11 | - go: tip
12 | fast_finish: true
13 | before_install:
14 | - go get github.com/mattn/goveralls
15 | - go get golang.org/x/tools/cmd/cover
16 | script:
17 | - $HOME/gopath/bin/goveralls -service=travis-ci
18 | notifications:
19 | email: false
20 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2013-2018 by Maxim Bublis
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining
4 | a copy of this software and associated documentation files (the
5 | "Software"), to deal in the Software without restriction, including
6 | without limitation the rights to use, copy, modify, merge, publish,
7 | distribute, sublicense, and/or sell copies of the Software, and to
8 | permit persons to whom the Software is furnished to do so, subject to
9 | the following conditions:
10 |
11 | The above copyright notice and this permission notice shall be
12 | included in all copies or substantial portions of the Software.
13 |
14 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17 | NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18 | LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19 | OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20 | WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/1416586f4a34d02bcb506f6107b40df512b9f2f9:
--------------------------------------------------------------------------------
1 | zba7b810-9dad-11d1-80b4-00c04fd4
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/3b46a7e7b02ec193581e6c9fa2c8a72f50a64e08-1:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad-11d1-80F4-00c"4fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/50c54bb75fcfdc488f162bf2f0c6dec6103bfa18-5:
--------------------------------------------------------------------------------
1 | 6ad1DdE8dda91DdE80F400c0Bool30t:
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/69c581ab749cbd56be8684d3a58ac2cfab9af0f4-5:
--------------------------------------------------------------------------------
1 | 6ba7b810Edad1DdE80F400c0Bool30c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/752bf000e0bff06777dd0d6f0be6353844de678a-3:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad1Dd180F400c0Bool30c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/a4483762d4ece8466d82cca5cacd35a0829c4e60-2:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad-11d1-80F4-F0c"4fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/d0952c45e0c823fc5cc12bcf7d9b877d150ab523-1:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad11d180b400c0Bool30c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/da39a3ee5e6b4b0d3255bfef95601890afd80709:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/da39a3ee5e6b4b0d3255bfef95601890afd80709
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/e2b84d2065846891f18ae109b12e01d224e1c7c3-4:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad1DdE80F400c0Bool30c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/e320d749435115e874f77420e17d0937e07f69f3-2:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad1Dd180b400c0Bool30c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/ed132d47d757f6468443a22df8a2a965efb34098-7:
--------------------------------------------------------------------------------
1 | 6ba1DdE8dDAE8DdE80F400c0BoUl30to
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/eeefb01f7bb3c627aedb292c994b20f739ffd613-6:
--------------------------------------------------------------------------------
1 | 6ad1DdE8dDdE8DdE80F400c0Bool30t:
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_0:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad-11d1-80b4-00c04fd430c
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_1:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad11d180b400c04fd430c
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_10:
--------------------------------------------------------------------------------
1 | uuid:urn:6ba7b810-9dad-11d1-80b4-00c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_11:
--------------------------------------------------------------------------------
1 | uuid:urn:6ba7b8109dad11d180b400c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_12:
--------------------------------------------------------------------------------
1 | 6ba7b8109-dad-11d1-80b4-00c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_13:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad1-1d1-80b4-00c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_14:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad-11d18-0b4-00c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_15:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad-11d1-80b40-0c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_16:
--------------------------------------------------------------------------------
1 | 6ba7b810+9dad+11d1+80b4+00c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_17:
--------------------------------------------------------------------------------
1 | (6ba7b810-9dad-11d1-80b4-00c04fd430c8}
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_18:
--------------------------------------------------------------------------------
1 | {6ba7b810-9dad-11d1-80b4-00c04fd430c8>
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_19:
--------------------------------------------------------------------------------
1 | zba7b810-9dad-11d1-80b4-00c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_2:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad11d180b400c04fd430q8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_20:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad11d180b400c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_21:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad-11d180b400c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_22:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad11d1-80b400c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_23:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad11d180b4-00c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_3:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad-11d1-80b4-00c04fd430c8=
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_4:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad-11d1-80b4-00c04fd430c8}
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_5:
--------------------------------------------------------------------------------
1 | {6ba7b810-9dad-11d1-80b4-00c04fd430c8}f
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_6:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad-11d1-80b4-00c04fd430c800c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_7:
--------------------------------------------------------------------------------
1 | ba7b8109dad11d180b400c04fd430c8}
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_8:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad11d180b400c04fd430c86ba7b8109dad11d180b400c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_invalid_9:
--------------------------------------------------------------------------------
1 | urn:uuid:{6ba7b810-9dad-11d1-80b4-00c04fd430c8}
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_valid_BracedCanonical:
--------------------------------------------------------------------------------
1 | {6ba7b810-9dad-11d1-80b4-00c04fd430c8}
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_valid_BracedHashlike:
--------------------------------------------------------------------------------
1 | {6ba7b8109dad11d180b400c04fd430c8}
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_valid_Canonical:
--------------------------------------------------------------------------------
1 | 6ba7b810-9dad-11d1-80b4-00c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_valid_Hashlike:
--------------------------------------------------------------------------------
1 | 6ba7b8109dad11d180b400c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_valid_URNCanonical:
--------------------------------------------------------------------------------
1 | urn:uuid:6ba7b810-9dad-11d1-80b4-00c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gofrs/uuid/testdata/corpus/seed_valid_URNHashlike:
--------------------------------------------------------------------------------
1 | urn:uuid:6ba7b8109dad11d180b400c04fd430c8
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gorilla/schema/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 | sudo: false
3 |
4 | matrix:
5 | include:
6 | - go: 1.3
7 | - go: 1.4
8 | - go: 1.5
9 | - go: 1.6
10 | - go: 1.7
11 | - go: tip
12 | allow_failures:
13 | - go: tip
14 |
15 | script:
16 | - go get -t -v ./...
17 | - diff -u <(echo -n) <(gofmt -d .)
18 | - go vet $(go list ./... | grep -v /vendor/)
19 | - go test -v -race ./...
20 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/gorilla/schema/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Rodrigo Moraes. All rights reserved.
2 |
3 | Redistribution and use in source and binary forms, with or without
4 | modification, are permitted provided that the following conditions are
5 | met:
6 |
7 | * Redistributions of source code must retain the above copyright
8 | notice, this list of conditions and the following disclaimer.
9 | * Redistributions in binary form must reproduce the above
10 | copyright notice, this list of conditions and the following disclaimer
11 | in the documentation and/or other materials provided with the
12 | distribution.
13 | * Neither the name of Google Inc. nor the names of its
14 | contributors may be used to endorse or promote products derived from
15 | this software without specific prior written permission.
16 |
17 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
18 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
19 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
20 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
21 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
22 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
23 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
24 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
25 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
26 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
27 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
28 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/nilslice/email/LICENSE:
--------------------------------------------------------------------------------
1 | MIT License
2 |
3 | Copyright (c) 2016 Steve Manuel
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy
6 | of this software and associated documentation files (the "Software"), to deal
7 | in the Software without restriction, including without limitation the rights
8 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 | copies of the Software, and to permit persons to whom the Software is
10 | furnished to do so, subject to the following conditions:
11 |
12 | The above copyright notice and this permission notice shall be included in all
13 | copies or substantial portions of the Software.
14 |
15 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 | SOFTWARE.
22 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/nilslice/email/README.md:
--------------------------------------------------------------------------------
1 | ## Email
2 |
3 | I needed a way to send email from a [Ponzu](https://ponzu-cms.org) installation
4 | running on all kinds of systems without shelling out. `sendmail` or `postfix` et
5 | al are not standard on all systems, and I didn't want to force users to add API
6 | keys from a third-party just to send something like an account recovery email.
7 |
8 | ### Usage:
9 | `$ go get github.com/nilslice/email`
10 |
11 | ```go
12 | package main
13 |
14 | import (
15 | "fmt"
16 | "github.com/nilslice/email"
17 | )
18 |
19 | func main() {
20 | msg := email.Message{
21 | To: "you@server.name", // do not add < > or name in quotes
22 | From: "me@server.name", // do not add < > or name in quotes
23 | Subject: "A simple email",
24 | Body: "Plain text email body. HTML not yet supported, but send a PR!",
25 | }
26 |
27 | err := msg.Send()
28 | if err != nil {
29 | fmt.Println(err)
30 | }
31 | }
32 |
33 | ```
34 |
35 | ### Under the hood
36 | `email` looks at a `Message`'s `To` field, splits the string on the @ symbol and
37 | issues an MX lookup to find the mail exchange server(s). Then it iterates over
38 | all the possibilities in combination with commonly used SMTP ports for non-SSL
39 | clients: `25, 2525, & 587`
40 |
41 | It stops once it has an active client connected to a mail server and sends the
42 | initial information, the message, and then closes the connection.
43 |
44 | Currently, this doesn't support any additional headers or `To` field formatting
45 | (the recipient's email must be the only string `To` takes). Although these would
46 | be fairly strightforward to implement, I don't need them yet.. so feel free to
47 | contribute anything you find useful.
48 |
49 | #### Warning
50 | Be cautious of how often you run this locally or in testing, as it's quite
51 | likely your IP will be blocked/blacklisted if it is not already.
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/nilslice/email/email_test.go:
--------------------------------------------------------------------------------
1 | package email
2 |
3 | import (
4 | "testing"
5 | )
6 |
7 | func TestSend(t *testing.T) {
8 | m := Message{
9 | To: "",
10 | From: "",
11 | Subject: "",
12 | Body: "",
13 | }
14 |
15 | err := m.Send()
16 | if err != nil {
17 | t.Fatal("Send returned error:", err)
18 | }
19 | }
20 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/nilslice/jwt/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (C) 2015 Steve Manuel
2 |
3 | Permission is hereby granted, free of charge, to any person obtaining a copy
4 | of this software and associated documentation files (the "Software"), to deal
5 | in the Software without restriction, including without limitation the rights
6 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 | copies of the Software, and to permit persons to whom the Software is
8 | furnished to do so, subject to the following conditions:
9 |
10 | The above copyright notice and this permission notice shall be included in
11 | all copies or substantial portions of the Software.
12 |
13 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 | THE SOFTWARE.
20 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/nilslice/jwt/README.md:
--------------------------------------------------------------------------------
1 | # JWT
2 |
3 | ### Usage
4 | $ go get github.com/nilslice/jwt
5 |
6 | package jwt provides methods to create and check JSON Web Tokens. It only implements HMAC 256 encryption and has a very small footprint, ideal for simple usage when authorizing clients
7 |
8 | ```go
9 | package main
10 |
11 | import (
12 | auth "github.com/nilslice/jwt"
13 | "fmt"
14 | "net/http"
15 | "strings"
16 | )
17 |
18 | func main() {
19 | http.HandleFunc("/auth/new", func(res http.ResponseWriter, req *http.Request) {
20 | claims := map[string]interface{}{"exp": time.Now().Add(time.Hour * 24).Unix()}
21 | token, err := auth.New(claims)
22 | if err != nil {
23 | http.Error(res, "Error", 500)
24 | return
25 | }
26 | res.Header().Add("Authorization", "Bearer "+token)
27 |
28 | res.WriteHeader(http.StatusOK)
29 | })
30 |
31 | http.HandleFunc("/auth", func(res http.ResponseWriter, req *http.Request) {
32 | userToken := strings.Split(req.Header.Get("Authorization"), " ")[1]
33 |
34 | if auth.Passes(userToken) {
35 | fmt.Println("ok")
36 | } else {
37 | fmt.Println("no")
38 | }
39 | })
40 |
41 | http.ListenAndServe(":8080", nil)
42 | }
43 | ```
44 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/nilslice/jwt/doc.go:
--------------------------------------------------------------------------------
1 | // Package jwt provides methods to create and check JSON Web Tokens (JWT). It only implements HMAC 256 encryption and has a very small footprint, ideal for simple usage when authorizing clients
2 | /*
3 |
4 | package main
5 |
6 | import (
7 | auth "github.com/nilslice/jwt"
8 | "fmt"
9 | "net/http"
10 | "strings"
11 | "time"
12 | )
13 |
14 | func main() {
15 | http.HandleFunc("/auth/new", func(res http.ResponseWriter, req *http.Request) {
16 | claims := map[string]interface{}{"exp": time.Now().Add(time.Hour * 24).Unix()}
17 | token, err := auth.New(claims)
18 | if err != nil {
19 | http.Error(res, "Error", 500)
20 | return
21 | }
22 | res.Header().Add("Authorization", "Bearer "+token)
23 |
24 | res.WriteHeader(http.StatusOK)
25 | })
26 |
27 | http.HandleFunc("/auth", func(res http.ResponseWriter, req *http.Request) {
28 | userToken := strings.Split(req.Header.Get("Authorization"), " ")[1]
29 |
30 | if auth.Passes(userToken) {
31 | fmt.Println("ok")
32 | } else {
33 | fmt.Println("no")
34 | }
35 | })
36 |
37 | http.ListenAndServe(":8080", nil)
38 | }
39 | */
40 | package jwt
41 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/management/format/csv.go:
--------------------------------------------------------------------------------
1 | // Package format provides interfaces to format content into various kinds of
2 | // data
3 | package format
4 |
5 | // CSVFormattable is implemented with the method FormatCSV, which must return the ordered
6 | // slice of JSON struct tag names for the type implmenting it
7 | type CSVFormattable interface {
8 | FormatCSV() []string
9 | }
10 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/filesystem.go:
--------------------------------------------------------------------------------
1 | package admin
2 |
3 | import (
4 | "net/http"
5 | "os"
6 | )
7 |
8 | func restrict(dir http.Dir) justFilesFilesystem {
9 | return justFilesFilesystem{dir}
10 | }
11 |
12 | // the code below removes the open directory listing when accessing a URL which
13 | // normally would point to a directory. code from golang-nuts mailing list:
14 | // https://groups.google.com/d/msg/golang-nuts/bStLPdIVM6w/hidTJgDZpHcJ
15 | // credit: Brad Fitzpatrick (c) 2012
16 |
17 | type justFilesFilesystem struct {
18 | fs http.FileSystem
19 | }
20 |
21 | func (fs justFilesFilesystem) Open(name string) (http.File, error) {
22 | f, err := fs.fs.Open(name)
23 | if err != nil {
24 | return nil, err
25 | }
26 | return neuteredReaddirFile{f}, nil
27 | }
28 |
29 | type neuteredReaddirFile struct {
30 | http.File
31 | }
32 |
33 | func (f neuteredReaddirFile) Readdir(count int) ([]os.FileInfo, error) {
34 | return nil, nil
35 | }
36 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/css/material-icons.css:
--------------------------------------------------------------------------------
1 | /* fallback */
2 | @font-face {
3 | font-family: 'Material Icons';
4 | font-style: normal;
5 | font-weight: 400;
6 | src: local('Material Icons'), local('MaterialIcons-Regular'), url('../fonts/icons-regular.woff2') format('woff2');
7 | }
8 |
9 | .material-icons {
10 | font-family: 'Material Icons';
11 | font-weight: normal;
12 | font-style: normal;
13 | font-size: 24px;
14 | line-height: 1;
15 | letter-spacing: normal;
16 | text-transform: none;
17 | display: inline-block;
18 | white-space: nowrap;
19 | word-wrap: normal;
20 | direction: ltr;
21 | -webkit-font-feature-settings: 'liga';
22 | -webkit-font-smoothing: antialiased;
23 | }
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/icons-regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/icons-regular.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Bold.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Bold.eot
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Bold.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Bold.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Bold.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Light.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Light.eot
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Light.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Light.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Light.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Medium.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Medium.eot
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Medium.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Medium.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Regular.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Regular.eot
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Regular.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Regular.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Thin.eot:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Thin.eot
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Thin.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Thin.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Thin.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Thin.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/fonts/roboto/Roboto-Thin.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/img/ponzu-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/dashboard/img/ponzu-file.png
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Bold.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Bold.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Bold.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Bold.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Light.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Light.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Light.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Light.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Light.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Light.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Medium.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Medium.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Medium.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Medium.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Regular.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Regular.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Regular.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Regular.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Thin.ttf:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Thin.ttf
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Thin.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Thin.woff
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Thin.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/font/roboto/Roboto-Thin.woff2
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/license.txt:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2015 CK
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
13 | all 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
21 | THE SOFTWARE.
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_dropdown.scss:
--------------------------------------------------------------------------------
1 | .dropdown-content {
2 | @extend .z-depth-1;
3 | background-color: $dropdown-bg-color;
4 | margin: 0;
5 | display: none;
6 | min-width: 100px;
7 | max-height: 650px;
8 | overflow-y: auto;
9 | opacity: 0;
10 | position: absolute;
11 | z-index: 999;
12 | will-change: width, height;
13 |
14 | li {
15 | clear: both;
16 | color: $off-black;
17 | cursor: pointer;
18 | line-height: 1.5rem;
19 | width: 100%;
20 | text-align: left;
21 | text-transform: none;
22 |
23 | &:hover, &.active {
24 | background-color: $dropdown-hover-bg-color;
25 | }
26 |
27 | & > a, & > span {
28 | font-size: 1.2rem;
29 | color: $dropdown-color;
30 | display: block;
31 | padding: 1rem 1rem;
32 | }
33 |
34 | // Icon alignment override
35 | & > a > i {
36 | height: inherit;
37 | line-height: inherit;
38 | }
39 | }
40 | }
41 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_materialbox.scss:
--------------------------------------------------------------------------------
1 | .materialboxed {
2 | cursor: zoom-in;
3 | position: relative;
4 | @include transition(opacity .4s);
5 |
6 | &:hover {
7 | &:not(.active) {
8 | opacity: .8;
9 | }
10 | will-change: left, top, width, height;
11 | }
12 | }
13 |
14 | .materialboxed.active {
15 | cursor: zoom-out;
16 | }
17 |
18 | #materialbox-overlay {
19 | position:fixed;
20 | top:0;
21 | left:0;
22 | right: 0;
23 | bottom: 0;
24 | background-color: #292929;
25 | z-index: 999;
26 |
27 | will-change: opacity;
28 | }
29 | .materialbox-caption {
30 | position: fixed;
31 | display: none;
32 | color: #fff;
33 | line-height: 50px;
34 | bottom: 0;
35 | width: 100%;
36 | text-align: center;
37 | padding: 0% 15%;
38 | height: 50px;
39 | z-index: 1000;
40 | -webkit-font-smoothing: antialiased;
41 | }
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_mixins.scss:
--------------------------------------------------------------------------------
1 | @mixin box-shadow-2($args1, $args2) {
2 | -webkit-box-shadow: $args1, $args2;
3 | -moz-box-shadow: $args1, $args2;
4 | box-shadow: $args1, $args2;
5 | }
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_modal.scss:
--------------------------------------------------------------------------------
1 | .modal {
2 | @extend .z-depth-4;
3 |
4 | display: none;
5 | position: fixed;
6 | left: 0;
7 | right: 0;
8 | background-color: #fafafa;
9 | padding: 0;
10 | max-height: 70%;
11 | width: 55%;
12 | margin: auto;
13 | overflow-y: auto;
14 |
15 | border-radius: 2px;
16 | will-change: top, opacity;
17 |
18 | @media #{$medium-and-down} {
19 | width: 80%;
20 | }
21 |
22 | h1,h2,h3,h4 {
23 | margin-top: 0;
24 | }
25 |
26 | .modal-content {
27 | padding: 24px;
28 | }
29 | .modal-close {
30 | cursor: pointer;
31 | }
32 |
33 | .modal-footer {
34 | border-radius: 0 0 2px 2px;
35 | background-color: #fafafa;
36 | padding: 4px 6px;
37 | height: 56px;
38 | width: 100%;
39 |
40 | .btn, .btn-flat {
41 | float: right;
42 | margin: 6px 0;
43 | }
44 | }
45 | }
46 | .lean-overlay {
47 | position: fixed;
48 | z-index:999;
49 | top: -100px;
50 | left: 0;
51 | bottom: 0;
52 | right: 0;
53 | height: 125%;
54 | width: 100%;
55 | background: #000;
56 | display: none;
57 |
58 | will-change: opacity;
59 | }
60 |
61 | // Modal with fixed action footer
62 | .modal.modal-fixed-footer {
63 | padding: 0;
64 | height: 70%;
65 |
66 | .modal-content {
67 | position: absolute;
68 | height: calc(100% - 56px);
69 | max-height: 100%;
70 | width: 100%;
71 | overflow-y: auto;
72 | }
73 |
74 | .modal-footer {
75 | border-top: 1px solid rgba(0,0,0,.1);
76 | position: absolute;
77 | bottom: 0;
78 | }
79 | }
80 |
81 | // Modal Bottom Sheet Style
82 | .modal.bottom-sheet {
83 | top: auto;
84 | bottom: -100%;
85 | margin: 0;
86 | width: 100%;
87 | max-height: 45%;
88 | border-radius: 0;
89 | will-change: bottom, opacity;
90 | }
91 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_roboto.scss:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: "Roboto";
3 | src: url("#{$roboto-font-path}Roboto-Thin.woff2") format("woff2"),
4 | url("#{$roboto-font-path}Roboto-Thin.woff") format("woff"),
5 | url("#{$roboto-font-path}Roboto-Thin.ttf") format("truetype");
6 | font-weight: 200;
7 | }
8 | @font-face {
9 | font-family: "Roboto";
10 | src: url("#{$roboto-font-path}Roboto-Light.woff2") format("woff2"),
11 | url("#{$roboto-font-path}Roboto-Light.woff") format("woff"),
12 | url("#{$roboto-font-path}Roboto-Light.ttf") format("truetype");
13 | font-weight: 300;
14 | }
15 |
16 | @font-face {
17 | font-family: "Roboto";
18 | src: url("#{$roboto-font-path}Roboto-Regular.woff2") format("woff2"),
19 | url("#{$roboto-font-path}Roboto-Regular.woff") format("woff"),
20 | url("#{$roboto-font-path}Roboto-Regular.ttf") format("truetype");
21 | font-weight: 400;
22 | }
23 |
24 | @font-face {
25 | font-family: "Roboto";
26 | src: url("#{$roboto-font-path}Roboto-Medium.woff2") format("woff2"),
27 | url("#{$roboto-font-path}Roboto-Medium.woff") format("woff"),
28 | url("#{$roboto-font-path}Roboto-Medium.ttf") format("truetype");
29 | font-weight: 500;
30 | }
31 |
32 | @font-face {
33 | font-family: "Roboto";
34 | src: url("#{$roboto-font-path}Roboto-Bold.woff2") format("woff2"),
35 | url("#{$roboto-font-path}Roboto-Bold.woff") format("woff"),
36 | url("#{$roboto-font-path}Roboto-Bold.ttf") format("truetype");
37 | font-weight: 700;
38 | }
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_slider.scss:
--------------------------------------------------------------------------------
1 | .slider {
2 | position: relative;
3 | height: 400px;
4 | width: 100%;
5 |
6 | // Fullscreen slider
7 | &.fullscreen {
8 | height: 100%;
9 | width: 100%;
10 | position: absolute;
11 | top: 0;
12 | left: 0;
13 | right: 0;
14 | bottom: 0;
15 |
16 | ul.slides {
17 | height: 100%;
18 | }
19 |
20 | ul.indicators {
21 | z-index: 2;
22 | bottom: 30px;
23 | }
24 | }
25 |
26 | .slides {
27 | background-color: $slider-bg-color;
28 | margin: 0;
29 | height: 400px;
30 |
31 | li {
32 | opacity: 0;
33 | position: absolute;
34 | top: 0;
35 | left: 0;
36 | z-index: 1;
37 | width: 100%;
38 | height: inherit;
39 | overflow: hidden;
40 |
41 | img {
42 | height: 100%;
43 | width: 100%;
44 | background-size: cover;
45 | background-position: center;
46 | }
47 |
48 | .caption {
49 | color: #fff;
50 | position: absolute;
51 | top: 15%;
52 | left: 15%;
53 | width: 70%;
54 | opacity: 0;
55 |
56 | p { color: $slider-bg-color-light; }
57 | }
58 |
59 | &.active {
60 | z-index: 2;
61 | }
62 | }
63 | }
64 |
65 |
66 | .indicators {
67 | position: absolute;
68 | text-align: center;
69 | left: 0;
70 | right: 0;
71 | bottom: 0;
72 | margin: 0;
73 |
74 | .indicator-item {
75 | display: inline-block;
76 | position: relative;
77 | cursor: pointer;
78 | height: 16px;
79 | width: 16px;
80 | margin: 0 12px;
81 | background-color: $slider-bg-color-light;
82 |
83 | @include transition(background-color .3s);
84 | border-radius: 50%;
85 |
86 | &.active {
87 | background-color: $slider-indicator-color;
88 | }
89 | }
90 | }
91 |
92 | }
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_table_of_contents.scss:
--------------------------------------------------------------------------------
1 | /***************
2 | Nav List
3 | ***************/
4 | .table-of-contents {
5 | &.fixed {
6 | position: fixed;
7 | }
8 |
9 | li {
10 | padding: 2px 0;
11 | }
12 | a {
13 | display: inline-block;
14 | font-weight: 300;
15 | color: #757575;
16 | padding-left: 20px;
17 | height: 1.5rem;
18 | line-height: 1.5rem;
19 | letter-spacing: .4;
20 | display: inline-block;
21 |
22 | &:hover {
23 | color: lighten(#757575, 20%);
24 | padding-left: 19px;
25 | border-left: 1px solid lighten(color("materialize-red", "base"),10%);
26 | }
27 | &.active {
28 | font-weight: 500;
29 | padding-left: 18px;
30 | border-left: 2px solid lighten(color("materialize-red", "base"),10%);
31 | }
32 | }
33 | }
34 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_tabs.scss:
--------------------------------------------------------------------------------
1 | .tabs {
2 | position: relative;
3 | height: 48px;
4 | background-color: $tabs-bg-color;
5 | margin: 0 auto;
6 | width: 100%;
7 | white-space: nowrap;
8 |
9 | .tab {
10 | display: block;
11 | float: left;
12 | text-align: center;
13 | line-height: 48px;
14 | height: 48px;
15 | padding: 0 20px;
16 | margin: 0;
17 | text-transform: uppercase;
18 | letter-spacing: .8px;
19 | width: 15%;
20 |
21 | a {
22 | color: $tabs-text-color;
23 | display: block;
24 | width: 100%;
25 | height: 100%;
26 | @include transition( color .28s ease);
27 | &:hover {
28 | color: lighten($tabs-text-color, 20%);
29 | }
30 | }
31 |
32 | &.disabled a {
33 | color: lighten($tabs-text-color, 20%);
34 | cursor: default;
35 | }
36 | }
37 | .indicator {
38 | position: absolute;
39 | bottom: 0;
40 | height: 2px;
41 | background-color: $tabs-underline-color;
42 | will-change: left, right;
43 | }
44 | }
45 |
46 | .tabs .tab { padding: 0; }
47 |
48 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_toast.scss:
--------------------------------------------------------------------------------
1 | #toast-container {
2 | display:block;
3 | position: fixed;
4 | z-index: 1001;
5 |
6 | @media #{$small-and-down} {
7 | min-width: 100%;
8 | bottom: 0%;
9 | }
10 | @media #{$medium-only} {
11 | min-width: 30%;
12 | left: 5%;
13 | bottom: 7%;
14 | }
15 | @media #{$large-and-up} {
16 | min-width: 8%;
17 | top: 10%;
18 | right: 7%;
19 | }
20 | }
21 |
22 | .toast {
23 | @extend .z-depth-1;
24 | border-radius: 2px;
25 | top: 0;
26 | width: auto;
27 | clear: both;
28 | margin-top: 10px;
29 | position: relative;
30 | max-width:100%;
31 | height: $toast-height;
32 | line-height: $toast-height;
33 | background-color: $toast-color;
34 | padding: 0 25px;
35 | font-size: 1.1rem;
36 | font-weight: 300;
37 | color: $toast-text-color;
38 |
39 | @include flexbox();
40 | @include align(center);
41 | @include justify-content(space-between);
42 |
43 | .btn, .btn-flat {
44 | margin: 0;
45 | margin-left: 3rem;
46 | }
47 |
48 | &.rounded{
49 | border-radius: 24px;
50 | }
51 |
52 | @media #{$small-and-down} {
53 | width:100%;
54 | border-radius: 0;
55 | }
56 | @media #{$medium-only} {
57 | float: left;
58 | }
59 | @media #{$large-and-up} {
60 | float: right;
61 | }
62 |
63 | }
64 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_tooltip.scss:
--------------------------------------------------------------------------------
1 | .material-tooltip {
2 | padding: 10px 8px;
3 | font-size: 1rem;
4 | z-index: 2000;
5 | background-color: transparent;
6 | border-radius: 2px;
7 | color: #fff;
8 | min-height: 36px;
9 | line-height: 1rem;
10 | // max-width: 350px;
11 | opacity: 0;
12 | display: none;
13 | position: absolute;
14 | text-align: center;
15 | overflow: hidden;
16 | left:0;
17 | top:0;
18 |
19 | will-change: top, left;
20 | }
21 |
22 | .backdrop {
23 | position: absolute;
24 | opacity: 0;
25 | display: none;
26 | height: 7px;
27 | width: 14px;
28 | border-radius: 0 0 14px 14px;
29 | background-color: #323232;
30 | z-index: -1;
31 | @include transform-origin( 50% 10%);
32 |
33 | will-change: transform, opacity;
34 | }
35 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/components/_typography.scss:
--------------------------------------------------------------------------------
1 | a {
2 | text-decoration: none;
3 | }
4 |
5 | html{
6 | line-height: 1.5;
7 |
8 | @media only screen and (min-width: 0) {
9 | font-size: 14px;
10 | }
11 |
12 | @media only screen and (min-width: $medium-screen) {
13 | font-size: 14.5px;
14 | }
15 |
16 | @media only screen and (min-width: $large-screen) {
17 | font-size: 15px;
18 | }
19 |
20 | font-family: "Roboto", sans-serif;
21 | font-weight: normal;
22 | color: $off-black;
23 | }
24 | h1, h2, h3, h4, h5, h6 {
25 | font-weight: 400;
26 | line-height: 1.1;
27 | }
28 |
29 | // Header Styles
30 | h1 a, h2 a, h3 a, h4 a, h5 a, h6 a { font-weight: inherit; }
31 | h1 { font-size: $h1-fontsize; line-height: 110%; margin: ($h1-fontsize / 2) 0 ($h1-fontsize / 2.5) 0;}
32 | h2 { font-size: $h2-fontsize; line-height: 110%; margin: ($h2-fontsize / 2) 0 ($h2-fontsize / 2.5) 0;}
33 | h3 { font-size: $h3-fontsize; line-height: 110%; margin: ($h3-fontsize / 2) 0 ($h3-fontsize / 2.5) 0;}
34 | h4 { font-size: $h4-fontsize; line-height: 110%; margin: ($h4-fontsize / 2) 0 ($h4-fontsize / 2.5) 0;}
35 | h5 { font-size: $h5-fontsize; line-height: 110%; margin: ($h5-fontsize / 2) 0 ($h5-fontsize / 2.5) 0;}
36 | h6 { font-size: $h6-fontsize; line-height: 110%; margin: ($h6-fontsize / 2) 0 ($h6-fontsize / 2.5) 0;}
37 |
38 | // Text Styles
39 | em { font-style: italic; }
40 | strong { font-weight: 500; }
41 | small { font-size: 75%; }
42 | .light { font-weight: 300; }
43 | .thin { font-weight: 200; }
44 |
45 | .flow-text{
46 | font-weight: 300;
47 | $i: 0;
48 | @while $i <= $intervals {
49 | @media only screen and (min-width : 360 + ($i * $interval-size)) {
50 | font-size: 1.2rem * (1 + (.02 * $i));
51 | }
52 | $i: $i + 1;
53 | }
54 | // Handle below 360px screen
55 | @media only screen and (max-width: 360px) {
56 | font-size: 1.2rem;
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/static/editor/sass/materialize.scss:
--------------------------------------------------------------------------------
1 | @charset "UTF-8";
2 |
3 | // Mixins
4 | @import "components/prefixer";
5 | @import "components/mixins";
6 | @import "components/color";
7 |
8 | // Variables;
9 | @import "components/variables";
10 |
11 | // Reset
12 | @import "components/normalize";
13 |
14 | // components
15 | @import "components/global";
16 | @import "components/icons-material-design";
17 | @import "components/grid";
18 | @import "components/navbar";
19 | @import "components/roboto";
20 | @import "components/typography";
21 | @import "components/cards";
22 | @import "components/toast";
23 | @import "components/tabs";
24 | @import "components/tooltip";
25 | @import "components/buttons";
26 | @import "components/dropdown";
27 | @import "components/waves";
28 | @import "components/modal";
29 | @import "components/collapsible";
30 | @import "components/materialbox";
31 | @import "components/form";
32 | @import "components/table_of_contents";
33 | @import "components/sideNav";
34 | @import "components/preloader";
35 | @import "components/slider";
36 | @import "components/date_picker/default.scss";
37 | @import "components/date_picker/default.date.scss";
38 | @import "components/date_picker/default.time.scss";
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/admin/upload/backup.go:
--------------------------------------------------------------------------------
1 | package upload
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "io"
7 | "net/http"
8 | "os"
9 | "path/filepath"
10 | "time"
11 |
12 | "github.com/ponzu-cms/ponzu/system/backup"
13 | )
14 |
15 | // Backup creates an archive of a project's uploads and writes it
16 | // to the response as a download
17 | func Backup(ctx context.Context, res http.ResponseWriter) error {
18 | ts := time.Now().Unix()
19 | filename := fmt.Sprintf("uploads-%d.bak.tar.gz", ts)
20 | tmp := os.TempDir()
21 | bk := filepath.Join(tmp, filename)
22 |
23 | // create uploads-{stamp}.bak.tar.gz
24 | f, err := os.Create(bk)
25 | if err != nil {
26 | return err
27 | }
28 |
29 | err = backup.ArchiveFS(ctx, "uploads", f)
30 |
31 | err = f.Close()
32 | if err != nil {
33 | return err
34 | }
35 |
36 | // write data to response
37 | data, err := os.Open(bk)
38 | if err != nil {
39 | return err
40 | }
41 | defer data.Close()
42 | defer os.Remove(bk)
43 |
44 | disposition := `attachment; filename=%s`
45 | info, err := data.Stat()
46 | if err != nil {
47 | return err
48 | }
49 |
50 | res.Header().Set("Content-Type", "application/octet-stream")
51 | res.Header().Set("Content-Disposition", fmt.Sprintf(disposition, ts))
52 | res.Header().Set("Content-Length", fmt.Sprintf("%d", info.Size()))
53 |
54 | _, err = io.Copy(res, data)
55 |
56 | return err
57 | }
58 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/api/analytics/backup.go:
--------------------------------------------------------------------------------
1 | package analytics
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "net/http"
7 | "time"
8 |
9 | "github.com/boltdb/bolt"
10 | )
11 |
12 | // Backup writes a snapshot of the system.db database to an HTTP response. The
13 | // output is discarded if we get a cancellation signal.
14 | func Backup(ctx context.Context, res http.ResponseWriter) error {
15 | errChan := make(chan error, 1)
16 |
17 | go func() {
18 | errChan <- store.View(func(tx *bolt.Tx) error {
19 | ts := time.Now().Unix()
20 | disposition := `attachment; filename="analytics-%d.db.bak"`
21 |
22 | res.Header().Set("Content-Type", "application/octet-stream")
23 | res.Header().Set("Content-Disposition", fmt.Sprintf(disposition, ts))
24 | res.Header().Set("Content-Length", fmt.Sprintf("%d", int(tx.Size())))
25 |
26 | _, err := tx.WriteTo(res)
27 | return err
28 | })
29 | }()
30 |
31 | select {
32 | case <-ctx.Done():
33 | return ctx.Err()
34 | case err := <-errChan:
35 | return err
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/api/gzip.go:
--------------------------------------------------------------------------------
1 | package api
2 |
3 | import (
4 | "compress/gzip"
5 | "net/http"
6 | "strings"
7 |
8 | "github.com/ponzu-cms/ponzu/system/db"
9 | )
10 |
11 | // Gzip wraps a HandlerFunc to compress responses when possible
12 | func Gzip(next http.HandlerFunc) http.HandlerFunc {
13 | return http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
14 | if db.ConfigCache("gzip_disabled").(bool) == true {
15 | next.ServeHTTP(res, req)
16 | return
17 | }
18 |
19 | // check if req header content-encoding supports gzip
20 | if strings.Contains(req.Header.Get("Accept-Encoding"), "gzip") {
21 | // gzip response data
22 | res.Header().Set("Content-Encoding", "gzip")
23 | gzWriter := gzip.NewWriter(res)
24 | defer gzWriter.Close()
25 | var gzres gzipResponseWriter
26 | if pusher, ok := res.(http.Pusher); ok {
27 | gzres = gzipResponseWriter{res, pusher, gzWriter}
28 | } else {
29 | gzres = gzipResponseWriter{res, nil, gzWriter}
30 | }
31 |
32 | next.ServeHTTP(gzres, req)
33 | return
34 | }
35 |
36 | next.ServeHTTP(res, req)
37 | })
38 | }
39 |
40 | type gzipResponseWriter struct {
41 | http.ResponseWriter
42 | pusher http.Pusher
43 |
44 | gw *gzip.Writer
45 | }
46 |
47 | func (gzw gzipResponseWriter) Write(p []byte) (int, error) {
48 | return gzw.gw.Write(p)
49 | }
50 |
51 | func (gzw gzipResponseWriter) Push(target string, opts *http.PushOptions) error {
52 | if gzw.pusher == nil {
53 | return nil
54 | }
55 |
56 | if opts == nil {
57 | opts = &http.PushOptions{
58 | Header: make(http.Header),
59 | }
60 | }
61 |
62 | opts.Header.Set("Accept-Encoding", "gzip")
63 |
64 | return gzw.pusher.Push(target, opts)
65 | }
66 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/api/hide.go:
--------------------------------------------------------------------------------
1 | package api
2 |
3 | import (
4 | "net/http"
5 |
6 | "github.com/ponzu-cms/ponzu/system/item"
7 | )
8 |
9 | func hide(res http.ResponseWriter, req *http.Request, it interface{}) bool {
10 | // check if should be hidden
11 | if h, ok := it.(item.Hideable); ok {
12 | err := h.Hide(res, req)
13 | if err == item.ErrAllowHiddenItem {
14 | return false
15 | }
16 |
17 | if err != nil {
18 | res.WriteHeader(http.StatusInternalServerError)
19 | return true
20 | }
21 |
22 | res.WriteHeader(http.StatusNotFound)
23 | return true
24 | }
25 |
26 | return false
27 | }
28 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/api/json.go:
--------------------------------------------------------------------------------
1 | package api
2 |
3 | import (
4 | "bytes"
5 | "encoding/json"
6 | "log"
7 | "net/http"
8 | )
9 |
10 | func fmtJSON(data ...json.RawMessage) ([]byte, error) {
11 | var msg = []json.RawMessage{}
12 | for _, d := range data {
13 | msg = append(msg, d)
14 | }
15 |
16 | resp := map[string][]json.RawMessage{
17 | "data": msg,
18 | }
19 |
20 | var buf = &bytes.Buffer{}
21 | enc := json.NewEncoder(buf)
22 | err := enc.Encode(resp)
23 | if err != nil {
24 | log.Println("Failed to encode data to JSON:", err)
25 | return nil, err
26 | }
27 |
28 | return buf.Bytes(), nil
29 | }
30 |
31 | func toJSON(data []string) ([]byte, error) {
32 | var buf = &bytes.Buffer{}
33 | enc := json.NewEncoder(buf)
34 | resp := map[string][]string{
35 | "data": data,
36 | }
37 |
38 | err := enc.Encode(resp)
39 | if err != nil {
40 | log.Println("Failed to encode data to JSON:", err)
41 | return nil, err
42 | }
43 |
44 | return buf.Bytes(), nil
45 | }
46 |
47 | // sendData should be used any time you want to communicate
48 | // data back to a foreign client
49 | func sendData(res http.ResponseWriter, req *http.Request, data []byte) {
50 | res.Header().Set("Content-Type", "application/json")
51 | res.Header().Set("Vary", "Accept-Encoding")
52 |
53 | _, err := res.Write(data)
54 | if err != nil {
55 | log.Println("Error writing to response in sendData")
56 | }
57 | }
58 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/api/omit.go:
--------------------------------------------------------------------------------
1 | package api
2 |
3 | import (
4 | "fmt"
5 | "log"
6 | "net/http"
7 |
8 | "github.com/ponzu-cms/ponzu/system/item"
9 |
10 | "github.com/tidwall/gjson"
11 | "github.com/tidwall/sjson"
12 | )
13 |
14 | func omit(res http.ResponseWriter, req *http.Request, it interface{}, data []byte) ([]byte, error) {
15 | // is it Omittable
16 | om, ok := it.(item.Omittable)
17 | if !ok {
18 | return data, nil
19 | }
20 |
21 | return omitFields(res, req, om, data, "data")
22 | }
23 |
24 | func omitFields(res http.ResponseWriter, req *http.Request, om item.Omittable, data []byte, pathPrefix string) ([]byte, error) {
25 | // get fields to omit from json data
26 | fields, err := om.Omit(res, req)
27 | if err != nil {
28 | return nil, err
29 | }
30 |
31 | // remove each field from json, all responses contain json object(s) in top-level "data" array
32 | n := int(gjson.GetBytes(data, pathPrefix+".#").Int())
33 | for i := 0; i < n; i++ {
34 | for k := range fields {
35 | var err error
36 | data, err = sjson.DeleteBytes(data, fmt.Sprintf("%s.%d.%s", pathPrefix, i, fields[k]))
37 | if err != nil {
38 | log.Println("Erorr omitting field:", fields[k], "from item.Omittable:", om)
39 | return nil, err
40 | }
41 | }
42 | }
43 |
44 | return data, nil
45 | }
46 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/api/push.go:
--------------------------------------------------------------------------------
1 | package api
2 |
3 | import (
4 | "log"
5 | "net/http"
6 | "strings"
7 |
8 | "github.com/ponzu-cms/ponzu/system/item"
9 |
10 | "github.com/tidwall/gjson"
11 | )
12 |
13 | const errRecursivePush = "recursive push not allowed"
14 |
15 | func push(res http.ResponseWriter, req *http.Request, pt interface{}, data []byte) {
16 | // Push(target string, opts *PushOptions) error
17 | if pusher, ok := res.(http.Pusher); ok {
18 | if p, ok := pt.(item.Pushable); ok {
19 | // get fields to pull values from data
20 | fields, err := p.Push(res, req)
21 | if err != nil {
22 | log.Println("[Pushable] error:", err)
23 | return
24 | }
25 |
26 | // parse values from data to push
27 | values := gjson.GetManyBytes(data, fields...)
28 |
29 | // push all values from Pushable items' fields
30 | for i := range values {
31 | val := values[i]
32 | val.ForEach(func(k, v gjson.Result) bool {
33 | if v.String() == "null" {
34 | return true
35 | }
36 |
37 | // check that the push is not to its parent URL
38 | if v.String() == (req.URL.Path + "?" + req.URL.RawQuery) {
39 | return true
40 | }
41 |
42 | err := pusher.Push(v.String(), nil)
43 | // check for error, "http2: recursive push not allowed"
44 | // and return, suppressing a log message
45 | // XXX: errRecursivePush has been co-located to this
46 | // package instead of importing golang.org/x/net/http2
47 | // to get the error itself.
48 | if err != nil && strings.Contains(err.Error(), errRecursivePush) {
49 | return true
50 | }
51 | if err != nil {
52 | log.Println("Error during Push of value:", v.String(), err)
53 | }
54 |
55 | return true
56 | })
57 | }
58 | }
59 | }
60 |
61 | }
62 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/api/record.go:
--------------------------------------------------------------------------------
1 | package api
2 |
3 | import (
4 | "net/http"
5 |
6 | "github.com/ponzu-cms/ponzu/system/api/analytics"
7 | )
8 |
9 | // Record wraps a HandlerFunc to record API requests for analytical purposes
10 | func Record(next http.HandlerFunc) http.HandlerFunc {
11 | return http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
12 | go analytics.Record(req)
13 |
14 | next.ServeHTTP(res, req)
15 | })
16 | }
17 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/api/server.go:
--------------------------------------------------------------------------------
1 | // Package api sets the various API handlers which provide an HTTP interface to
2 | // Ponzu content, and include the types and interfaces to enable client-side
3 | // interactivity with the system.
4 | package api
5 |
6 | import "net/http"
7 |
8 | // Run adds Handlers to default http listener for API
9 | func Run() {
10 | http.HandleFunc("/api/contents", Record(CORS(Gzip(contentsHandler))))
11 |
12 | http.HandleFunc("/api/content", Record(CORS(Gzip(contentHandler))))
13 |
14 | http.HandleFunc("/api/content/create", Record(CORS(createContentHandler)))
15 |
16 | http.HandleFunc("/api/content/update", Record(CORS(updateContentHandler)))
17 |
18 | http.HandleFunc("/api/content/delete", Record(CORS(deleteContentHandler)))
19 |
20 | http.HandleFunc("/api/search", Record(CORS(Gzip(searchContentHandler))))
21 |
22 | http.HandleFunc("/api/uploads", Record(CORS(Gzip(uploadsHandler))))
23 | }
24 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/db/backup.go:
--------------------------------------------------------------------------------
1 | package db
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "net/http"
7 | "time"
8 |
9 | "github.com/boltdb/bolt"
10 | )
11 |
12 | // Backup writes a snapshot of the system.db database to an HTTP response. The
13 | // output is discarded if we get a cancellation signal.
14 | func Backup(ctx context.Context, res http.ResponseWriter) error {
15 | errChan := make(chan error, 1)
16 |
17 | go func() {
18 | errChan <- store.View(func(tx *bolt.Tx) error {
19 | ts := time.Now().Unix()
20 | disposition := `attachment; filename="system-%d.db.bak"`
21 |
22 | res.Header().Set("Content-Type", "application/octet-stream")
23 | res.Header().Set("Content-Disposition", fmt.Sprintf(disposition, ts))
24 | res.Header().Set("Content-Length", fmt.Sprintf("%d", int(tx.Size())))
25 |
26 | _, err := tx.WriteTo(res)
27 | return err
28 | })
29 | }()
30 |
31 | select {
32 | case <-ctx.Done():
33 | return ctx.Err()
34 | case err := <-errChan:
35 | return err
36 | }
37 | }
38 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/db/cache.go:
--------------------------------------------------------------------------------
1 | package db
2 |
3 | import (
4 | "encoding/base64"
5 | "fmt"
6 | "net/http"
7 | "strings"
8 | "time"
9 | )
10 |
11 | // CacheControl sets the default cache policy on static asset responses
12 | func CacheControl(next http.Handler) http.HandlerFunc {
13 | return http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
14 | cacheDisabled := ConfigCache("cache_disabled").(bool)
15 | if cacheDisabled {
16 | res.Header().Add("Cache-Control", "no-cache")
17 | next.ServeHTTP(res, req)
18 | } else {
19 | age := int64(ConfigCache("cache_max_age").(float64))
20 | etag := ConfigCache("etag").(string)
21 | if age == 0 {
22 | age = DefaultMaxAge
23 | }
24 | policy := fmt.Sprintf("max-age=%d, public", age)
25 | res.Header().Add("ETag", etag)
26 | res.Header().Add("Cache-Control", policy)
27 |
28 | if match := req.Header.Get("If-None-Match"); match != "" {
29 | if strings.Contains(match, etag) {
30 | res.WriteHeader(http.StatusNotModified)
31 | return
32 | }
33 | }
34 |
35 | next.ServeHTTP(res, req)
36 | }
37 | })
38 | }
39 |
40 | // NewEtag generates a new Etag for response caching
41 | func NewEtag() string {
42 | now := fmt.Sprintf("%d", time.Now().Unix())
43 | etag := base64.StdEncoding.EncodeToString([]byte(now))
44 |
45 | return etag
46 | }
47 |
48 | // InvalidateCache sets a new Etag for http responses
49 | func InvalidateCache() error {
50 | err := PutConfig("etag", NewEtag())
51 | if err != nil {
52 | return err
53 | }
54 |
55 | return nil
56 | }
57 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/item/types.go:
--------------------------------------------------------------------------------
1 | package item
2 |
3 | import "errors"
4 |
5 | const (
6 | typeNotRegistered = `Error:
7 | There is no type registered for %[1]s
8 |
9 | Add this to the file which defines %[1]s{} in the 'content' package:
10 |
11 |
12 | func init() {
13 | item.Types["%[1]s"] = func() interface{} { return new(%[1]s) }
14 | }
15 |
16 |
17 | `
18 | )
19 |
20 | var (
21 | // ErrTypeNotRegistered means content type isn't registered (not found in Types map)
22 | ErrTypeNotRegistered = errors.New(typeNotRegistered)
23 |
24 | // ErrAllowHiddenItem should be used as an error to tell a caller of Hideable#Hide
25 | // that this type is hidden, but should be shown in a particular case, i.e.
26 | // if requested by a valid admin or user
27 | ErrAllowHiddenItem = errors.New(`Allow hidden item`)
28 |
29 | // Types is a map used to reference a type name to its actual Editable type
30 | // mainly for lookups in /admin route based utilities
31 | Types map[string]func() interface{}
32 | )
33 |
34 | func init() {
35 | Types = make(map[string]func() interface{})
36 | }
37 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/search/backup.go:
--------------------------------------------------------------------------------
1 | package search
2 |
3 | import (
4 | "context"
5 | "fmt"
6 | "io"
7 | "net/http"
8 | "os"
9 | "path/filepath"
10 | "time"
11 |
12 | "github.com/ponzu-cms/ponzu/system/backup"
13 | )
14 |
15 | // Backup creates an archive of a project's search index and writes it
16 | // to the response as a download
17 | func Backup(ctx context.Context, res http.ResponseWriter) error {
18 | ts := time.Now().Unix()
19 | filename := fmt.Sprintf("search-%d.bak.tar.gz", ts)
20 | tmp := os.TempDir()
21 | bk := filepath.Join(tmp, filename)
22 |
23 | // create search-{stamp}.bak.tar.gz
24 | f, err := os.Create(bk)
25 | if err != nil {
26 | return err
27 | }
28 |
29 | backup.ArchiveFS(ctx, "search", f)
30 |
31 | err = f.Close()
32 | if err != nil {
33 | return err
34 | }
35 |
36 | // write data to response
37 | data, err := os.Open(bk)
38 | if err != nil {
39 | return err
40 | }
41 | defer data.Close()
42 | defer os.Remove(bk)
43 |
44 | disposition := `attachment; filename=%s`
45 | info, err := data.Stat()
46 | if err != nil {
47 | return err
48 | }
49 |
50 | res.Header().Set("Content-Type", "application/octet-stream")
51 | res.Header().Set("Content-Disposition", fmt.Sprintf(disposition, ts))
52 | res.Header().Set("Content-Length", fmt.Sprintf("%d", info.Size()))
53 |
54 | _, err = io.Copy(res, data)
55 |
56 | return err
57 | }
58 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/system.go:
--------------------------------------------------------------------------------
1 | // Package system contains a collection of packages that make up the internal
2 | // Ponzu system, which handles addons, administration, the Admin server, the API
3 | // server, analytics, databases, search, TLS, and various internal types.
4 | package system
5 |
6 | import (
7 | "net/http"
8 |
9 | "github.com/ponzu-cms/ponzu/system/db"
10 | )
11 |
12 | // BasicAuth adds HTTP Basic Auth check for requests that should implement it
13 | func BasicAuth(next http.HandlerFunc) http.HandlerFunc {
14 | return http.HandlerFunc(func(res http.ResponseWriter, req *http.Request) {
15 | u := db.ConfigCache("backup_basic_auth_user").(string)
16 | p := db.ConfigCache("backup_basic_auth_password").(string)
17 |
18 | if u == "" || p == "" {
19 | res.WriteHeader(http.StatusForbidden)
20 | return
21 | }
22 |
23 | user, password, ok := req.BasicAuth()
24 |
25 | if !ok {
26 | res.WriteHeader(http.StatusForbidden)
27 | return
28 | }
29 |
30 | if u != user || p != password {
31 | res.WriteHeader(http.StatusUnauthorized)
32 | return
33 | }
34 |
35 | next.ServeHTTP(res, req)
36 | })
37 | }
38 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/ponzu-cms/ponzu/system/tls/enabledev.go:
--------------------------------------------------------------------------------
1 | package tls
2 |
3 | import (
4 | "log"
5 | "net/http"
6 | "os"
7 | "path/filepath"
8 | )
9 |
10 | // EnableDev generates self-signed SSL certificates to use HTTPS & HTTP/2 while
11 | // working in a development environment. The certs are saved in a different
12 | // directory than the production certs (from Let's Encrypt), so that the
13 | // acme/autocert package doesn't mistake them for it's own.
14 | // Additionally, a TLS server is started using the default http mux.
15 | func EnableDev() {
16 | setupDev()
17 |
18 | pwd, err := os.Getwd()
19 | if err != nil {
20 | log.Fatalln("Couldn't find working directory to activate dev certificates:", err)
21 | }
22 |
23 | vendorPath := filepath.Join(pwd, "cmd", "ponzu", "vendor", "github.com", "ponzu-cms", "ponzu", "system", "tls")
24 |
25 | cert := filepath.Join(vendorPath, "devcerts", "cert.pem")
26 | key := filepath.Join(vendorPath, "devcerts", "key.pem")
27 |
28 | log.Fatalln(http.ListenAndServeTLS(":10443", cert, key, nil))
29 | }
30 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/spf13/cobra/.mailmap:
--------------------------------------------------------------------------------
1 | Steve Francia
2 | Bjørn Erik Pedersen
3 | Fabiano Franz
4 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/spf13/cobra/command_notwin.go:
--------------------------------------------------------------------------------
1 | // +build !windows
2 |
3 | package cobra
4 |
5 | var preExecHookFn func(*Command)
6 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/spf13/cobra/command_win.go:
--------------------------------------------------------------------------------
1 | // +build windows
2 |
3 | package cobra
4 |
5 | import (
6 | "os"
7 | "time"
8 |
9 | "github.com/inconshreveable/mousetrap"
10 | )
11 |
12 | var preExecHookFn = preExecHook
13 |
14 | // enables an information splash screen on Windows if the CLI is started from explorer.exe.
15 | var MousetrapHelpText string = `This is a command line tool
16 |
17 | You need to open cmd.exe and run it from there.
18 | `
19 |
20 | func preExecHook(c *Command) {
21 | if mousetrap.StartedByExplorer() {
22 | c.Print(MousetrapHelpText)
23 | time.Sleep(5 * time.Second)
24 | os.Exit(1)
25 | }
26 | }
27 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/spf13/pflag/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2012 Alex Ogier. All rights reserved.
2 | Copyright (c) 2012 The Go Authors. All rights reserved.
3 |
4 | Redistribution and use in source and binary forms, with or without
5 | modification, are permitted provided that the following conditions are
6 | met:
7 |
8 | * Redistributions of source code must retain the above copyright
9 | notice, this list of conditions and the following disclaimer.
10 | * Redistributions in binary form must reproduce the above
11 | copyright notice, this list of conditions and the following disclaimer
12 | in the documentation and/or other materials provided with the
13 | distribution.
14 | * Neither the name of Google Inc. nor the names of its
15 | contributors may be used to endorse or promote products derived from
16 | this software without specific prior written permission.
17 |
18 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
19 | "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
20 | LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
21 | A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
22 | OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
23 | SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
24 | LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 | DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 | THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 | (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
28 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/spf13/pflag/count_test.go:
--------------------------------------------------------------------------------
1 | package pflag
2 |
3 | import (
4 | "os"
5 | "testing"
6 | )
7 |
8 | func setUpCount(c *int) *FlagSet {
9 | f := NewFlagSet("test", ContinueOnError)
10 | f.CountVarP(c, "verbose", "v", "a counter")
11 | return f
12 | }
13 |
14 | func TestCount(t *testing.T) {
15 | testCases := []struct {
16 | input []string
17 | success bool
18 | expected int
19 | }{
20 | {[]string{"-vvv"}, true, 3},
21 | {[]string{"-v", "-v", "-v"}, true, 3},
22 | {[]string{"-v", "--verbose", "-v"}, true, 3},
23 | {[]string{"-v=3", "-v"}, true, 4},
24 | {[]string{"-v=a"}, false, 0},
25 | }
26 |
27 | devnull, _ := os.Open(os.DevNull)
28 | os.Stderr = devnull
29 | for i := range testCases {
30 | var count int
31 | f := setUpCount(&count)
32 |
33 | tc := &testCases[i]
34 |
35 | err := f.Parse(tc.input)
36 | if err != nil && tc.success == true {
37 | t.Errorf("expected success, got %q", err)
38 | continue
39 | } else if err == nil && tc.success == false {
40 | t.Errorf("expected failure, got success")
41 | continue
42 | } else if tc.success {
43 | c, err := f.GetCount("verbose")
44 | if err != nil {
45 | t.Errorf("Got error trying to fetch the counter flag")
46 | }
47 | if c != tc.expected {
48 | t.Errorf("expected %q, got %q", tc.expected, c)
49 | }
50 | }
51 | }
52 | }
53 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/spf13/pflag/example_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2012 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package pflag_test
6 |
7 | import (
8 | "fmt"
9 |
10 | "github.com/spf13/pflag"
11 | )
12 |
13 | func ExampleShorthandLookup() {
14 | name := "verbose"
15 | short := name[:1]
16 |
17 | pflag.BoolP(name, short, false, "verbose output")
18 |
19 | // len(short) must be == 1
20 | flag := pflag.ShorthandLookup(short)
21 |
22 | fmt.Println(flag.Name)
23 | }
24 |
25 | func ExampleFlagSet_ShorthandLookup() {
26 | name := "verbose"
27 | short := name[:1]
28 |
29 | fs := pflag.NewFlagSet("Example", pflag.ContinueOnError)
30 | fs.BoolP(name, short, false, "verbose output")
31 |
32 | // len(short) must be == 1
33 | flag := fs.ShorthandLookup(short)
34 |
35 | fmt.Println(flag.Name)
36 | }
37 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/spf13/pflag/export_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2010 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package pflag
6 |
7 | import (
8 | "io/ioutil"
9 | "os"
10 | )
11 |
12 | // Additional routines compiled into the package only during testing.
13 |
14 | // ResetForTesting clears all flag state and sets the usage function as directed.
15 | // After calling ResetForTesting, parse errors in flag handling will not
16 | // exit the program.
17 | func ResetForTesting(usage func()) {
18 | CommandLine = &FlagSet{
19 | name: os.Args[0],
20 | errorHandling: ContinueOnError,
21 | output: ioutil.Discard,
22 | }
23 | Usage = usage
24 | }
25 |
26 | // GetCommandLine returns the default FlagSet.
27 | func GetCommandLine() *FlagSet {
28 | return CommandLine
29 | }
30 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/spf13/pflag/golangflag_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2009 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package pflag
6 |
7 | import (
8 | goflag "flag"
9 | "testing"
10 | )
11 |
12 | func TestGoflags(t *testing.T) {
13 | goflag.String("stringFlag", "stringFlag", "stringFlag")
14 | goflag.Bool("boolFlag", false, "boolFlag")
15 |
16 | f := NewFlagSet("test", ContinueOnError)
17 |
18 | f.AddGoFlagSet(goflag.CommandLine)
19 | err := f.Parse([]string{"--stringFlag=bob", "--boolFlag"})
20 | if err != nil {
21 | t.Fatal("expected no error; get", err)
22 | }
23 |
24 | getString, err := f.GetString("stringFlag")
25 | if err != nil {
26 | t.Fatal("expected no error; get", err)
27 | }
28 | if getString != "bob" {
29 | t.Fatalf("expected getString=bob but got getString=%s", getString)
30 | }
31 |
32 | getBool, err := f.GetBool("boolFlag")
33 | if err != nil {
34 | t.Fatal("expected no error; get", err)
35 | }
36 | if getBool != true {
37 | t.Fatalf("expected getBool=true but got getBool=%v", getBool)
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/spf13/pflag/ip_test.go:
--------------------------------------------------------------------------------
1 | package pflag
2 |
3 | import (
4 | "fmt"
5 | "net"
6 | "os"
7 | "testing"
8 | )
9 |
10 | func setUpIP(ip *net.IP) *FlagSet {
11 | f := NewFlagSet("test", ContinueOnError)
12 | f.IPVar(ip, "address", net.ParseIP("0.0.0.0"), "IP Address")
13 | return f
14 | }
15 |
16 | func TestIP(t *testing.T) {
17 | testCases := []struct {
18 | input string
19 | success bool
20 | expected string
21 | }{
22 | {"0.0.0.0", true, "0.0.0.0"},
23 | {" 0.0.0.0 ", true, "0.0.0.0"},
24 | {"1.2.3.4", true, "1.2.3.4"},
25 | {"127.0.0.1", true, "127.0.0.1"},
26 | {"255.255.255.255", true, "255.255.255.255"},
27 | {"", false, ""},
28 | {"0", false, ""},
29 | {"localhost", false, ""},
30 | {"0.0.0", false, ""},
31 | {"0.0.0.", false, ""},
32 | {"0.0.0.0.", false, ""},
33 | {"0.0.0.256", false, ""},
34 | {"0 . 0 . 0 . 0", false, ""},
35 | }
36 |
37 | devnull, _ := os.Open(os.DevNull)
38 | os.Stderr = devnull
39 | for i := range testCases {
40 | var addr net.IP
41 | f := setUpIP(&addr)
42 |
43 | tc := &testCases[i]
44 |
45 | arg := fmt.Sprintf("--address=%s", tc.input)
46 | err := f.Parse([]string{arg})
47 | if err != nil && tc.success == true {
48 | t.Errorf("expected success, got %q", err)
49 | continue
50 | } else if err == nil && tc.success == false {
51 | t.Errorf("expected failure")
52 | continue
53 | } else if tc.success {
54 | ip, err := f.GetIP("address")
55 | if err != nil {
56 | t.Errorf("Got error trying to fetch the IP flag: %v", err)
57 | }
58 | if ip.String() != tc.expected {
59 | t.Errorf("expected %q, got %q", tc.expected, ip.String())
60 | }
61 | }
62 | }
63 | }
64 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/tidwall/gjson/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Josh Baker
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | 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, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/tidwall/gjson/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/tidwall/gjson/logo.png
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/tidwall/sjson/.travis.yml:
--------------------------------------------------------------------------------
1 | language: go
2 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/tidwall/sjson/LICENSE:
--------------------------------------------------------------------------------
1 | The MIT License (MIT)
2 |
3 | Copyright (c) 2016 Josh Baker
4 |
5 | Permission is hereby granted, free of charge, to any person obtaining a copy of
6 | this software and associated documentation files (the "Software"), to deal in
7 | the Software without restriction, including without limitation the rights to
8 | use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9 | the Software, and to permit persons to whom the Software is furnished to do so,
10 | 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, FITNESS
17 | FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18 | COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19 | IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20 | CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21 |
22 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/github.com/tidwall/sjson/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/cmd/ponzu/vendor/github.com/tidwall/sjson/logo.png
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/crypto/autocert/cache_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package autocert
6 |
7 | import (
8 | "context"
9 | "io/ioutil"
10 | "os"
11 | "path/filepath"
12 | "reflect"
13 | "testing"
14 | )
15 |
16 | // make sure DirCache satisfies Cache interface
17 | var _ Cache = DirCache("/")
18 |
19 | func TestDirCache(t *testing.T) {
20 | dir, err := ioutil.TempDir("", "autocert")
21 | if err != nil {
22 | t.Fatal(err)
23 | }
24 | defer os.RemoveAll(dir)
25 | dir = filepath.Join(dir, "certs") // a nonexistent dir
26 | cache := DirCache(dir)
27 | ctx := context.Background()
28 |
29 | // test cache miss
30 | if _, err := cache.Get(ctx, "nonexistent"); err != ErrCacheMiss {
31 | t.Errorf("get: %v; want ErrCacheMiss", err)
32 | }
33 |
34 | // test put/get
35 | b1 := []byte{1}
36 | if err := cache.Put(ctx, "dummy", b1); err != nil {
37 | t.Fatalf("put: %v", err)
38 | }
39 | b2, err := cache.Get(ctx, "dummy")
40 | if err != nil {
41 | t.Fatalf("get: %v", err)
42 | }
43 | if !reflect.DeepEqual(b1, b2) {
44 | t.Errorf("b1 = %v; want %v", b1, b2)
45 | }
46 | name := filepath.Join(dir, "dummy")
47 | if _, err := os.Stat(name); err != nil {
48 | t.Error(err)
49 | }
50 |
51 | // test delete
52 | if err := cache.Delete(ctx, "dummy"); err != nil {
53 | t.Fatalf("delete: %v", err)
54 | }
55 | if _, err := cache.Get(ctx, "dummy"); err != ErrCacheMiss {
56 | t.Errorf("get: %v; want ErrCacheMiss", err)
57 | }
58 | }
59 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/crypto/autocert/example_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2017 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package autocert_test
6 |
7 | import (
8 | "crypto/tls"
9 | "fmt"
10 | "log"
11 | "net/http"
12 |
13 | "golang.org/x/crypto/acme/autocert"
14 | )
15 |
16 | func ExampleNewListener() {
17 | mux := http.NewServeMux()
18 | mux.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) {
19 | fmt.Fprintf(w, "Hello, TLS user! Your config: %+v", r.TLS)
20 | })
21 | log.Fatal(http.Serve(autocert.NewListener("example.com"), mux))
22 | }
23 |
24 | func ExampleManager() {
25 | m := &autocert.Manager{
26 | Cache: autocert.DirCache("secret-dir"),
27 | Prompt: autocert.AcceptTOS,
28 | HostPolicy: autocert.HostWhitelist("example.org"),
29 | }
30 | go http.ListenAndServe(":http", m.HTTPHandler(nil))
31 | s := &http.Server{
32 | Addr: ":https",
33 | TLSConfig: &tls.Config{GetCertificate: m.GetCertificate},
34 | }
35 | s.ListenAndServeTLS("", "")
36 | }
37 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/crypto/bcrypt/base64.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package bcrypt
6 |
7 | import "encoding/base64"
8 |
9 | const alphabet = "./ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789"
10 |
11 | var bcEncoding = base64.NewEncoding(alphabet)
12 |
13 | func base64Encode(src []byte) []byte {
14 | n := bcEncoding.EncodedLen(len(src))
15 | dst := make([]byte, n)
16 | bcEncoding.Encode(dst, src)
17 | for dst[n-1] == '=' {
18 | n--
19 | }
20 | return dst[:n]
21 | }
22 |
23 | func base64Decode(src []byte) ([]byte, error) {
24 | numOfEquals := 4 - (len(src) % 4)
25 | for i := 0; i < numOfEquals; i++ {
26 | src = append(src, '=')
27 | }
28 |
29 | dst := make([]byte, bcEncoding.DecodedLen(len(src)))
30 | n, err := bcEncoding.Decode(dst, src)
31 | if err != nil {
32 | return nil, err
33 | }
34 | return dst[:n], nil
35 | }
36 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/net/context/ctxhttp/ctxhttp_17_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2015 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | // +build !plan9,go1.7
6 |
7 | package ctxhttp
8 |
9 | import (
10 | "io"
11 | "net/http"
12 | "net/http/httptest"
13 | "testing"
14 |
15 | "context"
16 | )
17 |
18 | func TestGo17Context(t *testing.T) {
19 | ts := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
20 | io.WriteString(w, "ok")
21 | }))
22 | ctx := context.Background()
23 | resp, err := Get(ctx, http.DefaultClient, ts.URL)
24 | if resp == nil || err != nil {
25 | t.Fatalf("error received from client: %v %v", err, resp)
26 | }
27 | resp.Body.Close()
28 | }
29 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/net/context/withtimeout_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2014 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package context_test
6 |
7 | import (
8 | "fmt"
9 | "time"
10 |
11 | "golang.org/x/net/context"
12 | )
13 |
14 | func ExampleWithTimeout() {
15 | // Pass a context with a timeout to tell a blocking function that it
16 | // should abandon its work after the timeout elapses.
17 | ctx, _ := context.WithTimeout(context.Background(), 100*time.Millisecond)
18 | select {
19 | case <-time.After(200 * time.Millisecond):
20 | fmt.Println("overslept")
21 | case <-ctx.Done():
22 | fmt.Println(ctx.Err()) // prints "context deadline exceeded"
23 | }
24 | // Output:
25 | // context deadline exceeded
26 | }
27 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/text/transform/examples_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2013 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package transform_test
6 |
7 | import (
8 | "fmt"
9 | "unicode"
10 |
11 | "golang.org/x/text/transform"
12 | "golang.org/x/text/unicode/norm"
13 | )
14 |
15 | func ExampleRemoveFunc() {
16 | input := []byte(`tschüß; до свидания`)
17 |
18 | b := make([]byte, len(input))
19 |
20 | t := transform.RemoveFunc(unicode.IsSpace)
21 | n, _, _ := t.Transform(b, input, true)
22 | fmt.Println(string(b[:n]))
23 |
24 | t = transform.RemoveFunc(func(r rune) bool {
25 | return !unicode.Is(unicode.Latin, r)
26 | })
27 | n, _, _ = t.Transform(b, input, true)
28 | fmt.Println(string(b[:n]))
29 |
30 | n, _, _ = t.Transform(b, norm.NFD.Bytes(input), true)
31 | fmt.Println(string(b[:n]))
32 |
33 | // Output:
34 | // tschüß;досвидания
35 | // tschüß
36 | // tschuß
37 | }
38 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/text/unicode/norm/example_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2016 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package norm_test
6 |
7 | import (
8 | "fmt"
9 |
10 | "golang.org/x/text/unicode/norm"
11 | )
12 |
13 | func ExampleNextBoundary() {
14 | s := norm.NFD.String("Mêlée")
15 |
16 | for i := 0; i < len(s); {
17 | d := norm.NFC.NextBoundaryInString(s[i:], true)
18 | fmt.Printf("%[1]s: %+[1]q\n", s[i:i+d])
19 | i += d
20 | }
21 | // Output:
22 | // M: "M"
23 | // ê: "e\u0302"
24 | // l: "l"
25 | // é: "e\u0301"
26 | // e: "e"
27 | }
28 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/text/unicode/norm/norm_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package norm_test
6 |
7 | import (
8 | "testing"
9 | )
10 |
11 | func TestPlaceHolder(t *testing.T) {
12 | // Does nothing, just allows the Makefile to be canonical
13 | // while waiting for the package itself to be written.
14 | }
15 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/text/unicode/norm/readwriter_test.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package norm
6 |
7 | import (
8 | "bytes"
9 | "fmt"
10 | "testing"
11 | )
12 |
13 | var bufSizes = []int{1, 2, 3, 4, 5, 6, 7, 8, 100, 101, 102, 103, 4000, 4001, 4002, 4003}
14 |
15 | func readFunc(size int) appendFunc {
16 | return func(f Form, out []byte, s string) []byte {
17 | out = append(out, s...)
18 | r := f.Reader(bytes.NewBuffer(out))
19 | buf := make([]byte, size)
20 | result := []byte{}
21 | for n, err := 0, error(nil); err == nil; {
22 | n, err = r.Read(buf)
23 | result = append(result, buf[:n]...)
24 | }
25 | return result
26 | }
27 | }
28 |
29 | func TestReader(t *testing.T) {
30 | for _, s := range bufSizes {
31 | name := fmt.Sprintf("TestReader%d", s)
32 | runNormTests(t, name, readFunc(s))
33 | }
34 | }
35 |
36 | func writeFunc(size int) appendFunc {
37 | return func(f Form, out []byte, s string) []byte {
38 | in := append(out, s...)
39 | result := new(bytes.Buffer)
40 | w := f.Writer(result)
41 | buf := make([]byte, size)
42 | for n := 0; len(in) > 0; in = in[n:] {
43 | n = copy(buf, in)
44 | _, _ = w.Write(buf[:n])
45 | }
46 | w.Close()
47 | return result.Bytes()
48 | }
49 | }
50 |
51 | func TestWriter(t *testing.T) {
52 | for _, s := range bufSizes {
53 | name := fmt.Sprintf("TestWriter%d", s)
54 | runNormTests(t, name, writeFunc(s))
55 | }
56 | }
57 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/vendor/golang.org/x/text/unicode/norm/trie.go:
--------------------------------------------------------------------------------
1 | // Copyright 2011 The Go Authors. All rights reserved.
2 | // Use of this source code is governed by a BSD-style
3 | // license that can be found in the LICENSE file.
4 |
5 | package norm
6 |
7 | type valueRange struct {
8 | value uint16 // header: value:stride
9 | lo, hi byte // header: lo:n
10 | }
11 |
12 | type sparseBlocks struct {
13 | values []valueRange
14 | offset []uint16
15 | }
16 |
17 | var nfcSparse = sparseBlocks{
18 | values: nfcSparseValues[:],
19 | offset: nfcSparseOffset[:],
20 | }
21 |
22 | var nfkcSparse = sparseBlocks{
23 | values: nfkcSparseValues[:],
24 | offset: nfkcSparseOffset[:],
25 | }
26 |
27 | var (
28 | nfcData = newNfcTrie(0)
29 | nfkcData = newNfkcTrie(0)
30 | )
31 |
32 | // lookupValue determines the type of block n and looks up the value for b.
33 | // For n < t.cutoff, the block is a simple lookup table. Otherwise, the block
34 | // is a list of ranges with an accompanying value. Given a matching range r,
35 | // the value for b is by r.value + (b - r.lo) * stride.
36 | func (t *sparseBlocks) lookup(n uint32, b byte) uint16 {
37 | offset := t.offset[n]
38 | header := t.values[offset]
39 | lo := offset + 1
40 | hi := lo + uint16(header.lo)
41 | for lo < hi {
42 | m := lo + (hi-lo)/2
43 | r := t.values[m]
44 | if r.lo <= b && b <= r.hi {
45 | return r.value + uint16(b-r.lo)*header.value
46 | }
47 | if b < r.lo {
48 | hi = m
49 | } else {
50 | lo = m + 1
51 | }
52 | }
53 | return 0
54 | }
55 |
--------------------------------------------------------------------------------
/ponzu/cmd/ponzu/version.go:
--------------------------------------------------------------------------------
1 | package main
2 |
3 | import (
4 | "encoding/json"
5 | "fmt"
6 | "io/ioutil"
7 | "os"
8 | "path/filepath"
9 |
10 | "github.com/spf13/cobra"
11 | )
12 |
13 | var versionCmd = &cobra.Command{
14 | Use: "version",
15 | Aliases: []string{"v"},
16 | Short: "Prints the version of Ponzu your project is using.",
17 | Long: `Prints the version of Ponzu your project is using. Must be called from
18 | within a Ponzu project directory.`,
19 | Example: `$ ponzu version
20 | > Ponzu v0.8.2
21 | (or)
22 | $ ponzu version --cli
23 | > Ponzu v0.9.2`,
24 | Run: func(cmd *cobra.Command, args []string) {
25 | p, err := version(cli)
26 | if err != nil {
27 | fmt.Println(err)
28 | os.Exit(1)
29 | }
30 |
31 | fmt.Fprintf(os.Stdout, "Ponzu v%s\n", p["version"])
32 | },
33 | }
34 |
35 | func version(isCLI bool) (map[string]interface{}, error) {
36 | kv := make(map[string]interface{})
37 |
38 | info := filepath.Join("cmd", "ponzu", "ponzu.json")
39 | if isCLI {
40 | gopath, err := getGOPATH()
41 | if err != nil {
42 | return nil, err
43 | }
44 | repo := filepath.Join(gopath, "src", "github.com", "ponzu-cms", "ponzu")
45 | info = filepath.Join(repo, "cmd", "ponzu", "ponzu.json")
46 | }
47 |
48 | b, err := ioutil.ReadFile(info)
49 | if err != nil {
50 | return nil, err
51 | }
52 |
53 | err = json.Unmarshal(b, &kv)
54 | if err != nil {
55 | return nil, err
56 | }
57 |
58 | return kv, nil
59 | }
60 |
61 | func init() {
62 | versionCmd.Flags().BoolVar(&cli, "cli", false, "specify that information should be returned about the CLI, not project")
63 | RegisterCmdlineCommand(versionCmd)
64 | }
65 |
--------------------------------------------------------------------------------
/ponzu/deployment/README.md:
--------------------------------------------------------------------------------
1 | # Deployment
2 |
3 | This is a set of deployment scripts for starting up `ponzu-server` processes on
4 | system boot and run levels.
5 |
6 | To add one for a missing platform / OS, fork the ponzu repository and create a
7 | new pull request with the script inside a directory named by the corresponding
8 | init system.
9 |
10 | Questions? Reach out to [@ponzu_cms](https://twitter.com/ponzu_cms) on Twitter,
11 | or open an issue at https://github.com/ponzu-cms/ponzu
12 |
--------------------------------------------------------------------------------
/ponzu/deployment/sysv/ponzu-server:
--------------------------------------------------------------------------------
1 | #!/bin/sh
2 | ### BEGIN INIT INFO
3 | # Provides: ponzu-server
4 | # Required-Start: $local_fs $network $named $time $syslog
5 | # Required-Stop: $local_fs $network $named $time $syslog
6 | # Default-Start: 2 3 4 5
7 | # Default-Stop: 0 1 6
8 | # Description: Ponzu API & Admin server
9 | ### END INIT INFO
10 |
11 | PROJECT_DIR=
12 | SCRIPT="cd $PROJECT_DIR && ponzu run --port=80" # add --https here to get TLS/HTTPS
13 | RUNAS=
14 |
15 | PIDFILE=/var/run/ponzu-server.pid
16 | LOGFILE=/var/log/ponzu-server.log
17 |
18 | start() {
19 | if [ -f /var/run/$PIDNAME ] && kill -0 $(cat /var/run/$PIDNAME); then
20 | echo 'Service already running' >&2
21 | return 1
22 | fi
23 | echo 'Starting service…' >&2
24 | local CMD="$SCRIPT &> \"$LOGFILE\" & echo \$!"
25 | su -c "$CMD" $RUNAS > "$PIDFILE"
26 | echo 'Service started' >&2
27 | }
28 |
29 | stop() {
30 | if [ ! -f "$PIDFILE" ] || ! kill -0 $(cat "$PIDFILE"); then
31 | echo 'Service not running' >&2
32 | return 1
33 | fi
34 | echo 'Stopping service…' >&2
35 | kill -15 $(cat "$PIDFILE") && rm -f "$PIDFILE"
36 | echo 'Service stopped' >&2
37 | }
38 |
39 | uninstall() {
40 | echo -n "Are you really sure you want to uninstall this service? That cannot be undone. [yes|No] "
41 | local SURE
42 | read SURE
43 | if [ "$SURE" = "yes" ]; then
44 | stop
45 | rm -f "$PIDFILE"
46 | echo "Notice: log file is not be removed: '$LOGFILE'" >&2
47 | update-rc.d -f remove
48 | rm -fv "$0"
49 | fi
50 | }
51 |
52 | case "$1" in
53 | start)
54 | start
55 | ;;
56 | stop)
57 | stop
58 | ;;
59 | uninstall)
60 | uninstall
61 | ;;
62 | restart)
63 | stop
64 | start
65 | ;;
66 | *)
67 | echo "Usage: $0 {start|stop|restart|uninstall}"
68 | esac
69 |
--------------------------------------------------------------------------------
/ponzu/docs/.gitignore:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/.gitignore
--------------------------------------------------------------------------------
/ponzu/docs/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2016 Boss Sauce Creative, LLC.
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/ponzu/docs/README.md:
--------------------------------------------------------------------------------
1 | # Ponzu CMS + Server Framerwork Docs
2 |
3 | ## Contributing
4 |
5 | Documentation contributions are welcome and appreciated. If you find something
6 | lacking in documentation or have submitted a PR that is being merged into master,
7 | please help everyone out and write some docs!
8 |
9 | **Note:** Docker is required to follow these instructions, but you can also use
10 | MkDocs natively, [see details here](http://www.mkdocs.org/#installation). Ponzu
11 | docs use the "Material" [theme](http://squidfunk.github.io/mkdocs-material/).
12 |
13 |
14 | Here is how to run a local docs server and build them for release:
15 |
16 | 1. Clone this repository
17 | ```bash
18 | $ git clone https://github.com/ponzu-cms/docs.git
19 | ```
20 | 2. Start the development server which will watch and auto-build the docs
21 | ```bash
22 | $ docker run --rm -it -p 8000:8000 -v `pwd`:/docs squidfunk/mkdocs-material
23 | ```
24 | 3. Submit a PR with your changes. If you run the build step, please do not add it to the PR.
25 |
26 | **Thank you!**
27 |
--------------------------------------------------------------------------------
/ponzu/docs/build/assets/images/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/assets/images/favicon.ico
--------------------------------------------------------------------------------
/ponzu/docs/build/assets/images/icons/bitbucket-670608a71a.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ponzu/docs/build/assets/images/icons/github-1da075986e.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ponzu/docs/build/assets/images/icons/gitlab-5ad3f9f9e5.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-checkbox.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-file-repeater.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-file-repeater.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-file.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-input-repeater.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-input-repeater.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-input.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-richtext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-richtext.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-select-repeater.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-select-repeater.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-select.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-tags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-tags.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/editor-textarea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/editor-textarea.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/logo.png
--------------------------------------------------------------------------------
/ponzu/docs/build/images/ponzu-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/build/images/ponzu-banner.png
--------------------------------------------------------------------------------
/ponzu/docs/build/mkdocs/js/search-results-template.mustache:
--------------------------------------------------------------------------------
1 |
2 |
3 | {{summary}}
4 |
5 |
--------------------------------------------------------------------------------
/ponzu/docs/mkdocs.yml:
--------------------------------------------------------------------------------
1 | theme: material
2 | site_name: Ponzu
3 | docs_dir: src
4 | site_dir: build
5 | repo_name: ponzu-cms/ponzu
6 | repo_url: https://github.com/ponzu-cms/ponzu
7 |
8 | markdown_extensions:
9 | - codehilite(linenums=false)
10 | - meta
11 | - admonition
12 | - toc(permalink=true)
13 |
14 | google_analytics:
15 | - 'UA-98609560-1'
16 | - auto
17 |
18 | extra:
19 | palette:
20 | primary: grey
21 | accent: light-blue
22 | social:
23 | - type: github
24 | link: https://github.com/ponzu-cms
25 | - type: twitter
26 | link: https://twitter.com/ponzu_cms
27 | logo: images/logo.png
28 |
--------------------------------------------------------------------------------
/ponzu/docs/src/HTTP-APIs/File-Metadata.md:
--------------------------------------------------------------------------------
1 | title: File Metadata HTTP API
2 |
3 | Ponzu provides a read-only HTTP API to get metadata about the files that have been uploaded to your system. As a security and bandwidth abuse precaution, the API is only queryable by "slug" which is the normalized filename of the uploaded file.
4 |
5 | ---
6 |
7 | ### Endpoints
8 |
9 | #### Get File by Slug (single item)
10 | GET `/api/uploads?slug=`
11 |
12 | ##### Sample Response
13 | ```javascript
14 | {
15 | "data": [
16 | {
17 | "uuid": "024a5797-e064-4ee0-abe3-415cb6d3ed18",
18 | "id": 6,
19 | "slug": "filename.jpg",
20 | "timestamp": 1493926453826, // milliseconds since Unix epoch
21 | "updated": 1493926453826,
22 | "name": "filename.jpg",
23 | "path": "/api/uploads/2017/05/filename.jpg",
24 | "content_length": 357557,
25 | "content_type": "image/jpeg",
26 | }
27 | ]
28 | }
29 | ```
--------------------------------------------------------------------------------
/ponzu/docs/src/Interfaces/Format.md:
--------------------------------------------------------------------------------
1 | title: Format Package Interfaces
2 |
3 | Ponzu provides a set of interfaces from the `management/format` package which
4 | determine how content data should be converted and formatted for exporting via
5 | the Admin interface.
6 |
7 | ---
8 |
9 | ## Interfaces
10 |
11 | ### [format.CSVFormattable](https://godoc.org/github.com/ponzu-cms/ponzu/management/format#CSVFormattable)
12 |
13 | CSVFormattable controls if an "Export" button is added to the contents view for
14 | a Content type in the CMS to export the data to CSV. If it is implemented, a
15 | button will be present beneath the "New" button per Content type.
16 |
17 | ##### Method Set
18 |
19 | ```go
20 | type CSVFormattable interface {
21 | FormatCSV() []string
22 | }
23 | ```
24 |
25 | ##### Implementation
26 |
27 | ```go
28 | func (p *Post) FormatCSV() []string {
29 | // []string contains the JSON struct tags generated for your Content type
30 | // implementing the interface
31 | return []string{
32 | "id",
33 | "timestamp",
34 | "slug",
35 | "title",
36 | "photos",
37 | "body",
38 | "written_by",
39 | }
40 | }
41 | ```
42 |
43 | !!! note "FormatCSV() []string"
44 | Just like other Ponzu content extension interfaces, like `Push()`, you will
45 | return the JSON struct tags for the fields you want exported to the CSV file.
46 | These will also be the "header" row in the CSV file to give titles to the file
47 | columns. Keep in mind that all of item.Item's fields are available here as well.
48 |
49 |
--------------------------------------------------------------------------------
/ponzu/docs/src/Ponzu-Addons/Creating-Addons.md:
--------------------------------------------------------------------------------
1 | title: How to create Ponzu Addons
2 |
3 | # Coming soon
4 |
5 | For a reference to creating your own addons, see:
6 | [https://github.com/bosssauce/fbscheduler](https://github.com/bosssauce/fbscheduler)
7 |
--------------------------------------------------------------------------------
/ponzu/docs/src/Ponzu-Addons/Using-Addons.md:
--------------------------------------------------------------------------------
1 | title: How to use Ponzu Addons
2 |
3 | # Coming soon
4 |
5 | For a reference to creating your own addons, see:
6 | [https://github.com/bosssauce/fbscheduler](https://github.com/bosssauce/fbscheduler)
7 |
--------------------------------------------------------------------------------
/ponzu/docs/src/Quickstart/Overview.md:
--------------------------------------------------------------------------------
1 | ### Quickstart Steps
2 | 1) Install [Go 1.8+](https://golang.org/dl/)
3 |
4 | 2) Install Ponzu CLI:
5 | ```bash
6 | $ go get github.com/ponzu-cms/ponzu/…
7 | ```
8 |
9 | 3) Create a new project (path is created in your GOPATH):
10 | ```bash
11 | $ ponzu new github.com/nilslice/reviews
12 | ```
13 |
14 | 4) Enter your new project directory:
15 | ```bash
16 | $ cd $GOPATH/src/github.com/nilslice/reviews
17 | ```
18 |
19 | 5) Generate content type file and boilerplate code (creates `content/review.go`):
20 | ```bash
21 | $ ponzu generate content review title:"string" author:"string" rating:"float64" body:"string":richtext website_url:"string" items:"[]string" photo:string:file
22 | ```
23 |
24 | 6) Build your project:
25 | ```bash
26 | $ ponzu build
27 | ```
28 |
29 | 7) Run your project with defaults:
30 | ```bash
31 | $ ponzu run
32 | ```
33 |
34 | 8) Open browser to [`http://localhost:8080/admin`](http://localhost:8080/admin)
35 |
36 | ### Notes
37 | - One-time initialization to set configuration
38 | - All fields can be changed in Configuration afterward
39 |
--------------------------------------------------------------------------------
/ponzu/docs/src/System-Deployment/Docker.md:
--------------------------------------------------------------------------------
1 | ## Ponzu Docker build
2 |
3 | Ponzu is distributed as a [docker image](https://hub.docker.com/r/ponzu/ponzu/),
4 | which aids in ponzu deployment. The Dockerfile in this directory is used by Ponzu
5 | to generate the docker image which contains the ponzu executable.
6 |
7 | If you are deploying your own Ponzu project, you can write a new Dockerfile that
8 | is based from the `ponzu/ponzu` image of your choice. For example:
9 | ```docker
10 | FROM ponzu/ponzu:latest
11 |
12 | # your project set up ...
13 | # ...
14 | # ...
15 | ```
16 |
17 | ### The following are convenient commands during development of Ponzu core:
18 |
19 | #### Build the docker image. Run from the root of the project.
20 | ```bash
21 | # from the root of ponzu:
22 | docker build -t ponzu-dev
23 | ```
24 |
25 | #### Start the image, share the local directory and pseudo terminal (tty) into for debugging:
26 | ```bash
27 | docker run -v $(pwd):/go/src/github.com/ponzu-cms/ponzu -it ponzu-dev
28 | pwd # will output the go src directory for ponzu
29 | ponzu version # will output the ponzu version
30 | # make an edit on your local and rebuild
31 | go install ./...
32 | ```
33 |
34 | Special thanks to [**@krismeister**](https://github.com/krismeister) for contributing this!
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-checkbox.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-checkbox.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-file-repeater.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-file-repeater.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-file.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-file.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-input-repeater.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-input-repeater.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-input.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-input.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-richtext.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-richtext.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-select-repeater.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-select-repeater.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-select.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-select.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-tags.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-tags.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/editor-textarea.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/editor-textarea.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/logo.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/logo.png
--------------------------------------------------------------------------------
/ponzu/docs/src/images/ponzu-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/docs/src/images/ponzu-banner.png
--------------------------------------------------------------------------------
/ponzu/docs/src/index.md:
--------------------------------------------------------------------------------
1 | # Ponzu CMS + Server Framework Docs
2 |
3 | 
4 |
5 | ## What is Ponzu?
6 |
7 | > Watch the [**video introduction**](https://www.youtube.com/watch?v=T_1ncPoLgrg)
8 |
9 | Ponzu is a powerful and efficient open-source HTTP server framework and CMS. It
10 | provides automatic, free, and secure HTTP/2 over TLS (certificates obtained via
11 | [Let's Encrypt](https://letsencrypt.org)), a useful CMS and scaffolding to generate
12 | content editors, and a fast HTTP API on which to build modern applications.
13 |
14 | Want to jump in right away? Try the [Quickstart](/Quickstart/Overview)
15 |
16 | ### Table of Contents
17 |
18 | 1. [CLI](/CLI/General-Usage/)
19 | 2. [Content](/Content/An-Overview)
20 | 3. [Form Fields](/Form-Fields/HTML-Inputs)
21 | 4. [HTTP API - Content](/HTTP-APIs/Content)
22 | 5. [HTTP API - File Metadata](/HTTP-APIs/File-Metadata)
23 | 6. [HTTP API - Search](/HTTP-APIs/Search)
24 | 7. [Interfaces - API](/Interfaces/API)
25 | 8. [Interfaces - Editor](/Interfaces/Editor)
26 | 9. [Interfaces - Item](/Interfaces/Item)
27 | 10. [Interfaces - Search](/Interfaces/Search)
28 | 11. [Creating Ponzu Addons](/Ponzu-Addons/Creating-Addons)
29 | 12. [Using Ponzu Addons](/Ponzu-Addons/Using-Addons)
30 | 13. [Quickstart](/Quickstart/Overview)
31 | 14. [Backups](/Running-Backups/Backups)
32 | 15. [System Configuration](/System-Configuration/Settings)
33 |
34 |
35 | ### Need help? Get in touch
36 | - Chat: [#ponzu on Slack](https://gophers.slack.com/messages/C3TBV356D)
37 | - Reach out on Twitter: [@ponzu_cms](https://twitter.com/ponzu_cms)
38 | - File an [issue](https://github.com/ponzu-cms/ponzu/issues)
39 |
40 | ---
41 | current version: `v0.9.4` @ ponzu:master
42 |
--------------------------------------------------------------------------------
/ponzu/examples/LICENSE:
--------------------------------------------------------------------------------
1 | BSD 3-Clause License
2 |
3 | Copyright (c) 2016 Boss Sauce Creative, LLC.
4 | All rights reserved.
5 |
6 | Redistribution and use in source and binary forms, with or without
7 | modification, are permitted provided that the following conditions are met:
8 |
9 | * Redistributions of source code must retain the above copyright notice, this
10 | list of conditions and the following disclaimer.
11 |
12 | * Redistributions in binary form must reproduce the above copyright notice,
13 | this list of conditions and the following disclaimer in the documentation
14 | and/or other materials provided with the distribution.
15 |
16 | * Neither the name of the copyright holder nor the names of its
17 | contributors may be used to endorse or promote products derived from
18 | this software without specific prior written permission.
19 |
20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/ponzu/examples/README.md:
--------------------------------------------------------------------------------
1 | ## Examples
2 |
3 | Within this directory, you can find a number of different partial examples which
4 | show how to use Ponzu and its features. The goal of this directory is not to host
5 | full Ponzu projects, but rather just a few files or a package to demonstrate interface
6 | implementation, using hooks, adding new API endpoints, or creating/using addons.
7 |
8 | For full-project examples, please see the [`ponzu-cms/examples`](https://github.com/ponzu-cms/examples) repo.
9 |
10 | If you are making a contribution to the Ponzu project and are introducing a new
11 | feature, it would be very helpful to include an example with a concrete use-case
12 | for this directory.
13 |
14 | ### Table of Contents
15 | 1. [Create content via HTTP API using the `api.Createable` interface](https://github.com/ponzu-cms/ponzu/tree/master/examples/createable)
16 | 2. [Update content via HTTP API using the `api.Updateable` interface](https://github.com/ponzu-cms/ponzu/tree/master/examples/updateable)
17 | 3. [Delete content via HTTP API using the `api.Deleteable` interface](https://github.com/ponzu-cms/ponzu/tree/master/examples/deleteable)
18 |
--------------------------------------------------------------------------------
/ponzu/examples/createable/README.md:
--------------------------------------------------------------------------------
1 | # Createable
2 |
3 | This example shows how to enable outside clients to submit content to your CMS.
4 | All content submitted must be done through a POST request encoded as `multipart/form-data`
5 | to the API endpoint `/api/content/create?type=`
6 |
7 | ## Song example
8 | Imagine an app that lets users add Spotify music to a global playlist, and you need them
9 | to supply songs in the format:
10 | ```go
11 | type Song struct {
12 | item.Item
13 |
14 | Title string `json:"title"`
15 | Artist string `json:"artist"`
16 | Rating int `json:"rating"`
17 | Opinion string `json:"opinion"`
18 | SpotifyURL string `json:"spotify_url"`
19 | }
20 | ```
21 |
22 | See the file `content/song.go` and read the comments to understand the various
23 | methods needed to satisfy required interfaces for this kind of activity.
24 |
25 | ### Overview
26 | 1. Implement `api.Createable` with the `Create(http.ResponseWriter, *http.Request) error` method to allow outside POST requests
27 | 2. Implement `editor.Mergeable` with the `Approve(http.ResponseWriter, *http.Request) error` method so you can control the Approval / Rejection of submitted content OR
28 | 3. Implement `api.Trustable` with the `AutoApprove(http.ResponseWriter, *http.Request) error` method to bypass `Approve` and auto-approve and publish submitted content
29 |
30 | There are various validation and request checks shown in this example as well.
31 | Please feel free to modify and submit a PR for updates or bug fixes!
--------------------------------------------------------------------------------
/ponzu/examples/deleteable/README.md:
--------------------------------------------------------------------------------
1 | # Deleteable
2 |
3 | This example shows how to enable outside clients to delete content from your CMS.
4 | All content deletes must be done through a POST request encoded as `multipart/form-data`
5 | to the API endpoint `/api/content/delete?type=&id=`
6 |
7 | ## Song example
8 | Imagine an app that lets users add Spotify music to a global playlist, and you need them
9 | to supply or remove songs which are in the format:
10 | ```go
11 | type Song struct {
12 | item.Item
13 |
14 | Title string `json:"title"`
15 | Artist string `json:"artist"`
16 | Rating int `json:"rating"`
17 | Opinion string `json:"opinion"`
18 | SpotifyURL string `json:"spotify_url"`
19 | }
20 | ```
21 |
22 | See the file `content/song.go` and read the comments to understand the various
23 | methods needed to satisfy required interfaces for this kind of activity.
24 |
25 | ### Overview
26 | 1. Implement `api.Deleteable` with the `Delete(http.ResponseWriter, *http.Request)` method to allow outside POST requests.
27 | 2. Consistent with the createable example, authentication can be validated in `BeforeAPIDelete(http.ResponseWriter, *http.Request) error`
28 |
29 | There are various validation and request checks shown in this example as well.
30 | Please feel free to modify and submit a PR for updates or bug fixes!
31 |
32 |
--------------------------------------------------------------------------------
/ponzu/examples/updateable/README.md:
--------------------------------------------------------------------------------
1 | # Updateable
2 |
3 | This example shows how to enable outside clients to update content to your CMS.
4 | All content submitted must be done through a POST request encoded as `multipart/form-data`
5 | to the API endpoint `/api/content/update?type=&id=`
6 |
7 | ## Song example
8 | Imagine an app that lets users add Spotify music to a global playlist, and you need them
9 | to supply songs in the format:
10 | ```go
11 | type Song struct {
12 | item.Item
13 |
14 | Title string `json:"title"`
15 | Artist string `json:"artist"`
16 | Rating int `json:"rating"`
17 | Opinion string `json:"opinion"`
18 | SpotifyURL string `json:"spotify_url"`
19 | }
20 | ```
21 |
22 | See the file `content/song.go` and read the comments to understand the various
23 | methods needed to satisfy required interfaces for this kind of activity.
24 |
25 | ### Overview
26 | 1. Implement `api.Updateable` with the `Update(http.ResponseWriter, *http.Request) error` method to allow outside POST requests.
27 | 2. Consistent with the createable example, authentication can be validated in `BeforeAPIUpdate(http.ResponseWriter, *http.Request) error`
28 |
29 | There are various validation and request checks shown in this example as well.
30 | Please feel free to modify and submit a PR for updates or bug fixes!
31 |
32 |
--------------------------------------------------------------------------------
/ponzu/ponzu-banner.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/snipcart/ponzu-hugo-snipcart/feb9768373d7d11da8ed9ac62d2dc9e9e79d44a6/ponzu/ponzu-banner.png
--------------------------------------------------------------------------------