Agrega componentes explicitos en algunas vistas

This commit is contained in:
Ricardo García Jiménez 2021-09-20 03:29:50 -05:00
parent 1fee84fdbb
commit 1760a8735a
39 changed files with 1023 additions and 0 deletions

3
assets/icons/articles-icon.svg Executable file
View file

@ -0,0 +1,3 @@
<svg width="16" height="13" viewBox="0 0 16 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M0 12.2344H5.33437V6.9H0V12.2344ZM1.33438 8.23438H4V10.9H1.33438V8.23438ZM6.66563 11.5688H16V10.2344H6.66563V11.5688ZM0 5.56875H5.33437V0.234375H0V5.56875ZM1.33438 1.56875H4V4.23438H1.33438V1.56875ZM6.66563 0.9V2.23438H16V0.9H6.66563ZM6.66563 8.9H16V7.56563H6.66563V8.9ZM6.66563 4.9H16V3.56563H6.66563V4.9Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 435 B

3
assets/icons/buho-icon.svg Executable file
View file

@ -0,0 +1,3 @@
<svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M7.99996 10.1667C8.37329 10.7267 8.87329 11.1867 9.46663 11.5001L7.99996 12.9667L6.53329 11.5001C7.12663 11.1867 7.63329 10.7267 7.99996 10.1667ZM11.3333 6.96675C10.9797 6.96675 10.6405 7.10722 10.3905 7.35727C10.1404 7.60732 9.99996 7.94646 9.99996 8.30008C9.99996 8.6537 10.1404 8.99284 10.3905 9.24289C10.6405 9.49294 10.9797 9.63341 11.3333 9.63341C11.6869 9.63341 12.0261 9.49294 12.2761 9.24289C12.5261 8.99284 12.6666 8.6537 12.6666 8.30008C12.6666 7.94646 12.5261 7.60732 12.2761 7.35727C12.0261 7.10722 11.6869 6.96675 11.3333 6.96675ZM4.66663 6.96675C4.313 6.96675 3.97387 7.10722 3.72382 7.35727C3.47377 7.60732 3.33329 7.94646 3.33329 8.30008C3.33329 8.6537 3.47377 8.99284 3.72382 9.24289C3.97387 9.49294 4.313 9.63341 4.66663 9.63341C5.02025 9.63341 5.35939 9.49294 5.60943 9.24289C5.85948 8.99284 5.99996 8.6537 5.99996 8.30008C5.99996 7.94646 5.85948 7.60732 5.60943 7.35727C5.35939 7.10722 5.02025 6.96675 4.66663 6.96675ZM11.3333 5.30008C12.0405 5.30008 12.7188 5.58103 13.2189 6.08113C13.719 6.58123 14 7.2595 14 7.96675C14 8.67399 13.719 9.35227 13.2189 9.85237C12.7188 10.3525 12.0405 10.6334 11.3333 10.6334C10.626 10.6334 9.94777 10.3525 9.44767 9.85237C8.94758 9.35227 8.66663 8.67399 8.66663 7.96675C8.66663 7.2595 8.94758 6.58123 9.44767 6.08113C9.94777 5.58103 10.626 5.30008 11.3333 5.30008ZM4.66663 5.30008C5.37387 5.30008 6.05215 5.58103 6.55224 6.08113C7.05234 6.58123 7.33329 7.2595 7.33329 7.96675C7.33329 8.67399 7.05234 9.35227 6.55224 9.85237C6.05215 10.3525 5.37387 10.6334 4.66663 10.6334C3.95938 10.6334 3.2811 10.3525 2.78101 9.85237C2.28091 9.35227 1.99996 8.67399 1.99996 7.96675C1.99996 7.2595 2.28091 6.58123 2.78101 6.08113C3.2811 5.58103 3.95938 5.30008 4.66663 5.30008ZM1.49329 0.166748C2.66663 2.63341 1.81996 4.47341 1.03329 6.30008C0.793293 6.83341 0.666626 7.38675 0.666626 7.96675C0.666626 9.02761 1.08805 10.045 1.8382 10.7952C2.58834 11.5453 3.60576 11.9667 4.66663 11.9667C4.80663 11.9601 4.94663 11.9534 5.08663 11.9334L7.05996 13.9067L7.99996 14.8334L8.93996 13.9067L10.9133 11.9334C11.0533 11.9534 11.1933 11.9601 11.3333 11.9667C12.3942 11.9667 13.4116 11.5453 14.1617 10.7952C14.9119 10.045 15.3333 9.02761 15.3333 7.96675C15.3333 7.38675 15.2066 6.83341 14.9666 6.30008C14.18 4.47341 13.3333 2.63341 14.5066 0.166748C12.7466 1.54008 10.24 2.62675 7.99996 2.63341C5.75996 2.62675 3.25329 1.54008 1.49329 0.166748Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 2.4 KiB

12
assets/icons/burger-icon.svg Executable file
View file

