Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build SwiftLeeds
name: Build All Services

on:
pull_request:
Expand Down Expand Up @@ -78,6 +78,11 @@ jobs:
runs-on: ubuntu-latest
needs: build

strategy:
max-parallel: 1 # Shouldn't cause issues, but let's deploy one conference at a time
matrix:
conference: [swiftleeds, kotlinleeds]

steps:
- name: Checkout Repository
uses: actions/checkout@v4
Expand All @@ -92,14 +97,14 @@ jobs:
id: deployment
with:
step: start
env: ${{ github.head_ref || github.ref_name }}
env: ${{ matrix.conference }}-${{ github.head_ref || github.ref_name }}
ref: ${{ github.head_ref || github.ref_name }}

- name: Deploy to Cloud Run
id: deploy
uses: google-github-actions/deploy-cloudrun@v2
with:
service: swiftleeds-web-${{ github.head_ref || github.ref_name }}-be
service: ${{ matrix.conference }}-web-${{ github.head_ref || github.ref_name }}-be
region: europe-west1
image: europe-west1-docker.pkg.dev/swiftleeds-website/swiftleeds-web/web:${{ github.head_ref || github.ref_name }}-latest
flags: "--allow-unauthenticated"
Expand All @@ -119,6 +124,7 @@ jobs:
FLICKR_KEY=${{ secrets.FLICKR_KEY }}
FLICKR_SECRET=${{ secrets.FLICKR_SECRET }}
REFUND_PERIOD=${{ secrets.REFUND_PERIOD }}
CONFERENCE=${{ matrix.conference }}

- name: Update GitHub Deployment
uses: bobheadxi/deployments@v1
Expand Down
11 changes: 7 additions & 4 deletions .github/workflows/close.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Destroy SwiftLeeds
name: Shutdown Services

on:
pull_request:
Expand All @@ -9,6 +9,10 @@ jobs:
if: github.repository_owner == 'SwiftLeeds'
runs-on: ubuntu-latest

strategy:
matrix:
conference: [swiftleeds, kotlinleeds]

steps:
- name: Authenticate with Google Cloud
uses: "google-github-actions/auth@v2"
Expand All @@ -19,11 +23,10 @@ jobs:
uses: "google-github-actions/setup-gcloud@v2"

- name: Destroy Google Cloud Run Servce
run: gcloud run services delete --quiet --region europe-west2 swiftleeds-web-${{ github.head_ref || github.ref_name }}-be
run: gcloud run services delete --quiet --region europe-west1 ${{ matrix.conference }}-web-${{ github.head_ref || github.ref_name }}-be

- name: Destroy GitHub Deployment
uses: bobheadxi/deployments@v1
with:
step: deactivate-env
env: ${{ github.head_ref || github.ref_name }}

env: ${{ matrix.conference }}-${{ github.head_ref || github.ref_name }}
106 changes: 106 additions & 0 deletions Public/css/kotlin.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
body {
display: flex;
align-items: center;
justify-content: center;
height: 100vh;
margin: 0;
overflow: hidden; /* Prevent content from overflowing */
}

.half {
position: absolute;
top: 0;
width: 50vw;
height: 100vh;
}

.center-column-flex {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}

.center-row-flex {
display: flex;
align-items: center;
justify-content: center;
flex-direction: column;
}

.right-half {
right: 0;
background: white;
}

.left-half {
left: 0;
background: radial-gradient(89.53% 145.96% at 0.34% 100.79%, rgb(239, 72, 87) 0px, rgb(222, 73, 112) 17.58%, rgb(180, 77, 176) 50.31%, rgb(127, 82, 255) 97.03%);
}

.background-container {
z-index: 999;
}

/* Style for the form container */
.tito-register-interest-form {
max-width: 80%;
margin: 0 auto;
}

/* Style for the name field */
.tito-register-interest-form--name {
margin-bottom: 20px;
display: flex;
flex-direction: column;
}

.tito-name-label {
align-items: center;
}

/* Style for the email field */
.tito-register-interest-form--email {
margin-bottom: 20px;
display: flex;
flex-direction: column;
}

