Skip to content

Commit

Permalink
fixed wysiwyg
Browse files Browse the repository at this point in the history
  • Loading branch information
pookmish committed Jan 1, 2024
1 parent 3c48803 commit 3e1fab1
Show file tree
Hide file tree
Showing 3 changed files with 100 additions and 11 deletions.
96 changes: 96 additions & 0 deletions .gitpod.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@

additionalRepositories:
- url: https://github.com/SU-SWS/acsf-cardinalsites-public
checkoutLocation: back
checkoutLocation: front
github:
prebuilds:
master: true
branches: false
pullRequests: true
pullRequestsFromForks: false
addCheck: false
addComment: false
addBadge: true
ports:
- name: database
description: Mysql database
port: 3306
onOpen: ignore
visibility: private
- port: 33060
onOpen: ignore
visibility: private
- name: drupal
description: Drupal backend
port: 8001
onOpen: ignore
visibility: public
- name: frontend
description: NextJS frontend
port: 3000
onOpen: ignore
visibility: public
- port: 8002-9999
onOpen: ignore
image: pookmish/drupal8ci:gitpod
tasks:
- name: Drupal Prep
init: >
eval $(gp env -e APACHE_DOCROOT_IN_REPO=../back/docroot) &&
cd /workspace/back &&
git checkout composer.* &&
composer install --no-interaction &&
mkdir -p blt &&
cp .gitpod/blt.yml blt/local.blt.yml &&
find docroot/sites/ -name 'local*' | xargs rm -rf &&
cp .gitpod/global.settings.php docroot/sites/settings/global.settings.php &&
cp .gitpod/default.local.services.yml docroot/sites/local.services.yml &&
export NEXT_PUBLIC_DRUPAL_BASE_URL=`gp url 8001` &&
export PREVIEW_URL=${NEXT_PUBLIC_DRUPAL_BASE_URL#"https://"} &&
blt blt:telemetry:disable --no-interaction &&
blt settings &&
blt drupal:install -n
command: |
cd /workspace/back &&
echo 'Restarting Apache' &&
eval $(gp env -e APACHE_DOCROOT_IN_REPO=../back/docroot) &&
apache2ctl restart &&
gp ports await 8001 &&
find docroot -name 'local.drush.yml' | xargs rm &&
export NEXT_PUBLIC_DRUPAL_BASE_URL=`gp url 8001` &&
export PREVIEW_URL=${NEXT_PUBLIC_DRUPAL_BASE_URL#"https://"} &&
blt blt:telemetry:disable --no-interaction &&
echo 'Establishing Settings' &&
blt settings &&
echo 'Logging Into Drupal' &&
drush uli --uri=$NEXT_PUBLIC_DRUPAL_BASE_URL &&
drush uli --uri=$NEXT_PUBLIC_DRUPAL_BASE_URL | xargs gp preview --external &&
git config core.fileMode false &&
echo 'Connecting Drupal to Frontend' &&
cd /workspace/front &&
yarn install &&
yarn dev &
gp ports await 3000 &&
gp url 3000 | xargs gp preview --external
- name: SSH Keys
command: |
rm -rf ~/.ssh/id_rsa &&
rm -rf ~/.ssh/id_rsa.pub &&
eval $(command gp env -e) &&
mkdir -p ~/.ssh &&
[[ ! -z $SSH_PUBLIC_KEY ]] &&
echo $SSH_PUBLIC_KEY | base64 -d > ~/.ssh/id_rsa.pub &&
chmod 644 ~/.ssh/id_rsa.pub &&
[[ ! -z $SSH_PRIVATE_KEY ]] &&
echo $SSH_PRIVATE_KEY | base64 -d > ~/.ssh/id_rsa &&
chmod 600 ~/.ssh/id_rsa &&
cd /workspace/front &&
# git remote set-url origin [email protected]:SU-SWS/sulgryphon-nextjs.git &&
[[ ! -z $GITCONFIG ]] &&
echo $GITCONFIG | base64 -d > ~/.gitconfig &&
chmod 644 ~/.gitconfig

vscode:
extensions:
- bradlc.vscode-tailwindcss
14 changes: 3 additions & 11 deletions src/styles/typography/wysiwyg.tsx
Original file line number Diff line number Diff line change
@@ -1,19 +1,11 @@
// @ts-nocheck
module.exports = function () {
return function ({addComponents, theme}) {
return function ({addComponents}) {

const components = {
'.wysiwyg': {
'a h2, h2 a, a h3, h3 a, a h4, h4 a, a h5, h5 a': {
color: theme('colors.digital-red'),
textDecoration: 'none',
},
'a:hover h2, h2 a:hover, a:hover h3, h3 a:hover, a:hover h4, h4 a:hover, a:hover h5, h5 a:hover, a:focus h2, h2 a:focus, a:focus h3, h3 a:focus, a:focus h4, h4 a:focus, a:focus h5, h5 a:focus': {
color: theme('colors.black'),
textDecoration: 'underline',
},
pre: {
whiteSpace: 'normal',
'> :first-child': {
marginTop: '0'
}
},
};
Expand Down
1 change: 1 addition & 0 deletions tailwind.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ module.exports = {
require('@tailwindcss/container-queries'),
require(`${dir}/typography/local-footer.tsx`)(),
require(`${dir}/typography/global-message.tsx`)(),
require(`${dir}/typography/wysiwyg.tsx`)(),
require(`${dir}/centered-container.tsx`)(),
],
};

0 comments on commit 3e1fab1

Please sign in to comment.