├── public └── index.html ├── .dockerignore ├── index.php ├── resources ├── samples │ ├── plaintext │ ├── handlebars │ ├── http │ ├── git │ ├── xml │ ├── ini │ ├── py │ ├── html │ ├── applescript │ ├── haml │ ├── powershell │ ├── jade │ ├── markdown │ ├── twig │ ├── csharp │ ├── js │ ├── latex │ ├── actionscript │ ├── smarty │ ├── swift │ ├── bash │ ├── css │ ├── go │ ├── sql │ ├── scheme │ ├── gherkin │ ├── ruby │ ├── perl │ ├── dart │ ├── c │ ├── less │ ├── objectivec │ ├── coffeescript │ ├── java │ ├── scala │ ├── rust │ ├── nasm │ ├── matlab │ ├── php │ ├── abap │ ├── erlang │ ├── groovy │ └── sass ├── config │ └── meta.php └── views │ ├── globals.php │ ├── repo.php │ └── blob.php ├── client ├── me │ ├── index.ts │ ├── types.ts │ └── actions.ts ├── prism │ ├── themes │ │ ├── coy.lazy.css │ │ ├── default.lazy.css │ │ ├── cb.lazy.css │ │ ├── dark.lazy.css │ │ ├── funky.lazy.css │ │ ├── vs.lazy.css │ │ ├── okaidia.lazy.css │ │ ├── tomorrow.lazy.css │ │ ├── twilight.lazy.css │ │ ├── darcula.lazy.css │ │ ├── ghcolors.lazy.css │ │ ├── pojoaque.lazy.css │ │ ├── xonokai.lazy.css │ │ ├── a11y-dark.lazy.css │ │ ├── atom-dark.lazy.css │ │ ├── duotone-sea.lazy.css │ │ ├── hopscotch.lazy.css │ │ ├── duotone-dark.lazy.css │ │ ├── duotone-earth.lazy.css │ │ ├── duotone-light.lazy.css │ │ ├── duotone-space.lazy.css │ │ ├── duotone-forest.lazy.css │ │ └── base16-ateliersulphurpool-light.lazy.css │ ├── plugins │ │ ├── toolbar.lazy.css │ │ ├── line-numbers.lazy.css │ │ ├── line-highlight.lazy.css │ │ ├── show-invisibles.lazy.css │ │ ├── toolbar.ts │ │ ├── line-numbers.ts │ │ ├── line-highlight.ts │ │ ├── show-invisibles.ts │ │ ├── copy-to-clipboard.ts │ │ ├── edit.ts │ │ └── filename.ts │ └── __tests__ │ │ └── prism.spec.ts ├── snippet │ ├── index.ts │ ├── actions.ts │ └── types.ts ├── settings │ ├── index.ts │ ├── types.ts │ └── actions.ts ├── block │ ├── EditEmbed │ │ └── EditEmbed.module.scss │ ├── index.ts │ ├── __stories__ │ │ └── Shortcode.stories.tsx │ ├── SetEmbed │ │ ├── CreateOrChoose.module.scss │ │ ├── __stories__ │ │ │ └── CreateOrChoose.stories.tsx │ │ ├── Creating │ │ │ └── index.tsx │ │ ├── __tests__ │ │ │ └── CreateOrChoose.spec.tsx │ │ └── CreateOrChoose.tsx │ ├── Shortcode.tsx │ └── __tests__ │ │ ├── state.spec.ts │ │ └── block.spec.tsx ├── helpers │ ├── index.ts │ ├── link.ts │ ├── i18n.ts │ └── __tests__ │ │ └── i18n.spec.ts ├── components │ ├── SettingsPage │ │ ├── Header │ │ │ ├── index.scss │ │ │ ├── __stories__ │ │ │ │ └── Header.stories.tsx │ │ │ └── index.tsx │ │ ├── Jobs │ │ │ ├── types.ts │ │ │ ├── __stories__ │ │ │ │ └── Jobs.stories.tsx │ │ │ ├── __tests__ │ │ │ │ └── Jobs.spec.tsx │ │ │ ├── Row.tsx │ │ │ └── index.tsx │ │ ├── Accounts │ │ │ ├── __stories__ │ │ │ │ └── Accounts.stories.tsx │ │ │ └── __tests__ │ │ │ │ └── Accounts.spec.tsx │ │ ├── Messages │ │ │ └── __stories__ │ │ │ │ └── Messages.stories.tsx │ │ ├── Runs │ │ │ └── __stories__ │ │ │ │ └── Runs.stories.tsx │ │ └── Highlighting │ │ │ └── __stories__ │ │ │ └── Highlighting.stories.tsx │ ├── Loader │ │ ├── __stories__ │ │ │ └── Loader.stories.tsx │ │ ├── index.tsx │ │ └── Loader.scss │ ├── Blob │ │ ├── types.ts │ │ ├── index.tsx │ │ ├── __stories__ │ │ │ └── Blob.stories.tsx │ │ └── Code.tsx │ ├── index.ts │ ├── Editor │ │ ├── Pre.tsx │ │ ├── types.ts │ │ ├── __stories__ │ │ │ └── Editor.stories.tsx │ │ └── util.ts │ ├── SearchPopup │ │ ├── index.scss │ │ └── __stories__ │ │ │ └── SearchPopup.stories.tsx │ ├── Repo │ │ └── index.tsx │ ├── EditPage │ │ ├── __stories__ │ │ │ ├── Description.stories.tsx │ │ │ └── EditPage.stories.tsx │ │ ├── index.scss │ │ └── Description.scss │ └── Commits │ │ └── index.scss ├── editor │ ├── keyCodes.ts │ ├── index.tsx │ ├── types.tsx │ ├── actions.ts │ └── __stories__ │ │ └── Editor.stories.tsx ├── selectors │ ├── index.ts │ ├── jobs.ts │ ├── api.ts │ ├── dom.ts │ └── location.ts ├── api │ └── Toggle.ts ├── pages │ ├── block │ │ └── index.ts │ ├── edit │ │ ├── router.ts │ │ └── View.tsx │ └── settings │ │ ├── router.ts │ │ └── state.ts ├── search │ ├── View.module.scss │ ├── index.ts │ ├── context.tsx │ ├── selectors.tsx │ ├── ResultsPlaceholder.tsx │ ├── SearchResult.module.scss │ ├── actions.ts │ └── __tests__ │ │ └── SearchResult.spec.tsx ├── actions │ ├── accounts.ts │ ├── init.ts │ ├── index.ts │ ├── router.ts │ ├── author.ts │ ├── highlighting.ts │ ├── commits.ts │ └── ajax.ts ├── globals │ ├── actions.ts │ ├── index.ts │ ├── context.tsx │ ├── state.ts │ └── __tests__ │ │ └── state.spec.ts ├── sheet-router.d.ts ├── wp │ ├── Button.tsx │ ├── index.ts │ ├── TextControl.tsx │ ├── SelectControl.tsx │ ├── notices.module.scss │ ├── CheckboxControl.tsx │ ├── actions.ts │ └── notices.tsx ├── reducers │ ├── index.ts │ ├── gist.ts │ ├── repo.ts │ ├── route.ts │ ├── runs.ts │ ├── messages.ts │ ├── authors.ts │ ├── ajax.ts │ ├── prism.ts │ ├── commits.ts │ └── search.ts ├── css.d.ts ├── RootAction.ts ├── deltas │ ├── __tests__ │ │ ├── siteDelta.spec.ts │ │ ├── userDelta.spec.ts │ │ ├── searchDelta.spec.ts │ │ ├── webpackDelta.spec.ts │ │ ├── repoDelta.spec.ts │ │ └── routerDelta.spec.ts │ ├── webpackDelta.ts │ └── index.ts ├── __tests__ │ └── storyshots.spec.ts └── setupTests.ts ├── commands ├── index.tsx └── fs.ts ├── icon-128x128.png ├── screenshot-1.png ├── screenshot-2.png ├── screenshot-3.png ├── screenshot-4.png ├── screenshot-5.png ├── screenshot-6.png ├── screenshot-7.png ├── __mocks__ └── lazy.js ├── .env.example ├── jest-puppeteer.config.js ├── .wp-env.json ├── e2e ├── reset-site.sh ├── __image_snapshots__ │ ├── content-spec-ts-content-should-display-c-c-1-snap.png │ ├── content-spec-ts-content-should-display-go-go-1-snap.png │ ├── content-spec-ts-content-should-display-r-r-1-snap.png │ ├── content-spec-ts-content-should-display-css-css-1-snap.png │ ├── content-spec-ts-content-should-display-git-git-1-snap.png │ ├── content-spec-ts-content-should-display-ini-ini-1-snap.png │ ├── content-spec-ts-content-should-display-php-php-1-snap.png │ ├── content-spec-ts-content-should-display-sql-sql-1-snap.png │ ├── content-spec-ts-content-should-display-xml-xml-1-snap.png │ ├── content-spec-ts-content-should-display-abap-abap-1-snap.png │ ├── content-spec-ts-content-should-display-bash-bash-1-snap.png │ ├── content-spec-ts-content-should-display-c-csharp-1-snap.png │ ├── content-spec-ts-content-should-display-dart-dart-1-snap.png │ ├── content-spec-ts-content-should-display-haml-haml-1-snap.png │ ├── content-spec-ts-content-should-display-html-html-1-snap.png │ ├── content-spec-ts-content-should-display-http-http-1-snap.png │ ├── content-spec-ts-content-should-display-java-java-1-snap.png │ ├── content-spec-ts-content-should-display-less-less-1-snap.png │ ├── content-spec-ts-content-should-display-nasm-nasm-1-snap.png │ ├── content-spec-ts-content-should-display-perl-perl-1-snap.png │ ├── content-spec-ts-content-should-display-python-py-1-snap.png │ ├── content-spec-ts-content-should-display-ruby-ruby-1-snap.png │ ├── content-spec-ts-content-should-display-rust-rust-1-snap.png │ ├── content-spec-ts-content-should-display-twig-twig-1-snap.png │ ├── content-spec-ts-content-should-display-scala-scala-1-snap.png │ ├── content-spec-ts-content-should-display-swift-swift-1-snap.png │ ├── content-spec-ts-content-should-display-eiffel-eiffel-1-snap.png │ ├── content-spec-ts-content-should-display-erlang-erlang-1-snap.png │ ├── content-spec-ts-content-should-display-gherkin-gherkin-1-snap.png │ ├── content-spec-ts-content-should-display-groovy-groovy-1-snap.png │ ├── content-spec-ts-content-should-display-java-script-js-1-snap.png │ ├── content-spec-ts-content-should-display-la-te-x-latex-1-snap.png │ ├── content-spec-ts-content-should-display-matlab-matlab-1-snap.png │ ├── content-spec-ts-content-should-display-sass-sass-sass-1-snap.png │ ├── content-spec-ts-content-should-display-scheme-scheme-1-snap.png │ ├── content-spec-ts-content-should-display-smarty-smarty-1-snap.png │ ├── settings-spec-ts-settings-should-change-save-the-theme-1-snap.png │ ├── content-spec-ts-content-should-display-markdown-markdown-1-snap.png │ ├── content-spec-ts-content-should-display-plain-text-plaintext-1-snap.png │ ├── content-spec-ts-content-should-display-handlebars-handlebars-1-snap.png │ ├── content-spec-ts-content-should-display-objective-c-objectivec-1-snap.png │ ├── content-spec-ts-content-should-display-power-shell-powershell-1-snap.png │ ├── content-spec-ts-content-should-display-apple-script-applescript-1-snap.png │ ├── content-spec-ts-content-should-display-action-script-actionscript-1-snap.png │ ├── content-spec-ts-content-should-display-coffee-script-coffeescript-1-snap.png │ ├── settings-spec-ts-settings-should-change-save-the-line-numbers-configuration-1-snap.png │ ├── settings-spec-ts-settings-should-change-save-the-show-invisibles-configuration-1-snap.png │ └── settings-spec-ts-settings-should-show-the-settings-page-with-default-settings-1-snap.png ├── setupTests.ts └── content.spec.ts ├── app ├── Contract │ ├── Repository.php │ ├── Translations.php │ ├── Templating.php │ └── Job.php ├── Jobs │ ├── Level.php │ ├── Status.php │ └── Manager.php ├── Http │ ├── Filter │ │ ├── Search.php │ │ ├── RepoUpdate.php │ │ ├── RepoResource.php │ │ ├── BlobUpdate.php │ │ ├── BaseFilter.php │ │ └── RepoCollection.php │ ├── SiteController.php │ ├── StateController.php │ ├── CommitController.php │ └── UserController.php ├── Params │ ├── demo-code │ ├── Repository.php │ ├── Gist.php │ └── Prism.php ├── helpers.php ├── Model │ └── Message.php └── Console │ └── Binding.php ├── .storybook ├── preview.js └── main.js ├── uninstall.php ├── .svnignore ├── .github └── workflows │ └── node.js.yml ├── test ├── Integration │ ├── Console │ │ ├── Repo │ │ │ ├── TestCase.php │ │ │ └── GetTest.php │ │ ├── Blob │ │ │ ├── TestCase.php │ │ │ └── UpdateTest.php │ │ ├── Site │ │ │ └── TestCase.php │ │ ├── User │ │ │ ├── TestCase.php │ │ │ ├── GetTest.php │ │ │ └── PatchTest.php │ │ └── TestCase.php │ ├── Http │ │ └── Site │ │ │ └── ResourceTest.php │ └── TestCase.php ├── Unit │ ├── Client │ │ └── GistTest.php │ ├── Console │ │ └── Binding.php │ ├── LifecycleTest.php │ ├── Register │ │ └── Router.php │ ├── Model │ │ └── LanguageTest.php │ ├── Params │ │ └── EditorTest.php │ └── View │ │ └── TranslationsTest.php └── Factory.php ├── bin ├── docker-compose.override.yml.template └── reset-docker-db.sh ├── tsconfig.json ├── .editorconfig ├── .gitignore ├── phpunit.xml.dist └── wp-gistpen.php /public/index.html: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | -------------------------------------------------------------------------------- /index.php: -------------------------------------------------------------------------------- 1 | Hours 2 | 3 |
Title
12 | 13 | 14 | -------------------------------------------------------------------------------- /client/block/SetEmbed/CreateOrChoose.module.scss: -------------------------------------------------------------------------------- 1 | .container { 2 | width: 100%; 3 | } 4 | 5 | .group { 6 | display: flex; 7 | flex-direction: row; 8 | justify-content: space-around; 9 | align-items: center; 10 | } 11 | 12 | .or { 13 | font-weight: bold; 14 | } 15 | 16 | .header { 17 | text-align: center; 18 | } 19 | -------------------------------------------------------------------------------- /client/me/types.ts: -------------------------------------------------------------------------------- 1 | import * as t from 'io-ts'; 2 | import { Toggle } from '../api'; 3 | 4 | export const ApiMe = t.type({ 5 | editor: t.type({ 6 | indent_width: t.string, 7 | invisibles_enabled: Toggle, 8 | tabs_enabled: Toggle, 9 | theme: t.string, 10 | }), 11 | }); 12 | 13 | export type ApiMe = t.TypeOf
9 | {children}
10 |
11 | );
12 |
13 | export default Pre;
14 |
--------------------------------------------------------------------------------
/client/reducers/index.ts:
--------------------------------------------------------------------------------
1 | export * from './ajax';
2 | export * from './authors';
3 | export * from './editor';
4 | export * from './gist';
5 | export * from './prism';
6 | export * from './repo';
7 | export * from './commits';
8 | export * from './route';
9 | export * from './search';
10 | export * from './jobs';
11 | export * from './runs';
12 | export * from './messages';
13 |
--------------------------------------------------------------------------------
/client/wp/actions.ts:
--------------------------------------------------------------------------------
1 | import { createAction } from 'typesafe-actions';
2 |
3 | export const change = createAction('CHANGE', resolve => (value: string) =>
4 | resolve({ value }),
5 | );
6 |
7 | export const checked = createAction(
8 | 'CHECKED',
9 | resolve => (isChecked: boolean) => resolve({ isChecked }),
10 | );
11 |
12 | export const click = createAction('CLICK');
13 |
--------------------------------------------------------------------------------
/client/css.d.ts:
--------------------------------------------------------------------------------
1 | declare module '*.lazy.css' {
2 | const css: {
3 | use(): void;
4 | unuse(): void;
5 | };
6 |
7 | export default css;
8 | }
9 |
10 | declare module '*.module.css' {
11 | const css: Record1234
1234
17 |
18 |
19 | );
20 |
21 | export default Blob;
22 |
--------------------------------------------------------------------------------
/client/settings/actions.ts:
--------------------------------------------------------------------------------
1 | import { createAsyncAction } from 'typesafe-actions';
2 | import { AjaxError, PatchBody } from '../api';
3 | import { ApiSettings } from './types';
4 |
5 | export const fetchSettings = createAsyncAction(
6 | 'FETCH_SETTINGS_REQUESTED',
7 | 'FETCH_SETTINGS_SUCCEEDED',
8 | 'FETCH_SETTINGS_FAILED',
9 | ){$article->description}
14 | {/foreach} 15 | 16 | //section, alternative of foreach 17 | {section name=name loop=$items} 18 | id: {$items[name]}