.tito-email-label {
align-items: center;
}

/* Style for the input fields with rounded corners and adjusted drop shadow */
.tito-register-interest-name-field,
.tito-register-interest-email-field {
width: 100%;
padding: 8px;
margin-top: 8px;
box-sizing: border-box;
border: 1px solid #ccc;
border-radius: 5px; /* Rounded corners */
box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1), 0 8px 16px rgba(0, 0, 0, 0.1); /* Adjusted drop shadow */
}

/* Style for the submit button with the new green color */
.tito-register-interest-form button {
background-color: rgb(25, 195, 125); /* New green color */
color: white;
padding: 10px 15px;
border: none;
border-radius: 4px;
cursor: pointer;
font-size: 16px;
}

/* Hover effect for the submit button */
.tito-register-interest-form button:hover {
background-color: #1a8041; /* Darker green on hover */
}

@media (max-width: 770px) {
/* Style changes for screens with a width of 762x685 or smaller */
.white-text-media-query {
color: #27282c;
}
}
34 changes: 34 additions & 0 deletions Public/img/Kotlin_Icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
43 changes: 43 additions & 0 deletions Resources/Views/Kotlin/home.leaf
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="keywords" content="android, kotlin, conference, leeds, kotlinleeds, swiftleeds">
<title>KotlinLeeds - The Unique Android Kotlin Conferece in the UK</title>
<link href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-9ndCyUaIbzAi2FUVXJi0CjmCapSmO7SnpJef0486qhLnuZ2cdeRhO02iuK6FUUVM" crossorigin="anonymous">
<link rel="stylesheet" href="/css/kotlin.css">
<script src='https://js.tito.io/v2' async></script>
<link rel="icon" href="favicon.ico" type="img/Kotlin_Icon">
<link rel="shortcut icon" href="favicon.ico" type="img/Kotlin_Icon">
</head>
<body>
<div class="half left-half"></div>
<div class="half right-half"></div>
<div class="container-fluid background-container">
<div class="row">
<div class="col-md-4 text-center text-white center-column-flex">
<h1 class="white-text-media-query fw-bold">Hello, KotlinLeeds!</h1>
<p class="white-text-media-query">We've got something coming soon...</p>
</div>
<div class="col-md-4 center-row-flex">
<img src="/img/Kotlin_Icon.svg" alt="Icon" class="img-fluid mx-auto d-block" style="width: 25%">
</div>
<div class="col-md-4 text-center" >
<tito-register-interest id="tito-widget" event="swiftleeds/kotlinleeds" email-placeholder="[email protected]" name-placeholder="Sundar Pichai">
<a data-v-2b7a4f44="" href="https://ti.to" target="_blank">Click here to register interest</a>
</tito-register-interest>
</div>
</div>
</div>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-geWF76RCwLtnZ8qwWowPQNguL3RmwHVBC9FhGdlKrxdiJJigb/j/68SIy3Te4Bkz" crossorigin="anonymous"></script>
<script defer data-domain="kotlinleeds.co.uk" src="https://plausible.io/js/script.js"></script>
<script>
window.tito =
window.tito ||
function() {
(tito.q = tito.q || []).push(arguments);
};
</script>
</body>
</html>
20 changes: 19 additions & 1 deletion Sources/App/configure.swift
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,15 @@ public func configure(_ app: Application) async throws {

// Routes
app.routes.defaultMaxBodySize = "10mb"
try routes(app)

switch app.conference {
case .kotlinleeds:
app.get { req in
req.view.render("Kotlin/home")
}
case .swiftleeds:
try routes(app)
}

// APNS
if
Expand All @@ -65,3 +73,13 @@ public func configure(_ app: Application) async throws {
app.logger.warning("Skipping APNS Setup")
}
}

extension Application {
enum Conference: String {
case kotlinleeds, swiftleeds
}

var conference: Conference {
Environment.get("CONFERENCE").flatMap { Conference(rawValue: $0) } ?? .swiftleeds
}
}