Skip to content

Commit

Permalink
Dev (#183)
Browse files Browse the repository at this point in the history
  • Loading branch information
Lungsangg authored Jul 19, 2024
2 parents a2a3b72 + 4be6c3c commit ac9dc9a
Show file tree
Hide file tree
Showing 4 changed files with 109 additions and 16 deletions.
4 changes: 2 additions & 2 deletions reader/views.py
Original file line number Diff line number Diff line change
Expand Up @@ -1191,11 +1191,11 @@ def canonical_url(request):

path = request.get_full_path()
if request.interfaceLang == "hebrew":
host = "https://www.sefaria.org.il"
host = "https://www.pecha.org"
# Default params for texts, text toc, and text category
path = re.sub("\?lang=he(&aliyot=0)?$", "", path)
else:
host = "https://www.sefaria.org"
host = "https://www.pecha.org"
# Default params for texts, text toc, and text category
path = re.sub("\?lang=bi(&aliyot=0)?$", "", path)

Expand Down
111 changes: 102 additions & 9 deletions static/css/s2.css
Original file line number Diff line number Diff line change
Expand Up @@ -11460,7 +11460,7 @@ span.purim-emoji img {
}

.bookMetaDataBox {
margin: 40px auto;
margin: 60px auto;
text-align: center;
}

Expand Down Expand Up @@ -14985,16 +14985,109 @@ span.ref-link-color-3 {

/*text completion status*/

.label {
color: white;


/* HTML: <div class="ribbon">Your text content</div> */
.ribbon {
font-size: 25px;
font-weight: bold;
color: #fff;
}

.ribbon-wrap {
position: sticky;
top: 40px;
left: 0;
margin-left: 0;
filter: drop-shadow(0px 10px 5px rgba(0,0,0,0.2));

}
/* HTML: <div class="ribbon">Your text content</div> */

.ribbon-padding {
padding: 200px;
}
.ribbon {
--r: .4em; /* control the ribbon shape (the radius) */
--c:var(--pecha-red);


position: absolute;
top: 5px;
left: 50%;
transform: translateX(-50%);
padding: 3px 8px 0px 8px;
border-radius: 20px;
font-size: 18px;
line-height: 1.8;
padding: .15em 1em calc(2*var(--r)) .9em;
border-radius: var(--r) 0 0 var(--r);
border: #000;
background:
radial-gradient(100% 50% at left,var(--c) 98%,#0000 101%)
100% 0/.5lh calc(100% - 2*var(--r)),
radial-gradient(100% 50% at right,#c55250ff 98%,#0000 101%)
0 100%/var(--r) calc(2*var(--r)),
conic-gradient(from 90deg at var(--r) calc(100% - 2*var(--r)),#0000 25%,var(--c) 0)
0 0/calc(101% - .5lh) 100%;
background-repeat: no-repeat;
}
.ribbon {
--r: .4em; /* control the ribbon shape (the radius) */
--c:var(--pecha-red);


position: absolute;
line-height: 1.8;
padding: .15em 1em calc(2*var(--r)) .9em;
border-radius: var(--r) 0 0 var(--r);
border: #000;
background:
radial-gradient(100% 50% at left,var(--c) 98%,#0000 101%)
100% 0/.5lh calc(100% - 2*var(--r)),
radial-gradient(100% 50% at right,#c55250ff 98%,#0000 101%)
0 100%/var(--r) calc(2*var(--r)),
conic-gradient(from 90deg at var(--r) calc(100% - 2*var(--r)),#0000 25%,var(--c) 0)
0 0/calc(101% - .5lh) 100%;
background-repeat: no-repeat;
}




@media (max-width: 850px) {

.ribbon-wrap {
position: absolute;
left: 50%;
top: 10px;
filter: drop-shadow(0px 10px 5px rgba(0,0,0,0.2));
transform: translateX(-40%);

}




@media (max-width: 850px) {

.ribbon-wrap {
position: absolute;
left: 50%;
top: 10px;
filter: drop-shadow(0px 10px 5px rgba(0,0,0,0.2));
transform: translateX(-40%);

}

.ribbon {
--r: .1em; /* control the ribbon shape (the radius) */
--c:var(--pecha-red);
position: relative;
line-height: 1;
top: 8px;
padding: calc(2*var(--r)) 1em 0 .9em;
border-radius: var(--r) 0 0 var(--r);
border: #000;
border-radius: 50px;
background: var(--pecha-red);
}
}


.success {background-color: #04AA6D;} /* Green */
.info {background-color: #2196F3;} /* Blue */
Expand Down
4 changes: 2 additions & 2 deletions static/js/TextColumn.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -367,15 +367,15 @@ class TextColumn extends Component {
return null
} else {
return (
<span class="label danger">{"སྒྲིག་བཞིན་ཡོད།"}</span>
<div className='ribbon-wrap'><span class="ribbon ribbon-padding">{"སྒྲིག་བཞིན་ཡོད།"}</span></div>
)
}
} else {
if (versions[0].iscompleted == "done") {
return null
} else {
return (
<span class="label danger">{"In progress"}</span>
<div className='ribbon-wrap'><span class="ribbon ">{"In progress"}</span></div>
)
}
}
Expand Down
6 changes: 3 additions & 3 deletions templates/base.html
Original file line number Diff line number Diff line change
Expand Up @@ -19,14 +19,14 @@
<meta name="revisit-after" content="7 days">

{% if noindex or DEBUG %}
<meta name="robots" content="noindex, nofollow">
<meta name="robots" content="index, follow">
{% endif %}

<link rel="search" type="application/opensearchdescription+xml" title="Sefaria Search" href="{% static 'files/opensearch.xml' %}" />

{% if SITE_SETTINGS.TORAH_SPECIFIC %}
<link rel="alternate" href="https://www.sefaria.org{{ request.path }}" hreflang="en" />
<link rel="alternate" href="https://www.sefaria.org.il{{ request.path }}" hreflang="he" />
<link rel="alternate" href="https://www.pecha.org{{ request.path }}" hreflang="en" />
<link rel="alternate" href="https://www.pecha.org.il{{ request.path }}" hreflang="he" />
{% endif %}

{% if canonical_url %}
Expand Down

0 comments on commit ac9dc9a

Please sign in to comment.