Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

UTCT-24: UTC Branding on front and back ends #44

Merged
merged 16 commits into from
Dec 18, 2023
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
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ user/config.php
frontend/node_modules
frontend/package-lock.json

# backend tooling
user/plugins/sleeky-backend/node_modules
user/plugins/sleeky-backend/package-lock.json

# SQL
*.sql
*.sql.gz
Expand Down
27 changes: 14 additions & 13 deletions frontend/assets/sass/styles.scss
Original file line number Diff line number Diff line change
@@ -1,17 +1,18 @@
// Font Imports
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Open+Sans&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Oswald:wght@500&family=Montserrat&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Raleway:wght@300&family=Raleway&display=swap');

$open-sans: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
$montserrat: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
$raleway: "Raleway", system-ui, -apple-system, "Segoe UI", Raleway, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
$oswald: "Oswald", system-ui, -apple-system, "Segoe UI", Oswald, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";

// Bootstrap Overrides
$enable-negative-margins: true;
$font-family-sans-serif: $open-sans;
$input-btn-font-family: $montserrat;
$headings-font-family: $montserrat;
$font-family-sans-serif: $raleway;
$input-btn-font-family: $oswald;
$headings-font-family: $oswald;
$input-bg: #ebebeb;
$input-font-weight: 700;
$btn-font-weight: 700;
$input-font-weight: 500;
$btn-font-weight: 500;
$input-border-width: 0;
$border-radius: 6px;

Expand Down Expand Up @@ -46,10 +47,10 @@ $border-radius: 6px;
//@import "../../node_modules/bootstrap/scss/breadcrumb";
//@import "../../node_modules/bootstrap/scss/pagination";
//@import "../../node_modules/bootstrap/scss/badge";
//@import "../../node_modules/bootstrap/scss/alert";
@import "../../node_modules/bootstrap/scss/alert";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for frontend alerts such as "shortcut reserved or already in use"

//@import "../../node_modules/bootstrap/scss/progress";
//@import "../../node_modules/bootstrap/scss/list-group";
//@import "../../node_modules/bootstrap/scss/close";
@import "../../node_modules/bootstrap/scss/close";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for dismissing frontend alerts.

//@import "../../node_modules/bootstrap/scss/toasts";
//@import "../../node_modules/bootstrap/scss/modal";
//@import "../../node_modules/bootstrap/scss/tooltip";
Expand All @@ -67,9 +68,9 @@ $border-radius: 6px;

// Custom Styles
.bold-link {
font-family: $montserrat;
font-weight: 700;
text-transform: uppercase;
font-family: $oswald;
font-weight: 500;
text-transform: none;
}

