Pour tout problème contactez-nous par mail : support@froggit.fr | La FAQ :grey_question: | Rejoignez-nous sur le Chat :speech_balloon:

Skip to content
Snippets Groups Projects
Commit 0919550c authored by Christophe Chaudier's avatar Christophe Chaudier :rocket:
Browse files

init project with LinkTreeFreeClone

parent 10c6702f
No related branches found
No related tags found
No related merge requests found
Showing with 11957 additions and 61 deletions
name: Playwright Tests
on:
push:
branches: [ main, master ]
pull_request:
branches: [ main, master ]
jobs:
test:
timeout-minutes: 60
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- name: Install dependencies
run: npm ci
- name: Install Playwright Browsers
run: npx playwright install --with-deps
- name: Run Playwright tests
run: npx playwright test
- uses: actions/upload-artifact@v3
if: always()
with:
name: playwright-report
path: playwright-report/
retention-days: 30
# build output
dist/
.output/
# dependencies
node_modules/
# logs
npm-debug.log*
yarn-debug.log*
yarn-error.log*
pnpm-debug.log*
# environment variables
.env
.env.production
# macOS-specific files
.DS_Store
/test-results/
/playwright-report/
/playwright/.cache/
.nvmrc 0 → 100644
v16.13.2
{
"recommendations": ["astro-build.astro-vscode"],
"unwantedRecommendations": []
}
{
"version": "0.2.0",
"configurations": [
{
"command": "./node_modules/.bin/astro dev",
"name": "Development server",
"request": "launch",
"type": "node-terminal"
}
]
}
LICENSE 0 → 100644
MIT License
Copyright (c) [2022] [Yoan Bernabeu]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
# Soutenir les Compagnons du DevOps
# LinkTree Free Clone
[![Playwright Tests](https://github.com/yoanbernabeu/LinkTreeFreeClone/actions/workflows/playwright.yml/badge.svg)](https://github.com/yoanbernabeu/LinkTreeFreeClone/actions/workflows/playwright.yml) [![Netlify Status](https://api.netlify.com/api/v1/badges/3e928715-44c6-4439-864e-6a346f699c07/deploy-status)](https://app.netlify.com/sites/linktreefreeclone/deploys)
![screenshoot](readme.png)
## Getting started
LinkTree Free Clone is a free clone of LinkTree, a popular link aggregator for social media.
To make it easy for you to get started with GitLab, here's a list of recommended next steps.
It is built with [Astro](https://astro.build) and [Tailwind CSS](https://tailwindcss.com).
Already a pro? Just edit this README.md and make it your own. Want to make it easy? [Use the template at the bottom](#editing-this-readme)!
Feel free to use it as a template for your own projects.
## Add your files
## 👀 Demo
- [ ] [Create](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#create-a-file) or [upload](https://docs.gitlab.com/ee/user/project/repository/web_editor.html#upload-a-file) files
- [ ] [Add files using the command line](https://docs.gitlab.com/ee/gitlab-basics/add-file.html#add-a-file-using-the-command-line) or push an existing Git repository with the following command:
You can see a demo of the project at [https://linktreefreeclone.yoandev.co/](https://linktreefreeclone.yoandev.co/)
```
cd existing_repo
git remote add origin https://lab.frogg.it/compagnons-devops/soutenir.compagnons-devops.fr.git
git branch -M main
git push -uf origin main
```
## 🚀 Quick start
## Integrate with your tools
1. **Customize your general settings**
- [ ] [Set up project integrations](https://lab.frogg.it/compagnons-devops/soutenir.compagnons-devops.fr/-/settings/integrations)
Open `src/config.ts` and edit the `SUBTITLE`, `TITLE`, `TAGLINE`, `contact`, `phone` and `email` variables.
## Collaborate with your team
2. **Customize your links**
- [ ] [Invite team members and collaborators](https://docs.gitlab.com/ee/user/project/members/)
- [ ] [Create a new merge request](https://docs.gitlab.com/ee/user/project/merge_requests/creating_merge_requests.html)
- [ ] [Automatically close issues from merge requests](https://docs.gitlab.com/ee/user/project/issues/managing_issues.html#closing-issues-automatically)
- [ ] [Enable merge request approvals](https://docs.gitlab.com/ee/user/project/merge_requests/approvals/)
- [ ] [Automatically merge when pipeline succeeds](https://docs.gitlab.com/ee/user/project/merge_requests/merge_when_pipeline_succeeds.html)
Create a new file in `src/pages/links/` for each link you want to add.
The file name will be not used, but it is recommended to use a descriptive name.
The file should contain a frontmatter section with the following variables:
* `title`: The title of the link
* `emoji`: The emoji to use for the link
* `href`: The URL of the link
## Test and Deploy
Example:
```md
---
Use the built-in continuous integration in GitLab.
title: Link 1
emoji: 📺
href: https://lorem.com
- [ ] [Get started with GitLab CI/CD](https://docs.gitlab.com/ee/ci/quick_start/index.html)
- [ ] [Analyze your code for known vulnerabilities with Static Application Security Testing(SAST)](https://docs.gitlab.com/ee/user/application_security/sast/)
- [ ] [Deploy to Kubernetes, Amazon EC2, or Amazon ECS using Auto Deploy](https://docs.gitlab.com/ee/topics/autodevops/requirements.html)
- [ ] [Use pull-based deployments for improved Kubernetes management](https://docs.gitlab.com/ee/user/clusters/agent/)
- [ ] [Set up protected environments](https://docs.gitlab.com/ee/ci/environments/protected_environments.html)
---
```
***
3. **Customize your avatar**
# Editing this README
Replace the file `src/public/avatar.png` with your own avatar.
When you're ready to make this README your own, just edit this file and use the handy template below (or feel free to structure it however you want - this is just a starting point!). Thank you to [makeareadme.com](https://www.makeareadme.com/) for this template.
4. **Customize your social media links**
## Suggestions for a good README
Every project is different, so consider which of these sections apply to yours. The sections used in the template are suggestions for most open source projects. Also keep in mind that while a README can be too long and detailed, too long is better than too short. If you think your README is too long, consider utilizing another form of documentation rather than cutting out information.
Create a new file in `src/pages/social/` for each social media link you want to add.
The file name will be not used, but it is recommended to use a descriptive name.
The file should contain a frontmatter section with the following variables:
## Name
Choose a self-explaining name for your project.
* `icon`: The icon to use for the link
* `url`: The URL of the link
## Description
Let people know what your project can do specifically. Provide context and add a link to any reference visitors might be unfamiliar with. A list of Features or a Background subsection can also be added here. If there are alternatives to your project, this is a good place to list differentiating factors.
Example:
## Badges
On some READMEs, you may see small images that convey metadata, such as whether or not all the tests are passing for the project. You can use Shields to add some to your README. Many services also have instructions for adding a badge.
```md
---
icon: linkedin
url: https://linkedin.com/in/yoan-bernabeu
## Visuals
Depending on what you are making, it can be a good idea to include screenshots or even a video (you'll frequently see GIFs rather than actual videos). Tools like ttygif can help, but check out Asciinema for a more sophisticated method.
---
```
## Installation
Within a particular ecosystem, there may be a common way of installing things, such as using Yarn, NuGet, or Homebrew. However, consider the possibility that whoever is reading your README is a novice and would like more guidance. Listing specific steps helps remove ambiguity and gets people to using your project as quickly as possible. If it only runs in a specific context like a particular programming language version or operating system or has dependencies that have to be installed manually, also add a Requirements subsection.
## 🔠 List of available icons for social media
## Usage
Use examples liberally, and show the expected output if you can. It's helpful to have inline the smallest example of usage that you can demonstrate, while providing links to more sophisticated examples if they are too long to reasonably include in the README.
For the `icon` variable in the frontmatter section of the social media links, you can use the following values:
## Support
Tell people where they can go to for help. It can be any combination of an issue tracker, a chat room, an email address, etc.
* `behance`
* `discord`
* `github`
* `facebook`
* `instagram`
* `google`
* `linkedin`
* `pinterest`
* `vkontakte`
* `stackoverflow`
* `telegram`
* `youtube`
* `tiktok`
* `snapchat`
* `slack`
* `messenger`
* `dribbble`
* `reddit`
* `twitter`
* `whatsapp`
* `twitch`
## Roadmap
If you have ideas for releases in the future, it is a good idea to list them in the README.
## 🧞 Commands
## Contributing
State if you are open to contributions and what your requirements are for accepting them.
All commands are run from the root of the project, from a terminal:
For people who want to make changes to your project, it's helpful to have some documentation on how to get started. Perhaps there is a script that they should run or some environment variables that they need to set. Make these steps explicit. These instructions could also be useful to your future self.
| Command | Action |
| :--------------------- | :------------------------------------------------- |
| `npm install` | Installs dependencies |
| `npm run dev` | Starts local dev server at `localhost:3000` |
| `npm run build` | Build your production site to `./dist/` |
| `npm run preview` | Preview your build locally, before deploying |
You can also document commands to lint the code or run tests. These steps help to ensure high code quality and reduce the likelihood that the changes inadvertently break something. Having instructions for running tests is especially helpful if it requires external setup, such as starting a Selenium server for testing in a browser.
## 📝 License
## Authors and acknowledgment
Show your appreciation to those who have contributed to the project.
## License
For open source projects, say how it is licensed.
## Project status
If you have run out of energy or time for your project, put a note at the top of the README saying that development has slowed down or stopped completely. Someone may choose to fork your project or volunteer to step in as a maintainer or owner, allowing your project to keep going. You can also make an explicit request for maintainers.
Licensed under the [MIT License](./LICENSE).
\ No newline at end of file
import { defineConfig } from 'astro/config';
// https://astro.build/config
import tailwind from "@astrojs/tailwind";
// https://astro.build/config
export default defineConfig({
integrations: [tailwind()]
});
\ No newline at end of file
This diff is collapsed.
{
"name": "@example/basics",
"type": "module",
"version": "0.0.1",
"private": true,
"scripts": {
"dev": "astro dev",
"start": "astro dev",
"build": "astro build",
"preview": "astro preview",
"astro": "astro",
"test": "playwright test"
},
"dependencies": {
"@astrojs/tailwind": "^2.1.3",
"astro": "^1.6.12",
"tailwindcss": "^3.2.4"
},
"devDependencies": {
"@playwright/test": "^1.28.1"
}
}
import type { PlaywrightTestConfig } from '@playwright/test';
import { devices } from '@playwright/test';
/**
* Read environment variables from file.
* https://github.com/motdotla/dotenv
*/
// require('dotenv').config();
/**
* See https://playwright.dev/docs/test-configuration.
*/
const config: PlaywrightTestConfig = {
testDir: './tests',
/* Maximum time one test can run for. */
timeout: 30 * 1000,
expect: {
/**
* Maximum time expect() should wait for the condition to be met.
* For example in `await expect(locator).toHaveText();`
*/
timeout: 5000
},
/* Run tests in files in parallel */
fullyParallel: true,
/* Fail the build on CI if you accidentally left test.only in the source code. */
forbidOnly: !!process.env.CI,
/* Retry on CI only */
retries: process.env.CI ? 2 : 0,
/* Opt out of parallel tests on CI. */
workers: process.env.CI ? 1 : undefined,
/* Reporter to use. See https://playwright.dev/docs/test-reporters */
reporter: 'html',
/* Shared settings for all the projects below. See https://playwright.dev/docs/api/class-testoptions. */
use: {
/* Maximum time each action such as `click()` can take. Defaults to 0 (no limit). */
actionTimeout: 0,
/* Base URL to use in actions like `await page.goto('/')`. */
// baseURL: 'http://localhost:3000',
/* Collect trace when retrying the failed test. See https://playwright.dev/docs/trace-viewer */
trace: 'on-first-retry',
},
/* Configure projects for major browsers */
projects: [
{
name: 'chromium',
use: {
...devices['Desktop Chrome'],
},
},
{
name: 'firefox',
use: {
...devices['Desktop Firefox'],
},
},
{
name: 'webkit',
use: {
...devices['Desktop Safari'],
},
},
/* Test against mobile viewports. */
// {
// name: 'Mobile Chrome',
// use: {
// ...devices['Pixel 5'],
// },
// },
// {
// name: 'Mobile Safari',
// use: {
// ...devices['iPhone 12'],
// },
// },
/* Test against branded browsers. */
// {
// name: 'Microsoft Edge',
// use: {
// channel: 'msedge',
// },
// },
// {
// name: 'Google Chrome',
// use: {
// channel: 'chrome',
// },
// },
],
/* Folder for test artifacts such as screenshots, videos, traces, etc. */
// outputDir: 'test-results/',
/* Run your local dev server before starting the tests */
webServer: {
command: 'npm run start',
port: 3000,
},
};
export default config;
public/avatar.png

15 KiB

<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 36 36">
<path fill="#000" d="M22.25 4h-8.5a1 1 0 0 0-.96.73l-5.54 19.4a.5.5 0 0 0 .62.62l5.05-1.44a2 2 0 0 0 1.38-1.4l3.22-11.66a.5.5 0 0 1 .96 0l3.22 11.67a2 2 0 0 0 1.38 1.39l5.05 1.44a.5.5 0 0 0 .62-.62l-5.54-19.4a1 1 0 0 0-.96-.73Z"/>
<path fill="url(#gradient)" d="M18 28a7.63 7.63 0 0 1-5-2c-1.4 2.1-.35 4.35.6 5.55.14.17.41.07.47-.15.44-1.8 2.93-1.22 2.93.6 0 2.28.87 3.4 1.72 3.81.34.16.59-.2.49-.56-.31-1.05-.29-2.46 1.29-3.25 3-1.5 3.17-4.83 2.5-6-.67.67-2.6 2-5 2Z"/>
<defs>
<linearGradient id="gradient" x1="16" x2="16" y1="32" y2="24" gradientUnits="userSpaceOnUse">
<stop stop-color="#000"/>
<stop offset="1" stop-color="#000" stop-opacity="0"/>
</linearGradient>
</defs>
<style>
@media (prefers-color-scheme:dark){:root{filter:invert(100%)}}
</style>
</svg>
readme.png

431 KiB

---
export interface Props {
contact: string;
phone: string;
email: string;
}
const { contact, phone, email } = Astro.props;
---
<div>
<div
class="mx-auto max-w-7xl py-12 px-4 text-center sm:px-6 lg:py-16 lg:px-8"
>
<h2 class="text-2xl font-bold tracking-tight text-indigo-300 sm:text-2xl">
<span class="block">{contact}</span>
</h2>
<div class="mt-5 flex justify-center">
<div class="ml-3 inline-flex">
<a
href={"mailto://"+email}
class="inline-flex items-center justify-center rounded-md border border-transparent bg-indigo-100 px-5 py-3 text-base font-medium text-indigo-700 hover:bg-indigo-200 shadow-md hover:shadow-xl"
>📪 Email me</a
>
</div>
</div>
</div>
</div>
---
export interface Props {
title: string;
tagline: string;
}
const { title, tagline } = Astro.props;
---
<footer>
<div class="mx-auto max-w-7xl py-12 px-4 sm:px-6 md:flex md:items-center md:justify-center lg:px-8">
<div class="mt-8 md:order-1 md:mt-0">
<p class="text-center text-base text-gray-400">
&copy; 2022 {title}. {tagline}
</p>
<p class="text-center text-base text-gray-400">
Make with <a href="https://github.com/yoanbernabeu/LinkTreeFreeClone" class="brand-color">LinkTreeFreeClone</a>
</p>
</div>
</div>
</footer>
---
import Social from './Social.astro';
export interface Props {
subtitle: string;
title: string;
tagline: string;
}
const { subtitle, title, tagline } = Astro.props;
const socials = await Astro.glob("./../pages/socials/*.md");
---
<div>
<div class="mx-auto max-w-7xl py-16 px-4 sm:py-10 sm:px-6 lg:px-8">
<div class="text-center">
<img class="mx-auto h-40 w-40 rounded-full xl:h-56 xl:w-56" src="avatar.png" alt="">
<p class="mt-5 text-4xl font-bold tracking-tight text-gray-900 sm:text-5xl lg:text-6xl">
{title}
</p>
<h2 class="text-lg font-semibold brand-color mt-5">
{subtitle}
</h2>
<p class="mx-auto mt-5 max-w-xl text-xl text-gray-500">
{tagline}
</p>
<Social
socials={socials}
/>
</div>
</div>
</div>
This diff is collapsed.
---
export interface Props {
title: string;
emoji: string;
href: string;
}
const { title, emoji, href } = Astro.props;
---
<div class="relative flex items-center space-x-3 rounded-lg border border-indigo-300 bg-white px-6 py-5 focus-within:ring-2 focus-within:ring-indigo-500 focus-within:ring-offset-2 hover:border-indigo-400 p-4 shadow-md hover:shadow-xl">
<div class="min-w-0 flex-1">
<a href={href} class="focus:outline-none">
<p class=" text-xl font-medium text-gray-900">{emoji} {title}</p>
</a>
</div>
</div>
\ No newline at end of file
---
import Icon from './Icon.astro';
export interface Props {
socials: any;
}
const { socials } = Astro.props;
---
<div class="mt-5 flex justify-center space-x-2">
{
socials.map((social: any) => (
<Icon
icon={social.frontmatter.icon}
url={social.frontmatter.url}
/>
))
}
</div>
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment