Skip to content

Commit

Permalink
+ update file package
Browse files Browse the repository at this point in the history
  • Loading branch information
InspireUI committed Jul 30, 2024
1 parent 73766fe commit 3ae2000
Show file tree
Hide file tree
Showing 4 changed files with 100 additions and 4 deletions.
60 changes: 60 additions & 0 deletions css/docu-notion-styles.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
/* This should be added to the docusaurus.config.js in order to show some notion things correctly.
See the option: --css-output-directory
See the docusaurus docs: https://docusaurus.io/docs/styling-layout
See the use in the docu-notion-sample-site: https://github.com/sillsdev/docu-notion-sample-site/blob/main/docusaurus.config.js
*/

/* Copied from
https://github1s.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/styles.css#L934
and
https://github1s.com/NotionX/react-notion-x/blob/master/packages/react-notion-x/src/styles.css#L1063
*/
.notion-column {
display: flex;
flex-direction: column;
padding-top: 12px;
padding-bottom: 12px;
}

.notion-column > *:first-child {
margin-top: 0;
margin-left: 0;
margin-right: 0;
}

.notion-column > *:last-child {
margin-left: 0;
margin-right: 0;
margin-bottom: 0;
}

.notion-row {
display: flex;
overflow: hidden;
width: 100%;
max-width: 100%;
}

@media (max-width: 640px) {
.notion-row {
flex-direction: column;
}

.notion-row .notion-column {
width: 100% !important;
}

.notion-row .notion-spacer {
display: none;
}
}

.notion-spacer {
/* This matches the value in ColumnTransformer.ts */
width: calc(min(32px, 4vw));
}

.notion-spacer:last-child {
display: none;
}
/* End copied from NotionX */
36 changes: 36 additions & 0 deletions css/gifplayer.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
.gif_player {
display: inline-block;
position: relative;
-webkit-user-select: none;
-moz-user-select: none;
-ms-user-select: none;
user-select: none;
-webkit-touch-callout: none;
-webkit-tap-highlight-color: transparent; }
.gif_player .play_button {
background-color: rgba(0, 0, 0, 0.5);
border: 2px dashed #fff;
border-radius: 50%;
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.5);
color: #fff;
cursor: pointer;
font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;
font-size: 24px;
left: 50%;
opacity: 1;
padding: 14px 10px;
position: absolute;
top: 50%;
transform: translate(-50%, -50%) scale(1) rotate(0deg);
transition: transform 0.4s, opacity 0.4s; }
.gif_player .play_button:hover {
background-color: rgba(0, 0, 0, 0.7);
box-shadow: 0 0 0 3px rgba(0, 0, 0, 0.7); }
.gif_player .play_button::after {
content: "GIF"; }
.gif_player.playing .play_button {
transform: translate(-50%, -50%) scale(0) rotate(180deg);
opacity: 0.5; }
.gif_player img {
max-width: 100%; }

4 changes: 2 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,9 @@ const config = {
blog: false,
theme: {
customCss: [
require.resolve("./src/css/docu-notion-styles.css"),
require.resolve("./css/docu-notion-styles.css"),
require.resolve(
"./src/css/gifplayer.css"
"./css/gifplayer.css"
//"./node_modules/react-gif-player/dist/gifplayer.css" // this gave a big red compile warning which is seaming unrelated " Replace Autoprefixer browsers option to Browserslist config..."
),
],
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"scripts": {
"clear-docs": "rimraf ./docs/",
"pull-test-tagged": "yarn clear-docs && cross-var yarn docu-notion -n $DOCU_NOTION_INTEGRATION_TOKEN -r $DOCU_NOTION_SAMPLE_ROOT_PAGE -m ./docs -i ./static/notion_imgs -p /notion_imgs/ --status-tag test",
"pull:latest": "yarn clear-docs && cross-var npx @sillsdev/docu-notion -n $DOCU_NOTION_INTEGRATION_TOKEN -r $DOCU_NOTION_SAMPLE_ROOT_PAGE -m ./docs -i ./static/notion_imgs -p /notion_imgs/",
"pull:latest": "yarn clear-docs && cross-var npx @sillsdev/docu-notion -n $DOCU_NOTION_INTEGRATION_TOKEN -r $DOCU_NOTION_SAMPLE_ROOT_PAGE -m ./docs -i ./static/notion_imgs -p /notion_imgs/",
"//pull": "This uses the specific version of docu-notion in yarn.lock, not necessarily the latest",
"pull": "yarn clear-docs && cross-var yarn docu-notion -n $DOCU_NOTION_INTEGRATION_TOKEN -r $DOCU_NOTION_SAMPLE_ROOT_PAGE -m ./docs -i ./static/notion_imgs -p /notion_imgs/",
"start": "docusaurus start",
Expand All @@ -19,8 +19,8 @@
"@docusaurus/preset-classic": "^2.4.3",
"@easyops-cn/docusaurus-search-local": "^0.36.0",
"@mdx-js/react": "^1",
"clsx": "^1.2.1",
"@sillsdev/docu-notion": "^0.16.1",
"clsx": "^1.2.1",
"prism-react-renderer": "^1.3.5",
"react": "^17.0.2",
"react-dom": "^17.0.2",
Expand Down

0 comments on commit 3ae2000

Please sign in to comment.