@include media-breakpoint-down(md) {
Expand Down
16 changes: 16 additions & 0 deletions frontend/assets/svg/utc-power-c-reverse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
60 changes: 60 additions & 0 deletions frontend/assets/svg/utc-wordmark-reverse.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 9 additions & 10 deletions frontend/config.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,19 +4,19 @@
// GENERAL

// Page title for your site
define('title', 'Sleeky theme for YOURLS');
define('title', 'UTC URL Shortener');

// The short title of your site, used in the footer and in some sub pages
define('shortTitle', 'Sleeky');
define('shortTitle', 'go.UTC.edu');

// A description of your site, shown on the homepage.
define('description', 'A quick description on why your site is so fantastic, what it does and why people should definitely start using it. Oh, and how it’s free.');
define('description', '<strong>Long URLs annoy.</strong> Shorten and share, Mocs.<br /><small><em>Short links and URLs entered at go.UTC.edu are actively monitored by UTC IT.</em></small>');

// The favicon for your site
define('favicon', '/frontend/assets/img/favicon.ico');
define('favicon', 'user/plugins/yourls-favicon/assets/favicon.ico');

// Logo for your site, displayed on home page
define('logo', '/frontend/assets/img/logo-black.png');
define('logo', '/frontend/assets/svg/utc-wordmark-reverse.svg');

// Enable reCAPTCHA V3
// It is highly recommended you use reCAPTCHA V3. It will stop spam. You can get a site and secret key from here: https://www.google.com/recaptcha/admin/create
Expand All @@ -36,7 +36,7 @@
// Set a primary colour to be used. Default: #007bff
// Here are some other colours you could try:
// #f44336: red, #9c27b0: purple, #00bcd4: teal, #ff5722: orange
define('colour', '#205493');
define('colour', '#112E51');

// Optional
// Set a background image to be used.
Expand All @@ -50,8 +50,7 @@
// The array follows a title link structure:
// "TITLE" => "LINK",
$footerLinks = [
"About" => "https://github.com/utctiny",
"Contact" => "https://www.utc.edu/web",
// "Legal" => "https://yourls.org/",
"Admin" => "/admin/"
"About" => "https://github.com/UTCWeb/utctiny#utctiny",
"Privacy" => "https://www.utc.edu/about/privacy",
"Manage My Links" => "/admin/",
];
165 changes: 152 additions & 13 deletions frontend/dist/styles.css
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
@charset "UTF-8";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Compiled frontend styles; built from frontend tooling via npm-sass.

@import url("https://fonts.googleapis.com/css2?family=Montserrat:wght@700&family=Open+Sans&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Oswald:wght@500&family=Montserrat&display=swap");
@import url("https://fonts.googleapis.com/css2?family=Raleway:wght@300&family=Raleway&display=swap");
:root,
[data-bs-theme=light] {
--bs-blue: #0d6efd;
Expand Down Expand Up @@ -67,7 +68,7 @@
--bs-dark-border-subtle: #adb5bd;
--bs-white-rgb: 255, 255, 255;
--bs-black-rgb: 0, 0, 0;
--bs-font-sans-serif: "Open Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-sans-serif: "Raleway", system-ui, -apple-system, "Segoe UI", Raleway, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
--bs-font-monospace: SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
--bs-gradient: linear-gradient(180deg, rgba(255, 255, 255, 0.15), rgba(255, 255, 255, 0));
--bs-body-font-family: var(--bs-font-sans-serif);
Expand Down Expand Up @@ -213,7 +214,7 @@ hr {
h6, .h6, h5, .h5, h4, .h4, h3, .h3, h2, .h2, h1, .h1 {
margin-top: 0;
margin-bottom: 0.5rem;
font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: "Oswald", system-ui, -apple-system, "Segoe UI", Oswald, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-weight: 500;
line-height: 1.2;
color: var(--bs-heading-color);
Expand Down Expand Up @@ -1851,9 +1852,9 @@ progress {
display: block;
width: 100%;
padding: 0.375rem 0.75rem;
font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: "Oswald", system-ui, -apple-system, "Segoe UI", Oswald, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 700;
font-weight: 500;
line-height: 1.5;
color: var(--bs-body-color);
appearance: none;
Expand Down Expand Up @@ -2002,9 +2003,9 @@ textarea.form-control-lg {
display: block;
width: 100%;
padding: 0.375rem 2.25rem 0.375rem 0.75rem;
font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-family: "Oswald", system-ui, -apple-system, "Segoe UI", Oswald, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-size: 1rem;
font-weight: 700;
font-weight: 500;
line-height: 1.5;
color: var(--bs-body-color);
appearance: none;
Expand Down Expand Up @@ -2393,7 +2394,7 @@ textarea.form-control-lg {
align-items: center;
padding: 0.375rem 0.75rem;
font-size: 1rem;
font-weight: 700;
font-weight: 500;
line-height: 1.5;
color: var(--bs-body-color);
text-align: center;
Expand Down Expand Up @@ -2634,9 +2635,9 @@ textarea.form-control-lg {
.btn {
--bs-btn-padding-x: 0.75rem;
--bs-btn-padding-y: 0.375rem;
--bs-btn-font-family: Montserrat, system-ui, -apple-system, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, Liberation Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
--bs-btn-font-family: Oswald, system-ui, -apple-system, Segoe UI, Oswald, Helvetica Neue, Arial, Noto Sans, Liberation Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
--bs-btn-font-size: 1rem;
--bs-btn-font-weight: 700;
--bs-btn-font-weight: 500;
--bs-btn-line-height: 1.5;
--bs-btn-color: var(--bs-body-color);
--bs-btn-bg: transparent;
Expand Down Expand Up @@ -3379,6 +3380,144 @@ textarea.form-control-lg {
--bs-accordion-btn-active-icon: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%236ea8fe'%3e%3cpath fill-rule='evenodd' d='M1.646 4.646a.5.5 0 0 1 .708 0L8 10.293l5.646-5.647a.5.5 0 0 1 .708.708l-6 6a.5.5 0 0 1-.708 0l-6-6a.5.5 0 0 1 0-.708z'/%3e%3c/svg%3e");
}

.alert {
--bs-alert-bg: transparent;
--bs-alert-padding-x: 1rem;
--bs-alert-padding-y: 1rem;
--bs-alert-margin-bottom: 1rem;
--bs-alert-color: inherit;
--bs-alert-border-color: transparent;
--bs-alert-border: var(--bs-border-width) solid var(--bs-alert-border-color);
--bs-alert-border-radius: var(--bs-border-radius);
--bs-alert-link-color: inherit;
position: relative;
padding: var(--bs-alert-padding-y) var(--bs-alert-padding-x);
margin-bottom: var(--bs-alert-margin-bottom);
color: var(--bs-alert-color);
background-color: var(--bs-alert-bg);
border: var(--bs-alert-border);
border-radius: var(--bs-alert-border-radius);
}

.alert-heading {
color: inherit;
}

.alert-link {
font-weight: 700;
color: var(--bs-alert-link-color);
}

.alert-dismissible {
padding-right: 3rem;
}
.alert-dismissible .btn-close {
position: absolute;
top: 0;
right: 0;
z-index: 2;
padding: 1.25rem 1rem;
}

.alert-primary {
--bs-alert-color: var(--bs-primary-text-emphasis);
--bs-alert-bg: var(--bs-primary-bg-subtle);
--bs-alert-border-color: var(--bs-primary-border-subtle);
--bs-alert-link-color: var(--bs-primary-text-emphasis);
}

.alert-secondary {
--bs-alert-color: var(--bs-secondary-text-emphasis);
--bs-alert-bg: var(--bs-secondary-bg-subtle);
--bs-alert-border-color: var(--bs-secondary-border-subtle);
--bs-alert-link-color: var(--bs-secondary-text-emphasis);
}

.alert-success {
--bs-alert-color: var(--bs-success-text-emphasis);
--bs-alert-bg: var(--bs-success-bg-subtle);
--bs-alert-border-color: var(--bs-success-border-subtle);
--bs-alert-link-color: var(--bs-success-text-emphasis);
}

.alert-info {
--bs-alert-color: var(--bs-info-text-emphasis);
--bs-alert-bg: var(--bs-info-bg-subtle);
--bs-alert-border-color: var(--bs-info-border-subtle);
--bs-alert-link-color: var(--bs-info-text-emphasis);
}

.alert-warning {
--bs-alert-color: var(--bs-warning-text-emphasis);
--bs-alert-bg: var(--bs-warning-bg-subtle);
--bs-alert-border-color: var(--bs-warning-border-subtle);
--bs-alert-link-color: var(--bs-warning-text-emphasis);
}

.alert-danger {
--bs-alert-color: var(--bs-danger-text-emphasis);
--bs-alert-bg: var(--bs-danger-bg-subtle);
--bs-alert-border-color: var(--bs-danger-border-subtle);
--bs-alert-link-color: var(--bs-danger-text-emphasis);
}

.alert-light {
--bs-alert-color: var(--bs-light-text-emphasis);
--bs-alert-bg: var(--bs-light-bg-subtle);
--bs-alert-border-color: var(--bs-light-border-subtle);
--bs-alert-link-color: var(--bs-light-text-emphasis);
}

.alert-dark {
--bs-alert-color: var(--bs-dark-text-emphasis);
--bs-alert-bg: var(--bs-dark-bg-subtle);
--bs-alert-border-color: var(--bs-dark-border-subtle);
--bs-alert-link-color: var(--bs-dark-text-emphasis);
}

.btn-close {
--bs-btn-close-color: #000;
--bs-btn-close-bg: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='%23000'%3e%3cpath d='M.293.293a1 1 0 0 1 1.414 0L8 6.586 14.293.293a1 1 0 1 1 1.414 1.414L9.414 8l6.293 6.293a1 1 0 0 1-1.414 1.414L8 9.414l-6.293 6.293a1 1 0 0 1-1.414-1.414L6.586 8 .293 1.707a1 1 0 0 1 0-1.414z'/%3e%3c/svg%3e");
--bs-btn-close-opacity: 0.5;
--bs-btn-close-hover-opacity: 0.75;
--bs-btn-close-focus-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
--bs-btn-close-focus-opacity: 1;
--bs-btn-close-disabled-opacity: 0.25;
--bs-btn-close-white-filter: invert(1) grayscale(100%) brightness(200%);
box-sizing: content-box;
width: 1em;
height: 1em;
padding: 0.25em 0.25em;
color: var(--bs-btn-close-color);
background: transparent var(--bs-btn-close-bg) center/1em auto no-repeat;
border: 0;
border-radius: 6px;
opacity: var(--bs-btn-close-opacity);
}
.btn-close:hover {
color: var(--bs-btn-close-color);
text-decoration: none;
opacity: var(--bs-btn-close-hover-opacity);
}
.btn-close:focus {
outline: 0;
box-shadow: var(--bs-btn-close-focus-shadow);
opacity: var(--bs-btn-close-focus-opacity);
}
.btn-close:disabled, .btn-close.disabled {
pointer-events: none;
user-select: none;
opacity: var(--bs-btn-close-disabled-opacity);
}

.btn-close-white {
filter: var(--bs-btn-close-white-filter);
}

[data-bs-theme=dark] .btn-close {
filter: var(--bs-btn-close-white-filter);
}

.clearfix::after {
display: block;
clear: both;
Expand Down Expand Up @@ -9209,9 +9348,9 @@ textarea.form-control-lg {
}
}
.bold-link {
font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-weight: 700;
text-transform: uppercase;
font-family: "Oswald", system-ui, -apple-system, "Segoe UI", Oswald, "Helvetica Neue", Arial, "Noto Sans", "Liberation Sans", sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
font-weight: 500;
text-transform: none;
}

@media (max-width: 767.98px) {
Expand Down
4 changes: 2 additions & 2 deletions frontend/footer.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-MrcW6ZMFYlzcLA8Nl+NtUVF0sA7MsXsP1UyJoMp4YLEuNSfAP+JcXn/tWtIaxVXM" crossorigin="anonymous"></script>

<script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-oBqDVmMz9ATKxIep9tiCxS/Z9fNfEXiDAYTujMAeBAsjFuCZSmKbSSUnQlmh/jp3" crossorigin="anonymous"></script>
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

popper.js is no longer part of main bootstrap.min.js. Needed for some frontend transitions such as the Customize Link accordion.

<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js" integrity="sha384-cuYeSxntonz0PPNlHhBs68uyIAVpIIOZZ5JqeqvYYIcEL727kskC66kF92t6Xl2V" crossorigin="anonymous"></script>
<script>
// From https://stackoverflow.com/a/30810322
function fallbackCopyTextToClipboard(text) {
Expand Down
2 changes: 2 additions & 0 deletions frontend/gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,8 @@ gulp.task('start', gulp.series('sass', function () {
proxy: "utctiny.lndo.site"
});
gulp.watch("assets/sass/*.scss", gulp.series('sass'));
gulp.watch("assets/img/*.png").on('change', browserSync.reload);
gulp.watch("assets/svg/*.svg").on('change', browserSync.reload);
gulp.watch("*.php").on('change', browserSync.reload);
}));

Expand Down
4 changes: 2 additions & 2 deletions frontend/header.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@

<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-patible" content="IE=edge">
<meta http-equiv="X-UA-compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<meta name="description" content="<?php echo description ?>">
<link rel="icon" href="<?php echo favicon ?>">
<link rel="icon" href="<?php echo favicon ?>?ver=20231214-2229">

<title><?php echo title ?></title>

Expand Down
Loading