diff options
| author | Joe Carstairs <65492573+Sycamost@users.noreply.github.com> | 2023-09-21 22:09:59 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2023-09-21 22:09:59 +0100 |
| commit | 005cba86fefc395b157d71b4c6233dba320afb05 (patch) | |
| tree | a4876fa46418830cdc5dcdcbfc3f36bc2fde5512 | |
| parent | aaac97183965e6edd4cbab9a9ea3be1fb90bfef2 (diff) | |
| parent | c357a2af03a8abf960941156414b990d50c48b76 (diff) | |
Merge pull request #6 from Sycamost/dev
Dev
| -rw-r--r-- | README.md | 133 | ||||
| -rw-r--r-- | public/css/modules/link.css | 15 | ||||
| -rw-r--r-- | src/i18n/translations/pages/home.ts | 20 | ||||
| -rw-r--r-- | src/i18n/translations/pages/lallansGallery.ts | 25 | ||||
| -rw-r--r-- | src/i18n/translations/pages/scotsounGallery.ts | 10 | ||||
| -rw-r--r-- | src/pages/[locale]/furthsettins/lallans/index.astro | 7 | ||||
| -rw-r--r-- | src/pages/[locale]/furthsettins/scotsoun/index.astro | 1 | ||||
| -rw-r--r-- | src/pages/[locale]/index.astro | 5 |
8 files changed, 204 insertions, 12 deletions
@@ -1,6 +1,6 @@ # Lallans Wabsteid Astro -This is the Scots Leid Associe wabsteid, implementit i [Astro](https://astro.build/). +This is the Scots Leid Associe website, implemented in [Astro](https://astro.build/). ## Gettin yokit @@ -10,3 +10,134 @@ git clone https://github.com/Sycamost/lallans-wabsteid-astro.git \ && npm install \ && npm run dev ``` + +## Writing a news post + +Skills required: + +* Can edit text files. +* Can write Markdown. (Beginners can learn in an afternoon by following the + [getting started guide](https://www.markdownguide.org/getting-started/)!) +* (Optional) Can open a command line terminal. (Here’s + [a great guide for beginners at MDN](https://developer.mozilla.org/en-US/docs/Learn/Tools_and_testing/Understanding_client-side_tools/Command_line)) + +Prerequisites: + +(You can either choose to use a command-line terminal or GitHub Desktop, an app +with a graphical user interface. If you haven't used a command-line terminal +before, it's probably a little easier to use GitHub Desktop, but either approach +will work.) + +* Has [installed Git](https://git-scm.com/book/en/v2/Getting-Started-Installing-Git). +* Has [signed up for GitHub](https://docs.github.com/en/get-started/signing-up-for-github/signing-up-for-a-new-github-account). +* If using a command line terminal: has configured an + [SSH key with GitHub](https://docs.github.com/en/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account). +* If **not** using a command line terminal: has [installed GitHub Desktop](https://desktop.github.com/). + +### Getting the code + +You will need to fork the repository, and then clone your fork. + +A fork is your personal copy of the repository, hosted online on GitHub.com. To +make a change to the website, you must make your own fork, make the changes to +your fork, and then request for your changes to be copied back into the original, +or "upstream," repository. + +To make a fork, follow +[GitHub's guide to making a fork](https://docs.github.com/en/get-started/quickstart/fork-a-repo). + +Once you've made a fork, it will be hosted online, most likely at +`https://github.com/YOUR_GITHUB_USERNAME/lallans-wabsteid-astro`. The next thing +you need to do is clone the repository. + +A clone is a local copy of a repository hosted online. In order to make changes +to the code, you need to have a copy of the code on your own computer for you to +edit. "Cloning" is essentially the same as "downloading." + +If you're using a command-line terminal, you can follow +[GitHub's guide to cloning a remote repository](https://docs.github.com/en/repositories/creating-and-managing-repositories/cloning-a-repository). +Or, if you already know how what you're doing, you can navigate to the directory +where you want your local repository to reside, and enter: + +```bash +git clone https://github.com/Sycamost/lallans-wabsteid-astro +``` + +If you're using GitHub Desktop, follow +[GitHub's guide to cloning a repo with GitHub Desktop](https://docs.github.com/en/desktop/adding-and-cloning-repositories/cloning-a-repository-from-github-to-github-desktop). + +Once the cloning is finished, you should now have a clone - a local copy - of +the code. You're ready to start making changes! + +### Making changes to the code + +You can make changes to the code using any text editor, such as Notepad on Windows +or TextEdit on Mac. Word processors, such as Microsoft Word, Openoffice Writer or +Pages, may work but are not suitable and I don't recommend them. For a better +experience, you might want to install an IDE, which is a text editor specially +designed for editing code. Popular choices include: +[Visual Studio Code](https://code.visualstudio.com/download) and +[Sublime Text](https://www.sublimetext.com/download). + +Once you've made some changes and saved them, you need to "commit" them. +This means telling Git to include those changes when you upload them back +to your forked repository. It's a little bit like saving your work, for Git. + +If you're using a command line, a great way to do this is by navigating to the +root directory of your local clone and enter this command: + +```bash +git add . +git diff --staged +``` + +The first command adds all changes in the whole directory, and the second command +shows you what you just added. + +Once you're happy with those changes, commit them with the following command: + +```bash +git commit -m "A brief description of your changes" +``` + +Make sure to provide a short (ideally fewer than 80 characters) description inside +quote marks. + +If you're using GitHub Desktop, you can follow +[GitHub's guide to making a commit](https://docs.github.com/en/desktop/making-changes-in-a-branch/committing-and-reviewing-changes-to-your-project-in-github-desktop). + +### Adding a news post + +The simplest way to add a news post is to duplicate an existing one, and +edit it to reflect the new content. + +To duplicate an existing one, you need to duplicate both the Scots and the English +version of a news article. Go to `src/content/news/sco` and duplicate a file in +that folder, then go to `src/content/news/en-GB` and do the same. The new files +should be named according to the existing pattern, which begins with the date of +the news article in `YYYY-MM-DD` format. Make sure to keep the `.mdx` file extension. + +Then, edit your duplicated files to contain the content for the new news article +and commit them. + +### Uploading the new news articles + +Once you've committed your new article in both Scots and English, you'll need +to first upload it back to your fork, and then ask for your fork's changes to +be included in the upstream repository. + +To upload, or, in Git terms, "push," your changes to your fork, if you're using +a command-line terminal, simply enter `git push`. If you're using GitHub Desktop, +click the button which says "Push origin." + +Then, once you've pushed to your fork, you need to request for your fork's changes +to be included in the upstream repository. In GitHub terms, this request is called +a Pull Request. + +To do this, [follow GitHub's guide to making a Pull Request from a fork](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork). +Importantly, you should target the base repository of `Sycamost/lallans-wabsteid-astro` +and the base branch of `dev`. + +Once you've done that, it's down to an owner of the upstream repository to approve +your Pull Request. Once they've done that, your new news article will appear on +the website. diff --git a/public/css/modules/link.css b/public/css/modules/link.css index 4bf2fc7..d225e9d 100644 --- a/public/css/modules/link.css +++ b/public/css/modules/link.css @@ -12,8 +12,7 @@ text-decoration-thickness 100ms, text-underline-offset 100ms, border-color 100ms, - font-weight 100ms, - font-size 100ms; + text-shadow 100ms; } .link:is(:hover, :focus, :focus-visible, :focus-within), @@ -21,15 +20,18 @@ text-decoration-color: currentColor; text-decoration-thickness: calc(4 * var(--relative-eighth-rem)); text-underline-offset: calc(3 * var(--relative-eighth-rem)); - font-weight: 700; + text-shadow: + 0 1px 0 currentColor, + 1px 0 0 currentColor, + 1px 0 0 currentColor, + 0 1px 0 currentColor; transition: color 300ms, text-decoration-color 300ms, text-decoration-thickness 300ms, text-underline-offset 300ms, border-color 300ms, - font-weight 300ms, - font-size 300ms; + text-shadow 300ms; } .link:focus, .link:focus-visible { @@ -38,6 +40,3 @@ border-color: var(--special-text-color); } -.link:active { - font-size: larger; -}
\ No newline at end of file diff --git a/src/i18n/translations/pages/home.ts b/src/i18n/translations/pages/home.ts index 2b9a2c3..09071ff 100644 --- a/src/i18n/translations/pages/home.ts +++ b/src/i18n/translations/pages/home.ts @@ -5,6 +5,26 @@ const tPage = { sco: () => 'Hame', 'en-GB': () => 'Home', }, + submit: { + sco: () => 'Submit til Lallans', + 'en-GB': () => 'Submit to Lallans', + }, + 'submit-para-1': { + sco: () => 'We ar acceptin submeissions til Lallans 102!', + 'en-GB': () => 'We are accepting submissions to Lallans 102!', + }, + 'submit-para-2': { + sco: () => ` + We accep poesie, cuttie tales, reviews, essays an drama, baith + oreiginal an owerset. Sen yer submeissions til + <a class="link" href="mailto:lallans@hotmail.co.uk">lallans@hotmail.co.uk</a>. + `, + 'en-GB': () => ` + We accept poetry, short stories, reviews, essays and drama, both + original and translated. Send your submissions to + <a class="link" href="mailto:lallans@hotmail.co.uk">lallans@hotmail.co.uk</a>. + `, + }, news: { sco: () => 'Recent News', 'en-GB': () => 'Recent News', diff --git a/src/i18n/translations/pages/lallansGallery.ts b/src/i18n/translations/pages/lallansGallery.ts new file mode 100644 index 0000000..a6be372 --- /dev/null +++ b/src/i18n/translations/pages/lallansGallery.ts @@ -0,0 +1,25 @@ +import type { TranslationsDictionary } from '$types/TranslationsDictionary'; + +const tPage = { + title: { + sco: () => 'Lallans', + 'en-GB': () => 'Lallans', + }, + 'about-lallans': { + sco: () => ` + Lallans is the foremaist leiterar journal dedicatit til new Scots-leid leiteratur. + We hae furthset it syne 1972 an pit two issues furth per year. We accep Scots + frae aw airts an in aw styles an dialects. Ye can finnd oot hoo tae submit til + Lallans on the hame page. + `, + 'en-GB': () => ` + Lallans is the leading literary journal dedicated to new Scots-language + literature. We have published it since 1972 and publish biannually. We accept + Scots of all kinds and in all styles and dialects. You can find out how to + submit to Lallans on the home page. + `, + }, +}; + +type Raw = typeof tPage; +export default tPage as TranslationsDictionary<Raw>; diff --git a/src/i18n/translations/pages/scotsounGallery.ts b/src/i18n/translations/pages/scotsounGallery.ts index 0e78e9c..6ac9cfd 100644 --- a/src/i18n/translations/pages/scotsounGallery.ts +++ b/src/i18n/translations/pages/scotsounGallery.ts @@ -5,6 +5,16 @@ const tPage = { sco: () => 'Scotsoun', 'en-GB': () => 'Scotsoun', }, + 'about-scotsoun': { + sco: () => ` + Scotsoun is oor lang-rinnin series o Scots-leid audio recordins, i the form o tales, + drama, sangs, an poesie readins. Forby, we hae some muisic CDs. + `, + 'en-GB': () => ` + Scotsoun is our long-running series of Scots-language audio recordings, in the form + of stories, drama, songs and poetry readings. We also have some music CDs. + `, + }, }; type Raw = typeof tPage; diff --git a/src/pages/[locale]/furthsettins/lallans/index.astro b/src/pages/[locale]/furthsettins/lallans/index.astro index 1bcfe47..61f31ec 100644 --- a/src/pages/[locale]/furthsettins/lallans/index.astro +++ b/src/pages/[locale]/furthsettins/lallans/index.astro @@ -2,7 +2,7 @@ import Page from '$layouts/Page.astro'; import localeStaticPaths from '$lib/localeStaticPaths'; import translate from '$i18n/translate'; -import tFurthsettins from '$i18n/translations/pages/furthsettins'; +import tPage from '$i18n/translations/pages/lallansGallery'; import type Locale from '$types/Locale'; import LallansIssuesGallery from '$components/LallansIssuesGallery.astro'; @@ -14,9 +14,10 @@ const locale = Astro.params.locale as Locale; const t = translate(locale); --- -<Page title={t(tFurthsettins, { key: 'title' })}> +<Page title={t(tPage, { key: 'title' })}> <section> - <h1>Lallans</h1> + <h1>{t(tPage, { key: 'title' })}</h1> + <p>{t(tPage, { key: 'about-lallans' })}</p> <LallansIssuesGallery /> </section> </Page> diff --git a/src/pages/[locale]/furthsettins/scotsoun/index.astro b/src/pages/[locale]/furthsettins/scotsoun/index.astro index bace876..26f1f13 100644 --- a/src/pages/[locale]/furthsettins/scotsoun/index.astro +++ b/src/pages/[locale]/furthsettins/scotsoun/index.astro @@ -17,6 +17,7 @@ const t = translate(locale); <Page title={t(tPage, { key: 'title' })}> <section> <h1>Scotsoun</h1> + <p>{t(tPage, { key: 'about-scotsoun' })}</p> <ScotsounCdGallery /> </section> </Page> diff --git a/src/pages/[locale]/index.astro b/src/pages/[locale]/index.astro index f031e8e..a230aee 100644 --- a/src/pages/[locale]/index.astro +++ b/src/pages/[locale]/index.astro @@ -23,6 +23,11 @@ const mostRecentNewsItem = await getMostRecentNewsItem(locale); <Page title={t(tPage, { key: 'title' })}> <section> + <h2 set:html={t(tPage, { key: 'submit' })} /> + <p set:html={t(tPage, { key: 'submit-para-1' })} /> + <p set:html={t(tPage, { key: 'submit-para-2' })} /> + </section> + <section> <h2 class="grid-span-6" set:html={t(tPage, { key: 'news' })} /> <NewsIndex newsItems={mostRecentNewsItem ? [mostRecentNewsItem] : []} headingLevel="h3" /> { |
