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

Try: "Link in Bio" Theme #2363

Closed
wants to merge 19 commits into from
Closed
Show file tree
Hide file tree
Changes from 2 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
39 changes: 39 additions & 0 deletions linkinbio/assets/sass/_blocks.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
/**
* Block Styles
*/

.wp-block-social-links.is-style-linkinbio-large-buttons {
flex-direction: column;

.wp-social-link {
display: flex;
align-items: center;
justify-content: center;
width: 100%;
height: 3.5em;
border-radius: 3px;
margin-bottom: calc(0.5 * var(--global--spacing-vertical));
font-size: var(--global--font-size-md);
background: var(--global--color-tertiary) !important;

&:hover {
transform: initial;
}

a {
padding: 1.25em;
display: flex;
align-items: center;
color: var(--global--color-primary);

&::after {
content: attr(aria-label);
margin-left: 0.5em;
}
}

@include media(mobile) {
font-size: var(--global--font-size-lg);
}
}
}
3 changes: 3 additions & 0 deletions linkinbio/assets/sass/_footer.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.site-footer {
justify-content: center;
}
35 changes: 35 additions & 0 deletions linkinbio/assets/sass/_header.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
.site-header {
padding-top: calc(2 * var(--global--spacing-vertical));
padding-bottom: calc(1 * var(--global--spacing-vertical));

.has-main-navigation & {
padding-top: calc(2 * var(--global--spacing-vertical));
}

@include media(mobile) {
padding-top: calc(2 * var(--global--spacing-vertical));
padding-bottom: calc(1 * var(--global--spacing-vertical));

.has-main-navigation & {
padding-top: calc(1 * var(--global--spacing-vertical));
}
}
}

.site-logo img {
border-radius: 50%;
border: 3px solid var(--global--color-primary);
}

.site-title a {
font-weight: normal;
font-style: italic;
background-image: none;
}

/* Temporarily hide the page title on the homepage.
* (On WP.com, this will just be handled via Jetpack)
*/
.home .entry-header {
display: none;
}
3 changes: 3 additions & 0 deletions linkinbio/assets/sass/_posts_pages.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.site-main > article > .entry-footer {
border-top: none;
}
230 changes: 230 additions & 0 deletions linkinbio/assets/sass/_responsive.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,230 @@
/**
* Repsonsive Styles
*/

/**
* Required Variables
*/
$flexwidth: 100%;
$horizontal_space: var(--global--spacing-horizontal);

$breakpoint_sm: 482px;
$breakpoint_md: 592px;
$breakpoint_lg: 652px;
$breakpoint_xl: 822px;
$breakpoint_xxl: 1024px;

// Responsive breakpoints mixin
@mixin media( $res ) {

@if mobile-only == $res {
@media only screen and (max-width: #{$breakpoint_sm - 1}) {
@content;
}
}

@if mobile == $res {
@media only screen and (min-width: #{$breakpoint_sm}) {
@content;
}
}

@if tablet-only == $res {
@media only screen and (max-width: #{$breakpoint_md - 1}) {
@content;
}
}

@if tablet == $res {
@media only screen and (min-width: #{$breakpoint_md}) {
@content;
}
}

@if laptop-only == $res {
@media only screen and (max-width: #{$breakpoint_lg - 1}) {
@content;
}
}

@if laptop == $res {
@media only screen and (min-width: #{$breakpoint_lg}) {
@content;
}
}

@if desktop-only == $res {
@media only screen and (max-width: #{$breakpoint_xl - 1}) {
@content;
}
}

@if desktop == $res {
@media only screen and (min-width: #{$breakpoint_xl}) {
@content;
}
}

@if wide-only == $res {
@media only screen and (max-width: #{$breakpoint_xxl - 1}) {
@content;
}
}

@if wide == $res {
@media only screen and (min-width: #{$breakpoint_xxl}) {
@content;
}
}
}

/**
* Root Media Query Variables
*/
:root {
--responsive--spacing-horizontal: calc(2 * var(--global--spacing-horizontal));
--responsive--aligndefault-width: 100%;
--responsive--alignwide-width: 100%;
--responsive--alignfull-width: 100%;
--responsive--alignwide-width-multiplier: calc(16 * var(--global--spacing-horizontal));
--responsive--alignright-margin: var(--global--spacing-horizontal);
--responsive--alignleft-margin: var(--global--spacing-horizontal);
}

