├── .circleci
└── config.yml
├── .editorconfig
├── .gitignore
├── .jshintrc
├── .scss-lint.yml
├── .swift-version
├── .travis.yml
├── API.md
├── CONTRIB.md
├── Design
├── .gitignore
├── .preview
│ └── Sharecuts_Website!sketch
│ │ ├── 01049679-8F18-4D79-A27A-447957EFA000@2x.jpg
│ │ ├── 0D578A0C-742D-4580-AF8E-3E6FF217F910@2x.jpg
│ │ ├── 2A9DB0B9-1717-4D5B-A6D1-18E6D0CFF79E@2x.jpg
│ │ ├── 3C919409-27F1-4D4F-9659-DD12C28C2875@2x.jpg
│ │ ├── 49CFC061-1551-4EF9-B28E-A0656BDF9CA4@2x.jpg
│ │ ├── 4A22EF2A-1413-4991-98AC-AE8C7CB36BC3@2x.jpg
│ │ ├── 591D8D43-9ACD-40BC-8424-49D8ADD0C7C9@2x.jpg
│ │ ├── 5AC04590-7123-458F-BF16-FDCC344356A9@2x.jpg
│ │ ├── 6568D8B4-0C5F-400B-AC46-BBBFBA52D12E@2x.jpg
│ │ ├── 668B2A5E-ACDC-420D-BA6B-4AA0CE853B9D@2x.jpg
│ │ ├── 74D0AC55-C55A-4E0E-8A31-552AB51E6303@2x.jpg
│ │ ├── 7F5A5657-8776-4B77-972A-AB6B9B5488A0@2x.jpg
│ │ ├── 84BA7B4C-BD53-4555-A94D-16FB81ACFA1E@2x.jpg
│ │ ├── 8AF12F69-70DB-4186-98EB-D8314D13836A@2x.jpg
│ │ ├── 8D010C3E-B818-4C3A-B19A-7C27AA6908A5@2x.jpg
│ │ ├── 8E7BB8AF-DB64-4BA1-857A-8B1AAF76D34C@2x.jpg
│ │ ├── B0D20B8E-642A-4EE2-A02F-1D813A10B180@2x.jpg
│ │ ├── B4574D71-A0F6-4A43-9645-3BDA55F63E62@2x.jpg
│ │ ├── C1891922-21F9-4144-B0F8-49A436DC155C@2x.jpg
│ │ ├── DD1113C4-750B-4060-BF7B-AC264E108C0B@2x.jpg
│ │ ├── E71E41F3-E2AF-4A58-ABC4-87E95CC61C7A@2x.jpg
│ │ ├── EEFE6E40-BC54-48AF-A13F-1E1C719E10AA@2x.jpg
│ │ ├── F164E825-82E0-4412-BEF6-8EB9259C967F@2x.jpg
│ │ ├── F887F152-04BB-46AB-860E-2437CB47D531@2x.jpg
│ │ ├── F9ABDC4E-5FB6-4344-B623-AFE158BFAF66@2x.jpg
│ │ ├── FB10B04B-985D-4BEB-BD37-0CB6FA6268E5@2x.jpg
│ │ └── meta.json
└── Sharecuts_Website.sketch
├── Docs
└── Download shortcut shared as a link.txt
├── ISSUE_TEMPLATE.md
├── LICENSE
├── Package.resolved
├── Package.swift
├── Public
├── .gitkeep
├── assets
│ ├── css
│ │ ├── common.css
│ │ ├── common.css.map
│ │ └── inter-ui.css
│ ├── font
│ │ ├── Inter-UI-Black.woff
│ │ ├── Inter-UI-Black.woff2
│ │ ├── Inter-UI-BlackItalic.woff
│ │ ├── Inter-UI-BlackItalic.woff2
│ │ ├── Inter-UI-Bold.woff
│ │ ├── Inter-UI-Bold.woff2
│ │ ├── Inter-UI-BoldItalic.woff
│ │ ├── Inter-UI-BoldItalic.woff2
│ │ ├── Inter-UI-Italic.woff
│ │ ├── Inter-UI-Italic.woff2
│ │ ├── Inter-UI-Medium.woff
│ │ ├── Inter-UI-Medium.woff2
│ │ ├── Inter-UI-MediumItalic.woff
│ │ ├── Inter-UI-MediumItalic.woff2
│ │ ├── Inter-UI-Regular.woff
│ │ └── Inter-UI-Regular.woff2
│ ├── img
│ │ ├── favicon.ico
│ │ ├── i-info.svg
│ │ ├── i-search.svg
│ │ ├── i-upload.svg
│ │ ├── logo-sharecuts.svg
│ │ └── sharecuts-ios-icon.png
│ └── js
│ │ └── app.min.js
├── main.css
├── register.js
└── sharecuts.js
├── README.md
├── Resources
└── Views
│ ├── about.leaf
│ ├── components
│ ├── shortcut-active.leaf
│ ├── shortcut-single.leaf
│ └── shortcuts.leaf
│ ├── feed.xml.leaf
│ ├── index.leaf
│ ├── master.leaf
│ ├── partials
│ ├── foot.leaf
│ ├── footer.leaf
│ ├── head.leaf
│ ├── nav-filters.leaf
│ ├── nav-logo.leaf
│ ├── nav-menu.leaf
│ └── nav.leaf
│ ├── pwned.leaf
│ ├── search.leaf
│ ├── svg
│ ├── i-download.leaf
│ ├── i-info.leaf
│ ├── i-search.leaf
│ ├── i-upload.leaf
│ └── logo-sharecuts.leaf
│ ├── tag.leaf
│ ├── upload.leaf
│ └── users
│ ├── details.leaf
│ ├── indigo.leaf
│ ├── login.leaf
│ └── signup.leaf
├── Sharecuts_PUBLIC.paw
├── Sources
├── App
│ ├── Controllers
│ │ ├── .gitkeep
│ │ ├── InvitesController.swift
│ │ ├── ShortcutsController.swift
│ │ ├── UsersController.swift
│ │ └── WebsiteController.swift
│ ├── Extensions
│ │ ├── Request+RedirectWithMessage.swift
│ │ ├── String+Slug.swift
│ │ └── String+Username.swift
│ ├── Middleware
│ │ └── UserLevelMiddleware.swift
│ ├── Models
│ │ ├── .gitkeep
│ │ ├── API
│ │ │ ├── ChangeTagRequest.swift
│ │ │ ├── CreateShortcutRequest.swift
│ │ │ ├── ModifyShortcutResponse.swift
│ │ │ ├── QueryShortcutsResponse.swift
│ │ │ ├── ShortcutDetailsResponse.swift
│ │ │ ├── TagsResponse.swift
│ │ │ └── UsernameAvailabilityResponse.swift
│ │ ├── Extensions
│ │ │ ├── Response+Contents.swift
│ │ │ ├── Shortcut+DownloadURL.swift
│ │ │ └── Shortcut+VotingCookie.swift
│ │ ├── Invite.swift
│ │ ├── OwnedByUser.swift
│ │ ├── Shortcut.swift
│ │ ├── ShortcutFile.swift
│ │ ├── Tag.swift
│ │ ├── Token.swift
│ │ ├── User.swift
│ │ └── Website
│ │ │ ├── HomeContext.swift
│ │ │ ├── IndigoMigrationContext.swift
│ │ │ ├── IndigoMigrationRequest.swift
│ │ │ ├── JSONFeed.swift
│ │ │ ├── LoginContext.swift
│ │ │ ├── LoginRequest.swift
│ │ │ ├── NavigationContext.swift
│ │ │ ├── ShortcutCard.swift
│ │ │ ├── SignUpContext.swift
│ │ │ ├── SignupData.swift
│ │ │ ├── TagDetailsContext.swift
│ │ │ ├── UploadContext.swift
│ │ │ └── UserDetailsContext.swift
│ ├── Util
│ │ ├── B2Client.swift
│ │ ├── B2Config.swift
│ │ ├── CloudFlareClient.swift
│ │ ├── JobScheduler.swift
│ │ ├── PwnageVerifier.swift
│ │ ├── ShortcutLinkImporter.swift
│ │ └── VotingClient.swift
│ ├── app.swift
│ ├── assets
│ │ ├── img
│ │ │ ├── i-download.svg
│ │ │ ├── i-info.svg
│ │ │ ├── i-search.svg
│ │ │ ├── i-upload.svg
│ │ │ └── logo-sharecuts.svg
│ │ ├── js
│ │ │ ├── _main.js
│ │ │ └── vendor
│ │ │ │ └── bootstrap.custom.js
│ │ └── scss
│ │ │ ├── common
│ │ │ ├── bootstrap
│ │ │ │ ├── _alert.scss
│ │ │ │ ├── _badge.scss
│ │ │ │ ├── _breadcrumb.scss
│ │ │ │ ├── _button-group.scss
│ │ │ │ ├── _buttons.scss
│ │ │ │ ├── _card.scss
│ │ │ │ ├── _carousel.scss
│ │ │ │ ├── _close.scss
│ │ │ │ ├── _code.scss
│ │ │ │ ├── _custom-forms.scss
│ │ │ │ ├── _dropdown.scss
│ │ │ │ ├── _forms.scss
│ │ │ │ ├── _functions.scss
│ │ │ │ ├── _grid.scss
│ │ │ │ ├── _images.scss
│ │ │ │ ├── _input-group.scss
│ │ │ │ ├── _jumbotron.scss
│ │ │ │ ├── _list-group.scss
│ │ │ │ ├── _media.scss
│ │ │ │ ├── _mixins.scss
│ │ │ │ ├── _modal.scss
│ │ │ │ ├── _nav.scss
│ │ │ │ ├── _navbar.scss
│ │ │ │ ├── _pagination.scss
│ │ │ │ ├── _popover.scss
│ │ │ │ ├── _print.scss
│ │ │ │ ├── _progress.scss
│ │ │ │ ├── _reboot.scss
│ │ │ │ ├── _root.scss
│ │ │ │ ├── _tables.scss
│ │ │ │ ├── _tooltip.scss
│ │ │ │ ├── _transitions.scss
│ │ │ │ ├── _type.scss
│ │ │ │ ├── _utilities.scss
│ │ │ │ ├── _variables.scss
│ │ │ │ ├── bootstrap-grid.scss
│ │ │ │ ├── bootstrap-reboot.scss
│ │ │ │ ├── bootstrap.scss
│ │ │ │ ├── mixins
│ │ │ │ │ ├── _alert.scss
│ │ │ │ │ ├── _background-variant.scss
│ │ │ │ │ ├── _badge.scss
│ │ │ │ │ ├── _border-radius.scss
│ │ │ │ │ ├── _box-shadow.scss
│ │ │ │ │ ├── _breakpoints.scss
│ │ │ │ │ ├── _buttons.scss
│ │ │ │ │ ├── _caret.scss
│ │ │ │ │ ├── _clearfix.scss
│ │ │ │ │ ├── _float.scss
│ │ │ │ │ ├── _forms.scss
│ │ │ │ │ ├── _gradients.scss
│ │ │ │ │ ├── _grid-framework.scss
│ │ │ │ │ ├── _grid.scss
│ │ │ │ │ ├── _hover.scss
│ │ │ │ │ ├── _image.scss
│ │ │ │ │ ├── _list-group.scss
│ │ │ │ │ ├── _lists.scss
│ │ │ │ │ ├── _nav-divider.scss
│ │ │ │ │ ├── _pagination.scss
│ │ │ │ │ ├── _reset-text.scss
│ │ │ │ │ ├── _resize.scss
│ │ │ │ │ ├── _screen-reader.scss
│ │ │ │ │ ├── _size.scss
│ │ │ │ │ ├── _table-row.scss
│ │ │ │ │ ├── _text-emphasis.scss
│ │ │ │ │ ├── _text-hide.scss
│ │ │ │ │ ├── _text-truncate.scss
│ │ │ │ │ ├── _transition.scss
│ │ │ │ │ └── _visibility.scss
│ │ │ │ └── utilities
│ │ │ │ │ ├── _align.scss
│ │ │ │ │ ├── _background.scss
│ │ │ │ │ ├── _borders.scss
│ │ │ │ │ ├── _clearfix.scss
│ │ │ │ │ ├── _display.scss
│ │ │ │ │ ├── _embed.scss
│ │ │ │ │ ├── _flex.scss
│ │ │ │ │ ├── _float.scss
│ │ │ │ │ ├── _position.scss
│ │ │ │ │ ├── _screenreaders.scss
│ │ │ │ │ ├── _shadows.scss
│ │ │ │ │ ├── _sizing.scss
│ │ │ │ │ ├── _spacing.scss
│ │ │ │ │ ├── _text.scss
│ │ │ │ │ └── _visibility.scss
│ │ │ ├── common.scss
│ │ │ └── components
│ │ │ │ ├── _base.scss
│ │ │ │ ├── _float-labels.scss
│ │ │ │ ├── _nav.scss
│ │ │ │ ├── _page.scss
│ │ │ │ └── _slick.scss
│ │ │ └── font
│ │ │ └── inter-ui.scss
│ ├── boot.swift
│ ├── configure.swift
│ └── routes.swift
└── Run
│ └── main.swift
├── Tests
├── .gitkeep
├── AppTests
│ └── AppTests.swift
└── LinuxMain.swift
├── cloud.yml
├── gulpfile.js
├── package.json
└── yarn.lock
/.circleci/config.yml:
--------------------------------------------------------------------------------
1 | version: 2
2 |
3 | jobs:
4 | linux:
5 | docker:
6 | - image: swift:4.1
7 | steps:
8 | - checkout
9 | - run:
10 | name: Compile code
11 | command: swift build
12 | - run:
13 | name: Run unit tests
14 | command: swift test
15 |
16 | linux-release:
17 | docker:
18 | - image: swift:4.1
19 | steps:
20 | - checkout
21 | - run:
22 | name: Compile code with optimizations
23 | command: swift build -c release
24 |
25 | workflows:
26 | version: 2
27 | tests:
28 | jobs:
29 | - linux
30 | - linux-release
31 |
32 | nightly:
33 | triggers:
34 | - schedule:
35 | cron: "0 0 * * *"
36 | filters:
37 | branches:
38 | only:
39 | - master
40 | jobs:
41 | - linux
42 | - linux-release
43 |
44 |
--------------------------------------------------------------------------------
/.editorconfig:
--------------------------------------------------------------------------------
1 | # editorconfig.org
2 |
3 | root = true
4 |
5 | [*]
6 | indent_size = 2
7 | indent_style = space
8 |
9 | [*.{html}]
10 | indent_size = 4
11 |
12 | [*.{js,scss,css}]
13 | ident_size = 2
14 |
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | Packages
2 | .build
3 | xcuserdata
4 | *.xcodeproj
5 | DerivedData/
6 | .DS_Store
7 | .env
8 | .idea
9 | Sharecuts.paw
10 | Sharecuts.code-workspace
--------------------------------------------------------------------------------
/.swift-version:
--------------------------------------------------------------------------------
1 | 4.2
--------------------------------------------------------------------------------
/.travis.yml:
--------------------------------------------------------------------------------
1 | os:
2 | - osx
3 | language: generic
4 | sudo: required
5 | dist: trusty
6 |
7 | osx_image: xcode9.4
8 | before_install:
9 | - if [ $TRAVIS_OS_NAME == "osx" ]; then
10 | brew update;
11 | brew tap vapor/tap;
12 | brew update;
13 | brew install vapor;
14 | else
15 | eval "$(curl -sL https://apt.vapor.sh)";
16 | sudo apt-get install vapor;
17 | sudo chmod -R a+rx /usr/;
18 | fi
19 |
20 | script:
21 | - swift build -c release
22 | - swift test
23 |
--------------------------------------------------------------------------------
/CONTRIB.md:
--------------------------------------------------------------------------------
1 | # Contributing
2 |
3 | Sharecuts is written in Swift and it uses the [Vapor](https://vapor.codes) framework.
4 |
5 | ## Production stack
6 |
7 | The app is hosted on a Mac Mini in [MacStadium](https://macstadium.com), running macOS High Sierra. It uses PostgreSQL as its database and [Backblaze B2](https://www.backblaze.com/b2/cloud-storage.html) to store the shortcuts files.
8 |
9 | In production, the app listens on a local port and is started by a launch daemon, to expose the app to the internet, Nginx is used as a proxy. All access to the website and API goes through [CloudFlare](https://cloudflare.com) which is used as a DNS provider, cache, CDN and to protect the app from abuse.
10 |
11 | ## Setting up the environment
12 |
13 | Building and running Sharecuts locally requires the following environment:
14 |
15 | - macOS High Sierra
16 | - Xcode 9 or 10
17 | - Swift 4.1.2 (I recommend using [SwiftEnv](https://github.com/kylef/swiftenv))
18 | - [B2 command line tool](https://www.backblaze.com/b2/docs/quick_command_line.html)
19 | - PostgreSQL (I recommend using [Postgres.app](http://postgresapp.com))
20 |
21 | ## Environment variables
22 |
23 | A `.env` file should be placed in the app's working directory to configure some aspects of the app, here's a brief explanation of the environment variables:
24 |
25 | `DB_HOST`: The Postgres database host (required)
26 |
27 | `DB_PORT`: The Postgres database port (required)
28 |
29 | `DB_USER`: The Postgres user name (required)
30 |
31 | `DB_NAME`: The Postgres database name (required)
32 |
33 | `DB_PWD`: The Postgres password (optional, default is empty in development)
34 |
35 | `MASTER_KEY`: The master API key that can be used to perform administrative tasks such as creating new users (optional, there's a default key for development that can be found in `configure.swift`)
36 |
37 | `B2_BUCKET_NAME`: The name of the B2 bucket where the files should be stored (required)
38 |
39 | `B2_BUCKET_BASE_URL`: The base URL for the B2 bucket (required)
40 |
41 | `B2_EXECUTABLE_PATH`: The path to the B2 executable (required)
42 |
43 | `B2_INFO_PATH`: The path where B2 should look for the authentication database (optional)
44 |
45 | `CF_ZONE_ID`: The ID of the CloudFlare zone for the website (optional)
46 |
47 | `CF_EMAIL`: The CloudFlare login e-mail (optional)
48 |
49 | `CF_KEY`: The CloudFlare API key (optional)
50 |
51 | `CF_APP_URL`: The base URL for the app in CloudFlare (optional)
52 |
53 | `CF_ENABLED`: `1` = enable CloudFlare `2` = disable CloudFlare
--------------------------------------------------------------------------------
/Design/.gitignore:
--------------------------------------------------------------------------------
1 | .DS_Store
2 |
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/01049679-8F18-4D79-A27A-447957EFA000@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/01049679-8F18-4D79-A27A-447957EFA000@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/0D578A0C-742D-4580-AF8E-3E6FF217F910@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/0D578A0C-742D-4580-AF8E-3E6FF217F910@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/2A9DB0B9-1717-4D5B-A6D1-18E6D0CFF79E@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/2A9DB0B9-1717-4D5B-A6D1-18E6D0CFF79E@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/3C919409-27F1-4D4F-9659-DD12C28C2875@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/3C919409-27F1-4D4F-9659-DD12C28C2875@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/49CFC061-1551-4EF9-B28E-A0656BDF9CA4@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/49CFC061-1551-4EF9-B28E-A0656BDF9CA4@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/4A22EF2A-1413-4991-98AC-AE8C7CB36BC3@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/4A22EF2A-1413-4991-98AC-AE8C7CB36BC3@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/591D8D43-9ACD-40BC-8424-49D8ADD0C7C9@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/591D8D43-9ACD-40BC-8424-49D8ADD0C7C9@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/5AC04590-7123-458F-BF16-FDCC344356A9@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/5AC04590-7123-458F-BF16-FDCC344356A9@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/6568D8B4-0C5F-400B-AC46-BBBFBA52D12E@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/6568D8B4-0C5F-400B-AC46-BBBFBA52D12E@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/668B2A5E-ACDC-420D-BA6B-4AA0CE853B9D@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/668B2A5E-ACDC-420D-BA6B-4AA0CE853B9D@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/74D0AC55-C55A-4E0E-8A31-552AB51E6303@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/74D0AC55-C55A-4E0E-8A31-552AB51E6303@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/7F5A5657-8776-4B77-972A-AB6B9B5488A0@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/7F5A5657-8776-4B77-972A-AB6B9B5488A0@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/84BA7B4C-BD53-4555-A94D-16FB81ACFA1E@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/84BA7B4C-BD53-4555-A94D-16FB81ACFA1E@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/8AF12F69-70DB-4186-98EB-D8314D13836A@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/8AF12F69-70DB-4186-98EB-D8314D13836A@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/8D010C3E-B818-4C3A-B19A-7C27AA6908A5@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/8D010C3E-B818-4C3A-B19A-7C27AA6908A5@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/8E7BB8AF-DB64-4BA1-857A-8B1AAF76D34C@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/8E7BB8AF-DB64-4BA1-857A-8B1AAF76D34C@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/B0D20B8E-642A-4EE2-A02F-1D813A10B180@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/B0D20B8E-642A-4EE2-A02F-1D813A10B180@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/B4574D71-A0F6-4A43-9645-3BDA55F63E62@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/B4574D71-A0F6-4A43-9645-3BDA55F63E62@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/C1891922-21F9-4144-B0F8-49A436DC155C@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/C1891922-21F9-4144-B0F8-49A436DC155C@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/DD1113C4-750B-4060-BF7B-AC264E108C0B@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/DD1113C4-750B-4060-BF7B-AC264E108C0B@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/E71E41F3-E2AF-4A58-ABC4-87E95CC61C7A@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/E71E41F3-E2AF-4A58-ABC4-87E95CC61C7A@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/EEFE6E40-BC54-48AF-A13F-1E1C719E10AA@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/EEFE6E40-BC54-48AF-A13F-1E1C719E10AA@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/F164E825-82E0-4412-BEF6-8EB9259C967F@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/F164E825-82E0-4412-BEF6-8EB9259C967F@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/F887F152-04BB-46AB-860E-2437CB47D531@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/F887F152-04BB-46AB-860E-2437CB47D531@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/F9ABDC4E-5FB6-4344-B623-AFE158BFAF66@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/F9ABDC4E-5FB6-4344-B623-AFE158BFAF66@2x.jpg
--------------------------------------------------------------------------------
/Design/.preview/Sharecuts_Website!sketch/FB10B04B-985D-4BEB-BD37-0CB6FA6268E5@2x.jpg:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/.preview/Sharecuts_Website!sketch/FB10B04B-985D-4BEB-BD37-0CB6FA6268E5@2x.jpg
--------------------------------------------------------------------------------
/Design/Sharecuts_Website.sketch:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Design/Sharecuts_Website.sketch
--------------------------------------------------------------------------------
/Docs/Download shortcut shared as a link.txt:
--------------------------------------------------------------------------------
1 | The shared shortcut link looks like this:
2 | https://www.icloud.com/shortcuts/d8bc5ec3c1b74ab4bc1fdb9cd9bcacf1
3 |
4 | To grab the information about the link, call the api like this:
5 | https://www.icloud.com/shortcuts/api/records/d8bc5ec3c1b74ab4bc1fdb9cd9bcacf1
6 |
7 | So the format is https://www.icloud.com/shortcuts/api/records/:LAST_PATH_COMPONENT_OF_LINK
8 |
9 | From the response, take shortcut.downloadURL and replace ${f} by the last path component of the link, which is the shortcut ID.
10 |
11 | Sample response:
12 |
13 | {
14 | "recordName": "D8BC5EC3-C1B7-4AB4-BC1F-DB9CD9BCACF1",
15 | "recordChangeTag": "jsmfraaz",
16 | "fields": {
17 | "name": {
18 | "value": "Track Flight",
19 | "type": "STRING"
20 | },
21 | "icon_glyph": {
22 | "value": 59511,
23 | "type": "NUMBER_INT64"
24 | },
25 | "shortcut": {
26 | "value": {
27 | "size": 4056,
28 | "downloadURL": "https:\/\/cvws.icloud-content.com\/B\/AR9NwjCuBkZFlaLKyLtSHR6MsXJE\/${f}?o=Arfq0PVlFrfx3KpXhpBlFnedvAxtdCIVLb6gmcVzU2Rx6p4DFTVJp6Wlph_pt0H5mg&v=1&x=3&a=B_XzmA8eAU_g51k0fkejW6q6-nAsA0B6SQEAAAMEekk&e=1551229415&k=_&fl=&r=55fe65d2-3df6-455b-855f-f967d54ed073-1&ckc=com.apple.shortcuts&ckz=_defaultZone&p=33&s=PzvNmUWW1jn2XUSIf16RDg_6Knk",
29 | "fileChecksum": "AR9NwjCuBkZFlaLKyLtSHR6MsXJE"
30 | },
31 | "type": "ASSETID"
32 | },
33 | "icon": {
34 | "value": {
35 | "size": 71473,
36 | "downloadURL": "https:\/\/cvws.icloud-content.com\/B\/AXTHiUMupMWZEuxzBqOHzmrDYwB2\/${f}?o=AiCgDWCSqq-Hc9bjZS9b5a_Zcns9RyYIHrZz8rEU90LwW3pZkHby5h0SgrrptacTDg&v=1&x=3&a=B7RBpfijiOc0zlcdRc6ctfs7RnP2A0B6SQEAAAMEekk&e=1551229415&k=_&fl=&r=55fe65d2-3df6-455b-855f-f967d54ed073-1&ckc=com.apple.shortcuts&ckz=_defaultZone&p=33&s=KYFWQKDz1FqoO0cH-0dFvZwIclc",
37 | "fileChecksum": "AXTHiUMupMWZEuxzBqOHzmrDYwB2"
38 | },
39 | "type": "ASSETID"
40 | },
41 | "icon_color": {
42 | "value": 4274264319,
43 | "type": "NUMBER_INT64"
44 | }
45 | },
46 | "modified": {
47 | "timestamp": 1551225746426,
48 | "userRecordName": "_d0d0c8fca94beab861aed20bcfcf740c",
49 | "deviceID": "7B373254765CB39F9D922BBC0C490BC1745E372F50F1EB9B5A7F3AF53939676C"
50 | },
51 | "recordType": "SharedShortcut",
52 | "deleted": false,
53 | "pluginFields": {},
54 | "created": {
55 | "timestamp": 1551225746426,
56 | "userRecordName": "_d0d0c8fca94beab861aed20bcfcf740c",
57 | "deviceID": "7B373254765CB39F9D922BBC0C490BC1745E372F50F1EB9B5A7F3AF53939676C"
58 | }
59 | }
--------------------------------------------------------------------------------
/ISSUE_TEMPLATE.md:
--------------------------------------------------------------------------------
1 | # Important
2 |
3 | This Github repository is for the development of the Sharecuts platform itself, not for discussions about the Shortcuts app, how to create shortcuts, shortcuts you'd like to see, etc. Please only open an issue if you've found a problem with the website or have an idea for a new feature. Also make sure your issue is not a duplicate of an existing one.
--------------------------------------------------------------------------------
/LICENSE:
--------------------------------------------------------------------------------
1 | Copyright (c) 2018 Guilherme Rambo
2 |
3 | Notice: this open-source project is to help in the development of Sharecuts.app, the visual design and underlying backend are copyrighted and can't be hosted as a separate website without the express, written consent of the author.
4 |
5 | Redistribution and use in source and binary forms, with or without
6 | modification, are permitted provided that the following conditions are met:
7 |
8 | - Redistributions of source code must retain the above copyright notice, this
9 | list of conditions and the following disclaimer.
10 |
11 | - Redistributions in binary form must reproduce the above copyright notice,
12 | this list of conditions and the following disclaimer in the documentation
13 | and/or other materials provided with the distribution.
14 |
15 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
--------------------------------------------------------------------------------
/Package.swift:
--------------------------------------------------------------------------------
1 | // swift-tools-version:4.0
2 | import PackageDescription
3 |
4 | let package = Package(
5 | name: "shortcutsharing",
6 | dependencies: [
7 | .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
8 | .package(url: "https://github.com/vapor/leaf.git", from: "3.0.0-rc"),
9 | .package(url: "https://github.com/vapor/auth.git", from: "2.0.0-rc"),
10 | .package(url: "https://github.com/vapor/fluent-postgresql.git", from: "1.0.0-rc"),
11 | .package(url: "https://github.com/SwiftOnTheServer/SwiftDotEnv.git", from: "2.0.1")
12 | ],
13 | targets: [
14 | .target(name: "App", dependencies: [
15 | "FluentPostgreSQL",
16 | "Vapor",
17 | "Authentication",
18 | "Leaf",
19 | "SwiftDotEnv"
20 | ]),
21 | .target(name: "Run", dependencies: ["App"]),
22 | .testTarget(name: "AppTests", dependencies: ["App"])
23 | ]
24 | )
25 |
26 |
--------------------------------------------------------------------------------
/Public/.gitkeep:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/.gitkeep
--------------------------------------------------------------------------------
/Public/assets/css/inter-ui.css:
--------------------------------------------------------------------------------
1 | @font-face {
2 | font-family: 'Inter UI';
3 | font-style: normal;
4 | font-weight: 400;
5 | src: url("../font/Inter-UI-Regular.woff2?v=2.5") format("woff2"), url("../font/Inter-UI-Regular.woff?v=2.5") format("woff"); }
6 |
7 | @font-face {
8 | font-family: 'Inter UI';
9 | font-style: italic;
10 | font-weight: 400;
11 | src: url("../font/Inter-UI-Italic.woff2?v=2.5") format("woff2"), url("../font/Inter-UI-Italic.woff?v=2.5") format("woff"); }
12 |
13 | @font-face {
14 | font-family: 'Inter UI';
15 | font-style: normal;
16 | font-weight: 500;
17 | src: url("../font/Inter-UI-Medium.woff2?v=2.5") format("woff2"), url("../font/Inter-UI-Medium.woff?v=2.5") format("woff"); }
18 |
19 | @font-face {
20 | font-family: 'Inter UI';
21 | font-style: italic;
22 | font-weight: 500;
23 | src: url("../font/Inter-UI-MediumItalic.woff2?v=2.5") format("woff2"), url("../font/Inter-UI-MediumItalic.woff?v=2.5") format("woff"); }
24 |
25 | @font-face {
26 | font-family: 'Inter UI';
27 | font-style: normal;
28 | font-weight: 700;
29 | src: url("../font/Inter-UI-Bold.woff2?v=2.5") format("woff2"), url("../font/Inter-UI-Bold.woff?v=2.5") format("woff"); }
30 |
31 | @font-face {
32 | font-family: 'Inter UI';
33 | font-style: italic;
34 | font-weight: 700;
35 | src: url("../font/Inter-UI-BoldItalic.woff2?v=2.5") format("woff2"), url("../font/Inter-UI-BoldItalic.woff?v=2.5") format("woff"); }
36 |
37 | @font-face {
38 | font-family: 'Inter UI';
39 | font-style: normal;
40 | font-weight: 900;
41 | src: url("../font/Inter-UI-Black.woff2?v=2.5") format("woff2"), url("../font/Inter-UI-Black.woff?v=2.5") format("woff"); }
42 |
43 | @font-face {
44 | font-family: 'Inter UI';
45 | font-style: italic;
46 | font-weight: 900;
47 | src: url("../font/Inter-UI-BlackItalic.woff2?v=2.5") format("woff2"), url("../font/Inter-UI-BlackItalic.woff?v=2.5") format("woff"); }
48 |
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Black.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Black.woff
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Black.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Black.woff2
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-BlackItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-BlackItalic.woff
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-BlackItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-BlackItalic.woff2
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Bold.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Bold.woff
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Bold.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Bold.woff2
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-BoldItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-BoldItalic.woff
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-BoldItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-BoldItalic.woff2
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Italic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Italic.woff
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Italic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Italic.woff2
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Medium.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Medium.woff
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Medium.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Medium.woff2
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-MediumItalic.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-MediumItalic.woff
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-MediumItalic.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-MediumItalic.woff2
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Regular.woff:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Regular.woff
--------------------------------------------------------------------------------
/Public/assets/font/Inter-UI-Regular.woff2:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/font/Inter-UI-Regular.woff2
--------------------------------------------------------------------------------
/Public/assets/img/favicon.ico:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/img/favicon.ico
--------------------------------------------------------------------------------
/Public/assets/img/i-info.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Public/assets/img/i-search.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Public/assets/img/i-upload.svg:
--------------------------------------------------------------------------------
1 |
--------------------------------------------------------------------------------
/Public/assets/img/sharecuts-ios-icon.png:
--------------------------------------------------------------------------------
https://raw.githubusercontent.com/sharecuts/website/b1a29888114a70a3fcf56a7a4e10ab5ae220fa8f/Public/assets/img/sharecuts-ios-icon.png
--------------------------------------------------------------------------------
/Public/main.css:
--------------------------------------------------------------------------------
1 | * {
2 | margin:0;
3 | padding:0;
4 | -webkit-font-smoothing: antialiased;
5 | -moz-osx-font-smoothing: grayscale;
6 | list-style:none;
7 | }
8 |
9 | .clearfix::after {
10 | content: "";
11 | clear: both;
12 | display: table;
13 | }
14 |
15 | body {
16 | font-family:-apple-system, 'Helvetica Neue', Helvetica, sans-serif;
17 | padding:0 50px;
18 | }
19 |
20 | a:link, a:active, a:visited {
21 | color:#0076FF;
22 | text-decoration: none;
23 | }
24 | a:hover {
25 | text-decoration:underline;
26 | }
27 |
28 | header#master-header {
29 | margin:40px 0 50px 0;
30 | display: table;
31 | width: 100%;
32 | height:74px;
33 | }
34 |
35 | header#master-header h1 a {
36 | color:#4C4C4C;
37 | }
38 | header#master-header h1 a:hover {
39 | color:#0076FF;
40 | }
41 | header#master-header h1 {
42 | float: left;
43 | }
44 |
45 | header#master-header ul {
46 | float: right;
47 | }
48 |
49 | header#master-header ul li {
50 | display: inline;
51 | margin-right: 20px;
52 | }
53 |
54 | header#master-header ul li a {
55 | font-weight:500;
56 | }
57 |
58 | @media only screen and (max-width: 600px) {
59 |
60 | header#master-header h1,
61 | header#master-header ul {
62 | float: none;
63 | }
64 |
65 | }
66 |
67 | ul#shortcuts-list {
68 | display: grid;
69 | grid-template-columns: repeat(auto-fill, 290px);
70 | grid-auto-rows: auto;
71 | grid-gap: 1rem;
72 | justify-content: space-evenly;
73 | }
74 |
75 | ul#shortcuts-list li {
76 | border:1px solid #C0C0C0;
77 | border-radius: 8px;
78 | cursor:pointer;
79 | transition:transform 0.4s, background-color 0.3s, box-shadow 0.6s;
80 | box-shadow:0 5px 12px rgba(0,0,0,0);
81 | }
82 |
83 | ul#shortcuts-list li:hover {
84 | transform:scale(1.08);
85 | background-color:white;
86 | box-shadow:0 5px 12px rgba(0,0,0,0.2);
87 | }
88 |
89 | ul#shortcuts-list li div {
90 | height: 100%;
91 | }
92 |
93 | ul#shortcuts-list li div a {
94 | padding: 16px;
95 | height: calc(100% - 2 * 16px);
96 | }
97 |
98 | ul#shortcuts-list li div a:hover {
99 | text-decoration: none;
100 | }
101 |
102 | h2.shortcut-title {
103 | font-weight:600;
104 | font-size:18px;
105 | color:#101010;
106 | margin-bottom:16px;
107 | }
108 |
109 | div.shortcut-card a {
110 | display: flex;
111 | flex-direction: column;
112 | }
113 |
114 | div.shortcut-card p.shortcut-summary {
115 | flex-grow: 1;
116 | font-size:14px;
117 | color:#4C4C4C;
118 | margin-bottom:16px;
119 | }
120 |
121 | div.shortcut-card p.shortcut-details {
122 | font-size:13px;
123 | color: #6C6C6C;
124 | }
125 |
126 | footer#master-footer {
127 | display:block;
128 | margin-top:70px;
129 | }
130 |
131 | footer#master-footer p {
132 | font-size:12px;
133 | color:#4C4C4C;
134 | margin-bottom:6px;
135 | }
136 |
137 | form input {
138 | display:block;
139 | }
140 | form input[type="text"] {
141 | border:1px solid #CCC;
142 | padding:5px;
143 | border-radius: 4px;
144 | font:16px -apple-system, 'Helvetica Neue', Helvetica, sans-serif;
145 | margin:0 0 16px 0;
146 | width:50%;
147 | }
148 |
149 | form button {
150 | margin-top:16px;
151 | padding:6px 12px;
152 | background-color:#0076FF;
153 | color:white;
154 | cursor:pointer;
155 | display:block;
156 | border:none;
157 | font:14px -apple-system, 'Helvetica Neue', Helvetica, sans-serif;
158 | font-weight:500;
159 | text-transform:uppercase;
160 | border-radius: 6px;
161 | }
162 |
163 | .bottom-space {
164 | margin-bottom:20px;
165 | }
166 |
167 | article p {
168 | padding:16px 0;
169 | }
170 |
--------------------------------------------------------------------------------
/Public/register.js:
--------------------------------------------------------------------------------
1 | window.addEventListener("DOMContentLoaded", function(){
2 | async function checkUsername(username) {
3 | let url = `/api/users/usernamecheck?username=${username}`
4 | let response = await fetch(url);
5 |
6 | return await response.json();
7 | };
8 |
9 | $("input#username").blur(async function(){
10 | let errorContainer = $(this).siblings("small");
11 |
12 | let username = $(this).val();
13 |
14 | if (username.length == 0) {
15 | $(this).removeClass("is-valid").removeClass("is-invalid");
16 | errorContainer.text("");
17 | return;
18 | }
19 |
20 | let result = await checkUsername(username);
21 |
22 | console.log(result);
23 |
24 | if (!result.isAvailable) {
25 | $(this).removeClass("is-valid").addClass("is-invalid");
26 | errorContainer.text(result.message);
27 | } else {
28 | $(this).removeClass("is-invalid").addClass("is-valid");
29 | errorContainer.text("");
30 | }
31 | });
32 | }, false);
--------------------------------------------------------------------------------
/Public/sharecuts.js:
--------------------------------------------------------------------------------
1 | function Sharecuts() {
2 |
3 | const self = this;
4 |
5 | this.canOpenShortcutsDeepLinks = function() {
6 | return /iPhone|iPad|iPod/.test(navigator.platform);
7 | }
8 |
9 | this.downloadShortcut = function(e) {
10 | if (self.canOpenShortcutsDeepLinks()) return;
11 |
12 | e.preventDefault();
13 | e.stopPropagation();
14 |
15 | var downloadURL = $(this).data("downloadurl");
16 |
17 | if (window.location.href.indexOf("indigo") !== -1) {
18 | downloadURL = downloadURL.replace("sharecuts.app", "indigo.sharecuts.app");
19 | }
20 |
21 | window.location.href = downloadURL;
22 | }
23 |
24 | this.likeShortcut = async function(e) {
25 | e.stopPropagation();
26 | e.preventDefault();
27 |
28 | let shortcutID = $(this).data("shortcut");
29 |
30 | let url = `/api/shortcuts/${shortcutID}/vote`;
31 |
32 | $(this).prop("disabled", true);
33 |
34 | let ratingContainer = $(this).children("span.card-like-label");
35 | let value = parseInt(ratingContainer.text()) + 1;
36 |
37 | ratingContainer.text(value);
38 |
39 | let request = new Request(url, {"method": "PUT"});
40 | let result = await fetch(request);
41 |
42 | let response = await result.json();
43 |
44 | ratingContainer.text(response.rating);
45 | }
46 |
47 | this.navigateToUser = function(e) {
48 | e.stopPropagation();
49 | e.preventDefault();
50 |
51 | let username = $(this).data("username");
52 |
53 | window.location.href = `/users/${username}`;
54 | }
55 |
56 | this.install = function(e) {
57 | $("a.card-shortcut").click(self.downloadShortcut);
58 | $("button.btn-like").click(self.likeShortcut);
59 | $(".card-author").click(self.navigateToUser);
60 | }
61 |
62 | }
63 |
64 | const SC = new Sharecuts();
65 |
66 | window.addEventListener("DOMContentLoaded", SC.install, false);
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Sharecuts
2 |
3 | Share your favorite Shortcuts with the community, browse shortcuts shared by the community.
4 |
5 | Live at [sharecuts.app][1]
6 |
7 | **The ability to publish your own shortcuts is currently invite-only, we'll open it up to more people when we're ready.**
8 |
9 | [1]: https://sharecuts.app
10 |
11 | ## Contributing
12 |
13 | ### Suggestions and Ideas
14 |
15 | If you have any suggestions or ideas please [Add An Issue](https://github.com/insidegui/Sharecuts/issues/new). Please be sure to check first that no one else has already offered the same. Also keep in mind that this repository is for the development of the Sharecuts platform itself, issues about Shortcuts (how to create them, shortcut requests, etc) will be closed.
16 |
17 | ### Development
18 |
19 | [Development Setup](https://github.com/insidegui/Sharecuts/wiki) - Read this guide if you'd like to contribute to the project.
20 |
21 | ## API
22 |
23 | Sharecuts has a public API, [check out this guide](./API.md).
24 |
--------------------------------------------------------------------------------
/Resources/Views/about.leaf:
--------------------------------------------------------------------------------
1 | #set("content") {
2 |
3 |
4 |
About Sharecuts
5 |
6 |
7 |
8 |
Sharecuts was created as a way for Apple's Shortcut app enthusiasts to find cool shortcuts and share them with the community.
9 |
10 |
Given that this is just getting started, contributions are limited to a handful of selected people. In the future uploading will be open, with curation, upvoting and more.
55 | Find Videos On Page Findero Photo By Break
56 |
57 |
58 |
59 |
60 |
61 |
Lorem ipsum dolor sit amet, consectetur adipiscing elit. Aliter homines, aliter philoso loqui putas oportere?
62 |
63 |
Cum id quoque, ut cupiebat, audivisset, evelli iussit eam. More
64 |
65 |
66 |
67 |
--------------------------------------------------------------------------------
/Resources/Views/components/shortcut-single.leaf:
--------------------------------------------------------------------------------
1 | #for(card in cards) {
2 | #/*
3 | .card-wrapper is used to ensure the whole slide/carousel area is draggable.
4 | */
5 |
6 | #/*
7 | There are many card-bg's already set up:
8 |
9 | .card-bg-purple
10 | .card-bg-blue
11 | .card-bg-pink
12 | .card-bg-green
13 | .card-bg-red
14 | .card-bg-orange
15 | .card-bg-yellow
16 | .card-bg-gray
17 | .card-bg-darkGray
18 | .card-bg-lightBlue
19 |
20 | These are in CSS for easy reference, caching and easy updating.
21 |
22 | */
23 |
24 |
Sharecuts uses the Pwned Passwords API to verify passwords used on the service and make sure they are not vulnerable
9 | by having been exposed in previous security breaches. If your password was flagged, you should change it not only on Sharecuts but everywhere else
10 | you may be using the same password.
You can upload a shortcut using the form below or using the "Send to Sharecuts" shortcut,
12 | please be careful about personal data such as logins or API keys in shortcuts, check your shortcuts for
13 | personal information before uploading.
14 |
15 | #if(error) {
16 |
#(error)
17 | }
18 |
19 |
54 |
55 | } else {
56 |
57 |
To keep a good quality of service at this early stage, uploading is currently limited to people who have been invited. If you have been invited, follow the instructions you received to upload your shortcuts.
58 |
59 |
If you'd like to contribute, Register Here and you'll get an invitation when possible.
You've been one of the first people to be able to upload shortcuts to Sharecuts.app, congratulations!
15 |
16 |
As we move into this new phase of the project, we're deprecating the old API key based authentication in favor
17 | of the traditional username and password method.
18 |
19 |
When we created your account, we gave it the same username you have on your Twitter account (#(user.username)), now all that's left is for you to create your own password.