Skip to content
This repository has been archived by the owner on Feb 6, 2024. It is now read-only.

Add community calendar #18

Merged
merged 2 commits into from
Oct 27, 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
2 changes: 0 additions & 2 deletions napari_sphinx_theme/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import os
from pathlib import Path

from .calendar import CalendarDirective
from .napari_code_theme import *

__version__ = "0.0.1dev"
Expand Down Expand Up @@ -79,7 +78,6 @@ def setup(app):
app.add_html_theme("napari_sphinx_theme", str(here))
app.connect("builder-inited", set_config_defaults)
app.connect("html-page-context", update_templates)
app.add_directive('calendar', CalendarDirective)

# Include templates for sidebar
app.config.templates_path.append(str(here / "_templates"))
Expand Down
31 changes: 0 additions & 31 deletions napari_sphinx_theme/calendar.py

This file was deleted.

1 change: 0 additions & 1 deletion napari_sphinx_theme/napari-layout.html
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
{% block content %}

{{ super() }}
<script src="{{ pathto('_static/scripts/napari-sphinx-theme.js', 1) }}"></script>

{%- endblock %}

Expand Down
60 changes: 0 additions & 60 deletions napari_sphinx_theme/scripts/napari_theme.js

This file was deleted.

203 changes: 24 additions & 179 deletions napari_sphinx_theme/static/css/napari-sphinx-theme.css
Original file line number Diff line number Diff line change
Expand Up @@ -574,191 +574,36 @@ nav.page-toc {
napari calendar
***************************/

/**
* By default, `react-calendar` includes no styling, so we need to provide our
* own using the Calendar component's CSS classes.
*/

.react-calendar,
.react-calendar__viewContainer {
display: flex;
flex: 1 1 0%;
flex-direction: column;
}

.react-calendar__month-view,
.react-calendar__month-view>div,
.react-calendar__month-view>div>div {
display: flex;
flex: 1 1 0%;
flex-direction: column;
}

.react-calendar__month-view__days {
height: 100%;
grid-template-columns: repeat(7, minmax(0, 1fr));
display: grid !important;
}

.react-calendar__month-view__days__day {
display: flex;
flex-direction: column;
}

.react-calendar__month-view__days__day> :not([hidden])~ :not([hidden]) {
--tw-space-y-reverse: 0;
margin-top: calc(0.25rem * calc(1 - var(--tw-space-y-reverse)));
margin-bottom: calc(0.25rem * var(--tw-space-y-reverse));
}

.react-calendar__month-view__days__day {
border-style: none;
cursor: default !important;
-webkit-tap-highlight-color: transparent;
max-width: 100% !important;
}

.react-calendar__month-view__days__day abbr {
margin-top: 0.25rem;
margin-left: 0.25rem;
font-weight: 600;
cursor: default;
border-style: none;
}

.react-calendar__month-view__days__day.active-week abbr {
--tw-bg-opacity: 1;
background-color: rgb(0 0 0 / var(--tw-bg-opacity));
--tw-text-opacity: 1;
color: rgb(255 255 255 / var(--tw-text-opacity));
display: flex;
align-items: center;
justify-content: center;
height: 1.5rem;
width: 1.5rem;
}

.react-calendar__month-view__days__day.active-week.active-day abbr {
border-radius: 9999px;
--tw-bg-opacity: 1;
background-color: rgb(128 209 255 / var(--tw-bg-opacity));
--tw-text-opacity: 1;
color: rgb(0 0 0 / var(--tw-text-opacity));
}

.react-calendar__month-view__days__day:nth-child(n+0) {
--tw-bg-opacity: 1;
background-color: rgb(247 247 247 / var(--tw-bg-opacity));
}

.react-calendar__month-view__days__day:nth-child(n+8) {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}

.react-calendar__month-view__days__day:nth-child(n+15) {
--tw-bg-opacity: 1;
background-color: rgb(247 247 247 / var(--tw-bg-opacity));
}

.react-calendar__month-view__days__day:nth-child(n+22) {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}

.react-calendar__month-view__days__day:nth-child(n+29) {
--tw-bg-opacity: 1;
background-color: rgb(247 247 247 / var(--tw-bg-opacity));
}

.react-calendar__month-view__days__day:nth-child(n+36) {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}

.react-calendar__month-view__days__day:nth-child(n+43) {
--tw-bg-opacity: 1;
background-color: rgb(247 247 247 / var(--tw-bg-opacity));
}

.react-calendar__month-view__days__day:nth-child(n+50) {
--tw-bg-opacity: 1;
background-color: rgb(255 255 255 / var(--tw-bg-opacity));
}

.react-calendar__month-view__days__day:nth-child(n+57) {
--tw-bg-opacity: 1;
background-color: rgb(247 247 247 / var(--tw-bg-opacity));
}

.react-calendar__month-view__days__day ul {
margin-top: 0.5rem;
margin-bottom: 0px;
}

.react-calendar__month-view__days__day ul>li {
margin: 0px;
text-overflow: ellipsis;
white-space: nowrap;
padding: 0px;
}

.react-calendar__month-view__days__day ul>li::before {
display: none;
}

.react-calendar__month-view__weekdays {
border-bottom-width: 1px;
--tw-border-opacity: 1;
border-color: rgb(0 0 0 / var(--tw-border-opacity));
}

.react-calendar__month-view__weekdays__weekday {
display: flex;
justify-content: center;
font-weight: 700;
text-transform: uppercase;
}

.react-calendar__month-view__weekdays__weekday abbr[title] {
-webkit-text-decoration-line: none;
text-decoration-line: none;
}

.napari-calendar {
font-family: Barlow, sans-serif;
--tw-text-opacity: 1;
color: rgb(0 0 0 / var(--tw-text-opacity));
}

.napari-calendar__container {
border: 1px solid #80d1ff;
}

.napari-calendar__popup {
width: calc(100vw - 6.25rem);
border-bottom: 1px solid var(--napari-color-text-base);
border-left: 1px solid #d2efff;
border-right: 1px solid #d2efff;
}

@media (max-width: 495px) {
.napari-calendar__popup {
width: calc(100vw - 3.125rem);
}
:root {
--fc-border-color: var(--napari-primary-blue);
--fc-daygrid-event-dot-width: 5px;
--fc-button-bg-color: var(--napari-primary-blue);
--fc-button-border-color: var(--napari-primary-blue);
--fc-button-text-color: var(--napari-color-text-base);
--fc-button-active-bg-color: var(--napari-deep-blue);
--fc-button-active-border-color: var(--napari-deep-blue);
--fc-button-hover-bg-color: var(--napari-deep-blue);
--fc-button-hover-border-color: var(--napari-deep-blue);
--fc-event-bg-color: var(--napari-light-blue);
--fc-event-border-color: var(--napari-light-blue);
--fc-event-text-color: var(--napari-color-text-base);
}

.fc .fc-button:focus {
box-shadow: none;
}

.napari-calendar__day-list ul>li {
padding: 0px;
.fc-event-time {
margin-right: 3px;
min-width: fit-content;
}

.napari-calendar__day-list ul>li::before {
display: none;
.fc-day-today .fc-daygrid-day-number {
background-color: var(--napari-primary-blue);
}

.napari-calendar__popup-metadata a {
-webkit-text-decoration-line: underline;
text-decoration-line: underline;
.fc .fc-daygrid-day.fc-day-today {
background-color: unset;
}

/***************************
Expand Down
5 changes: 5 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
{
"dependencies": {
"@fullcalendar/google-calendar": "^6.1.9"
}
}