@include media(mobile) {
:root {
--responsive--aligndefault-width: calc(#{$breakpoint_sm} - var(--responsive--spacing-horizontal));
--responsive--alignwide-width: calc(#{$breakpoint_sm} - var(--responsive--spacing-horizontal));
--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
}
}

@include media(tablet) {
:root {
--responsive--aligndefault-width: calc(#{$breakpoint_sm} - var(--responsive--spacing-horizontal));
--responsive--alignwide-width: calc(#{$breakpoint_md} - var(--responsive--spacing-horizontal));
--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
}
}

@include media(laptop) {
:root {
--responsive--aligndefault-width: calc(#{$breakpoint_md} - var(--responsive--spacing-horizontal));
--responsive--alignwide-width: calc(#{$breakpoint_lg} - var(--responsive--spacing-horizontal));
--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
}
}

@include media(desktop) {
:root {
--responsive--aligndefault-width: calc(#{$breakpoint_lg} - var(--responsive--spacing-horizontal));
--responsive--alignwide-width: calc(#{$breakpoint_xl} - var(--responsive--spacing-horizontal));
--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
}
}

@include media(wide) {
:root {
--responsive--aligndefault-width: calc(#{$breakpoint_lg} - var(--responsive--spacing-horizontal));
--responsive--alignwide-width: calc(#{$breakpoint_xl} - var(--responsive--spacing-horizontal));
--responsive--alignright-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
--responsive--alignleft-margin: calc( 0.5 * (100vw - var(--responsive--aligndefault-width)));
}
}

/**
* Extends
*/
%responsive-aligndefault-width {
max-width: var(--responsive--aligndefault-width);
margin-left: auto;
margin-right: auto;
}

%responsive-alignwide-width {
max-width: var(--responsive--alignwide-width);
margin-left: auto;
margin-right: auto;
}

%responsive-alignfull-width-mobile {
max-width: calc(100% + (2 * var(--global--spacing-horizontal)));
width: calc(100% + (2 * var(--global--spacing-horizontal)));
margin-left: calc(-1 * var(--global--spacing-horizontal));
margin-right: auto;
}

@include media(mobile) {
%responsive-alignfull-width {
max-width: var(--responsive--alignfull-width);
width: auto;
margin-left: auto;
margin-right: auto;
}
}

%responsive-alignwide-width-nested {
margin-left: auto;
margin-right: auto;
width: var(--responsive--alignwide-width);
max-width: var(--responsive--alignfull-width);
}

%responsive-alignfull-width-nested {
margin-left: auto;
margin-right: auto;
width: calc(var(--responsive--alignfull-width) - calc(2 * var(--responsive--spacing-horizontal)));
max-width: var(--responsive--alignfull-width);
}

%responsive-alignleft-mobile {
/*rtl:ignore*/
margin-left: 0;
/*rtl:ignore*/
margin-right: var(--responsive--spacing-horizontal);
}

@include media(mobile) {
%responsive-alignleft {
/*rtl:ignore*/
margin-left: var(--responsive--alignleft-margin);
/*rtl:ignore*/
margin-right: var(--global--spacing-horizontal);
}
}

%responsive-alignright-mobile {
/*rtl:ignore*/
margin-left: var(--responsive--spacing-horizontal);
/*rtl:ignore*/
margin-right: 0;
}

@include media(mobile) {
%responsive-alignright {
/*rtl:ignore*/
margin-left: var(--global--spacing-horizontal);
/*rtl:ignore*/
margin-right: var(--responsive--alignright-margin);
}
}


/**
* Output
*/
.default-max-width {
@extend %responsive-aligndefault-width;
}

.wide-max-width {
@extend %responsive-alignwide-width;
}

.full-max-width {
@extend %responsive-alignfull-width;
}
3 changes: 3 additions & 0 deletions linkinbio/assets/sass/_text.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
.entry-content a {
font-weight: 500;
}
21 changes: 21 additions & 0 deletions linkinbio/assets/sass/style.scss
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
/*
Theme Name: Link in Bio
Theme URI: https://github.com/Automattic/themes/root-child
Author: Automattic
Author URI: https://automattic.com/
Description: A quick theme to share links.
Requires at least: WordPress 5.4
Version: 1.2.1
License: GNU General Public License v2 or later
License URI: LICENSE
Template: seedlet
Text Domain: linkinbio
Tags: one-column, flexible-header, accessibility-ready, custom-colors, custom-menu, custom-logo, editor-style, featured-images, footer-widgets, rtl-language-support, sticky-post, threaded-comments, translation-ready, auto-loading-homepage, jetpack-global-styles
*/

@import "responsive";
@import "text";
@import "header";
@import "footer";
@import "blocks";
@import "posts_pages";
Loading