@ -0,0 +1,12 @@
<svg width="14" height="15" viewBox="0 0 14 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<g clip-path="url(#clip0)">
<path d="M12.7116 1.76196H1.28836C0.577965 1.76196 0 2.3399 0 3.05119C0 3.76158 0.577965 4.33955 1.28836 4.33955H12.7116C13.422 4.33955 14 3.76158 14 3.05119C14 2.3399 13.422 1.76196 12.7116 1.76196Z" fill="black"/>
<path d="M12.7116 5.71582H1.28836C0.577965 5.71582 0 6.29376 0 7.00505C0 7.71544 0.577965 8.2934 1.28836 8.2934H12.7116C13.422 8.2934 14 7.71544 14 7.00505C14 6.29376 13.422 5.71582 12.7116 5.71582Z" fill="black"/>
<path d="M12.7116 9.66968H1.28836C0.577965 9.66968 0 10.2476 0 10.9589C0 11.6693 0.577965 12.2473 1.28836 12.2473H12.7116C13.422 12.2473 14 11.6693 14 10.9589C14 10.2476 13.422 9.66968 12.7116 9.66968Z" fill="black"/>
</g>
<defs>
<clipPath id="clip0">
<rect width="14" height="14" fill="white" transform="translate(0 0.00463867)"/>
</clipPath>
</defs>
</svg>

After

Width:  |  Height:  |  Size: 914 B

4
assets/icons/close-icon.svg Executable file
View file

@ -0,0 +1,4 @@
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M16.064 8.31567C16.064 8.21255 15.9797 8.12817 15.8765 8.12817L14.3297 8.13521L12 10.9125L9.67263 8.13755L8.12341 8.13052C8.02029 8.13052 7.93591 8.21255 7.93591 8.31802C7.93591 8.36255 7.95232 8.40474 7.98044 8.43989L11.0297 12.0727L7.98044 15.7032C7.95212 15.7375 7.93641 15.7805 7.93591 15.825C7.93591 15.9282 8.02029 16.0125 8.12341 16.0125L9.67263 16.0055L12 13.2282L14.3273 16.0032L15.8742 16.0102C15.9773 16.0102 16.0617 15.9282 16.0617 15.8227C16.0617 15.7782 16.0453 15.736 16.0172 15.7008L12.9726 12.0704L16.0218 8.43755C16.05 8.40474 16.064 8.3602 16.064 8.31567Z" fill="#F27781"/>
<path d="M12 1.52344C6.20156 1.52344 1.5 6.225 1.5 12.0234C1.5 17.8219 6.20156 22.5234 12 22.5234C17.7984 22.5234 22.5 17.8219 22.5 12.0234C22.5 6.225 17.7984 1.52344 12 1.52344ZM12 20.7422C7.18594 20.7422 3.28125 16.8375 3.28125 12.0234C3.28125 7.20938 7.18594 3.30469 12 3.30469C16.8141 3.30469 20.7188 7.20938 20.7188 12.0234C20.7188 16.8375 16.8141 20.7422 12 20.7422Z" fill="#F27781"/>
</svg>

After

Width:  |  Height:  |  Size: 1.1 KiB

3
assets/icons/comment-icon.svg Executable file
View file

@ -0,0 +1,3 @@
<svg width="15" height="14" viewBox="0 0 15 14" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3.56897 2.25C3.2706 2.25 2.98445 2.36853 2.77347 2.5795C2.5625 2.79048 2.44397 3.07663 2.44397 3.375V8.625C2.44397 8.92337 2.5625 9.20952 2.77347 9.4205C2.98445 9.63147 3.2706 9.75 3.56897 9.75H4.94397V12.148C4.94397 12.2495 5.05897 12.309 5.14197 12.249L8.60597 9.75H11.819C12.1173 9.75 12.4035 9.63147 12.6145 9.4205C12.8254 9.20952 12.944 8.92337 12.944 8.625V3.375C12.944 3.07663 12.8254 2.79048 12.6145 2.5795C12.4035 2.36853 12.1173 2.25 11.819 2.25H3.56897ZM1.69397 3.375C1.69397 2.87772 1.89151 2.40081 2.24314 2.04917C2.59478 1.69754 3.07169 1.5 3.56897 1.5H11.819C12.3163 1.5 12.7932 1.69754 13.1448 2.04917C13.4964 2.40081 13.694 2.87772 13.694 3.375V8.625C13.694 9.12228 13.4964 9.59919 13.1448 9.95083C12.7932 10.3025 12.3163 10.5 11.819 10.5H8.84847L5.58097 12.8575C5.00197 13.275 4.19397 12.8615 4.19397 12.1475V10.5H3.56897C3.07169 10.5 2.59478 10.3025 2.24314 9.95083C1.89151 9.59919 1.69397 9.12228 1.69397 8.625V3.375Z" fill="#FF5678"/>
</svg>

After

Width:  |  Height:  |  Size: 1 KiB

3
assets/icons/heart-icon.svg Executable file
View file

@ -0,0 +1,3 @@
<svg width="15" height="13" viewBox="0 0 15 13" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.8658 2.47814C13.6564 1.99319 13.3544 1.55374 12.9768 1.18439C12.5989 0.813927 12.1533 0.519528 11.6643 0.317199C11.1572 0.106563 10.6134 -0.00125279 10.0643 1.09826e-05C9.29397 1.09826e-05 8.54241 0.210948 7.88928 0.609386C7.73303 0.704698 7.58459 0.809386 7.44397 0.923449C7.30334 0.809386 7.15491 0.704698 6.99866 0.609386C6.34553 0.210948 5.59397 1.09826e-05 4.82366 1.09826e-05C4.26897 1.09826e-05 3.73147 0.106261 3.22366 0.317199C2.73303 0.520324 2.29084 0.812511 1.91116 1.18439C1.53303 1.55333 1.23097 1.99288 1.02209 2.47814C0.804907 2.98282 0.69397 3.51876 0.69397 4.07032C0.69397 4.59064 0.80022 5.13282 1.01116 5.68439C1.18772 6.14532 1.44084 6.62345 1.76428 7.10626C2.27678 7.87032 2.98147 8.6672 3.85647 9.47501C5.30647 10.8141 6.74241 11.7391 6.80334 11.7766L7.17366 12.0141C7.33772 12.1188 7.54866 12.1188 7.71272 12.0141L8.08303 11.7766C8.14397 11.7375 9.57834 10.8141 11.0299 9.47501C11.9049 8.6672 12.6096 7.87032 13.1221 7.10626C13.4455 6.62345 13.7002 6.14532 13.8752 5.68439C14.0862 5.13282 14.1924 4.59064 14.1924 4.07032C14.194 3.51876 14.083 2.98282 13.8658 2.47814ZM7.44397 10.7781C7.44397 10.7781 1.88147 7.21407 1.88147 4.07032C1.88147 2.47814 3.19866 1.18751 4.82366 1.18751C5.96584 1.18751 6.95647 1.82501 7.44397 2.75626C7.93147 1.82501 8.9221 1.18751 10.0643 1.18751C11.6893 1.18751 13.0065 2.47814 13.0065 4.07032C13.0065 7.21407 7.44397 10.7781 7.44397 10.7781Z" fill="#FF5678"/>
</svg>

After

Width:  |  Height:  |  Size: 1.5 KiB

4
assets/icons/login-icon.svg Executable file
View file

@ -0,0 +1,4 @@
<svg width="16" height="17" viewBox="0 0 16 17" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M3 15.5H9C9.26514 15.4997 9.51934 15.3943 9.70681 15.2068C9.89429 15.0193 9.99974 14.7651 10 14.5V13H9V14.5H3V2.5H9V4H10V2.5C9.99974 2.23486 9.89429 1.98066 9.70681 1.79319C9.51934 1.60571 9.26514 1.50026 9 1.5H3C2.73486 1.50026 2.48066 1.60571 2.29319 1.79319C2.10571 1.98066 2.00026 2.23486 2 2.5V14.5C2.00026 14.7651 2.10571 15.0193 2.29319 15.2068C2.48066 15.3943 2.73486 15.4997 3 15.5Z" fill="black"/>
<path d="M10.293 10.793L12.086 9H5V8H12.086L10.293 6.207L11 5.5L14 8.5L11 11.5L10.293 10.793Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 630 B

4
assets/icons/profile-icon.svg Executable file
View file

@ -0,0 +1,4 @@
<svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path fill-rule="evenodd" clip-rule="evenodd" d="M10.6666 5.50016C10.6666 6.20741 10.3856 6.88568 9.88554 7.38578C9.38544 7.88588 8.70716 8.16683 7.99992 8.16683C7.29267 8.16683 6.6144 7.88588 6.1143 7.38578C5.6142 6.88568 5.33325 6.20741 5.33325 5.50016C5.33325 4.79292 5.6142 4.11464 6.1143 3.61454C6.6144 3.11445 7.29267 2.8335 7.99992 2.8335C8.70716 2.8335 9.38544 3.11445 9.88554 3.61454C10.3856 4.11464 10.6666 4.79292 10.6666 5.50016ZM9.33325 5.50016C9.33325 5.85378 9.19278 6.19292 8.94273 6.44297C8.69268 6.69302 8.35354 6.8335 7.99992 6.8335C7.6463 6.8335 7.30716 6.69302 7.05711 6.44297C6.80706 6.19292 6.66659 5.85378 6.66659 5.50016C6.66659 5.14654 6.80706 4.8074 7.05711 4.55735C7.30716 4.30731 7.6463 4.16683 7.99992 4.16683C8.35354 4.16683 8.69268 4.30731 8.94273 4.55735C9.19278 4.8074 9.33325 5.14654 9.33325 5.50016Z" fill="black"/>
<path fill-rule="evenodd" clip-rule="evenodd" d="M7.99996 0.166748C3.94996 0.166748 0.666626 3.45008 0.666626 7.50008C0.666626 11.5501 3.94996 14.8334 7.99996 14.8334C12.05 14.8334 15.3333 11.5501 15.3333 7.50008C15.3333 3.45008 12.05 0.166748 7.99996 0.166748ZM1.99996 7.50008C1.99996 8.89341 2.47529 10.1761 3.27196 11.1947C3.83145 10.46 4.55323 9.86458 5.38091 9.45496C6.2086 9.04533 7.11979 8.83261 8.04329 8.83342C8.95485 8.83255 9.85457 9.03976 10.6739 9.43927C11.4933 9.83877 12.2106 10.42 12.7713 11.1387C13.3489 10.3812 13.7379 9.49689 13.9059 8.55914C14.0739 7.62139 14.0162 6.6571 13.7376 5.74607C13.459 4.83504 12.9674 4.00345 12.3036 3.32011C11.6398 2.63677 10.8228 2.12132 9.92021 1.81642C9.01764 1.51152 8.05543 1.42593 7.1132 1.56673C6.17097 1.70753 5.27582 2.07068 4.50181 2.62612C3.72779 3.18156 3.09717 3.91333 2.66211 4.76088C2.22706 5.60843 2.00008 6.54739 1.99996 7.50008ZM7.99996 13.5001C6.62259 13.5021 5.2868 13.0283 4.21863 12.1587C4.64858 11.5432 5.22085 11.0407 5.88675 10.6939C6.55266 10.347 7.29248 10.1662 8.04329 10.1667C8.78473 10.1662 9.51562 10.3425 10.1752 10.681C10.8349 11.0196 11.4042 11.5107 11.836 12.1134C10.7595 13.0112 9.40168 13.502 7.99996 13.5001Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 2.1 KiB

3
assets/icons/write-icon.svg Executable file
View file

@ -0,0 +1,3 @@
<svg width="16" height="15" viewBox="0 0 16 15" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M14.526 0.486846L14.9193 0.88018C15.4613 1.42285 15.3793 2.38485 14.7346 3.02885L6.62331 11.1402L3.99531 12.1015C3.66531 12.2228 3.34397 12.0655 3.27864 11.7515C3.25656 11.6376 3.26696 11.5198 3.30864 11.4115L4.28864 8.76085L12.3773 0.671513C13.022 0.0275129 13.984 -0.0551537 14.526 0.487513V0.486846ZM6.26931 1.29351C6.35685 1.29351 6.44355 1.31076 6.52443 1.34426C6.60531 1.37776 6.67881 1.42687 6.74071 1.48878C6.80262 1.55068 6.85172 1.62417 6.88523 1.70506C6.91873 1.78594 6.93597 1.87263 6.93597 1.96018C6.93597 2.04773 6.91873 2.13442 6.88523 2.2153C6.85172 2.29619 6.80262 2.36968 6.74071 2.43158C6.67881 2.49349 6.60531 2.5426 6.52443 2.5761C6.44355 2.6096 6.35685 2.62685 6.26931 2.62685H3.60264C3.24902 2.62685 2.90988 2.76732 2.65983 3.01737C2.40978 3.26742 2.26931 3.60656 2.26931 3.96018V11.9602C2.26931 12.3138 2.40978 12.6529 2.65983 12.903C2.90988 13.153 3.24902 13.2935 3.60264 13.2935H11.6026C11.9563 13.2935 12.2954 13.153 12.5455 12.903C12.7955 12.6529 12.936 12.3138 12.936 11.9602V9.29351C12.936 9.1167 13.0062 8.94713 13.1312 8.82211C13.2563 8.69708 13.4258 8.62685 13.6026 8.62685C13.7795 8.62685 13.949 8.69708 14.074 8.82211C14.1991 8.94713 14.2693 9.1167 14.2693 9.29351V11.9602C14.2693 12.6674 13.9884 13.3457 13.4883 13.8458C12.9882 14.3459 12.3099 14.6268 11.6026 14.6268H3.60264C2.8954 14.6268 2.21712 14.3459 1.71702 13.8458C1.21693 13.3457 0.935974 12.6674 0.935974 11.9602V3.96018C0.935974 3.25294 1.21693 2.57466 1.71702 2.07456C2.21712 1.57446 2.8954 1.29351 3.60264 1.29351H6.26931Z" fill="black"/>
</svg>

After

Width:  |  Height:  |  Size: 1.6 KiB

BIN
assets/images/avatar.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 30 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 599 KiB

9
assets/images/buho.svg Executable file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 38 KiB

BIN
assets/images/cover.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 93 KiB

BIN
assets/images/hero.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 31 KiB

10
assets/images/nabu-logo.svg Executable file

File diff suppressed because one or more lines are too long

After

Width:  |  Height:  |  Size: 47 KiB

3
assets/images/paper-plane.svg Executable file
View file

@ -0,0 +1,3 @@
<svg width="56" height="64" viewBox="0 0 56 64" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M54.1186 1.13326C53.7051 0.806968 53.2255 0.6111 52.727 0.564927C52.2284 0.518755 51.7281 0.623869 51.2752 0.869928L2.40023 27.5366C1.90063 27.8095 1.47942 28.2436 1.18695 28.7867C0.894481 29.3299 0.743141 29.9592 0.751026 30.5995C0.75891 31.2398 0.925686 31.8639 1.23141 32.3971C1.53713 32.9304 1.96886 33.3503 2.47498 33.6066L18 41.4833V63.8899L34.7785 49.9966L48.475 56.9433C48.8978 57.158 49.359 57.2515 49.8197 57.2159C50.2803 57.1803 50.7267 57.0166 51.1212 56.7387C51.5157 56.4608 51.8467 56.0768 52.0862 55.6192C52.3257 55.1617 52.4666 54.644 52.4971 54.1099L55.3721 4.10993C55.4036 3.53035 55.3046 2.95124 55.0849 2.42939C54.8651 1.90755 54.5321 1.4609 54.1186 1.13326ZM47.0288 48.9333L31.8805 41.2466L41 20.5566L19.0091 34.7233L10.5796 30.4466L49.3087 9.31326L47.0288 48.9333Z" fill="white"/>
</svg>

After

Width:  |  Height:  |  Size: 915 B

View file

View file

@ -0,0 +1,37 @@
const controlMenu = document.querySelector('#control-menu');
const menu = document.querySelector('#menu');
const overlay = document.querySelector('.overlay');
controlMenu.addEventListener('click', () => {
menu.classList.add('nav__menu-isactive');
overlay.classList.add('overlay__is-active');
document.body.classList.add('stop-scrolling');
});
overlay.addEventListener('click', () => {
menu.classList.remove('nav__menu-isactive');
overlay.classList.remove('overlay__is-active');
document.body.classList.remove('stop-scrolling');
})
/*
Home
head.php
home.php
home.css
home-desktop.css
home.js
menu.js
normalize.css
Articles
articles.php
articles.css
articles-desktop.css
articles.js
*/

356
assets/styles/normalize.css vendored Normal file
View file

@ -0,0 +1,356 @@
/*! normalize.css v8.0.1 | MIT License | github.com/necolas/normalize.css */
/* Document
========================================================================== */
/**
* 1. Correct the line height in all browsers.
* 2. Prevent adjustments of font size after orientation changes in iOS.
*/
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
line-height: 1.15; /* 1 */
-webkit-text-size-adjust: 100%; /* 2 */
}
/* Sections
========================================================================== */
/**
* Remove the margin in all browsers.
*/
body {
margin: 0;
}
/**
* Render the `main` element consistently in IE.
*/
main {
display: block;
}
/**
* Correct the font size and margin on `h1` elements within `section` and
* `article` contexts in Chrome, Firefox, and Safari.
*/
h1 {
font-size: 2em;
margin: 0.67em 0;
}
/* Grouping content
========================================================================== */
/**
* 1. Add the correct box sizing in Firefox.
* 2. Show the overflow in Edge and IE.
*/
hr {
box-sizing: content-box; /* 1 */
height: 0; /* 1 */
overflow: visible; /* 2 */
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
pre {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/* Text-level semantics
========================================================================== */
/**
* Remove the gray background on active links in IE 10.
*/
a {
background-color: transparent;
}
/**
* 1. Remove the bottom border in Chrome 57-
* 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari.
*/
abbr[title] {
border-bottom: none; /* 1 */
text-decoration: underline; /* 2 */
text-decoration: underline dotted; /* 2 */
}
/**
* Add the correct font weight in Chrome, Edge, and Safari.
*/
b,
strong {
font-weight: bolder;
}
/**
* 1. Correct the inheritance and scaling of font size in all browsers.
* 2. Correct the odd `em` font sizing in all browsers.
*/
code,
kbd,
samp {
font-family: monospace, monospace; /* 1 */
font-size: 1em; /* 2 */
}
/**
* Add the correct font size in all browsers.
*/
small {
font-size: 80%;
}
/**
* Prevent `sub` and `sup` elements from affecting the line height in
* all browsers.
*/
sub,
sup {
font-size: 75%;
line-height: 0;
position: relative;
vertical-align: baseline;
}
sub {
bottom: -0.25em;
}
sup {
top: -0.5em;
}
/* Embedded content
========================================================================== */
/**
* Remove the border on images inside links in IE 10.
*/
img {
border-style: none;
}
/* Forms
========================================================================== */
/**
* 1. Change the font styles in all browsers.
* 2. Remove the margin in Firefox and Safari.
*/
button,
input,
optgroup,
select,
textarea {
font-family: inherit; /* 1 */
font-size: 100%; /* 1 */
line-height: 1.15; /* 1 */
margin: 0; /* 2 */
}
/**
* Show the overflow in IE.
* 1. Show the overflow in Edge.
*/
button,
input { /* 1 */
overflow: visible;
}
/**
* Remove the inheritance of text transform in Edge, Firefox, and IE.
* 1. Remove the inheritance of text transform in Firefox.
*/
button,
select { /* 1 */
text-transform: none;
}
/**
* Correct the inability to style clickable types in iOS and Safari.
*/
button,
[type="button"],
[type="reset"],
[type="submit"] {
-webkit-appearance: button;
}
/**
* Remove the inner border and padding in Firefox.
*/
button::-moz-focus-inner,
[type="button"]::-moz-focus-inner,
[type="reset"]::-moz-focus-inner,
[type="submit"]::-moz-focus-inner {
border-style: none;
padding: 0;
}
/**
* Restore the focus styles unset by the previous rule.
*/
button:-moz-focusring,
[type="button"]:-moz-focusring,
[type="reset"]:-moz-focusring,
[type="submit"]:-moz-focusring {
outline: 1px dotted ButtonText;
}
/**
* Correct the padding in Firefox.
*/
fieldset {
padding: 0.35em 0.75em 0.625em;
}
/**
* 1. Correct the text wrapping in Edge and IE.
* 2. Correct the color inheritance from `fieldset` elements in IE.
* 3. Remove the padding so developers are not caught out when they zero out
* `fieldset` elements in all browsers.
*/
legend {
box-sizing: border-box; /* 1 */
color: inherit; /* 2 */
display: table; /* 1 */
max-width: 100%; /* 1 */
padding: 0; /* 3 */
white-space: normal; /* 1 */
}
/**
* Add the correct vertical alignment in Chrome, Firefox, and Opera.
*/
progress {
vertical-align: baseline;
}
/**
* Remove the default vertical scrollbar in IE 10+.
*/
textarea {
overflow: auto;
}
/**
* 1. Add the correct box sizing in IE 10.
* 2. Remove the padding in IE 10.
*/
[type="checkbox"],
[type="radio"] {
box-sizing: border-box; /* 1 */
padding: 0; /* 2 */
}
/**
* Correct the cursor style of increment and decrement buttons in Chrome.
*/
[type="number"]::-webkit-inner-spin-button,
[type="number"]::-webkit-outer-spin-button {
height: auto;
}
/**
* 1. Correct the odd appearance in Chrome and Safari.
* 2. Correct the outline style in Safari.
*/
[type="search"] {
-webkit-appearance: textfield; /* 1 */
outline-offset: -2px; /* 2 */
}
/**
* Remove the inner padding in Chrome and Safari on macOS.
*/
[type="search"]::-webkit-search-decoration {
-webkit-appearance: none;
}
/**
* 1. Correct the inability to style clickable types in iOS and Safari.
* 2. Change font properties to `inherit` in Safari.
*/
::-webkit-file-upload-button {
-webkit-appearance: button; /* 1 */
font: inherit; /* 2 */
}
/* Interactive
========================================================================== */
/*
* Add the correct display in Edge, IE 10+, and Firefox.
*/
details {
display: block;
}
/*
* Add the correct display in all browsers.
*/
summary {
display: list-item;
}
/* Misc
========================================================================== */
/**
* Add the correct display in IE 10+.
*/
template {
display: none;
}
/**
* Add the correct display in IE 10.
*/
[hidden] {
display: none;
}

View file

@ -0,0 +1,218 @@
/* Orden de los estilos
1. Posicionamineto
2. Modelo de caja
3. Tipografia
4. Visuales
5. Otros
Metodologia => BEM
*/
/* Estilos base */
:root {
--color-background: hsl(197, 24%, 94%);
--color-primary-red: hsl(355, 83%, 71%);
--color-secondary-green: hsl(169, 36%, 57%);
--color-secondary-purple: hsl(237, 58%, 69%);
--color-black: hsl(229, 18%, 19%);
--color-secundary-background: hsl(0, 0%, 91%);
}
html {
font-size: 62.5%;
font-family: 'Poppins', sans-serif;
}
/* Estilos al header */
.header {
padding: 0 20px;
padding-bottom: 30px;
background-color: var(--color-background);
}
/* Estilos al menu */
.nav {
width: 100%;
display: flex;
justify-content: space-between;
align-items: center;
padding: 0 20px;
padding-top: 30px;
padding-bottom: 40px;
background-color: var(--color-background);
}
.nav__logo-wrapper {
display: flex;
align-items: center;
}
.nav__logo{
width: 100%;
}
.nav__burger-icon {
background-image: url("../../../icons/burger-icon.svg");
width: 14px;
height: 14px;
cursor: pointer;
}
/* Estilos para menú */
.nav__menu {
width: 65%;
display: flex;
flex-direction: column;
justify-content: center;
position: fixed;
left: -85%;
top: 0;
bottom: 0;
list-style: none;
background-color: #FFF;
transition: all ease-in-out 600ms;
}
.nav__menu-isactive {
left: 0;
transition: all ease-in-out 600ms;
z-index: 1;
}
.nav__item-logo {
width: 80%;
margin: 0 auto;
margin-bottom: 50px;
}
.nav__item--logo a {
display: block;
}
.nav__item {
/* background-color: hsla(237, 58%, 69%, 0.4); */
display: flex;
align-items: center;
height: auto;
padding: 3px 20px;
margin-bottom: 15px;
gap: 0 10px;
position: relative;
}
.nav__item-isactive {
background-color: hsla(237, 58%, 69%, 0.4);
}
.nav__item-isactive::before {
content: '';
display: block;
position: absolute;
left: 0;
height: 100%;
width: 5px;
background-color: var(--color-secondary-purple);
}
.nav__item-tab {
display: block;
}
.nav__item:active {
background-color: hsla(237, 58%, 69%, 0.4);
}
.nav__item a {
font-size: 1.4rem;
font-weight: 500;
text-decoration: none;
color: #000;
}
.nav__item span {
display: block;
width: 16px;
height: 16px;
background-position: center;
background-repeat: no-repeat;
}
.nav__item:nth-child(2) span {
background-image: url('../../../icons/articles-icon.svg');
}
.nav__item:nth-child(3) span {
background-image: url('../../../icons/login-icon.svg');
}
.nav__item:nth-child(4) span {
background-image: url('../../../icons/write-icon.svg');
}
/* Estilos para el hero */
.hero {
display: flex;
flex-direction: column;
align-items: center;
text-align: center;
}
.hero__img-wrapper {
width: 100%;
margin-bottom: 30px;
}
.hero__img {
width: 100%;
}
.hero__CTA {
font-size: 3.6rem;
font-weight: 500;
line-height: 4.32rem;
}
.hero__secundary-CTA {
margin-top: 8px;
margin-bottom: 20px;
font-size: 1.4rem;
font-weight: 400;
line-height: 2.1rem;
}
.hero__button {
min-width: 200px;
border-radius: 40px;
padding: 10px 20px;
text-decoration: none;
font-size: 1.4rem;
font-weight: 500;
background-color: var(--color-primary-red);
color: #FFF;
}
.overlay {
opacity: 0;
position: fixed;
top: 0;
left: 0;
width: 10px;
height: 10px;
border-radius: 50%;
background-color: rgba(0, 0, 0, 0.5);
transition: all 400ms linear;
}
.overlay__is-active {
opacity: 1;
border-radius: 0;
width: 100%;
height: 100%;
}
.stop-scrolling {
height: 100vh;
overflow: hidden;
}

View file

@ -3,3 +3,51 @@
defined('NABU') || exit;
define('NABU_URL', 'http://localhost:8000');
define('NABU_DIRECTORY', array(
'avatars' => NABU_URL . '/storage/avatars',
'backgrounds' => NABU_URL . '/storage/backgrounds',
'covers' => NABU_URL . '/storage/covers',
'database' => './database-config.json',
'email' => './email-config.json',
'icons' => NABU_URL . '/assets/icons',
'images' => NABU_URL . '/assets/images',
'storage-avatars' => './storage/avatars',
'storage-backgrounds' => './storage/backgrounds',
'storage-covers' => './storage/covers',
'scripts' => NABU_URL . '/assets/scripts',
'styles' => NABU_URL . '/assets/styles',
));
define('NABU_DEFAULT', array(
'website-name' => 'Nabu',
'article-size' => 1048576 * 1, // 1 MB (en bytes).
'avatar' => NABU_URL . '/assets/images/avatar.png',
'background' => NABU_URL . '/assets/images/background.jpg',
'cover' => NABU_URL . '/assets/images/cover.jpg',
'image-formats' => 'image/gif, image/jpeg, image/png, image/svg+xml',
'image-size' => 1048576 * 3, // 3 MB (en bytes).
));
// Define la zona horario de todas las funciones de fecha/tiempo.
date_default_timezone_set('America/Mexico_City');
/*
// Nivel de reporte de errores.
ini_set('error_reporting', E_ALL);
// No muestra en pantalla todos los errores.
ini_set('display_errors', 'Off');
// No muestra en pantalla todos los errores de inicio de ejecución de PHP.
ini_set('display_startup_errors', false);
// No registra mensajes repetidos.
ini_set('ignore_repeated_errros', true);
// Configura los registros de errores en 'error_log' (manejador de errores de PHP).
ini_set('log_errors', true);
// Define la ruta del archivo de registro de errores para 'error_log'.
ini_set('error_log', 'logs/errors.log');
*/

View file

@ -9,4 +9,8 @@ class utils {
header('Location: ' . $route);
exit;
}
static public function escape($pattern) {
//
}
}

View file

@ -0,0 +1,12 @@
<?php defined('NABU') || exit ?>
<?php $head_title = 'Administración' ?>
<?php $style = NABU_DIRECTORY['styles'] . '/admin/dashboard/dashboard.css' ?>
<?php $style_desktop = NABU_DIRECTORY['styles'] . '/admin/dashboard/dashboard-desktop.css' ?>
<?php require_once 'views/components/head.php' ?>
<?php require_once 'views/components/admin-navbar.php' ?>
<h1>Artículos envíados</h1>
<?php require_once 'views/components/messages.php' ?>
<?php require_once 'views/components/table-articles.php' ?>
<?php require_once 'views/components/footer.php' ?>

View file

@ -0,0 +1,52 @@
<?php defined('NABU') || exit ?>
<?php $head_title = 'Editar artículo' ?>
<?php $style = NABU_DIRECTORY['styles'] . '/admin/edit-article/edit-article.css' ?>
<?php $style_desktop = NABU_DIRECTORY['styles'] . '/admin/edit-article/edit-article-desktop.css' ?>
<?php require_once 'views/components/head.php' ?>
<?php require_once 'views/components/admin-navbar.php' ?>
<h1>Editar artículo</h1>
<p><a href="<?= NABU_ROUTES['admin'] ?>">Volver</a></p>
<?php require_once 'views/components/messages.php' ?>
<form method="POST" action="<?= NABU_ROUTES['edit-article'] . '&slug=' . $article['slug'] ?>" enctype="multipart/form-data">
<input type="hidden" name="csrf" value="<?= $token ?>">
<div>
<div>
<label for="cover"><b>Portada del artículo</b></label>
</div>
<?php if (!empty($article['cover'])): ?>
<div>
<img src="<?= $article['cover'] ?>" alt="Portada del artículo" width="8%">
</div>
<?php endif ?>
<div>
<input type="file" id="cover" name="cover" accept="<?= NABU_DEFAULT['image-formats'] ?>">
</div>
<div>
<label for="title"><b>Título del artículo</b></label>
</div>
<div>
<input type="text" id="title" name="title" minlength="1" maxlength="246" size="107" value="<?= $article['title'] ?>" required>
</div>
<div>
<label for="synopsis"><b>Resumen del artículo</b></label>
</div>
<div>
<textarea type="text" id="synopsis" name="synopsis" minlength="1" maxlength="255" rows="3" cols="100" required><?= $article['synopsis'] ?></textarea>
</div>
<div>
<label for="content"><b>Contenido del artículo <a href="https://www.markdownguide.org/basic-syntax/" target="_blank">formato Markdown</a></b></label>
</div>
<div>
<textarea type="text" id="content" name="content" minlength="1" maxlength="<?= NABU_DEFAULT['article_size'] ?>" rows="32" cols="100" required><?= $article['content'] ?></textarea>
</div>
<div>
<input type="submit" name="edit-article" value="Guardar">
</div>
</div>
</form>
<?php require_once 'views/components/footer.php' ?>

View file

@ -0,0 +1,25 @@
<?php defined('NABU') || exit ?>
<?php $head_title = 'Artículos publicados' ?>
<?php $style = NABU_DIRECTORY['styles'] . '/admin/published-articles/published-articles.css' ?>
<?php $style_desktop = NABU_DIRECTORY['styles'] . '/admin/published-articles/published-articles-desktop.css' ?>
<?php $search = NABU_ROUTES['admin'] ?>
<?php require_once 'views/components/head.php' ?>
<?php require_once 'views/components/admin-navbar.php' ?>
<h1>Artículos publicados</h1>
<?php require_once 'views/components/messages.php' ?>
<form method="POST" action="<?= NABU_ROUTES['admin'] ?>">
<input type="hidden" name="csrf" value="<?= $token ?>">
<span>
<input type="text" name="q" minlength="1" maxlength="246" required>
</span>
<span>
<input type="submit" name="search-submit" value="&#x1F50E">
</span>
</form>
<?php require_once 'views/components/table-articles.php' ?>
<?php require_once 'views/components/pagination.php' ?>
<?php require_once 'views/components/footer.php' ?>

View file

@ -0,0 +1,15 @@
<?php defined('NABU') || exit ?>
<?php $username = $_SESSION['user']['username'] ?>
<header>
<h1>Administración</h1>
<nav>
<ul>
<li><a href="<?= NABU_ROUTES['admin'] ?>">Artículos envíados</a></li>
<li><a href="<?= NABU_ROUTES['published-articles'] ?>">Artículos publicados</a></li>
<li><a href="<?= NABU_ROUTES['home'] ?>"><?= NABU_DEFAULT['website-name'] ?></a></li>
<li><a href="<?= NABU_ROUTES['profile'] . '&user=' . urlencode($username) ?>"><?= utils::escape($username) ?></a></li>
<li><a href="<?= NABU_ROUTES['logout'] ?>">Cerrar sesión</a></li>
</ul>
</nav>
</header>

View file

@ -0,0 +1,12 @@
<?php defined('NABU') || exit ?>
<?php foreach ($articles as $article): ?>
<hr>
<img src="<?= $article['cover'] ?>" alt="Portada del artículo">
<p><b>Título:</b> <a href="<?= $article['url'] ?>"><?= $article['title'] ?></a></p>
<p><b>Sinopisis:</b> <?= $article['synopsis'] ?></p>
<p><b>Autor:</b> <?= $article['author'] ?></p>
<p><b>Número de favoritos:</b> <?= $article['favorites'] ?></p>
<p><b>Número de comentarios:</b> <?= $article['comments'] ?></p>
<div>
<?php endforeach ?>

View file

@ -0,0 +1,5 @@
<?php defined('NABU') || exit ?>
<h2>Comentarios</h2>
<?php require_once 'views/components/messages.php' ?>

View file

@ -0,0 +1,7 @@
<?php defined('NABU') || exit ?>
<footer>
<p>Construido con &#x1F49C; HTML, CSS, JavaScript y PHP.</p>
</footer>
</body>
</html>

View file

@ -0,0 +1,21 @@
<?php defined('NABU') || exit ?>
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<!-- CSS files -->
<link rel="icon" href="<?= NABU_DIRECTORY['images'] ?>/buho.svg" type="image/svg+xml" sizes="any">
<link rel="stylesheet" href="<?= NABU_DIRECTORY['styles'] ?>/normalize.css">
<link rel="stylesheet" href="<?= $style ?>">
<link rel="stylesheet" href="<?= $style_desktop ?>">
<!-- Fonts -->
<link rel="preconnect" href="https://fonts.googleapis.com">
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
<link href="https://fonts.googleapis.com/css2?family=Poppins:wght@400;500;600;700&display=swap" rel="stylesheet">
<!-- JS files -->
<script src="<?= NABU_DIRECTORY['scripts'] ?>/main.js" defer></script>
<title><?= $head_title ?></title>
</head>
<body>

View file

@ -0,0 +1,10 @@
<?php defined('NABU') || exit ?>
<!-- Muestra mensajes sobre advertencias o avisos. -->
<?php if (!empty($messages)): ?>
<div>
<?php foreach ($messages as $message): ?>
<p><mark><?= $message ?>.</mark></p>
<?php endforeach ?>
</div>
<?php endif ?>

View file

@ -0,0 +1,49 @@
<?php defined('NABU') || exit ?>
<div class="overlay"></div>
<nav class="nav">
<figure class="nav__logo-wrapper">
<img class="nav__logo" src="<?= NABU_DIRECTORY['images'] ?>/nabu-logo.svg" alt="Logo de nabu">
</figure>
<span class="nav__burger-icon" id="control-menu"></span>
<ul class="nav__menu" id="menu">
<li class="nav__item-logo">
<a href="<?= NABU_ROUTES['home'] ?>">
<img class="nav__logo" src="<?= NABU_DIRECTORY['images'] ?>/nabu-logo.svg" alt="Logo de nabu">
</a>
</li>
<li class="nav__item">
<span></span><a href="<?= NABU_ROUTES['all-articles'] ?>">Artículos</a>
</li>
<?php if (true): ?>
<li class="nav__item">
<span></span><a href="<?= NABU_ROUTES['login'] ?>">Inicia sesión</a>
</li>
<li class="nav__item">
<span></span><a href="<?= NABU_ROUTES['signup'] ?>">Comienza a escribir</a>
</li>
<?php else: ?>
<?php $username = $_SESSION['user']['username'] ?>
<?php if (false): ?>
<li class="nav__item">
<a href="<?= NABU_ROUTES['admin'] ?>">Administración</a>
</li>
<?php endif ?>
<li class="nav__item">
<a href="<?= NABU_ROUTES['sent-articles'] ?>">Artículos enviados</a>
</li>
<li class="nav__item">
<a href="<?= NABU_ROUTES['favorites'] ?>">Favoritos</a>
</li>
<li class="nav__item">
<a href="<?= NABU_ROUTES['post-article'] ?>">Publicar un post</a>
</li>
<li class="nav__item">
<a href="<?= NABU_ROUTES['profile'] . '&user=' . urlencode($username) ?>"><?= utils::escape($username) ?></a>
</li>
<li class="nav__item">
<span></span><a href="<?= NABU_ROUTES['logout'] ?>">Cerrar sesión</a>
</li>
<?php endif ?>
</ul>
</nav>

View file

@ -0,0 +1,5 @@
<?php defined('NABU') || exit ?>
<a href="<?= $view . '&page=' . $page - 1 ?>">Anterior</a>
<span><?= $page ?></span>
<a href="<?= $view . '&page=' . $page + 1 ?>">Siguiente</a>

View file

@ -0,0 +1,11 @@
<?php defined('NABU') || exit ?>
<form method="POST" action="<?= NABU['home'] ?>">
<input type="hidden" name="csrf" value="<?= $token ?>">
<span>
<input type="text" name="q" minlength="1" maxlength="246" required>
</span>
<span>
<input type="submit" name="search-submit" value="&#x1F50E">
</span>
</form>

View file

@ -0,0 +1,22 @@
<?php defined('NABU') || exit ?>
<?php if (!empty($articles)): ?>
<table>
<tr>
<td>Título</td>
<td>Autor</td>
<td></td>
<td></td>
<td></td>
</tr>
<?php foreach ($articles as $article): ?>
<?php $author = $article['author'] ?>
<tr>
<td><?= $article['title'] ?></td>
<td><a href="<?= NABU_ROUTES['profile'] . '&user=' . urlencode($author) ?>" target="_blank"><?= utils::escape($author) ?></a></td>
<td><a href="<?= NABU_ROUTES['delete-article'] . '&slug=' . $article['slug'] ?>">Eliminar</a></td>
<td><a href="<?= NABU_ROUTES['authorize-article'] . '&slug=' . $article['slug'] ?>">Publicar</a></td>
</tr>
<?php endforeach ?>
</table>
<?php endif ?>

View file

@ -0,0 +1,9 @@
<?php defined('NABU') || exit ?>
<?php require_once 'views/components/head.php' ?>
<?php require_once 'views/components/search.php' ?>
<h1>Muro</h1>
<?php require_once 'views/components/articles.php' ?>
<?php require_once 'views/components/footer.php' ?>

View file

@ -0,0 +1,7 @@
<?php defined('NABU') || exit ?>
<?php require_once 'views/components/head.php' ?>
<p><mark><?= $error ?>.</mark></p>
<?php require_once 'views/components/footer.php' ?>

View file

@ -0,0 +1,34 @@
<?php defined('NABU') || exit ?>
<?php $head_title = NABU_DEFAULT['website-name'] ?>
<?php $style = NABU_DIRECTORY['styles'] . '/pages/home/home.css' ?>
<?php $style_desktop = NABU_DIRECTORY['styles'] . '/pages/home/home-desktop.css' ?>
<?php require_once 'views/components/head.php' ?>
<header class="header">
<?php require_once 'views/components/navbar.php' ?>
<div class="hero">
<picture class="hero__img-wrapper">
<img src="<?= NABU_DIRECTORY['images'] ?>/hero.png" alt="Imagen inspiración en cualquier momento y cualquier lugar" class="hero__img">
</picture>
<h1 class="hero__CTA">Lee, inspírate y escribe</h1>
<p class="hero__secundary-CTA">
Lo mejor que puedes compartir es tu conocimiento.
</p>
<a href="<?= NABU_ROUTES['signup'] ?>" class="hero__button">Comienza a escribir</a>
</div>
</header>
<main>
<section></section>
<section></section>
<section></section>
</main>
<h2>Artículos más valorados</h2>
<?php require 'views/components/articles.php' ?>
<h2>Artículos recientes</h2>
<?php $articles = $recent_articles ?>
<?php require 'views/components/articles.php' ?>
<?php require_once 'views/components/footer.php' ?>

View file

@ -0,0 +1,3 @@
<?php defined('NABU') ?>
<?php require_once 'views/pages' ?>